Commit 215181ca by 前端

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

Wuwx dev v2.8.0

See merge request !314
2 parents cadd68cb 245eb274
...@@ -190,6 +190,7 @@ export default { ...@@ -190,6 +190,7 @@ 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,
...@@ -807,6 +808,8 @@ export default { ...@@ -807,6 +808,8 @@ export default {
method = 'createCouponApi' //后台创建优惠券 method = 'createCouponApi' //后台创建优惠券
} }
console.log(params) console.log(params)
if (this.clickStatus) return
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,
...@@ -816,6 +819,9 @@ export default { ...@@ -816,6 +819,9 @@ export default {
this.cancelJump() this.cancelJump()
} }
}) })
.finally(() => {
this.clickStatus = false
})
} }
}) })
}, },
......
...@@ -168,6 +168,7 @@ export default { ...@@ -168,6 +168,7 @@ 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: {
...@@ -566,6 +567,8 @@ export default { ...@@ -566,6 +567,8 @@ export default {
} else { } else {
method = 'createCouponApi' //后台创建优惠券 method = 'createCouponApi' //后台创建优惠券
} }
if (this.clickStatus) return
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,
...@@ -575,6 +578,9 @@ export default { ...@@ -575,6 +578,9 @@ export default {
this.cancelJump() this.cancelJump()
} }
}) })
.finally(() => {
this.clickStatus = false
})
} }
}) })
}, },
......
...@@ -127,6 +127,7 @@ export default { ...@@ -127,6 +127,7 @@ 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;
...@@ -457,6 +458,8 @@ export default { ...@@ -457,6 +458,8 @@ export default {
} else { } else {
method = 'createCouponApi' //后台创建优惠券 method = 'createCouponApi' //后台创建优惠券
} }
if (this.clickStatus) return
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,
...@@ -466,6 +469,9 @@ export default { ...@@ -466,6 +469,9 @@ export default {
this.cancelJump() this.cancelJump()
} }
}) })
.finally(() => {
this.clickStatus = false
})
} }
}) })
}, },
......
...@@ -209,6 +209,7 @@ export default { ...@@ -209,6 +209,7 @@ export default {
}, 1000) }, 1000)
} }
return { return {
clickStatus: false,
isEdit: false, isEdit: false,
showSubmit: true, showSubmit: true,
disabledDescription: false, disabledDescription: false,
...@@ -402,6 +403,8 @@ export default { ...@@ -402,6 +403,8 @@ export default {
}, },
submitForm(formName) { submitForm(formName) {
if (this.clickStatus) return
this.clickStatus = true
this.$refs[formName].validate((valid, errorObj) => { this.$refs[formName].validate((valid, errorObj) => {
var merchantval = true var merchantval = true
var merchantErrorObj = [] var merchantErrorObj = []
...@@ -510,6 +513,7 @@ export default { ...@@ -510,6 +513,7 @@ export default {
}) })
.finally(() => { .finally(() => {
this.sloading = false this.sloading = false
this.clickStatus = false
}) })
}, },
//更新服务 //更新服务
......
...@@ -389,7 +389,7 @@ export default { ...@@ -389,7 +389,7 @@ export default {
previewForm(val) { previewForm(val) {
console.log(val) console.log(val)
const value = this.$common.utils.deepClone(val) const value = this.$common.utils.deepClone(val)
if (!value[0].attContent) value.splice(0, 1) if (value[0] && !value[0].attContent) value.splice(0, 1)
this.previewVal = value this.previewVal = value
}, },
handleCancel() { handleCancel() {
......
...@@ -225,7 +225,7 @@ export default { ...@@ -225,7 +225,7 @@ export default {
mounted() { mounted() {
this.getCustomerDetail(this.id) this.getCustomerDetail(this.id)
this.getStatistic() this.getStatistic()
this.refreshData() this.time = dayjs(new Date().getTime()).format('YYYY-MM-DD HH:mm:ss')
// console.log(this.basicInfo.condition, '----') // console.log(this.basicInfo.condition, '----')
}, },
computed: { computed: {
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<template v-if="item.attType == 1"> <template v-if="item.attType == 1">
<div class="preview-text text" v-html="item.attContent"></div> <div class="preview-text text" v-html="item.attContent"></div>
</template> </template>
<template v-else-if="item.attType == 7"> <template v-else-if="item.attType == 7 || item.attType == 4">
<div class="preview-activity"> <div class="preview-activity">
<div class="activity-name">{{ item.attContent.marketingName }}</div> <div class="activity-name">{{ item.attContent.marketingName }}</div>
<img v-if="item.attContent.marketingType != 5 && item.attContent.marketingType != 6 && item.attContent.marketingType != 7" class="activity-logo" src="@/assets/guestCustom/activity-logo.png" alt /> <img v-if="item.attContent.marketingType != 5 && item.attContent.marketingType != 6 && item.attContent.marketingType != 7" class="activity-logo" src="@/assets/guestCustom/activity-logo.png" alt />
...@@ -83,7 +83,7 @@ export default { ...@@ -83,7 +83,7 @@ export default {
}) })
item.attContent = htm item.attContent = htm
} else if (item.attType != 2 && item.attType != 3) { } else if (item.attType != 2 && item.attType != 3) {
console.log(item.attContent, JSON.parse(item.attContent).fileName) // console.log(item.attContent, JSON.parse(item.attContent).fileName)
item.attContent = JSON.parse(item.attContent) item.attContent = JSON.parse(item.attContent)
} }
}) })
...@@ -115,7 +115,7 @@ export default { ...@@ -115,7 +115,7 @@ export default {
} }
</script> </script>
<style lang="scss" scope> <style lang="scss" scoped>
.img-bg { .img-bg {
position: relative; position: relative;
width: 290px; width: 290px;
......
...@@ -329,12 +329,23 @@ export default { ...@@ -329,12 +329,23 @@ export default {
if (pathArr[2] == 'addCustomerGroup' || pathArr[2] == 'detaiCustomeGroup') { if (pathArr[2] == 'addCustomerGroup' || pathArr[2] == 'detaiCustomeGroup') {
vm.activeIndex = 2 vm.activeIndex = 2
} }
vm.refreshData(vm.activeIndex) if (vm.activeIndex == 1) {
vm.time = dayjs(new Date().getTime()).format('YYYY-MM-DD HH:mm:ss')
}
}) })
}, },
mounted() { mounted() {
// this.wxTips() // this.wxTips()
}, },
watch: {
activeIndex (newVal,oldVal) {
if (newVal == 2) {
this.times = dayjs(new Date().getTime()).format('YYYY-MM-DD HH:mm:ss')
} else if (newVal == 1) {
this.time = dayjs(new Date().getTime()).format('YYYY-MM-DD HH:mm:ss')
}
}
},
beforeDestroy() { beforeDestroy() {
this.$message.closeAll() this.$message.closeAll()
}, },
...@@ -361,11 +372,9 @@ export default { ...@@ -361,11 +372,9 @@ export default {
if (val == 1) { if (val == 1) {
this.key = new Date() this.key = new Date()
if (this.$refs.customer) this.$refs.customer.refreshTable() if (this.$refs.customer) this.$refs.customer.refreshTable()
this.refreshData('1')
} else { } else {
this.groupKey = new Date() this.groupKey = new Date()
if (this.$refs.customerGroup) this.$refs.customerGroup.refreshTable() if (this.$refs.customerGroup) this.$refs.customerGroup.refreshTable()
this.refreshData('2')
} }
}) })
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!