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.
Files changed (99) hide show
  1. package/README.md +5 -0
  2. package/dist/S3_0UC_main.csv +4 -0
  3. package/dist/S3_0UC_sub.csv +2 -0
  4. package/dist/globalVariableS3_0UC.json +1 -0
  5. package/dist/style.css +1 -0
  6. package/dist/syntec3-0-ui-components.es.js +19518 -0
  7. package/dist/syntec3-0-ui-components.es.js.map +1 -0
  8. package/dist/syntec3-0-ui-components.umd.js +23 -0
  9. package/dist/syntec3-0-ui-components.umd.js.map +1 -0
  10. package/dist/vite.svg +1 -0
  11. package/dist/web.config +17 -0
  12. package/package.json +137 -0
  13. package/src/App.vue +31 -0
  14. package/src/assets/fonts/genYoGothicTW-normal.js +7 -0
  15. package/src/assets/image/defaultImage.png +0 -0
  16. package/src/assets/vue.svg +1 -0
  17. package/src/components/Layout/modules/fullPageGlobal.vue +113 -0
  18. package/src/components/Layout/modules/viewFile/config.js +65 -0
  19. package/src/components/Layout/modules/viewFile/createView.vue +1000 -0
  20. package/src/components/Layout/modules/viewFile/filterCriteria.vue +816 -0
  21. package/src/components/Layout/modules/viewFile/viewList.vue +291 -0
  22. package/src/components/Layout/modules/viewFile/viewManageTool.js +271 -0
  23. package/src/components/Layout/modules/viewFile/viewRecord.vue +472 -0
  24. package/src/components/Layout/modules/viewFile/viewTabs.vue +542 -0
  25. package/src/components/Layout/tools/GlobalDialog.vue +115 -0
  26. package/src/components/Pagination.vue +139 -0
  27. package/src/components/columnConfigNext.vue +273 -0
  28. package/src/components/customFilter/customFilter.vue +492 -0
  29. package/src/components/customFilter/filterCriteria.vue +769 -0
  30. package/src/components/customTable/components/headerOperation/index.vue +136 -0
  31. package/src/components/customTable/components/headerTabs/index.vue +171 -0
  32. package/src/components/customTable/components/tableContent/index.vue +440 -0
  33. package/src/components/customTable/index.vue +305 -0
  34. package/src/components/dialog.vue +85 -0
  35. package/src/components/pageContent.vue +48 -0
  36. package/src/components/popover.vue +402 -0
  37. package/src/configFiles/apiFile/baseApiList.json +11 -0
  38. package/src/configFiles/apiFile/coreApiList.json +24 -0
  39. package/src/configFiles/apiFile/mesApiList.json +4 -0
  40. package/src/configFiles/apiFile/mmsApiList.json +3 -0
  41. package/src/configFiles/errorCode.json +291 -0
  42. package/src/configFiles/version.js +2 -0
  43. package/src/i18n/lang/en-us.json +2060 -0
  44. package/src/i18n/lang/errorCodeTranslate.mjs +847 -0
  45. package/src/i18n/lang/zh-cn.json +2062 -0
  46. package/src/i18n/lang/zh-tw.json +2059 -0
  47. package/src/index.js +115 -0
  48. package/src/main.js +51 -0
  49. package/src/plugins/excel.js +88 -0
  50. package/src/router/index.js +41 -0
  51. package/src/scriptFiles/apiConfig/baseApis.js +10 -0
  52. package/src/scriptFiles/apiConfig/mesApis.js +10 -0
  53. package/src/scriptFiles/apiConfig/mmsApis.js +10 -0
  54. package/src/scriptFiles/apiConfig/privateCloudCoreApis.js +13 -0
  55. package/src/scriptFiles/apiConfig/serviceRoute.js +23 -0
  56. package/src/scriptFiles/apis/baseApiFunction.js +63 -0
  57. package/src/scriptFiles/apis/mesApiFunction.js +15 -0
  58. package/src/scriptFiles/apis/mmsApiFunction.js +9 -0
  59. package/src/scriptFiles/apis/privateCloudCoreApiFunction.js +101 -0
  60. package/src/scriptFiles/backendApiFunction.js +11 -0
  61. package/src/scriptFiles/checkApiErrorMechanism.js +137 -0
  62. package/src/scriptFiles/common/objectDataProcessing.js +65 -0
  63. package/src/scss/base/commom.scss +1068 -0
  64. package/src/scss/base/dialog.scss +45 -0
  65. package/src/scss/base/index.scss +3 -0
  66. package/src/scss/base/table.scss +28 -0
  67. package/src/store/index.js +25 -0
  68. package/src/store/module/langStore.js +116 -0
  69. package/src/style.css +52 -0
  70. package/src/utils/excel.js +86 -0
  71. package/src/utils/formula.js +69 -0
  72. package/src/utils/https.js +13 -0
  73. package/src/utils/i18n.js +42 -0
  74. package/src/utils/shiftSelect.js +164 -0
  75. package/src/utils/summation.js +77 -0
  76. package/src/utils/tableWidth.js +29 -0
  77. package/src/utils/toolFun.js +93 -0
  78. package/src/views/productionWorkOrder/components/columnConfig.vue +242 -0
  79. package/src/views/productionWorkOrder/components/docCustomFieldForm.vue +739 -0
  80. package/src/views/productionWorkOrder/components/filePreview.vue +148 -0
  81. package/src/views/productionWorkOrder/components/querySearch.vue +363 -0
  82. package/src/views/productionWorkOrder/configFiles/excelImportErrorCode.json +94 -0
  83. package/src/views/productionWorkOrder/configFiles/pdfDefaultConfig.js +933 -0
  84. package/src/views/productionWorkOrder/configFiles/planMakingScript.js +600 -0
  85. package/src/views/productionWorkOrder/configFiles/productionRelatedScript.js +368 -0
  86. package/src/views/productionWorkOrder/configFiles/rulse.js +23 -0
  87. package/src/views/productionWorkOrder/configFiles/status.js +50 -0
  88. package/src/views/productionWorkOrder/index.vue +2174 -0
  89. package/src/views/productionWorkOrder/productionFlowLabel/component/addCirculationLabel.vue +394 -0
  90. package/src/views/productionWorkOrder/productionFlowLabel/component/circulationLabelTable.vue +124 -0
  91. package/src/views/productionWorkOrder/productionFlowLabel/component/materialPartFilePreview.vue +167 -0
  92. package/src/views/productionWorkOrder/productionFlowLabel/component/workOrderInformation.vue +28 -0
  93. package/src/views/productionWorkOrder/productionFlowLabel/index.vue +604 -0
  94. package/src/views/production_work_order/components/priorityTooltip.vue +53 -0
  95. package/src/views/production_work_order/index.vue +1307 -0
  96. package/src/views/review_record/components/materialInfo.vue +50 -0
  97. package/src/views/review_record/components/rootCause.vue +42 -0
  98. package/src/views/review_record/components/workDetail.vue +115 -0
  99. package/src/views/review_record/index.vue +884 -0
