Commit 9fa63b12 by 前端

Merge branch 'wuwx_dev_v2.8.0' into 'v2.8.0'

Wuwx dev v2.8.0

See merge request !320
2 parents 079ca9e0 fc0ba59d
...@@ -190,7 +190,6 @@ export default { ...@@ -190,7 +190,6 @@ export default {
title: '创建', title: '创建',
editChildRef: 'editChildRef', editChildRef: 'editChildRef',
loading: false, loading: false,
clickStatus: false,
routeInfo: { routeInfo: {
// 1-新增;2-编辑;3-查看 // 1-新增;2-编辑;3-查看
addOrEdit: 1, addOrEdit: 1,
...@@ -808,8 +807,7 @@ export default { ...@@ -808,8 +807,7 @@ export default {
method = 'createCouponApi' //后台创建优惠券 method = 'createCouponApi' //后台创建优惠券
} }
console.log(params) console.log(params)
if (this.clickStatus) return this.loading = true
this.clickStatus = true
this.$apis.couponManage[method](params).then(res => { this.$apis.couponManage[method](params).then(res => {
this.$message({ this.$message({
message: res.code == '0' ? '操作成功' : res.message, message: res.code == '0' ? '操作成功' : res.message,
...@@ -820,7 +818,7 @@ export default { ...@@ -820,7 +818,7 @@ export default {
} }
}) })
.finally(() => { .finally(() => {
this.clickStatus = false this.loading = false
}) })
} }
}) })
......
...@@ -168,7 +168,6 @@ export default { ...@@ -168,7 +168,6 @@ export default {
format: 'yyyy-MM-dd HH:mm:ss', // 日期显示格式 format: 'yyyy-MM-dd HH:mm:ss', // 日期显示格式
showSubmit: true, showSubmit: true,
userDisable: false, userDisable: false,
clickStatus: false,
size: 'small', size: 'small',
title: '创建', title: '创建',
titleObj: { titleObj: {
...@@ -567,8 +566,7 @@ export default { ...@@ -567,8 +566,7 @@ export default {
} else { } else {
method = 'createCouponApi' //后台创建优惠券 method = 'createCouponApi' //后台创建优惠券
} }
if (this.clickStatus) return this.loading = true
this.clickStatus = true
this.$apis.couponManage[method](params).then(res => { this.$apis.couponManage[method](params).then(res => {
this.$message({ this.$message({
message: res.code == '0' ? '操作成功' : res.message, message: res.code == '0' ? '操作成功' : res.message,
...@@ -579,7 +577,7 @@ export default { ...@@ -579,7 +577,7 @@ export default {
} }
}) })
.finally(() => { .finally(() => {
this.clickStatus = false this.loading = false
}) })
} }
}) })
......
...@@ -127,7 +127,6 @@ export default { ...@@ -127,7 +127,6 @@ export default {
editChildRef: 'editChildRef', editChildRef: 'editChildRef',
loading: false, loading: false,
editStatus: false, editStatus: false,
clickStatus: false,
// pickerOptions: { // pickerOptions: {
// disabledDate(v) {//禁用当前之前的日期 // disabledDate(v) {//禁用当前之前的日期
// return v.getTime() < new Date().getTime() - 86400000; // return v.getTime() < new Date().getTime() - 86400000;
...@@ -458,8 +457,7 @@ export default { ...@@ -458,8 +457,7 @@ export default {
} else { } else {
method = 'createCouponApi' //后台创建优惠券 method = 'createCouponApi' //后台创建优惠券
} }
if (this.clickStatus) return this.loading = true
this.clickStatus = true
this.$apis.couponManage[method](params).then(res => { this.$apis.couponManage[method](params).then(res => {
this.$message({ this.$message({
message: res.code == '0' ? '操作成功' : res.message, message: res.code == '0' ? '操作成功' : res.message,
...@@ -470,7 +468,7 @@ export default { ...@@ -470,7 +468,7 @@ export default {
} }
}) })
.finally(() => { .finally(() => {
this.clickStatus = false this.loading = false
}) })
} }
}) })
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div class="topMsg"> <div class="topMsg">
<p class="pageTitle">基本信息</p> <p class="pageTitle">基本信息</p>
</div> </div>
<div class="live-room container" style="padding-top: 20px;"> <div class="live-room container" style="padding-top: 20px;" v-loading="sloading">
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="120px" class="demo-ruleForm"> <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="120px" class="demo-ruleForm">
<el-form-item size="small" label="服务名称" prop="couponName" style="width: 440px" id="couponName"> <el-form-item size="small" label="服务名称" prop="couponName" style="width: 440px" id="couponName">
<el-input size="small" :disabled="disabledContent" v-model.trim="ruleForm.couponName" maxlength="20" placeholder="请输入服务名称,如“精洗轿车”"></el-input> <el-input size="small" :disabled="disabledContent" v-model.trim="ruleForm.couponName" maxlength="20" placeholder="请输入服务名称,如“精洗轿车”"></el-input>
...@@ -159,7 +159,7 @@ ...@@ -159,7 +159,7 @@
</div> </div>
<GLFooter> <GLFooter>
<el-button @click="goBack" size="medium">取消</el-button> <el-button @click="goBack" size="medium">取消</el-button>
<el-button type="primary" v-if="showSubmit" @click="submitForm('ruleForm')" size="medium" :loading="loading">提交</el-button> <el-button type="primary" v-if="showSubmit" @click="submitForm('ruleForm')" size="medium" :loading="sloading">提交</el-button>
</GLFooter> </GLFooter>
<!-- :hasScroll="false" :noBtnOk="true" :noCancel="true" :noClose="false" --> <!-- :hasScroll="false" :noBtnOk="true" :noCancel="true" :noClose="false" -->
<glsx-dialog title="" top="30vh" :hasScroll="false" width="547px" btnCloseLabel="取消" :noClose="false" :noCancel="true" btnSize="small" :isVisible="isDialogVisible" :showClose="false" @closeDialog="handleClose" @confirmDialog="handleConfirm"> <glsx-dialog title="" top="30vh" :hasScroll="false" width="547px" btnCloseLabel="取消" :noClose="false" :noCancel="true" btnSize="small" :isVisible="isDialogVisible" :showClose="false" @closeDialog="handleClose" @confirmDialog="handleConfirm">
...@@ -209,7 +209,7 @@ export default { ...@@ -209,7 +209,7 @@ export default {
}, 1000) }, 1000)
} }
return { return {
clickStatus: false, timer: Function,
isEdit: false, isEdit: false,
showSubmit: true, showSubmit: true,
disabledDescription: false, disabledDescription: false,
...@@ -403,8 +403,8 @@ export default { ...@@ -403,8 +403,8 @@ export default {
}, },
submitForm(formName) { submitForm(formName) {
if (this.clickStatus) return clearTimeout(this.timer)
this.clickStatus = true this.timer = setTimeout(() => {
this.$refs[formName].validate((valid, errorObj) => { this.$refs[formName].validate((valid, errorObj) => {
var merchantval = true var merchantval = true
var merchantErrorObj = [] var merchantErrorObj = []
...@@ -429,6 +429,7 @@ export default { ...@@ -429,6 +429,7 @@ export default {
return false return false
} }
}) })
},500)
}, },
//创建服务 //创建服务
createService() { createService() {
...@@ -497,23 +498,17 @@ export default { ...@@ -497,23 +498,17 @@ export default {
createService(params) createService(params)
.then(res => { .then(res => {
if (res.code == 0) { if (res.code == 0) {
this.sloading = false
this.$message.success('操作成功') this.$message.success('操作成功')
this.$router.push('/couponManage/index') this.$router.push('/couponManage/index')
} else { } else {
this.sloading = false
this.$message({ this.$message({
type: 'error', type: 'error',
message: res.message message: res.message
}) })
} }
}) })
.catch(err => {
this.sloading = false
})
.finally(() => { .finally(() => {
this.sloading = false this.sloading = false
this.clickStatus = false
}) })
}, },
//更新服务 //更新服务
...@@ -530,20 +525,15 @@ export default { ...@@ -530,20 +525,15 @@ export default {
updateService(param) updateService(param)
.then(res => { .then(res => {
if (res.code == 0) { if (res.code == 0) {
this.sloading = false
this.$message.success('编辑服务成功') this.$message.success('编辑服务成功')
this.$router.push('/couponManage/index') this.$router.push('/couponManage/index')
} else { } else {
this.sloading = false
this.$message({ this.$message({
type: 'error', type: 'error',
message: res.message message: res.message
}) })
} }
}) })
.catch(err => {
this.sloading = false
})
.finally(() => { .finally(() => {
this.sloading = false this.sloading = false
}) })
......
...@@ -147,7 +147,7 @@ ...@@ -147,7 +147,7 @@
</el-radio> </el-radio>
<el-button v-show="!baseData.consultantList.length" type="text"></el-button> <el-button v-show="!baseData.consultantList.length" type="text"></el-button>
<p style="color: #5850ff;margin-left: 22px;" @click="handleNoServer">请在首页-跟进专员模块里添加类型为“在线客服”的跟进专员</p> <p style="color: #5850ff;margin-left: 22px;" @click="handleNoServer">请在首页-跟进专员模块里添加类型为“在线客服”的跟进专员</p>
<el-radio v-model="editForm.customerServerType" :label="2"> <el-radio v-model="editForm.customerServerType" v-if="showGh" :label="2">
<el-input style="width: 320px" placeholder="请输入链接" :disabled="editForm.customerServerType == 1" v-model="editForm.customerServerUrl" clearable></el-input> <el-input style="width: 320px" placeholder="请输入链接" :disabled="editForm.customerServerType == 1" v-model="editForm.customerServerUrl" clearable></el-input>
</el-radio> </el-radio>
</div> </div>
...@@ -226,6 +226,7 @@ export default { ...@@ -226,6 +226,7 @@ export default {
name: 'homeSet', name: 'homeSet',
data() { data() {
return { return {
showGh: false,
size: 'small', size: 'small',
userInfo: {}, userInfo: {},
// 查看大图 // 查看大图
...@@ -450,6 +451,8 @@ export default { ...@@ -450,6 +451,8 @@ export default {
this.externalFormList[idx].editFormData[idxx].isHide = true this.externalFormList[idx].editFormData[idxx].isHide = true
this.externalFormList[idxxx].editFormData[idxxxx].isHide = true this.externalFormList[idxxx].editFormData[idxxxx].isHide = true
} }
let href = window.location.host
this.showGh = href.indexOf('cgacar') != -1
}, },
methods: { methods: {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!