fix bug
This commit is contained in:
@ -648,6 +648,10 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
||||
this.service.msgSrv.warning('请完善必填项!');
|
||||
return;
|
||||
}
|
||||
if (this.totalDistance <= 0) {
|
||||
this.service.msgSrv.warning('起终点相同,请重新选择装卸货地址!');
|
||||
return;
|
||||
}
|
||||
// 校验各个输入限定值
|
||||
if (
|
||||
this.sf4.value?.weight > this.limitValues?.maxWeight ||
|
||||
|
||||
@ -580,6 +580,10 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
|
||||
this.service.msgSrv.warning('请完善必填项!');
|
||||
return;
|
||||
}
|
||||
if (this.totalDistance <= 0) {
|
||||
this.service.msgSrv.warning('起终点相同,请重新选择装卸货地址!');
|
||||
return;
|
||||
}
|
||||
// 校验各个输入限定值
|
||||
if (this.sf4.value.weight > this.limitValues.maxWeight || this.sf4.value.volume > this.limitValues.maxVolume || this.sf4.value.number > this.limitValues.maxTrainNumber) {
|
||||
this.service.msgSrv.error(`当前货物核载信息已超出限定值【${this.limitValues.maxWeight}吨、${this.limitValues.maxVolume}方、${this.limitValues.maxTrainNumber}车】`);
|
||||
|
||||
@ -214,7 +214,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
ui: {
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
}
|
||||
// dispatchId: {
|
||||
// type: 'string',
|
||||
// title: '调度员',
|
||||
@ -249,7 +249,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
},
|
||||
$enterpriseProjectId: {
|
||||
grid: { span: 12 }
|
||||
},
|
||||
}
|
||||
};
|
||||
}
|
||||
initSF3() {
|
||||
@ -347,7 +347,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
title: '',
|
||||
ui: {
|
||||
widget: 'custom',
|
||||
placeholder: '请输入',
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
number: {
|
||||
@ -355,7 +355,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
title: '',
|
||||
ui: {
|
||||
widget: 'custom',
|
||||
placeholder: '请输入',
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
carModel: {
|
||||
@ -429,7 +429,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
required: ['weight', 'carModel', 'carLength']
|
||||
};
|
||||
@ -454,7 +454,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
map((res: any) => {
|
||||
return [...res];
|
||||
})
|
||||
)
|
||||
);
|
||||
},
|
||||
change: (tag: any, org: any) => {
|
||||
if (tag === '3') {
|
||||
@ -519,9 +519,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
widget: 'custom',
|
||||
visibleIf: { insuranceType: (value: string) => value === '1' }
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
required: ['insurancePremium']
|
||||
};
|
||||
@ -864,7 +862,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
nzComponentParams: {
|
||||
status: 'new',
|
||||
url: this.service.$api_save_assign_whole,
|
||||
params: item,
|
||||
params: item
|
||||
},
|
||||
nzFooter: null
|
||||
});
|
||||
@ -895,10 +893,22 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
this.sf5.validator({ emitError: true });
|
||||
this.sf6.validator({ emitError: true });
|
||||
this.sf7.validator({ emitError: true });
|
||||
if (this.validateForm1.invalid || !this.sf3.valid || !this.sf1.valid || !this.sf4.valid || !this.sf5.valid || !this.sf6.valid || !this.sf7.valid) {
|
||||
if (
|
||||
this.validateForm1.invalid ||
|
||||
!this.sf3.valid ||
|
||||
!this.sf1.valid ||
|
||||
!this.sf4.valid ||
|
||||
!this.sf5.valid ||
|
||||
!this.sf6.valid ||
|
||||
!this.sf7.valid
|
||||
) {
|
||||
this.service.msgSrv.warning('请完善必填项!');
|
||||
return;
|
||||
}
|
||||
if (this.totalDistance <= 0) {
|
||||
this.service.msgSrv.warning('起终点相同,请重新选择装卸货地址!');
|
||||
return;
|
||||
}
|
||||
if (this.validateForm1.value.loadingTime < new Date()) {
|
||||
this.service.msgSrv.warning('装货时间必须大于当前时间!');
|
||||
return;
|
||||
@ -979,7 +989,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
{ expenseCode: 'BACK', expenseName: '回单付', price: this.sf7.value.receiptPay || 0, id: this.sf7data?.receiptPayId || '' }
|
||||
];
|
||||
// 从“再下一单”过来,将所有的子参数内的id都删除
|
||||
if ((this.PageStatus === '整车下一单')) {
|
||||
if (this.PageStatus === '整车下一单') {
|
||||
LoadingList.forEach((ele: any) => {
|
||||
delete ele.id;
|
||||
});
|
||||
@ -1004,7 +1014,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
estimatedKilometers: this.totalDistance,
|
||||
estimatedTravelTime: this.totalTime,
|
||||
insurancePackagedGoods: this.sf4.value.insurancePackagedGoods,
|
||||
goodsValue:this.sf4.value.goodsValue,
|
||||
goodsValue: this.sf4.value.goodsValue
|
||||
};
|
||||
const modalRef = this.modalService.create({
|
||||
nzTitle: '运输协议',
|
||||
@ -1136,7 +1146,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
enterpriseInfoId: res?.enterpriseInfoId,
|
||||
dispatchPhone: res?.dispatchPhone,
|
||||
dispatchName: res?.dispatchName,
|
||||
externalResourceCode: res?.externalResourceCode,
|
||||
externalResourceCode: res?.externalResourceCode
|
||||
};
|
||||
if (this.PageStatus === '整车修改') {
|
||||
this.sf1data.id = res?.id;
|
||||
@ -1248,7 +1258,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
carModel: res?.goodsInfoVOList[0]?.carModel?.split(',') || [],
|
||||
carLength: res?.goodsInfoVOList[0]?.carLength?.split(',') || [],
|
||||
goodsValue: res?.goodsValue || '',
|
||||
insurancePackagedGoods: res?.insurancePackagedGoods || '',
|
||||
insurancePackagedGoods: res?.insurancePackagedGoods || ''
|
||||
};
|
||||
if (this.PageStatus === '整车修改') {
|
||||
this.sf4data.id = res?.goodsInfoVOList[0]?.id;
|
||||
@ -1257,7 +1267,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
this.sf5data = {
|
||||
insuranceType: res?.insuranceType || '',
|
||||
insurancePremium: res?.insurancePremium || '',
|
||||
insuranceRate: res?.insuranceRate || '',
|
||||
insuranceRate: res?.insuranceRate || ''
|
||||
};
|
||||
this.sf6data = {
|
||||
stateReceipt: res?.stateReceipt,
|
||||
@ -1384,7 +1394,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
}
|
||||
// 计算保价费金额
|
||||
getInsurersPrice(insuranceType = this.sf5.value.insuranceType) {
|
||||
console.log(this.totalDistance)
|
||||
console.log(this.totalDistance);
|
||||
if (insuranceType !== '3' && this.sf4.value?.goodsValue >= 50000 && this.totalDistance > 0) {
|
||||
const params = {
|
||||
insuranceType,
|
||||
|
||||
@ -211,7 +211,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
ui: {
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
required: ['shipperAppUserId', 'enterpriseProjectId', 'enterpriseInfoName']
|
||||
};
|
||||
@ -329,7 +329,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
title: '',
|
||||
ui: {
|
||||
widget: 'custom',
|
||||
placeholder: '请输入',
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
number: {
|
||||
@ -337,7 +337,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
title: '',
|
||||
ui: {
|
||||
widget: 'custom',
|
||||
placeholder: '请输入',
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
carModel: {
|
||||
@ -411,7 +411,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
required: ['weight', 'carModel', 'carLength']
|
||||
};
|
||||
@ -436,14 +436,14 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
map((res: any) => {
|
||||
return [...res];
|
||||
})
|
||||
)
|
||||
);
|
||||
},
|
||||
change: (tag: any, org: any) => {
|
||||
if (tag === '3') {
|
||||
this.sf5.setValue('/insurancePremium', null);
|
||||
this.sf5.setValue('/insuranceRate', null);
|
||||
} else {
|
||||
console.log(tag)
|
||||
console.log(tag);
|
||||
this.getInsurersPrice(tag);
|
||||
}
|
||||
}
|
||||
@ -502,9 +502,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
widget: 'custom',
|
||||
visibleIf: { insuranceType: (value: string) => value === '1' }
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
required: ['insurancePremium']
|
||||
};
|
||||
@ -528,7 +526,6 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
initSF6() {
|
||||
this.schema6 = {
|
||||
properties: {
|
||||
@ -857,12 +854,24 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
this.sf5.validator({ emitError: true });
|
||||
this.sf6.validator({ emitError: true });
|
||||
this.sf7.validator({ emitError: true });
|
||||
console.log(!this.sf1.valid)
|
||||
console.log(this.sf1.value)
|
||||
if (this.validateForm1.invalid || !this.sf3.valid || !this.sf1.valid || !this.sf4.valid || !this.sf5.valid || !this.sf6.valid || !this.sf7.valid) {
|
||||
console.log(!this.sf1.valid);
|
||||
console.log(this.sf1.value);
|
||||
if (
|
||||
this.validateForm1.invalid ||
|
||||
!this.sf3.valid ||
|
||||
!this.sf1.valid ||
|
||||
!this.sf4.valid ||
|
||||
!this.sf5.valid ||
|
||||
!this.sf6.valid ||
|
||||
!this.sf7.valid
|
||||
) {
|
||||
this.service.msgSrv.warning('请完善必填项!');
|
||||
return;
|
||||
}
|
||||
if (this.totalDistance <= 0) {
|
||||
this.service.msgSrv.warning('起终点相同,请重新选择装卸货地址!');
|
||||
return;
|
||||
}
|
||||
if (this.validateForm1.value.loadingTime < new Date()) {
|
||||
this.service.msgSrv.warning('装货时间必须大于当前时间!');
|
||||
return;
|
||||
@ -956,7 +965,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
estimatedKilometers: this.totalDistance,
|
||||
estimatedTravelTime: this.totalTime,
|
||||
insurancePackagedGoods: this.sf4.value.insurancePackagedGoods,
|
||||
goodsValue:this.sf4.value.goodsValue,
|
||||
goodsValue: this.sf4.value.goodsValue
|
||||
};
|
||||
console.log(params);
|
||||
const modalRef = this.modalService.create({
|
||||
@ -968,7 +977,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
});
|
||||
modalRef.afterClose.subscribe(result => {
|
||||
if (result) {
|
||||
this.submit(submitType, params, );
|
||||
this.submit(submitType, params);
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -1181,8 +1190,8 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
}
|
||||
// 计算保价费金额
|
||||
getInsurersPrice(insuranceType = this.sf5.value?.insuranceType) {
|
||||
console.log(insuranceType)
|
||||
console.log(this.totalDistance)
|
||||
console.log(insuranceType);
|
||||
console.log(this.totalDistance);
|
||||
if (insuranceType !== '3' && this.sf4.value?.goodsValue >= 50000 && this.totalDistance > 0) {
|
||||
const params = {
|
||||
insuranceType,
|
||||
|
||||
@ -183,12 +183,12 @@ export class SupplyManagementVehicleComponent implements OnInit {
|
||||
if (res) {
|
||||
console.log(res);
|
||||
}
|
||||
})
|
||||
});
|
||||
console.log(111);
|
||||
}
|
||||
},
|
||||
}
|
||||
]
|
||||
})
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -576,7 +576,7 @@ export class SupplyManagementVehicleComponent implements OnInit {
|
||||
title: '创建时间',
|
||||
width: '200px',
|
||||
index: 'createTime',
|
||||
className: 'text-left',
|
||||
className: 'text-left'
|
||||
},
|
||||
{
|
||||
title: '审核状态',
|
||||
@ -606,7 +606,7 @@ export class SupplyManagementVehicleComponent implements OnInit {
|
||||
{
|
||||
text: '修改货源',
|
||||
click: _record => this.amend(_record),
|
||||
iif: item => item.resourceStatus === '1' ,
|
||||
iif: item => item.resourceStatus === '1' && item.insurancePayment !== 'Y',
|
||||
acl: { ability: ['SUPPLY-INDEX-vehicleModificationSupply'] }
|
||||
},
|
||||
// {
|
||||
@ -640,8 +640,8 @@ export class SupplyManagementVehicleComponent implements OnInit {
|
||||
exportFire() {
|
||||
this.service.request(this.service.$api_asyncExportWholeList, this.reqParams).subscribe((res: any) => {
|
||||
if (res) {
|
||||
this.service.msgSrv.success('导出成功,请去下载中心下载!')
|
||||
this.service.msgSrv.success('导出成功,请去下载中心下载!');
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user