@@ -0,0 +1,148 @@
1
+ <template>
2
+ <el-dialog
3
+ v-model="showDialog"
4
+ :title="t('filePreview')"
5
+ width="50%"
6
+ destroy-on-close
7
+ center
8
+ align-center
9
+ :close-on-click-modal="false"
10
+ :close-on-press-escape="false"
11
+ :modal-append-to-body="true"
12
+ :append-to-body="true"
13
+ style="border-radius: 6px"
14
+ data-test-id="EL-DIALOG-ACOVX2"
15
+ >
16
+ <div data-test-id="DIV-E6QfR5">
17
+ <el-table
18
+ v-loading="tableLoading"
19
+ :data="previewData"
20
+ height="60vh"
21
+ header-row-class-name="tableHeader"
22
+ header-cell-class-name="tableHeaderCell"
23
+ :border="true"
24
+ scrollbar-always-on
25
+ show-overflow-tooltip
26
+ data-test-id="EL-TABLE-Sonemz"
27
+ >
28
+ <el-table-column width="60" :align="tableAlign" label="#" data-test-id="EL-TABLE-COLUMN-eiSqtA">
29
+ <template #default="scope">{{ scope.$index + 1 }}</template>
30
+ </el-table-column>
31
+ <el-table-column
32
+ :align="tableAlign"
33
+ prop="fileName"
34
+ :label="t('fileName')"
35
+ data-test-id="EL-TABLE-COLUMN-tGzWAO"
36
+ >
37
+ </el-table-column>
38
+ <el-table-column width="100" :align="tableAlign" :label="t('action')" data-test-id="EL-TABLE-COLUMN-uSygLF">
39
+ <template #default="scope">
40
+ <el-tooltip :content="t('preview')" placement="top" :enterable="false" data-test-id="EL-TOOLTIP-gVWeHJ">
41
+ <el-button
42
+ type="primary"
43
+ link
44
+ :disabled="scope.row.isDisabled"
45
+ data-test-id="EL-BUTTON-9WTY8H"
46
+ @click="handleClickPreview(scope.row)"
47
+ >
48
+ <v-icon class="mdi mdi-file-eye" data-test-id="V-ICON-LcKNgS"></v-icon>
49
+ </el-button>
50
+ </el-tooltip>
51
+ </template>
52
+ </el-table-column>
53
+ </el-table>
54
+ </div>
55
+ <template #footer>
56
+ <el-button type="primary" data-test-id="EL-BUTTON-2VXcx3" @click="showDialog = false">
57
+ {{ $t('close') }}
58
+ </el-button>
59
+ </template>
60
+ <el-image
61
+ ref="imgViewRef"
62
+ style="width: 100px; height: 100px; display: none"
63
+ :src="previewUrl"
64
+ :zoom-rate="1.2"
65
+ :preview-teleported="true"
66
+ :preview-src-list="[previewUrl]"
67
+ :initial-index="1"
68
+ fit="cover"
69
+ data-test-id="EL-IMAGE-33C2PQ"
70
+ />
71
+ </el-dialog>
72
+ </template>
73
+
74
+ <script setup>
75
+ import { ref } from 'vue';
76
+ import { ElMessage } from 'element-plus';
77
+ import apiFunction from '@/scriptFiles/checkApiErrorMechanism.js';
78
+ import { useI18n } from 'vue-i18n';
79
+ const { t } = useI18n();
80
+
81
+ const tableLoading = ref(false);
82
+ const previewUrl = ref('');
83
+ const imgViewRef = ref(null);
84
+ const previewData = ref([]);
85
+ const tableAlign = ref('center');
86
+ const showDialog = ref(false);
87
+
88
+ // 打开弹窗
89
+ const handleOpenDialog = (data, docCustomId) => {
90
+ previewUrl.value = '';
91
+ tableLoading.value = false;
92
+ previewData.value =
93
+ data && data.length
94
+ ? data.map((item) => {
95
+ const fileType = item.fileName
96
+ ? item.fileName.includes('.')
97
+ ? item.fileName.split('.').pop().toLowerCase()
98
+ : ''
99
+ : '';
100
+ const isDisabled = !['jpeg', 'gif', 'jpg', 'png', 'pdf'].includes(fileType);
101
+ return { ...item, fileType, isDisabled, docCustomId };
102
+ })
103
+ : [];
104
+ showDialog.value = true;
105
+ };
106
+
107
+ // 预览
108
+ const handleClickPreview = async ({ fileId: plmFileVersionId, fileName, fileType, docCustomId }) => {
109
+ tableLoading.value = true;
110
+ previewUrl.value = '';
111
+ const data = {
112
+ docCode: 'doc_5',
113
+ docCustomId: docCustomId,
114
+ fileId: plmFileVersionId,
115
+ };
116
+ let res;
117
+ if (fileType === 'pdf') {
118
+ res = await apiFunction
119
+ .docDownloadFile(data)
120
+ .finally(() => (tableLoading.value = false))
121
+ .catch(() => ElMessage.error(t('apiError')));
122
+ } else {
123
+ res = await apiFunction
124
+ .docViewFile(data)
125
+ .finally(() => (tableLoading.value = false))
126
+ .catch(() => ElMessage.error(t('apiError')));
127
+ }
128
+ if (res.status === 200) {
129
+ tableLoading.value = false;
130
+ // const blob = new Blob([res.data], { type: res.data.type });
131
+ if (['jpeg', 'gif', 'jpg', 'png'].includes(fileType)) {
132
+ // previewUrl.value = URL.createObjectURL(blob);
133
+ previewUrl.value = `data:image/${fileName};base64,${res.data.content.fileContent}`;
134
+ setTimeout(() => imgViewRef.value.$el.children[0].click(), 0);
135
+ }
136
+ if (fileType === 'pdf') {
137
+ const pdfBlob = new Blob([res.data], { type: 'application/pdf' });
138
+ const tempUrl = URL.createObjectURL(pdfBlob);
139
+ window.open(tempUrl, fileName);
140
+ }
141
+ }
142
+ };
143
+
144
+ defineExpose({ handleOpenDialog });
145
+ </script>
146
+ <style scoped lang="scss">
147
+ @use '/src/scss/base/table.scss';
148
+ </style>
@@ -0,0 +1,363 @@
1
+ <template>
2
+ <div data-test-id="DIV-Ydf0yz">
3
+ <div data-test-id="DIV-uWyNOt">
4
+ <el-form label-width="auto" data-test-id="EL-FORM-lfIXY8">
5
+ <el-row :gutter="15" justify="space-between" data-test-id="EL-ROW-Qs8O6C">
6
+ <el-col :span="8" data-test-id="EL-COL-fY1NiY">
7
+ <el-form-item :label="t('salesOrderNumber')" data-test-id="EL-FORM-ITEM-6Af1uh">
8
+ <el-autocomplete
9
+ v-model="orderNumber"
10
+ :fetch-suggestions="saleOrderNumberList"
11
+ clearable
12
+ :formatter="(value) => (value?.trim ? value.trim() : value)"
13
+ maxlength="200"
14
+ class="w-50"
15
+ :placeholder="$t('PleaseSelect')"
16
+ data-test-id="EL-INPUT-knLtoI"
17
+ />
18
+ </el-form-item>
19
+ </el-col>
20
+ <el-col :span="8" data-test-id="EL-COL-Sw5N6z">
21
+ <el-form-item :label="t('productionOrderNumber')" data-test-id="EL-FORM-ITEM-q7rtM3">
22
+ <el-autocomplete
23
+ v-model="productionOrderNumber"
24
+ :fetch-suggestions="productionOrderList"
25
+ clearable
26
+ :formatter="(value) => (value?.trim ? value.trim() : value)"
27
+ maxlength="200"
28
+ class="w-50"
29
+ :placeholder="$t('PleaseSelect')"
30
+ data-test-id="EL-INPUT-GC2Bxt"
31
+ />
32
+ </el-form-item>
33
+ </el-col>
34
+ <el-col :span="8" align="center" data-test-id="EL-COL-jTNbYx">
35
+ <div class="button-container" data-test-id="DIV-jtoMT9">
36
+ <el-button type="primary" data-test-id="EL-BUTTON-heY1hB" @click="query(false)">
37
+ <i class="mdi mdi-magnify" data-test-id="I-tbxET9" />
38
+ {{ t('query') }}
39
+ </el-button>
40
+ <el-button data-test-id="EL-BUTTON-f5txPo" @click="reset">{{ t('reset') }}</el-button>
41
+ <columnConfigNext
42
+ :parent-items="canEditHeaders"
43
+ :is-parent-checkbox="true"
44
+ :is-child-checkbox="false"
45
+ :is-child="false"
46
+ data-test-id="COLUMNCONFIGNEXT-fZb3uK"
47
+ @parentSaveData="parentSaveData"
48
+ />
49
+ </div>
50
+ </el-col>
51
+ </el-row>
52
+ <el-collapse-transition data-test-id="EL-COLLAPSE-TRANSITION-OFj7Of">
53
+ <div v-show="showDivider" data-test-id="DIV-VFvaxs">
54
+ <el-row :gutter="15" justify="space-between" data-test-id="EL-ROW-Cimc12">
55
+ <el-col :span="8" data-test-id="EL-COL-SId3mK">
56
+ <el-form-item :label="t('workOrderStatus')" data-test-id="EL-FORM-ITEM-uhTKJs">
57
+ <el-select
58
+ v-model="productStatus"
59
+ filterable
60
+ multiple
61
+ clearable
62
+ collapse-tags
63
+ collapse-tags-tooltip
64
+ data-test-id="EL-SELECT-YmfpBJ"
65
+ >
66
+ <el-option
67
+ v-for="(item, index) in workOrderStatusList"
68
+ :key="item.value"
69
+ :label="item.text"
70
+ :value="item.value"
71
+ :data-test-id="`EL-OPTION-qzM2uI-${index}`"
72
+ />
73
+ </el-select>
74
+ </el-form-item>
75
+ </el-col>
76
+ <el-col :span="8" data-test-id="EL-COL-xCPZwJ">
77
+ <el-form-item
78
+ :label="`${t('productPartNumber')}/${t('productName')}`"
79
+ data-test-id="EL-FORM-ITEM-M9Mmgt"
80
+ >
81
+ <el-select
82
+ v-model="materialName"
83
+ filterable
84
+ reserve-keyword
85
+ multiple
86
+ clearable
87
+ collapse-tags
88
+ collapse-tags-tooltip
89
+ data-test-id="EL-SELECT-wE5NGS"
90
+ >
91
+ <el-option
92
+ v-for="(item, index) in querySearchMaterialList"
93
+ :key="item.materialPartNumber"
94
+ :label="`${item.materialPartNumber} (${item.materialName}) ${item.materialState ? '' : `(${t('deactivateds')})`}`"
95
+ :value="item.materialPartNumber"
96
+ :data-test-id="`EL-OPTION-1JkX4r-${index}`"
97
+ />
98
+ </el-select>
99
+ </el-form-item>
100
+ </el-col>
101
+ <el-col :span="8" data-test-id="EL-COL-k6PQWw">
102
+ <el-form-item :label="t('materialCategory')" data-test-id="EL-FORM-ITEM-NKGIKT">
103
+ <el-select
104
+ v-model="materialCategory"
105
+ filterable
106
+ reserve-keyword
107
+ multiple
108
+ clearable
109
+ collapse-tags
110
+ collapse-tags-tooltip
111
+ data-test-id="EL-SELECT-GL5jzb"
112
+ >
113
+ <el-option
114
+ v-for="(item, index) in materialCategoryList"
115
+ :key="item.id"
116
+ :label="item.materialCategoryName"
117
+ :value="item.id"
118
+ :data-test-id="`EL-OPTION-1S2Rtm-${index}`"
119
+ />
120
+ </el-select>
121
+ </el-form-item>
122
+ </el-col>
123
+ <el-col :span="8" data-test-id="EL-COL-arCC5U">
124
+ <el-form-item :label="t('importantSort')" data-test-id="EL-FORM-ITEM-FRoqZQ">
125
+ <el-select
126
+ v-model="priority"
127
+ filterable
128
+ multiple
129
+ clearable
130
+ collapse-tags
131
+ collapse-tags-tooltip
132
+ data-test-id="EL-SELECT-8oG3at"
133
+ >
134
+ <el-option
135
+ v-for="(item, index) in importantSortList"
136
+ :key="item.value"
137
+ :label="item.text"
138
+ :value="item.value"
139
+ :data-test-id="`EL-OPTION-wUzzUn-${index}`"
140
+ />
141
+ </el-select>
142
+ </el-form-item>
143
+ </el-col>
144
+ <el-col :span="8" data-test-id="EL-COL-xA5dgM">
145
+ <el-form-item :label="t('expectedConstructionStartDateRange')" data-test-id="EL-FORM-ITEM-wDRLI1">
146
+ <el-date-picker
147
+ v-model="dates"
148
+ type="daterange"
149
+ :range-separator="t('to')"
150
+ :start-placeholder="t('starttime')"
151
+ :end-placeholder="t('endtime')"
152
+ data-test-id="EL-DATE-PICKER-EwFode"
153
+ />
154
+ </el-form-item>
155
+ </el-col>
156
+ <el-col :span="8" data-test-id="EL-COL-ytIuCN">
157
+ <el-form-item :label="t('creationTimeRange')" data-test-id="EL-FORM-ITEM-LssZ8R">
158
+ <el-date-picker
159
+ v-model="creationTimeRange"
160
+ type="daterange"
161
+ :range-separator="t('to')"
162
+ :start-placeholder="t('starttime')"
163
+ :end-placeholder="t('endtime')"
164
+ data-test-id="EL-DATE-PICKER-IVSJ1O"
165
+ />
166
+ </el-form-item>
167
+ </el-col>
168
+ <el-col :span="8" data-test-id="EL-COL-yEodtz" />
169
+ </el-row>
170
+ </div>
171
+ </el-collapse-transition>
172
+ </el-form>
173
+ </div>
174
+ <el-divider style="margin: 4px 0 24px 0" data-test-id="EL-DIVIDER-L81J2p">
175
+ <el-icon data-test-id="EL-ICON-Zs5NPB" @click="showDivider = !showDivider">
176
+ <ArrowUpBold v-if="showDivider" data-test-id="ARROWUPBOLD-NR3C6X" />
177
+ <ArrowDownBold v-else data-test-id="ARROWDOWNBOLD-WgKviF" />
178
+ </el-icon>
179
+ </el-divider>
180
+ </div>
181
+ </template>
182
+
183
+ <script setup>
184
+ import { ref, computed, onMounted, onBeforeUnmount } from 'vue';
185
+ import { useI18n } from 'vue-i18n';
186
+ import columnConfigNext from '@/components/columnConfigNext.vue';
187
+ import dayjs from 'dayjs';
188
+ import apiFunction from '@/scriptFiles/checkApiErrorMechanism';
189
+ import { ElMessage } from 'element-plus';
190
+
191
+ const { t } = useI18n();
192
+ const emit = defineEmits(['filterSearch', 'parentSaveData']);
193
+ const props = defineProps({
194
+ canEditHeaders: Array,
195
+ querySearchMaterialList: Array,
196
+ materialCategoryList: Array,
197
+ });
198
+ // 搜索维度
199
+ const canEditHeaders = computed(() => props.canEditHeaders);
200
+ const orderNumber = ref(''); // 订单号
201
+ const productionOrderNumber = ref(''); // 工单号
202
+ const productStatus = ref([0, 1, 2]); // 工单状态
203
+ const materialName = ref([]); // 产品料号绑定
204
+ const materialCategory = ref([]); // 物料类别
205
+ const priority = ref([]); // 重要排序
206
+ const dates = ref([]); // 开工时间日期
207
+ const creationTimeRange = ref([]); // 创建时间区间
208
+ const showDivider = ref(false);
209
+ // 订单状态
210
+ const workOrderStatusList = computed(() => [
211
+ {
212
+ text: t('noDispatch'),
213
+ value: 0,
214
+ },
215
+ {
216
+ text: t('noStart'),
217
+ value: 1,
218
+ },
219
+ {
220
+ text: t('underExecution'),
221
+ value: 2,
222
+ },
223
+ {
224
+ text: t('workEnd'),
225
+ value: 3,
226
+ },
227
+ {
228
+ text: t('alreadyOverdue'),
229
+ value: 4,
230
+ },
231
+ {
232
+ text: t('closed'),
233
+ value: 5,
234
+ },
235
+ ]);
236
+ // 重要排序
237
+ const importantSortList = computed(() => [
238
+ {
239
+ value: 4,
240
+ text: t('topPriority'),
241
+ },
242
+ {
243
+ value: 3,
244
+ text: t('priority'),
245
+ },
246
+ {
247
+ value: 2,
248
+ text: t('normal'),
249
+ },
250
+ {
251
+ value: 1,
252
+ text: t('secondary'),
253
+ },
254
+ {
255
+ value: 0,
256
+ text: t('leastImportant'),
257
+ },
258
+ ]);
259
+ const query = () => {
260
+ const rangeList = [];
261
+ if (dates.value?.length) {
262
+ rangeList.push(Number(dayjs(dates.value[0]).format('x')), Number(dayjs(dates.value[1]).endOf('day').format('x')));
263
+ }
264
+ const creationTimeRangeList = [];
265
+ if (creationTimeRange.value?.length) {
266
+ creationTimeRangeList.push(
267
+ Number(dayjs(creationTimeRange.value[0]).format('x')),
268
+ Number(dayjs(creationTimeRange.value[1]).endOf('day').format('x')),
269
+ );
270
+ }
271
+ const params = {
272
+ orderNumber: orderNumber.value || '',
273
+ productionOrderNumber: productionOrderNumber.value || '',
274
+ priority: priority.value,
275
+ orderProductionOrderFuzzy: '',
276
+ productionOrderStatus: productStatus.value || [],
277
+ productionOrderExpectedStartDayInterval: rangeList.length !== 0 ? rangeList : null,
278
+ consDate: creationTimeRangeList.length !== 0 ? creationTimeRangeList : null,
279
+ partNumberPreciseList: materialName.value,
280
+ materialCategoryId: materialCategory.value,
281
+ orderSettingList: [],
282
+ };
283
+ emit('filterSearch', params);
284
+ };
285
+ const reset = () => {
286
+ orderNumber.value = '';
287
+ productionOrderNumber.value = '';
288
+ priority.value = [];
289
+ productStatus.value = [0, 1, 2];
290
+ dates.value = [];
291
+ materialName.value = [];
292
+ materialCategory.value = [];
293
+ creationTimeRange.value = [];
294
+ };
295
+ function parentSaveData(val) {
296
+ emit('parentSaveData', val);
297
+ }
298
+ const init = () => {
299
+ query();
300
+ };
301
+ const productionOrderList = (queryString, cb) => {
302
+ const data = {
303
+ count: 50,
304
+ startIndex: 0,
305
+ productionOrderNumber: queryString ? queryString.trim() : '',
306
+ needAll: false,
307
+ };
308
+ apiFunction
309
+ .selectProductionOrderNumber(data)
310
+ .then((res) => {
311
+ if (res.data.code === 0) {
312
+ const results = res.data.content.data.map((i) => ({ value: i }));
313
+ cb(results);
314
+ }
315
+ })
316
+ .catch(() => {
317
+ ElMessage.error(t('apiError'));
318
+ });
319
+ };
320
+ const saleOrderNumberList = (queryString, cb) => {
321
+ const data = {
322
+ count: 50,
323
+ startIndex: 0,
324
+ orderNumber: queryString ? queryString.trim() : '',
325
+ needAll: false,
326
+ };
327
+ apiFunction
328
+ .selectNumber(data)
329
+ .then((res) => {
330
+ if (res.data.code === 0) {
331
+ const results = res.data.content.data.map((i) => ({ value: i }));
332
+ cb(results);
333
+ }
334
+ })
335
+ .catch(() => {
336
+ ElMessage.error(t('apiError'));
337
+ });
338
+ };
339
+
340
+ onMounted(() => {
341
+ const stockViewQueryDataObj = window.stockViewQueryDataObj;
342
+ let searchObj = {};
343
+ if (stockViewQueryDataObj) {
344
+ searchObj = stockViewQueryDataObj.searchObj;
345
+ }
346
+ if (searchObj?.sourceOrderNumber) {
347
+ productionOrderNumber.value = searchObj.sourceOrderNumber;
348
+ }
349
+ });
350
+ onBeforeUnmount(() => {
351
+ delete window.stockViewQueryDataObj;
352
+ });
353
+ defineExpose({
354
+ init,
355
+ query,
356
+ });
357
+ </script>
358
+
359
+ <style scoped>
360
+ .button-container {
361
+ min-width: 240px;
362
+ }
363
+ </style>
@@ -0,0 +1,94 @@
1
+ {
2
+ "orderNumberIsNullOrEmpty": 100,
3
+ "orderNumberLengthExceeded": 101,
4
+ "orderCustomerNameLengthExceeded": 102,
5
+ "orderExpectedDueIsNotDate": 103,
6
+ "orderCustomerNameInconsistent": 104,
7
+ "orderExpectedDueInconsistent": 105,
8
+ "productionOrderNumberIsNullOrEmpty": 200,
9
+ "productionOrderNumberLengthExceeded":201,
10
+ "productionOrderNumberIsExist": 202,
11
+ "partNumberIsNullOrEmpty": 203,
12
+ "partNumberNotExist": 204,
13
+ "productionOrderRequiredThroughputIsNullOrEmpty": 205,
14
+ "productionOrderRequiredThroughputIsNotNumber": 206,
15
+ "productionOrderRequiredThroughputIsNotGreaterThanZero": 207,
16
+ "productionOrderRequiredThroughputIsNotGreaterThanIntMaxValue": 208,
17
+ "productionOrderExpectedStartDateIsNotDate": 209,
18
+ "productionOrderExpectedDueDateIsNotDate":210,
19
+ "productRouteNameIsNullOrEmpty":211,
20
+ "productRouteNameNotExist":212,
21
+ "productionOrderPriorityIsNotCorrectType":213,
22
+ "productionOrderPartNumberInconsistent":214,
23
+ "productionOrderRequiredThroughputInconsistent":215,
24
+ "productionOrderExpectedStartDateInconsistent":216,
25
+ "productionOrderExpectedDueDateInconsistent":217,
26
+ "productionOrderProductRouteNameInconsistent":218,
27
+ "productionOrderPriorityInconsistent":219,
28
+ "productionOrderOrderInconsistent":220,
29
+ "productionOrderNumberDuplicate":221,
30
+ "productionOrderBatchNumberIsExist":222,
31
+ "partNumberStatusIsDisable": 223,
32
+ "productionOrderCustomFieldValueLengthError":224,
33
+ "processOrderCustomFieldValueLengthError":225,
34
+ "workOrderCustomFieldValueLengthError":226,
35
+ "productionOrderNotFindCustomOption": 227,
36
+ "productionOrderDateFormatError":228,
37
+ "productionOrderCustomFieldInconsistent": 229,
38
+ "productionProcessIsNullOrEmpty": 300,
39
+ "productionProcessIsNotNumber": 301,
40
+ "productionProcessNotExist": 302,
41
+ "processOrderRequiredThroughputIsNullOrEmpty": 303,
42
+ "processOrderRequiredThroughputIsNotNumber": 304,
43
+ "processOrderRequiredThroughputIsNotGreaterThanZero": 305,
44
+ "processOrderRequiredThroughputIsNotGreaterThanIntMaxValue": 306,
45
+ "processOrderExpectedStartDateIsNotDate": 307,
46
+ "processOrderExpectedDueDateIsNotDate":308,
47
+ "processOrderPriorityIsNotCorrectType": 309,
48
+ "processOrderRequiredThroughputInconsistent": 310,
49
+ "processOrderExpectedStartDateInconsistent": 311,
50
+ "processOrderExpectedDueDateInconsistent": 312,
51
+ "processOrderPriorityInconsistent": 313,
52
+ "processOrderNotFindCustomOption":314,
53
+ "processOrderDateFormatError":315,
54
+ "processOrderCustomFieldInconsistent": 316,
55
+ "workOrderEquipGroupNameNotExist": 400,
56
+ "workOrderEquipNameNotExist": 401,
57
+ "workOrderShiftNameNotExist": 402,
58
+ "workOrderEmpNumberNotExist": 403,
59
+ "workOrderRequiredThroughputIsNotNumber": 404,
60
+ "workOrderRequiredThroughputIsNotGreaterThanZero": 405,
61
+ "workOrderRequiredThroughputIsNotGreaterThanIntMaxValue": 406,
62
+ "workOrderExpectedStartDateIsNotDate": 407,
63
+ "workOrderExpectedDueDateIsNotDate": 408,
64
+ "workOrderRequiredThroughputKeyIsNullOrEmpty": 409,
65
+ "workOrderBatchNumberIsNotBelongToProductionOrder": 410,
66
+ "workOrderNotFindCustomOption":411,
67
+ "workOrderDateFormatError":412,
68
+ "onlyOrderProductionOrderDataLegal": 500,
69
+ "productionOrderOtherRowDataError": 501,
70
+ "notFindCustomFieldId": 502,
71
+ "salespersonMustExistWithinTheSystem": 106,
72
+ "theLengthEmployeeNumberExceed20": 107,
73
+ "theLengthSourceOrderNumberExceed50Characters": 230,
74
+ "theFormatError": 231,
75
+ "theLengthProductionNumberExceed50Characters": 232,
76
+ "workOrderProductionNumberFormatError": 233,
77
+ "duplicateWorkOrderProductionNumber": 234,
78
+ "theProductionNumberAlreadyExistsInTheSystem": 235,
79
+ "orderSalesmanIsDisable": 108,
80
+ "sameOrderNumberSalespersonConsistent": 109,
81
+ "customFieldIDIsIllegal": 503,
82
+ "illegalDocumentType": 504,
83
+ "customFieldsAreRequired": 505,
84
+ "customTextCannotExceed50Characters": 506,
85
+ "customNumbersExceed15Characters": 507,
86
+ "customHyperlinkFillingIsIllegal": 508,
87
+ "customSingleChoiceFillingIsIllegal": 509,
88
+ "customMultipleChoiceFillingIsIllegal": 510,
89
+ "illegalCustomTimeFilling": 511,
90
+ "illegalFillingCustomTimeInterval": 512,
91
+ "customNumberFillingIsIllegal": 513,
92
+ "ProductionOrderExpectedStartDateLatterThanDueDate": 236,
93
+ "customTextCannotExceed200Characters": 514
94
+ }