From 018ac11ffce99df1efe62edcc726268b012c766c Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期二, 29 九月 2026 14:30:12 +0800
Subject: [PATCH] 新疆-融邦 1.协同办公-协同审批:采购及销售审批进入销售流程后也可预览在台账上传的附件 2.销售合同号只有直销时显示,别的时候隐藏 3.付款方式设置选项-网银-现金-微信-支票-承兑汇票

---
 src/views/salesManagement/salesLedger/index.vue                                                |   16 +++++++++++-----
 src/views/officeProcessAutomation/ApproveManage/approve-list/components/ApproveDetailPanel.vue |   39 ++++++++++++++++++++++++++++++++++-----
 2 files changed, 45 insertions(+), 10 deletions(-)

diff --git a/src/views/officeProcessAutomation/ApproveManage/approve-list/components/ApproveDetailPanel.vue b/src/views/officeProcessAutomation/ApproveManage/approve-list/components/ApproveDetailPanel.vue
index 807c458..1910cdc 100644
--- a/src/views/officeProcessAutomation/ApproveManage/approve-list/components/ApproveDetailPanel.vue
+++ b/src/views/officeProcessAutomation/ApproveManage/approve-list/components/ApproveDetailPanel.vue
@@ -193,11 +193,12 @@
         </div>
       </template>
     </div>
-    <div v-if="attachmentList.length"
+    <div v-for="group in attachmentGroups"
+         :key="group.title"
          class="detail-block">
-      <div class="detail-block-title">闄勪欢鍒楄〃</div>
+      <div class="detail-block-title">{{ group.title }}</div>
       <div class="attachment-list">
-        <div v-for="file in attachmentList"
+        <div v-for="file in group.files"
              :key="file.id"
              class="attachment-item">
           <el-icon class="file-icon">
@@ -211,7 +212,7 @@
             <el-link v-if="file.previewURL || file.url"
                      type="primary"
                      :underline="false"
-                     @click="openFile(file.previewURL || file.url)">棰勮</el-link>
+                     @click="previewFile(file.previewURL || file.url)">棰勮</el-link>
             <el-divider v-if="(file.previewURL || file.url) && file.downloadURL"
                         direction="vertical" />
             <el-link v-if="file.downloadURL"
@@ -222,12 +223,14 @@
         </div>
       </div>
     </div>
+    <filePreview ref="filePreviewRef" />
   </div>
 </template>
 
 <script setup>
-  import { computed } from "vue";
+  import { computed, ref } from "vue";
   import { Paperclip } from "@element-plus/icons-vue";
