zlwu il y a 10 mois
Parent
commit
829d9edca8

BIN
.DS_Store


BIN
backend/ruoyi-modules/.DS_Store


+ 5 - 0
backend/ruoyi-modules/ruoyi-crm/src/main/java/org/dromara/crm/domain/CrmQuote.java

@@ -215,6 +215,11 @@ public class CrmQuote extends TenantEntity {
      */
     private String deliveryTerms;
 
+    /**
+     * 运费(元)
+     */
+    private BigDecimal freight;
+
     /**
      * 附件(多个用逗号分隔)
      */

+ 6 - 0
backend/ruoyi-modules/ruoyi-crm/src/main/java/org/dromara/crm/domain/bo/CrmQuoteBo.java

@@ -167,6 +167,12 @@ public class CrmQuoteBo extends BaseEntity {
      */
     private String deliveryTerms;
 
+    /**
+     * 运费(元)
+     */
+    @DecimalMin(value = "0.00", message = "运费不能为负数")
+    private BigDecimal freight;
+
     /**
      * 附件(多个用逗号分隔)
      */

+ 6 - 0
backend/ruoyi-modules/ruoyi-crm/src/main/java/org/dromara/crm/domain/vo/CrmQuoteVo.java

@@ -242,6 +242,12 @@ public class CrmQuoteVo implements Serializable {
      */
     private String deliveryTerms;
 
+    /**
+     * 运费(元)
+     */
+    @ExcelProperty(value = "运费(元)")
+    private BigDecimal freight;
+
     /**
      * 附件(多个用逗号分隔)
      */

+ 36 - 4
backend/ruoyi-modules/ruoyi-crm/src/main/java/org/dromara/crm/service/impl/CrmQuoteServiceImpl.java

@@ -278,8 +278,18 @@ public class CrmQuoteServiceImpl implements ICrmQuoteService {
                 : "";
 
         if (StringUtils.isBlank(entity.getQuoteTitle())) {
-            // 用户未填写报价主题,自动生成:供方简称-客户简称(报价单编号)
-            entity.setQuoteTitle(supplierShortName + "-" + customerShortName + "(" + quoteNo + ")");
+            // 用户未填写报价主题,根据报价类型自动生成
+            // 销售:供方简称-客户简称(报价单编号)
+            // 采购:客户简称-供方简称(报价单编号)
+            String quoteTitle;
+            if ("purchase".equals(entity.getQuoteType())) {
+                // 采购:客户简称-供方简称(报价单编号)
+                quoteTitle = customerShortName + "-" + supplierShortName + "(" + quoteNo + ")";
+            } else {
+                // 销售:供方简称-客户简称(报价单编号)
+                quoteTitle = supplierShortName + "-" + customerShortName + "(" + quoteNo + ")";
+            }
+            entity.setQuoteTitle(quoteTitle);
         }
         if (entity.getOwnerUserId() == null) {
             entity.setOwnerUserId(LoginHelper.getUserId());
@@ -404,7 +414,18 @@ public class CrmQuoteServiceImpl implements ICrmQuoteService {
                 customerShortName = oldEntity.getCustomerName();
             }
             String currentQuoteNo = entity.getQuoteNo();
-            entity.setQuoteTitle(supplierShortName + "-" + customerShortName + "(" + currentQuoteNo + ")");
+            // 根据报价类型生成报价主题
+            // 销售:供方简称-客户简称(报价单编号)
+            // 采购:客户简称-供方简称(报价单编号)
+            String quoteTitle;
+            if ("purchase".equals(entity.getQuoteType())) {
+                // 采购:客户简称-供方简称(报价单编号)
+                quoteTitle = customerShortName + "-" + supplierShortName + "(" + currentQuoteNo + ")";
+            } else {
+                // 销售:供方简称-客户简称(报价单编号)
+                quoteTitle = supplierShortName + "-" + customerShortName + "(" + currentQuoteNo + ")";
+            }
+            entity.setQuoteTitle(quoteTitle);
         }
         // 如果客户或供方发生变化,更新报价主题和报价单号(只更新编码和简称,不改变日期和序列号)
         else if (customerChanged || supplierChanged) {
@@ -451,7 +472,18 @@ public class CrmQuoteServiceImpl implements ICrmQuoteService {
             // 如果供方变化且成功更新了报价单号,entity.getQuoteNo()就是更新后的值
             // 如果供方没变化或提取失败,entity.getQuoteNo()就是原值
             String currentQuoteNo = entity.getQuoteNo() != null ? entity.getQuoteNo() : oldEntity.getQuoteNo();
-            entity.setQuoteTitle(supplierShortName + "-" + customerShortName + "(" + currentQuoteNo + ")");
+            // 根据报价类型生成报价主题
+            // 销售:供方简称-客户简称(报价单编号)
+            // 采购:客户简称-供方简称(报价单编号)
+            String quoteTitle;
+            if ("purchase".equals(entity.getQuoteType())) {
+                // 采购:客户简称-供方简称(报价单编号)
+                quoteTitle = customerShortName + "-" + supplierShortName + "(" + currentQuoteNo + ")";
+            } else {
+                // 销售:供方简称-客户简称(报价单编号)
+                quoteTitle = supplierShortName + "-" + customerShortName + "(" + currentQuoteNo + ")";
+            }
+            entity.setQuoteTitle(quoteTitle);
         }
 
         // 计算到期日期

BIN
backend/ruoyi-modules/ruoyi-xg/.DS_Store


+ 2 - 0
web/src/api/crm/quote/index.ts

@@ -50,6 +50,7 @@ export interface QuoteForm {
   supplierName?: string;
   paymentTerms?: string;
   deliveryTerms?: string;
+  freight?: number;
   attachments?: string;
   remark?: string;
   products: QuoteProductForm[];
@@ -114,6 +115,7 @@ export interface QuoteVO {
   ownerUserName: string;
   supplierId?: number;
   supplierName?: string;
+  freight?: number;
   supplierCode?: string;
   supplierShortName?: string;
   contractId?: number;

+ 23 - 7
web/src/views/crm/quote/detail.vue

@@ -20,17 +20,17 @@
         <!-- 基本信息 -->
         <el-tab-pane label="基本信息" name="basic">
           <el-descriptions :column="2" border>
-            <el-descriptions-item label="报价单号">{{ quote?.quoteNo }}</el-descriptions-item>
-            <el-descriptions-item label="报价单标题">{{ quote?.quoteTitle }}</el-descriptions-item>
+            <el-descriptions-item :label="detailLabels.quoteNo">{{ quote?.quoteNo }}</el-descriptions-item>
+            <el-descriptions-item :label="detailLabels.quoteTitle">{{ quote?.quoteTitle }}</el-descriptions-item>
             <el-descriptions-item label="报价类型">
               <el-tag :type="quote?.quoteType === 'purchase' ? 'warning' : 'success'">
                 {{ getQuoteTypeLabel(quote?.quoteType) }}
               </el-tag>
             </el-descriptions-item>
-            <el-descriptions-item label="客户名称">
+            <el-descriptions-item :label="detailLabels.customerName">
               <el-link type="primary" @click="handleViewCustomer">{{ quote?.customerName }}</el-link>
             </el-descriptions-item>
-            <el-descriptions-item label="联系人">{{ quote?.contactName }}</el-descriptions-item>
+            <el-descriptions-item :label="detailLabels.contactName">{{ quote?.contactName }}</el-descriptions-item>
             <el-descriptions-item label="联系手机">{{ quote?.contactMobile }}</el-descriptions-item>
             <el-descriptions-item label="联系邮箱">{{ quote?.contactEmail }}</el-descriptions-item>
             <el-descriptions-item label="版本号">
@@ -40,14 +40,17 @@
             <el-descriptions-item label="状态">
               <dict-tag :options="crm_quote_status" :value="quote?.status" />
             </el-descriptions-item>
-            <el-descriptions-item label="报价日期">{{ quote?.quoteDate }}</el-descriptions-item>
+            <el-descriptions-item :label="detailLabels.quoteDate">{{ quote?.quoteDate }}</el-descriptions-item>
             <el-descriptions-item label="有效期至">
               <span :style="{ color: getExpireDateColor(quote?.expireDate) }">
                 {{ quote?.expireDate }} ({{ getDaysRemaining(quote?.expireDate) }})
               </span>
             </el-descriptions-item>
-            <el-descriptions-item label="负责人">{{ quote?.ownerUserName }}</el-descriptions-item>
-            <el-descriptions-item label="报价主体">{{ quote?.supplierName || '-' }}</el-descriptions-item>
+            <el-descriptions-item label="运费(元)">
+              <span>¥{{ formatAmount(quote?.freight) }}</span>
+            </el-descriptions-item>
+            <el-descriptions-item :label="detailLabels.ownerUser">{{ quote?.ownerUserName }}</el-descriptions-item>
+            <el-descriptions-item :label="detailLabels.supplier">{{ quote?.supplierName || '-' }}</el-descriptions-item>
             <el-descriptions-item label="创建时间">{{ parseTime(quote?.createTime) }}</el-descriptions-item>
           </el-descriptions>
 
@@ -395,6 +398,19 @@ const getQuoteTypeLabel = (type?: string) => {
   return quoteTypeMap[type] || quoteTypeMap.sales;
 };
 
+const detailLabels = computed(() => {
+  const isPurchase = quote.value?.quoteType === 'purchase';
+  return {
+    quoteNo: '报价单编号',
+    quoteTitle: '报价主题',
+    customerName: isPurchase ? '供货商名称' : '客户名称',
+    contactName: isPurchase ? '供货商联系人' : '客户联系人',
+    ownerUser: isPurchase ? '采购负责人' : '负责人',
+    quoteDate: isPurchase ? '询价日期' : '报价日期',
+    supplier: isPurchase ? '采购主体' : '报价主体'
+  };
+});
+
 /** 获取报价单详情 */
 const getDetail = async () => {
   loading.value = true;

+ 108 - 31
web/src/views/crm/quote/form.vue

@@ -9,26 +9,33 @@
       </template>
 
       <el-form ref="formRef" :model="form" :rules="rules" label-width="120px">
-        <!-- 基本信息 -->
-        <el-divider content-position="left">
-          <span style="font-size: 16px; font-weight: bold; color: #67c23a">
-            <el-icon><Document /></el-icon> 基本信息
-          </span>
-        </el-divider>
+        <div class="quote-type-wrapper">
+          <el-row class="quote-type-row" justify="center">
+            <el-col :span="12" class="quote-type-col">
+              <el-form-item class="quote-type-item" label="报价类型" prop="quoteType" required>
+                <el-radio-group v-model="form.quoteType" size="large" @change="handleQuoteTypeChange">
+                  <el-radio-button v-for="item in quoteTypeOptions" :key="item.value" :label="item.value">
+                    {{ item.label }}
+                  </el-radio-button>
+                </el-radio-group>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </div>
         <div>
           <el-row :gutter="20">
             <el-col :span="6">
-              <el-form-item label="报价单编号" prop="quoteNo">
+              <el-form-item :label="basicLabels.quoteNo" prop="quoteNo">
                 <el-input v-model="form.quoteNo" placeholder="系统自动生成" disabled />
               </el-form-item>
             </el-col>
             <el-col :span="6">
-              <el-form-item label="报价主题" prop="quoteTitle">
+              <el-form-item :label="basicLabels.quoteTitle" prop="quoteTitle">
                 <el-input v-model="form.quoteTitle" placeholder="可不填,系统将自动生成" maxlength="100" show-word-limit />
               </el-form-item>
             </el-col>
             <el-col :span="6">
-              <el-form-item label="客户名称" prop="customerId" required>
+              <el-form-item :label="basicLabels.customerName" prop="customerId" required>
                 <el-input v-model="form.customerName" placeholder="请选择客户" readonly>
                   <template #append>
                     <el-button text icon="Search" @click="handleSelectCustomer" />
@@ -37,7 +44,7 @@
               </el-form-item>
             </el-col>
             <el-col :span="6">
-              <el-form-item label="联系人" prop="contactId" required>
+              <el-form-item :label="basicLabels.contactName" prop="contactId" required>
                 <el-input v-model="form.contactName" placeholder="请选择联系人" readonly :disabled="!form.customerId">
                   <template #append>
                     <el-button text icon="Search" @click="handleSelectContact" :disabled="!form.customerId" />
@@ -48,17 +55,8 @@
           </el-row>
 
           <el-row :gutter="20">
-        <el-col :span="6">
-          <el-form-item label="报价类型" prop="quoteType" required>
-            <el-radio-group v-model="form.quoteType">
-              <el-radio-button v-for="item in quoteTypeOptions" :key="item.value" :label="item.value">
-                {{ item.label }}
-              </el-radio-button>
-            </el-radio-group>
-          </el-form-item>
-        </el-col>
             <el-col :span="6">
-              <el-form-item label="关联商机" prop="opportunityId">
+              <el-form-item :label="basicLabels.opportunity" prop="opportunityId">
                 <el-input v-model="opportunityDisplayName" placeholder="请选择商机(可选)" readonly clearable>
                   <template #append>
                     <el-button text icon="Search" @click="handleSelectOpportunity" />
@@ -67,7 +65,7 @@
               </el-form-item>
             </el-col>
             <el-col :span="6">
-              <el-form-item label="负责人" prop="ownerUserId" required>
+              <el-form-item :label="basicLabels.ownerUser" prop="ownerUserId" required>
                 <el-input v-model="form.ownerUserName" placeholder="请选择负责人" readonly>
                   <template #append>
                     <el-button text icon="Search" @click="handleSelectUser" />
@@ -76,25 +74,30 @@
               </el-form-item>
             </el-col>
             <el-col :span="6">
-              <el-form-item label="报价日期" prop="quoteDate" required>
+              <el-form-item :label="basicLabels.quoteDate" prop="quoteDate" required>
                 <el-date-picker v-model="form.quoteDate" type="date" placeholder="选择报价日期" value-format="YYYY-MM-DD" style="width: 100%" />
               </el-form-item>
             </el-col>
+            <el-col :span="6">
+              <el-form-item :label="basicLabels.validityDays" prop="validityDays" required>
+                <el-input-number v-model="form.validityDays" :min="1" :max="365" style="width: 100%" />
+              </el-form-item>
+            </el-col>
           </el-row>
 
           <el-row :gutter="20">
-        <el-col :span="6">
-          <el-form-item label="有效期(天)" prop="validityDays" required>
-            <el-input-number v-model="form.validityDays" :min="1" :max="365" style="width: 100%" />
-          </el-form-item>
-        </el-col>
             <el-col :span="6">
-              <el-form-item label="报价主体" prop="supplierId" required>
-                <el-select v-model="form.supplierId" placeholder="请选择报价主体" clearable style="width: 100%" @change="handleSupplierChange">
+              <el-form-item :label="basicLabels.supplier" prop="supplierId" required>
+                <el-select v-model="form.supplierId" :placeholder="`请选择${basicLabels.supplier}`" clearable style="width: 100%" @change="handleSupplierChange">
                   <el-option v-for="supplier in supplierList" :key="supplier.id" :label="supplier.supplierName" :value="supplier.id" />
                 </el-select>
               </el-form-item>
             </el-col>
+            <el-col :span="6">
+              <el-form-item label="运费(元)" prop="freight">
+                <el-input-number v-model="form.freight" :min="0" :step="0.01" style="width: 100%" />
+              </el-form-item>
+            </el-col>
           </el-row>
         </div>
 
@@ -419,6 +422,21 @@ const formTitle = computed(() => {
   return form.value.id ? '编辑报价单' : '新建报价单';
 });
 
+const basicLabels = computed(() => {
+  const isPurchase = form.value.quoteType === 'purchase';
+  return {
+    quoteNo: '报价单编号',
+    quoteTitle: '报价主题',
+    customerName: isPurchase ? '供货商名称' : '客户名称',
+    contactName: isPurchase ? '供货商联系人' : '客户联系人',
+    opportunity: '关联商机',
+    ownerUser: isPurchase ? '采购负责人' : '负责人',
+    quoteDate: isPurchase ? '询价日期' : '报价日期',
+    validityDays: '有效期(天)',
+    supplier: isPurchase ? '采购主体' : '报价主体'
+  };
+});
+
 // 表单数据
 const form = ref<QuoteForm>({
   id: undefined,
@@ -436,6 +454,7 @@ const form = ref<QuoteForm>({
   ownerUserName: '',
   supplierId: undefined,
   supplierName: '',
+  freight: 0,
   remark: '1. 以上报价含税13%、含运费 ,款到发货 ,最终价格须盖章回传。\n2. 结算以实际到货数量为准,价格随行就市 。',
   products: []
 });
@@ -449,6 +468,7 @@ const rules = ref({
   contactId: [{ required: true, message: '请选择联系人', trigger: 'change' }],
   quoteDate: [{ required: true, message: '请选择报价日期', trigger: 'change' }],
   validityDays: [{ required: true, message: '请输入有效期', trigger: 'blur' }],
+  freight: [{ type: 'number', min: 0, message: '运费需大于等于0', trigger: 'change' }],
   ownerUserId: [{ required: true, message: '请选择负责人', trigger: 'change' }],
   supplierId: [{ required: true, message: '请选择报价主体', trigger: 'change' }],
   quoteType: [{ required: true, message: '请选择报价类型', trigger: 'change' }]
@@ -825,13 +845,28 @@ const updateQuoteTitleAndNo = () => {
     }
   }
 
-  // 更新报价主题(格式:供方简称-客户简称(报价单号))
+  // 更新报价主题
+  // 销售:供方简称-客户简称(报价单号)
+  // 采购:客户简称-供方简称(报价单号)
   // 报价单号使用当前数据的报价单号(新建时是预览格式,编辑时如果供方变化则只更新编码部分)
   if (form.value.quoteNo) {
-    form.value.quoteTitle = `${supplierShortName}-${customerShortNameValue}(${form.value.quoteNo})`;
+    const isPurchase = form.value.quoteType === 'purchase';
+    if (isPurchase) {
+      // 采购:客户简称-供方简称(报价单号)
+      form.value.quoteTitle = `${customerShortNameValue || ''}-${supplierShortName}(${form.value.quoteNo})`;
+    } else {
+      // 销售:供方简称-客户简称(报价单号)
+      form.value.quoteTitle = `${supplierShortName}-${customerShortNameValue || ''}(${form.value.quoteNo})`;
+    }
   }
 };
 
+/** 报价类型变化处理 */
+const handleQuoteTypeChange = () => {
+  // 报价类型变化时,更新报价主题
+  updateQuoteTitleAndNo();
+};
+
 /** 报价主体变化处理 */
 const handleSupplierChange = (supplierId: number | undefined) => {
   if (!supplierId) {
@@ -1164,9 +1199,15 @@ const handleSaveDraft = () => {
         form.value.attachments = attachmentsWithCategory.length > 0 ? JSON.stringify(attachmentsWithCategory) : '';
 
         // 新增时,如果报价单号包含预览标记(***),清空让后端重新生成
+        // 注意:如果报价单号不是预览格式,说明已经有正式报价单号,应该保留前端生成的报价主题
         if (!form.value.id && form.value.quoteNo && form.value.quoteNo.includes('***')) {
           form.value.quoteNo = '';
           form.value.quoteTitle = ''; // 清空报价主题,让后端重新生成
+        } else if (!form.value.id && form.value.quoteNo && !form.value.quoteNo.includes('***')) {
+          // 如果有正式报价单号但没有报价主题,根据报价类型生成
+          if (!form.value.quoteTitle) {
+            updateQuoteTitleAndNo();
+          }
         }
 
         if (form.value.id) {
@@ -1347,6 +1388,42 @@ onMounted(() => {
   margin-top: 10px;
 }
 
+.quote-type-row {
+  margin-bottom: 12px;
+}
+
+.quote-type-col {
+  display: flex;
+  justify-content: center;
+}
+
+.quote-type-item {
+  margin-bottom: 0;
+  align-items: center;
+}
+
+.quote-type-item :deep(.el-form-item__label) {
+  display: flex;
+  align-items: center;
+  min-height: 56px;
+  line-height: 56px;
+}
+
+.quote-type-item :deep(.el-form-item__content) {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+
+.quote-type-item :deep(.el-radio-button__inner) {
+  padding: 14px 26px;
+  font-size: 16px;
+}
+
+.quote-type-wrapper {
+  margin-bottom: 4px;
+}
+
 .card-header {
   display: flex;
   justify-content: space-between;

+ 32 - 20
web/src/views/crm/quote/index.vue

@@ -495,17 +495,17 @@
           <!-- 基本信息 -->
           <el-tab-pane label="基本信息" name="basic">
             <el-descriptions :column="2" border>
-              <el-descriptions-item label="报价单号">{{ detailQuote?.quoteNo }}</el-descriptions-item>
-              <el-descriptions-item label="报价单标题">{{ detailQuote?.quoteTitle }}</el-descriptions-item>
-            <el-descriptions-item label="报价类型">
-              <el-tag :type="getQuoteTypeTag(detailQuote?.quoteType)">
-                {{ getQuoteTypeLabel(detailQuote?.quoteType) }}
-              </el-tag>
-            </el-descriptions-item>
-              <el-descriptions-item label="客户名称">
+              <el-descriptions-item :label="detailLabels.quoteNo">{{ detailQuote?.quoteNo }}</el-descriptions-item>
+              <el-descriptions-item :label="detailLabels.quoteTitle">{{ detailQuote?.quoteTitle }}</el-descriptions-item>
+              <el-descriptions-item label="报价类型">
+                <el-tag :type="getQuoteTypeTag(detailQuote?.quoteType)">
+                  {{ getQuoteTypeLabel(detailQuote?.quoteType) }}
+                </el-tag>
+              </el-descriptions-item>
+              <el-descriptions-item :label="detailLabels.customerName">
                 <el-link type="primary" @click="handleDetailViewCustomer">{{ detailQuote?.customerName }}</el-link>
               </el-descriptions-item>
-              <el-descriptions-item label="联系人">{{ detailQuote?.contactName }}</el-descriptions-item>
+              <el-descriptions-item :label="detailLabels.contactName">{{ detailQuote?.contactName }}</el-descriptions-item>
               <el-descriptions-item label="联系手机">{{ detailQuote?.contactMobile }}</el-descriptions-item>
               <el-descriptions-item label="联系邮箱">{{ detailQuote?.contactEmail }}</el-descriptions-item>
               <el-descriptions-item label="版本号">
@@ -515,14 +515,17 @@
               <el-descriptions-item label="状态">
                 <dict-tag :options="crm_quote_status" :value="detailQuote?.status" />
               </el-descriptions-item>
-              <el-descriptions-item label="报价日期">{{ detailQuote?.quoteDate }}</el-descriptions-item>
+              <el-descriptions-item :label="detailLabels.quoteDate">{{ detailQuote?.quoteDate }}</el-descriptions-item>
               <el-descriptions-item label="有效期至">
                 <span :style="{ color: getDetailExpireDateColor(detailQuote?.expireDate) }">
                   {{ detailQuote?.expireDate }} ({{ getDetailDaysRemaining(detailQuote?.expireDate) }})
                 </span>
               </el-descriptions-item>
-              <el-descriptions-item label="负责人">{{ detailQuote?.ownerUserName }}</el-descriptions-item>
-              <el-descriptions-item label="报价主体">{{ detailQuote?.supplierName || '-' }}</el-descriptions-item>
+              <el-descriptions-item label="运费(元)">
+                <span>¥{{ formatDetailAmount(detailQuote?.freight) }}</span>
+              </el-descriptions-item>
+              <el-descriptions-item :label="detailLabels.ownerUser">{{ detailQuote?.ownerUserName }}</el-descriptions-item>
+              <el-descriptions-item :label="detailLabels.supplier">{{ detailQuote?.supplierName || '-' }}</el-descriptions-item>
               <el-descriptions-item label="创建时间">{{ parseTime(detailQuote?.createTime) }}</el-descriptions-item>
             </el-descriptions>
 
@@ -792,7 +795,7 @@
 </template>
 
 <script setup lang="ts" name="QuoteIndex">
-import { ref, reactive, onMounted, nextTick, getCurrentInstance, toRefs, watch, type ComponentInternalInstance } from 'vue';
+import { ref, reactive, onMounted, nextTick, getCurrentInstance, toRefs, watch, computed, type ComponentInternalInstance } from 'vue';
 import { useRouter } from 'vue-router';
 import { useClipboard } from '@vueuse/core';
 import type { FormInstance } from 'element-plus';
@@ -1138,6 +1141,19 @@ const detailApprovalList = ref<QuoteApprovalVO[]>([]);
 const detailVersions = ref<QuoteVO[]>([]);
 const customerDetailRef = ref();
 
+const detailLabels = computed(() => {
+  const isPurchase = detailQuote.value?.quoteType === 'purchase';
+  return {
+    quoteNo: '报价单编号',
+    quoteTitle: '报价主题',
+    customerName: isPurchase ? '供货商名称' : '客户名称',
+    contactName: isPurchase ? '供货商联系人' : '客户联系人',
+    ownerUser: isPurchase ? '采购负责人' : '负责人',
+    quoteDate: isPurchase ? '询价日期' : '报价日期',
+    supplier: isPurchase ? '采购主体' : '报价主体'
+  };
+});
+
 /** 查询列表 */
 const getList = async () => {
   loading.value = true;
@@ -1619,17 +1635,13 @@ const generateQuoteTemplate = (quote: QuoteVO, supplierInfo?: SupplierInfoVO): s
 
   const demandName = isPurchaseQuote ? supplierName : customerName;
   const supplyName = isPurchaseQuote ? customerName : supplierName;
-  const demandContactDisplay = addSpaceBetweenChars(
-    isPurchaseQuote ? supplierContactName : customerContactName
-  );
-  const supplyContactDisplayName = addSpaceBetweenChars(
-    isPurchaseQuote ? customerContactName : supplierContactName
-  );
+  const demandContactDisplay = addSpaceBetweenChars(isPurchaseQuote ? supplierContactName : customerContactName);
+  const supplyContactDisplayName = addSpaceBetweenChars(isPurchaseQuote ? customerContactName : supplierContactName);
   const supplyContactPhone = isPurchaseQuote ? customerContactPhone : supplierContactPhone;
 
   // 根据供应商编码决定是否显示Logo和背景图片
   const showLogo = supplierCode === 'SX';
-  const brandName = showLogo ? '山峡' : (supplierShortName || supplierName || '山峡');
+  const brandName = showLogo ? '山峡' : supplierShortName || supplierName || '山峡';
   const quoteTitle = `${brandName}${quoteTypeLabel}报价单`;
   // 根据供应商编码选择印章图片
   const sealImg = supplierCode === 'SX' ? yzImg : supplierCode === 'YD' ? ydImg : null;