1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
| import type { VbenFormSchema } from '#/adapter/form';
| import type { VxeTableGridOptions } from '#/adapter/vxe-table';
| import type { HrmSalaryPaymentApi } from '#/api/hrm/salary/payment';
|
| import { getDictOptions } from '#/packages/effects/hooks/src';
| import { DICT_TYPE } from '#/packages/constants/src';
|
| /** 列表的搜索表单 */
| export function useGridFormSchema(): VbenFormSchema[] {
| return [
| {
| fieldName: 'period',
| label: '发放周期',
| component: 'DatePicker',
| componentProps: {
| picker: 'month',
| allowClear: true,
| format: 'YYYY-MM',
| valueFormat: 'YYYY-MM',
| style: { width: '100%' },
| placeholder: '请选择发放周期',
| },
| },
| {
| fieldName: 'status',
| label: '发放状态',
| component: 'Select',
| componentProps: {
| allowClear: true,
| options: [
| { label: '待发放', value: 0 },
| { label: '已发放', value: 10 },
| ],
| placeholder: '请选择发放状态',
| },
| },
| ];
| }
|
| /** 列表的字段 */
| export function useGridColumns(): VxeTableGridOptions<HrmSalaryPaymentApi.SalaryPayment>['columns'] {
| return [
| { field: 'no', title: '发放单号', minWidth: 140 },
| { field: 'period', title: '发放周期', width: 100 },
| { field: 'totalAmount', title: '发放总金额', width: 120, formatter: 'formatAmount2' },
| { field: 'totalCount', title: '发放人数', width: 100 },
| {
| field: 'paymentMethod',
| title: '发放方式',
| width: 100,
| cellRender: {
| name: 'CellDict',
| props: { type: DICT_TYPE.HRM_PAYMENT_METHOD },
| },
| },
| { field: 'paymentTime', title: '发放时间', width: 160 },
| {
| field: 'status',
| title: '状态',
| width: 100,
| fixed: 'right',
| slots: { default: 'status' },
| },
| {
| field: 'createTime',
| title: '创建时间',
| width: 180,
| formatter: 'formatDateTime',
| },
| {
| title: '操作',
| width: 180,
| fixed: 'right',
| slots: { default: 'actions' },
| },
| ];
| }
|
|