This commit is contained in:
Taric Xin
2022-04-20 16:12:55 +08:00
parent 76acf73ee1
commit 8b262bd028
4 changed files with 121 additions and 63 deletions

View File

@ -32,33 +32,39 @@ export class ContractManagementFrameComponent implements OnInit {
private nzModalService: NzModalService,
private router: Router,
public shipperservice: ShipperBaseService,
private datePipe: DatePipe,
) { }
private datePipe: DatePipe
) {}
ngOnInit(): void {
this.initST();
this.initSF();
}
/**
* 查询参数
*/
* 查询参数
*/
get reqParams() {
const params = {
...this.sf?.value,
}
...this.sf?.value
};
delete params.signTime;
delete params._$expand;
if (this.datePipe.transform(this.sf?.value?.signTime?.[0], 'yyyy-MM-dd HH:mm:ss') && this.datePipe.transform(this.sf?.value?.signTime?.[1], 'yyyy-MM-dd HH:mm:ss')) {
if (
this.datePipe.transform(this.sf?.value?.signTime?.[0], 'yyyy-MM-dd HH:mm:ss') &&
this.datePipe.transform(this.sf?.value?.signTime?.[1], 'yyyy-MM-dd HH:mm:ss')
) {
params.signTime = {
start: this.datePipe.transform(this.sf?.value?.signTime?.[0], 'yyyy-MM-dd HH:mm:ss'),
end: this.datePipe.transform(this.sf?.value?.signTime?.[1], 'yyyy-MM-dd HH:mm:ss'),
}
end: this.datePipe.transform(this.sf?.value?.signTime?.[1], 'yyyy-MM-dd HH:mm:ss')
};
}
if (this.datePipe.transform(this.sf?.value?.effectiveEndTime?.[0], 'yyyy-MM-dd HH:mm:ss') && this.datePipe.transform(this.sf?.value?.effectiveEndTime?.[1], 'yyyy-MM-dd HH:mm:ss')) {
if (
this.datePipe.transform(this.sf?.value?.effectiveEndTime?.[0], 'yyyy-MM-dd HH:mm:ss') &&
this.datePipe.transform(this.sf?.value?.effectiveEndTime?.[1], 'yyyy-MM-dd HH:mm:ss')
) {
params.effectiveEndTime = {
start: this.datePipe.transform(this.sf?.value?.effectiveEndTime?.[0], 'yyyy-MM-dd HH:mm:ss'),
end: this.datePipe.transform(this.sf?.value?.effectiveEndTime?.[1], 'yyyy-MM-dd HH:mm:ss'),
}
end: this.datePipe.transform(this.sf?.value?.effectiveEndTime?.[1], 'yyyy-MM-dd HH:mm:ss')
};
}
return {
...params
@ -71,7 +77,7 @@ export class ContractManagementFrameComponent implements OnInit {
this.columns = [
{
title: '合同编号',
width: '100px',
width: '130px',
className: 'text-center',
render: 'contractCode'
},
@ -122,6 +128,19 @@ export class ContractManagementFrameComponent implements OnInit {
'5': { text: '已过期', color: 'warning' },
'7': { text: '已拒签', color: 'warning' }
}
},
{
title: '操作',
className: 'text-center',
fixed: 'right',
width: '80px',
buttons: [
{
text: '签署',
iif: item => item.esignFlowStatus === '0' || item.esignFlowStatus === '1' || item.esignFlowStatus === '13',
click: item => this.service.StartTheProcessToESignById(item.id, () => this.st.load(1))
}
]
}
];
}
@ -142,11 +161,11 @@ export class ContractManagementFrameComponent implements OnInit {
enum: [
{ label: '全部', value: '' },
{ label: '货主', value: 1 },
{ label: '司机', value: 2 },
{ label: '司机', value: 2 }
],
ui: {
widget: 'select',
placeholder: '请选择',
placeholder: '请选择'
}
},
contractType: {
@ -157,8 +176,8 @@ export class ContractManagementFrameComponent implements OnInit {
widget: 'dict-select',
containsAllLable: true,
params: { dictKey: 'contract:type' },
containAllLable: true,
} as SFSelectWidgetSchema,
containAllLable: true
} as SFSelectWidgetSchema
},
enterpriseInfoId: {
type: 'string',
@ -178,8 +197,8 @@ export class ContractManagementFrameComponent implements OnInit {
title: '合同对象',
ui: {
visibleIf: {
_$expand: (value: boolean) => value,
},
_$expand: (value: boolean) => value
}
}
},
signTime: {
@ -188,8 +207,8 @@ export class ContractManagementFrameComponent implements OnInit {
ui: {
widget: 'custom',
visibleIf: {
_$expand: (value: boolean) => value,
},
_$expand: (value: boolean) => value
}
}
},
effectiveEndTime: {
@ -198,8 +217,8 @@ export class ContractManagementFrameComponent implements OnInit {
ui: {
widget: 'custom',
visibleIf: {
_$expand: (value: boolean) => value,
},
_$expand: (value: boolean) => value
}
}
},
esignFlowStatus: {
@ -212,10 +231,10 @@ export class ContractManagementFrameComponent implements OnInit {
params: { dictKey: 'esign:flow:status' },
containAllLable: true,
visibleIf: {
_$expand: (value: boolean) => value,
},
} as SFSelectWidgetSchema,
},
_$expand: (value: boolean) => value
}
} as SFSelectWidgetSchema
}
},
type: 'object'
};
@ -238,9 +257,9 @@ export class ContractManagementFrameComponent implements OnInit {
}
}
approval(): void { }
approval(): void {}
add(): void { }
add(): void {}
routeTo(item: any) {
this.router.navigate(['/ticket/invoice-requested-detail/1']);