From 531d433ab95e1c5ca48637eca9dc157380f675c0 Mon Sep 17 00:00:00 2001
From: yxh <172933527@qq.com>
Date: 星期四, 12 十一月 2026 18:37:05 +0800
Subject: [PATCH] 修改了个税功能

---
 src/views/project/fund/applyDetail/index.vue |  370 +++++++++++++++++++++++++++++++++-------------------
 1 files changed, 233 insertions(+), 137 deletions(-)

diff --git a/src/views/project/fund/applyDetail/index.vue b/src/views/project/fund/applyDetail/index.vue
index b4b6494..b929c31 100644
--- a/src/views/project/fund/applyDetail/index.vue
+++ b/src/views/project/fund/applyDetail/index.vue
@@ -49,7 +49,7 @@
           </el-col>
           <el-col :span="5" v-if="ismanager == true">
             <el-form-item label="鐢宠閲戦" prop="pretaxcost">
-              <el-input v-model="form.pretaxcost" placeholder="绋庡墠閲戦鍚堣" :disabled="true" />
+              <el-input :value="formatMoneyValue(form.pretaxcost)" class="money-input" placeholder="绋庡墠閲戦鍚堣" :disabled="true" />
             </el-form-item>
           </el-col>
           <el-col :span="5">
@@ -124,7 +124,7 @@
         </el-row>
         <el-row>
           <el-table :data="rbDetails" v-loading="loading" max-height="800" border highlight-current-row>
-            <el-table-column prop="orderno" align="center" label="搴忓彿" width="88">
+            <el-table-column prop="orderno" align="center" label="搴忓彿" width="75">
               <template slot-scope="scope">
                 <el-input v-model="scope.row.orderno" placeholder="搴忓彿" />
               </template>
@@ -155,7 +155,7 @@
                 </el-select>
               </template>
             </el-table-column>
