Commit c4019706 by wuwx

修改优惠劵显示Bug

1 parent 764c5543
......@@ -317,9 +317,12 @@ export default {
this.apear = 'couponEdit'
this.title = '编辑'
}
this.editFormData[0].isDisabled = true
this.editFormData[1].isDisabled = true
this.editFormData[9].isDisabled = true
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.userDisable = true
} else {
this.apear = 'couponAdd'
......
......@@ -216,15 +216,19 @@ export default {
this.apear = 'couponSee'
this.showSubmit = false
this.title = '查看'
this.editFormData[5].isHide = false
const editHtmlIndex = this.editFormData.findIndex(val => val.addHtml == 'editHtml')
this.editFormData[editHtmlIndex].isHide = false
} else if (addOrEdit == 2) {
this.apear = 'couponEdit'
this.title = '编辑'
}
this.isDisabled = true
this.editFormData[0].isDisabled = this.isDisabled
this.editFormData[1].isDisabled = this.isDisabled
this.editFormData[2].isDisabled = this.isDisabled
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.userDisable = true
} else {
this.apear = 'couponAdd'
......
......@@ -193,7 +193,8 @@ export default {
if (id) {
if (addOrEdit == 3) {
this.apear = 'couponSee'
this.editFormData[5].isHide = false
const editHtmlIndex = this.editFormData.findIndex(val => val.addHtml == 'editHtml')
this.editFormData[editHtmlIndex].isHide = false
this.showSubmit = false
this.title = '查看'
} else if (addOrEdit == 2) {
......@@ -201,8 +202,12 @@ export default {
this.title = '编辑'
}
this.isDisabled = true
this.editFormData[0].isDisabled = this.isDisabled
this.editFormData[1].isDisabled = this.isDisabled
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.userDisable = true
} else {
this.apear = 'couponAdd'
......
......@@ -806,8 +806,8 @@ export default {
'editForm.expressFee'(newValue, oldValue) {
this.editForm.expressFee = limitPrice(newValue, oldValue, 5, 2, 0, 100000)
},
// 判断配送发货状态
'editForm.relatedCouponName'(newValue, oldValue) {
// 关联优惠券radio,判断配送发货状态
'editForm.relatedCouponId'(newValue, oldValue) {
if (newValue) {
let inx = this.externalFormList[2].editFormData.findIndex(val => val.name == 'deliveryType')
this.externalFormList[2].editFormData[inx].optionList.map(val => {
......@@ -823,9 +823,6 @@ export default {
// this.editForm.deliveryType = 2
this.handleTypeChange(this.editForm.deliveryType)
}
},
// 关联优惠券radio
'editForm.relatedCouponId'(newValue, oldValue) {
this.associationRadio = newValue
}
},
......@@ -1232,6 +1229,7 @@ export default {
goodsStock: res.goodsStock + '',
supplyPrice: res.supplyPrice ? (res.supplyPrice / 100).toFixed(2) : '',
describeTxt: '',
relatedCouponId: '',
descImgList: [],
businessType: []
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!