diff --git a/klp-ui/src/components/KLPService/Renderer/CoilNo.vue b/klp-ui/src/components/KLPService/Renderer/CoilNo.vue new file mode 100644 index 00000000..d46575c4 --- /dev/null +++ b/klp-ui/src/components/KLPService/Renderer/CoilNo.vue @@ -0,0 +1,31 @@ + + + + + \ No newline at end of file diff --git a/klp-ui/src/views/wms/coil/actflow.vue b/klp-ui/src/views/wms/coil/actflow.vue index d0296df1..97d3858c 100644 --- a/klp-ui/src/views/wms/coil/actflow.vue +++ b/klp-ui/src/views/wms/coil/actflow.vue @@ -69,9 +69,9 @@ - + @@ -268,17 +268,18 @@ import { addPendingAction, updatePendingAction, startProcess, - completeAction, cancelAction } from '@/api/wms/pendingAction'; import CoilSelector from '@/components/CoilSelector'; +import CoilNo from '@/components/KLPService/Renderer/CoilNo.vue'; export default { name: 'CoilActflow', dicts: ['action_type'], components: { - CoilSelector + CoilSelector, + CoilNo }, data() { return { diff --git a/klp-ui/src/views/wms/coil/panels/base.vue b/klp-ui/src/views/wms/coil/panels/base.vue index ef818251..b1d0b720 100644 --- a/klp-ui/src/views/wms/coil/panels/base.vue +++ b/klp-ui/src/views/wms/coil/panels/base.vue @@ -71,8 +71,16 @@ - - + + + + + + @@ -92,6 +100,7 @@ + @@ -99,6 +108,7 @@ +
- + 选择Excel文件 - + 校验数据 - + :disabled="!file || !isValidated || errorList.length > 0 || importLoading" :loading="importLoading"> 开始导入 - + 重置
@@ -57,46 +36,23 @@
- + - +
- +

已导入 {{ importedCount }} / {{ totalCount }} 条数据

- +
@@ -264,7 +220,7 @@ export default { // 枚举挂载到实例,方便模板使用 ImportStatus, TableColumnEnum, - + // 文件对象 file: null, // 解析后的原始数据 @@ -314,7 +270,7 @@ export default { try { const response = await listWarehouse({ pageNum: 1, pageSize: 1000 }); const map = {}; - + for (let item of response.data) { map[item.warehouseName] = item.warehouseId; } @@ -503,8 +459,8 @@ export default { // 二次确认,防止误操作 const confirm = await this.$confirm( - '确认导入已校验通过的数据?导入过程中请勿刷新页面或关闭浏览器!', - '导入确认', + '确认导入已校验通过的数据?导入过程中请勿刷新页面或关闭浏览器!', + '导入确认', { confirmButtonText: '确认导入', cancelButtonText: '取消', @@ -555,6 +511,7 @@ export default { throw new Error(`第${row.rowNum}行导入失败:${error.message}`); } } + this.$emit('finish', this.importedCount); }, /** @@ -576,8 +533,8 @@ export default { itemType, materialType: row.type, warehouseId: this.warehouseMap[row.logicWarehouse], - enterCoilNo: row.inboundCoilNo, - currentCoilNo: row.inboundCoilNo, + enterCoilNo: 'G' + row.inboundCoilNo, + currentCoilNo: 'G' + row.inboundCoilNo, supplierCoilNo: row.factoryCoilNo, grossWeight: row.weight, netWeight: row.weight, @@ -593,7 +550,7 @@ export default { // 3. 插入待处理操作 const actionParams = { coilId, - currentCoilNo: row.inboundCoilNo, + currentCoilNo: 'G' + row.inboundCoilNo, actionStatus: SystemConstant.PENDING_ACTION_STATUS, itemType, itemId, @@ -606,7 +563,6 @@ export default { if (actionRes.code !== 200) { throw new Error(`待处理操作插入失败:${actionRes.message || '接口返回异常'}`); } - } catch (error) { throw new Error(error.message); } @@ -632,8 +588,8 @@ export default { }; // 执行查询 - const res = itemType === 'raw_material' - ? await listRawMaterial(queryParams) + const res = itemType === 'raw_material' + ? await listRawMaterial(queryParams) : await listProduct(queryParams); // 空值判断函数 @@ -672,8 +628,8 @@ export default { // 有数据时二次确认,防止误清空 if (this.file || this.tableData.length > 0 || this.errorList.length > 0) { const confirm = await this.$confirm( - '确认重置所有状态?已选择的文件、解析的数据和校验结果将被清空!', - '重置确认', + '确认重置所有状态?已选择的文件、解析的数据和校验结果将被清空!', + '重置确认', { confirmButtonText: '确认重置', cancelButtonText: '取消', @@ -729,7 +685,8 @@ export default { display: flex; align-items: center; gap: 10px; - flex-wrap: wrap; /* 适配小屏幕 */ + flex-wrap: wrap; + /* 适配小屏幕 */ } .file-upload-area.disabled { diff --git a/klp-ui/src/views/wms/receive/detail/index.vue b/klp-ui/src/views/wms/receive/detail/index.vue index 8eeaeb16..d250419c 100644 --- a/klp-ui/src/views/wms/receive/detail/index.vue +++ b/klp-ui/src/views/wms/receive/detail/index.vue @@ -45,7 +45,8 @@ @@ -142,13 +143,15 @@ import { listDeliveryPlan } from '@/api/wms/deliveryPlan' import MemoInput from "@/components/MemoInput"; import ImportGuide from "@/views/wms/receive/components/ImportGuide.vue"; import ActualWarehouseSelect from "@/components/KLPService/ActualWarehouseSelect"; +import CoilNo from "@/components/KLPService/Renderer/CoilNo.vue"; export default { name: "DeliveryWaybill", - components: { + components: { MemoInput, ImportGuide, - ActualWarehouseSelect + ActualWarehouseSelect, + CoilNo }, data() { return {