From d5e65bf5925c8cd1fe0f0bf0b8b857006d64ad94 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期五, 30 一月 2026 15:26:34 +0800
Subject: [PATCH] 进销存升级 1.部分输入框(有效日期、检定周期)输入做下限制(大于0的整数数字)

---
 src/views/productionManagement/productionOrder/index.vue |   41 ++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 40 insertions(+), 1 deletions(-)

diff --git a/src/views/productionManagement/productionOrder/index.vue b/src/views/productionManagement/productionOrder/index.vue
index 51b42ac..ece5ca6 100644
--- a/src/views/productionManagement/productionOrder/index.vue
+++ b/src/views/productionManagement/productionOrder/index.vue
@@ -50,6 +50,7 @@
                 :tableData="tableData"
                 :page="page"
                 :tableLoading="tableLoading"
+                :row-class-name="tableRowClassName"
                 @pagination="pagination">
         <template #completionStatus="{ row }">
           <el-progress
@@ -163,6 +164,12 @@
       width: 120,
     },
     {
+      label: "浜や粯鏃ユ湡",
+      prop: "deliveryDate",
+      formatData: val => (val ? dayjs(val).format("YYYY-MM-DD") : ""),
+      width: 120,
+    },
+    {
       dataType: "action",
       label: "鎿嶄綔",
       align: "center",
@@ -228,6 +235,21 @@
     if (p < 50) return "#e6a23c";
     if (p < 80) return "#409eff";
     return "#67c23a";
+  };
+
+  // 娣诲姞琛ㄨ绫诲悕鏂规硶
+  const tableRowClassName = ({ row }) => {
+    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 +410,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