From f7ac35468cd9048a93b89a7c39dacac4f5d1748c Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期一, 19 一月 2026 17:11:35 +0800
Subject: [PATCH] 湟水峡 1.下拉框加筛选 2.销售模块不要客户合同号、项目名称 3.客户档案、供应商档案不要和银行有关的字段 4.只需要填客户类型、不需要选择具体的客户针对客户类型产生三种不同的报价、需要绑定产品(比如零售商30、经销商25) 5.客户档案添加客户类型字段

---
 src/views/salesManagement/salesLedger/index.vue |   31 ++++++++++++++++++++++++++++---
 1 files changed, 28 insertions(+), 3 deletions(-)

diff --git a/src/views/salesManagement/salesLedger/index.vue b/src/views/salesManagement/salesLedger/index.vue
index 242aae8..6b5a5bc 100644
--- a/src/views/salesManagement/salesLedger/index.vue
+++ b/src/views/salesManagement/salesLedger/index.vue
@@ -100,7 +100,7 @@
               <el-select v-model="form.customerId" placeholder="璇烽�夋嫨" clearable :disabled="operationType === 'view'" filterable>
                 <el-option v-for="item in customerOption" :key="item.id" :label="item.customerName" :value="item.id">
                   {{
-                    item.customerName + "鈥斺��" + item.taxpayerIdentificationNumber
+                    item.customerName+'-'+item.type
                   }}
                 </el-option>
               </el-select>
@@ -309,7 +309,7 @@
 					<div v-for="(item, index) in printData" :key="index" class="print-page">
 						<div class="delivery-note">
 							<div class="header">
-								<div class="company-name">榧庤瘹鐟炲疄涓氭湁闄愯矗浠诲叕鍙�</div>
+								<div class="company-name">闈掓捣婀熸按宄″啘涓氬彂灞曟湁闄愬叕鍙�</div>
 								<div class="document-title">闆跺敭鍙戣揣鍗�</div>
 							</div>
 
@@ -466,6 +466,7 @@
   delProduct,
   delLedgerFile,
 } from "@/api/salesManagement/salesLedger.js";
+import { getQuotationDetail } from "@/api/salesManagement/salesQuotation.js";
 import { modelList, productTreeList } from "@/api/basicData/product.js";
 import useFormData from "@/hooks/useFormData.js";
 import dayjs from "dayjs";
@@ -653,6 +654,7 @@
   if (index !== -1) {
     productForm.value.specificationModel = modelOptions.value[index].model;
     productForm.value.unit = modelOptions.value[index].unit;
+    fetchQuotationPrice();
   } else {
     productForm.value.specificationModel = null;
     productForm.value.unit = null;
@@ -671,6 +673,29 @@
     }
   }
   return null; // 娌℃湁鎵惧埌鑺傜偣锛岃繑鍥瀗ull
+};
+// 鏍规嵁鎶ヤ环鎺ュ彛鍥炲~鍗曚环
+const fetchQuotationPrice = async () => {
+  // 闇�瑕佸鎴风被鍨嬨�佷骇鍝佸悕绉般�佽鏍�
+  const customer = customerOption.value.find((c) => c.id === form.value.customerId);
+  const customerType = customer?.customerType || customer?.type;
+  const productName = productForm.value.productCategory;
+  const specification = productForm.value.specificationModel;
+
+  try {
+    const { data } = await getQuotationDetail({
+      type: customerType,
+      productName,
+      specification,
+    });
+    const price = data;
+    if (price !== null && price !== undefined) {
+      productForm.value.taxInclusiveUnitPrice = Number(price);
+      mathNum(); // 閲嶆柊璁$畻鎬讳环
+    }
+  } catch (error) {
+    console.error("鑾峰彇鎶ヤ环鍗曚环澶辫触", error);
+  }
 };
 function convertIdToValue(data) {
   return data.map((item) => {
@@ -1153,7 +1178,7 @@
       <div class="print-page">
         <div class="delivery-note">
           <div class="header">
-            <div class="company-name">榧庤瘹鐟炲疄涓氭湁闄愯矗浠诲叕鍙�</div>
+            <div class="company-name">闈掓捣婀熸按宄″啘涓氬彂灞曟湁闄愬叕鍙�</div>
             <div class="document-title">闆跺敭鍙戣揣鍗�</div>
           </div>
 

--
Gitblit v1.9.3