|
@@ -26,7 +26,7 @@
|
|
|
<a-row :gutter="10">
|
|
|
<a-col :span="17">
|
|
|
<custList
|
|
|
- v-if="!form.dealerUpsSn"
|
|
|
+ v-if="!form.dealerUpsSn || isSpecial"
|
|
|
ref="custList"
|
|
|
:notDealerSn="notZdDealer"
|
|
|
:notDealerType="['special']"
|
|
@@ -129,6 +129,7 @@ export default {
|
|
|
},
|
|
|
form: {
|
|
|
dealerSn: undefined,
|
|
|
+ dealerUpsSn: undefined,
|
|
|
rebateParentType: [], // 差价归属
|
|
|
rebateDealerList: [], // 经销商列表
|
|
|
rebateScopeList: [] // 品类列表
|
|
@@ -142,7 +143,8 @@ export default {
|
|
|
zdDealearList: [],
|
|
|
detailData: null,
|
|
|
superDealerName: '',
|
|
|
- checkedDealerSn: []
|
|
|
+ checkedDealerSn: [],
|
|
|
+ showTable: false
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -150,10 +152,8 @@ export default {
|
|
|
return this.detailData && this.detailData.dealerLevel == 'SPECIAL'
|
|
|
},
|
|
|
notZdDealer () {
|
|
|
- return this.form.rebateDealerList.concat(this.zdDealearList).concat([{ 'parentDealerSn': this.form.dealerSn }, ...this.checkedDealerSn])
|
|
|
- },
|
|
|
- showTable () {
|
|
|
- return this.form.rebateParentType.indexOf('SUPERIORS') >= 0
|
|
|
+ // ...this.checkedDealerSn
|
|
|
+ return this.form.rebateDealerList.concat(this.zdDealearList).concat([{ 'parentDealerSn': this.form.dealerSn }])
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -228,8 +228,11 @@ export default {
|
|
|
custSupChange (val, row) {
|
|
|
console.log(val, row)
|
|
|
this.form.rebateDealerList[0]['parentDealerSn'] = val.key
|
|
|
+ this.showTable = !!val.key
|
|
|
if (!this.isSpecial) {
|
|
|
- this.getCategoryList()
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.getCategoryList()
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
rateSupChange (val) {
|
|
@@ -320,7 +323,7 @@ export default {
|
|
|
},
|
|
|
// 重置表单
|
|
|
resetForm () {
|
|
|
- if (!this.isSpecial && !this.form.dealerUpsSn) {
|
|
|
+ if (this.isSpecial || !this.form.dealerUpsSn) {
|
|
|
this.$refs.custList.resetForm()
|
|
|
}
|
|
|
this.form.dealerSn = undefined
|
|
@@ -382,7 +385,7 @@ export default {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- if (this.showTable && !this.isSpecial && !this.form.dealerUpsSn) {
|
|
|
+ if (!this.isSpecial && !this.form.dealerUpsSn) {
|
|
|
formData.rebateScopeList = this.$refs.categoryTree.getResult()
|
|
|
if (formData.rebateScopeList.length == 0) {
|
|
|
_this.$message.error('请选择品类')
|