替换containsAllLable

This commit is contained in:
潘晓云
2022-03-09 16:33:45 +08:00
parent 957a66254f
commit b0a7611ae4
28 changed files with 1365 additions and 1105 deletions

View File

@ -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);
// }
});
}
}

View File

@ -27,37 +27,37 @@ export class WaybillManagementBulkComponent implements OnInit {
@ViewChild('sf', { static: false }) sf!: SFComponent;
columns: STColumn[] = [];
resourceStatus: any;
tabs = {
signQuantity: 0,
cancelQuantity: 0,
receivedQuantity: 0,
totalQuantity: 0,
compolatelQuantity: 0,
deltQuantity: 0
};
tabs = {
signQuantity: 0,
cancelQuantity: 0,
receivedQuantity: 0,
totalQuantity: 0,
compolatelQuantity: 0,
deltQuantity: 0
};
constructor(
public service: WaybillManagementServe,
private modal: NzModalService,
public service: WaybillManagementServe,
private modal: NzModalService,
public shipperservice: ShipperBaseService) { }
/**
* 查询参数
*/
get reqParams() {
const a:any = {};
if(this.resourceStatus) {
a.wayBillStatus = this.resourceStatus
const a: any = {};
if (this.resourceStatus) {
a.wayBillStatus = this.resourceStatus
}
const params: any = Object.assign({}, this.sf?.value || {});
delete params._$expand;
return {
return {
...a,
...params,
createTime: {
start: this.sf?.value?.createTime?.[0] || '',
end: this.sf?.value?.createTime?.[1] || '',
},
};
};
}
get selectedRows() {
return this.st?.list.filter((item) => item.checked) || [];
@ -98,14 +98,14 @@ tabs = {
console.log(q)
if (!!q) {
return this.service
.request(this.service.$api_enterpriceList, { enterpriseName: q})
.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([]);
}
},
} as SFSelectWidgetSchema,
},
loadingPlace: {
@ -152,14 +152,14 @@ tabs = {
_$expand: (value: boolean) => value,
},
}
},
},
paymentstatus: {
title: '支付状态',
type: 'string',
ui: {
widget: 'dict-select',
params: { dictKey: 'overall:payment:status' },
containsAllLable: true,
containsAllLabel: true,
visibleIf: {
_$expand: (value: boolean) => value,
},
@ -170,14 +170,14 @@ tabs = {
type: 'string',
ui: {
widget: 'dict-select',
containsAllLable: true,
containsAllLabel: true,
params: { dictKey: 'service:type' },
visibleIf: {
_$expand: (value: boolean) => value
}
} as SFSelectWidgetSchema
},
riskStatus: {
type: 'string',
title: '是否风险单',
@ -230,9 +230,9 @@ tabs = {
/**
* 初始化数据列表
*/
initST() {
initST() {
this.columns = [
{ title: '', type: 'checkbox', fixed: 'left', width: '50px', className: 'text-center' },
{ title: '', type: 'checkbox', fixed: 'left', width: '50px', className: 'text-center' },
{
title: '运单号',
width: '180px',
@ -257,7 +257,7 @@ tabs = {
width: '220px',
index: 'dischargePlace'
},
{
{
title: '货物信息',
className: 'text-left',
width: '250px',
@ -315,13 +315,13 @@ tabs = {
{
text: '确认发车',
click: (_record) => this.sureDepart(_record),
iif: item => item.wayBillStatus == '2' ,
iif: item => item.wayBillStatus == '2',
acl: { ability: ['WAYBILL-BULK-insertBulkStartCarInfo'] },
},
{
text: '确认到车',
click: (_record) => this.sureArrive(_record),
iif: item => item.wayBillStatus == '3' ,
iif: item => item.wayBillStatus == '3',
acl: { ability: ['WAYBILL-BULK-insertBulkUnloadCarInfo'] },
},
],
@ -357,8 +357,8 @@ tabs = {
}
selectChange(e: number) {
console.log(e);
if(e>=1) {
this.resourceStatus = e + 1;
if (e >= 1) {
this.resourceStatus = e + 1;
}
this.initST();
setTimeout(() => {
@ -374,15 +374,15 @@ tabs = {
audit(item: any) {
console.log(item)
}
/**
* 审核通过按钮
*/
/**
* 审核通过按钮
*/
handleOK() {
}
/**
*查看评价
*/
/**
*查看评价
*/
viewEvaluate(item: any) {
console.log(item)
this.isVisibleEvaluate = true
@ -402,62 +402,62 @@ tabs = {
if (res) {
let totalCount = 0;
res.forEach((ele: any) => {
switch(ele.wayBillStatus) {
switch (ele.wayBillStatus) {
case '2':
this.tabs.receivedQuantity = ele?.count;
break;
case '3':
this.tabs.cancelQuantity = ele?.count;
break;
break;
case '4':
this.tabs.signQuantity = ele?.count;
break;
break;
case '5':
this.tabs.compolatelQuantity = ele?.count;
break;
break;
case '6':
this.tabs.deltQuantity = ele?.count;
break;
break;
}
totalCount += ele.count
});
this.tabs.totalQuantity = totalCount
});
this.tabs.totalQuantity = totalCount
}
})
}
// *确认发车
sureDepart(item: any) {
const modalRef = this.modal.create({
nzTitle: '确认发车',
nzWidth: '50%',
nzContent: VehicleSureDepartComponent,
nzComponentParams: {
i: item,
Status: 2
},
nzFooter: null
});
modalRef.afterClose.subscribe((result: any) => {
this.st.load(1);
this.getGoodsSourceStatistical()
// *确认发车
sureDepart(item: any) {
const modalRef = this.modal.create({
nzTitle: '确认发车',
nzWidth: '50%',
nzContent: VehicleSureDepartComponent,
nzComponentParams: {
i: item,
Status: 2
},
nzFooter: null
});
}
// 确认到车
sureArrive(item: any) {
const modalRef = this.modal.create({
nzTitle: '确认到车',
nzWidth: '50%',
nzContent: VehicleSureArriveComponent,
nzComponentParams: {
i: item,
Status: 2
},
nzFooter: null
});
modalRef.afterClose.subscribe((result: any) => {
this.st.load(1);
this.getGoodsSourceStatistical()
modalRef.afterClose.subscribe((result: any) => {
this.st.load(1);
this.getGoodsSourceStatistical()
});
}
}
// 确认到车
sureArrive(item: any) {
const modalRef = this.modal.create({
nzTitle: '确认到车',
nzWidth: '50%',
nzContent: VehicleSureArriveComponent,
nzComponentParams: {
i: item,
Status: 2
},
nzFooter: null
});
modalRef.afterClose.subscribe((result: any) => {
this.st.load(1);
this.getGoodsSourceStatistical()
});
}
}

View File

@ -37,27 +37,27 @@ export class WaybillManagementVehicleComponent implements OnInit {
};
constructor(
public service: WaybillManagementServe,
private modal: NzModalService,
public shipperservice: ShipperBaseService) {}
private modal: NzModalService,
public shipperservice: ShipperBaseService) { }
/**
* 查询参数
*/
get reqParams() {
const a:any = {};
const a: any = {};
if (this.resourceStatus) {
a.wayBillStatus = this.resourceStatus;
}
const params: any = Object.assign({}, this.sf?.value || {});
delete params._$expand;
return {
return {
...a,
...params,
createTime: {
start: this.sf?.value?.createTime?.[0] || '',
end: this.sf?.value?.createTime?.[1] || '',
},
};
};
}
get selectedRows() {
return this.st?.list.filter(item => item.checked) || [];
@ -96,7 +96,7 @@ export class WaybillManagementVehicleComponent implements OnInit {
console.log(q)
if (!!q) {
return this.service
.request(this.service.$api_enterpriceList, { enterpriseName: q})
.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 {
@ -137,7 +137,7 @@ export class WaybillManagementVehicleComponent implements OnInit {
}
}
},
driverName: {
title: '承运司机',
type: 'string',
@ -164,14 +164,14 @@ export class WaybillManagementVehicleComponent implements OnInit {
_$expand: (value: boolean) => value,
},
}
},
},
paymentstatus: {
title: '支付状态',
type: 'string',
ui: {
widget: 'dict-select',
params: { dictKey: 'overall:payment:status' },
containsAllLable: true,
containsAllLabel: true,
visibleIf: {
_$expand: (value: boolean) => value
}
@ -182,14 +182,14 @@ export class WaybillManagementVehicleComponent implements OnInit {
type: 'string',
ui: {
widget: 'dict-select',
containsAllLable: true,
containsAllLabel: true,
params: { dictKey: 'service:type' },
visibleIf: {
_$expand: (value: boolean) => value
}
} as SFSelectWidgetSchema
},
riskStatus: {
type: 'string',
title: '是否风险单',
@ -238,34 +238,34 @@ export class WaybillManagementVehicleComponent implements OnInit {
};
this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } };
}
// 获取城市列表
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
}))
// 获取城市列表
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);
// }
});
}
.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);
// }
});
}
/**
* 初始化数据列表
*/
initST() {
this.columns = [
{ title: '', type: 'checkbox', fixed: 'left', width: '50px', className: 'text-center' },
{ title: '', type: 'checkbox', fixed: 'left', width: '50px', className: 'text-center' },
{
title: '运单号',
width: '180px',
@ -391,7 +391,7 @@ export class WaybillManagementVehicleComponent implements OnInit {
/**
* 导入货源
*/
importGoodsSource() {}
importGoodsSource() { }
/**
*查看评价
*/
@ -428,16 +428,16 @@ export class WaybillManagementVehicleComponent implements OnInit {
case '4':
this.tabs.signQuantity = ele?.count;
break;
case '5':
this.tabs.compolatelQuantity = ele?.count;
case '5':
this.tabs.compolatelQuantity = ele?.count;
break;
case '6':
this.tabs.deltQuantity = ele?.count;
case '6':
this.tabs.deltQuantity = ele?.count;
break;
}
totalCount += ele.count
});
this.tabs.totalQuantity = totalCount
this.tabs.totalQuantity = totalCount
}
});
}
@ -457,7 +457,7 @@ export class WaybillManagementVehicleComponent implements OnInit {
modalRef.afterClose.subscribe((result: any) => {
this.st.load(1);
this.getGoodsSourceStatistical()
});
});
}
// 确认到车
sureArrive(item: any) {
@ -474,6 +474,6 @@ export class WaybillManagementVehicleComponent implements OnInit {
modalRef.afterClose.subscribe((result: any) => {
this.st.load(1);
this.getGoodsSourceStatistical()
});
});
}
}