From ad3bfb6d1cac610bf0078d7bd41a0aec6d77c8c4 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期二, 28 七月 2026 17:07:18 +0800
Subject: [PATCH] 新疆_新聚工贸 1.客户分类枚举值修改

---
 src/views/basicData/customerFile/index.vue |   31 +++++++++++++++++++++++--------
 1 files changed, 23 insertions(+), 8 deletions(-)

diff --git a/src/views/basicData/customerFile/index.vue b/src/views/basicData/customerFile/index.vue
index 7091a02..84153b1 100644
--- a/src/views/basicData/customerFile/index.vue
+++ b/src/views/basicData/customerFile/index.vue
@@ -15,10 +15,10 @@
                    style="width: 240px"
                    clearable
                    @change="handleQuery">
-          <el-option label="闆跺敭瀹㈡埛"
-                     value="闆跺敭瀹㈡埛" />
-          <el-option label="杩涢攢鍟嗗鎴�"
-                     value="杩涢攢鍟嗗鎴�" />
+          <el-option label="涓夊ぇ娌�"
+                     value="涓夊ぇ娌�" />
+          <el-option label="澶栭攢"
+                     value="澶栭攢" />
         </el-select>
         <el-button type="primary"
                    @click="handleQuery"
@@ -128,10 +128,10 @@
               <el-select v-model="form.customerType"
                          placeholder="璇烽�夋嫨"
                          clearable>
-                <el-option label="闆跺敭瀹㈡埛"
-                           value="闆跺敭瀹㈡埛" />
-                <el-option label="杩涢攢鍟嗗鎴�"
-                           value="杩涢攢鍟嗗鎴�" />
+                <el-option label="涓夊ぇ娌�"
+                           value="涓夊ぇ娌�" />
+                <el-option label="澶栭攢"
+                           value="澶栭攢" />
               </el-select>
             </el-form-item>
           </el-col>
@@ -800,7 +800,12 @@
         {
           name: "缂栬緫",
           type: "text",
+          showHide: row => !isCustomerEditLocked(row),
           clickFun: row => {
+            if (isCustomerEditLocked(row)) {
+              proxy.$modal.msgWarning("宸茶閿�鍞ā鍧楀紩鐢ㄧ殑绉佹捣瀹㈡埛涓嶈兘缂栬緫");
+              return;
+            }
             openForm("edit", row);
           },
         },
@@ -1001,6 +1006,10 @@
   }
   // 鎵撳紑寮规
   const openForm = (type, row) => {
+    if (type === "edit" && isCustomerEditLocked(row)) {
+      proxy.$modal.msgWarning("宸茶閿�鍞ā鍧楀紩鐢ㄧ殑绉佹捣瀹㈡埛涓嶈兘缂栬緫");
+      return;
+    }
     operationType.value = type;
     form.value = {};
     form.value.maintainer = userStore.nickName;
@@ -1030,6 +1039,12 @@
     }
     dialogFormVisible.value = true;
   };
+  const isCustomerEditLocked = row => {
+    const salesReferenced = Number(row?.salesReferenceFlag || 0) === 1;
+    const customerType = Number(row?.type);
+    const usageStatus = Number(row?.usageStatus || 0);
+    return salesReferenced && (customerType === 0 || (customerType === 1 && usageStatus === 1));
+  };
   // 鎻愪氦琛ㄥ崟
   const submitForm = () => {
     proxy.$refs["formRef"].validate(valid => {

--
Gitblit v1.9.3