syntec3-0-ui-components-test 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/dist/S3_0UC_main.csv +4 -0
- package/dist/S3_0UC_sub.csv +2 -0
- package/dist/globalVariableS3_0UC.json +1 -0
- package/dist/style.css +1 -0
- package/dist/syntec3-0-ui-components.es.js +19518 -0
- package/dist/syntec3-0-ui-components.es.js.map +1 -0
- package/dist/syntec3-0-ui-components.umd.js +23 -0
- package/dist/syntec3-0-ui-components.umd.js.map +1 -0
- package/dist/vite.svg +1 -0
- package/dist/web.config +17 -0
- package/package.json +137 -0
- package/src/App.vue +31 -0
- package/src/assets/fonts/genYoGothicTW-normal.js +7 -0
- package/src/assets/image/defaultImage.png +0 -0
- package/src/assets/vue.svg +1 -0
- package/src/components/Layout/modules/fullPageGlobal.vue +113 -0
- package/src/components/Layout/modules/viewFile/config.js +65 -0
- package/src/components/Layout/modules/viewFile/createView.vue +1000 -0
- package/src/components/Layout/modules/viewFile/filterCriteria.vue +816 -0
- package/src/components/Layout/modules/viewFile/viewList.vue +291 -0
- package/src/components/Layout/modules/viewFile/viewManageTool.js +271 -0
- package/src/components/Layout/modules/viewFile/viewRecord.vue +472 -0
- package/src/components/Layout/modules/viewFile/viewTabs.vue +542 -0
- package/src/components/Layout/tools/GlobalDialog.vue +115 -0
- package/src/components/Pagination.vue +139 -0
- package/src/components/columnConfigNext.vue +273 -0
- package/src/components/customFilter/customFilter.vue +492 -0
- package/src/components/customFilter/filterCriteria.vue +769 -0
- package/src/components/customTable/components/headerOperation/index.vue +136 -0
- package/src/components/customTable/components/headerTabs/index.vue +171 -0
- package/src/components/customTable/components/tableContent/index.vue +440 -0
- package/src/components/customTable/index.vue +305 -0
- package/src/components/dialog.vue +85 -0
- package/src/components/pageContent.vue +48 -0
- package/src/components/popover.vue +402 -0
- package/src/configFiles/apiFile/baseApiList.json +11 -0
- package/src/configFiles/apiFile/coreApiList.json +24 -0
- package/src/configFiles/apiFile/mesApiList.json +4 -0
- package/src/configFiles/apiFile/mmsApiList.json +3 -0
- package/src/configFiles/errorCode.json +291 -0
- package/src/configFiles/version.js +2 -0
- package/src/i18n/lang/en-us.json +2060 -0
- package/src/i18n/lang/errorCodeTranslate.mjs +847 -0
- package/src/i18n/lang/zh-cn.json +2062 -0
- package/src/i18n/lang/zh-tw.json +2059 -0
- package/src/index.js +115 -0
- package/src/main.js +51 -0
- package/src/plugins/excel.js +88 -0
- package/src/router/index.js +41 -0
- package/src/scriptFiles/apiConfig/baseApis.js +10 -0
- package/src/scriptFiles/apiConfig/mesApis.js +10 -0
- package/src/scriptFiles/apiConfig/mmsApis.js +10 -0
- package/src/scriptFiles/apiConfig/privateCloudCoreApis.js +13 -0
- package/src/scriptFiles/apiConfig/serviceRoute.js +23 -0
- package/src/scriptFiles/apis/baseApiFunction.js +63 -0
- package/src/scriptFiles/apis/mesApiFunction.js +15 -0
- package/src/scriptFiles/apis/mmsApiFunction.js +9 -0
- package/src/scriptFiles/apis/privateCloudCoreApiFunction.js +101 -0
- package/src/scriptFiles/backendApiFunction.js +11 -0
- package/src/scriptFiles/checkApiErrorMechanism.js +137 -0
- package/src/scriptFiles/common/objectDataProcessing.js +65 -0
- package/src/scss/base/commom.scss +1068 -0
- package/src/scss/base/dialog.scss +45 -0
- package/src/scss/base/index.scss +3 -0
- package/src/scss/base/table.scss +28 -0
- package/src/store/index.js +25 -0
- package/src/store/module/langStore.js +116 -0
- package/src/style.css +52 -0
- package/src/utils/excel.js +86 -0
- package/src/utils/formula.js +69 -0
- package/src/utils/https.js +13 -0
- package/src/utils/i18n.js +42 -0
- package/src/utils/shiftSelect.js +164 -0
- package/src/utils/summation.js +77 -0
- package/src/utils/tableWidth.js +29 -0
- package/src/utils/toolFun.js +93 -0
- package/src/views/productionWorkOrder/components/columnConfig.vue +242 -0
- package/src/views/productionWorkOrder/components/docCustomFieldForm.vue +739 -0
- package/src/views/productionWorkOrder/components/filePreview.vue +148 -0
- package/src/views/productionWorkOrder/components/querySearch.vue +363 -0
- package/src/views/productionWorkOrder/configFiles/excelImportErrorCode.json +94 -0
- package/src/views/productionWorkOrder/configFiles/pdfDefaultConfig.js +933 -0
- package/src/views/productionWorkOrder/configFiles/planMakingScript.js +600 -0
- package/src/views/productionWorkOrder/configFiles/productionRelatedScript.js +368 -0
- package/src/views/productionWorkOrder/configFiles/rulse.js +23 -0
- package/src/views/productionWorkOrder/configFiles/status.js +50 -0
- package/src/views/productionWorkOrder/index.vue +2174 -0
- package/src/views/productionWorkOrder/productionFlowLabel/component/addCirculationLabel.vue +394 -0
- package/src/views/productionWorkOrder/productionFlowLabel/component/circulationLabelTable.vue +124 -0
- package/src/views/productionWorkOrder/productionFlowLabel/component/materialPartFilePreview.vue +167 -0
- package/src/views/productionWorkOrder/productionFlowLabel/component/workOrderInformation.vue +28 -0
- package/src/views/productionWorkOrder/productionFlowLabel/index.vue +604 -0
- package/src/views/production_work_order/components/priorityTooltip.vue +53 -0
- package/src/views/production_work_order/index.vue +1307 -0
- package/src/views/review_record/components/materialInfo.vue +50 -0
- package/src/views/review_record/components/rootCause.vue +42 -0
- package/src/views/review_record/components/workDetail.vue +115 -0
- package/src/views/review_record/index.vue +884 -0
|
@@ -0,0 +1,600 @@
|
|
|
1
|
+
import i18n from '@/utils/i18n';
|
|
2
|
+
import apiFunction from '@/scriptFiles/checkApiErrorMechanism.js';
|
|
3
|
+
import errorCode from '@/configFiles/errorCode.json';
|
|
4
|
+
import orderStatus from '@/configFiles/variableConfig/status';
|
|
5
|
+
import digitalRelated from '@/scriptFiles/common/digitalRelated';
|
|
6
|
+
import equipRelated from '@/configFiles/variableConfig/equipRelated';
|
|
7
|
+
import { orderType } from '@/configFiles/variableConfig/productionRelated';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* 請求 所有工單的物料資訊
|
|
11
|
+
* @param {Array} materialPartNumberList - 要查詢的產品料號陣列
|
|
12
|
+
* @returns {Promise<Array>}
|
|
13
|
+
*/
|
|
14
|
+
async function queryProductionMmsFields(materialPartNumberList) {
|
|
15
|
+
const res = await apiFunction.getMMSProductNumberList({
|
|
16
|
+
preciseSearchCondition: {
|
|
17
|
+
materialPartNumberList: [...new Set(materialPartNumberList)],
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
if (res.data.code !== errorCode.Success) {
|
|
22
|
+
throw new Error(res.data.message);
|
|
23
|
+
}
|
|
24
|
+
return res.data.content.data;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* 請求 取得物料類型
|
|
29
|
+
* @param {int} queryCount - 頁數
|
|
30
|
+
* @param {int} maxQueryCount -每頁筆數
|
|
31
|
+
* @returns {Promise<Object>}
|
|
32
|
+
*/
|
|
33
|
+
async function getMaterialType(queryCount = 0, maxQueryCount = 200) {
|
|
34
|
+
const materialTypeObj = {};
|
|
35
|
+
const postBody = {
|
|
36
|
+
startIndex: queryCount * maxQueryCount,
|
|
37
|
+
count: maxQueryCount,
|
|
38
|
+
};
|
|
39
|
+
const res = await apiFunction.getMaterialType(postBody);
|
|
40
|
+
if (res.data.code === errorCode.Success) {
|
|
41
|
+
res.data.content.data.forEach((type) => {
|
|
42
|
+
materialTypeObj[type.materialTypeID] = type;
|
|
43
|
+
});
|
|
44
|
+
if (res.data.content.totalCount > (queryCount + 1) * maxQueryCount) {
|
|
45
|
+
return { ...materialTypeObj, ...await getMaterialType(queryCount + 1, maxQueryCount) };
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return materialTypeObj;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export default {
|
|
52
|
+
// 取得工序列表1-30
|
|
53
|
+
processCodeList() {
|
|
54
|
+
const codeList = [];
|
|
55
|
+
for (let ind = 1; ind <= 30; ind += 1) {
|
|
56
|
+
codeList.push(ind.toString());
|
|
57
|
+
}
|
|
58
|
+
return codeList;
|
|
59
|
+
},
|
|
60
|
+
|
|
61
|
+
async getMachineList(group, machine) {
|
|
62
|
+
return apiFunction.getAllEquipment({
|
|
63
|
+
groupID: group,
|
|
64
|
+
equipmentName: machine,
|
|
65
|
+
equipmentType: [
|
|
66
|
+
equipRelated.equipmentType.connectableCNC,
|
|
67
|
+
equipRelated.equipmentType.connectableOther,
|
|
68
|
+
equipRelated.equipmentType.unConnectableEquip,
|
|
69
|
+
],
|
|
70
|
+
startIndex: 0,
|
|
71
|
+
count: 200,
|
|
72
|
+
})
|
|
73
|
+
.then((res) => {
|
|
74
|
+
switch (res.data.code) {
|
|
75
|
+
case errorCode.Success: {
|
|
76
|
+
return res.data.content.data;
|
|
77
|
+
}
|
|
78
|
+
default: {
|
|
79
|
+
return null;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
},
|
|
84
|
+
|
|
85
|
+
async getProcessOrderProgress(processOrderIDList) {
|
|
86
|
+
return apiFunction.getProcessOrderProgress({
|
|
87
|
+
processOrderIDList,
|
|
88
|
+
}).then(async (res) => {
|
|
89
|
+
switch (res.data.code) {
|
|
90
|
+
case errorCode.Success: {
|
|
91
|
+
return res.data.content;
|
|
92
|
+
}
|
|
93
|
+
default: {
|
|
94
|
+
return null;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
},
|
|
99
|
+
|
|
100
|
+
async getWorkerOrderProgress(workOrderIDList) {
|
|
101
|
+
return apiFunction.getWorkOrderProgress({
|
|
102
|
+
workOrderIDList,
|
|
103
|
+
}).then(async (res) => {
|
|
104
|
+
switch (res.data.code) {
|
|
105
|
+
case errorCode.Success: {
|
|
106
|
+
return res.data.content;
|
|
107
|
+
}
|
|
108
|
+
default: {
|
|
109
|
+
return null;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
},
|
|
114
|
+
|
|
115
|
+
async getWorkOrderActualThroughput(workOrderIDList) {
|
|
116
|
+
return apiFunction.getWorkOrderActualThroughput({
|
|
117
|
+
workOrderIDList,
|
|
118
|
+
}).then(async (res) => {
|
|
119
|
+
switch (res.data.code) {
|
|
120
|
+
case errorCode.Success: {
|
|
121
|
+
return res.data.content;
|
|
122
|
+
}
|
|
123
|
+
default: {
|
|
124
|
+
return null;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
},
|
|
129
|
+
|
|
130
|
+
async processIdGetWorkOrderIdList(processOrderIDList) {
|
|
131
|
+
return apiFunction.processOrderIDGetWorkOrder({ processOrderIDList })
|
|
132
|
+
.then(async (res) => {
|
|
133
|
+
switch (res.data.code) {
|
|
134
|
+
case errorCode.Success: {
|
|
135
|
+
const workOrderIdList = [];
|
|
136
|
+
const allProcessOrder = res.data.content.processOrderInfo;
|
|
137
|
+
allProcessOrder.forEach((process) => {
|
|
138
|
+
process.workOrderInfo.forEach((workOrder) => {
|
|
139
|
+
workOrderIdList.push(workOrder.workOrderID);
|
|
140
|
+
});
|
|
141
|
+
});
|
|
142
|
+
return workOrderIdList;
|
|
143
|
+
}
|
|
144
|
+
default: {
|
|
145
|
+
return [];
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
},
|
|
150
|
+
|
|
151
|
+
// 需求工件數規則
|
|
152
|
+
requiredThroughputRule() {
|
|
153
|
+
return [
|
|
154
|
+
(v) => v > 0 || i18n.t('valueNotBeNegativeAndZero'),
|
|
155
|
+
(v) => digitalRelated.isFloat(parseFloat(v)) === false || i18n.t('valueNotBeFloat'),
|
|
156
|
+
];
|
|
157
|
+
},
|
|
158
|
+
|
|
159
|
+
// 調機時間規則
|
|
160
|
+
tuningTimeRule() {
|
|
161
|
+
return [
|
|
162
|
+
(v) => /^([0-9]+):[0-5][0-9]$/.test(v) || i18n.t('inputHourAndMinute'),
|
|
163
|
+
];
|
|
164
|
+
},
|
|
165
|
+
|
|
166
|
+
// 工序工單狀態chip背景色
|
|
167
|
+
processOrderStatusColor(status) {
|
|
168
|
+
switch (status) {
|
|
169
|
+
case orderStatus.processOrderStatus.workEnd: {
|
|
170
|
+
return '#E0F2F1';
|
|
171
|
+
}
|
|
172
|
+
case orderStatus.processOrderStatus.workStart: {
|
|
173
|
+
return 'amber lighten-5';
|
|
174
|
+
}
|
|
175
|
+
case orderStatus.processOrderStatus.noStart: {
|
|
176
|
+
return '#E3F2FD';
|
|
177
|
+
}
|
|
178
|
+
case orderStatus.processOrderStatus.closed: {
|
|
179
|
+
return '#EFEBE9';
|
|
180
|
+
}
|
|
181
|
+
case orderStatus.processOrderStatus.overdueEnd: {
|
|
182
|
+
return '#F3E5F5';
|
|
183
|
+
}
|
|
184
|
+
case orderStatus.processOrderStatus.overdueStart: {
|
|
185
|
+
return '#FFEBEE';
|
|
186
|
+
}
|
|
187
|
+
default: {
|
|
188
|
+
return '#EEEEEE';
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
|
|
193
|
+
// 工單狀態chip背景色
|
|
194
|
+
productionOrderStatusColor(status) {
|
|
195
|
+
switch (status) {
|
|
196
|
+
case orderStatus.productionOrderStatus.workEnd: {
|
|
197
|
+
return '#E0F2F1';
|
|
198
|
+
}
|
|
199
|
+
case orderStatus.productionOrderStatus.executing: {
|
|
200
|
+
return 'amber lighten-5';
|
|
201
|
+
}
|
|
202
|
+
case orderStatus.productionOrderStatus.noStart: {
|
|
203
|
+
return '#E3F2FD';
|
|
204
|
+
}
|
|
205
|
+
default: {
|
|
206
|
+
return '#EEEEEE';
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
|
|
211
|
+
// 工序狀態chip文字色
|
|
212
|
+
processOrderStatusTextColor(status) {
|
|
213
|
+
switch (status) {
|
|
214
|
+
case orderStatus.processOrderStatus.workEnd: {
|
|
215
|
+
return '#009688'; // teal
|
|
216
|
+
}
|
|
217
|
+
case orderStatus.processOrderStatus.workStart: {
|
|
218
|
+
return '#FFA000'; // amber darken-2
|
|
219
|
+
}
|
|
220
|
+
case orderStatus.processOrderStatus.noStart: {
|
|
221
|
+
return '#1E88E5'; // blue darken-1
|
|
222
|
+
}
|
|
223
|
+
case orderStatus.processOrderStatus.closed: {
|
|
224
|
+
return '#A1887F'; // brown lighten-2
|
|
225
|
+
}
|
|
226
|
+
case orderStatus.processOrderStatus.overdueEnd: {
|
|
227
|
+
return '#7B1FA2'; // purple darken-2
|
|
228
|
+
}
|
|
229
|
+
case orderStatus.processOrderStatus.overdueStart: {
|
|
230
|
+
return '#EF5350'; // #EF5350
|
|
231
|
+
}
|
|
232
|
+
default: {
|
|
233
|
+
return '#BDBDBD'; // grey
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
|
|
238
|
+
// 工單狀態chip文字色
|
|
239
|
+
productionOrderStatusTextColor(status) {
|
|
240
|
+
switch (status) {
|
|
241
|
+
case orderStatus.productionOrderStatus.workEnd: {
|
|
242
|
+
return '#009688'; // teal
|
|
243
|
+
}
|
|
244
|
+
case orderStatus.productionOrderStatus.executing: {
|
|
245
|
+
return '#FFA000'; // amber darken-2
|
|
246
|
+
}
|
|
247
|
+
case orderStatus.productionOrderStatus.noStart: {
|
|
248
|
+
return '#1E88E5'; // blue darken-1
|
|
249
|
+
}
|
|
250
|
+
default: {
|
|
251
|
+
return '#BDBDBD'; // grey
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
|
|
256
|
+
// 工位工單狀態chip背景色
|
|
257
|
+
orderStatusColor(status) {
|
|
258
|
+
switch (status) {
|
|
259
|
+
case orderStatus.workOrderStatus.workEnd: {
|
|
260
|
+
return '#E0F2F1';
|
|
261
|
+
}
|
|
262
|
+
case orderStatus.workOrderStatus.suspendProcess: {
|
|
263
|
+
return 'yellow lighten-5';
|
|
264
|
+
}
|
|
265
|
+
case orderStatus.workOrderStatus.workStart: {
|
|
266
|
+
return 'amber lighten-5';
|
|
267
|
+
}
|
|
268
|
+
case orderStatus.workOrderStatus.noStart: {
|
|
269
|
+
return '#E3F2FD';
|
|
270
|
+
}
|
|
271
|
+
case orderStatus.workOrderStatus.closed: {
|
|
272
|
+
return '#EFEBE9';
|
|
273
|
+
}
|
|
274
|
+
case orderStatus.workOrderStatus.overdueEnd: {
|
|
275
|
+
return '#F3E5F5';
|
|
276
|
+
}
|
|
277
|
+
case orderStatus.workOrderStatus.overdueStart: {
|
|
278
|
+
return '#FFEBEE';
|
|
279
|
+
}
|
|
280
|
+
case orderStatus.workOrderStatus.adjustMachine: {
|
|
281
|
+
return 'lime lighten-4';
|
|
282
|
+
}
|
|
283
|
+
case orderStatus.workOrderStatus.statusError: {
|
|
284
|
+
return 'red lighten-4';
|
|
285
|
+
}
|
|
286
|
+
default: {
|
|
287
|
+
return '#EEEEEE';
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
},
|
|
291
|
+
|
|
292
|
+
// 工單狀態chip文字色
|
|
293
|
+
orderStatusTextColor(status) {
|
|
294
|
+
switch (status) {
|
|
295
|
+
case orderStatus.workOrderStatus.workEnd: {
|
|
296
|
+
return '#009688'; // teal
|
|
297
|
+
}
|
|
298
|
+
case orderStatus.workOrderStatus.suspendProcess: {
|
|
299
|
+
return '#FDD835'; // yellow darken-1
|
|
300
|
+
}
|
|
301
|
+
case orderStatus.workOrderStatus.workStart: {
|
|
302
|
+
return '#FFA000'; // amber darken-2
|
|
303
|
+
}
|
|
304
|
+
case orderStatus.workOrderStatus.noStart: {
|
|
305
|
+
return '#1E88E5'; // blue darken-1
|
|
306
|
+
}
|
|
307
|
+
case orderStatus.workOrderStatus.closed: {
|
|
308
|
+
return '#A1887F'; // brown lighten-2
|
|
309
|
+
}
|
|
310
|
+
case orderStatus.workOrderStatus.overdueEnd: {
|
|
311
|
+
return '#7B1FA2'; // purple darken-2
|
|
312
|
+
}
|
|
313
|
+
case orderStatus.workOrderStatus.overdueStart: {
|
|
314
|
+
return '#EF5350'; // #EF5350
|
|
315
|
+
}
|
|
316
|
+
case orderStatus.workOrderStatus.adjustMachine: {
|
|
317
|
+
return '#AFB42B'; // lime darken-2
|
|
318
|
+
}
|
|
319
|
+
case orderStatus.workOrderStatus.statusError: {
|
|
320
|
+
return '#C62828'; // red darken-3
|
|
321
|
+
}
|
|
322
|
+
default: {
|
|
323
|
+
return '#BDBDBD'; // grey
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
},
|
|
327
|
+
|
|
328
|
+
// 重要排序icon
|
|
329
|
+
priorityIcon(status) {
|
|
330
|
+
switch (status) {
|
|
331
|
+
case orderStatus.priorityStatus.topPriority: {
|
|
332
|
+
return 'mdi-star-circle';
|
|
333
|
+
}
|
|
334
|
+
case orderStatus.priorityStatus.priority: {
|
|
335
|
+
return 'mdi-chevron-double-up';
|
|
336
|
+
}
|
|
337
|
+
case orderStatus.priorityStatus.normal: {
|
|
338
|
+
return 'mdi-equal';
|
|
339
|
+
}
|
|
340
|
+
case orderStatus.priorityStatus.secondary: {
|
|
341
|
+
return 'mdi-chevron-double-down';
|
|
342
|
+
}
|
|
343
|
+
default: {
|
|
344
|
+
return 'mdi-chevron-triple-down';
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
},
|
|
348
|
+
|
|
349
|
+
// 重要排序Color
|
|
350
|
+
priorityColor(status) {
|
|
351
|
+
switch (status) {
|
|
352
|
+
case orderStatus.priorityStatus.topPriority: {
|
|
353
|
+
return 'red';
|
|
354
|
+
}
|
|
355
|
+
case orderStatus.priorityStatus.priority: {
|
|
356
|
+
return 'orange';
|
|
357
|
+
}
|
|
358
|
+
case orderStatus.priorityStatus.normal: {
|
|
359
|
+
return 'green';
|
|
360
|
+
}
|
|
361
|
+
case orderStatus.priorityStatus.secondary: {
|
|
362
|
+
return 'primary';
|
|
363
|
+
}
|
|
364
|
+
default: {
|
|
365
|
+
return 'grey';
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
},
|
|
369
|
+
|
|
370
|
+
// 新代工單匯入模板Header
|
|
371
|
+
excelImportHeader() {
|
|
372
|
+
return [
|
|
373
|
+
{
|
|
374
|
+
text: `${i18n.t('orderNumber')}*`, value: 'orderNumber', width: '130', align: 'center', orderTypeID: orderType.order,
|
|
375
|
+
},
|
|
376
|
+
{
|
|
377
|
+
text: i18n.t('customerName'), value: 'customerName', width: '80', align: 'center', orderTypeID: orderType.order,
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
text: i18n.t('orderExpectedDue'), value: 'orderExpectedDue', width: '110', align: 'center', orderTypeID: orderType.order,
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
text: `${i18n.t('productionOrderNumber')}*`, value: 'productionOrderNumber', width: '110', align: 'center', orderTypeID: orderType.order,
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
text: `${i18n.t('partNumber')}*`, value: 'partNumber', width: '100', align: 'center', orderTypeID: orderType.order,
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
text: `${i18n.t('partCountRequired')}*(${i18n.t('order')})`, value: 'productionOrderRequiredThroughput', width: '80', align: 'center', orderTypeID: orderType.order,
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
text: `${i18n.t('startDate')}(${i18n.t('order')})`, value: 'productionOrderExpectedStartDate', width: '130', align: 'center', orderTypeID: orderType.order,
|
|
393
|
+
},
|
|
394
|
+
{
|
|
395
|
+
text: `${i18n.t('expectedDueDate')}(${i18n.t('order')})`, value: 'productionOrderExpectedDueDate', width: '130', align: 'center', orderTypeID: orderType.order,
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
text: `${i18n.t('craftPath')}*`, value: 'productRouteName', width: '150', align: 'center', orderTypeID: orderType.order,
|
|
399
|
+
},
|
|
400
|
+
{
|
|
401
|
+
text: `${i18n.t('importantOrder')}*(${i18n.t('order')})`, value: 'productionOrderPriority', width: '80', align: 'center', sortable: false, orderTypeID: orderType.order,
|
|
402
|
+
},
|
|
403
|
+
{
|
|
404
|
+
text: `${i18n.t('productionProcess')}*`, value: 'productionProcess', width: '60', align: 'center', orderTypeID: orderType.process,
|
|
405
|
+
},
|
|
406
|
+
{
|
|
407
|
+
text: `${i18n.t('partCountRequired')}*(${i18n.t('processOrder')})`, value: 'processOrderRequiredThroughput', width: '80', align: 'center', sortable: false, orderTypeID: orderType.process,
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
text: `${i18n.t('startDate')}(${i18n.t('processOrder')})`, value: 'processOrderExpectedStartDate', width: '120', align: 'center', orderTypeID: orderType.process,
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
text: `${i18n.t('expectedDueDate')}(${i18n.t('processOrder')})`, value: 'processOrderExpectedDueDate', width: '120', align: 'center', orderTypeID: orderType.process,
|
|
414
|
+
},
|
|
415
|
+
{
|
|
416
|
+
text: `${i18n.t('importantOrder')}*(${i18n.t('processOrder')})`, value: 'processOrderPriority', width: '80', align: 'center', sortable: false, orderTypeID: orderType.process,
|
|
417
|
+
},
|
|
418
|
+
{
|
|
419
|
+
text: i18n.t('groupName'), value: 'equipGroupName', width: '90', align: 'center', orderTypeID: orderType.work,
|
|
420
|
+
},
|
|
421
|
+
{
|
|
422
|
+
text: i18n.t('deviceName'), value: 'equipName', width: '90', align: 'center', orderTypeID: orderType.work,
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
text: i18n.t('shift'), value: 'shiftName', width: '80', align: 'center', sortable: false, orderTypeID: orderType.work,
|
|
426
|
+
},
|
|
427
|
+
{
|
|
428
|
+
text: i18n.t('empNumber'), value: 'empNumber', width: '80', align: 'center', sortable: false, orderTypeID: orderType.work,
|
|
429
|
+
},
|
|
430
|
+
{
|
|
431
|
+
text: `${i18n.t('partCountRequired')}*(${i18n.t('workOrder')})`, value: 'requiredThroughput', width: '80', align: 'center', sortable: false, orderTypeID: orderType.work,
|
|
432
|
+
},
|
|
433
|
+
{
|
|
434
|
+
text: `${i18n.t('startDate')}(${i18n.t('workOrder')})`, value: 'expectedStartDate', width: '120', align: 'center', orderTypeID: orderType.work,
|
|
435
|
+
},
|
|
436
|
+
{
|
|
437
|
+
text: `${i18n.t('expectedDueDate')}(${i18n.t('workOrder')})`, value: 'expectedDueDate', width: '120', align: 'center', orderTypeID: orderType.work,
|
|
438
|
+
},
|
|
439
|
+
];
|
|
440
|
+
},
|
|
441
|
+
|
|
442
|
+
// 新代工單匯出模板Header
|
|
443
|
+
excelExportHeader() {
|
|
444
|
+
return [
|
|
445
|
+
{
|
|
446
|
+
text: `${i18n.t('orderNumber')}*`, value: 'orderNumber',
|
|
447
|
+
},
|
|
448
|
+
{
|
|
449
|
+
text: i18n.t('customerName'), value: 'customerName',
|
|
450
|
+
},
|
|
451
|
+
{
|
|
452
|
+
text: i18n.t('orderExpectedDue'), value: 'orderExpectedDue',
|
|
453
|
+
},
|
|
454
|
+
{
|
|
455
|
+
text: `${i18n.t('productionOrderNumber')}*`, value: 'productionOrderNumber',
|
|
456
|
+
},
|
|
457
|
+
{
|
|
458
|
+
text: `${i18n.t('partNumber')}*`, value: 'partNumber',
|
|
459
|
+
},
|
|
460
|
+
{
|
|
461
|
+
text: `${i18n.t('partCountRequired')}*(${i18n.t('order')})`, value: 'productionOrderRequiredThroughput',
|
|
462
|
+
},
|
|
463
|
+
{
|
|
464
|
+
text: `${i18n.t('startDate')}(${i18n.t('order')})`, value: 'productionOrderExpectedStartDate',
|
|
465
|
+
},
|
|
466
|
+
{
|
|
467
|
+
text: `${i18n.t('expectedDueDate')}(${i18n.t('order')})`, value: 'productionOrderExpectedDueDate',
|
|
468
|
+
},
|
|
469
|
+
{
|
|
470
|
+
text: `${i18n.t('craftPath')}*`, value: 'craftPath',
|
|
471
|
+
},
|
|
472
|
+
{
|
|
473
|
+
text: `${i18n.t('importantOrder')}*(${i18n.t('order')})`, value: 'productionOrderPriority',
|
|
474
|
+
},
|
|
475
|
+
{
|
|
476
|
+
text: `${i18n.t('productionProcess')}*`, value: 'productionProcess',
|
|
477
|
+
},
|
|
478
|
+
{
|
|
479
|
+
text: `${i18n.t('processName')}*`, value: 'productionProcessName',
|
|
480
|
+
},
|
|
481
|
+
{
|
|
482
|
+
text: `${i18n.t('processNumber')}*`, value: 'productionProcessNumber',
|
|
483
|
+
},
|
|
484
|
+
{
|
|
485
|
+
text: `${i18n.t('groupName')}*`, value: 'equipGroupName',
|
|
486
|
+
},
|
|
487
|
+
{
|
|
488
|
+
text: `${i18n.t('deviceName')}`, value: 'equipName',
|
|
489
|
+
},
|
|
490
|
+
{
|
|
491
|
+
text: `${i18n.t('partCountRequired')}*(${i18n.t('subOrder')})`, value: 'requiredThroughput',
|
|
492
|
+
},
|
|
493
|
+
{
|
|
494
|
+
text: `${i18n.t('startDate')}(${i18n.t('subOrder')})`, value: 'expectedStartDate',
|
|
495
|
+
},
|
|
496
|
+
{
|
|
497
|
+
text: `${i18n.t('expectedDueDate')}(${i18n.t('subOrder')})`, value: 'expectedDueDate',
|
|
498
|
+
},
|
|
499
|
+
{
|
|
500
|
+
text: i18n.t('standardTime'), value: 'standardProductionTime',
|
|
501
|
+
},
|
|
502
|
+
{
|
|
503
|
+
text: i18n.t('singlePieceCycle'), value: 'singlePieceCycle',
|
|
504
|
+
},
|
|
505
|
+
{
|
|
506
|
+
text: i18n.t('standardTotalTime'), value: 'standardTotalTime',
|
|
507
|
+
},
|
|
508
|
+
{
|
|
509
|
+
text: i18n.t('expectedTuningTime'), value: 'tuningTime',
|
|
510
|
+
},
|
|
511
|
+
{
|
|
512
|
+
text: i18n.t('shift'), value: 'shiftName',
|
|
513
|
+
},
|
|
514
|
+
{
|
|
515
|
+
text: i18n.t('empNumber'), value: 'empNumber',
|
|
516
|
+
},
|
|
517
|
+
{
|
|
518
|
+
text: `${i18n.t('importantOrder')}*(${i18n.t('subOrder')})`, value: 'priority',
|
|
519
|
+
},
|
|
520
|
+
];
|
|
521
|
+
},
|
|
522
|
+
|
|
523
|
+
// 重要排序列表
|
|
524
|
+
priorityList() {
|
|
525
|
+
const priorityArray = [];
|
|
526
|
+
const tempList = Object.entries(orderStatus.priorityStatus);
|
|
527
|
+
for (let i = 0; i < tempList.length; i += 1) {
|
|
528
|
+
priorityArray.push({ text: i18n.t(tempList[i][0]), value: tempList[i][1] });
|
|
529
|
+
}
|
|
530
|
+
return priorityArray;
|
|
531
|
+
},
|
|
532
|
+
|
|
533
|
+
// 翻譯包對應後端的key
|
|
534
|
+
mapColumnKey(columnKey, translationKey) {
|
|
535
|
+
return translationKey[columnKey] ?? columnKey;
|
|
536
|
+
},
|
|
537
|
+
|
|
538
|
+
// 欄配置初始化
|
|
539
|
+
defaultHandling(standardColumn) {
|
|
540
|
+
const combinedColumns = [];
|
|
541
|
+
standardColumn.forEach((item) => {
|
|
542
|
+
if (item.order !== null) {
|
|
543
|
+
combinedColumns.push({ ...item });
|
|
544
|
+
}
|
|
545
|
+
});
|
|
546
|
+
|
|
547
|
+
// customColumn.forEach((item) => {
|
|
548
|
+
// const tempColumn = {
|
|
549
|
+
// order: combinedColumns.length + 1,
|
|
550
|
+
// customFieldID: item.customFieldID,
|
|
551
|
+
// isCustom: true,
|
|
552
|
+
// hideable: true,
|
|
553
|
+
// };
|
|
554
|
+
// combinedColumns.push(tempColumn);
|
|
555
|
+
// });
|
|
556
|
+
|
|
557
|
+
standardColumn.forEach((item) => {
|
|
558
|
+
if (item.order === null) {
|
|
559
|
+
combinedColumns.push({ ...item });
|
|
560
|
+
}
|
|
561
|
+
});
|
|
562
|
+
|
|
563
|
+
combinedColumns.sort((a, b) => (
|
|
564
|
+
a.order || Number.POSITIVE_INFINITY) - (b.order || Number.POSITIVE_INFINITY));
|
|
565
|
+
return combinedColumns;
|
|
566
|
+
},
|
|
567
|
+
|
|
568
|
+
// 欄配置初始化,自訂義欄位不在標準欄位
|
|
569
|
+
defaultHandlingCustomNotInStandard(standardColumn) {
|
|
570
|
+
const combinedColumns = [];
|
|
571
|
+
standardColumn.forEach((item) => {
|
|
572
|
+
if (item.order !== null) {
|
|
573
|
+
combinedColumns.push({ ...item });
|
|
574
|
+
}
|
|
575
|
+
});
|
|
576
|
+
|
|
577
|
+
standardColumn.forEach((item) => {
|
|
578
|
+
if (item.order === null) {
|
|
579
|
+
combinedColumns.push({ ...item });
|
|
580
|
+
}
|
|
581
|
+
});
|
|
582
|
+
|
|
583
|
+
// customColumn.forEach((item) => {
|
|
584
|
+
// const tempColumn = {
|
|
585
|
+
// order: null,
|
|
586
|
+
// customFieldID: item.customFieldID,
|
|
587
|
+
// isCustom: true,
|
|
588
|
+
// hideable: true,
|
|
589
|
+
// };
|
|
590
|
+
// combinedColumns.push(tempColumn);
|
|
591
|
+
// });
|
|
592
|
+
|
|
593
|
+
combinedColumns.sort((a, b) => (
|
|
594
|
+
a.order || Number.POSITIVE_INFINITY) - (b.order || Number.POSITIVE_INFINITY));
|
|
595
|
+
return combinedColumns;
|
|
596
|
+
},
|
|
597
|
+
|
|
598
|
+
queryProductionMmsFields,
|
|
599
|
+
getMaterialType,
|
|
600
|
+
};
|