From a78e352b672fd6b634c24e0d9cf184f56b846f6a Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期二, 28 十月 2025 15:25:45 +0800
Subject: [PATCH] 库存预警,无用功能隐藏

---
 src/views/basicData/customerFile/index.vue |   61 +++++++++++++++++-------------
 1 files changed, 35 insertions(+), 26 deletions(-)

diff --git a/src/views/basicData/customerFile/index.vue b/src/views/basicData/customerFile/index.vue
index a706616..76a8c68 100644
--- a/src/views/basicData/customerFile/index.vue
+++ b/src/views/basicData/customerFile/index.vue
@@ -92,25 +92,6 @@
             </el-form-item>
           </el-col>
         </el-row>
-        <el-row :gutter="30" v-for="(contact, index) in formYYs.contactList" :key="index">
-          <el-col :span="12">
-            <el-form-item label="鑱旂郴浜猴細" prop="contactPerson">
-              <el-input v-model="contact.contactPerson" placeholder="璇疯緭鍏�" clearable  />
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item label="鑱旂郴鐢佃瘽锛�" prop="contactPhone">
-              <div style="display: flex; align-items: center;width: 100%;">
-                <el-input v-model="contact.contactPhone" placeholder="璇疯緭鍏�" clearable />
-                <el-button   @click="removeContact(index)" type="danger" circle style="margin-left: 5px;">
-                  <el-icon><Close /></el-icon>
-                </el-button>
-              </div>
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-button @click="addNewContact" style="margin-bottom: 10px;">+ 鏂板鑱旂郴浜�</el-button>
-
         <el-row :gutter="30">
           <el-col :span="12">
             <el-form-item label="閾惰鍩烘湰鎴凤細" prop="basicBankAccount">
@@ -142,6 +123,24 @@
             </el-form-item>
           </el-col>
         </el-row>
+				<el-row :gutter="30" v-for="(contact, index) in formYYs.contactList" :key="index">
+					<el-col :span="12">
+						<el-form-item label="鑱旂郴浜猴細" prop="contactPerson">
+							<el-input v-model="contact.contactPerson" placeholder="璇疯緭鍏�" clearable  />
+						</el-form-item>
+					</el-col>
+					<el-col :span="12">
+						<el-form-item label="鑱旂郴鐢佃瘽锛�" prop="contactPhone">
+							<div style="display: flex; align-items: center;width: 100%;">
+								<el-input v-model="contact.contactPhone" placeholder="璇疯緭鍏�" clearable />
+								<el-button   @click="removeContact(index)" type="danger" circle style="margin-left: 5px;">
+									<el-icon><Close /></el-icon>
+								</el-button>
+							</div>
+						</el-form-item>
+					</el-col>
+				</el-row>
+				<el-button @click="addNewContact" style="margin-bottom: 10px;">+ 鏂板鑱旂郴浜�</el-button>
         <el-row :gutter="30">
           <el-col :span="12">
             <el-form-item label="缁存姢浜猴細" prop="maintainer">
@@ -210,13 +209,13 @@
         <template #tip>
           <div class="el-upload__tip text-center">
             <span>浠呭厑璁稿鍏ls銆亁lsx鏍煎紡鏂囦欢銆�</span>
-<!--            <el-link-->
-<!--              type="primary"-->
-<!--              :underline="false"-->
-<!--              style="font-size: 12px; vertical-align: baseline"-->
-<!--              @click="importTemplate"-->
-<!--              >涓嬭浇妯℃澘</el-link-->
-<!--            >-->
+            <el-link
+              type="primary"
+              :underline="false"
+              style="font-size: 12px; vertical-align: baseline"
+              @click="importTemplate"
+              >涓嬭浇妯℃澘</el-link
+            >
           </div>
         </template>
       </el-upload>
@@ -400,8 +399,12 @@
   // 鏂囦欢涓婁紶鎴愬姛鏃剁殑鍥炶皟
   onSuccess: (response, file, fileList) => {
     console.log('涓婁紶鎴愬姛', response, file, fileList);
+    upload.isUploading = false;
     if(response.code === 200){
       proxy.$modal.msgSuccess("鏂囦欢涓婁紶鎴愬姛");
+      upload.open = false;
+      proxy.$refs["uploadRef"].clearFiles();
+      getList();
     }else if(response.code === 500){
       proxy.$modal.msgError(response.msg);
     }else{
@@ -411,6 +414,7 @@
   // 鏂囦欢涓婁紶澶辫触鏃剁殑鍥炶皟
   onError: (error, file, fileList) => {
     console.error('涓婁紶澶辫触', error, file, fileList);
+    upload.isUploading = false;
     proxy.$modal.msgError("鏂囦欢涓婁紶澶辫触");
   },
   // 鏂囦欢涓婁紶杩涘害鍥炶皟
@@ -456,6 +460,7 @@
 };
 /** 鎻愪氦涓婁紶鏂囦欢 */
 function submitFileForm() {
+  upload.isUploading = true;
   proxy.$refs["uploadRef"].submit();
 }
 /** 瀵煎叆鎸夐挳鎿嶄綔 */
@@ -463,6 +468,10 @@
   upload.title = "瀹㈡埛瀵煎叆";
   upload.open = true;
 }
+/** 涓嬭浇妯℃澘 */
+function importTemplate() {
+  proxy.download("/basic/customer/downloadTemplate", {}, "瀹㈡埛瀵煎叆妯℃澘.xlsx");
+}
 // 鎵撳紑寮规
 const openForm = (type, row) => {
   operationType.value = type;

--
Gitblit v1.9.3