+  import filePreview from "@/components/filePreview/index.vue";
   import { formatDisplayTime } from "../../approve-template/approveTemplateConstants.js";
   import {
     approvalTypeLabel,
@@ -245,6 +248,8 @@
 
   const formResolved = computed(() => resolveInstanceFormFields(props.row));
 
+  const filePreviewRef = ref();
+
 
   // 鏄惁涓虹壒娈婂鎵圭被鍨嬶紙閲囪喘銆佸彂璐с�佹姤浠枫�侀攢鍞彴璐︼級
   const isSpecialApprovalType = computed(() => {
@@ -261,6 +266,30 @@
     return Array.isArray(list) ? list : [];
   });
 
+  // 鍙拌处鑷韩闄勪欢锛氶攢鍞彴璐� listPage 杩斿洖 storageBlobVOs锛岄噰璐彴璐� getPurchaseByCode 杩斿洖 storageBlobVOS
+  const businessAttachments = computed(() => {
+    if (![5, 19].includes(props.row.businessType)) return [];
+    const detail = props.detailData || {};
+    const candidates = [detail.storageBlobVOs, detail.storageBlobVOS, detail.storageBlobVOList];
+    return candidates.find(list => Array.isArray(list) && list.length) || [];
+  });
+
+  const attachmentGroups = computed(() => {
+    const groups = [];
+    if (businessAttachments.value.length) {
+      groups.push({ title: "鍙拌处闄勪欢", files: businessAttachments.value });
+    }
+    if (attachmentList.value.length) {
+      groups.push({ title: "瀹℃壒闄勪欢", files: attachmentList.value });
+    }
+    return groups;
+  });
+
+  function previewFile(url) {
+    if (!url) return;
+    filePreviewRef.value?.open(url);
+  }
+
   function openFile(url) {
     if (!url) return;
     window.open(url, "_blank");
diff --git a/src/views/salesManagement/salesLedger/index.vue b/src/views/salesManagement/salesLedger/index.vue
index b6ba5f0..a4a18e1 100644
--- a/src/views/salesManagement/salesLedger/index.vue
+++ b/src/views/salesManagement/salesLedger/index.vue
@@ -11,7 +11,7 @@
             @change="handleQuery"
           />
         </el-form-item>
-        <el-form-item label="閿�鍞悎鍚屽彿锛�">
+        <el-form-item v-if="activeTab === '鍗栨补'" label="閿�鍞悎鍚屽彿锛�">
           <el-input
             v-model="searchForm.salesContractNo"
             placeholder="璇疯緭鍏�"
@@ -151,6 +151,7 @@
         </el-table-column>
         <el-table-column align="center" label="搴忓彿" type="index" width="60" />
         <el-table-column
+          v-if="activeTab === '鍗栨补'"
           label="閿�鍞悎鍚屽彿"
           prop="salesContractNo"
           width="180"
@@ -356,7 +357,7 @@
           </el-col>
         </el-row>
         <el-row :gutter="30">
-          <el-col :span="12">
+          <el-col v-if="form.ledgerType !== '浠e偍'" :span="12">
             <el-form-item label="閿�鍞悎鍚屽彿锛�" prop="salesContractNo">
               <div
                 style="
@@ -467,7 +468,7 @@
                 style="width: 100%"
               >
                 <el-option
-                  v-for="item in payment_methods"
+                  v-for="item in checkout_payment"
                   :key="item.value"
                   :label="item.label"
                   :value="item.value"
@@ -1332,11 +1333,11 @@
 const userStore = useUserStore();
 const { proxy } = getCurrentInstance();
 const { tax_rate } = proxy.useDict("tax_rate");
-const { payment_methods } = proxy.useDict("payment_methods");
+const { checkout_payment } = proxy.useDict("checkout_payment");
 // 浠樻鏂瑰紡瀛樼殑鏄瓧鍏� value锛屽洖鏄捐杞垚 label锛涙敼閫犲墠鐨勮�佹暟鎹槸鑷敱鏂囨湰锛屽彇涓嶅埌灏卞師鏍锋樉绀�
 const getPaymentMethodLabel = (value) => {
   if (value === undefined || value === null || value === "") return "-";
-  const item = payment_methods.value?.find(
+  const item = checkout_payment.value?.find(
     (m) => String(m.value) === String(value)
   );
   return item?.label ?? value;
@@ -1888,6 +1889,8 @@
 };
 // 椤电鍒囨崲锛氭崲 ledgerType 閲嶆柊鏌ュ垪琛�
 const handleTabChange = () => {
+  // 浠e偍涓嶅睍绀洪攢鍞悎鍚屽彿锛屽埆鎶婇殣钘忕殑鎼滅储鏉′欢甯﹁繃鍘�
+  if (activeTab.value === "浠e偍") searchForm.salesContractNo = "";
   page.current = 1;
   expandedRowKeys.value = [];
   getList();
@@ -2136,6 +2139,9 @@
           form.value.tonnage = null;
         }
         delete form.value.productData;
+        // 浠e偍涓嶅睍绀洪攢鍞悎鍚屽彿锛屾竻鎺夐伩鍏嶉殣钘忓瓧娈垫妸鍗栨补鏃剁殑鍊兼彁浜や笂鍘�
+        form.value.salesContractNo = "";
+        form.value.autoGenerateContractNo = false;
       } else {
         // 鍗栨补锛氬悎鍚岄噾棰濈敱浜у搧鏄庣粏姹囨�伙紝浠e偍瀛楁娓呯┖
         if (productData.value !== null && productData.value.length > 0) {

--
Gitblit v1.9.3