Commit 2ca00e4f by caoyanzhi

Merge branch 'bugfix/口令福利-获奖策略bug'

parents 51467ecb 4cc32f99
......@@ -28,7 +28,7 @@
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="close">关 闭</el-button>
<el-button type="primary" @click="submit('form')">保 存</el-button>
<el-button type="primary" :loading="loading" @click="submit('form')">保 存</el-button>
</span>
<prize-set ref="gift" :info.sync="prizeSetInfo" :show.sync="prizeSetShow"></prize-set>
<calculate :show.sync="calculateShow" :gameId="gameId" :prizeId="dataId" :prizeReferId="form.prizeReferType === 2 ? cardObj.coupCardId : form.proGiftId" :prizeReferType="form.prizeReferType" :totalCount="parseInt(form.prizeCount)" @countRefresh="countRefresh"></calculate>
......@@ -227,6 +227,7 @@ export default {
crowdFilter: this.form.crowdFilter,
searchJson: this.getSaveData
};
this.loading = true;
// 新增且prizeReferType=3(礼品)时,在提交之前把奖品数量update给礼品
if (this.form.gamePrizeStrategyId === undefined && this.form.prizeReferType === 3) {
saveGift({
......@@ -235,9 +236,11 @@ export default {
mainPicFieldCode: this.prizeSetInfo.prizeImage.code || '',
proGiftId: this.prizeSetInfo.proGiftId,
giftStock: this.form.prizeStock
}).then(() => {
this.handleKlflStrategySave(data);
});
})
.then(() => {
this.handleKlflStrategySave(data);
})
.catch(() => (this.loading = false));
} else {
this.handleKlflStrategySave(data);
}
......@@ -248,17 +251,20 @@ export default {
});
},
handleKlflStrategySave(data) {
klflStrategySave(data).then(res => {
this.$refs.gift.clear();
this.$tips({ type: 'success', message: '操作成功' });
this.$emit('update:show', false);
this.$emit('refesh');
});
klflStrategySave(data)
.then(res => {
this.$refs.gift.clear();
this.$tips({ type: 'success', message: '操作成功' });
this.$emit('update:show', false);
this.$emit('refesh');
})
.finally(() => (this.loading = false));
},
/** ----------人群筛选器的方法----------- */
//获取指定会员
getData() {
this.$refs.peopleFilter.confirmSet();
this.loading = true;
this.$refs.peopleFilter.confirmSet().finally(() => (this.loading = false));
},
// 子组件触发父组件事件,返回过滤条件数据
findFilter(value) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment