From e00905e53ee5d91d9e488ecf5ece3e25b9889436 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期二, 20 一月 2026 16:14:44 +0800
Subject: [PATCH] 湟水峡 1.采购模块不要项目名称 2.加一个有待回款登记的提示 3.回款登记、付款登记改成和销售订单价格关联,并且可以多个一起回款或付款 4.合同管理不要下载合同了,跟合同相关的字段可以去掉了 5.重构生产模块 6.测试流程并修改bug

---
 src/views/basicData/customerFile/index.vue |  216 ++++++++++++-----------------------------------------
 1 files changed, 51 insertions(+), 165 deletions(-)

diff --git a/src/views/basicData/customerFile/index.vue b/src/views/basicData/customerFile/index.vue
index a706616..6274ace 100644
--- a/src/views/basicData/customerFile/index.vue
+++ b/src/views/basicData/customerFile/index.vue
@@ -60,20 +60,6 @@
             </el-form-item>
           </el-col>
           <el-col :span="12">
-            <el-form-item
-              label="绾崇◣浜鸿瘑鍒彿锛�"
-              prop="taxpayerIdentificationNumber"
-            >
-              <el-input
-                v-model="form.taxpayerIdentificationNumber"
-                placeholder="璇疯緭鍏�"
-                clearable
-              />
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row :gutter="30">
-          <el-col :span="12">
             <el-form-item label="鍏徃鍦板潃锛�" prop="companyAddress">
               <el-input
                 v-model="form.companyAddress"
@@ -82,63 +68,23 @@
               />
             </el-form-item>
           </el-col>
-          <el-col :span="12">
-            <el-form-item label="鍏徃鐢佃瘽锛�" prop="companyPhone">
-              <el-input
-                v-model="form.companyPhone"
-                placeholder="璇疯緭鍏�"
-                clearable
-              />
-            </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">
-              <el-input
-                v-model="form.basicBankAccount"
-                placeholder="璇疯緭鍏�"
-                clearable
-              />
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item label="閾惰璐﹀彿锛�" prop="bankAccount">
-              <el-input
-                v-model="form.bankAccount"
-                placeholder="璇疯緭鍏�"
-                clearable
-              />
-            </el-form-item>
-          </el-col>
         </el-row>
         <el-row :gutter="30">
           <el-col :span="12">
-            <el-form-item label="寮�鎴疯鍙凤細" prop="bankCode">
-              <el-input
-                v-model="form.bankCode"
-                placeholder="璇疯緭鍏�"
+            <el-form-item label="瀹㈡埛绫诲瀷锛�" prop="customerType">
+              <el-select
+                v-model="form.customerType"
+                placeholder="璇烽�夋嫨"
                 clearable
-              />
+                style="width: 100%"
+              >
+                <el-option
+                  v-for="item in customerTypeOptions"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value"
+                />
+              </el-select>
             </el-form-item>
           </el-col>
         </el-row>
@@ -146,6 +92,7 @@
           <el-col :span="12">
             <el-form-item label="缁存姢浜猴細" prop="maintainer">
               <el-select
+								filterable
                 v-model="form.maintainer"
                 placeholder="璇烽�夋嫨"
                 clearable
@@ -170,7 +117,6 @@
                 type="date"
                 placeholder="璇烽�夋嫨"
                 clearable
-                disabled
               />
             </el-form-item>
           </el-col>
@@ -210,13 +156,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>
@@ -251,41 +197,23 @@
   {
     label: "瀹㈡埛鍚嶇О",
     prop: "customerName",
-    width: 220,
   },
   {
-    label: "绾崇◣浜鸿瘑鍒爜",
-    prop: "taxpayerIdentificationNumber",
-    width: 220,
+    label: "瀹㈡埛绫诲瀷",
+    prop: "customerType",
+    dataType: "tag",
+    formatData: (val) => val || "--",
+    formatType: (val) => {
+      const map = {
+				'涓�鎵瑰晢': "primary",
+        '缁堢鍟�': "success",
+      };
+      return map[val] || "info";
+    },
   },
   {
     label: "鍦板潃鍙婅仈绯绘柟寮�",
     prop: "addressPhone",
-    width: 250,
-  },
-  {
-    label: "鑱旂郴浜�",
-    prop: "contactPerson",
-  },
-  {
-    label: "鑱旂郴鐢佃瘽",
-    prop: "contactPhone",
-    width:150
-  },
-  {
-    label: "閾惰鍩烘湰鎴�",
-    prop: "basicBankAccount",
-    width: 220,
-  },
-  {
-    label: "閾惰璐﹀彿",
-    prop: "bankAccount",
-    width: 220,
-  },
-  {
-    label: "寮�鎴疯鍙�",
-    prop: "bankCode",
-    width:220
   },
   {
     label: "缁存姢浜�",
@@ -294,7 +222,7 @@
   {
     label: "缁存姢鏃堕棿",
     prop: "maintenanceTime",
-    width: 100,
+    width: 200,
   },
   {
     dataType: "action",
@@ -307,10 +235,7 @@
         type: "text",
         clickFun: (row) => {
           openForm("edit", row);
-        },
-				disabled: (row) => {
-					return row.maintainer !== userStore.nickName
-				}
+        }
       },
     ],
   },
@@ -319,6 +244,11 @@
 const selectedRows = ref([]);
 const userList = ref([]);
 const tableLoading = ref(false);
+// 瀹㈡埛绫诲瀷閫夐」
+const customerTypeOptions = ref([
+  { label: "涓�鎵瑰晢", value: "涓�鎵瑰晢" },
+  { label: "缁堢鍟�", value: "缁堢鍟�" },
+]);
 const page = reactive({
   current: 1,
   size: 100,
@@ -329,47 +259,25 @@
 // 鐢ㄦ埛淇℃伅琛ㄥ崟寮规鏁版嵁
 const operationType = ref("");
 const dialogFormVisible = ref(false);
-const formYYs = ref({    // 鍏朵粬瀛楁...
-  contactList: [
-    {
-      contactPerson: "",
-      contactPhone: ""
-    }
-  ]
-});
 const data = reactive({
   searchForm: {
     customerName: "",
   },
   form: {
     customerName: "",
-    taxpayerIdentificationNumber: "",
+		customerType: "",
     companyAddress: "",
-    companyPhone: "",
-    contactPerson: "",
-    contactPhone: "",
     maintainer: "",
     maintenanceTime: "",
-    basicBankAccount: "",
-    bankAccount: "",
-    bankCode: "",
   },
   rules: {
     customerName: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }],
-    taxpayerIdentificationNumber: [
-      { required: true, message: "璇疯緭鍏�", trigger: "blur" },
-    ],
+		customerType: [{ required: false, message: "璇疯緭鍏�", trigger: "blur" }],
     companyAddress: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }],
-    companyPhone: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }],
-    // contactPerson: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }],
-    // contactPhone: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }],
     maintainer: [{ required: false, message: "璇烽�夋嫨", trigger: "change" }],
     maintenanceTime: [
       { required: false, message: "璇烽�夋嫨", trigger: "change" },
     ],
-    basicBankAccount: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }],
-    bankAccount: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }],
-    bankCode: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }],
   },
 });
 const upload = reactive({
@@ -400,8 +308,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 +323,7 @@
   // 鏂囦欢涓婁紶澶辫触鏃剁殑鍥炶皟
   onError: (error, file, fileList) => {
     console.error('涓婁紶澶辫触', error, file, fileList);
+    upload.isUploading = false;
     proxy.$modal.msgError("鏂囦欢涓婁紶澶辫触");
   },
   // 鏂囦欢涓婁紶杩涘害鍥炶皟
@@ -419,18 +332,6 @@
   }
 });
 const { searchForm, form, rules } = toRefs(data);
-const addNewContact = () => {
-  formYYs.value.contactList.push({
-    contactPerson: "",
-    contactPhone: ""
-  });
-};
-
-const removeContact = (index) => {
-  if (formYYs.value.contactList.length > 1) {
-    formYYs.value.contactList.splice(index, 1);
-  }
-};
 // 鏌ヨ鍒楄〃
 /** 鎼滅储鎸夐挳鎿嶄綔 */
 const handleQuery = () => {
@@ -456,6 +357,7 @@
 };
 /** 鎻愪氦涓婁紶鏂囦欢 */
 function submitFileForm() {
+  upload.isUploading = true;
   proxy.$refs["uploadRef"].submit();
 }
 /** 瀵煎叆鎸夐挳鎿嶄綔 */
@@ -463,17 +365,15 @@
   upload.title = "瀹㈡埛瀵煎叆";
   upload.open = true;
 }
+/** 涓嬭浇妯℃澘 */
+function importTemplate() {
+  proxy.download("/basic/customer/downloadTemplate", {}, "瀹㈡埛瀵煎叆妯℃澘.xlsx");
+}
 // 鎵撳紑寮规
 const openForm = (type, row) => {
   operationType.value = type;
   form.value = {};
   form.value.maintainer = userStore.nickName;
-  formYYs.value.contactList = [
-    {
-      contactPerson: "",
-      contactPhone: ""
-    }
-  ];
   form.value.maintenanceTime = getCurrentDate();
   userListNoPage().then((res) => {
     userList.value = res.data;
@@ -481,13 +381,6 @@
   if (type === "edit") {
     getCustomer(row.id).then((res) => {
       form.value = { ...res.data };
-      formYYs.value.contactList = res.data.contactPerson.split(",").map((item, index) => {
-        return {
-          contactPerson: item,
-          contactPhone: res.data.contactPhone.split(",")[index]
-        }
-      });
-
     });
   }
   dialogFormVisible.value = true;
@@ -506,11 +399,6 @@
 };
 // 鎻愪氦鏂板
 const submitAdd = () => {
-  if(formYYs.value.contactList.length < 1){
-    return proxy.$modal.msgWarning("璇疯嚦灏戞坊鍔犱竴涓仈绯讳汉");
-  }
-  form.value.contactPerson = formYYs.value.contactList.map(item => item.contactPerson).join(",");
-  form.value.contactPhone = formYYs.value.contactList.map(item => item.contactPhone).join(",");
   addCustomer(form.value).then((res) => {
     proxy.$modal.msgSuccess("鎻愪氦鎴愬姛");
     closeDia();
@@ -519,8 +407,6 @@
 };
 // 鎻愪氦淇敼
 const submitEdit = () => {
-	form.value.contactPerson = formYYs.value.contactList.map(item => item.contactPerson).join(",");
-	form.value.contactPhone = formYYs.value.contactList.map(item => item.contactPhone).join(",");
   updateCustomer(form.value).then((res) => {
     proxy.$modal.msgSuccess("鎻愪氦鎴愬姛");
     closeDia();

--
Gitblit v1.9.3