|
@@ -39,15 +39,15 @@
|
|
<a-form-model-item label="参与客户" prop="dealerScope">
|
|
<a-form-model-item label="参与客户" prop="dealerScope">
|
|
<a-row :gutter="15">
|
|
<a-row :gutter="15">
|
|
<a-col :md="12" :sm="24">
|
|
<a-col :md="12" :sm="24">
|
|
- <a-select v-model="form.dealerScope" placeholder="请选择参与客户">
|
|
|
|
|
|
+ <a-select v-model="form.dealerScope" placeholder="请选择参与客户" @change="changeDealerScope" allowClear>
|
|
<a-select-option value="ALL_DEALER">全部客户</a-select-option>
|
|
<a-select-option value="ALL_DEALER">全部客户</a-select-option>
|
|
<a-select-option value="SOME_DEALER">部分客户</a-select-option>
|
|
<a-select-option value="SOME_DEALER">部分客户</a-select-option>
|
|
</a-select>
|
|
</a-select>
|
|
</a-col>
|
|
</a-col>
|
|
- <a-col :md="3" :sm="24" v-show="form.dealerScope &&form.dealerScope!='ALL_DEALER' ">
|
|
|
|
|
|
+ <a-col :md="3" :sm="24" v-show="form.dealerScope && form.dealerScope!='ALL_DEALER' ">
|
|
<a-button type="primary" :loading="spinning" @click="handleDealerModal">选择</a-button>
|
|
<a-button type="primary" :loading="spinning" @click="handleDealerModal">选择</a-button>
|
|
</a-col>
|
|
</a-col>
|
|
- <a-col :md="4" :sm="24" v-show="form.dealerScope &&form.dealerScope!='ALL_DEALER' ">
|
|
|
|
|
|
+ <a-col :md="4" :sm="24" v-show="form.dealerScope && form.dealerScope!='ALL_DEALER' ">
|
|
<a-button type="primary" :loading="spinning" @click="openGuideModal=true" ghost>导入客户</a-button>
|
|
<a-button type="primary" :loading="spinning" @click="openGuideModal=true" ghost>导入客户</a-button>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="5" :sm="24" v-show="chooseDealerList && chooseDealerList.length>0">
|
|
<a-col :md="5" :sm="24" v-show="chooseDealerList && chooseDealerList.length>0">
|
|
@@ -247,6 +247,11 @@ export default {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ changeDealerScope (val) {
|
|
|
|
+ if (val === 'ALL_DEALER') {
|
|
|
|
+ this.chooseDealerList = []
|
|
|
|
+ }
|
|
|
|
+ },
|
|
// 重置
|
|
// 重置
|
|
resetSearchForm () {
|
|
resetSearchForm () {
|
|
this.form = {
|
|
this.form = {
|
|
@@ -290,7 +295,12 @@ export default {
|
|
},
|
|
},
|
|
// 导入参与客户
|
|
// 导入参与客户
|
|
hanldeOk (arr) {
|
|
hanldeOk (arr) {
|
|
- this.chooseDealerList = this.chooseDealerList.concat(arr)
|
|
|
|
|
|
+ const list = [...this.chooseDealerList,...arr]
|
|
|
|
+ let obj={}
|
|
|
|
+ this.chooseDealerList = list.reduce((cur,next)=>{
|
|
|
|
+ obj[next.dealerSn]?"":obj[next.dealerSn] = true && cur.push(next)
|
|
|
|
+ return cur
|
|
|
|
+ },[])
|
|
}
|
|
}
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|