From 48118e7c69c14b86b06abbabb4c910cb59c12cfa Mon Sep 17 00:00:00 2001
From: yxh <172933527@qq.com>
Date: 星期四, 12 十一月 2026 18:37:12 +0800
Subject: [PATCH] Merge branch 'master' of http://116.62.18.175:6699/r/~yxh/opo-web

---
 src/views/project/travelexpenseapply/travelexpensedetail/index.vue | 1030 +++++++++++++++++++++++++++++++++++++++-----------------
 1 files changed, 711 insertions(+), 319 deletions(-)

diff --git a/src/views/project/travelexpenseapply/travelexpensedetail/index.vue b/src/views/project/travelexpenseapply/travelexpensedetail/index.vue
index 8750f26..2d6c45c 100644
--- a/src/views/project/travelexpenseapply/travelexpensedetail/index.vue
+++ b/src/views/project/travelexpenseapply/travelexpensedetail/index.vue
@@ -5,7 +5,7 @@
       <el-form ref="form" :model="form" :rules="rules" label-width="120px">
         <el-row><el-col :span="5">
             <el-form-item label="鐢宠鏃ユ湡" prop="applyTime">
-              <el-date-picker style="width: 100%" v-model="form.applyTime" type="date"
+              <el-date-picker style="width: 100%" v-model="form.applyTime" type="date" format="yyyy-MM-dd"
                 value-format="yyyy-MM-dd HH:mm:ss" placeholder="鐢宠鏃ユ湡" :disabled="true">
               </el-date-picker>
             </el-form-item>
@@ -14,8 +14,8 @@
             <el-form-item label="缁忓姙浜�" prop="username">
               <el-select v-model="form.username" clearable filterable allow-create ref="getReportname"
                 default-first-option placeholder="璇烽�夋嫨">
-                <el-option v-for="item in personsList" :key="item.reportNo" :label="item.reportName"
-                  :value="item.reportName">
+                <el-option v-for="(item, index) in personsList" :key="item.reportNo + '-' + index"
+                  :label="item.reportName" :value="item.reportName">
                 </el-option>
               </el-select>
             </el-form-item>
@@ -47,13 +47,19 @@
             </el-form-item>
           </el-col>
           <el-col :span="5">
-            <el-form-item label="鎹愮尞鑰�" prop="infoid" v-show="form.costtype == 4">
+            <el-form-item label="鎹愮尞鑰�" prop="infoid" v-show="form.costtype == 3 || form.costtype == 4">
               <el-select v-model="form.infoid" @change="selectbaseinfo" clearable filterable placeholder="璇烽�夋嫨鎹愮尞鑰�">
-                <el-option v-for="item in baselist" :key="item.index" :label="item.name" :value="item.infoid">
+                <el-option v-for="(item, index) in baselist" :key="item.index + '-' + index" :label="item.name"
+                  :value="item.infoid">
                 </el-option>
               </el-select>
             </el-form-item>
           </el-col>
+          <!-- <el-col :span="4">
+            <div style="margin-left: 10px;">
+              <dict-tag :options="dict.type.sys_DonationStatus" :value="form.invoicecount" />
+            </div>
+          </el-col> -->
         </el-row>
         <el-row style="margin-top: 10px">
           <el-col :span="5">
@@ -86,7 +92,7 @@
             <el-form-item label="鍑哄樊浜�" prop="travelers">
               <el-select v-model="form.travelers" clearable filterable allow-create ref="getReportname"
                 default-first-option placeholder="璇烽�夋嫨" @change="getAccountinfo()">
-                <el-option v-for="item in travelers" :key="item.reportNo" :label="item.reportName"
+                <el-option v-for="item in travelers"  :label="item.reportName"
                   :value="item.reportName">
                 </el-option>
               </el-select>
@@ -176,7 +182,7 @@
         <el-row>
           <el-table :data="rbDetails" ref="table" border max-height="800" highlight-current-row
             :summary-method="getSummaries" show-summary>
-            <el-table-column prop="orderno" slot="" label="搴忓彿" align="center" fixed width="88">
+            <el-table-column prop="orderno" slot="" label="搴忓彿" align="center" fixed width="60">
               <template slot-scope="scope">
                 <el-input v-model="scope.row.orderno" placeholder="搴忓彿" />
               </template>
@@ -193,7 +199,7 @@
               </template>
             </el-table-column>
 
-            <el-table-column prop="persontype" slot="" label="浜哄憳绫诲埆" align="center" fixed width="130">
+            <el-table-column prop="persontype" slot="" label="浜哄憳绫诲埆" align="center" fixed width="120">
               <template slot-scope="scope">
                 <el-select v-model="scope.row.persontype" value-key="value" placeholder="浜哄憳绫诲埆"
                   @change="getPersons(scope.row)">
@@ -224,7 +230,7 @@
                     }
                   }
                 }" clearable size="small" style="width: 100%" v-model="scope.row.starttime" type="date"
-                  value-format="yyyy-MM-dd HH:mm:ss" placeholder="寮�濮嬫棩鏈�" @blur="getdays(scope.row)">
+                  format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss" placeholder="寮�濮嬫棩鏈�" @blur="getdays(scope.row)">
                 </el-date-picker>
               </template>
             </el-table-column>
@@ -240,7 +246,7 @@
                     }
                   }
                 }" clearable size="small" style="width: 100%" v-model="scope.row.endtime" type="date"
-                  value-format="yyyy-MM-dd HH:mm:ss" placeholder="缁撴潫鏃ユ湡" @blur="getdays(scope.row)">
+                  format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss" placeholder="缁撴潫鏃ユ湡" @blur="getdays(scope.row)">
                 </el-date-picker>
               </template>
             </el-table-column>
@@ -259,7 +265,7 @@
                 </el-select>
               </template>
             </el-table-column>
-            <el-table-column prop="days" label="澶╂暟" width="100" align="center">
+            <el-table-column prop="days" label="澶╂暟" width="70" align="center">
               <template slot-scope="scope">
                 <el-input v-model="scope.row.days" @blur="getallowance(scope.row)" placeholder="澶╂暟" />
               </template>
@@ -366,7 +372,7 @@
                 <el-input v-model="scope.row.total" placeholder="鍚堣" />
               </template>
             </el-table-column>
-            <el-table-column fixed="right" label="鎿嶄綔" align="center" width="120">
+            <el-table-column fixed="right" label="鎿嶄綔" align="center" width="180">
               <template slot-scope="scope">
                 <el-button type="text" size="mini" @click="addDetailRow(scope.$index)"
                   v-if="operationType == 'edit'">鏂板</el-button>
@@ -386,7 +392,7 @@
         <el-row style="margin-top: 5px">
           <el-table :data="rbPayees" border max-height="400" highlight-current-row :summary-method="getSummaries"
             show-summary>
-            <el-table-column prop="orderno" slot="" label="搴忓彿" align="center" fixed width="65">
+            <el-table-column prop="orderno" slot="" label="搴忓彿" align="center" fixed width="60">
               <template slot-scope="scope">
                 <el-input v-model="scope.row.orderno" placeholder="搴忓彿" />
               </template>
@@ -404,7 +410,7 @@
               </template>
             </el-table-column>
 
-            <el-table-column prop="persontype" slot="" label="鏀舵浜虹被鍒�" align="center" fixed width="150">
+            <el-table-column prop="persontype" slot="" label="鏀舵浜虹被鍒�" align="center" fixed width="120">
               <template slot-scope="scope">
                 <el-select v-model="scope.row.persontype" value-key="value" placeholder="鏀舵浜虹被鍒�"
                   @change="getPersons(scope.row)">
@@ -413,7 +419,7 @@
                 </el-select>
               </template>
             </el-table-column>
-            <el-table-column prop="personname" slot="" label="鏀舵浜�" align="center" fixed width="200">
+            <el-table-column prop="personname" slot="" label="鏀舵浜�" align="center" fixed width="240">
               <template slot-scope="scope">
                 <el-select v-model="scope.row.personname" clearable filterable allow-create ref="getReportname"
                   default-first-option placeholder="璇烽�夋嫨" @change="getAccountinfo2(scope.row, scope.row.persontype)">
@@ -422,17 +428,17 @@
                 </el-select>
               </template>
             </el-table-column>
-            <el-table-column prop="bankname" slot="" label="鏀舵閾惰" align="center" fixed width="250">
+            <el-table-column prop="bankname" slot="" label="鏀舵閾惰" align="center" fixed width="300">
               <template slot-scope="scope">
                 <el-input v-model="scope.row.bankname" placeholder="鏀舵閾惰" />
               </template>
             </el-table-column>
