This commit is contained in:
wangshiming
2022-03-04 16:48:04 +08:00
parent 855615d1ff
commit ac5bb6ab7e
6 changed files with 101 additions and 42 deletions

View File

@ -48,6 +48,7 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
maxTrainNumber: 99999,
maxFreight: 9999999
}
shipperName = '';
// // 单位
startInfo: any[] = [];
endInfo: any[] = [];
@ -139,10 +140,11 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
return of([]);
}
},
change: (q: any) => {
change: (q: any, qs: any) => {
let str =q.replace(/^\s+|\s+$/g,"");
if (str) {
this.getRegionCode(str);
this.shipperName = qs?.label;
}
}
} as SFSelectWidgetSchema
@ -606,51 +608,54 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
this.service.msgSrv.error(`当前运费单价已超出限定值【${this.limitValues.maxFreight}元】`);
return;
}
// //装卸货信息
const LoadingList = this.startInfo.concat(this.endInfo);
// 货物信息
const sf3Values = { ...this.sf3.value };
if (sf3Values.goodsTypeName === '其它') {
sf3Values.goodsName = sf3Values.goodsName1;
delete sf3Values.goodsName1;
}
if (this.sf4.value.carModel.includes('999')) {
this.sf4.value.carModel = ['999']
}
if (this.sf4.value.carLength.includes('999')) {
this.sf4.value.carLength = ['999']
}
const goodsInfoList = [
{
...sf3Values,
...this.sf4.value,
carModel: this.sf4.value.carModel.join(','),
carLength: this.sf4.value.carLength.join(',')
}
];
const params = {
id: '',
...this.sf1.value,
unLoadingPlaceDTOList: LoadingList,
goodsInfoDTOList: goodsInfoList,
...this.sf6.value
};
const modalRef = this.modalService.create({
nzTitle: '运输协议',
nzContent: TranAgreementComponent,
nzWidth: 900,
nzFooter: null
nzFooter: null,
nzComponentParams: { object: params, shipperName: this.shipperName , type:'bulk'}
});
modalRef.afterClose.subscribe(result => {
if (result) {
this.submit(submitType);
this.submit(submitType, params);
}
});
}
// 确认提交(下单)
submit(submitType: string): void {
// //装卸货信息
const LoadingList = this.startInfo.concat(this.endInfo);
// 货物信息
const sf3Values = { ...this.sf3.value };
if (sf3Values.goodsTypeName === '其它') {
sf3Values.goodsName = sf3Values.goodsName1;
delete sf3Values.goodsName1;
}
if (this.sf4.value.carModel.includes('999')) {
this.sf4.value.carModel = ['999']
}
if (this.sf4.value.carLength.includes('999')) {
this.sf4.value.carLength = ['999']
}
const goodsInfoList = [
{
...sf3Values,
...this.sf4.value,
carModel: this.sf4.value.carModel.join(','),
carLength: this.sf4.value.carLength.join(',')
}
];
const params = {
id: '',
...this.sf1.value,
unLoadingPlaceDTOList: LoadingList,
goodsInfoDTOList: goodsInfoList,
...this.sf6.value
};
submit(submitType?: string, params?: any): void {
let reqUrl = this.service.$api_consignBulk;
if (submitType === 'assign') {