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

Loading…
Cancel
Save