From bbfdcd61c8140bc54975b9d5568a39df538a0a2d Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期五, 13 三月 2026 13:58:13 +0800
Subject: [PATCH] 字段展示修改

---
 src/views/productionPlan/productionPlan/index.vue |   28 +++++++++++++++++++++++++++-
 1 files changed, 27 insertions(+), 1 deletions(-)

diff --git a/src/views/productionPlan/productionPlan/index.vue b/src/views/productionPlan/productionPlan/index.vue
index b28104a..7214e1a 100644
--- a/src/views/productionPlan/productionPlan/index.vue
+++ b/src/views/productionPlan/productionPlan/index.vue
@@ -362,6 +362,14 @@
       label: "鏁版嵁鏉ユ簮",
       width: "100px",
       prop: "dataSourceType",
+      dataType: "tag",
+      formatType: params => {
+        const typeMap = {
+          2: "warning",
+          1: "primary",
+        };
+        return typeMap[params] || "info";
+      },
       formatData: cell => (cell == 1 ? "閽夐拤鍚屾" : "鎵嬪姩鏂板"),
     },
     {
@@ -383,7 +391,7 @@
       formatType: params => {
         const typeMap = {
           鏉挎潗: "primary",
-          鐮屽潡: "info",
+          鐮屽潡: "warning",
         };
         return typeMap[params] || "info";
       },
@@ -418,6 +426,15 @@
       prop: "status",
       width: "150px",
       className: "status-cell",
+      dataType: "tag",
+      formatType: params => {
+        const typeMap = {
+          0: "warning",
+          1: "primary",
+          2: "info",
+        };
+        return typeMap[params] || "info";
+      },
       formatData: cell => {
         const statusMap = {
           0: "寰呬笅鍙�",
@@ -636,6 +653,7 @@
     productMaterialSkuId: [
       { required: true, message: "璇烽�夋嫨浜у搧瑙勬牸", trigger: "change" },
     ],
+    volume: [{ required: true, message: "璇疯緭鍏ユ柟鏁�", trigger: "blur" }],
     productMaterialId: [
       { required: true, message: "璇烽�夋嫨浜у搧", trigger: "change" },
     ],
@@ -1143,8 +1161,16 @@
   const handleSubmit = () => {
     formRef.value.validate(valid => {
       if (valid) {
+        if (form.volume === 0) {
+          proxy.$modal.msgError("鏂规暟涓嶈兘涓�0");
+          return;
+        }
+        if (form.v === "add") {
+          payload.id = null;
+        }
         const payload = { ...form };
         if (operationType.value === "add") {
+          payload.id = null;
           productionPlanAdd(payload)
             .then(() => {
               proxy.$modal.msgSuccess(

--
Gitblit v1.9.3