-            <el-table-column prop="bankcardno" slot="" label="閾惰璐﹀彿" align="center" fixed width="200">
+            <el-table-column prop="bankcardno" slot="" label="閾惰璐﹀彿" align="center" fixed width="220">
               <template slot-scope="scope">
                 <el-input v-model="scope.row.bankcardno" placeholder="閾惰璐﹀彿" />
               </template>
             </el-table-column>
-            <el-table-column prop="amount" slot="" label="鎵撴閲戦" align="center" fixed width="130">
+            <el-table-column prop="amount" slot="" label="鎵撴閲戦" align="right" header-align="right" fixed width="130" class-name="money-column" :formatter="formatMoney">
               <template slot-scope="scope">
                 <el-input v-model="scope.row.amount" placeholder="鎵撴閲戦" />
               </template>
@@ -445,12 +451,12 @@
             <!--
             <el-table-column prop="paiddate" slot="" label="鎵撴鏃ユ湡" fixed align="center" width="150">
               <template slot-scope="scope">
-                <el-date-picker clearable size="small" style="width: 100%" v-model="scope.row.paiddate" type="date"
+                <el-date-picker clearable size="small" style="width: 100%" v-model="scope.row.paiddate" type="date" format="yyyy-MM-dd"
                   value-format="yyyy-MM-dd HH:mm:ss" placeholder="鎵撴鏃ユ湡" :disabled="true">
                 </el-date-picker>
               </template>
             </el-table-column>-->
-            <el-table-column label="鎿嶄綔" align="center" width="100" v-if="operationType == 'edit'">
+            <el-table-column label="鎿嶄綔" align="center"  width="150" v-if="operationType == 'edit'">
               <template slot-scope="scope">
                 <el-button type="text" size="mini" @click="addPayeeRow(scope.$index)">鏂板</el-button>
                 <el-button @click.native.prevent="
@@ -483,9 +489,9 @@
           <el-col :span="12">
             <el-form-item label="棰勫鏉愭枡" prop="infoid">
               <el-radio-group v-model="form.checkstatus" align="left">
-                <el-radio label="1">寰呯敵璇锋潗鏂�</el-radio>
-                <el-radio label="2">瀹℃牳閫氳繃绛夊緟閭瘎绾歌川鏉愭枡</el-radio>
-                <el-radio label="3">宸叉敹鍒版姤閿�鏉愭枡</el-radio>
+                <el-radio label="1">寰呯敵璇�</el-radio>
+                <el-radio label="2">瀹℃牳閫氳繃绛夊緟绾歌川鏉愭枡</el-radio>
+                <el-radio label="3">宸叉敹鍒扮焊璐ㄦ潗鏂�</el-radio>
               </el-radio-group>
             </el-form-item>
           </el-col>
@@ -527,19 +533,42 @@
     </div>
 
     <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 == 2
+            ? '褰撳墠姝e湪鎿嶄綔锛氬彂绁ㄦ枃浠讹紙璇风‘璁ょエ鎹睘浜庡彂绁級'
+            : '褰撳墠姝e湪鎿嶄綔锛氭櫘閫氶檮浠讹紙璇峰嬁鍦ㄦ涓婁紶鍙戠エ锛�'
+        "
+        :type="activeName == 2 ? '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 prop="orderno" label="搴忓彿"> </el-table-column>
           <el-table-column prop="personname" label="璐圭敤浜哄憳">
           </el-table-column>
-          <el-table-column prop="starttime" label="寮�濮嬫棩鏈�"> </el-table-column>
-          <el-table-column prop="endtime" label="缁撴潫鏃ユ湡"> </el-table-column>
+          <el-table-column prop="starttime" label="寮�濮嬫棩鏈�">
+            <template slot-scope="scope">
+              {{ scope.row.starttime ? parseTime(scope.row.starttime, "{y}-{m}-{d}") : "" }}
+            </template>
+          </el-table-column>
+          <el-table-column prop="endtime" label="缁撴潫鏃ユ湡">
+            <template slot-scope="scope">
+              {{ scope.row.endtime ? parseTime(scope.row.endtime, "{y}-{m}-{d}") : "" }}
+            </template>
+          </el-table-column>
           <el-table-column prop="departure" label="鍑哄彂鍦�"> </el-table-column>
           <el-table-column prop="destination" label="鍒拌揪鍦�"> </el-table-column>
           <el-table-column prop="days" label="澶╂暟"> </el-table-column>
-        </el-table>
-        <el-table :data="tableDatatop" style="width: 100%">
           <el-table-column prop="traffictype" label="鍑哄彂浜ら�氬伐鍏�">
           </el-table-column>
           <el-table-column prop="traffictype2" label="杩斿洖浜ら�氬伐鍏�">
@@ -566,7 +595,7 @@
               <div>
                 <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)
+                      uploadSccess(response, file, fileList)
                     " :on-preview="downFile" :disabled="operationType == 'detail'" :on-error="handleUploadError"
                   :on-remove="remove" accept="image/*,.pdf">
                   <i class="el-icon-upload"></i>
@@ -597,33 +626,21 @@
               </div>
             </div>
 
-            <div v-if="this.previewpdf && pdfimgsrcList.length" class="pdfimgmin">
-              <!-- <img :src="pdfimg" /> -->
-              <!-- <el-image
-                style="width: 95%; height: 90%"
-                :src="pdfimg"
-                :preview-src-list="pdfimgsrcList" -->
-              >
-              <el-image ref="imagePreview" style="width: 95%; height: 90%" :src="pdfimg"
-                @click="handleImageClick(initialIndex)">
-              </el-image>
-              <custom-image-viewer :url-list="pdfimgsrcList" :initial-index="currentIndex" :visible="viewerVisible"
-                @update:visible="viewerVisible = $event" @close="handleViewerClose" />
-              <!-- <div slot="error" class="image-slot">
-              <i class="el-icon-picture-outline"></i>
-            </div> -->
-              <!-- </el-image> -->
-            </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="2">
           <div class="pdfimg">
-            <div class="box-pdf">
+            <div class="box-pdf box-pdf--invoice">
               <div>
+                <div class="invoice-select-bar">
+                  <el-button type="primary" size="mini" icon="el-icon-plus"
+                    :disabled="operationType == 'detail'" @click="openInvoiceSelect">寮曠敤鍙戠エ</el-button>
+                  <span class="invoice-select-bar__tip">寮曠敤鍚庤嚜鍔ㄦ爣璁颁负宸叉姤閿�锛屽垹闄ゅ悗鎭㈠鏈姤閿�</span>
+                </div>
                 <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)
+                      uploadSccess(response, file, fileList)
                     " :on-preview="downFile" :disabled="operationType == 'detail'" :on-error="handleUploadError"
                   :on-remove="remove" accept="image/*,.pdf">
                   <i class="el-icon-upload"></i>
@@ -634,15 +651,31 @@
                   </div>
                 </el-upload>
                 <el-table :data="invoicefileListto" @row-click="downFile" style="width: 100%" height="400">
-                  <el-table-column prop="name" :show-overflow-tooltip="true" label="鍚嶇О">
+                  <el-table-column prop="name" :show-overflow-tooltip="true" label="鏂囦欢鍚嶇О">
                     <template slot-scope="scope">
                       <i style="color:#409EFF" class=" el-icon-s-order" />{{
                         scope.row.name
                       }}
                     </template>
                   </el-table-column>
+                  <el-table-column prop="invoiceType" width="90" align="center" :show-overflow-tooltip="true"
+                    label="鍙戠エ绫诲瀷">
+                    <template slot-scope="scope">
+                      {{ scope.row.invoiceType || "-" }}
+                    </template>
+                  </el-table-column>
+                  <el-table-column prop="invoiceName" width="120" :show-overflow-tooltip="true" label="鍙戠エ鍚嶇О">
+                    <template slot-scope="scope">
+                      {{ scope.row.invoiceName || "-" }}
+                    </template>
+                  </el-table-column>
+                  <el-table-column prop="invoiceAmount" width="95" align="center" label="鍙戠エ閲戦">
+                    <template slot-scope="scope">
+                      {{ scope.row.invoiceAmount || "-" }}
+                    </template>
+                  </el-table-column>
 
-                  <el-table-column prop="name" width="180" :show-overflow-tooltip="true" label="鍔熻兘">
+                  <el-table-column prop="name" width="140" :show-overflow-tooltip="true" label="鍔熻兘">
                     <template slot-scope="scope">
                       <el-button type="primary" size="mini"
                         @click.native.prevent.stop="deletedowfile(scope.row)">鍒犻櫎</el-button>
@@ -654,19 +687,15 @@
               </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)">
