| 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
 | | <script setup> |  | import { getCurrentInstance, ref, watch, reactive } from 'vue'; |  | import { useRouter } from "vue-router"; |  | import { get, post, postForm } from '@/utils/request.js' |  | import { message, Modal } from 'ant-design-vue'; |  | import { logout } from '@/config.js'; |  | import { formatMessage } from '@/utils/localeUtils.js'; |  | import useTableSearch from '@/utils/tableUtils.jsx'; |  | const context = getCurrentInstance()?.appContext.config.globalProperties; |  |   |  | const router = useRouter(); |  |   |  | const TABLE_KEY = 'table-locDetl'; |  |   |  | let tableData = ref([]); |  | let open = ref(false); |  | const orderDetlId = ref(null); |  |   |  | const showWidth = ref("60%") |  |   |  | const { |  |     getColumnSearchProps, |  | } = useTableSearch(); |  |   |  | const state = reactive({ |  |     selectedRowKeys: [], |  |     loading: false, |  |     columns: [], |  | }); |  |   |  | state.columns = [ |  |     { |  |         title: formatMessage('db.man_task.task_no', '任务编号'), |  |         dataIndex: 'taskNo', |  |         width: 140, |  |         ellipsis: true, |  |         ...getColumnSearchProps('taskNo'), |  |     }, |  |     { |  |         title: formatMessage('db.man_task.task_sts', '任务状态'), |  |         dataIndex: 'taskSts$', |  |         width: 140, |  |         ellipsis: true, |  |         ...getColumnSearchProps('taskSts$'), |  |     }, |  |     { |  |         title: formatMessage('db.man_task.task_type', '任务类型'), |  |         dataIndex: 'taskType$', |  |         width: 140, |  |         ellipsis: true, |  |         ...getColumnSearchProps('taskType$'), |  |     }, |  |     { |  |         title: formatMessage('db.man_task.io_pri', '优先级'), |  |         dataIndex: 'ioPri', |  |         width: 140, |  |         ellipsis: true, |  |         ...getColumnSearchProps('ioPri'), |  |     }, |  |     { |  |         title: formatMessage('db.man_task.origin_loc', '源库位'), |  |         dataIndex: 'originLoc', |  |         width: 140, |  |         ellipsis: true, |  |         ...getColumnSearchProps('originLoc'), |  |     }, |  |     { |  |         title: formatMessage('db.man_task.target_loc', '目标库位'), |  |         dataIndex: 'targetLoc', |  |         width: 140, |  |         ellipsis: true, |  |         ...getColumnSearchProps('targetLoc'), |  |     }, |  |     { |  |         title: formatMessage('db.man_task.origin_site', '源站点'), |  |         dataIndex: 'originSite', |  |         width: 140, |  |         ellipsis: true, |  |         ...getColumnSearchProps('originSite'), |  |     }, |  |     { |  |         title: formatMessage('db.man_task.target_site', '目标站点'), |  |         dataIndex: 'targetSite', |  |         width: 140, |  |         ellipsis: true, |  |         ...getColumnSearchProps('targetSite'), |  |     }, |  |     { |  |         title: formatMessage('db.man_task.barcode', '托盘码'), |  |         dataIndex: 'barcode', |  |         width: 140, |  |         ellipsis: true, |  |         ...getColumnSearchProps('barcode'), |  |     }, |  |     { |  |         title: formatMessage('db.man_task.status', '状态'), |  |         dataIndex: 'status$', |  |         width: 140, |  |         ellipsis: true, |  |         ...getColumnSearchProps('status$'), |  |     }, |  |     { |  |         title: formatMessage('db.man_task.create_time', '添加时间'), |  |         dataIndex: 'createTime$', |  |         width: 140, |  |         ellipsis: true, |  |         ...getColumnSearchProps('createTime$'), |  |     }, |  |     { |  |         title: formatMessage('db.man_task.create_by', '添加人员'), |  |         dataIndex: 'createBy$', |  |         width: 140, |  |         ellipsis: true, |  |         ...getColumnSearchProps('createBy$'), |  |     }, |  |     { |  |         title: formatMessage('db.man_task.update_time', '修改时间'), |  |         dataIndex: 'updateTime$', |  |         width: 140, |  |         ellipsis: true, |  |         ...getColumnSearchProps('updateTime$'), |  |     }, |  |     { |  |         title: formatMessage('db.man_task.update_by', '修改人员'), |  |         dataIndex: 'updateBy$', |  |         width: 140, |  |         ellipsis: true, |  |         ...getColumnSearchProps('updateBy$'), |  |     }, |  |     { |  |         title: formatMessage('db.man_task.memo', '备注'), |  |         dataIndex: 'memo', |  |         width: 140, |  |         ellipsis: true, |  |         ...getColumnSearchProps('memo'), |  |     }, |  | ]; |  |   |  | const handleOk = () => { |  |     open.value = false; |  | } |  |   |  | const handleCancel = () => { |  |     open.value = false; |  |     orderDetlId.value = null; |  | } |  |   |  | watch(orderDetlId, (newVal, oldVal) => { |  |     if (newVal != null) { |  |         get("/api/task/orderDetlId/" + newVal, {}).then((resp) => { |  |             let result = resp.data; |  |             tableData.value = result.data; |  |         }) |  |     } |  | }) |  |   |  | defineExpose({ |  |     tableData, |  |     orderDetlId, |  |     open, |  |     showWidth, |  | }) |  |   |  | </script> |  |   |  | <script> |  | export default { |  |     name: 'workTaskComponent' |  | } |  | </script> |  |   |  | <template> |  |     <div> |  |         <a-modal v-model:open="open" :width="showWidth" @ok="handleOk" @cancel="handleCancel"> |  |             <a-table :data-source="tableData" :defaultExpandAllRows="false" :key="TABLE_KEY" rowKey="id" |  |                 :scroll="{ y: 768 }" :columns="state.columns"> |  |             </a-table> |  |         </a-modal> |  |     </div> |  | </template> |  |   |  | <style></style> | 
 |