From 45d4fe24016c03fcccbe7c9798533ca97e2e7aea Mon Sep 17 00:00:00 2001
From: yxh <172933527@qq.com>
Date: 星期四, 03 十二月 2026 16:59:34 +0800
Subject: [PATCH] 回款新增和修改问题

---
 src/views/project/fund/performancedetails/index.vue |  124 +++++++++++++++++++++++++++--------------
 1 files changed, 81 insertions(+), 43 deletions(-)

diff --git a/src/views/project/fund/performancedetails/index.vue b/src/views/project/fund/performancedetails/index.vue
index d7fe7fe..fe9e8b3 100644
--- a/src/views/project/fund/performancedetails/index.vue
+++ b/src/views/project/fund/performancedetails/index.vue
@@ -251,33 +251,6 @@
               </template>
             </el-table-column>
             <el-table-column
-              prop="vatAmount"
-              align="right"
-              header-align="right"
-              class-name="money-column"
-              label="澧炲�肩◣"
-              width="110"
-              :formatter="formatMoney"
-            />
-            <el-table-column
-              prop="cityTaxAmount"
-              align="right"
-              header-align="right"
-              class-name="money-column"
-              label="鍩庡缓绋�"
-              width="110"
-              :formatter="formatMoney"
-            />
-            <el-table-column
-              prop="laborPretaxAmount"
-              align="right"
-              header-align="right"
-              class-name="money-column"
-              label="鍔冲姟绋庡墠"
-              width="120"
-              :formatter="formatMoney"
-            />
-            <el-table-column
               prop="taxamount"
               align="right"
               header-align="right"
@@ -290,7 +263,7 @@
                   @blur="normalizeMoney(scope.row, 'taxamount'); chargeSum()"
                   v-model="scope.row.taxamount"
                   class="money-input"
-                  placeholder="鍔冲姟涓◣"
+                  placeholder="涓◣"
                 />
               </template>
             </el-table-column>
@@ -299,14 +272,14 @@
               align="right"
               header-align="right"
               class-name="money-column"
-              label="鍔冲姟绋庡悗"
+              label="绋庡悗閲戦"
               width="120"
              :formatter="formatMoney">
               <template slot-scope="scope">
                 <el-input
                   v-model="scope.row.taxedamount"
                   class="money-input"
-                  placeholder="鍔冲姟绋庡悗"
+                  placeholder="绋庡悗閲戦"
                   @blur="normalizeMoney(scope.row, 'taxedamount'); queenchargeSum()"
                 />
               </template>
@@ -462,7 +435,24 @@
                 </el-button>
                 <el-button
                   @click.native.prevent="
-                    Filepopup(scope.$index, rbDetails, scope.row)
+                    /**
+     * 2026-11-30锛氭竻绌虹エ鎹脊绐楅瑙堢姸鎬侊紙鍚� embeddedFile / invoiceEmbeddedFile锛夛紝
+     * 閬垮厤鍐嶆鎵撳紑寮圭獥鏃朵粛鏄剧ず涓婁竴娆¢�夋嫨鐨勭エ鎹浘鐗囥��
+     */
+    resetPreviewState() {
+      this.fileListto = [];
+      this.invoicefileListto = [];
+      this.pdfimg = "";
+      this.invoicepdfimg = "";
+      this.pdfimgsrcList = [];
+      this.invoicepdfimgsrcList = [];
+      this.embeddedFile = null;
+      this.invoiceEmbeddedFile = null;
+      this.pdftitle = "";
+      this.previewToken = (this.previewToken || 0) + 1;
+    },
+
+    Filepopup(scope.$index, rbDetails, scope.row)
                   "
                   type="text"
                   size="small"
@@ -733,7 +723,7 @@
                 </el-upload>
                 <el-table
                   :data="fileListto"
-                  @row-click="downFile"
+                  @row-click="previewInline" @row-dblclick="downFile"
                   style="width: 100%"
                   height="400"
                 >
@@ -821,7 +811,7 @@
                 </el-upload>
                 <el-table
                   :data="invoicefileListto"
-                  @row-click="downFile"
+                  @row-click="previewInline" @row-dblclick="downFile"
                   style="width: 100%"
                   height="400"
                 >
@@ -1283,6 +1273,7 @@
       invoicefileListto: [],
       invoicepdfimg: "",
       invoicepdfimgsrcList: [],
+      previewToken: 0,
       activeName: 2, //鏂囦欢绫诲瀷锛氶粯璁ゅ彂绁ㄦ枃浠�
       //涓婁紶闄勪欢璺緞
       uploadFileUrl: process.env.VUE_APP_BASE_API + "/common/upload",