-              </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>
+    </el-dialog>
+    <el-dialog title="閫夋嫨鍙戠エ" :visible.sync="invoiceSelectOpen" width="1100px" append-to-body
+      :fullscreen="isMobile" :close-on-click-modal="false">
+      <invoice-index v-if="invoiceSelectOpen" select-mode @confirm="handleInvoiceSelected"
+        @cancel="invoiceSelectOpen = false" />
     </el-dialog>
     <el-dialog title="鎻愮ず" :visible.sync="Savereminder" width="30%">
       <el-alert :title="'鎮ㄥ凡娣诲姞' +
@@ -703,7 +732,8 @@
   exportReimbursement,
   getdownload,
   checkfund,
-  fundSubmit
+  fundSubmit,
+  listbypowerone
 } from "@/api/project/reimbursement";
 import {
   addReimbursementdetail,
@@ -723,13 +753,18 @@
 import { treeselect } from "@/api/system/dept";
 import { getSubsidy } from "@/api/project/travelcity";
 import { listReportname, listUser } from "@/api/project/organization";
+import { updateInvoice } from "@/api/project/invoice";
+import InvoiceIndex from "@/views/project/invoice/index.vue";
 import { getToken } from "@/utils/auth";
 import debounce from "lodash/debounce";
+import { moneySum, moneyAdd, moneySub, moneyRound } from "@/utils/money";
+import { checkFileName, checkDetails } from "@/utils/fileNameCheck";
 export default {
   components: {
     Treeselect,
     Li_area_select,
     CustomImageViewer,
+    InvoiceIndex,
     pdf
   },
   name: "Funddetail",
@@ -741,7 +776,8 @@
     "sys_recordstatus",
     "sys_travelexpensebelong",
     "sys_traffictype",
-    "sys_area_name"
+    "sys_area_name",
+    "sys_DonationStatus"
   ],
   data() {
     return {
@@ -757,13 +793,14 @@
       personsList: [],
       //涓嬫媺鍙互閫夋嫨浜哄憳鍒楄〃
       personsSel: [],
-      activeName: 1, //鏂囦欢绫诲瀷
+      activeName: 2, //鏂囦欢绫诲瀷锛氶粯璁ゅ彂绁ㄦ枃浠�
       // 閮ㄩ棬鏍戦�夐」
 
       deptOptions: undefined,
       //绁ㄦ嵁鏂囦欢
       pdftitle: "",
       pdfimg: "",
+      invoiceEmbeddedFile: null,
       pdfVisible: false,
       costtypeobj: {
         value: 0,
@@ -864,15 +901,15 @@
       baselisttages: [
         {
           id: 1,
-          name: "寰呯敵璇锋潗鏂�"
+          name: "寰呯敵璇�"
         },
         {
           id: 2,
-          name: "瀹℃牳閫氳繃绛夊緟閭瘎绾歌川鏉愭枡"
+          name: "棰勫閫氳繃绛夊緟绾歌川鏉愭枡"
         },
         {
           id: 3,
-          name: "宸叉敹鍒版姤閿�鏉愭枡"
+          name: "宸叉敹鍒扮焊璐ㄦ潗鏂�"
         }
       ],
       baselist: [],
@@ -897,6 +934,9 @@
       initialIndex: 0, // 鍒濆绱㈠紩
       viewerVisible: false, // 鎺у埗棰勮缁勪欢鏄剧ず
       invoiceviewerVisible: false, // 鎺у埗棰勮缁勪欢鏄剧ず
+      // 鍙戠エ绠$悊寮曠敤寮圭獥
+      invoiceSelectOpen: false,
+      invoiceSelecting: false,
 
       //浜哄憳绫诲埆
       persontype: null,
@@ -912,11 +952,19 @@
         flowconclusion: null,
         fundid: null
       },
+      //杩炵画瀹℃壒锛氬緟瀹℃壒鍒楄〃
+      pendingList: [],
       jurisdiction: false,
 
       //淇濆瓨鎸夐挳鎺у埗
       idisabled: false
     };
+  },
+
+  computed: {
+    isMobile() {
+      return this.$store.state.app.device === "mobile";
+    }
   },
 
   created() {
@@ -1068,19 +1116,217 @@
       console.log("鍥剧墖鍔犺浇鎴愬姛");
     },
     handleUploadError() { },
+    // 鎵撳紑鍙戠エ绠$悊寮曠敤寮圭獥锛堝閫夋湭鎶ラ攢鍙戠エ锛�
+    openInvoiceSelect() {
+      if (this.operationType == "detail") {
+        return;
+      }
+      if (!this.rbDetails[this.atpresent]) {
+        this.$modal.msgWarning("璇峰厛閫夋嫨璐圭敤鏄庣粏琛�");
+        return;
+      }
+      this.invoiceSelectOpen = true;
+    },
+    // 寮曠敤鍙戠エ锛氬啓鍏ュ綋鍓嶆槑缁嗙殑鍙戠エ闆嗗悎锛屽苟鎶婂彂绁ㄦ爣璁颁负宸叉姤閿�
+    handleInvoiceSelected(rows) {
+      if (this.invoiceSelecting) {
+        return;
+      }
+      const detail = this.rbDetails[this.atpresent];
+      if (!detail) {
+        this.$modal.msgWarning("璇峰厛閫夋嫨璐圭敤鏄庣粏琛�");
+        return;
+      }
+      const existed = (detail.invoicefilesList || [])
+        .map(item => item && item.invoiceId)
+        .filter(id => id !== null && id !== undefined && id !== "")
+        .map(id => String(id));
+      const selected = (rows || []).filter(
+        row => !existed.includes(String(row.id))
+      );
+      if (!selected.length) {
+        this.$modal.msgWarning("鎵�閫夊彂绁ㄥ凡寮曠敤锛岃鍕块噸澶嶆坊鍔�");
+        return;
+      }
+      this.invoiceSelecting = true;
+      Promise.all(
+        selected.map(row =>
+          updateInvoice({ id: row.id, reimburseState: "1" })
+        )
+      )
+        .then(() => {
+          if (!detail.invoicefilesList) {
+            this.$set(detail, "invoicefilesList", []);
+          }
+          selected.forEach(row => {
+            const file = this.buildInvoiceFile(row);
+            // 鎸夊彂绁ㄧ被鍨嬫妸閲戦璁″叆瀵瑰簲璐圭敤绉戠洰
+            const applied = this.applyInvoiceExpense(detail, file, 1);
+            // 璁板綍瀹為檯璁″叆閲戦锛岃礋鏁板彂绁ㄨ0鎴柇鏃跺垹闄や笉浼氬弽鍚戝鍔�
+            file.expenseAmount = moneyRound(applied).toFixed(2);
+            // 鏄庣粏鍐呬繚瀛樻湇鍔$鍦板潃锛屽垪琛ㄥ唴淇濆瓨鍚屼竴浠芥暟鎹緵灞曠ず/鍒犻櫎
+            detail.invoicefilesList.push(Object.assign({}, file));
+            this.invoicefileListto.push(file);
+          });
+          this.sumRowFee(detail);
+          this.invoicepdfimgsrcList = this.invoicefileListto.map(
+            item => item.url
+          );
+          this.pdftitle = "鍏�" + this.invoicefileListto.length + "椤�";
+          this.invoiceSelectOpen = false;
+          this.$modal.msgSuccess(
+            "宸插紩鐢� " + selected.length + " 寮犲彂绁紝璐圭敤宸叉寜绫诲瀷璁″叆"
+          );
+        })
+        .catch(() => {
+          this.$modal.msgError("鍙戠エ鏍囪宸叉姤閿�澶辫触锛岃绋嶅悗閲嶈瘯");
+        })
+        .finally(() => {
+          this.invoiceSelecting = false;
+        });
+    },
+    // 鍙戠エ绠$悊璁板綍 -> 鍙戠エ闄勪欢锛堜繚鐣欏彂绁ㄤ笟鍔″瓧娈碉紝闅忔槑缁嗕竴璧蜂繚瀛橈級
+    buildInvoiceFile(row) {
+      const fileUrl = this.toRelativeFileUrl(row.invoiceUrl);
+      const ext = this.getFileExt(fileUrl);
+      return {
+        name: this.buildInvoiceFileName(row, ext),
+        url: fileUrl,
+        invoiceId: row.id,
+        invoiceNo: row.invoiceNo,
+        invoiceType: row.invoiceType,
+        invoiceName: row.invoiceName,
+        invoiceAmount: row.invoiceAmount,
+        // 璁板綍璁″叆鐨勮垂鐢ㄧ鐩拰閲戦锛屽垹闄ゅ彂绁ㄦ椂鎸夊悓涓�鍙e緞鎵e噺
+        expenseField: this.resolveInvoiceExpenseField(row),
+        expenseAmount: moneyRound(
+          this.invoiceAmountValue(row.invoiceAmount)
+        ).toFixed(2),
+        reimburseState: "1"
+      };
+    },
+    // 鍙戠エ绫诲瀷 -> 鎶ラ攢鏄庣粏璐圭敤绉戠洰
+    resolveInvoiceExpenseField(invoice) {
+      const type = String(invoice.invoiceType || "");
+      let ext = {};
+      try {
+        ext = invoice.extContent ? JSON.parse(invoice.extContent) : {};
+        if (!ext || typeof ext !== "object") {
+          ext = {};
+        }
+      } catch (e) {
+        ext = {};
+      }
+      const text = [
+        type,
+        invoice.invoiceName,
+        invoice.sellerName,
+        ext["閿�鍞柟鍚嶇О"],
+        ext["椤圭洰鍚嶇О"],
+        ext["璐х墿鎴栧簲绋庡姵鍔″悕绉�"]
+      ]
+        .filter(Boolean)
+        .join(" ");
+      // 浼樺厛璇嗗埆鍙戠エ绫诲瀷閲岀洿鎺ュ啓鏄庣殑璐圭敤绉戠洰
+      if (type.includes("甯傚唴浜ら��")) return "cityfee";
+      if (type.includes("浜ら��")) return "trafficexpense";
+      if (type.includes("浣忓")) return "hotelexpense";
+      if (type.includes("浼欓")) return "foodallowance";
+      if (type.includes("鍏潅")) return "otherexpense";
+      if (type.includes("鍏朵粬璐圭敤")) return "otherfeeamount";
+      // OCR 绫诲瀷閫氬父鏄彂绁ㄧ绫伙紝鍐嶇粨鍚堝彂绁ㄥ悕绉�/閿�鍞柟/椤圭洰鍚嶇О璇嗗埆
+      if (/鍑虹|缃戠害|婊存淮|鍦伴搧|鍏氦|鍋滆溅|杩囪矾|閫氳璐�/.test(text)) {
+        return "cityfee";
+      }
+      if (
+        /鐏溅|楂橀搧|鍔ㄨ溅|閾佽矾|椋炴満|鑸┖|鏈虹エ|琛岀▼鍗晐姹借溅绁▅瀹㈣繍|鑸圭エ|杩愯緭/.test(
+          text
+        )
+      ) {
+        return "trafficexpense";
+      }
+      if (/浣忓|閰掑簵|瀹鹃|鏃呴/.test(text)) return "hotelexpense";
+      if (/浼欓|椁愰ギ|椁愯垂|楗簵|椋熷搧/.test(text)) return "foodallowance";
+      if (/鍏潅|鍔炲叕|鏃ョ敤鍝亅閫氳|鐢佃瘽璐箌蹇��/.test(text)) {
+        return "otherexpense";
+      }
+      // 鏃犳硶褰掔被鐨勫彂绁ㄧ粺涓�璁″叆鍏朵粬璐圭敤
+      return "otherfeeamount";
+    },
+    // 鍙戠エ閲戦鍙兘鏄甫鍗冨垎浣�/璐у竵绗﹀彿鐨勬枃鏈紝鎶藉嚭鍙绠楅儴鍒�
+    invoiceAmountValue(value) {
+      const text = String(value === null || value === undefined ? "" : value)
+        .replace(/,/g, "")
+        .trim();
+      const match = text.match(/-?\d*\.?\d+/);
+      return match ? match[0] : 0;
+    },
+    // sign=1 璁″叆锛宻ign=-1 鎵e噺锛岄噾棰濈粺涓�璧扮簿纭繍绠�
+    applyInvoiceExpense(detail, invoiceFile, sign) {
+      const field = invoiceFile.expenseField;
+      if (!detail || !field) {
+        return 0;
+      }
+      const amount = moneyRound(
+        this.invoiceAmountValue(
+          invoiceFile.expenseAmount !== undefined
+            ? invoiceFile.expenseAmount
+            : invoiceFile.invoiceAmount
+        )
+      );
+      if (!amount) {
+        return 0;
+      }
+      const before = moneyRound(detail[field]);
+      const next =
+        sign > 0
+          ? moneyAdd(before, amount)
+          : moneySub(before, amount);
+      const after = moneyRound(Math.max(0, next));
+      detail[field] = after.toFixed(2);
+      return moneyRound(after - before);
+    },
+    // 姹囨�讳竴琛屾槑缁嗕腑璁″叆鎸囧畾璐圭敤绉戠洰鐨勫彂绁ㄩ噾棰�
+    sumInvoiceExpenseByField(row, field) {
+      const list = (row && row.invoicefilesList) || [];
+      return moneySum(
+        list.filter(item => item && item.expenseField === field),
+        item =>
+          item.expenseAmount !== undefined
+            ? item.expenseAmount
+            : item.invoiceAmount
+      );
+    },
+    // 闄勪欢鍚嶆牎楠屼笉鍏佽绌烘牸/鐗规畩瀛楃涓斾富骞测墹20瀛楋紝鐢ㄥ彂绁ㄥ彿鐮佺敓鎴愬畨鍏ㄦ枃浠跺悕
+    buildInvoiceFileName(row, ext) {
+      const raw = String(row.invoiceNo || "").replace(/[\s/\\:*?"<>|#%]/g, "");
+      const main = [...(raw || "鍙戠エ" + row.id)].slice(0, 20).join("");
+      return main + ext;
+    },
+    // 鍙戠エ鍦板潃鍏ュ簱鏃剁粺涓�鎴愭帴鍙g浉瀵硅矾寰勶紝閬垮厤鏈嶅姟鍣ㄥ湴鍧�鍙樻洿鍚庨瑙堝け鏁�
+    toRelativeFileUrl(url) {
+      const text = String(url || "");
+      const index = text.indexOf("/profile/upload");
+      return index > -1 ? text.slice(index) : text;
+    },
+    getFileExt(url) {
+      const path = String(url || "").split("?")[0];
+      const index = path.lastIndexOf(".");
+      return index > -1 ? path.slice(index) : "";
+    },
+    // 棰勮妗嗕緷璧栨枃浠跺悕鍚庣紑鍒ゆ柇鏂囦欢绫诲瀷锛岀己灏戝悗缂�鏃剁敤鍦板潃琛ラ綈
+    withFileExt(name, url) {
+      const text = String(name || "");
+      if (/\.[a-z0-9]{2,5}$/i.test(text)) {
+        return text;
+      }
+      const ext = this.getFileExt(url);
+      return ext ? text + ext : text;
+    },
     // 鑾峰彇璇锋眰澶�
     Getnetworkheader() {
-      console.log(window.location.href);
-      let string = window.location.href;
-      if (string.includes("9091")) {
-        const index = string.indexOf("9091");
-        this.Networkheader = string.slice(0, index + 4); // 鎴彇9091鍙婂叾鍓嶉儴瀛楃
-        console.log(this.Networkheader);
-      } else {
-        const index = string.indexOf("8032");
-        this.Networkheader = string.slice(0, index + 4); // 鎴彇8032鍙婂叾鍓嶉儴瀛楃
-        console.log(this.Networkheader);
-      }
+      // 浠ュ綋鍓嶉〉闈� origin 涓哄噯锛屽吋瀹� 80/8032/9091 鍙婂悗缁鍙h皟鏁�
+      this.Networkheader = window.location.origin;
     },
     // 鍙戠エ鍒囨崲
     handleClick(tab, event) {
@@ -1106,32 +1352,68 @@
     },
 
     //鏂囦欢涓婁紶鎴愬姛鍥炶皟
+    /**
+     * 2026-10-15锛氫笂浼犳椂鏍¢獙闄勪欢鏂囦欢鍚嶏紙涓氬姟瑕佹眰锛氫笉鍚堟牸绔嬪嵆鎻愮ず涓斾笉鍔犲叆鍒楄〃锛夈��
+     * 瑙勫垯涓庡悗绔� AttachmentNameValidator 鍚屽彛寰勶細涓嶅己鍒跺惈涓枃 / 鍘绘帀鎵╁睍鍚嶅悗涓诲共 鈮�20 瀛� /
+     * 涓嶅惈绌烘牸鍙� / \ : * ? " < > | # % 绛夌壒娈婂瓧绗︺��
+     */
+    checkUploadFileName(file) {
+      const raw = file && file.raw ? file.raw.name : file && file.name;
+      const r = checkFileName(raw);
+      if (!r.ok) {
+        this.$modal.msgError(r.msg);
+        return false;
+      }
+      return true;
+    },
+
+    /**
+     * 2026-10-15锛氫繚瀛樺墠鏍¢獙鏁村崟鏄庣粏闄勪欢鏂囦欢鍚嶏紙鍚悓涓�琛屽唴閲嶅悕锛夈��
+     * 鍙e緞锛堜笟鍔$‘璁わ級锛氬彧鏍¢獙"鏈鍙樻洿"鐨勯檮浠垛�斺�旇�佸崟鎹噷宸插瓨鍦ㄧ殑涓嶅悎瑙勯檮浠跺悕涓嶈兘鎶婁繚瀛樺崱姝�
+     * 锛堝惁鍒欒�佸崟鎹敼涓�涓噾棰濋兘瀛樹笉杩涘幓锛夈�傚悗绔寜 id 璇绘棫璁板綍鏀捐鍘嗗彶闄勪欢锛涘墠绔嬁涓嶅埌"鍝簺鏄巻鍙�"
+     * 鐨勬潈濞佷俊鎭紝鍥犳**浠呮柊澧炲崟鎹�**鍋氫繚瀛樺墠鎷︽埅锛岀紪杈戣�佸崟鎹椂鏂板鐨勪笉鍚堣闄勪欢鐢卞悗绔簩娆℃牎楠屾嫤涓嬨��
+     */
+    checkDetailFileNames() {
+      if (this.form && this.form.id) {
+        return true;
+      }
+      const c = checkDetails(this.rbDetails);
+      if (!c.ok) {
+        this.$modal.msgError(c.msg);
+        return false;
+      }
+      return true;
+    },
+
     uploadSccess(response, file, fileList) {
+      if (!this.checkUploadFileName(file)) {
+        return;
+      }
       this.rbDetails;
       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 == 1) {
         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);
 
@@ -1150,21 +1432,19 @@
       } 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);
 
@@ -1200,7 +1480,7 @@
       if (this.rbDetails[index].annexfilesList) {
         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 => {
@@ -1232,19 +1512,24 @@
       //鍙戠エ
       if (this.rbDetails[index].invoicefilesList) {
         const fetchPromises = this.rbDetails[index].invoicefilesList.map(
-          (value, indexson) => {
-            const pdfimg = this.Networkheader + "/prod-api" + value.url;
+          value => {
+            // 淇濈暀鍙戠エ涓氬姟瀛楁锛坕nvoiceId/绫诲瀷/鍚嶇О/閲戦锛夛紝閲嶆柊鎵撳紑鏃朵粛鍙睍绀哄拰鍒犻櫎
+            const kept = Object.assign({}, value);
+            // 鍙戠エ绠$悊涓殑鍦板潃鏄畬鏁� URL锛屼笉鑳藉啀鎷兼帴鍙e墠缂�
+            if (/^https?:\/\//i.test(value.url)) {
+              return Promise.resolve(kept);
+            }
+            const pdfimg =
+              this.Networkheader + process.env.VUE_APP_BASE_API + value.url;
             return fetch(pdfimg, config)
               .then(response => response.blob())
               .then(blob => {
-                return {
-                  name: value.name,
-                  url: URL.createObjectURL(blob)
-                };
+                kept.url = URL.createObjectURL(blob);
+                return kept;
               })
               .catch(error => {
                 console.error("Error loading image", error);
-                return null;
+                return kept;
               });
           }
         );
@@ -1253,7 +1538,9 @@
           this.invoicefileListto = invoicefileListto.filter(
             item => item !== null
           );
-          this.invoicepdfimg = this.invoicefileListto[0].url;
+          this.invoicepdfimg = this.invoicefileListto.length
+            ? this.invoicefileListto[0].url
+            : "";
           console.log(this.invoicepdfimg, "invoicepdfimg");
           this.invoicepdfimgsrcList = this.invoicefileListto.map(
             item => item.url
@@ -1267,7 +1554,7 @@
         this.pdftitle = "";
       }
 
-      if (this.activeName == "common") {
+      if (this.activeName == 1) {
         this.pdftitle = "鍏�" + this.pdfimgsrcList.length + "椤�";
       } else {
         this.pdftitle = "鍏�" + this.invoicepdfimgsrcList.length + "椤�";
@@ -1276,50 +1563,20 @@
       console.log(this.rbDetails[index].annexfilesList, "annexfilesList");
     },
 
-    // 鐐瑰嚮宸蹭笂浼犳枃浠�
+    // 宸梾鎶ラ攢锛氶檮浠剁粺涓�浣跨敤鐙珛 FilePreview锛堝綍鍏ャ�佸鎵广�佽鎯呬竴鑷达級
     downFile(item) {
-      if (this.activeName == 1) {
-        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 == 1 ? this.fileListto : this.invoicefileListto;
+      let list = (source || []).map(f => ({
+        name: this.withFileExt(f.name, f.url),
+        url: f.url
+      }));
+      let index = list.findIndex(f => f.url === item.url);
+      if (index < 0 && item && item.url) {
+        list = [{ name: this.withFileExt(item.name, item.url), url: item.url }];
+        index = 0;
       }
+      this.$previewFile(list, index > -1 ? index : 0);
     },
     getIndexInArray(arr, obj) {
       return arr.indexOf(obj);
@@ -1360,26 +1617,53 @@
           this.invoicepdfimgsrcList,
           row.url
         );
-        this.invoicepdfimgsrcList.splice(indexlist, 1);
+        if (indexlist > -1) {
+          this.invoicepdfimgsrcList.splice(indexlist, 1);
+        }
         const index = this.getIndexInArray(this.invoicefileListto, row);
-        this.invoicefileListto.splice(index, 1);
-        console.log(this.rbDetails[this.atpresent].invoicefilesList);
-        const targetIndex = this.rbDetails[
-          this.atpresent
-        ].invoicefilesList.findIndex(item => {
-          return item.name === row.name; // 寤鸿浣跨敤涓ユ牸鐩哥瓑 ===
+        if (index > -1) {
+          this.invoicefileListto.splice(index, 1);
+        }
+        const invoiceFiles =
+          this.rbDetails[this.atpresent].invoicefilesList || [];
+        // 寮曠敤鍙戠エ鎸夊彂绁↖D鍖归厤锛岄伩鍏嶅悓鍚嶅彂绁ㄥ垹閿欙紱涓婁紶鏂囦欢鎸夊悕绉板吋瀹规棫鏁版嵁
+        const targetIndex = invoiceFiles.findIndex(item => {
+          return row.invoiceId
+            ? String(item.invoiceId) === String(row.invoiceId)
+            : item.name === row.name;
         });
-        console.log(targetIndex, "鍒犻櫎绱㈠紩"); // 鐜板湪鎵撳嵃鐨勬槸绱㈠紩鍙凤紝渚嬪 0, 1, 2...
+        console.log(targetIndex, "鍒犻櫎绱㈠紩");
 
+        let removed = null;
         if (targetIndex > -1) {
-          // 纭繚鎵惧埌浜嗗厓绱�
-          this.rbDetails[this.atpresent].invoicefilesList.splice(
-            targetIndex,
-            1
-          );
+          removed = invoiceFiles.splice(targetIndex, 1)[0];
           console.log("鍒犻櫎鎴愬姛");
         } else {
           console.log("鏈壘鍒板搴旈」鐩紝鏃犳硶鍒犻櫎");
+        }
+        // 鍒犻櫎宸插紩鐢ㄥ彂绁ㄦ椂锛屾寜寮曠敤鏃惰鍏ョ殑绉戠洰鍜岄噾棰濇墸鍑�
+        if (removed && removed.expenseField) {
+          this.applyInvoiceExpense(
+            this.rbDetails[this.atpresent],
+            removed,
+            -1
+          );
+          this.sumRowFee(this.rbDetails[this.atpresent]);
+        }
+        // 鍒犻櫎宸插紩鐢ㄧ殑鍙戠エ鍚庯紝鎶婂彂绁ㄦ仮澶嶄负鏈姤閿�
+        const invoiceId = row.invoiceId || (removed && removed.invoiceId);
+        if (invoiceId) {
+          updateInvoice({ id: invoiceId, reimburseState: "0" })
+            .then(() => {
+              this.$modal.msgSuccess(
+                "鍙戠エ宸插垹闄わ紝璐圭敤宸叉墸鍑忓苟鎭㈠涓烘湭鎶ラ攢"
+              );
+            })
+            .catch(() => {
+              this.$modal.msgError(
+                "鍙戠エ鐘舵�佹仮澶嶅け璐ワ紝璇峰埌鍙戠エ绠$悊涓墜鍔ㄦ爣璁颁负鏈姤閿�"
+              );
+            });
         }
       }
     },
@@ -1404,21 +1688,24 @@
         ); // 灏唅temann鎻掑叆鍒扮储寮曚綅缃殑鍓嶄竴浣�
       } else {
         const index = this.getIndexInArray(this.invoicefileListto, row);
+        if (index < 1) {
+          return;
+        }
         const item = this.invoicefileListto.splice(index, 1)[0]; // 绉婚櫎鎸囧畾绱㈠紩澶勭殑鍏冪礌锛屽苟淇濆瓨鍒癷tem鍙橀噺涓�
         this.invoicefileListto.splice(index - 1, 0, item); // 灏唅tem鎻掑叆鍒扮储寮曚綅缃殑鍓嶄竴浣�
 
-        const indexinvo = this.rbDetails[
-          this.atpresent
-        ].invoicefilesList.findIndex(item => item.name == row.name);
-        const iteminvo = this.rbDetails[this.atpresent].invoicefilesList.splice(
-          indexinvo,
-          1
-        )[0]; // 绉婚櫎鎸囧畾绱㈠紩澶勭殑鍏冪礌锛屽苟淇濆瓨鍒癷tem鍙橀噺涓�
-        this.rbDetails[this.atpresent].invoicefilesList.splice(
-          indexinvo - 1,
-          0,
-          iteminvo
-        ); // 灏唅teminvo鎻掑叆鍒扮储寮曚綅缃殑鍓嶄竴浣�
+        const invoiceFiles =
+          this.rbDetails[this.atpresent].invoicefilesList || [];
+        const indexinvo = invoiceFiles.findIndex(file =>
+          row.invoiceId
+            ? String(file.invoiceId) === String(row.invoiceId)
+            : file.name == row.name
+        );
+        if (indexinvo < 1) {
+          return;
+        }
+        const iteminvo = invoiceFiles.splice(indexinvo, 1)[0];
+        invoiceFiles.splice(indexinvo - 1, 0, iteminvo);
       }
     },
 
@@ -1547,35 +1834,58 @@
         row.persontype == "绠$悊浜哄憳"
       ) {
         //鍏潅璐硅ˉ鍔╋細鏉窞妗愬簮锛屽缓寰凤紝娣冲畨60锛屾澀宸炲叾浠栧湴鍖�0锛岄潪鏉窞鍦板尯80
+        const otherInvoice = this.sumInvoiceExpenseByField(
+          row,
+          "otherexpense"
+        );
+        const foodInvoice = this.sumInvoiceExpenseByField(
+          row,
+          "foodallowance"
+        );
+        // 鍏堢畻琛ュ姪鍩烘暟锛屽啀鍙犲姞椁愰ギ/鍔炲叕绫诲彂绁紝閬垮厤琛ュ姪閲嶇畻鎶婂彂绁ㄩ噾棰濊鐩�
+        let baseOther = row.otherexpense;
+        if (otherInvoice) {
+          baseOther = moneySub(row.otherexpense, otherInvoice);
+        }
         if (row.destination != "") {
           var tempStr = row.destination;
 
           //楠岃瘉鍩庡競
           if (tempStr == "鏉窞") {
-            row.otherexpense = "";
+            baseOther = "";
           } else if (
-            tempStr == "鏉窞-妗愬簮" ||
-            tempStr == "鏉窞-寤哄痉" ||
-            tempStr == "鏉窞-娣冲畨"
+            tempStr.includes("妗愬簮") ||
+            tempStr.includes("寤哄痉") ||
+            tempStr.includes("娣冲畨")
           ) {
-            row.otherexpense = (parseInt(row.days) * 60).toString();
+            baseOther = (parseInt(row.days) * 60).toString();
           } else {
-            row.otherexpense = (parseInt(row.days) * 80).toString();
+            baseOther = (parseInt(row.days) * 80).toString();
           }
         }
 
         //浼欓璐硅ˉ鍔╋細鍩庡競锛堣タ钘忥紝鏂扮枂锛岄潚娴�.120锛夛紙鍏朵粬100锛�
+        let baseFood = "";
         if (tempStr == "鏉窞") {
-          row.foodallowance = "";
+          baseFood = "";
         } else if (
           tempStr == "瑗胯棌" ||
           tempStr == "鏂扮枂" ||
           tempStr == "闈掓捣"
         ) {
-          row.foodallowance = (parseInt(row.days) * 120).toString();
+          baseFood = (parseInt(row.days) * 120).toString();
         } else {
-          row.foodallowance = (parseInt(row.days) * 100).toString();
+          baseFood = (parseInt(row.days) * 100).toString();
         }
+
+        row.otherexpense =
+          baseOther === "" && !otherInvoice
+            ? ""
+            : moneyAdd(baseOther, otherInvoice).toFixed(2);
+        row.foodallowance =
+          baseFood === "" && !foodInvoice
+            ? ""
+            : moneyAdd(baseFood, foodInvoice).toFixed(2);
 
         //璁$畻鍚堣
         this.sumRowFee(row);
@@ -1609,10 +1919,14 @@
             for (let i = 0; i < response.data.length; i++) {
               fee += response.data[i].reimbursementamout;
             }
-            row.hotelexpense = fee;
+            const hotelInvoice = this.sumInvoiceExpenseByField(
+              row,
+              "hotelexpense"
+            );
+            row.hotelexpense = moneyAdd(fee, hotelInvoice).toFixed(2);
           })
           .finally(() => {
-            this.sumTotalFee();
+            this.sumRowFee(row);
           });
       }
     },
