Commit af737713 by 李伟康

修复BUG

1 parent 542e1553
......@@ -746,7 +746,7 @@ export default {
},
activityRedEnvelopeList: [],
activityRedEnvelopeKey: Date.now(),
dialogTitle:'新建权益卡'
dialogTitle: '新建权益卡'
}
},
components: {
......@@ -777,13 +777,13 @@ export default {
}
},
methods: {
async getActivityRedEnvelopeList (merchantId) {
const res = await this.$apis.equityApi.getActivityRedEnvelopeList({ merchantId })
async getActivityRedEnvelopeList (merchantId, activityRedEnvelopeId = '') {
const res = await this.$apis.equityApi.getActivityRedEnvelopeList({ merchantId, activityRedEnvelopeId })
this.activityRedEnvelopeList = res
},
chooseRed (id) {
const {activityRedEnvelopeId} = this.ruleForm
if(activityRedEnvelopeId && activityRedEnvelopeId == id) id = ''
const { activityRedEnvelopeId } = this.ruleForm
if (activityRedEnvelopeId && activityRedEnvelopeId == id) id = ''
this.ruleForm.activityRedEnvelopeId = id
this.activityRedEnvelopeKey = Date.now()
},
......@@ -952,7 +952,7 @@ export default {
delete row.activityRedEnvelopeResponseList
}
this.dialogTitle = '编辑权益卡'
this.getActivityRedEnvelopeList(row.merchantId)
this.getActivityRedEnvelopeList(row.merchantId, row.activityRedEnvelopeId)
this.ruleForm = row
this.dialogVisible = true
this.ruleForm.effectiveType = row.effectiveType + ''
......@@ -973,7 +973,11 @@ export default {
this.disableSelect = false
this.isAdd = true
this.dialogVisible = true
this.getActivityRedEnvelopeList(row.merchantId)
if (row.activityRedEnvelopeResponseList && row.activityRedEnvelopeResponseList.length) {
row.activityRedEnvelopeId = row.activityRedEnvelopeResponseList[0].activityRedEnvelopeId
delete row.activityRedEnvelopeResponseList
}
this.getActivityRedEnvelopeList(row.merchantId, row.activityRedEnvelopeId)
this.ruleForm = row
this.ruleForm.effectiveType = row.effectiveType + ''
if (this.ruleForm.effectiveType == 2) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!