From 3b28a3183baf6c4d864405dcfd5d8e7a52a3f046 Mon Sep 17 00:00:00 2001
From: huminmin <mac@MacBook-Pro.local>
Date: 星期四, 05 二月 2026 17:51:37 +0800
Subject: [PATCH] 生产管控相关页面增加图纸编号
---
src/views/productionManagement/productionOrder/index.vue | 79 ++++++++++++++++++++++++++++++++++-----
1 files changed, 68 insertions(+), 11 deletions(-)
diff --git a/src/views/productionManagement/productionOrder/index.vue b/src/views/productionManagement/productionOrder/index.vue
index b1d5ab1..d181d51 100644
--- a/src/views/productionManagement/productionOrder/index.vue
+++ b/src/views/productionManagement/productionOrder/index.vue
@@ -41,6 +41,8 @@
</el-form-item>
</el-form>
<div>
+ <el-button type="primary" @click="isShowNewModal = true">鏂板</el-button>
+ <el-button type="danger" @click="handleDelete">鍒犻櫎</el-button>
<el-button @click="handleOut">瀵煎嚭</el-button>
</div>
</div>
@@ -51,6 +53,8 @@
:page="page"
:tableLoading="tableLoading"
:row-class-name="tableRowClassName"
+ :isSelection="true"
+ @selection-change="handleSelectionChange"
@pagination="pagination">
<template #completionStatus="{ row }">
<el-progress
@@ -86,6 +90,10 @@
</span>
</template>
</el-dialog>
+
+ <new-product-order v-if="isShowNewModal"
+ v-model:visible="isShowNewModal"
+ @completed="handleQuery" />
</div>
</template>
@@ -98,12 +106,17 @@
productOrderListPage,
listProcessRoute,
bindingRoute,
- listProcessBom,
+ listProcessBom, delProductOrder,
} from "@/api/productionManagement/productionOrder.js";
import { listMain as getOrderProcessRouteMain } from "@/api/productionManagement/productProcessRoute.js";
+ import {fileDel} from "@/api/financialManagement/revenueManagement.js";
+ import PIMTable from "@/components/PIMTable/PIMTable.vue";
+ const NewProductOrder = defineAsyncComponent(() => import("@/views/productionManagement/productionOrder/New.vue"));
+
const { proxy } = getCurrentInstance();
const router = useRouter();
+ const isShowNewModal = ref(false);
const tableColumn = ref([
{
@@ -125,6 +138,11 @@
label: "浜у搧鍚嶇О",
prop: "productCategory",
width: '120px',
+ },
+ {
+ label: "鍥剧焊缂栧彿",
+ prop: "drawingNumber",
+ width: '160px',
},
{
label: "瑙勬牸",
@@ -208,6 +226,7 @@
size: 100,
total: 0,
});
+ const selectedRows = ref([]);
const data = reactive({
searchForm: {
@@ -239,13 +258,18 @@
// 娣诲姞琛ㄨ绫诲悕鏂规硶
const tableRowClassName = ({ row }) => {
- switch (row.deliveryDaysDiff) {
- case 15:
- return 'yellow'
- case 10:
- return 'red'
- case 2:
- return 'purple'
+ if (!row.deliveryDate) return '';
+ if (row.isFh) return '';
+
+ const diff = row.deliveryDaysDiff;
+ if (diff === 15) {
+ return 'yellow';
+ } else if (diff === 10) {
+ return 'pink';
+ } else if (diff === 2) {
+ return 'purple';
+ } else if (diff < 2) {
+ return 'red';
}
};
@@ -355,6 +379,7 @@
id: data.id,
processRouteCode: data.processRouteCode || "",
productName: data.productName || "",
+ drawingNumber: data.drawingNumber || "",
model: data.model || "",
bomNo: data.bomNo || "",
description: data.description || "",
@@ -374,11 +399,39 @@
query: {
id: row.id,
bomNo: row.bomNo || "",
+ drawingNumber: row.drawingNumber || "",
productName: row.productCategory || "",
productModelName: row.specificationModel || "",
orderId: row.id,
type: "order",
},
+ });
+ };
+
+ // 琛ㄦ牸閫夋嫨鏁版嵁
+ const handleSelectionChange = (selection) => {
+ selectedRows.value = selection;
+ };
+
+ const handleDelete = () => {
+ let ids = [];
+ if (selectedRows.value.length > 0) {
+ ids = selectedRows.value.map((item) => item.id);
+ } else {
+ proxy.$modal.msgWarning("璇烽�夋嫨鏁版嵁");
+ return;
+ }
+ ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚垹闄わ紝鏄惁纭鍒犻櫎锛�", "瀵煎嚭", {
+ confirmButtonText: "纭",
+ cancelButtonText: "鍙栨秷",
+ type: "warning",
+ }).then(() => {
+ delProductOrder(ids).then((res) => {
+ proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+ getList();
+ });
+ }).catch(() => {
+ proxy.$modal.msg("宸插彇娑�");
});
};
@@ -410,14 +463,18 @@
}
::v-deep .yellow {
- background-color: #e8b183;
+ background-color: #FAF0DE;
+}
+
+::v-deep .pink {
+ background-color: #FAE1DE;
}
::v-deep .red {
- background-color: #e35050;
+ background-color: #f80202;
}
::v-deep .purple{
- background-color: #c484dd;
+ background-color: #F4DEFA;
}
</style>
--
Gitblit v1.9.3