From 39b2b67a94947f5dca9fa52ae4a2e561bf3e2576 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期二, 03 三月 2026 09:50:27 +0800
Subject: [PATCH] 公司 1.商机管理添加字段合同金额与付款描述字段,以及其他字段优化修改

---
 src/views/procurementManagement/procurementLedger/index.vue |   53 +++++++++++++++++++++++++++++++++++++++++++----------
 1 files changed, 43 insertions(+), 10 deletions(-)

diff --git a/src/views/procurementManagement/procurementLedger/index.vue b/src/views/procurementManagement/procurementLedger/index.vue
index 22d9aae..9f62ddf 100644
--- a/src/views/procurementManagement/procurementLedger/index.vue
+++ b/src/views/procurementManagement/procurementLedger/index.vue
@@ -56,8 +56,8 @@
         height="calc(100vh - 18.5em)"
         stripe
       >
-        <el-table-column align="center" type="selection" width="55" />
-        <el-table-column type="expand">
+        <el-table-column align="center" type="selection" width="55" fixed="left"/>
+        <el-table-column type="expand" fixed="left">
           <template #default="props">
             <el-table
               :data="props.row.children"
@@ -95,21 +95,24 @@
             </el-table>
           </template>
         </el-table-column>
-        <el-table-column align="center" label="搴忓彿" type="index" width="60" />
+        <el-table-column align="center" label="搴忓彿" type="index" width="60" fixed="left"/>
         <el-table-column
           label="閲囪喘鍚堝悓鍙�"
           prop="purchaseContractNumber"
           width="200"
+					fixed="left"
           show-overflow-tooltip
         />
         <el-table-column
           label="閿�鍞悎鍚屽彿"
           prop="salesContractNo"
           width="200"
+					fixed="left"
           show-overflow-tooltip
         />
         <el-table-column
           label="渚涘簲鍟嗗悕绉�"
+					fixed="left"
           width="240"
           prop="supplierName"
           show-overflow-tooltip
@@ -148,7 +151,7 @@
         <el-table-column
           fixed="right"
           label="鎿嶄綔"
-          min-width="150"
+          min-width="200"
           align="center"
         >
           <template #default="scope">
@@ -157,17 +160,26 @@
               type="primary"
               size="small"
               @click="openForm('edit', scope.row)"
-							:disabled="scope.row.receiptPaymentAmount>0 || scope.row.recorderName !== userStore.nickName"
-              >缂栬緫</el-button
+              :disabled="scope.row.recorderName !== userStore.nickName"
             >
+              缂栬緫
+            </el-button>
+            <el-button
+              link
+              type="primary"
+              size="small"
+              @click="openAttachmentDialog(scope.row)"
+            >
+              闄勪欢
+            </el-button>
             <el-button
               link
               type="success"
               size="small"
               @click="showQRCode(scope.row)"
-              >鐢熸垚浜岀淮鐮�</el-button
             >
-
+              鐢熸垚浜岀淮鐮�
+            </el-button>
           </template>
         </el-table-column>
       </el-table>
@@ -766,6 +778,7 @@
         </div>
       </template>
     </el-dialog>
+    <FileList ref="fileListRef" />
   </div>
 </template>
 
@@ -795,6 +808,7 @@
 } from "@/api/procurementManagement/procurementLedger.js";
 import useFormData from "@/hooks/useFormData.js";
 import QRCode from "qrcode";
+import FileList from "@/views/salesManagement/salesLedger/fileList.vue";
 const { proxy } = getCurrentInstance();
 const tableData = ref([]);
 const productData = ref([]);
@@ -812,6 +826,7 @@
 });
 const total = ref(0);
 const fileList = ref([]);
+const fileListRef = ref(null);
 import useUserStore from "@/store/modules/user";
 import { modelList, productTreeList } from "@/api/basicData/product.js";
 import dayjs from "dayjs";
@@ -1044,8 +1059,8 @@
 // 涓婁紶鍓嶆牎妫�
 function handleBeforeUpload(file) {
   // 鏍℃鏂囦欢澶у皬
-  if (file.size > 1024 * 1024 * 10) {
-    proxy.$modal.msgError("涓婁紶鏂囦欢澶у皬涓嶈兘瓒呰繃10MB!");
+  if (file.size > 1024 * 1024 * 50) {
+    proxy.$modal.msgError("涓婁紶鏂囦欢澶у皬涓嶈兘瓒呰繃50MB!");
     return false;
   }
   proxy.$modal.loading("姝e湪涓婁紶鏂囦欢锛岃绋嶅��...");
@@ -1244,6 +1259,24 @@
       });
   }
 };
+
+// 鎵撳紑闄勪欢鍒楄〃瀵硅瘽妗�
+const openAttachmentDialog = (row) => {
+  if (!row?.id) {
+    proxy.$modal.msgWarning("鏃犳硶鑾峰彇璇ヨ鏁版嵁鐨処D");
+    return;
+  }
+  getPurchaseById({ id: row.id, type: 2 }).then((res) => {
+    const files = res.salesLedgerFiles || [];
+    if (!files.length) {
+      proxy.$modal.msgWarning("鏆傛棤闄勪欢");
+      return;
+    }
+    if (fileListRef.value && typeof fileListRef.value.open === "function") {
+      fileListRef.value.open(files);
+    }
+  });
+};
 // 鍏抽棴浜у搧寮规
 const closeProductDia = () => {
   proxy.resetForm("productFormRef");

--
Gitblit v1.9.3