From 9646ba4b026e4dbee0c0d5ac3d52b428bfef7b29 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期五, 28 八月 2026 10:49:44 +0800
Subject: [PATCH] 新疆-新聚 1.销售台账中的销售合同按框架合同处理 2.设备台账需按车间/区域汇总设备,车间/位置可自行新增,且支持子父级递归 3.计量器具台账支持通过 Excel 文件批量新增数据 4.设备保养定时任务新增“年度保养”任务频率

---
 src/views/basicData/customerFileOpenSea/index.vue |   44 +++++++++++++++++++++++++++++++++++---------
 1 files changed, 35 insertions(+), 9 deletions(-)

diff --git a/src/views/basicData/customerFileOpenSea/index.vue b/src/views/basicData/customerFileOpenSea/index.vue
index 3f79258..bade83a 100644
--- a/src/views/basicData/customerFileOpenSea/index.vue
+++ b/src/views/basicData/customerFileOpenSea/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"
@@ -280,7 +280,8 @@
                  :limit="1"
                  accept=".xlsx, .xls"
                  :headers="upload.headers"
-                 :action="upload.url + '?updateSupport=' + upload.updateSupport"
+                 :action="upload.url"
+                 :data="upload.data"
                  :disabled="upload.isUploading"
                  :before-upload="upload.beforeUpload"
                  :on-progress="upload.onProgress"
@@ -871,7 +872,10 @@
       label: "棰嗙敤浜�",
       prop: "usageUserName",
       width: 120,
-			fixed: "right",
+      fixed: "right",
+      formatData: value => {
+        return value || '-';
+      },
     },
     {
       label: "棰嗙敤鐘舵��",
@@ -916,8 +920,13 @@
         {
           name: "鍥炴敹",
           type: "text",
+          disabled: row => isCustomerRecoveryLocked(row),
           showHide: row => row.usageStatus == 1,
           clickFun: row => {
+            if (isCustomerRecoveryLocked(row)) {
+              proxy.$modal.msgWarning("宸查鐢ㄥ苟涓旇閿�鍞ā鍧楀紩鐢ㄧ殑鍏捣瀹㈡埛涓嶈兘鍥炴敹");
+              return;
+            }
             recycle(row);
           },
         },
@@ -932,7 +941,12 @@
 				{
 					name: "缂栬緫",
 					type: "text",
-					clickFun: row => {
+          disabled: row => isCustomerEditLocked(row),
+          clickFun: row => {
+            if (isCustomerEditLocked(row)) {
+              proxy.$modal.msgWarning("宸查鐢ㄥ苟涓旇閿�鍞ā鍧楀紩鐢ㄧ殑鍏捣瀹㈡埛涓嶈兘缂栬緫");
+              return;
+            }
 						openForm("edit", row);
 					},
 				},
@@ -1020,6 +1034,9 @@
     headers: { Authorization: "Bearer " + getToken() },
     // 涓婁紶鐨勫湴鍧�
     url: import.meta.env.VITE_APP_BASE_API + "/basic/customer/importData",
+    data: {
+      type: 1
+    },
     // 鏂囦欢涓婁紶鍓嶇殑鍥炶皟
     beforeUpload: file => {
       console.log("鏂囦欢鍗冲皢涓婁紶", file);
@@ -1117,6 +1134,10 @@
   }
   // 鎵撳紑寮规
   const openForm = (type, row) => {
+    if (type === "edit" && isCustomerEditLocked(row)) {
+      proxy.$modal.msgWarning("宸查鐢ㄥ苟涓旇閿�鍞ā鍧楀紩鐢ㄧ殑鍏捣瀹㈡埛涓嶈兘缂栬緫");
+      return;
+    }
     operationType.value = type;
     form.value = {};
     form.value.maintainer = userStore.nickName;
@@ -1146,6 +1167,11 @@
     }
     dialogFormVisible.value = true;
   };
+  const isCustomerSalesReferenced = row => Number(row?.salesReferenceFlag || 0) === 1;
+  const isCustomerRecoveryLocked = row => Number(row?.usageStatus || 0) === 1 && isCustomerSalesReferenced(row);
+  const isCustomerEditLocked = row => isCustomerSalesReferenced(row) && (
+    Number(row?.type) === 0 || (Number(row?.type) === 1 && Number(row?.usageStatus || 0) === 1)
+  );
   // 鎻愪氦琛ㄥ崟
   const submitForm = () => {
     proxy.$refs["formRef"].validate(valid => {
@@ -1288,7 +1314,7 @@
       type: "warning",
     })
       .then(() => {
-        proxy.download("/basic/customer/export", {}, "瀹㈡埛妗f.xlsx");
+        proxy.download("/basic/customer/export", {type: 1}, "瀹㈡埛妗f.xlsx");
       })
       .catch(() => {
         proxy.$modal.msg("宸插彇娑�");
@@ -1647,7 +1673,7 @@
   const downloadAttachment = row => {
     if (row.url) {
       // proxy.download(row.url, {}, row.name);
-      proxy.$download.name(row.url);
+			proxy.$download.byUrl(row.url, row.originalFilename);
     } else {
       proxy.$modal.msgError("涓嬭浇閾炬帴涓嶅瓨鍦�");
     }

--
Gitblit v1.9.3