fix bug
This commit is contained in:
@ -116,10 +116,11 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
|||||||
ui: {
|
ui: {
|
||||||
widget: 'select',
|
widget: 'select',
|
||||||
serverSearch: true,
|
serverSearch: true,
|
||||||
|
allowClear: true,
|
||||||
searchDebounceTime: 300,
|
searchDebounceTime: 300,
|
||||||
searchLoadingText: '搜索中...',
|
searchLoadingText: '搜索中...',
|
||||||
onSearch: (q: any) => {
|
onSearch: (q: any) => {
|
||||||
let str = q.replace(/^\s+|\s+$/g, '');
|
let str = q?.replace(/^\s+|\s+$/g, '');
|
||||||
if (str) {
|
if (str) {
|
||||||
return this.service
|
return this.service
|
||||||
.request(this.service.$api_enterpriceList, { enterpriseName: str })
|
.request(this.service.$api_enterpriceList, { enterpriseName: str })
|
||||||
@ -130,7 +131,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
change: (q: any, qs: any) => {
|
change: (q: any, qs: any) => {
|
||||||
let str = q.replace(/^\s+|\s+$/g, '');
|
let str = q?.replace(/^\s+|\s+$/g, '');
|
||||||
if (str) {
|
if (str) {
|
||||||
this.getRegionCode(str);
|
this.getRegionCode(str);
|
||||||
this.shipperName = qs?.label;
|
this.shipperName = qs?.label;
|
||||||
@ -649,17 +650,17 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
// 校验各个输入限定值
|
// 校验各个输入限定值
|
||||||
if (
|
if (
|
||||||
this.sf4.value.weight > this.limitValues.maxWeight ||
|
this.sf4.value?.weight > this.limitValues?.maxWeight ||
|
||||||
this.sf4.value.volume > this.limitValues.maxVolume ||
|
this.sf4.value?.volume > this.limitValues?.maxVolume ||
|
||||||
this.sf4.value.number > this.limitValues.maxTrainNumber
|
this.sf4.value?.number > this.limitValues?.maxTrainNumber
|
||||||
) {
|
) {
|
||||||
this.service.msgSrv.error(
|
this.service.msgSrv.error(
|
||||||
`当前货物核载信息已超出限定值【${this.limitValues.maxWeight}吨、${this.limitValues.maxVolume}方、${this.limitValues.maxTrainNumber}车】`
|
`当前货物核载信息已超出限定值【${this.limitValues?.maxWeight}吨、${this.limitValues?.maxVolume}方、${this.limitValues?.maxTrainNumber}车】`
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.sf4.value.freightPrice > this.limitValues.maxFreight) {
|
if (this.sf4.value?.freightPrice > this.limitValues?.maxFreight) {
|
||||||
this.service.msgSrv.error(`当前运费单价已超出限定值【${this.limitValues.maxFreight}元】`);
|
this.service.msgSrv.error(`当前运费单价已超出限定值【${this.limitValues.maxFreight}元】`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -682,8 +683,8 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
|||||||
{
|
{
|
||||||
...this.sf4.value,
|
...this.sf4.value,
|
||||||
...this.sf3.value,
|
...this.sf3.value,
|
||||||
carModel: this.sf4.value.carModel.join(','),
|
carModel: this.sf4.value?.carModel.join(','),
|
||||||
carLength: this.sf4.value.carLength.join(',')
|
carLength: this.sf4.value?.carLength.join(',')
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
// 从“再下一单”过来,将所有的子参数内的id都删除
|
// 从“再下一单”过来,将所有的子参数内的id都删除
|
||||||
|
|||||||
@ -130,7 +130,7 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
|
|||||||
searchLoadingText: '搜索中...',
|
searchLoadingText: '搜索中...',
|
||||||
allowClear: true,
|
allowClear: true,
|
||||||
onSearch: (q: any) => {
|
onSearch: (q: any) => {
|
||||||
let str =q.replace(/^\s+|\s+$/g,"");
|
let str =q?.replace(/^\s+|\s+$/g,"");
|
||||||
if (str) {
|
if (str) {
|
||||||
return this.service
|
return this.service
|
||||||
.request(this.service.$api_enterpriceList, { enterpriseName: str })
|
.request(this.service.$api_enterpriceList, { enterpriseName: str })
|
||||||
@ -141,7 +141,7 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
change: (q: any, qs: any) => {
|
change: (q: any, qs: any) => {
|
||||||
let str =q.replace(/^\s+|\s+$/g,"");
|
let str =q?.replace(/^\s+|\s+$/g,"");
|
||||||
if (str) {
|
if (str) {
|
||||||
this.getRegionCode(str);
|
this.getRegionCode(str);
|
||||||
this.shipperName = qs?.label;
|
this.shipperName = qs?.label;
|
||||||
|
|||||||
Reference in New Issue
Block a user