@@ -1678,10 +1992,22 @@
         if (item.id == this.form.infoid) {
           this.form.donorno = item.donorno;
           this.form.donorname = item.name;
+
+          // 鏂板锛氬皢鎹愮尞鑰呯殑 recordstate 璧嬪�煎埌 invoicecount
+          if (item.recordstate !== undefined && item.recordstate !== null) {
+            this.form.invoicecount = item.recordstate.toString();
+          } else {
+            this.form.invoicecount = ""; // 濡傛灉 recordstate 涓虹┖锛屾竻绌哄瓧娈�
+          }
         }
       });
     },
-
+    // 娣诲姞娓呴櫎鏂规硶
+    clearDonatorInfo() {
+      this.form.donorno = "";
+      this.form.donorname = "";
+      this.form.invoicecount = ""; // 娓呯┖ invoicecount
+    },
     onpick(e) {
       // console.log(e,this.value1)
     },
@@ -1933,7 +2259,7 @@
             .map(item => ({ url: item, name: item }))
           : [];
         //瀹℃牳鐘舵��
-        this.form.recordstatus = response.data.recordstatus + "";
+        this.form.recordstatus = this.toStatusText(response.data.recordstatus, "-1");
         let ids = response.data.id;
         let listFundflowparams = {
           fundid: ids,
@@ -1944,14 +2270,19 @@
         });
 
         //鎶ラ攢鏄庣粏
