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

@ -27,19 +27,22 @@ export class ContractManagementContractListComponent implements OnInit {
_$expand = false;
isLoading: boolean = false;
/**
* 查询参数
*/
* 查询参数
*/
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')
};
}
return {
...params
@ -51,12 +54,12 @@ export class ContractManagementContractListComponent implements OnInit {
private nzModalService: NzModalService,
public shipperservice: ShipperBaseService,
private router: Router,
private datePipe: DatePipe,
) { }
private datePipe: DatePipe
) {}
ngOnInit(): void {
this.initST()
this.initSF()
this.initST();
this.initSF();
}
/**
* 初始化数据列表
@ -65,7 +68,7 @@ export class ContractManagementContractListComponent implements OnInit {
this.columns = [
{
title: '合同编号',
width: '100px',
width: '130px',
className: 'text-center',
render: 'contractCode'
},
@ -106,22 +109,34 @@ export class ContractManagementContractListComponent implements OnInit {
'3': { text: '已撤销', color: 'warning' },
'4': { text: '已作废', color: 'warning' },
'5': { text: '已过期', color: 'warning' },
'7': { 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))
}
]
}
];
}
/**
* 初始化查询表单
*/
* 初始化查询表单
*/
initSF() {
this.schema = {
properties: {
_$expand: { type: 'boolean', ui: { hidden: true } },
contractCode: {
type: 'string',
title: '合同编号',
title: '合同编号'
},
businessCode: {
type: 'string',
@ -151,7 +166,7 @@ export class ContractManagementContractListComponent implements OnInit {
visibleIf: {
_$expand: (value: boolean) => value
},
containAllLable: true,
containAllLable: true
} as SFSelectWidgetSchema
},
resourceType: {
@ -164,8 +179,8 @@ export class ContractManagementContractListComponent implements OnInit {
containsAllLable: true,
visibleIf: {
_$expand: (value: boolean) => value
},
} as SFSelectWidgetSchema,
}
} as SFSelectWidgetSchema
},
enterpriseInfoId: {
type: 'string',
@ -185,8 +200,8 @@ export class ContractManagementContractListComponent implements OnInit {
title: '合同对象',
ui: {
visibleIf: {
_$expand: (value: boolean) => value,
},
_$expand: (value: boolean) => value
}
}
},
signTime: {
@ -196,9 +211,9 @@ export class ContractManagementContractListComponent implements OnInit {
widget: 'sl-from-to-search',
format: 'yyyy-MM-dd',
visibleIf: {
_$expand: (value: boolean) => value,
},
} as SFDateWidgetSchema,
_$expand: (value: boolean) => value
}
} as SFDateWidgetSchema
},
esignFlowStatus: {
title: '状态',
@ -210,17 +225,17 @@ export class ContractManagementContractListComponent implements OnInit {
containsAllLable: true,
visibleIf: {
_$expand: (value: boolean) => value
},
} as SFSelectWidgetSchema,
},
}
} as SFSelectWidgetSchema
}
},
type: 'object',
type: 'object'
};
this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } };
}
/**
* 查询字段个数
*/
* 查询字段个数
*/
get queryFieldCount(): number {
return Object.keys(this.schema?.properties || {}).length;
}
@ -285,7 +300,7 @@ export class ContractManagementContractListComponent implements OnInit {
resetSF() {
this.sf.reset();
this._$expand = false;
this.isLoading = true
this.isLoading = true;
}
/**
* 伸缩查询条件