From 9ea5ff67655241271bdf04bb50ca3a8d60c4e22a Mon Sep 17 00:00:00 2001
From: yuan <123@>
Date: 星期二, 11 八月 2026 15:07:02 +0800
Subject: [PATCH] fix: 用河南鹤壁代码覆盖山西长治
---
src/views/productionManagement/productionOrder/index.vue | 44 +++++++++-----------------------------------
1 files changed, 9 insertions(+), 35 deletions(-)
diff --git a/src/views/productionManagement/productionOrder/index.vue b/src/views/productionManagement/productionOrder/index.vue
index c37358b..5c3d4cf 100644
--- a/src/views/productionManagement/productionOrder/index.vue
+++ b/src/views/productionManagement/productionOrder/index.vue
@@ -194,7 +194,7 @@
</el-dialog>
<MaterialLedgerDialog v-model="materialDialogVisible"
:order-row="currentMaterialOrder"
- @saved="getList" />
+ />
<MaterialDetailDialog v-model="materialDetailDialogVisible"
:order-row="currentMaterialDetailOrder"
@confirmed="getList" />
@@ -235,7 +235,6 @@
getProductOrderSource,
updateProductOrder,
} from "@/api/productionManagement/productionOrder.js";
- import { productWorkOrderPage } from "@/api/productionManagement/workOrder.js";
import { listMain as getOrderProcessRouteMain } from "@/api/productionManagement/productProcessRoute.js";
import MaterialLedgerDialog from "@/views/productionManagement/productionOrder/components/MaterialLedgerDialog.vue";
import MaterialDetailDialog from "@/views/productionManagement/productionOrder/components/MaterialDetailDialog.vue";
@@ -402,7 +401,7 @@
name: "棰嗘枡",
type: "text",
color: "#5EC7AB",
- showHide: row => !row.endOrder,
+ showHide: row => !row.endOrder && !row.returned,
clickFun: row => {
openMaterialDialog(row);
},
@@ -411,7 +410,7 @@
name: "琛ユ枡",
type: "text",
color: "#5EC7AB",
- showHide: row => !row.endOrder,
+ showHide: row => !row.endOrder && !row.returned,
clickFun: row => {
openMaterialSupplementDialog(row);
},
@@ -570,7 +569,7 @@
const openBindRouteDialog = async (row, type) => {
bindForm.orderId = row.id;
- bindForm.routeId = type === "add" ? null : row.processRouteCode;
+ bindForm.routeId = type === "add" ? null : row.technologyRoutingId;
bindRouteDialogVisible.value = true;
routeOptions.value = [];
if (!row.productModelId) {
@@ -664,37 +663,11 @@
};
const getList = () => {
tableLoading.value = true;
- // 鏋勯�犱竴涓柊鐨勫璞★紝涓嶅寘鍚玡ntryDate瀛楁
const params = { ...searchForm.value, ...page };
params.entryDate = undefined;
productOrderListPage(params)
- .then(async res => {
- const records = res.data.records || [];
- // 涓烘瘡涓鍗曟煡璇㈠搴旂殑宸ュ簭杩涘害鏁版嵁
- const processPromises = records.map(async item => {
- if (item.npsNo) {
- try {
- const workOrderRes = await productWorkOrderPage({
- npsNo: item.npsNo,
- size: 100,
- });
- const workOrders = workOrderRes.data.records || [];
- // 鎸夌収宸ュ簭椤哄簭鎺掑簭锛堝鏋滄湁椤哄簭瀛楁锛屽亣璁句负 orderNum 鎴栨寜杩斿洖椤哄簭锛�
- // 杞崲涓� processRouteStatus 鏍煎紡
- const processRouteStatus = workOrders.map(wo => ({
- name: wo.operationName || "鏈煡宸ュ簭",
- percentage: wo.completionStatus > 100 ? 100 : wo.completionStatus,
- }));
- return { ...item, processRouteStatus };
- } catch (error) {
- console.error(`鑾峰彇宸ュ崟 ${item.npsNo} 杩涘害澶辫触:`, error);
- return { ...item, processRouteStatus: [] };
- }
- }
- return { ...item, processRouteStatus: [] };
- });
-
- tableData.value = await Promise.all(processPromises);
+ .then(res => {
+ tableData.value = res.data.records || [];
page.total = res.data.total;
tableLoading.value = false;
})
@@ -723,6 +696,7 @@
bomNo: row.bomNo || "",
description: data.description || "",
quantity: row.quantity || 0,
+ technologyRoutingId: data.technologyRoutingId,
orderId,
type: "order",
editable: !row.endOrder,
@@ -810,9 +784,9 @@
})
.then(() => {
proxy.download(
- "/productOrder/export",
+ "/productionOrder/export",
{ ...searchForm.value },
- "鐢熶骇璁㈠崟.xlsx"
+ "鐢熶骇璁㈠崟鏁版嵁.xlsx"
);
})
.catch(() => {
--
Gitblit v1.9.3