-        getReimbursementdetaillist(ids).then(res => {
-          this.rbDetails = res.data;
-          //鍚堣璐圭敤
-          // if (this.rbDetails.length > 0) this.sumTotalFee();
-          for (let i = 0; i < this.rbDetails.length; i++) {
-            this.sumRowFee(this.rbDetails[i]);
-          }
-        });
+        getReimbursementdetaillist(ids)
+          .then(res => {
+            this.rbDetails = this.normalizeDetailList(res);
+            //鍚堣璐圭敤
+            // if (this.rbDetails.length > 0) this.sumTotalFee();
+            for (let i = 0; i < this.rbDetails.length; i++) {
+              this.sumRowFee(this.rbDetails[i]);
+            }
+          })
+          .catch(err => {
+            this.rbDetails = [];
+            console.error("鑾峰彇鎶ラ攢鏄庣粏澶辫触,id=" + ids, err);
+          });
 
         //浠樻淇℃伅
         this.queryParamsPayee.rbid = ids;
@@ -1974,12 +2305,21 @@
       this.reset();
       this.open = true;
       const id = ids || this.ids;
-      this.checkObj.fundid = id;
+      // 閲嶇疆瀹℃壒淇℃伅锛岄伩鍏嶄笂涓�鍗曠殑瀹℃壒缁撴灉甯﹀叆涓嬩竴鍗�
+      this.checkObj = {
+        flowlevelone: null,
+        flowconclusion: null,
+        fundid: id
+      };
+
+      // 杩炵画瀹℃壒锛氬姞杞藉綋鍓嶇敤鎴风殑寰呭鎵瑰垪琛�
+      this.getPendingList();
 
       getReimbursement(id).then(response => {
         this.form = response.data;
         console.log(this.form.checkstatus, "checkstatus");
-        this.form.checkstatus = this.form.checkstatus.toString();
+        // checkstatus 鍦ㄥ簱涓彲涓虹┖锛堥瀹$姸鎬佸皻鏈骇鐢熸椂锛夛紝鐩存帴 toString 浼氭姏 TypeError 涓柇鍚庣画鍙栨暟
+        this.form.checkstatus = this.toStatusText(this.form.checkstatus, "-1");
 
         //绁ㄦ嵁
         this.fileListto = this.form.annexfiles
@@ -2006,16 +2346,22 @@
         });
 
         //鎶ラ攢鏄庣粏