@@ -2714,6 +2705,9 @@
         this.rbDetails.splice(rowIndex + 1, 0, rowData);
         console.log(14);
       }
+      // 2026-11-30锛氭柊澧炶鍚庢妸褰撳墠鎿嶄綔琛屽垏鍒版柊琛岋紝骞舵竻绌轰笂涓�娆$殑棰勮鎬�
+      this.atpresent = this.rbDetails.indexOf(rowData);
+      this.resetPreviewState();
       this.Reminderquantity++;
       this.totalquantity++;
       for (let i = 0; i < this.rbDetails.length; i++) {
@@ -2837,14 +2831,30 @@
       this.showSelectionDialog = false;
     },
     handleUploadError() {},
+    /** 2026-11-23锛氭寜鏂囦欢鍚嶄粠鍒楄〃涓簿纭垹闄や竴椤癸紝閬垮厤鐢ㄩ瑙堝垪琛�(blob)鏁磋〃瑕嗙洊闄勪欢瀛楁 */
+    spliceByName(list, name) {
+      if (!list || !name) {
+        return;
+      }
+      const idx = list.findIndex(item => item && item.name === name);
+      if (idx > -1) {
+        list.splice(idx, 1);
+      }
+    },
     remove(file, fileList) {
       const rbDetails = [...this.rbDetails];
       if (this.activeName == 1) {
-        this.fileListto.splice(this.fileListto.indexOf(file), 1);
-        rbDetails[this.atpresent].annexfilesList = this.fileListto;
+        this.spliceByName(this.fileListto, file && file.name);
+        this.spliceByName(
+          rbDetails[this.atpresent].annexfilesList,
+          file && file.name
+        );
       } else {
-        this.invoicefileListto.splice(this.invoicefileListto.indexOf(file), 1);
-        rbDetails[this.atpresent].invoicefilesList = this.invoicefileListto;
+        this.spliceByName(this.invoicefileListto, file && file.name);
+        this.spliceByName(
+          rbDetails[this.atpresent].invoicefilesList,
+          file && file.name
+        );
       }
     },
     // 鑾峰彇璇锋眰澶�
@@ -2972,12 +2982,8 @@
       };
 
       this.tableDatatop = [];
-      this.fileListto = [];
-      this.invoicefileListto = [];
-      this.pdfimg = "";
-      this.invoicepdfimg = [];
-      this.pdfimgsrcList = [];
-      this.invoicepdfimgsrcList = [];
+      this.resetPreviewState();
+      const previewToken = ++this.previewToken;
       this.tableDatatop.push(row);
       this.atpresent = index;
       this.pdfVisible = true;
@@ -3002,6 +3008,10 @@
         );
 
         Promise.all(fetchPromises).then(fileListto => {
+          // 2026-11-30锛氬垏鎹㈣鍚庝涪寮冭繃鏈熺粨鏋�
+          if (previewToken !== this.previewToken) {
+            return;
+          }
           this.fileListto = fileListto.filter(item => item !== null);
           this.pdfimg = this.fileListto[0].url;
           console.log(this.pdfimg, "pdfimg");
@@ -3035,6 +3045,10 @@
         );
 
         Promise.all(fetchPromises).then(invoicefileListto => {
+          // 2026-11-30锛氬垏鎹㈣鍚庝涪寮冭繃鏈熺粨鏋�
+          if (previewToken !== this.previewToken) {
+            return;
+          }
           this.invoicefileListto = invoicefileListto.filter(
             item => item !== null
           );
@@ -3062,6 +3076,30 @@
     },
 
     // 鐐瑰嚮宸蹭笂浼犳枃浠讹細鍦ㄩ檮浠跺脊绐楀彸渚у唴宓岄瑙�
+    /**
+     * 2026-11-30锛氬崟鍑诲垪琛ㄩ」 鈫� 鍦ㄦ湰椤甸瑙堬紙鍙充晶 preview-pane锛夈��
+     * 鍙屽嚮鎵嶆墦寮�鐙珛鐨勯瑙堥〉闈紙downFile 鈫� $previewFile锛夈��
+     */
+    previewInline(row) {
+      if (!row) {
+        return;
+      }
+      const url = row.previewUrl || row.url;
+      if (!url) {
+        return;
+      }
+      const file = {
+        name: row.name || "",
+        url,
+        type: /\.pdf$/i.test(row.name || "") ? "pdf" : "image"
+      };
+      if (this.activeName == 2) {
+        this.invoiceEmbeddedFile = file;
+      } else {
+        this.embeddedFile = file;
+      }
+    },
+
     downFile(item) {
       if (this.operationType == "detail") {
         const source =

--
Gitblit v1.9.3