From ef3aab90e71b07ff22ecc40a0a49236b371c04cd Mon Sep 17 00:00:00 2001
From: huminmin <mac@MacBook-Pro.local>
Date: 星期三, 29 四月 2026 13:43:22 +0800
Subject: [PATCH] 优化营销客户相关

---
 src/views/basicData/customerFile/index.vue                   |   13 ++++--
 src/views/salesManagement/returnOrder/components/formDia.vue |    4 +-
 src/api/basicData/customerFile.js                            |   70 -----------------------------------
 src/views/basicData/customerFileOpenSea/index.vue            |    8 +++-
 src/views/salesManagement/salesLedger/index.vue              |    6 +-
 src/views/salesManagement/salesQuotation/index.vue           |   17 ++++----
 6 files changed, 28 insertions(+), 90 deletions(-)

diff --git a/src/api/basicData/customerFile.js b/src/api/basicData/customerFile.js
index d7ed46d..6602ddc 100644
--- a/src/api/basicData/customerFile.js
+++ b/src/api/basicData/customerFile.js
@@ -1,75 +1,5 @@
 import request from '@/utils/request'
 
-// 瀹㈡埛妗f绉佹捣鏌ヨ
-export function listCustomerPrivatePool(query) {
-    return request({
-        url: '/customerPrivatePool/listPage',
-        method: 'get',
-        params: query
-    })
-}
-
-export function addCustomerPrivatePool(data) {
-    return request({
-        url: '/customerPrivatePool/add',
-        method: 'post',
-        data: data
-    })
-}
-
-export function addCustomerPrivate(data) {
-    return request({
-        url: '/customerPrivate/add',
-        method: 'post',
-        data: data
-    })
-}
-
-export function delCustomerPrivate(ids) {
-    return request({
-        url: '/customerPrivate/delete',
-        method: 'delete',
-        data: ids
-    })
-}
-
-export function delCustomerPrivatePool(id) {
-    return request({
-        url: '/customerPrivatePool/delete/' + id,
-        method: 'delete',
-    })
-}
-
-export function shareCustomer(data) {
-    return request({
-        url: '/customerPrivatePool/together',
-        method: 'post',
-        data: data
-    })
-}
-
-export function getCustomerPrivatePoolById(id) {
-    return request({
-        url: '/customerPrivatePool/getbyId/' + id,
-        method: 'get'
-    })
-}
-
-export function getCustomerPrivatePoolInfo(id) {
-    return request({
-        url: '/customerPrivatePool/info/' + id,
-        method: 'get'
-    })
-}
-
-export function updateCustomerPrivatePool(data) {
-    return request({
-        url: '/customerPrivatePool/update',
-        method: 'put',
-        data: data
-    })
-}
-
 export function addCustomerFollow(data) {
     return request({
         url: '/basic/customer-follow/add',
diff --git a/src/views/basicData/customerFile/index.vue b/src/views/basicData/customerFile/index.vue
index 95c932c..e61f77c 100644
--- a/src/views/basicData/customerFile/index.vue
+++ b/src/views/basicData/customerFile/index.vue
@@ -211,7 +211,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"
@@ -612,7 +613,6 @@
   import { onMounted, ref, reactive, getCurrentInstance, toRefs } from "vue";
   import { Search, Paperclip, Upload } from "@element-plus/icons-vue";
   import {
-    delCustomerPrivate,
     addCustomerFollow,
     updateCustomerFollow,
     delCustomerFollow,
@@ -898,7 +898,10 @@
     // 璁剧疆涓婁紶鐨勮姹傚ご閮�
     headers: { Authorization: "Bearer " + getToken() },
     // 涓婁紶鐨勫湴鍧�
-    url: import.meta.env.VITE_APP_BASE_API + "/customerPrivate/importData",
+    url: import.meta.env.VITE_APP_BASE_API + "/basic/customer/importData",
+    data: {
+      type: 0
+    },
     // 鏂囦欢涓婁紶鍓嶇殑鍥炶皟
     beforeUpload: file => {
       console.log("鏂囦欢鍗冲皢涓婁紶", file);
@@ -991,7 +994,7 @@
   }
   /** 涓嬭浇妯℃澘 */
   function importTemplate() {
-    proxy.download("/customerPrivate/downloadTemplate", {}, "瀹㈡埛瀵煎叆妯℃澘.xlsx");
+    proxy.download("/basic/customer/downloadTemplate", {}, "瀹㈡埛瀵煎叆妯℃澘.xlsx");
   }
   // 鎵撳紑寮规
   const openForm = (type, row) => {
@@ -1080,7 +1083,7 @@
       type: "warning",
     })
       .then(() => {
-        proxy.download("/customerPrivate/export", {}, "瀹㈡埛妗f.xlsx");
+        proxy.download("/basic/customer/export", {type: 0}, "瀹㈡埛妗f.xlsx");
       })
       .catch(() => {
         proxy.$modal.msg("宸插彇娑�");
diff --git a/src/views/basicData/customerFileOpenSea/index.vue b/src/views/basicData/customerFileOpenSea/index.vue
index e2b68b3..f71c694 100644
--- a/src/views/basicData/customerFileOpenSea/index.vue
+++ b/src/views/basicData/customerFileOpenSea/index.vue
@@ -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"
@@ -1020,6 +1021,9 @@
     headers: { Authorization: "Bearer " + getToken() },
     // 涓婁紶鐨勫湴鍧�
     url: import.meta.env.VITE_APP_BASE_API + "/basic/customer/importData",
+    data: {
+      type: 1
+    },
     // 鏂囦欢涓婁紶鍓嶇殑鍥炶皟
     beforeUpload: file => {
       console.log("鏂囦欢鍗冲皢涓婁紶", file);
@@ -1288,7 +1292,7 @@
       type: "warning",
     })
       .then(() => {
-        proxy.download("/basic/customer/export", {}, "瀹㈡埛妗f.xlsx");
+        proxy.download("/basic/customer/export", {type: 1}, "瀹㈡埛妗f.xlsx");
       })
       .catch(() => {
         proxy.$modal.msg("宸插彇娑�");
diff --git a/src/views/salesManagement/returnOrder/components/formDia.vue b/src/views/salesManagement/returnOrder/components/formDia.vue
index 27bbb0d..7a21ff7 100644
--- a/src/views/salesManagement/returnOrder/components/formDia.vue
+++ b/src/views/salesManagement/returnOrder/components/formDia.vue
@@ -171,7 +171,7 @@
 import useUserStore from "@/store/modules/user.js";
 import { userListNoPageByTenantId } from "@/api/system/user.js";
 import { listProject } from "@/api/oaSystem/projectManagement.js";
-import {listCustomerPrivatePool} from "@/api/basicData/customerFile.js";
+import {listCustomer} from "@/api/basicData/customer.js";
 
 const { proxy } = getCurrentInstance();
 const emit = defineEmits(['close'])
@@ -354,7 +354,7 @@
 };
 
 const initCustomers = async () => {
-	listCustomerPrivatePool({current: -1,size:-1}).then((res) => {
+  listCustomer({current: -1,size:-1, type: 0}).then((res) => {
 		customerNameOptions.value = res.data.records.map(item => ({
 			label: item.customerName,
 			value: item.customerName, // Keep value as name if needed for other logic, but request says customerId
diff --git a/src/views/salesManagement/salesLedger/index.vue b/src/views/salesManagement/salesLedger/index.vue
index 6b2cfcf..0aa0c23 100644
--- a/src/views/salesManagement/salesLedger/index.vue
+++ b/src/views/salesManagement/salesLedger/index.vue
@@ -632,7 +632,7 @@
 import useFormData from "@/hooks/useFormData.js";
 import dayjs from "dayjs";
 import { getCurrentDate } from "@/utils/index.js";
-import {listCustomerPrivatePool} from "@/api/basicData/customerFile.js";
+import {listCustomer} from "@/api/basicData/customer.js";
 
 const userStore = useUserStore();
 const { proxy } = getCurrentInstance();
@@ -1060,7 +1060,7 @@
 	selectedQuotation.value = null;
 	let userLists = await userListNoPage();
 	userList.value = userLists.data;
-	listCustomerPrivatePool({current: -1,size:-1}).then((res) => {
+  listCustomer({current: -1,size:-1, type: 0}).then((res) => {
 		customerOption.value = res.data.records;
 	});
 	form.value.entryPerson = userStore.id;
@@ -1097,7 +1097,7 @@
 	// 鍏堢‘淇濆鎴峰垪琛ㄥ凡鍔犺浇锛屼究浜庡悗缁洖濉� customerId
 	if (!customerOption.value || customerOption.value.length === 0) {
 		try {
-			listCustomerPrivatePool({current: -1,size:-1}).then((res) => {
+			listCustomer({current: -1,size:-1, type: 0}).then((res) => {
 				customerOption.value = res.data.records;
 			});
 		} catch (e) {
diff --git a/src/views/salesManagement/salesQuotation/index.vue b/src/views/salesManagement/salesQuotation/index.vue
index ee93e46..39cf160 100644
--- a/src/views/salesManagement/salesQuotation/index.vue
+++ b/src/views/salesManagement/salesQuotation/index.vue
@@ -16,8 +16,8 @@
           </el-input>
         </el-col>
         <el-col :span="8">
-          <el-select v-model="searchForm.customer" placeholder="璇烽�夋嫨瀹㈡埛" clearable>
-						<el-option v-for="item in customerOption" :key="item.id" :label="item.customerName" :value="item.customerName">
+          <el-select v-model="searchForm.customerId" placeholder="璇烽�夋嫨瀹㈡埛" clearable>
+						<el-option v-for="item in customerOption" :key="item.id" :label="item.customerName" :value="item.id">
 							{{
 								item.customerName + "鈥斺��" + item.taxpayerIdentificationNumber
 							}}
@@ -102,8 +102,8 @@
           <div class="form-content">
             <el-row :gutter="24">
               <el-col :span="12">
-                <el-form-item label="瀹㈡埛鍚嶇О" prop="customer">
-                  <el-select v-model="form.customer" placeholder="璇烽�夋嫨瀹㈡埛" style="width: 100%" clearable filterable>
+                <el-form-item label="瀹㈡埛鍚嶇О" prop="customerId">
+                  <el-select v-model="form.customerId" placeholder="璇烽�夋嫨瀹㈡埛" style="width: 100%" clearable filterable>
                     <el-option v-for="item in customerOption" :key="item.id" :label="item.customerName" :value="item.id"></el-option>
                   </el-select>
                 </el-form-item>
@@ -302,14 +302,14 @@
 import {getQuotationList,addQuotation,updateQuotation,deleteQuotation} from '@/api/salesManagement/salesQuotation.js'
 import {customerList} from "@/api/salesManagement/salesLedger.js";
 import {modelList, productTreeList} from "@/api/basicData/product.js";
-import {listCustomerPrivatePool} from "@/api/basicData/customerFile.js";
+import {listCustomer} from "@/api/basicData/customer.js";
 import { userListNoPage } from "@/api/system/user.js";
 
 // 鍝嶅簲寮忔暟鎹�
 const loading = ref(false)
 const searchForm = reactive({
   quotationNo: '',
-  customer: '',
+  customerId: '',
   status: ''
 })
 
@@ -328,7 +328,7 @@
 const dialogTitle = ref('鏂板鎶ヤ环')
 const form = reactive({
   quotationNo: '',
-  customer: '',
+  customerId: '',
   salesperson: '',
   quotationDate: '',
   validDate: '',
@@ -407,7 +407,7 @@
   resetForm()
   dialogVisible.value = true
   getProductOptions();
-  listCustomerPrivatePool({current: -1,size:-1}).then((res) => {
+  listCustomer({current: -1,size:-1, type: 0}).then((res) => {
     customerOption.value = res.data.records;
   });
 }
@@ -686,6 +686,7 @@
         return sum + price
       }, 0)
 
+      form.customer = customerOption.value.find(item => item.id === form.customerId)?.customerName || ''
       if (isEdit.value) {
         // 缂栬緫
         const index = quotationList.value.findIndex(item => item.id === editId.value)

--
Gitblit v1.9.3