-        getReimbursementdetaillist(ids).then(res => {
-          this.rbDetails = res.data;
-          console.log(this.rbDetails);
+        getReimbursementdetaillist(ids)
+          .then(res => {
+            this.rbDetails = this.normalizeDetailList(res);
+            console.log("鎶ラ攢鏄庣粏琛屾暟锛�", this.rbDetails.length, this.rbDetails);
 
-          //鍚堣璐圭敤
-          // if (this.rbDetails.length > 0) this.sumTotalFee();
-          for (let i = 0; i < this.rbDetails.length; i++) {
-            this.sumRowFee(this.rbDetails[i]);
-          }
-        });
+            //鍚堣璐圭敤
+            // if (this.rbDetails.length > 0) this.sumTotalFee();
+            for (let i = 0; i < this.rbDetails.length; i++) {
+              this.sumRowFee(this.rbDetails[i]);
+            }
+          })
+          .catch(err => {
+            // 鍙栨暟澶辫触鏃朵笉鍐嶉潤榛橈細缃┖骞舵墦鍑哄師鍥狅紝閬垮厤鈥滄帴鍙f湁鏁版嵁浣嗛〉闈㈢┖鐧解�濇棤浠庢帓鏌�
+            this.rbDetails = [];
+            console.error("鑾峰彇鎶ラ攢鏄庣粏澶辫触,id=" + ids, err);
+          });
 
         //浠樻淇℃伅
         this.queryParamsPayee.rbid = ids;
