From 5abe582142405569435c7cd0a479908aa5bff992 Mon Sep 17 00:00:00 2001
From: chenrui <1187576398@qq.com>
Date: 星期五, 06 六月 2025 17:04:53 +0800
Subject: [PATCH] 分页修改

---
 src/views/procurementManagement/invoiceEntry/index.vue |   26 ++++++++++++++++++++------
 1 files changed, 20 insertions(+), 6 deletions(-)

diff --git a/src/views/procurementManagement/invoiceEntry/index.vue b/src/views/procurementManagement/invoiceEntry/index.vue
index bccf47f..cce56ca 100644
--- a/src/views/procurementManagement/invoiceEntry/index.vue
+++ b/src/views/procurementManagement/invoiceEntry/index.vue
@@ -107,9 +107,7 @@
           <el-form-item label="浜у搧淇℃伅锛�" prop="entryDate">
           </el-form-item>
         </el-row>
-        <el-table :data="productData" border @selection-change="productSelected" show-summary style="width: 100%">
-          :summary-method="summarizeChildrenTable"
-          >
+        <el-table :data="productData" border @selection-change="productSelected" show-summary style="width: 100%" :summary-method="summarizeChildrenTable">
           <el-table-column align="center" label="搴忓彿" type="index" width="60" />
           <el-table-column label="浜у搧澶х被" prop="productCategory" />
           <el-table-column label="瑙勬牸鍨嬪彿" prop="specificationModel" />
@@ -121,13 +119,13 @@
           <el-table-column label="涓嶅惈绋庢�讳环(鍏�)" width="150" prop="taxExclusiveTotalPrice" :formatter="formattedNumber" />
           <el-table-column label="鏈鏉ョエ鏁�" prop="ticketsNum" width="170">
             <template #default="scope">
-              <el-input-number v-model="scope.row.ticketsNum" placeholder="璇烽�夋嫨" min="0" :step="0.1" clearable style="width: 100%"
+              <el-input-number v-model="scope.row.ticketsNum" placeholder="璇烽�夋嫨" :min="0" :step="0.1" clearable style="width: 100%"
                 @change="invoiceNumBlur(scope.row)" />
             </template>
           </el-table-column>
-          <el-table-column label="鏈鏉ョエ閲戦(鍏�)" prop="ticketsAmount" min="0" :step="0.1" :formatter="formattedNumber" @change="invoiceAmountBlur"  width="170">
+          <el-table-column label="鏈鏉ョエ閲戦(鍏�)" prop="ticketsAmount" :min="0" :step="0.1" :formatter="formattedNumber" @change="invoiceAmountBlur"  width="170">
             <template #default="scope">
-              <el-input-number v-model="scope.row.ticketsAmount" placeholder="璇烽�夋嫨" min="0" :step="0.1" clearable style="width: 100%"
+              <el-input-number v-model="scope.row.ticketsAmount" placeholder="璇烽�夋嫨" :min="0" :step="0.1" clearable style="width: 100%"
                                @change="invoiceAmountBlur(scope.row)" />
             </template>
           </el-table-column>
@@ -414,6 +412,7 @@
   row.futureTickets = row.tempFutureTickets - row.ticketsNum
   // 璁$畻鏈潵绁ㄩ噾棰�
   row.futureTicketsAmount = row.tempFutureTicketsAmount - row.ticketsAmount
+  calculateinvoiceAmount()
 }
 // 鏈鏉ョエ閲戦澶辩劍鎿嶄綔
 const invoiceAmountBlur = (row) => {
@@ -431,6 +430,7 @@
   row.futureTickets = row.tempFutureTickets - row.ticketsNum
   // 璁$畻鏈潵绁ㄩ噾棰�
   row.futureTicketsAmount = row.tempFutureTicketsAmount - row.ticketsAmount
+  calculateinvoiceAmount()
 }
 
 // 鑾峰彇褰撳墠鏃ユ湡鍑芥暟
@@ -443,6 +443,20 @@
   if (strDate < 10) strDate = `0${strDate}` // 濡傛灉鏃ユ槸涓綅鏁帮紝鍦ㄥ墠闈㈣ˉ0
   return `${year}-${month}-${strDate}`
 }
+
+
+function calculateinvoiceAmount() {
+  console.log('productData',productData.value)
+  var invoiceAmountTotal = 0
+  productData.value.forEach(item => {
+    if(item.ticketsAmount){
+      invoiceAmountTotal += item.ticketsAmount
+    }
+  })
+  form.value.invoiceAmount = invoiceAmountTotal.toFixed(2)
+
+}
+
 getList()
 </script>
 

--
Gitblit v1.9.3