-            <el-table-column prop="price" align="center" label="鍗曚环" width="120" v-if="businessType == 4">
+            <el-table-column prop="price" align="right" header-align="right" label="鍗曚环" width="120" v-if="businessType == 4" class-name="money-column" :formatter="formatMoney">
               <template slot-scope="scope">
                 <el-input v-model="scope.row.price" placeholder="鍗曚环" @blur="
                   val => {
@@ -173,23 +173,29 @@
                 " />
               </template>
             </el-table-column>
-            <el-table-column prop="amount" align="center" :label="amountlabel" width="120">
+            <el-table-column prop="amount" align="right" header-align="right" class-name="money-column" :label="amountlabel" width="120" :formatter="formatMoney">
               <template slot-scope="scope">
-                <el-input v-model="scope.row.amount" placeholder="閲戦" />
+                <el-input v-model="scope.row.amount" class="money-input" placeholder="閲戦" @blur="normalizeMoney(scope.row, 'amount')" />
               </template>
             </el-table-column>
-            <el-table-column prop="taxamount" align="center" label="鎵g◣閲戦" width="120" v-if="
+            <el-table-column prop="vatAmount" align="right" header-align="right" class-name="money-column" label="澧炲�肩◣" width="110" :formatter="formatMoney"
+              v-if="businessType == '1'" />
+            <el-table-column prop="cityTaxAmount" align="right" header-align="right" class-name="money-column" label="鍩庡缓绋�" width="110" :formatter="formatMoney"
+              v-if="businessType == '1'" />
+            <el-table-column prop="laborPretaxAmount" align="right" header-align="right" class-name="money-column" label="鍔冲姟绋庡墠" width="120" :formatter="formatMoney"
+              v-if="businessType == '1'" />
+            <el-table-column prop="taxamount" align="right" header-align="right" class-name="money-column" label="鍔冲姟涓◣" width="120" v-if="
               ismanager == true &&
               (businessType == '1' || businessType == '2')
-            ">
+            " :formatter="formatMoney">
               <template slot-scope="scope">
-                <el-input v-model="scope.row.taxamount" placeholder="鎵g◣閲戦" />
+                <el-input v-model="scope.row.taxamount" class="money-input" placeholder="鍔冲姟涓◣" @blur="normalizeMoney(scope.row, 'taxamount')" />
               </template>
             </el-table-column>
-            <el-table-column prop="taxedamount" align="center" label="绋庡悗閲戦" width="120"
-              v-if="businessType == '1' || businessType == '2'">
+            <el-table-column prop="taxedamount" align="right" header-align="right" class-name="money-column" label="鍔冲姟绋庡悗" width="120"
+              v-if="businessType == '1' || businessType == '2'" :formatter="formatMoney">
               <template slot-scope="scope">
-                <el-input v-model="scope.row.taxedamount" placeholder="绋庡悗閲戦" />
+                <el-input v-model="scope.row.taxedamount" class="money-input" placeholder="鍔冲姟绋庡悗" @blur="normalizeMoney(scope.row, 'taxedamount')" />
               </template>
             </el-table-column>
             <el-table-column prop="beneficiaryname" column-key="sdad" align="center" :label="beneficiarylabel"
@@ -283,7 +289,7 @@
               <el-upload size="mini" class="upload-demo" :action="uploadFileUrl" :file-list="fileListto"
                 :show-file-list="false" multiple drag :headers="headers" :on-success="(response, file, fileList) =>
                   uploadSccess(response, file, fileList)
-                  " :on-preview="downFile" :disabled="operationType == 'detail'" :on-error="handleUploadError"
+                  " :on-preview="downFile" :disabled="operationType == 'detail'" :on-error="handleUploadError" :before-upload="beforeUploadCheck"
                 :on-remove="remove" accept="image/*,.pdf">
                 <i class="el-icon-upload"></i>
                 <div class="el-upload__text">
@@ -291,7 +297,14 @@
                   <em><el-button :disabled="operationType == 'detail'" size="small" type="primary">鐐瑰嚮涓婁紶</el-button></em>
                 </div>
               </el-upload>
-              <el-table :data="fileListto" @row-click="downFile" style="width: 100%" height="400">
+              <div
+                v-if="operationType == 'detail'"
+                class="upload-disabled-tip"
+              >
+                <i class="el-icon-warning-outline" />
+                褰撳墠涓烘煡鐪嬫ā寮忥紝涓嶈兘涓婁紶闄勪欢
+              </div>
+              <el-table ref="annexTable" :data="fileListto" :row-class-name="annexRowClass" @row-click="downFile" style="width: 100%" height="400">
                 <el-table-column prop="name" :show-overflow-tooltip="true" label="鍚嶇О">
                   <template slot-scope="scope">
                     <i style="color:#409EFF" class=" el-icon-s-order" />{{
@@ -516,16 +529,33 @@
       </span>
     </el-dialog>
     <el-dialog v-dialogDrags :modal="false" :close-on-click-modal="false" :title="pdftitle" :visible.sync="pdfVisible"
-      width="60%">
+      :fullscreen="pdfFullscreen" width="60%" custom-class="pdf-resize-dialog" @closed="pdfFullscreen = false">
+      <template slot="title">
+        <span>{{ pdftitle }}</span>
+        <el-button class="pdf-fullscreen-btn" size="mini"
+          :icon="pdfFullscreen ? 'el-icon-close' : 'el-icon-full-screen'"
+          @click="pdfFullscreen = !pdfFullscreen">{{ pdfFullscreen ? "杩樺師" : "鍏ㄥ睆" }}</el-button>
+      </template>
+      <el-alert
+        :title="
+          activeName == 'invoice'
+            ? '褰撳墠姝e湪鎿嶄綔锛氬彂绁ㄦ枃浠讹紙璇风‘璁ょエ鎹睘浜庡彂绁級'
+            : '褰撳墠姝e湪鎿嶄綔锛氭櫘閫氶檮浠讹紙璇峰嬁鍦ㄦ涓婁紶鍙戠エ锛�'
+        "
+        :type="activeName == 'invoice' ? 'success' : 'warning'"
+        :closable="false"
+        show-icon
+        style="margin-bottom: 10px;"
+      />
       <div style="margin-bottom: 10px;">
         <el-table :data="tableDatatop" style="width: 100%">
-          <el-table-column v-if="businessType == 4" prop="price" align="center" label="鍗曚环">
+          <el-table-column v-if="businessType == 4" prop="price" align="right" header-align="right" class-name="money-column" label="鍗曚环" :formatter="formatMoney">
           </el-table-column>
           <el-table-column prop="quantity" align="center" label="鏁伴噺" v-if="businessType == 4">
           </el-table-column>
-          <el-table-column prop="amount" align="center" :label="amountlabel">
+          <el-table-column prop="amount" align="right" header-align="right" class-name="money-column" :label="amountlabel" :formatter="formatMoney">
           </el-table-column>
-          <el-table-column prop="taxedamount" align="center" label="绋庡悗閲戦" v-if="
+          <el-table-column prop="taxedamount" align="right" header-align="right" class-name="money-column" label="鍔冲姟绋庡悗" :formatter="formatMoney" v-if="
             (this.ismanager == true) &
             (form.applytype == '1' || form.applytype == '2')
           ">
@@ -570,7 +600,7 @@
                 <el-upload size="mini" class="upload-demo" :action="uploadFileUrl" :file-list="fileListto"
                   :show-file-list="false" multiple drag :headers="headers" :on-success="(response, file, fileList) =>
                     uploadSccess(response, file, fileList)
-                    " :on-preview="downFile" :disabled="operationType == 'detail'" :on-error="handleUploadError"
+                    " :on-preview="downFile" :disabled="operationType == 'detail'" :on-error="handleUploadError" :before-upload="beforeUploadCheck"
                   :on-remove="remove" accept="image/*,.pdf">
                   <i class="el-icon-upload"></i>
                   <div class="el-upload__text">
@@ -579,7 +609,14 @@
                         type="primary">鐐瑰嚮涓婁紶</el-button></em>
                   </div>
                 </el-upload>
-                <el-table :data="fileListto" @row-click="downFile" style="width: 100%" height="400">
+              <div
+                v-if="operationType == 'detail'"
+                class="upload-disabled-tip"
+              >
+                <i class="el-icon-warning-outline" />
+                褰撳墠涓烘煡鐪嬫ā寮忥紝涓嶈兘涓婁紶闄勪欢
+              </div>
+                <el-table ref="annexTable2" :data="fileListto" :row-class-name="annexRowClass" @row-click="downFile" style="width: 100%" height="400">
                   <el-table-column prop="name" :show-overflow-tooltip="true" label="鍚嶇О">
                     <template slot-scope="scope">
                       <i style="color:#409EFF" class=" el-icon-s-order" />
@@ -601,18 +638,7 @@
               </div>
             </div>
 
-            <div v-if="this.previewpdf && pdfimgsrcList.length" class="pdfimgmin">
-              <!-- <img :src="pdfimg" /> -->
-              <el-image ref="imagePreview" style="width: 95%; height: 90%" :src="pdfimg"
-                @click="handleImageClick(initialIndex)">
-                <!-- <div slot="error" class="image-slot">
-                <i class="el-icon-picture-outline"></i>
-              </div> -->
-              </el-image>
-              <custom-image-viewer :url-list="pdfimgsrcList" :initial-index="currentIndex" :visible="viewerVisible"
-                @update:visible="viewerVisible = $event" @close="handleViewerClose" />
-            </div>
-            <div v-else class="pdfimgmins">{{ hintitle }}</div>
+            <attachment-preview-pane :file="embeddedFile" style="flex: 1; min-width: 0;" />
           </div>
         </el-tab-pane>
         <el-tab-pane label="鍙戠エ鏂囦欢" name="invoice">
@@ -622,7 +648,7 @@
                 <el-upload size="mini" class="upload-demo" :action="uploadFileUrl" :file-list="invoicefileList"
                   :show-file-list="false" multiple drag :headers="headers" :on-success="(response, file, fileList) =>
                     uploadSccess(response, file, fileList)
-                    " :on-preview="downFile" :disabled="operationType == 'detail'" :on-error="handleUploadError"
+                    " :on-preview="downFile" :disabled="operationType == 'detail'" :on-error="handleUploadError" :before-upload="beforeUploadCheck"
                   :on-remove="remove" accept="image/*,.pdf">
                   <i class="el-icon-upload"></i>
                   <div class="el-upload__text">
@@ -631,7 +657,14 @@
                         type="primary">鐐瑰嚮涓婁紶</el-button></em>
                   </div>
                 </el-upload>
-                <el-table :data="invoicefileListto" @row-click="downFile" style="width: 100%" height="400">
+              <div
+                v-if="operationType == 'detail'"
+                class="upload-disabled-tip"
+              >
+                <i class="el-icon-warning-outline" />
+                褰撳墠涓烘煡鐪嬫ā寮忥紝涓嶈兘涓婁紶闄勪欢
+              </div>
+                <el-table ref="invoiceTable" :data="invoicefileListto" :row-class-name="invoiceRowClass" @row-click="downFile" style="width: 100%" height="400">
                   <el-table-column prop="name" :show-overflow-tooltip="true" label="鍚嶇О">
                     <template slot-scope="scope">
                       <i style="color:#409EFF" class=" el-icon-s-order" />
@@ -653,19 +686,7 @@
               </div>
             </div>
 
-            <div v-if="this.previewpdf && invoicepdfimgsrcList.length" class="pdfimgmin">
-              <!-- <img :src="pdfimg" /> -->
-              <el-image style="width: 95%; height: 90%" :src="invoicepdfimg"
-                @click="invoicehandleImageClick(initialIndex)">
-                <!-- <div slot="error" class="image-slot">
-                <i class="el-icon-picture-outline"></i>
-              </div> -->
-              </el-image>
-              <custom-image-viewer :url-list="invoicepdfimgsrcList" :initial-index="invoicecurrentIndex"
-                :visible="invoiceviewerVisible" @update:visible="invoiceviewerVisible = $event"
-                @close="invoicehandleViewerClose" />
-            </div>
-            <div v-else class="pdfimgmins">{{ hintitle }}</div>
+            <attachment-preview-pane :file="invoiceEmbeddedFile" style="flex: 1; min-width: 0;" />
           </div>
         </el-tab-pane>
       </el-tabs>
@@ -1118,10 +1139,13 @@
       fileListto: [],
       invoicefileList: [],
       invoicefileListto: [],
+      // 2026-11-10锛氭柊涓婁紶闄勪欢琛岄珮浜敤锛堥檮浠� / 鍙戠エ锛�
+      flashAnnexName: "",
+      flashInvoiceName: "",
       invoicepdfimg: "",
       invoicepdfimgsrcList: [],
       invoDatatop: [],
-      activeName: "common", //鏂囦欢绫诲瀷
+      activeName: "invoice", //鏂囦欢绫诲瀷锛氶粯璁ゅ彂绁ㄦ枃浠�
       //涓婁紶闄勪欢璺緞
       uploadFileUrl: process.env.VUE_APP_BASE_API + "/common/upload",
       ICDtoken: getToken(),
@@ -1132,6 +1156,7 @@
       //绁ㄦ嵁鏂囦欢
       pdftitle: "",
       pdfimg: "",
+      invoiceEmbeddedFile: null,
       pdfimgsrcList: [],
       currentIndex: 0, // 鍒濆绱㈠紩
       invoicecurrentIndex: 0, // 鍒濆绱㈠紩
@@ -1234,14 +1259,8 @@
     },
     // 鑾峰彇璇锋眰澶�
     Getnetworkheader() {
-      let string = window.location.href;
-      if (string.includes("9091")) {
-        const index = string.indexOf("9091");
-        this.Networkheader = string.slice(0, index + 4); // 鎴彇9091鍙婂叾鍓嶉儴瀛楃
-      } else {
-        const index = string.indexOf("8032");
-        this.Networkheader = string.slice(0, index + 4); // 鎴彇8032鍙婂叾鍓嶉儴瀛楃
-      }
+      // 浠ュ綋鍓嶉〉闈� origin 涓哄噯锛屽吋瀹� 80/8032/9091 鍙婂悗缁鍙h皟鏁�
+      this.Networkheader = window.location.origin;
     },
     /** 閫氳繃鍙傛暟鑾峰彇涓氬姟绫诲瀷 */
     getroute() {
@@ -1665,7 +1684,7 @@
             }
             this.rbDetails[i] = tempDetail;
           }
-          //璁$畻褰撳墠琛屾姤閿�鍐呭璐圭敤鍚堣锛岀◣鍓嶉噾棰濓紙amount锛夈�佹墸绋庨噾棰濓紙taxamount锛夈�佺◣鍚庨噾棰濓紙taxedamount锛�
+          //璁$畻褰撳墠琛屾姤閿�鍐呭璐圭敤鍚堣锛岀◣鍓嶉噾棰濓紙amount锛夈�佸姵鍔′釜绋庯紙taxamount锛夈�佸姵鍔$◣鍚庯紙taxedamount锛�
           if (this.businessType == "2") {
             for (let j = 0; j < this.rbDetails.length; j++) {
               let tempDetail = this.rbDetails[j];
@@ -2268,7 +2287,7 @@
       });
     },
 
