Commit 3397b923 authored by 邓春圆's avatar 邓春圆

编辑页面调整

parent 883489f5
......@@ -60,7 +60,7 @@
<!-- </el-form-item>-->
<el-form-item :label="$t('常用提货网点')" prop="remarks">
<el-select v-model="form.pickupPoint">
<el-option v-for="item in serviceNetworkList " :value="item.id" :label="isChinese ? item.titleZh : item.titleEn "></el-option>
<el-option v-for="item in getNodeLists " :value="item.id" :label="isChinese ? item.titleZh : item.titleEn "></el-option>
</el-select>
</el-form-item>
</el-col>
......@@ -98,13 +98,13 @@
<el-form-item :label="$t('主营类别')" prop="productType">
<el-row :gutter="10">
<el-col :span="11">
<el-select v-model="form.productType" :placeholder="$t('请选择产品类别')" @change="form.productId = ''">
<el-select @change="change" v-model="form.productType" :placeholder="$t('请选择产品类别')">
<el-option :label="item.titleZh" :value="item.id" v-for="(item) in productTypeList" :key="item.id"/>
</el-select>
</el-col>
<el-col :span="11">
<el-select v-model="form.productId" :placeholder="$t('请选择')">
<el-option :label="item.titleZh" :value="parseInt(item.id)" v-for="(item) in productListFilter" :key="item.id"/>
<el-option :label="item.titleZh" :value="parseInt(item.id)" v-for="(item) in productList" :key="item.id"/>
</el-select>
</el-col>
</el-row>
......@@ -592,19 +592,12 @@ export default {
this.getCustomer(this.customerId).then(() => {
getCustomerContactsListByCustomer({customerId: customerId}).then(r => {
this.form.customerContacts = r.data
let list = this.form.customerContacts.map(item => item.userid);
if(list.length >0){
memberUserList({ids:list.join(',')}).then(r=>{
this.selectMemberList = r.data
})
}
if(this.form.promoter){
getCustomerList({ids:this.form.promoter}).then(r => {
this.recommended = r.data;
})
}
})
// 打开重泡货开关
if(this.form.weightUnit){
this.showZhong = true
......@@ -634,14 +627,12 @@ export default {
}
getNodeList().then(r => {
this.nodeList = r.data
this.getNodeLists = r.data
})
getProductTypeList().then(r => {
this.productTypeList = r.data
})
getProductList().then(r => {
this.productList = r.data
})
getTradeCityList({type: 1}).then(r => {
this.importCityList = r.data.filter(item => item.type === '1')
})
......@@ -657,13 +648,10 @@ export default {
getCountryListAll().then(r => {
this.countryList = r.data
})
// 获取服务网点
getServiceNetwork().then(r =>{
this.serviceNetworkList = r.data
})
},
data(){
return {
getNodeLists:[],
isCustomerServiceConfirmed:false,
getDictDatas,
DICT_TYPE,
......@@ -718,6 +706,15 @@ export default {
},
methods: {
change(val){
this.form.productId = '';
this.getProductListFn(val);
},
getProductListFn(val){
getProductList({typeId:val}).then(r => {
this.productList = r.data
})
},
deleteBankData(index){
this.form.customerBanks.splice(index, 1);
},
......@@ -949,6 +946,11 @@ export default {
return getCustomer(id).then(response => {
console.log(response,'response')
this.form = { ...this.form, ...response.data, id: this.customerId,transportType: response.data.transportType && response.data.transportType !== '' ? response.data.transportType.split(',') : [],customerBanks:response.data.customerBankBackVOList };
if(this.form.productType){
console.log('1231',this.form.productType)
this.getProductListFn(this.form.productType)
}
this.open = true;
this.title = this.$t('修改客户');
this.getZhongPao()
......
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