Browse Source

修改客户回显,编辑

dev-warehouse
caoyizhong 2 years ago
parent
commit
6a1c487a1a
  1. 52
      src/views/basicdata/brand/basicClient.vue

52
src/views/basicdata/brand/basicClient.vue

@ -844,6 +844,9 @@ export default {
this.viewEntd = false;
getDetail(row.id).then(res => {
this.form = res.data.data;
if(this.form.detailedly == "0" || this.form.detailedly == "-1"){
this.form.detailedly = "";
}
let bus =[];
this.form.typeServiceBusiness.forEach(i =>{
bus.push(i.typeService);
@ -852,12 +855,21 @@ export default {
this.form.businessType = i.mold;
}
})
this.form.typeServiceList = bus;
if(!!bus){
this.form.typeServiceList = bus;
}
let a = [];
if (!!this.form.bladeRegionProvinceId) {
a.push(res.data.data.bladeRegionProvinceId);
a.push(res.data.data.bladeRegionCityId);
a.push(res.data.data.bladeRegionAreaId);
if(res.data.data?.bladeRegionProvinceId){
a.push(res.data.data.bladeRegionProvinceId);
}
if(res.data.data?.bladeRegionCityId){
a.push(res.data.data.bladeRegionCityId);
}
if(res.data.data?.bladeRegionAreaId){
a.push(res.data.data.bladeRegionAreaId);
}
}
this.form.bladeRegionProvinceId = a;
if (!!this.form.leaseAccessories) {
@ -891,27 +903,45 @@ export default {
// res.data.data.typeService = res.data.data.typeService.toString();
console.log('>>>>>', res.data.data);
this.form = res.data.data;
if(this.form.detailedly == "0" || this.form.detailedly == "-1"){
this.form.detailedly = "";
}
let bus =[];
// console.log("????><><><",this.form.typeServiceBusiness);
this.form.typeServiceBusiness.forEach(i =>{
bus.push(i.typeService);
if(i.typeService == '3'){
this.distriType = true;
i.businessType = i.mold;
// i.businessType = i.mold;
this.form.businessType= i.mold;
}
})
this.form.typeServiceList = bus;
if(!!bus){
this.form.typeServiceList = bus;
}
//
let a = [];
if (!!this.form.bladeRegionProvinceId) {
a.push(res.data.data.bladeRegionProvinceId);
a.push(res.data.data.bladeRegionCityId);
a.push(res.data.data.bladeRegionAreaId);
if(res.data.data?.bladeRegionProvinceId){
a.push(res.data.data.bladeRegionProvinceId);
}
if(res.data.data?.bladeRegionCityId){
a.push(res.data.data.bladeRegionCityId);
}
if(res.data.data?.bladeRegionAreaId){
a.push(res.data.data.bladeRegionAreaId);
}
}
this.form.bladeRegionProvinceId = a;
//
if (!!this.form.leaseAccessories) {
if (this.form.leaseAccessories.includes(',')) {
let le = [];
let d = this.form.leaseAccessories.splice(',');
d.forEach(i => {
console.log(">>>>",i);
let q = {
name: '',
url: i
@ -921,7 +951,7 @@ export default {
this.fileList = le;
} else {
this.fileList = [{
name: '',
name: this.form.fileName,
url: this.form.leaseAccessories
}];
}
@ -1112,7 +1142,7 @@ export default {
return it.bladeRegionAreaId == i.value;
});
// console.log("========",JSON.parse(JSON.stringify(arrsheng)) );
dz = arrsheng[0].label + '/' + arrshi[0].label + '/' + arrqu[0].label;
dz = arrsheng[0].label + (arrshi[0].label?`/${arrshi[0].label}`:``) + (arrqu[0]?.label?`/${arrqu[0]?.label}`:'');
it.bladeRegionProvinceId = dz;
});

Loading…
Cancel
Save