Commit 9dc1cfb3 by 前端

Merge branch 'wuwx_dev_v2.1.0' into 'v2.1.0'

修改优惠券使用规则文案,服务券侧边栏显示文案

See merge request !117
2 parents e5ffceb5 14f7225b
......@@ -18,9 +18,9 @@ module.exports = {
code_message_map: {}
},
request: {
baseURL: 'http://scrm.test.glsx.com.cn/',
// baseURL: 'http://scrm.test.glsx.com.cn/',
// baseURL: 'http://192.168.2.42:8064/',
// baseURL: 'http://scrm.dev.glsx.com.cn/',
baseURL: 'http://scrm.dev.glsx.com.cn/',
// 设置超时时间
timeout: 180000,
// 携带凭证
......
......@@ -67,11 +67,11 @@
<template slot="directionalFlagHtml">
<div>
<el-radio v-model="editForm.directionalFlag" label="1" :disabled="apear != 'couponAdd'">所有客户可用</el-radio>
<span class="promptCopy">创建成功后立即生效,所有小程序用户均可领用</span>
<span class="promptCopy">仅代金券在小程序被客户直接领取,折扣券和兑换券需员工在企微端选择客户发送</span>
</div>
<div>
<el-radio v-model="editForm.directionalFlag" label="2" :disabled="apear != 'couponAdd'">定向礼包专用</el-radio>
<span class="promptCopy">企微员工通过企微工作台定向礼包发送给客户</span>
<span class="promptCopy">仅能被创建定向礼包时选取</span>
</div>
<div v-if="editForm.useChannel != 1">
<el-radio v-model="editForm.directionalFlag" label="3" :disabled="apear != 'couponAdd'">关联商品可用</el-radio>
......@@ -347,12 +347,7 @@ export default {
this.apear = 'couponEdit'
this.title = '编辑'
}
const stockIndex = this.editFormData.findIndex(val => val.name == 'stock')
const couponNameIndex = this.editFormData.findIndex(val => val.name == 'couponName')
const anticipatedCostIdx = this.editFormData.findIndex(val => val.name == 'anticipatedCost')
this.editFormData[couponNameIndex].isDisabled = true
this.editFormData[anticipatedCostIdx].isDisabled = true
this.editFormData[stockIndex].isDisabled = true
this.editCoupon(['stock', 'couponName', 'anticipatedCost'])
this.userDisable = true
} else {
this.apear = 'couponAdd'
......@@ -461,6 +456,12 @@ export default {
},
methods: {
editCoupon(attribute) {
attribute.forEach(item => {
let index = this.editFormData.findIndex(val => val.name == `${item}`)
this.editFormData[index].isDisabled = true
})
},
haveChange() {
let oDateOne = new Date(this.editForm.effectiveTime[0]).getTime()
let timeStamp = new Date().getTime()
......
......@@ -84,11 +84,11 @@
<template slot="directionalFlagHtml">
<div>
<el-radio v-model="editForm.directionalFlag" label="1" :disabled="apear != 'couponAdd'">所有客户可用</el-radio>
<span class="promptCopy">创建成功后立即生效,所有小程序用户均可领用</span>
<span class="promptCopy">仅代金券在小程序被客户直接领取,折扣券和兑换券需员工在企微端选择客户发送</span>
</div>
<div>
<el-radio v-model="editForm.directionalFlag" label="2" :disabled="apear != 'couponAdd'">定向礼包专用</el-radio>
<span class="promptCopy">企微员工通过企微工作台定向礼包发送给客户</span>
<span class="promptCopy">仅能被创建定向礼包时选取</span>
</div>
<div>
<el-radio v-model="editForm.directionalFlag" label="3" :disabled="apear != 'couponAdd'">关联商品可用</el-radio>
......@@ -196,7 +196,7 @@ export default {
couponName: [{ required: true, message: '请输入优惠券名称', trigger: 'change' }],
discountIntensity: [{ required: true, message: '请输入优惠内容', trigger: 'change' }],
useBarriers: [{ required: true, message: '请选择使用限制', trigger: 'change' }],
full: [{ required: true, message: '请输入金额', trigger: 'blur' }],
full: [{ required: true, message: '请输入99999.99以内的金额', trigger: 'blur' }],
effectiveType: [{ required: true, message: '请选择有效期', trigger: 'change' }],
effectiveTime: [{ required: true, message: '有效期不能为空', trigger: 'change' }],
effectiveDays: [{ required: true, message: '有效天数不能为空', trigger: 'blur' }],
......@@ -282,15 +282,7 @@ export default {
this.apear = 'couponEdit'
this.title = '编辑'
}
this.isDisabled = true
const couponNameIndex = this.editFormData.findIndex(val => val.name == 'couponName')
const anticipatedCostIndex = this.editFormData.findIndex(val => val.name == 'anticipatedCost')
const stockIndex = this.editFormData.findIndex(val => val.name == 'stock')
const discountIndex = this.editFormData.findIndex(val => val.name == 'discountIntensity')
this.editFormData[couponNameIndex].isDisabled = this.isDisabled
this.editFormData[anticipatedCostIndex].isDisabled = this.isDisabled
this.editFormData[stockIndex].isDisabled = this.isDisabled
this.editFormData[discountIndex].isDisabled = this.isDisabled
this.editCoupon(['couponName', 'anticipatedCost', 'stock', 'discountIntensity'])
this.userDisable = true
} else {
this.apear = 'couponAdd'
......@@ -345,6 +337,12 @@ export default {
}
},
methods: {
editCoupon(attribute) {
attribute.forEach(item => {
let index = this.editFormData.findIndex(val => val.name == `${item}`)
this.editFormData[index].isDisabled = true
})
},
loseFocus() {
if (this.editForm.full <= 0 || this.editForm.full > 99999.99) {
this.editForm.full = ''
......
<!-- 编辑兑换券 -->
<template>
<div class="edit-share marketing p-t-20 edit-box">
<div class="container edit-container" style="height: 630px; position: relative">
<div class="container edit-container" style="height: 650px; position: relative">
<div class="right_show">
<div class="card-top"></div>
<div class="slider">
......@@ -57,11 +57,11 @@
<template slot="directionalFlagHtml">
<div>
<el-radio v-model="editForm.directionalFlag" label="1" :disabled="apear != 'couponAdd'">所有客户可用</el-radio>
<span class="promptCopy">创建成功后立即生效,所有小程序用户均可领用</span>
<span class="promptCopy">仅代金券在小程序被客户直接领取,折扣券和兑换券需员工在企微端选择客户发送</span>
</div>
<div>
<el-radio v-model="editForm.directionalFlag" label="2" :disabled="apear != 'couponAdd'">定向礼包专用</el-radio>
<span class="promptCopy">企微员工通过企微工作台定向礼包发送给客户</span>
<span class="promptCopy">仅能被创建定向礼包时选取</span>
</div>
<div>
<el-radio v-model="editForm.directionalFlag" label="3" :disabled="apear != 'couponAdd'">关联商品可用</el-radio>
......@@ -227,13 +227,7 @@ export default {
this.apear = 'couponEdit'
this.title = '编辑'
}
this.isDisabled = true
const couponNameIndex = this.editFormData.findIndex(val => val.name == 'couponName')
const anticipatedCostIndex = this.editFormData.findIndex(val => val.name == 'anticipatedCost')
const stockIndex = this.editFormData.findIndex(val => val.name == 'stock')
this.editFormData[couponNameIndex].isDisabled = this.isDisabled
this.editFormData[anticipatedCostIndex].isDisabled = this.isDisabled
this.editFormData[stockIndex].isDisabled = this.isDisabled
this.editCoupon(['couponName', 'anticipatedCost', 'stock'])
this.userDisable = true
} else {
this.apear = 'couponAdd'
......@@ -276,6 +270,12 @@ export default {
},
methods: {
editCoupon(attribute) {
attribute.forEach(item => {
let index = this.editFormData.findIndex(val => val.name == `${item}`)
this.editFormData[index].isDisabled = true
})
},
haveChange() {
let oDateOne = new Date(this.editForm.effectiveTime[0]).getTime()
let timeStamp = new Date().getTime()
......
......@@ -290,13 +290,15 @@ export default {
},
limitText() {
if (this.ruleForm.customUseLimit == 0) {
return `不限制使用次数`
return `不限次数`
} else if (this.ruleForm.customUseLimit == 1) {
return `有效期内可使用${this.ruleForm.limitTime1}次`
} else if (this.ruleForm.customUseLimit == 2) {
} else if (this.ruleForm.customUseLimit == 2 && this.ruleForm.effectiveType != 3) {
return `有效期内每${this.ruleForm.limitDays}天内可使用${this.ruleForm.limitTime2}次`
} else if (this.ruleForm.customUseLimit == 2 && this.ruleForm.effectiveType == 3) {
return '不限次数'
}
return '不限制使用次数'
return '不限次数'
},
effectiveRangeText() {
if (this.ruleForm.effectiveType == 1) {
......
......@@ -427,7 +427,7 @@ export default {
},
mounted() {
this.getCount()
// this.getCount()
this.getOptionsList('searchFormData1')
this.getOptionsList('searchFormData2')
this.getOptionsList('searchFormData3')
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!