@@ -2064,26 +2410,86 @@
         if (res.code == 200) {
           this.$modal.closeLoading();
           this.$modal.msgSuccess("鎻愪氦瀹℃牳鎴愬姛!");
-          // 鍏抽棴绐楀彛
-          this.$store.dispatch("tagsView/delView", this.$route);
-          this.$router.go(-1);
+          // 杩炵画瀹℃壒锛氳闂槸鍚︾户缁鎵逛笅涓�鍗�
+          this.continueOrExit();
         } else {
           this.$modal.closeLoading();
-          if (res.msg) {
-            this.$modal.msgError("鎿嶄綔澶辫");
-          } else {
-            this.$modal.msgError(res.msg);
-          }
+          this.$modal.msgError(res.msg || "鎿嶄綔澶辫触");
         }
       });
     },
 
+    // 鑾峰彇褰撳墠鐢ㄦ埛寰呭鎵瑰垪琛紙鐢ㄤ簬杩炵画瀹℃壒锛�
+    getPendingList() {
+      listbypowerone({
+        pageNum: 1,
+        pageSize: 1000,
+        CHECKFLAG: 1
+      })
+        .then(res => {
+          this.pendingList = res.rows || [];
+        })
+        .catch(() => {
+          this.pendingList = [];
+        });
+    },
+
+    // 瀹℃壒瀹屾垚鍚庯細璇㈤棶鏄惁缁х画瀹℃壒涓嬩竴鍗�
+    continueOrExit() {
+      const list = this.pendingList || [];
+      const curId = String(this.checkObj.fundid);
+      const idx = list.findIndex(item => String(item.id) === curId);
+      let next = null;
+      if (idx > -1 && idx + 1 < list.length) {
+        next = list[idx + 1];
+      } else {
+        // 褰撳墠宸叉槸鏈綅锛堟垨浠庝腑闂村紑濮嬶級锛屽彇鍓╀綑鍒楄〃涓涓�鏉¢潪褰撳墠鍗曟嵁
+        next = list.find(item => String(item.id) !== curId) || null;
+      }
+
+      if (next) {
+        this.$confirm("瀹℃壒宸插畬鎴愶紝鏄惁缁х画瀹℃壒涓嬩竴寮犲緟瀹℃壒鍗曟嵁锛�", "鎻愮ず", {
+          confirmButtonText: "缁х画瀹℃壒",
+          cancelButtonText: "杩斿洖鍒楄〃",
+          type: "info"
+        })
+          .then(() => {
+            // 鐩存帴鍦ㄥ綋鍓嶉〉闈㈠姞杞戒笅涓�寮犲緟瀹℃壒鍗曟嵁
+            this.handleCheck(next.id);
+            // 鍚屾鏇存柊鍦板潃鏍忥紝閬垮厤鍒锋柊鍚庡洖鍒颁笂涓�鍗�
+            this.$router
+              .replace({
+                path: this.$route.path,
+                query: { id: next.id, pos: 4 }
+              })
+              .catch(() => { });
+          })
+          .catch(() => {
+            this.exitToPage();
+          });
+      } else {
+        this.$modal.msgSuccess("宸叉棤寰呭鎵瑰崟鎹紝杩斿洖鍒楄〃");
+        this.exitToPage();
+      }
+    },
+
+    // 杩斿洖鍒楄〃椤�
+    exitToPage() {
+      this.$store.dispatch("tagsView/delView", this.$route);
+      this.$router.go(-1);
+    },
+
     /** 鎻愪氦淇濆瓨鎸夐挳 */
     submitForm: debounce(function (data) {
+      // 2026-10-15锛氫繚瀛樺墠闄勪欢鏂囦欢鍚嶈鑼冩牎楠岋紙浠呮柊澧炲崟鎹紱鑰佸崟鎹殑鍘嗗彶闄勪欢鐢卞悗绔寜"鍙牎楠屾湰娆″彉鏇�"鏀捐锛�
+      if (!this.checkDetailFileNames()) {
+        return;
+      }
+
       this.$refs["form"].validate(valid => {
         if (valid) {
           //绁ㄦ嵁鏂囦欢澶勭悊
-          // const addnumber = new Decimal(this.rbPayees.reduce((amount, item) => amount + Number(item.amount), 0 ));  
+          // const addnumber = new Decimal(this.rbPayees.reduce((amount, item) => amount + Number(item.amount), 0 ));
           // console.log(this.form.amountrequested,addnumber);
           // //鏍¢獙璇锋閲戦鍚堣鏄惁绛変簬鎶ラ攢鍗曢噾棰�
           // if (this.form.amountrequested != addnumber) {
@@ -2163,12 +2569,12 @@
             //淇濆瓨鏄庣粏
             for (let i = 0; i < rbDetails.length; i++) {
               if (rbDetails[i].rbid != null) {
-                if (rbDetails[i].persontype == "瀹跺睘") {
+                if (rbDetails[i].persontype == "瀹跺睘" || rbDetails[i].persontype == "涓撳") {
                   if (this.form.infoid) {
                     updateReimbursementdetail(rbDetails[i]);
                   } else {
                     return this.$message.error(
-                      `鍥犲灞炲垎閰嶈姹傦紝璇烽�夋嫨鎹愮尞鑰呬俊鎭痐
+                      "鍥犺储鍔℃牳绠楃殑瑕佹眰锛屽灞炴垨涓撳鐨勬姤閿�锛岄渶瑕侀�夋嫨瀵瑰簲鐨勬崘鐚�咃紒"
                     );
                   }
                 } else {
@@ -2182,7 +2588,7 @@
                     addReimbursementdetail(rbDetails[i]);
                   } else {
                     return this.$message.error(
-                      `鍥犲灞炲垎閰嶈姹傦紝璇烽�夋嫨鎹愮尞鑰呬俊鎭痐
+                      "鍥犺储鍔℃牳绠楃殑瑕佹眰锛屽灞炴垨涓撳鐨勬姤閿�锛岄渶瑕侀�夋嫨瀵瑰簲鐨勬崘鐚�咃紒"
                     );
                   }
                 } else {
@@ -2303,6 +2709,11 @@
     },
     // 鎺ュ彈鎻愰啋绔嬪埢淇濆瓨
     Savenow() {
+      // 2026-10-15锛氫繚瀛樺墠闄勪欢鏂囦欢鍚嶈鑼冩牎楠岋紙浠呮柊澧炲崟鎹紱鑰佸崟鎹殑鍘嗗彶闄勪欢鐢卞悗绔寜"鍙牎楠屾湰娆″彉鏇�"鏀捐锛�
+      if (!this.checkDetailFileNames()) {
+        return;
+      }
+
       this.Savereminder = false;
       this.Reminderquantity = 0;
       this.totalquantity = 0;
@@ -2579,108 +2990,71 @@
         });
     },
 
-    //璁$畻涓�琛屽悎璁�
-    //璁$畻褰撳墠琛屾姤閿�鍐呭璐圭敤鍚堣
-    sumRowFee(row) {
-      let totalFee = 0;
-      if (!isNaN(parseFloat(row.trafficexpense))) {
-        totalFee += parseFloat(row.trafficexpense);
+    /**
+     * 鐘舵�佺被瀛楁杞瓧绗︿覆锛堟帴鍙e彲鑳借繑鍥� null锛夈��
+     *
+     * 鑳屾櫙锛歝heckstatus銆乺ecordstatus 绛夊湪搴撲腑鍙┖锛屾棭鏈熺洿鎺ヨ皟鐢� .toString()
+     * 浼氭姏 TypeError 骞朵腑鏂叾鍚庣殑鍙栨暟閫昏緫锛岃〃鐜颁负鈥滄帴鍙e凡鏈夋暟鎹絾鏄庣粏鍖虹┖鐧解�濄��
+     *
+     * @param {*} value 鍘熷鐘舵�佸��
+     * @param {string} fallback 涓虹┖鏃剁殑鍏滃簳鍊�
+     * @returns {string}
+     */
+    toStatusText(value, fallback) {
+      if (value === null || value === undefined || value === "") {
+        return fallback;
       }
-      if (!isNaN(parseFloat(row.cityfee))) {
-        totalFee += parseFloat(row.cityfee);
-      }
-      if (!isNaN(parseFloat(row.hotelexpense))) {
-        totalFee += parseFloat(row.hotelexpense);
-      }
-      if (!isNaN(parseFloat(row.otherexpense))) {
-        totalFee += parseFloat(row.otherexpense);
-      }
-      if (!isNaN(parseFloat(row.foodexpenses))) {
-        totalFee += parseFloat(row.foodexpenses);
-      }
-      if (!isNaN(parseFloat(row.foodallowance))) {
-        totalFee += parseFloat(row.foodallowance);
-      }
-      if (!isNaN(parseFloat(row.otherfeeamount))) {
-        totalFee += parseFloat(row.otherfeeamount);
-      }
-      row.total = totalFee.toFixed(2);
+      return String(value);
+    },
 
-      /*
-      if (!isNaN(parseFloat(this.rbDetails[rowIndex].trafficexpense))) {
-        totalFee += parseFloat(this.rbDetails[rowIndex].trafficexpense);
+    /**
+     * 缁熶竴浠庢槑缁嗘帴鍙e搷搴斾腑鍙栧嚭鏁扮粍銆�
+     *
+     * 姝e父涓� AjaxResult 鐨� data 鏁扮粍锛涜嫢鍚庣鏀逛负鍒嗛〉缁撴瀯锛坱otal + rows锛夛紝
+     * res.data 灏嗕笉鏄暟缁勶紝鐩存帴缁戝畾鍒� el-table 浼氬鑷粹�滄湁鏁版嵁浣嗕笉鏄剧ず鈥濄��
+     *
+     * @param {Object} res 鎺ュ彛鍘熷鍝嶅簲
+     * @returns {Array} 鏄庣粏鏁扮粍锛堝紓甯告椂涓虹┖鏁扮粍锛屼笉浼氳琛ㄦ牸鎷垮埌闈炴暟缁勶級
+     */
+    normalizeDetailList(res) {
+      if (!res) {
+        return [];
       }
-      if (!isNaN(parseFloat(this.rbDetails[rowIndex].cityfee))) {
-        totalFee += parseFloat(this.rbDetails[rowIndex].cityfee);
+      if (Array.isArray(res.data)) {
+        return res.data;
       }
-      if (!isNaN(parseFloat(this.rbDetails[rowIndex].hotelexpense))) {
-        totalFee += parseFloat(this.rbDetails[rowIndex].hotelexpense);
+      if (Array.isArray(res.rows)) {
+        return res.rows;
       }
-      if (!isNaN(parseFloat(this.rbDetails[rowIndex].otherexpense))) {
-        totalFee += parseFloat(this.rbDetails[rowIndex].otherexpense);
-      }
-      if (!isNaN(parseFloat(this.rbDetails[rowIndex].foodexpenses))) {
-        totalFee += parseFloat(this.rbDetails[rowIndex].foodexpenses);
-      }
-      if (!isNaN(parseFloat(this.rbDetails[rowIndex].foodallowance))) {
-        totalFee += parseFloat(this.rbDetails[rowIndex].foodallowance);
-      }
-      if (!isNaN(parseFloat(this.rbDetails[rowIndex].otherfeeamount))) {
-        totalFee += parseFloat(this.rbDetails[rowIndex].otherfeeamount);
-      }
-      this.rbDetails[rowIndex].total = parseFloat(totalFee).toFixed(2);
-      this.$set(this.rbDetails, rowIndex, this.rbDetails[rowIndex]);
-      */
+      return [];
+    },
+
+    //璁$畻涓�琛屽悎璁�
+    //璁$畻褰撳墠琛屾姤閿�鍐呭璐圭敤鍚堣锛堥噾棰濅竴寰嬭蛋绮剧‘杩愮畻锛�
+    sumRowFee(row) {
+      const totalFee = moneySum([
+        row.trafficexpense,
+        row.cityfee,
+        row.hotelexpense,
+        row.otherexpense,
+        row.foodexpenses,
+        row.foodallowance,
+        row.otherfeeamount
+      ]);
+      row.total = moneyRound(totalFee).toFixed(2);
+
       //閲嶆柊璁$畻鏁翠釜鎶ラ攢鍗曠殑鍚堣
       this.sumTotalFee();
     },
 
     //璁$畻璐圭敤鍚堣
     sumTotalFee() {
-      let allSum = 0;
-
-      //鎹愮尞鑰呭灞炶垂鐢�
-      if (!isNaN(parseFloat(this.form.donoramount))) {
-        allSum += parseFloat(this.form.donoramount);
-      }
-
       //鎶ラ攢鏄庣粏璐圭敤
       try {
-        for (let i = 0; i < this.rbDetails.length; i++) {
-          /*
-          let totalFee = 0;
-          //璁$畻褰撳墠鎶ラ攢鍐呭璐圭敤鍚堣
-          if (!isNaN(parseFloat(this.rbDetails[i].total))) {
-            totalFee += parseFloat(this.rbDetails[i].total);
-          }
-          if (!isNaN(parseFloat(this.rbDetails[i].cityfee))) {
-            totalFee += parseFloat(this.rbDetails[i].cityfee);
-          }
-          if (!isNaN(parseFloat(this.rbDetails[i].hotelexpense))) {
-            totalFee += parseFloat(this.rbDetails[i].hotelexpense);
-          }
-          if (!isNaN(parseFloat(this.rbDetails[i].otherexpense))) {
-            totalFee += parseFloat(this.rbDetails[i].otherexpense);
-          }
-          if (!isNaN(parseFloat(this.rbDetails[i].foodexpenses))) {
-            totalFee += parseFloat(this.rbDetails[i].foodexpenses);
-          }
-          if (!isNaN(parseFloat(this.rbDetails[i].foodallowance))) {
-            totalFee += parseFloat(this.rbDetails[i].foodallowance);
-          }
-          if (!isNaN(parseFloat(this.rbDetails[i].otherfeeamount))) {
-            totalFee += parseFloat(this.rbDetails[i].otherfeeamount);
-          }
-          this.rbDetails[i].total = parseFloat(totalFee).toFixed(2);
-          this.$set(this.rbDetails, i, this.rbDetails[i]);
-          */
-
-          if (!isNaN(parseFloat(this.rbDetails[i].total))) {
-            allSum += parseFloat(this.rbDetails[i].total);
-          }
-        }
-
-        this.form.amountrequested = allSum.toFixed(2);
+        this.form.amountrequested = moneyAdd(
+          moneySum(this.rbDetails, "total"),
+          this.form.donoramount
+        ).toFixed(2);
         this.form.bigstrmoney = this.convertCurrency(this.form.amountrequested);
       } catch { }
     },
@@ -2865,6 +3239,19 @@
   text-align: center;
 }
 
+.invoice-select-bar {
+  display: flex;
+  align-items: center;
+  flex-wrap: wrap;
+  margin-bottom: 10px;
+
+  &__tip {
+    margin-left: 10px;
+    font-size: 12px;
+    color: #909399;
+  }
+}
+
 .pdfimg {
   display: flex; // text-align: center;
   width: 100%;
@@ -2880,6 +3267,11 @@
     box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1); // <- Add this to fix.
   }
 
+  // 鍙戠エ椤靛鍑虹被鍨�/鍚嶇О/閲戦涓夊垪锛岀粰琛ㄦ牸鐣欏嚭妯悜绌洪棿
+  .box-pdf--invoice {
+    width: 560px;
+  }
+
   .pdftit {
     width: 200px;
     padding: 20px;

--
Gitblit v1.9.3