|
@@ -29,8 +29,8 @@
|
|
|
<v-select
|
|
|
style="width:40%;"
|
|
|
size="small"
|
|
|
- v-model="form.gateType"
|
|
|
- id="promotionList-gateType"
|
|
|
+ v-model="form.stackFlag"
|
|
|
+ id="promotionList-stackFlag"
|
|
|
code="FLAG"
|
|
|
placeholder="请选择是否叠加规则"
|
|
|
allowClear></v-select>
|
|
@@ -113,17 +113,18 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</a-form-model-item>
|
|
|
- <a-form-model-item label="产品累计">
|
|
|
+ <a-form-model-item label="产品累计" v-if="form.gateFlag==='1'">
|
|
|
<v-select
|
|
|
style="width:40%;margin-right:10px;"
|
|
|
size="small"
|
|
|
- v-model="form.gateType"
|
|
|
- id="promotionList-gateType"
|
|
|
- code="FLAG"
|
|
|
+ v-model="form.borrowTimeLimtType"
|
|
|
+ id="promotionList-borrowTimeLimtType"
|
|
|
+ code="BORROW_TIME_LIMT_TYPE"
|
|
|
placeholder="请选择累计时间"
|
|
|
+ @change="borrowTimeLimtChange"
|
|
|
allowClear></v-select>
|
|
|
- <a-checkbox id="promotionList-restrictFlag" :checked="form.restrictFlag === '1'" size="small" @change="onChange">
|
|
|
- 客户采购单显示转促标签
|
|
|
+ <a-checkbox v-if="form.borrowTimeLimtType" id="promotionList-borrowTimeLimtType" :checked="form.borrowedShowFlag === '1'" size="small" @change="onBorrowedShowChange">
|
|
|
+ 加盟商显示“转促”标签
|
|
|
</a-checkbox>
|
|
|
</a-form-model-item>
|
|
|
<a-form-model-item label="特价规则" prop="discountType">
|
|
@@ -324,6 +325,7 @@ export default {
|
|
|
form: {
|
|
|
promotionRuleType: 'PROMO_PROD', // 特价产品
|
|
|
description: '', // 规则简称
|
|
|
+ stackFlag: '0', // 规则叠加
|
|
|
gateFlag: '0', // 门槛
|
|
|
gateType: undefined, // 门槛产品类型
|
|
|
gateValue: undefined, // 门槛产品配额值、满最低金额值、最低门槛金额和最低个数值
|
|
@@ -332,7 +334,9 @@ export default {
|
|
|
quotaAmount: undefined, // 赠特价产品金额
|
|
|
discountType: '0', // 特价规则
|
|
|
gateInfo: undefined, // 门槛产品规则描述
|
|
|
- ruleInfo: undefined// 特价产品规则描述
|
|
|
+ ruleInfo: undefined, // 特价产品规则描述
|
|
|
+ borrowTimeLimtType: undefined, // 产品累计
|
|
|
+ borrowedShowFlag: undefined// 显示转促标签 1是 0否
|
|
|
},
|
|
|
// 表单验证规则
|
|
|
rules: {
|
|
@@ -399,6 +403,17 @@ export default {
|
|
|
specialValue: undefined
|
|
|
}]
|
|
|
},
|
|
|
+ // 产品累计
|
|
|
+ borrowTimeLimtChange (val) {
|
|
|
+ this.form.borrowedShowFlag = '0'
|
|
|
+ if (!val && this.itemSn) {
|
|
|
+ this.form.borrowTimeLimtTypeDictValue = undefined
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 加盟商显示“转促”标签
|
|
|
+ onBorrowedShowChange (e) {
|
|
|
+ this.form.borrowedShowFlag = e.target.checked ? '1' : '0'
|
|
|
+ },
|
|
|
// 导入
|
|
|
closeGuideModel () {
|
|
|
this.openGuideModal = false
|
|
@@ -475,6 +490,8 @@ export default {
|
|
|
form.gateType = undefined
|
|
|
form.gateUnit = 'GE'
|
|
|
form.quotaUnit = undefined
|
|
|
+ form.borrowTimeLimtType = undefined
|
|
|
+ form.borrowedShowFlag = undefined
|
|
|
}
|
|
|
form.specialProductList = _this.$refs.specialProduct.getResultVal()
|
|
|
if (form.specialProductList.length == 0) {
|
|
@@ -525,13 +542,16 @@ export default {
|
|
|
form.gateInfo = '购买每满' + (form.gateUnit == 'YUAN' ? (form.gateValue).toFixed(2) : form.gateValue) + (form.gateUnit == 'YUAN' ? '元' : '个') + '门槛产品,可采购' + form.quotaAmount + '个特价产品(配额算销售额)'
|
|
|
}
|
|
|
}
|
|
|
+ let infoDetail = `<div>${form.stackFlag == '1' ? '规则叠加;' : ''}</div>`
|
|
|
if (form.discountType == '0') {
|
|
|
- form.ruleInfo = '手动输入特价'
|
|
|
+ infoDetail += '手动输入特价'
|
|
|
} else if (form.discountType == '1') {
|
|
|
- form.ruleInfo = '各级别价打折;省级折扣' + form.provinceValue.toFixed(2) + '%,市级折扣' + form.cityValue.toFixed(2) + '%,特约折扣' + form.specialValue.toFixed(2) + '%'
|
|
|
+ infoDetail += '各级别价打折;省级折扣' + form.provinceValue.toFixed(2) + '%,市级折扣' + form.cityValue.toFixed(2) + '%,特约折扣' + form.specialValue.toFixed(2) + '%'
|
|
|
} else {
|
|
|
- form.ruleInfo = '各级别价直降;省级直降' + form.provinceValue.toFixed(2) + ',市级直降' + form.cityValue.toFixed(2) + ',特约直降' + form.specialValue.toFixed(2)
|
|
|
+ infoDetail += '各级别价直降;省级直降' + form.provinceValue.toFixed(2) + ',市级直降' + form.cityValue.toFixed(2) + ',特约直降' + form.specialValue.toFixed(2)
|
|
|
}
|
|
|
+ infoDetail += `<div>${form.borrowTimeLimtType ? '产品累计:' + (form.borrowTimeLimtType == 'LENGTH_YEAR' ? '近一年' : '本年度') : ''}${form.borrowedShowFlag === '1' ? ',加盟商显示“转促”标签;' : ''}</div>`
|
|
|
+ form.ruleInfo = infoDetail
|
|
|
_this.spinning = true
|
|
|
promotionSave(form).then(res => {
|
|
|
if (res.status == 200) {
|
|
@@ -595,6 +615,7 @@ export default {
|
|
|
this.form = {
|
|
|
promotionRuleType: 'PROMO_PROD', // 特价产品
|
|
|
description: '', // 规则简称
|
|
|
+ stackFlag: '0', // 规则叠加
|
|
|
gateFlag: '0', // 门槛
|
|
|
gateType: undefined,
|
|
|
gateValue: undefined,
|
|
@@ -603,7 +624,9 @@ export default {
|
|
|
discountType: '0', // 特价规则
|
|
|
gateProductList: undefined,
|
|
|
specialProductList: undefined,
|
|
|
- quotaUnit: undefined
|
|
|
+ quotaUnit: undefined,
|
|
|
+ borrowTimeLimtType: undefined, // 产品累计
|
|
|
+ borrowedShowFlag: undefined// 显示转促标签 1是 0否
|
|
|
}
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs.ruleForm.resetFields()
|