index.ts
1.81 KB
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
import { FormSchema } from '/@/components/Form';
import { useI18n } from '/@/hooks/web/useI18n';
import { BasicColumn } from '/@/components/Table';
import {getRepairOrderList} from "../../../api/repair/order";
const { t } = useI18n();
export const columns: BasicColumn[] = [
{
title: t('repair.history.photo'),
dataIndex: 'situationImg',
slots: { customRender: 'situationImg' },
},
{
title: t('repair.history.orderCode'),
dataIndex: 'code',
},
{
title: t('repair.history.orderText'),
dataIndex: 'orderCode',
format: (text, record) => {
return record.tkRepairOrderDTO?.orderCode || '-' || text;
},
},
{
title: t('repair.history.deviceNameText'),
dataIndex: 'deviceAccountName',
},
{
title: t('repair.history.time'),
dataIndex: 'reportDate',
format: (text, record) => {
return record.tkRepairOrderDTO?.reportDate || '-' || text;
},
},
{
title: t('repair.history.reportByName'),
dataIndex: 'tkRepairOrderDTO',
format: (text, record) => {
return record.tkRepairOrderDTO?.reportByName || '-' || text;
},
},
{
title: t('repair.history.description'),
dataIndex: 'description',
},
{
title: t('repair.history.repairTime'),
dataIndex: 'repairDate',
},
{
title: t('repair.history.repairByName'),
dataIndex: 'repairName',
},
{
title: t('repair.history.repairReason'),
dataIndex: 'malfunctionReasonName',
},
];
export const searchFormSchema: FormSchema[] = [
{
field: 'orderId',
label: t('repair.history.orderText'),
component: 'ApiSelect',
colProps: { span: 6 },
componentProps: {
api: getRepairOrderList,
params: {
page: 1,
pageSize: 999,
},
resultField: 'items',
labelField: 'orderCode',
valueField: 'id',
},
},
];