From 21ab18cd38df0c73929a483723363c682302b284 Mon Sep 17 00:00:00 2001 From: shenzhouyu Date: Thu, 11 Dec 2025 15:23:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E6=96=99=E9=80=80=E6=96=99=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=A8=A1=E7=B3=8A=E6=9F=A5=E8=AF=A2=E6=96=B0=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/production/production-issue.js | 2 + .../modules/production-issue/directIssue.vue | 51 ++++++++- .../productionReturnPicking.vue | 101 +++++++++++++++--- 3 files changed, 134 insertions(+), 20 deletions(-) diff --git a/src/api/production/production-issue.js b/src/api/production/production-issue.js index 174f2d2..4a5ed0c 100644 --- a/src/api/production/production-issue.js +++ b/src/api/production/production-issue.js @@ -43,4 +43,6 @@ export const confirmDirectIssue = data => createAPI(`/pda/production/issue/confi export const confirmProductionPicking = data => createAPI(`/pda/production/issue/confirmProductionPicking`,'post',data) +export const getShopOrderLine = data => createAPI(`/pda/production/issue/getShopOrderLine`,'post',data) + diff --git a/src/views/modules/production-issue/directIssue.vue b/src/views/modules/production-issue/directIssue.vue index 2ab9c40..b54a72a 100644 --- a/src/views/modules/production-issue/directIssue.vue +++ b/src/views/modules/production-issue/directIssue.vue @@ -16,11 +16,12 @@ v-model="workOrderNo" placeholder="请输入工单号" prefix-icon="el-icon-search" - @keyup.enter.native="handleSearchWorkOrder" + @keyup.enter.native="handleSearchWorkOrderByShopOrderLine" ref="workOrderInput" /> -
+ +
@@ -135,6 +136,7 @@ import { getWorkOrderInfo, getWorkOrderMaterials, + getShopOrderLine, } from "@/api/production/production-issue"; import moment from "moment"; @@ -215,7 +217,7 @@ export default { } }, - // 查询工单信息 + // 查询工单信息(原方法) handleSearchWorkOrder() { if (!this.workOrderNo.trim()) { this.$message.warning("请输入工单号"); @@ -258,6 +260,47 @@ export default { }); }, + // 查询工单信息(使用ShopOrderLine方法) + handleSearchWorkOrderByShopOrderLine() { + if (!this.workOrderNo.trim()) { + this.$message.warning("请输入工单号"); + return; + } + + this.loading = true; + const params = { + workOrderNo: this.workOrderNo.trim(), + site: localStorage.getItem('site'), + }; + + getShopOrderLine(params) + .then(({ data }) => { + this.loading = false; + console.log("工单信息", data); + + if ( + data.workOrders && + data.workOrders.length > 0 && + data.code === 0 + ) { + this.workOrderList = data.workOrders; + this.selectedWorkOrder = null; + this.materialList = []; + this.showOnlySelected = false; + } else { + this.$message.error(data.msg ||"未找到该工单信息"); + this.workOrderList = []; + this.selectedWorkOrder = null; + this.materialList = []; + this.showOnlySelected = false; + } + }) + .catch((error) => { + this.loading = false; + this.$message.error(error.msg || "查询工单信息失败"); + }); + }, + // 判断是否为同一工单 isSameWorkOrder(a, b) { if (!a || !b) return false; diff --git a/src/views/modules/production-return/productionReturnPicking.vue b/src/views/modules/production-return/productionReturnPicking.vue index bae7739..97b574e 100644 --- a/src/views/modules/production-return/productionReturnPicking.vue +++ b/src/views/modules/production-return/productionReturnPicking.vue @@ -18,11 +18,12 @@ v-model="workOrderNo" placeholder="请输入工单号" prefix-icon="el-icon-search" - @keyup.enter.native="handleSearchWorkOrder" + @keyup.enter.native="handleSearchWorkOrderByShopOrderLine" ref="workOrderInput" />
-
+ + - +
- 工单号:{{ material.orderNo }} + 工单号:{{ material.orderNo }}-{{material.releaseNo}}-{{material.sequenceNo}}
@@ -138,7 +136,7 @@