From 834f0541d1ffb11e0f4d91f9f4ff643f2bf34f40 Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期六, 25 四月 2026 17:42:54 +0800
Subject: [PATCH] 工艺路线详情一些修改
---
src/api/productionManagement/productStructure.js | 6 +-
src/views/productionManagement/processRoute/processRouteItem/index.vue | 49 +++++++++++++++++++-----
src/views/productionManagement/productionOrder/index.vue | 17 --------
src/components/ProcessParamListDialog.vue | 8 +--
4 files changed, 46 insertions(+), 34 deletions(-)
diff --git a/src/api/productionManagement/productStructure.js b/src/api/productionManagement/productStructure.js
index f09d91a..c55c93e 100644
--- a/src/api/productionManagement/productStructure.js
+++ b/src/api/productionManagement/productStructure.js
@@ -40,8 +40,8 @@
export function add2(data) {
return request({
- url: "/productionOrderStructure/addOrUpdateBomStructs/" + data.orderId,
- method: "put",
- data: data.children,
+ url: "/productionBomStructure/addOrUpdateBomStructs",
+ method: "post",
+ data: data,
});
}
diff --git a/src/components/ProcessParamListDialog.vue b/src/components/ProcessParamListDialog.vue
index 77e717f..898abb0 100644
--- a/src/components/ProcessParamListDialog.vue
+++ b/src/components/ProcessParamListDialog.vue
@@ -16,7 +16,7 @@
<Plus />
</el-icon>鏂板
</el-button>
- <el-button v-if="editable"
+ <!-- <el-button v-if="editable"
type="primary"
link
size="small"
@@ -24,7 +24,7 @@
<el-icon>
<Refresh />
</el-icon>鍚屾宸ュ簭鍙傛暟
- </el-button>
+ </el-button> -->
</div>
</div>
<div class="params-list">
@@ -380,9 +380,6 @@
paramId: selectedParam.value.id,
standardValue: selectedParam.value.standardValue || "",
isRequired: selectedParam.value.isRequired || 0,
- technologyOperationId: props.process.id,
- technologyOperationParamId: selectedParam.value.id,
- technologyRoutingOperationId: Number(props.routeId),
})
.then(res => {
if (res.code === 200) {
@@ -432,6 +429,7 @@
id: editParamForm.value.id,
standardValue: editParamForm.value.standardValue || "",
isRequired: editParamForm.value.isRequired || 0,
+ // productionOrderRoutingOperationId: props.process.id,
})
.then(res => {
if (res.code === 200) {
diff --git a/src/views/productionManagement/processRoute/processRouteItem/index.vue b/src/views/productionManagement/processRoute/processRouteItem/index.vue
index 44fef19..fd1a6a8 100644
--- a/src/views/productionManagement/processRoute/processRouteItem/index.vue
+++ b/src/views/productionManagement/processRoute/processRouteItem/index.vue
@@ -38,6 +38,15 @@
<span class="info-value">{{ routeInfo.bomNo || '-' }}</span>
</div>
</div>
+ <div class="info-item"
+ v-if="routeInfo.quantity && routeInfo.quantity !== 0">
+ <div class="info-label-wrapper">
+ <span class="info-label">闇�姹傛暟閲�</span>
+ </div>
+ <div class="info-value-wrapper">
+ <span class="info-value">{{ routeInfo.quantity || '-' }}</span>
+ </div>
+ </div>
<div class="info-item full-width"
v-if="routeInfo.description">
<div class="info-label-wrapper">
@@ -206,7 +215,7 @@
<div class="section-header"
style="margin-top: 20px;">
<div class="section-title">BOM 缁撴瀯</div>
- <!-- <div class="section-actions"
+ <div class="section-actions"
v-if="pageType === 'order'">
<el-button v-if="!bomDataValue.isEdit"
type="primary"
@@ -223,7 +232,7 @@
:loading="bomDataValue.loading">
淇濆瓨BOM
</el-button>
- </div> -->
+ </div>
</div>
<el-table :data="bomTableData"
border
@@ -293,6 +302,7 @@
:step="1"
controls-position="right"
style="width: 100%"
+ @change="handleUnitQuantityChange(row)"
:disabled="!bomDataValue.isEdit || bomDataValue.dataList.some(item => (item).tempId === row.tempId)" />
</el-form-item>
</template>
@@ -486,7 +496,7 @@
import {
queryList,
queryList2,
- addBomDetail,
+ add2,
} from "@/api/productionManagement/productStructure.js";
import { useRoute } from "vue-router";
@@ -516,6 +526,7 @@
model: "",
bomNo: "",
description: "",
+ quantity: 0,
});
const processOptions = ref([]);
@@ -646,6 +657,7 @@
bomNo: route.query.bomNo || "",
bomId: route.query.bomId || "",
description: route.query.description || "",
+ quantity: route.query.quantity || 0,
status: !(route.query.status == 1 || route.query.status === "false"),
};
bomTableData.value[0].productName = routeInfo.value.productName;
@@ -831,15 +843,19 @@
// 鏌ョ湅鍙傛暟鍒楄〃
const handleViewParams = row => {
currentProcess.value = row;
- const query = {
+ const param = {
+ productionOrderRoutingOperationId: row.id,
+ productionOrderId: orderId.value,
+ };
+ const param1 = {
technologyRoutingOperationId: row.id,
productionOrderId: orderId.value,
};
const apiPromise =
pageType.value === "order"
- ? findProcessParamListOrder(query)
- : getProcessParamList(query);
+ ? findProcessParamListOrder(param)
+ : getProcessParamList(param1);
apiPromise
.then(res => {
@@ -1166,6 +1182,12 @@
});
};
+ const handleUnitQuantityChange = row => {
+ if (routeInfo.value.quantity && routeInfo.value.quantity !== 0) {
+ row.demandedQuantity = (row.unitQuantity || 0) * routeInfo.value.quantity;
+ }
+ };
+
const addchildItem = (item, tempId) => {
if (item.tempId === tempId) {
if (!item.children) {
@@ -1184,7 +1206,10 @@
"",
operationName: "",
unitQuantity: 1,
- demandedQuantity: 0,
+ demandedQuantity:
+ routeInfo.value.quantity && routeInfo.value.quantity !== 0
+ ? 1 * routeInfo.value.quantity
+ : 0,
children: [],
unit: "",
tempId: new Date().getTime(),
@@ -1220,7 +1245,10 @@
"",
operationName: "",
unitQuantity: 1,
- demandedQuantity: 0,
+ demandedQuantity:
+ routeInfo.value.quantity && routeInfo.value.quantity !== 0
+ ? 1 * routeInfo.value.quantity
+ : 0,
unit: "",
children: [],
tempId: new Date().getTime(),
@@ -1295,8 +1323,9 @@
const valid = validateAllBom();
if (valid) {
- addBomDetail({
- bomId: Number(routeInfo.value.bomId),
+ add2({
+ // bomId: Number(routeInfo.value.bomId),
+ productionOrderBomId: Number(routeInfo.value.bomId) || null,
children: buildSubmitTree(bomDataValue.value.dataList || []),
})
.then(() => {
diff --git a/src/views/productionManagement/productionOrder/index.vue b/src/views/productionManagement/productionOrder/index.vue
index d876f3d..4ecd0c9 100644
--- a/src/views/productionManagement/productionOrder/index.vue
+++ b/src/views/productionManagement/productionOrder/index.vue
@@ -11,22 +11,6 @@
style="width: 160px;"
@change="handleQuery" />
</el-form-item>
- <el-form-item label="瀹㈡埛鍚嶇О:">
- <el-input v-model="searchForm.customerName"
- placeholder="璇疯緭鍏�"
- clearable
- prefix-icon="Search"
- style="width: 160px;"
- @change="handleQuery" />
- </el-form-item>
- <el-form-item label="鍚堝悓鍙�:">
- <el-input v-model="searchForm.salesContractNo"
- placeholder="璇疯緭鍏�"
- clearable
- prefix-icon="Search"
- style="width: 160px;"
- @change="handleQuery" />
- </el-form-item>
<el-form-item label="浜у搧鍚嶇О:">
<el-input v-model="searchForm.productName"
placeholder="璇疯緭鍏�"
@@ -571,6 +555,7 @@
model: row.model || "",
bomNo: row.bomNo || "",
description: data.description || "",
+ quantity: row.quantity || 0,
orderId,
type: "order",
},
--
Gitblit v1.9.3