diff --git a/src/views/modules/production-issue/production.vue b/src/views/modules/production-issue/production.vue index c4fef07..002e6d0 100644 --- a/src/views/modules/production-issue/production.vue +++ b/src/views/modules/production-issue/production.vue @@ -45,12 +45,12 @@ export default { to: "productionPicking", disabled: false, }, - { + /* { icon: "records", label: "分拣", iconClass: "qualified", disabled: true, - }, + }, */ ], }; }, diff --git a/src/views/modules/production-issue/productionPicking.vue b/src/views/modules/production-issue/productionPicking.vue index cea7206..213f69d 100644 --- a/src/views/modules/production-issue/productionPicking.vue +++ b/src/views/modules/production-issue/productionPicking.vue @@ -15,7 +15,7 @@
- 申请单号:{{ currentNotifyNo }} + 申请单号:{{ workOrder.notifyNo }}
- 工单号:{{ workOrder.orderNo || workOrder.soorderNo }} + 工单号:{{ workOrder.soorderNo }}
物料号:{{ workOrder.fgpartNo }} @@ -166,7 +166,7 @@ export default { if (data && data.code === 0) { const list = data.notify || [] if (list.length === 0) { - this.$message.warning('未找到该申请单的工单信息'); + this.$message.warning('未找到该工单的申请单'); } this.currentNotifyNo = searchCode this.outboundList = list; @@ -212,9 +212,10 @@ export default { } const params = { - notifyNo: this.currentNotifyNo, + notifyNo: this.selectedWorkOrder.notifyNo, site: localStorage.getItem('site'), - itemNo: this.selectedWorkOrder.itemNo + itemNo: this.selectedWorkOrder.itemNo, + shopOrderNo: this.selectedWorkOrder.soorderNo }; getRequestMaterials(params) @@ -224,6 +225,9 @@ export default { ...item, id: index + 1, })); + if(this.materialList.length === 0){ + this.$message.warning('该工单无可领料物料'); + } } else { this.$message.error(data.msg || '获取材料清单失败'); this.materialList = []; diff --git a/src/views/modules/production-issue/productionPickingDetail.vue b/src/views/modules/production-issue/productionPickingDetail.vue index c2ac8fb..5918567 100644 --- a/src/views/modules/production-issue/productionPickingDetail.vue +++ b/src/views/modules/production-issue/productionPickingDetail.vue @@ -46,9 +46,9 @@
-
需求数量
+
行号
- {{ outboundInfo.qtyToIssue }} + {{ outboundInfo.lineItemNo }}
@@ -58,9 +58,9 @@
-
需求数量
+
本次数量
- {{ outboundInfo.qtyToIssue }} + {{ totalScannedQty }}
@@ -105,9 +105,9 @@
- + @@ -185,9 +185,18 @@ export default { showMaterialDialog: false, materialList: [], materialListLoading: false, - isRemoveMode: false // 默认为添加模式 + isRemoveMode: false ,// 默认为添加模式 + pickingLoading: false }; }, + computed: { + totalScannedQty() { + return this.labelList.reduce( + (sum, l) => sum + (Number(l.quantity) || 0), + 0 + ); + }, + }, methods: { formatDate(date) { return date ? moment(date).format('YYYY-MM-DD') : ''; @@ -304,7 +313,7 @@ export default { wdrNo: l.wdrNo })), }; - + this.pickingLoading = true confirmProductionPicking(params).then(({ data }) => { if (data && data.code === 0) { this.$message.success('操作成功'); @@ -315,6 +324,8 @@ export default { }).catch(error => { console.error('出库确认失败:', error); this.$message.error('操作失败'); + }).finally(() => { + this.pickingLoading = false }); },