-    //璁$畻涓◣锛歵ype(A:宸茬煡绋庡墠閲戦锛岃绠楃◣鍚庨噾棰濓紱B锛氬凡鐭ョ◣鍚庨噾棰濓紝璁$畻绋庡墠閲戦)
+    //璁$畻涓◣锛歵ype(A:宸茬煡绋庡墠閲戦锛岃绠楀姵鍔$◣鍚庯紱B锛氬凡鐭ュ姵鍔$◣鍚庯紝璁$畻绋庡墠閲戦)
     calculateTax(row, type) {
       for (let i = 0; i < this.rbDetails.length; i++) {
         if (!this.rbDetails[i].amount) {
@@ -2444,7 +2463,7 @@
               }
               this.rbDetails[i] = tempDetail;
             }
-            //璁$畻褰撳墠琛屾姤閿�鍐呭璐圭敤鍚堣锛岀◣鍓嶉噾棰濓紙amount锛夈�佹墸绋庨噾棰濓紙taxamount锛夈�佺◣鍚庨噾棰濓紙taxedamount锛�
+            //璁$畻褰撳墠琛屾姤閿�鍐呭璐圭敤鍚堣锛岀◣鍓嶉噾棰濓紙amount锛夈�佸姵鍔′釜绋庯紙taxamount锛夈�佸姵鍔$◣鍚庯紙taxedamount锛�
             if (this.businessType == "2") {
               for (let j = 0; j < this.rbDetails.length; j++) {
                 let tempDetail = this.rbDetails[j];
@@ -2961,7 +2980,97 @@
     invoicehandleViewerClose() {
       this.invoiceviewerVisible = false;
     },
-    handleUploadError() { },
+    /**
+     * 2026-11-10锛氫笂浼犲墠缃牎楠岋紙before-upload锛�
+     * 鍘熷疄鐜版妸鏂囦欢鍚嶆牎楠屾斁鍦� on-success锛屾枃浠�**宸茬粡浼犲埌鏈嶅姟鍣�**鎵嶅垽鏂紝
+     * 涓嶅悎鏍煎氨鐩存帴涓㈠純 鈫� 鏈嶅姟鍣ㄧ暀鍨冨溇鏂囦欢銆佺晫闈㈠彧闂竴涓嬫彁绀猴紝鐢ㄦ埛鎰熻"娌″弽搴�"銆�
+     * 杩欓噷鍓嶇Щ鍒颁笂浼犲墠锛屼笉鍚堟牸鐩存帴涓嶅彂璇锋眰銆�
+     * @returns {boolean} false 闃绘涓婁紶
+     */
+    beforeUploadCheck(file) {
+      if (this.operationType === "detail") {
+        this.$modal.msgError("褰撳墠涓烘煡鐪嬫ā寮忥紝涓嶈兘涓婁紶闄勪欢");
+        return false;
+      }
+      return this.checkUploadFileName(file);
+    },
+
+    /**
+     * 2026-11-10锛氫笂浼犵粨鏋滃紓甯告椂鐨勭粺涓�鎻愮ず
+     * 鍚庣 /common/upload 鍑洪敊鏃惰繑鍥� HTTP 200 + code 500/401锛宔l-upload 浼氳蛋 on-success锛�
+     * 蹇呴』鍦ㄨ繖閲岀粰鍑烘槑纭彁绀猴紝鍚﹀垯鐢ㄦ埛鐪嬩笉鍒颁换浣曞弽棣堛��
+     */
+    notifyUploadFail(response) {
+      const code = response && response.code;
+      const msg = (response && response.msg) || "鏈煡閿欒";
+      if (code === 401 || code === 403) {
+        this.$modal.msgError("鐧诲綍宸茶繃鏈燂紝璇烽噸鏂扮櫥褰曞悗鍐嶄笂浼犻檮浠�");
+        return;
+      }
+      this.$modal.msgError("涓婁紶澶辫触锛�" + msg);
+    },
+
+    /**
+     * 2026-11-10锛氫笂浼犲け璐ワ紙HTTP 闈� 2xx / 鏂綉 / 琚綉鍏虫嫤鎴瓑锛�
+     * 鍘熷疄鐜版槸绌哄嚱鏁� `handleUploadError() { }`锛屽け璐ユ椂瀹屽叏娌℃湁鎻愮ず銆�
+     */
+    handleUploadError(err, file, fileList) {
+      const status = err && err.status;
+      const fileName = (file && file.name) || "鏂囦欢";
+      if (status === 401 || status === 403) {
+        this.$modal.msgError("鐧诲綍宸茶繃鏈燂紝璇烽噸鏂扮櫥褰曞悗鍐嶄笂浼犻檮浠�");
+        return;
+      }
+      let msg = "涓婁紶澶辫触";
+      if (status) {
+        msg += "锛欻TTP " + status + "锛堝彲鑳芥槸鏂囦欢杩囧ぇ鎴栫綉缁滃紓甯革級";
+      } else if (err && err.message) {
+        msg += "锛�" + err.message;
+      }
+      this.$modal.msgError(msg + "锛屾枃浠讹細" + fileName);
+    },
+
+    /** 鏂颁笂浼犺楂樹寒锛氶檮浠惰〃 */
+    annexRowClass({ row }) {
+      return row && row.name === this.flashAnnexName ? "row-flash" : "";
+    },
+
+    /** 鏂颁笂浼犺楂樹寒锛氬彂绁ㄨ〃 */
+    invoiceRowClass({ row }) {
+      return row && row.name === this.flashInvoiceName ? "row-flash" : "";
+    },
+
+    /**
+     * 2026-11-10锛氭柊涓婁紶闄勪欢瀹氫綅 鈥斺�� 楂樹寒 + 婊氬姩鍒拌〃鏍煎簳閮�
+     * @param {string} refName 琛ㄦ牸 ref
+     * @param {string} name 鏂囦欢鍚嶏紙鐢ㄤ簬 row-class-name 鍖归厤锛�
+     * @param {string} kind annex | invoice
+     */
+    flashTable(refName, name, kind) {
+      if (kind === "annex") {
+        this.flashAnnexName = name;
+      } else {
+        this.flashInvoiceName = name;
+      }
+      this.$nextTick(() => {
+        const table = this.$refs[refName];
+        const wrap =
+          table && table.$el
+            ? table.$el.querySelector(".el-table__body-wrapper")
+            : null;
+        if (wrap) {
+          wrap.scrollTop = wrap.scrollHeight;
+        }
+      });
+      setTimeout(() => {
+        if (kind === "annex") {
+          this.flashAnnexName = "";
+        } else {
+          this.flashInvoiceName = "";
+        }
+      }, 2000);
+    },
+
     remove(file, fileList) {
       const rbDetails = [...this.rbDetails];
       if (this.activeName == "common") {
@@ -2975,7 +3084,7 @@
 
     /**
      * 2026-10-15锛氫笂浼犳椂鏍¢獙闄勪欢鏂囦欢鍚嶏紙涓氬姟瑕佹眰锛氫笉鍚堟牸绔嬪嵆鎻愮ず涓斾笉鍔犲叆鍒楄〃锛夈��
-     * 瑙勫垯涓庡悗绔� AttachmentNameValidator 鍚屽彛寰勶細蹇呴』鍚腑鏂� / 鍘绘帀鎵╁睍鍚嶅悗涓诲共 鈮�20 瀛� /
+     * 瑙勫垯涓庡悗绔� AttachmentNameValidator 鍚屽彛寰勶細涓嶅己鍒跺惈涓枃 / 鍘绘帀鎵╁睍鍚嶅悗涓诲共 鈮�20 瀛� /
      * 涓嶅惈绌烘牸鍙� / \ : * ? " < > | # % 绛夌壒娈婂瓧绗︺��
      */
     checkUploadFileName(file) {
@@ -3014,27 +3123,27 @@
       const config = {
         headers: { Authorization: "Bearer " + this.ICDtoken }
       };
-      const pdfimg = this.Networkheader + "/prod-api" + response.fileName;
+      const pdfimg = this.Networkheader + process.env.VUE_APP_BASE_API + response.fileName;
       //鑾峰彇绁ㄦ嵁淇℃伅浣嶇疆
       if (this.activeName == "common") {
         if (response.code == 200) {
           this.previewpdf = true;
 
-          fetch(pdfimg, config)
-            .then(response => response.blob())
-            .then(blob => {
-              // 灏嗚幏鍙栫殑鏁版嵁娴佽浆鎹负URL
-              this.pdfimg = URL.createObjectURL(blob);
-              this.pdfimgsrcList.push(URL.createObjectURL(blob));
-              this.fileListto.push({
-                name: file.name,
-                url: URL.createObjectURL(blob)
-              });
-            })
-            .catch(error => {
-              console.error("Error loading image", error);
-              return;
-            });
+          // 鏂颁笂浼犳枃浠剁洿鎺ヤ娇鐢ㄦ祻瑙堝櫒鏈湴 File锛岄伩鍏嶆湇鍔$鏂囦欢鍦板潃/Token
+          // 寮傚父鏃舵妸 JSON 閿欒鍝嶅簲褰撴垚鍥剧墖鎴� PDF 棰勮銆�
+          const localBlob = file.raw;
+          const localUrl = URL.createObjectURL(localBlob);
+          this.pdfimg = localUrl;
+          this.embeddedFile = {
+            name: file.name,
+            url: localUrl,
+            type: /\.pdf$/i.test(file.name) ? "pdf" : "image"
+          };
+          this.pdfimgsrcList.push(localUrl);
+          this.fileListto.push({
+            name: file.name,
+            url: localUrl
+          });
 
           this.$modal.msgSuccess(response.msg);
 
@@ -3047,27 +3156,29 @@
             url: response.fileName
           });
           this.pdftitle = "鍏�" + this.pdfimgsrcList.length + "椤�";
+          // 2026-11-10锛氭柊琛岄珮浜苟婊氬姩鍒板彲瑙佷綅缃紝閬垮厤"鐪嬩笉鍑烘湁鍙嶅簲"
+          this.flashTable("annexTable", file.name, "annex");
+          this.flashTable("annexTable2", file.name, "annex");
         } else {
-          console.log(response.msg);
+          // 2026-11-10锛氬悗绔繑鍥� HTTP 200 + 闈� 200 涓氬姟鐮佹椂锛屽師鏉ュ彧 console.log锛岀晫闈㈡棤鎻愮ず
+          this.notifyUploadFail(response);
         }
       } else {
         if (response.code == 200) {
           this.previewpdf = true;
-          fetch(pdfimg, config)
-            .then(response => response.blob())
-            .then(blob => {
-              // 灏嗚幏鍙栫殑鏁版嵁娴佽浆鎹负URL
-              this.invoicepdfimg = URL.createObjectURL(blob);
-              this.invoicepdfimgsrcList.push(URL.createObjectURL(blob));
-              this.invoicefileListto.push({
-                name: file.name,
-                url: URL.createObjectURL(blob)
-              });
-            })
-            .catch(error => {
-              console.error("Error loading image", error);
-              return;
-            });
+          const localBlob = file.raw;
+          const localUrl = URL.createObjectURL(localBlob);
+          this.invoicepdfimg = localUrl;
+          this.invoiceEmbeddedFile = {
+            name: file.name,
+            url: localUrl,
+            type: /\.pdf$/i.test(file.name) ? "pdf" : "image"
+          };
+          this.invoicepdfimgsrcList.push(localUrl);
+          this.invoicefileListto.push({
+            name: file.name,
+            url: localUrl
+          });
 
           this.$modal.msgSuccess(response.msg);
 
@@ -3080,6 +3191,11 @@
             url: response.fileName
           });
           this.pdftitle = "鍏�" + this.invoicepdfimgsrcList.length + "椤�";
+          // 2026-11-10锛氭柊琛岄珮浜苟婊氬姩鍒板彲瑙佷綅缃�
+          this.flashTable("invoiceTable", file.name, "invoice");
+        } else {
+          // 2026-11-10锛氬師鏉ヨ鍒嗘敮娌℃湁 else锛屽け璐ユ椂瀹屽叏鏃犳彁绀�
+          this.notifyUploadFail(response);
         }
       }
     },
@@ -3103,7 +3219,7 @@
 
       if (this.rbDetails[index].annexfilesList) {
         // this.rbDetails[index].annexfilesList.forEach((value, indexson) => {
-        //   const pdfimg = this.Networkheader + "/prod-api" + value.url;
+        //   const pdfimg = this.Networkheader + process.env.VUE_APP_BASE_API + value.url;
         //   fetch(pdfimg, config)
         //     .then(response => response.blob())
         //     .then(blob => {
@@ -3125,7 +3241,7 @@
 
         const fetchPromises = this.rbDetails[index].annexfilesList.map(
           (value, indexson) => {
-            const pdfimg = this.Networkheader + "/prod-api" + value.url;
+            const pdfimg = this.Networkheader + process.env.VUE_APP_BASE_API + value.url;
             return fetch(pdfimg, config)
               .then(response => response.blob())
               .then(blob => {
@@ -3158,7 +3274,7 @@
       if (this.rbDetails[index].invoicefilesList) {
         const fetchPromises = this.rbDetails[index].invoicefilesList.map(
           (value, indexson) => {
-            const pdfimg = this.Networkheader + "/prod-api" + value.url;
+            const pdfimg = this.Networkheader + process.env.VUE_APP_BASE_API + value.url;
             return fetch(pdfimg, config)
               .then(response => response.blob())
               .then(blob => {
@@ -3201,50 +3317,17 @@
       console.log(this.rbDetails[index].annexfilesList, "annexfilesList");
     },
 
-    // 鐐瑰嚮宸蹭笂浼犳枃浠�
+    // 璐圭敤鎶ラ攢锛氶檮浠剁粺涓�浣跨敤鐙珛 FilePreview锛堝綍鍏ャ�佸鎵广�佽鎯呬竴鑷达級
     downFile(item) {
-      if (this.activeName == "common") {
-        this.pdftitle =
-          "鍏�" + this.pdfimgsrcList.length + "椤癸紝褰撳墠閫変腑" + item.name;
-        let name = item.name.split(".");
-        if (name[1] == "pdf") {
-          this.$modal.msgWarning("褰撳墠鏂囦欢鏆備笉鏀寔棰勮");
-          this.previewpdf = false;
-          this.hintitle = "褰撳墠鏂囦欢鏆備笉鏀寔棰勮";
-        } else if (name[1] == "jpg" || "png") {
-          console.log(item, "灞曠ず");
-          this.previewpdf = true;
-          if (item.url) {
-            this.pdfimg = item.url;
-          } else {
-            this.pdfimg = "";
-          }
-        } else {
-          this.hintitle = "褰撳墠鏂囦欢鏆備笉鏀寔棰勮";
-          this.$modal.msgWarning("褰撳墠鏂囦欢鏆備笉鏀寔棰勮");
-          this.previewpdf = false;
-        }
-      } else {
-        this.pdftitle =
-          "鍏�" + this.invoicepdfimgsrcList.length + "椤癸紝褰撳墠閫変腑" + item.name;
-        let name = item.name.split(".");
-        if (name[1] == "pdf") {
-          this.$modal.msgWarning("褰撳墠鏂囦欢鏆備笉鏀寔棰勮");
-          this.previewpdf = false;
-          this.hintitle = "褰撳墠鏂囦欢鏆備笉鏀寔棰勮";
-        } else if (name[1] == "jpg" || "png") {
-          this.previewpdf = true;
-          if (item.url) {
-            this.invoicepdfimg = item.url;
-          } else {
-            this.invoicepdfimg = "";
-          }
-        } else {
-          this.hintitle = "褰撳墠鏂囦欢鏆備笉鏀寔棰勮";
-          this.$modal.msgWarning("褰撳墠鏂囦欢鏆備笉鏀寔棰勮");
-          this.previewpdf = false;
-        }
+      const source =
+        this.activeName == "common" ? this.fileListto : this.invoicefileListto;
+      let list = (source || []).map(f => ({ name: f.name, url: f.url }));
+      let index = list.findIndex(f => f.url === item.url);
+      if (index < 0 && item && item.url) {
+        list = [{ name: item.name, url: item.url }];
+        index = 0;
       }
+      this.$previewFile(list, index > -1 ? index : 0);
     },
     getIndexInArray(arr, obj) {
       return arr.indexOf(obj);
@@ -3674,6 +3757,19 @@
   text-align: center;
 }
 
+/* 2026-11-10锛氭煡鐪嬫ā寮忎笅涓婁紶鍖虹殑璇存槑 + 鏂颁笂浼犺楂樹寒 */
+.upload-disabled-tip {
+  margin-top: 6px;
+  font-size: 13px;
+  color: #e6a23c;
+  text-align: center;
+}
+
+::v-deep .el-table .row-flash td {
+  background-color: #e7f1f4 !important;
+  transition: background-color 0.3s ease;
+}
+
 .pdfimg {
   display: flex; // text-align: center;
   width: 100%;

--
Gitblit v1.9.3