From 176ca08ce83bedeb8766b3b1dfd047856d643837 Mon Sep 17 00:00:00 2001
From: huminmin <mac@MacBook-Pro.local>
Date: 星期三, 04 二月 2026 13:33:36 +0800
Subject: [PATCH] 新增生产订单
---
src/views/productionManagement/productionOrder/index.vue | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 50 insertions(+), 2 deletions(-)
diff --git a/src/views/productionManagement/productionOrder/index.vue b/src/views/productionManagement/productionOrder/index.vue
index 9250eb8..3af5008 100644
--- a/src/views/productionManagement/productionOrder/index.vue
+++ b/src/views/productionManagement/productionOrder/index.vue
@@ -41,6 +41,7 @@
</el-form-item>
</el-form>
<div>
+ <el-button type="primary" @click="isShowNewModal = true">鏂板</el-button>
<el-button @click="handleOut">瀵煎嚭</el-button>
</div>
</div>
@@ -50,6 +51,7 @@
:tableData="tableData"
:page="page"
:tableLoading="tableLoading"
+ :row-class-name="tableRowClassName"
@pagination="pagination">
<template #completionStatus="{ row }">
<el-progress
@@ -85,6 +87,10 @@
</span>
</template>
</el-dialog>
+
+ <new-product-order v-if="isShowNewModal"
+ v-model:visible="isShowNewModal"
+ @completed="handleQuery" />
</div>
</template>
@@ -100,9 +106,12 @@
listProcessBom,
} from "@/api/productionManagement/productionOrder.js";
import { listMain as getOrderProcessRouteMain } from "@/api/productionManagement/productProcessRoute.js";
+ const NewProductOrder = defineAsyncComponent(() => import("@/views/productionManagement/productionOrder/New.vue"));
+
const { proxy } = getCurrentInstance();
const router = useRouter();
+ const isShowNewModal = ref(false);
const tableColumn = ref([
{
@@ -133,7 +142,7 @@
{
label: "宸ヨ壓璺嚎缂栧彿",
prop: "processRouteCode",
- width: '140px',
+ width: '200px',
},
{
label: "闇�姹傛暟閲�",
@@ -159,6 +168,12 @@
{
label: "缁撴潫鏃ユ湡",
prop: "endTime",
+ formatData: val => (val ? dayjs(val).format("YYYY-MM-DD") : ""),
+ width: 120,
+ },
+ {
+ label: "浜や粯鏃ユ湡",
+ prop: "deliveryDate",
formatData: val => (val ? dayjs(val).format("YYYY-MM-DD") : ""),
width: 120,
},
@@ -228,6 +243,22 @@
if (p < 50) return "#e6a23c";
if (p < 80) return "#409eff";
return "#67c23a";
+ };
+
+ // 娣诲姞琛ㄨ绫诲悕鏂规硶
+ const tableRowClassName = ({ row }) => {
+ 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';
+ }
};
// 缁戝畾宸ヨ壓璺嚎寮规
@@ -388,4 +419,21 @@
<style scoped lang="scss">
.search_form{
align-items: start;
-}</style>
+}
+
+::v-deep .yellow {
+ background-color: #FAF0DE;
+}
+
+::v-deep .pink {
+ background-color: #FAE1DE;
+}
+
+::v-deep .red {
+ background-color: #f80202;
+}
+
+::v-deep .purple{
+ background-color: #F4DEFA;
+}
+</style>
--
Gitblit v1.9.3