Commit af737713 by 李伟康

修复BUG

1 parent 542e1553
...@@ -746,7 +746,7 @@ export default { ...@@ -746,7 +746,7 @@ export default {
}, },
activityRedEnvelopeList: [], activityRedEnvelopeList: [],
activityRedEnvelopeKey: Date.now(), activityRedEnvelopeKey: Date.now(),
dialogTitle:'新建权益卡' dialogTitle: '新建权益卡'
} }
}, },
components: { components: {
...@@ -777,13 +777,13 @@ export default { ...@@ -777,13 +777,13 @@ export default {
} }
}, },
methods: { methods: {
async getActivityRedEnvelopeList (merchantId) { async getActivityRedEnvelopeList (merchantId, activityRedEnvelopeId = '') {
const res = await this.$apis.equityApi.getActivityRedEnvelopeList({ merchantId }) const res = await this.$apis.equityApi.getActivityRedEnvelopeList({ merchantId, activityRedEnvelopeId })
this.activityRedEnvelopeList = res this.activityRedEnvelopeList = res
}, },
chooseRed (id) { chooseRed (id) {
const {activityRedEnvelopeId} = this.ruleForm const { activityRedEnvelopeId } = this.ruleForm
if(activityRedEnvelopeId && activityRedEnvelopeId == id) id = '' if (activityRedEnvelopeId && activityRedEnvelopeId == id) id = ''
this.ruleForm.activityRedEnvelopeId = id this.ruleForm.activityRedEnvelopeId = id
this.activityRedEnvelopeKey = Date.now() this.activityRedEnvelopeKey = Date.now()
}, },
...@@ -952,7 +952,7 @@ export default { ...@@ -952,7 +952,7 @@ export default {
delete row.activityRedEnvelopeResponseList delete row.activityRedEnvelopeResponseList
} }
this.dialogTitle = '编辑权益卡' this.dialogTitle = '编辑权益卡'
this.getActivityRedEnvelopeList(row.merchantId) this.getActivityRedEnvelopeList(row.merchantId, row.activityRedEnvelopeId)
this.ruleForm = row this.ruleForm = row
this.dialogVisible = true this.dialogVisible = true
this.ruleForm.effectiveType = row.effectiveType + '' this.ruleForm.effectiveType = row.effectiveType + ''
...@@ -973,7 +973,11 @@ export default { ...@@ -973,7 +973,11 @@ export default {
this.disableSelect = false this.disableSelect = false
this.isAdd = true this.isAdd = true
this.dialogVisible = 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 = row
this.ruleForm.effectiveType = row.effectiveType + '' this.ruleForm.effectiveType = row.effectiveType + ''
if (this.ruleForm.effectiveType == 2) { 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!