替换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

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