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
78
79
80
81
82
83
84
85
86
87
88
| import type { VbenFormSchema } from '#/adapter/form';
| import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
| import { DICT_TYPE } from '#/packages/constants/src';
| import { getDictOptions } from '#/packages/effects/hooks/src';
|
| export function useDrawingReviewGridFormSchema(): VbenFormSchema[] {
| return [
| {
| fieldName: 'code',
| label: '审核单号',
| component: 'Input',
| componentProps: { placeholder: '请输入审核单号' },
| },
| {
| fieldName: 'status',
| label: '审核状态',
| component: 'Select',
| componentProps: {
| allowClear: true,
| options: getDictOptions(DICT_TYPE.MES_PD_DRAWING_REVIEW_STATUS, 'number'),
| placeholder: '请选择审核状态',
| },
| },
| ];
| }
|
| export function useDrawingReviewGridColumns(): VxeTableGridOptions['columns'] {
| return [
| { field: 'code', title: '审核单号', minWidth: 130 },
| { field: 'documentName', title: '资料名称', minWidth: 160 },
| { field: 'documentVersion', title: '资料版本', minWidth: 90 },
| { field: 'reviewerName', title: '审核人', minWidth: 100 },
| {
| field: 'status',
| title: '审核状态',
| minWidth: 100,
| cellRender: {
| name: 'CellDict',
| props: { type: DICT_TYPE.MES_PD_DRAWING_REVIEW_STATUS },
| },
| },
| {
| field: 'reviewTime',
| title: '审核时间',
| minWidth: 160,
| formatter: 'formatDateTime',
| },
| {
| field: 'action',
| title: '操作',
| width: 160,
| fixed: 'right',
| slots: { default: 'actions' },
| },
| ];
| }
|
| export function useDrawingReviewFormSchema(): VbenFormSchema[] {
| return [
| {
| fieldName: 'id',
| component: 'Input',
| dependencies: { triggerFields: [''], show: () => false },
| },
| {
| fieldName: 'documentName',
| label: '资料名称',
| component: 'Input',
| componentProps: { disabled: true },
| },
| {
| fieldName: 'status',
| label: '审核结果',
| component: 'RadioGroup',
| componentProps: {
| options: getDictOptions(DICT_TYPE.MES_PD_DRAWING_REVIEW_STATUS, 'number'),
| },
| rules: 'required',
| },
| {
| fieldName: 'reviewComment',
| label: '审核意见',
| component: 'Textarea',
| componentProps: { placeholder: '请输入审核意见', rows: 4 },
| },
| ];
| }
|
|