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

编辑页面调整

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