fix bug
This commit is contained in:
@ -200,24 +200,11 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
goodsName: {
|
||||
type: 'string',
|
||||
title: '货物名称',
|
||||
enum: [
|
||||
{ label: '真实货物', value: '1' },
|
||||
{ label: '远程货物', value: '2' },
|
||||
{ label: '其他', value: '3' }
|
||||
],
|
||||
ui: {
|
||||
widget: 'select',
|
||||
widget: 'dict-select',
|
||||
params: { dictKey: 'GoodsName' },
|
||||
placeholder: '请选择'
|
||||
// asyncData: () =>
|
||||
// this.categoryService.loadChildData2('0', '2').pipe(
|
||||
// map((data: any) => {
|
||||
// return data.map((m: any) => {
|
||||
// return { label: m.name, value: m.id };
|
||||
// });
|
||||
// }),
|
||||
// ),
|
||||
// change: (i) => this.updateCategory(i, '/categoryId2'),
|
||||
} as SFSelectWidgetSchema
|
||||
}
|
||||
},
|
||||
qita: {
|
||||
type: 'string',
|
||||
@ -492,7 +479,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
receiptPay: { type: 'number', title: '回单付', default: 0, ui: { prefix: '¥',change: ()=> {
|
||||
this.changeValue();},
|
||||
} as SFNumberWidgetSchema },
|
||||
oilCardPay2: {
|
||||
subtotal: {
|
||||
type: 'string',
|
||||
title: '小计',
|
||||
ui: {
|
||||
@ -576,15 +563,29 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
})
|
||||
}
|
||||
this.startInfo.splice(index, 1);
|
||||
this.validateForm1.removeControl(`loadAddress${index}`);
|
||||
this.validateForm1.removeControl(`loadName${index}`);
|
||||
this.validateForm1.removeControl(`loadPhone${index}`);
|
||||
}
|
||||
|
||||
addEndInfo(event: any) {
|
||||
this.endInfo.push({
|
||||
detailedAddress: '',
|
||||
appUserName: '',
|
||||
contractTelephone: '',
|
||||
type: 2
|
||||
});
|
||||
if (this.addEndInfo.length < 5) {
|
||||
const controlId = this.endInfo.length;
|
||||
this.endInfo.push({
|
||||
detailedAddress: '',
|
||||
appUserName: '',
|
||||
contractTelephone: '',
|
||||
latitude: '',
|
||||
longitude: '',
|
||||
province: '',
|
||||
city: '',
|
||||
area: '',
|
||||
type: 2
|
||||
});
|
||||
this.validateForm1.addControl(`unloadAddress${controlId}`, new FormControl(null, Validators.required));
|
||||
this.validateForm1.addControl(`unloadName${controlId}`, new FormControl(null, Validators.required));
|
||||
this.validateForm1.addControl(`unloadPhone${controlId}`, new FormControl(null, Validators.required));
|
||||
}
|
||||
}
|
||||
subEndInfo(event: any, index: number, id?:any) {
|
||||
if(id) {
|
||||
@ -594,6 +595,9 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
}
|
||||
console.log(event, index, id)
|
||||
this.endInfo.splice(index, 1);
|
||||
this.validateForm1.removeControl(`unloadAddress${index}`);
|
||||
this.validateForm1.removeControl(`unloadName${index}`);
|
||||
this.validateForm1.removeControl(`unloadPhone${index}`);
|
||||
}
|
||||
|
||||
//指派熟车
|
||||
@ -700,7 +704,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
asds(i: any) {
|
||||
console.log(i)
|
||||
}
|
||||
// const data =
|
||||
// 初始化信息
|
||||
dataR (res: any) {
|
||||
// this.dataList = res;
|
||||
this.sf1data = {
|
||||
@ -715,11 +719,17 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
}
|
||||
res?.unLoadingPlaceList.forEach((element: any) => {
|
||||
if(element.type === 1) {
|
||||
const controlId = this.startInfo.length;
|
||||
if(this.PageStatus === '整车修改' || this.PageStatus === '大宗修改') {
|
||||
this.startInfo.push({
|
||||
detailedAddress: element.detailedAddress,
|
||||
appUserName: element.appUserName,
|
||||
contractTelephone: element.contractTelephone,
|
||||
latitude: element.latitude,
|
||||
longitude: element.longitude,
|
||||
province: element.province,
|
||||
city: element.city,
|
||||
area: element.area,
|
||||
type: element.type,
|
||||
id: element.id
|
||||
})
|
||||
@ -728,6 +738,11 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
detailedAddress: element.detailedAddress,
|
||||
appUserName: element.appUserName,
|
||||
contractTelephone: element.contractTelephone,
|
||||
latitude: element.latitude,
|
||||
longitude: element.longitude,
|
||||
province: element.province,
|
||||
city: element.city,
|
||||
area: element.area,
|
||||
type: element.type,
|
||||
})
|
||||
}
|
||||
@ -735,12 +750,21 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
this.creatTime = element?.createTime
|
||||
this.modifyTime = element?.modifyTime
|
||||
}
|
||||
this.validateForm1.addControl(`loadAddress${controlId}`, new FormControl(null, Validators.required));
|
||||
this.validateForm1.addControl(`loadName${controlId}`, new FormControl(null, Validators.required));
|
||||
this.validateForm1.addControl(`loadPhone${controlId}`, new FormControl(null, Validators.required));
|
||||
} else if(element.type === 2) {
|
||||
const controlId = this.endInfo.length;
|
||||
if(this.PageStatus === '整车修改' || this.PageStatus === '大宗修改') {
|
||||
this.endInfo.push({
|
||||
detailedAddress: element?.detailedAddress,
|
||||
appUserName: element?.appUserName,
|
||||
contractTelephone: element?.contractTelephone,
|
||||
latitude: element.latitude,
|
||||
longitude: element.longitude,
|
||||
province: element.province,
|
||||
city: element.city,
|
||||
area: element.area,
|
||||
type: element.type,
|
||||
id: element.id
|
||||
})
|
||||
@ -749,10 +773,17 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
detailedAddress: element?.detailedAddress,
|
||||
appUserName: element?.appUserName,
|
||||
contractTelephone: element?.contractTelephone,
|
||||
latitude: element.latitude,
|
||||
longitude: element.longitude,
|
||||
province: element.province,
|
||||
city: element.city,
|
||||
area: element.area,
|
||||
type: element.type
|
||||
})
|
||||
}
|
||||
|
||||
this.validateForm1.addControl(`unloadAddress${controlId}`, new FormControl(null, Validators.required));
|
||||
this.validateForm1.addControl(`unloadName${controlId}`, new FormControl(null, Validators.required));
|
||||
this.validateForm1.addControl(`unloadPhone${controlId}`, new FormControl(null, Validators.required));
|
||||
}
|
||||
});
|
||||
this.sf3data = {
|
||||
@ -762,8 +793,8 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
weight: res?.goodsInfoList[0]?.weight || '',
|
||||
volume: res?.goodsInfoList[0]?.volume || '',
|
||||
vehicleDemand: res?.goodsInfoList[0]?.vehicleDemand || '',
|
||||
maxCube: res?.goodsInfoList[0]?.maxCube || '',
|
||||
maxWeight: res?.goodsInfoList[0]?.maxWeight || '',
|
||||
maxCube: res?.goodsInfoList[0]?.maxCube?.split(',') || '',
|
||||
maxWeight: res?.goodsInfoList[0]?.maxWeight?.split(',') || '',
|
||||
number: res?.goodsInfoList[0]?.number || '',
|
||||
freightPrice: res?.goodsInfoList[0]?.freightPrice || '',
|
||||
freightType: res?.goodsInfoList[0]?.freightType || '',
|
||||
@ -795,7 +826,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
toPay: res?.shippingInformationVO?.toPay || '',
|
||||
oilCardPay: res?.shippingInformationVO?.oilCardPay || '',
|
||||
receiptPay: res?.shippingInformationVO?.receiptPay || '',
|
||||
// oilCardPay2: res?.shippingInformationVO?.oilCardPay || '',
|
||||
// subtotal: res?.shippingInformationVO?.oilCardPay || '',
|
||||
appendFee: res?.shippingInformationVO?.appendFee || '',
|
||||
paymentDays: res?.shippingInformationVO?.paymentDays || '',
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user