替换containsAllLable
This commit is contained in:
@ -24,55 +24,57 @@ export class WaybillManagementAbnormalAppearComponent implements OnInit {
|
||||
addSchema: SFSchema = {};
|
||||
_$expand = false;
|
||||
editText = '';
|
||||
formData :any;
|
||||
formData: any;
|
||||
isVisible = false;
|
||||
edit = false;
|
||||
editId = false;
|
||||
selectedIndex = 0;
|
||||
|
||||
columns: STColumn[] = [
|
||||
{ title: '异常编号', index: 'exceptionCode',width: '180px',className: 'text-left', },
|
||||
{ title: '关联运单号', index: 'wayBillCode',width: '180px',className: 'text-left', },
|
||||
{ title: '网络货运人', index: 'enterpriseInfoName',width: '220px',className: 'text-left', },
|
||||
{ title: '货主', index: 'shipperAppUserName' ,width: '220px',className: 'text-left',},
|
||||
{ title: '装货地', index: 'loadingAddressArr' ,width: '220px',className: 'text-left',},
|
||||
{ title: '卸货地', index: 'unloadingAddressArr' ,width: '220px',className: 'text-left',},
|
||||
{ title: '承运司机', index: 'driver' ,width: '250px',className: 'text-left',},
|
||||
{ title: '异常信息', index: 'exceptionContent',width: '250px',className: 'text-left', },
|
||||
{ title: '异常图片', render: 'exceptionCertificateFirstFilePath' ,width: '200px',className: 'text-left',},
|
||||
{ title: '上报时间', index: 'createTime',width: '180px' ,className: 'text-left',},
|
||||
{ title: '异常编号', index: 'exceptionCode', width: '180px', className: 'text-left', },
|
||||
{ title: '关联运单号', index: 'wayBillCode', width: '180px', className: 'text-left', },
|
||||
{ title: '网络货运人', index: 'enterpriseInfoName', width: '220px', className: 'text-left', },
|
||||
{ title: '货主', index: 'shipperAppUserName', width: '220px', className: 'text-left', },
|
||||
{ title: '装货地', index: 'loadingAddressArr', width: '220px', className: 'text-left', },
|
||||
{ title: '卸货地', index: 'unloadingAddressArr', width: '220px', className: 'text-left', },
|
||||
{ title: '承运司机', index: 'driver', width: '250px', className: 'text-left', },
|
||||
{ title: '异常信息', index: 'exceptionContent', width: '250px', className: 'text-left', },
|
||||
{ title: '异常图片', render: 'exceptionCertificateFirstFilePath', width: '200px', className: 'text-left', },
|
||||
{ title: '上报时间', index: 'createTime', width: '180px', className: 'text-left', },
|
||||
];
|
||||
columns2: STColumn[] = [
|
||||
{ title: '异常编号', index: 'exceptionCode',width: '180px',className: 'text-left' },
|
||||
{ title: '关联运单号', index: 'wayBillCode',width: '180px' ,className: 'text-left'},
|
||||
{ title: '网络货运人', index: 'enterpriseInfoName',width: '180px',className: 'text-left' },
|
||||
{ title: '货主', index: 'shipperAppUserName' ,width: '180px',className: 'text-left'},
|
||||
{ title: '装货地', index: 'loadingPlace' ,width: '180px',className: 'text-left'},
|
||||
{ title: '卸货地', index: 'dischargePlace' ,width: '180px',className: 'text-left'},
|
||||
{ title: '承运司机', index: 'driver' ,width: '90px',className: 'text-left'},
|
||||
{ title: '异常信息', index: 'exceptionContent',width: '250px' ,className: 'text-left'},
|
||||
{ title: '异常图片', render: 'exceptionCertificateFirstFilePath' ,width: '220px',className: 'text-left'},
|
||||
{ title: '上报时间', index: 'reportingTime',width: '180px' ,className: 'text-left'},
|
||||
{ title: '回复内容', index: 'replyContent',width: '180px' ,className: 'text-left'},
|
||||
{ title: '回复人', index: 'replyAppUserName',width: '180px' ,className: 'text-left'},
|
||||
{ title: '回复时间', index: 'replyTime',width: '180px' ,className: 'text-left'},
|
||||
{ title: '异常编号', index: 'exceptionCode', width: '180px', className: 'text-left' },
|
||||
{ title: '关联运单号', index: 'wayBillCode', width: '180px', className: 'text-left' },
|
||||
{ title: '网络货运人', index: 'enterpriseInfoName', width: '180px', className: 'text-left' },
|
||||
{ title: '货主', index: 'shipperAppUserName', width: '180px', className: 'text-left' },
|
||||
{ title: '装货地', index: 'loadingPlace', width: '180px', className: 'text-left' },
|
||||
{ title: '卸货地', index: 'dischargePlace', width: '180px', className: 'text-left' },
|
||||
{ title: '承运司机', index: 'driver', width: '90px', className: 'text-left' },
|
||||
{ title: '异常信息', index: 'exceptionContent', width: '250px', className: 'text-left' },
|
||||
{ title: '异常图片', render: 'exceptionCertificateFirstFilePath', width: '220px', className: 'text-left' },
|
||||
{ title: '上报时间', index: 'reportingTime', width: '180px', className: 'text-left' },
|
||||
{ title: '回复内容', index: 'replyContent', width: '180px', className: 'text-left' },
|
||||
{ title: '回复人', index: 'replyAppUserName', width: '180px', className: 'text-left' },
|
||||
{ title: '回复时间', index: 'replyTime', width: '180px', className: 'text-left' },
|
||||
];
|
||||
|
||||
get reqParams (){
|
||||
get reqParams() {
|
||||
return {
|
||||
...this.sf?.value,
|
||||
}};
|
||||
get reqParams2 (){
|
||||
...this.sf?.value,
|
||||
}
|
||||
};
|
||||
get reqParams2() {
|
||||
return {
|
||||
...this.sf?.value,
|
||||
}};
|
||||
...this.sf?.value,
|
||||
}
|
||||
};
|
||||
|
||||
constructor(
|
||||
public service: WaybillManagementServe,
|
||||
private nzModalService: NzModalService,
|
||||
public shipperSrv: ShipperBaseService
|
||||
|
||||
) {}
|
||||
) { }
|
||||
|
||||
ngOnInit(): void {
|
||||
this.initSF()
|
||||
@ -82,131 +84,131 @@ export class WaybillManagementAbnormalAppearComponent implements OnInit {
|
||||
* 伸缩查询条件
|
||||
*/
|
||||
expandToggle(): void {
|
||||
this._$expand = !this._$expand;
|
||||
this.sf?.setValue('/_$expand', this._$expand);
|
||||
this._$expand = !this._$expand;
|
||||
this.sf?.setValue('/_$expand', this._$expand);
|
||||
}
|
||||
/**
|
||||
* 查询字段个数
|
||||
*/
|
||||
/**
|
||||
* 查询字段个数
|
||||
*/
|
||||
get queryFieldCount(): number {
|
||||
return Object.keys(this.schema?.properties || {}).length;
|
||||
return Object.keys(this.schema?.properties || {}).length;
|
||||
}
|
||||
initSF(){
|
||||
this.schema = {
|
||||
properties: {
|
||||
_$expand: { type: 'boolean', ui: { hidden: true } },
|
||||
exceptionCode: {
|
||||
type: 'string',
|
||||
title: '异常编号',
|
||||
ui: { placeholder: '请输入' }
|
||||
},
|
||||
wayBillCode: {
|
||||
type: 'string',
|
||||
title: '运单号',
|
||||
ui: { placeholder: '请输入' }
|
||||
},
|
||||
exceptionType: {
|
||||
title: '异常类型',
|
||||
type: 'string',
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
containsAllLable: true,
|
||||
params: { dictKey: 'exception:report:type' },
|
||||
} as SFSelectWidgetSchema
|
||||
},
|
||||
shipperAppUserId: {
|
||||
type: 'string',
|
||||
title: '货主',
|
||||
ui: {
|
||||
widget: 'select',
|
||||
serverSearch: true,
|
||||
searchDebounceTime: 300,
|
||||
searchLoadingText: '搜索中...',
|
||||
allowClear: true,
|
||||
onSearch: (q: any) => {
|
||||
console.log(q)
|
||||
if (!!q) {
|
||||
return this.service
|
||||
.request(this.service.$api_enterpriceList, { enterpriseName: q})
|
||||
.pipe(map((res: any) => (res as any[]).map((i) => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum))))
|
||||
.toPromise();
|
||||
} else {
|
||||
return of([]);
|
||||
initSF() {
|
||||
this.schema = {
|
||||
properties: {
|
||||
_$expand: { type: 'boolean', ui: { hidden: true } },
|
||||
exceptionCode: {
|
||||
type: 'string',
|
||||
title: '异常编号',
|
||||
ui: { placeholder: '请输入' }
|
||||
},
|
||||
wayBillCode: {
|
||||
type: 'string',
|
||||
title: '运单号',
|
||||
ui: { placeholder: '请输入' }
|
||||
},
|
||||
exceptionType: {
|
||||
title: '异常类型',
|
||||
type: 'string',
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
containsAllLabel: true,
|
||||
params: { dictKey: 'exception:report:type' },
|
||||
} as SFSelectWidgetSchema
|
||||
},
|
||||
shipperAppUserId: {
|
||||
type: 'string',
|
||||
title: '货主',
|
||||
ui: {
|
||||
widget: 'select',
|
||||
serverSearch: true,
|
||||
searchDebounceTime: 300,
|
||||
searchLoadingText: '搜索中...',
|
||||
allowClear: true,
|
||||
onSearch: (q: any) => {
|
||||
console.log(q)
|
||||
if (!!q) {
|
||||
return this.service
|
||||
.request(this.service.$api_enterpriceList, { enterpriseName: q })
|
||||
.pipe(map((res: any) => (res as any[]).map((i) => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum))))
|
||||
.toPromise();
|
||||
} else {
|
||||
return of([]);
|
||||
}
|
||||
},
|
||||
change: (q: any) => {
|
||||
this.getRegionCode(q);
|
||||
},
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value,
|
||||
},
|
||||
} as SFSelectWidgetSchema,
|
||||
},
|
||||
enterpriseProjectId: {
|
||||
type: 'string',
|
||||
title: '所属项目',
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value
|
||||
},
|
||||
} as SFSelectWidgetSchema
|
||||
},
|
||||
driverName: {
|
||||
title: '承运司机',
|
||||
type: 'string',
|
||||
ui: {
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value
|
||||
}
|
||||
},
|
||||
change: (q: any) => {
|
||||
this.getRegionCode(q);
|
||||
},
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value,
|
||||
},
|
||||
} as SFSelectWidgetSchema,
|
||||
},
|
||||
enterpriseProjectId: {
|
||||
type: 'string',
|
||||
title: '所属项目',
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value
|
||||
},
|
||||
} as SFSelectWidgetSchema
|
||||
},
|
||||
driverName: {
|
||||
title: '承运司机',
|
||||
type: 'string',
|
||||
ui: {
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value
|
||||
}
|
||||
},
|
||||
carNo: {
|
||||
title: '车牌号',
|
||||
type: 'string',
|
||||
ui: {
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value
|
||||
}
|
||||
}
|
||||
},
|
||||
reportingTime: {
|
||||
title: '上报时间',
|
||||
type: 'string',
|
||||
ui: {
|
||||
widget: 'date',
|
||||
mode: 'range',
|
||||
format: 'yyyy-MM-dd',
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value
|
||||
}
|
||||
} as SFDateWidgetSchema
|
||||
},
|
||||
enterpriseInfoId: {
|
||||
type: 'string',
|
||||
title: '网络货运人',
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value,
|
||||
},
|
||||
allowClear: true,
|
||||
asyncData: () => this.shipperSrv.getNetworkFreightForwarder(),
|
||||
},
|
||||
}
|
||||
},
|
||||
carNo: {
|
||||
title: '车牌号',
|
||||
type: 'string',
|
||||
ui: {
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value
|
||||
}
|
||||
}
|
||||
},
|
||||
reportingTime: {
|
||||
title: '上报时间',
|
||||
type: 'string',
|
||||
ui: {
|
||||
widget: 'date',
|
||||
mode: 'range',
|
||||
format: 'yyyy-MM-dd',
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value
|
||||
}
|
||||
} as SFDateWidgetSchema
|
||||
},
|
||||
enterpriseInfoId: {
|
||||
type: 'string',
|
||||
title: '网络货运人',
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value,
|
||||
},
|
||||
allowClear: true,
|
||||
asyncData: () => this.shipperSrv.getNetworkFreightForwarder(),
|
||||
},
|
||||
}
|
||||
}
|
||||
};
|
||||
this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } };
|
||||
}
|
||||
};
|
||||
this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } };
|
||||
}
|
||||
|
||||
search() {
|
||||
console.log(this.selectedIndex)
|
||||
if(this.selectedIndex === 0) {
|
||||
this.st?.load(1)
|
||||
if (this.selectedIndex === 0) {
|
||||
this.st?.load(1)
|
||||
} else {
|
||||
this.st2?.load(1)
|
||||
this.st2?.load(1)
|
||||
}
|
||||
}
|
||||
/**
|
||||
@ -215,25 +217,25 @@ export class WaybillManagementAbnormalAppearComponent implements OnInit {
|
||||
resetSF() {
|
||||
this.sf.reset();
|
||||
}
|
||||
// 获取城市列表
|
||||
getRegionCode(regionCode: any) {
|
||||
console.log(regionCode);
|
||||
return this.service
|
||||
.request(this.service.$api_get_enterprise_project, { id: regionCode })
|
||||
.pipe(
|
||||
map(res =>
|
||||
res.map((item: any) => ({
|
||||
label: item.projectName,
|
||||
value: item.id
|
||||
}))
|
||||
)
|
||||
)
|
||||
.subscribe(res => {
|
||||
this.sf.getProperty('/enterpriseProjectId')!.schema.enum = res;
|
||||
this.sf.getProperty('/enterpriseProjectId')!.widget.reset(res);
|
||||
// if (this.enterpriseProjectIds) {
|
||||
// this.sf1.setValue('/enterpriseProjectId', this.enterpriseProjectIds);
|
||||
// }
|
||||
});
|
||||
}
|
||||
// 获取城市列表
|
||||
getRegionCode(regionCode: any) {
|
||||
console.log(regionCode);
|
||||
return this.service
|
||||
.request(this.service.$api_get_enterprise_project, { id: regionCode })
|
||||
.pipe(
|
||||
map(res =>
|
||||
res.map((item: any) => ({
|
||||
label: item.projectName,
|
||||
value: item.id
|
||||
}))
|
||||
)
|
||||
)
|
||||
.subscribe(res => {
|
||||
this.sf.getProperty('/enterpriseProjectId')!.schema.enum = res;
|
||||
this.sf.getProperty('/enterpriseProjectId')!.widget.reset(res);
|
||||
// if (this.enterpriseProjectIds) {
|
||||
// this.sf1.setValue('/enterpriseProjectId', this.enterpriseProjectIds);
|
||||
// }
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user