fix bug
This commit is contained in:
@ -150,10 +150,11 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
ui: {
|
||||
widget: 'select',
|
||||
// serverSearch: true,
|
||||
allowClear: true,
|
||||
searchDebounceTime: 300,
|
||||
searchLoadingText: '搜索中...',
|
||||
onSearch: (q: any) => {
|
||||
let str = q.replace(/^\s+|\s+$/g, '');
|
||||
let str = q?.replace(/^\s+|\s+$/g, '');
|
||||
if (str) {
|
||||
return this.service
|
||||
.request(this.service.$api_enterpriceList, { enterpriseName: str })
|
||||
@ -164,7 +165,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
}
|
||||
},
|
||||
change: (q: any, qs: any) => {
|
||||
let str = q.replace(/^\s+|\s+$/g, '');
|
||||
let str = q?.replace(/^\s+|\s+$/g, '');
|
||||
if (str) {
|
||||
this.getRegionCode(str);
|
||||
this.shipperName = qs?.label;
|
||||
@ -894,7 +895,7 @@ 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.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;
|
||||
}
|
||||
@ -1235,8 +1236,8 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
}
|
||||
this.validateForm1.patchValue(
|
||||
{
|
||||
loadingTime: new Date(Date.parse(res.loadingTime.replace(/-/g, '/'))),
|
||||
unloadingTime: new Date(Date.parse(res.unloadingTime.replace(/-/g, '/')))
|
||||
loadingTime: new Date(Date.parse(res?.loadingTime.replace(/-/g, '/'))),
|
||||
unloadingTime: new Date(Date.parse(res?.unloadingTime.replace(/-/g, '/')))
|
||||
},
|
||||
{ onlySelf: true }
|
||||
);
|
||||
@ -1383,6 +1384,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
}
|
||||
// 计算保价费金额
|
||||
getInsurersPrice(insuranceType = this.sf5.value.insuranceType) {
|
||||
console.log(this.totalDistance)
|
||||
if ( insuranceType !=='3' && this.sf4.value?.goodsValue >= 50000 && this.totalDistance > 0 ) {
|
||||
const params = {
|
||||
insuranceType,
|
||||
|
||||
Reference in New Issue
Block a user