From b9c0cee25748ea2d5621a8ca56ceb855a9ce3700 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期五, 17 四月 2026 16:08:01 +0800
Subject: [PATCH] fix: 修改生产模块
---
src/views/productionManagement/productionOrder/index.vue | 70 ++++++++++++++++++++++++++++++++--
1 files changed, 65 insertions(+), 5 deletions(-)
diff --git a/src/views/productionManagement/productionOrder/index.vue b/src/views/productionManagement/productionOrder/index.vue
index 260b2c3..721b656 100644
--- a/src/views/productionManagement/productionOrder/index.vue
+++ b/src/views/productionManagement/productionOrder/index.vue
@@ -3,6 +3,14 @@
<div class="search_form">
<el-form :model="searchForm"
:inline="true">
+ <el-form-item label="鐢熶骇璁㈠崟鍙�:">
+ <el-input v-model="searchForm.npsNo"
+ placeholder="璇疯緭鍏�"
+ clearable
+ prefix-icon="Search"
+ style="width: 160px;"
+ @change="handleQuery" />
+ </el-form-item>
<el-form-item label="瀹㈡埛鍚嶇О:">
<el-input v-model="searchForm.customerName"
placeholder="璇疯緭鍏�"
@@ -40,7 +48,7 @@
@click="handleQuery">鎼滅储</el-button>
</el-form-item>
</el-form>
- <div>
+ <div class="action-buttons">
<el-button type="primary" @click="isShowNewModal = true">鏂板</el-button>
<el-button type="danger" @click="handleDelete">鍒犻櫎</el-button>
<el-button @click="handleOut">瀵煎嚭</el-button>
@@ -91,6 +99,17 @@
</template>
</el-dialog>
+ <MaterialLedgerDialog
+ v-model="materialDialogVisible"
+ :order-row="currentMaterialOrder"
+ @saved="getList"
+ />
+ <MaterialDetailDialog
+ v-model="materialDetailDialogVisible"
+ :order-row="currentMaterialDetailOrder"
+ @confirmed="getList"
+ />
+
<new-product-order v-if="isShowNewModal"
v-model:visible="isShowNewModal"
@completed="handleQuery" />
@@ -98,7 +117,7 @@
</template>
<script setup>
- import { onMounted, ref } from "vue";
+ import { computed, defineAsyncComponent, getCurrentInstance, onMounted, reactive, ref, toRefs } from "vue";
import { ElMessageBox } from "element-plus";
import dayjs from "dayjs";
import { useRouter } from "vue-router";
@@ -109,7 +128,8 @@
listProcessBom, delProductOrder,
} from "@/api/productionManagement/productionOrder.js";
import { listMain as getOrderProcessRouteMain } from "@/api/productionManagement/productProcessRoute.js";
- import {fileDel} from "@/api/financialManagement/revenueManagement.js";
+ import MaterialLedgerDialog from "@/views/productionManagement/productionOrder/components/MaterialLedgerDialog.vue";
+ import MaterialDetailDialog from "@/views/productionManagement/productionOrder/components/MaterialDetailDialog.vue";
import PIMTable from "@/components/PIMTable/PIMTable.vue";
const NewProductOrder = defineAsyncComponent(() => import("@/views/productionManagement/productionOrder/New.vue"));
@@ -122,7 +142,7 @@
{
label: "鐢熶骇璁㈠崟鍙�",
prop: "npsNo",
- width: '120px',
+ width: '150px',
},
{
label: "閿�鍞悎鍚屽彿",
@@ -187,7 +207,7 @@
label: "鎿嶄綔",
align: "center",
fixed: "right",
- width: 200,
+ width: 340,
operation: [
{
name: "宸ヨ壓璺嚎",
@@ -211,6 +231,20 @@
showProductStructure(row);
},
},
+ {
+ name: "棰嗘枡",
+ type: "text",
+ clickFun: row => {
+ openMaterialDialog(row);
+ },
+ },
+ {
+ name: "棰嗘枡璇︽儏",
+ type: "text",
+ clickFun: row => {
+ openMaterialDetailDialog(row);
+ },
+ },
],
},
]);
@@ -225,6 +259,7 @@
const data = reactive({
searchForm: {
+ npsNo: "",
customerName: "",
salesContractNo: "",
projectName: "",
@@ -277,6 +312,10 @@
orderId: null,
routeId: null,
});
+ const materialDialogVisible = ref(false);
+ const currentMaterialOrder = ref(null);
+ const materialDetailDialogVisible = ref(false);
+ const currentMaterialDetailOrder = ref(null);
const openBindRouteDialog = async row => {
bindForm.orderId = row.id;
@@ -320,6 +359,16 @@
} finally {
bindRouteSaving.value = false;
}
+ };
+
+ const openMaterialDialog = row => {
+ currentMaterialOrder.value = row;
+ materialDialogVisible.value = true;
+ };
+
+ const openMaterialDetailDialog = async row => {
+ currentMaterialDetailOrder.value = row;
+ materialDetailDialogVisible.value = true;
};
// 鏌ヨ鍒楄〃
@@ -372,6 +421,7 @@
path: "/productionManagement/processRouteItem",
query: {
id: data.id,
+ bomId: data.bomId,
processRouteCode: data.processRouteCode || "",
productName: data.productName || "",
model: data.model || "",
@@ -455,6 +505,12 @@
align-items: start;
}
+.action-buttons {
+ display: flex;
+ flex-wrap: nowrap;
+ gap: 8px;
+}
+
:deep(.yellow) {
background-color: #FAF0DE;
}
@@ -470,4 +526,8 @@
:deep(.purple){
background-color: #F4DEFA;
}
+.table_list {
+ margin-top: unset;
+}
+
</style>
--
Gitblit v1.9.3