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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
| import { BasicColumn } from '/@/components/Table';
| import { FormSchema } from '/@/components/Table';
| import { optionsListApi } from '/@/api/tigerapi/mes/smt/load_his';
| import { h,unref } from 'vue';
| import { Tag, Tooltip } from 'ant-design-vue';
| import{ useLocale } from '/@/locales/useLocale';
|
| const { getLocale }=useLocale();
|
| export const columns: BasicColumn[] = [
| {
| title: '工单编码',
| dataIndex: 'WORK_ORDER',
| width: 200,
| sorter: true,
| resizable: true
| },
| {
| title: '产线线别',
| dataIndex: 'LINE_CODE',
| width: 200,
| sorter: true,
| resizable: true
| },
| {
| title: '产品料号',
| dataIndex: 'PROD_CODE',
| width: 200,
| sorter: true,
| resizable: true
| },
| {
| title: '操作类型',
| dataIndex: 'OPERATION',
| width: 100,
| sorter: true,
| resizable: true,
| customRender: ({ record }) => {
| const status = record.OPERATION;
| var text = '';
| var color = '';
| switch (status) {
| case '0':
| text = '上料';
| color = 'green';
| break;
| case '1':
| text = '换料';
| color = 'blue';
| break;
| case '2':
| text = '卸料';
| color = 'blue';
| break;
| case '3':
| text = '换飞达';
| color = 'blue';
| break;
| case '4':
| text = '使用钢网';
| color = 'blue';
| break;
| case '5':
| text = '使用刮刀';
| color = 'blue';
| break;
| case '6':
| text = '使用锡膏';
| color = 'blue';
| break;
| case '7':
| text = '使用胶水';
| color = 'blue';
| break;
| default:
| break;
| }
| return h(Tooltip, { title: 'xxxxxx' }, () => h(Tag, { color: color }, () => text));
| },
| },
| {
| title: '机器编码',
| dataIndex: 'SMT_CODE',
| width: 200,
| sorter: true,
| resizable: true
| },
| {
| title: '板面',
| dataIndex: 'PCB_SURFACE',
| width: 100,
| sorter: true,
| resizable: true
| },
| {
| title: '槽位',
| dataIndex: 'SLOT_NO',
| width: 100,
| sorter: true,
| resizable: true
| },
| {
| title: '飞达类型代码',
| dataIndex: 'FEEDER_TYPE',
| width: 100,
| sorter: true,
| resizable: true
| },
| {
| title: '飞达代码',
| dataIndex: 'FEEDER_CODE',
| width: 200,
| sorter: true,
| resizable: true
| },
| {
| title: 'Upn',
| dataIndex: 'SOLDER_UPN',
| width: 200,
| sorter: true,
| resizable: true
| },
| // {
| // title: '类型',
| // dataIndex: 'TYPE',
| // width: 100,
| // sorter: true,
| // resizable:true,
| // customRender: ({ record }) => {
| // const status = record.TYPE;
| // var text = '';
| // var color = '';
| // switch (status) {
| // case '0':
| // text = '锡膏';
| // color = 'green';
| // break;
| // case '1':
| // text = '胶水';
| // color = 'blue';
| // break;
| // default:
| // break;
| // }
| // return h(Tooltip, { title: 'xxxxxx' }, () => h(Tag, { color: color }, () => text));
| // },
| // },
| {
| title: '物料代码',
| dataIndex: 'ITEM_CODE',
| width: 200,
| sorter: true,
| resizable: true
| },
| {
| title: '创建人',
| dataIndex: 'CREATE_USER',
| width: 100,
| sorter: true,
| resizable: true
| }
| ,
| {
| title: '创建时间',
| dataIndex: 'CREATE_TIME',
| width: 100,
| sorter: true,
| resizable: true
| }
| ];
|
| export const searchFormSchema: FormSchema[] = [
| {
| field: 'LINE_CODE',
| label: '产线线别',
| component: 'Input',
| colProps: { span: 8 },
| },
| {
| field: 'WORK_ORDER',
| label: '工单编码',
| component: 'Input',
| colProps: { span: 8 },
| },
| {
| field: 'OPERATION',
| label: '操作类型',
| component: 'ApiSelect',
| colProps: { span: 8 },
| componentProps: {
| api: optionsListApi,
| resultField: 'Data',
| labelField: unref(getLocale)=='zh_CN'?'Desc':'Name',
| valueField: 'Value',
| },
| }
| ];
|
|