|
@@ -9,6 +9,23 @@
|
|
|
@cancel="cancel"
|
|
|
>
|
|
|
<a-spin :spinning="spinning" tip="Loading...">
|
|
|
+ <!-- 批量操作 -->
|
|
|
+ <div v-if="salesBillDetailSnList.length">
|
|
|
+ <div>
|
|
|
+ <span>产品范围</span>
|
|
|
+ <aRadioGroup v-model="productType">
|
|
|
+ <aRadio value="0">选中产品</aRadio>
|
|
|
+ <aRadio value="1">全部产品</aRadio>
|
|
|
+ </aRadioGroup>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <span>规则范围</span>
|
|
|
+ <aRadioGroup v-model="ruleType">
|
|
|
+ <aRadio value="0">选中规则</aRadio>
|
|
|
+ <aRadio value="1">全部规则</aRadio>
|
|
|
+ </aRadioGroup>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<div style="padding: 0 30px;" v-if="total">
|
|
|
<!-- 非叠加活动 -->
|
|
|
<div>
|
|
@@ -77,7 +94,10 @@ export default {
|
|
|
upActiveValArr: [],
|
|
|
radioStyle: "display:block;height: '30px';lineHeight: '30px';padding:5px 0;margin:0;",
|
|
|
activeList: [],
|
|
|
- editRow: null
|
|
|
+ editRow: null,
|
|
|
+ salesBillDetailSnList: [],
|
|
|
+ productType: '0',
|
|
|
+ ruleType: '0'
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -106,7 +126,7 @@ export default {
|
|
|
salesPromoMatchProduct(data).then(res => {
|
|
|
this.activeList = res.data || []
|
|
|
// 回显选中项
|
|
|
- if (record.promoRuleSnList) {
|
|
|
+ if (record && record.promoRuleSnList) {
|
|
|
if (record.stackFlag == 0) { // 非叠加
|
|
|
const pos = res.data.findIndex(item => item.promoRuleSn == record.promoRuleSnList[0])
|
|
|
this.upActiveVal = pos >= 0 ? res.data[pos].salesPromoSn : '-1'
|
|
@@ -121,6 +141,11 @@ export default {
|
|
|
this.spinning = false
|
|
|
})
|
|
|
},
|
|
|
+ // 批量操作
|
|
|
+ setBatchData (productSn, activeList) {
|
|
|
+ this.activeList = activeList
|
|
|
+ this.salesBillDetailSnList = productSn
|
|
|
+ },
|
|
|
// 保存
|
|
|
handleSubmit (e) {
|
|
|
e.preventDefault()
|