Commit 39f12fc2 by wuwx

代金券,兑换券添加使用规则

1 parent 7bbe3752
......@@ -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,
// 携带凭证
......
......@@ -49,6 +49,11 @@
</div>
<p class="edit-title">{{ title }}折扣劵</p>
<glsx-combi-form class="edit-form-container" ref="editFormRef" :isEdit="true" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<template slot="directionalFlagHtml">
<el-radio v-model="editForm.directionalFlag" label="1" :disabled="apear != 'couponAdd'">所有客户可用</el-radio>
<el-radio v-model="editForm.directionalFlag" label="2" :disabled="apear != 'couponAdd'">定向礼包专用</el-radio>
<el-radio v-model="editForm.directionalFlag" label="3" :disabled="apear != 'couponAdd'">关联商品可用</el-radio>
</template>
<template slot="effectiveHtml">
<el-form-item prop="effectiveTime" ref="effectiveTime" style="margin-top: 12px; display: block">
<el-radio v-model="editForm.effectiveType" label="2" :disabled="apear != 'couponAdd'">
......@@ -129,7 +134,8 @@ export default {
effectiveType: '2',
effectiveTime: [],
effectiveDays: '',
anticipatedCost: ''
anticipatedCost: '',
directionalFlag: '1'
},
editRule: {
anticipatedCost: [{ required: true, message: '请输入预估成本', trigger: 'change' }],
......@@ -163,6 +169,13 @@ export default {
append: '张'
},
{
label: '使用规则',
name: 'directionalFlag',
addHtml: 'directionalFlagHtml',
isHide: false
// index:5
},
{
label: '有效期',
name: 'effectiveType',
addHtml: 'effectiveHtml'
......@@ -259,6 +272,7 @@ export default {
getInfo() {
this.$apis.couponManage.getCouponDetailApi({ couponId: this.routeInfo.id }).then(res => {
this.editForm = this.$common.utils.deepClone(res)
this.editForm.directionalFlag = this.editForm.directionalFlag + ''
this.editForm.effectiveType = this.editForm.effectiveType + ''
this.editForm.anticipatedCost = (this.editForm.anticipatedCost / 100).toFixed(2)
//有效期
......@@ -325,6 +339,8 @@ export default {
}
//使用描述
obj.useDescription = form.useDescription
//是否定制礼包专用
obj.directionalFlag = form.directionalFlag
//预估成本
obj.anticipatedCost = form.anticipatedCost * 100
return obj
......
......@@ -28,6 +28,11 @@
</div>
<p class="edit-title">{{ title }}兑换券</p>
<glsx-combi-form class="edit-form-container" ref="editFormRef" :isEdit="true" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<template slot="directionalFlagHtml">
<el-radio v-model="editForm.directionalFlag" label="1" :disabled="apear != 'couponAdd'">所有客户可用</el-radio>
<el-radio v-model="editForm.directionalFlag" label="2" :disabled="apear != 'couponAdd'">定向礼包专用</el-radio>
<el-radio v-model="editForm.directionalFlag" label="3" :disabled="apear != 'couponAdd'">关联商品可用</el-radio>
</template>
<template slot="effectiveHtml">
<el-form-item prop="effectiveTime" ref="effectiveTime" style="margin-top: 12px; display: block">
<el-radio v-model="editForm.effectiveType" label="2" :disabled="apear != 'couponAdd'">
......@@ -108,7 +113,8 @@ export default {
effectiveType: '2',
effectiveTime: [],
effectiveDays: '',
anticipatedCost: ''
anticipatedCost: '',
directionalFlag: '1'
},
editRule: {
anticipatedCost: [{ required: true, message: '请输入预估成本', trigger: 'change' }],
......@@ -142,6 +148,13 @@ export default {
append: '张'
},
{
label: '使用规则',
name: 'directionalFlag',
addHtml: 'directionalFlagHtml',
isHide: false
// index:5
},
{
label: '有效期',
name: 'effectiveType',
addHtml: 'effectiveHtml'
......@@ -237,6 +250,7 @@ export default {
getInfo() {
this.$apis.couponManage.getCouponDetailApi({ couponId: this.routeInfo.id }).then(res => {
this.editForm = this.$common.utils.deepClone(res)
this.editForm.directionalFlag = this.editForm.directionalFlag + ''
this.editForm.effectiveType = this.editForm.effectiveType + ''
this.editForm.anticipatedCost = (this.editForm.anticipatedCost / 100).toFixed(2)
//有效期
......@@ -303,6 +317,8 @@ export default {
}
//使用描述
obj.useDescription = form.useDescription
//是否定制礼包专用
obj.directionalFlag = form.directionalFlag
//预估成本
obj.anticipatedCost = form.anticipatedCost * 100
return obj
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!