From dc1af3f3cacd1e917076aa16ab2d74225f547c4d Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期三, 04 十二月 2024 17:35:44 +0800
Subject: [PATCH] 改bug

---
 admin/src/views/contract/components/terminateLease.vue |   34 ++++++++--------------------------
 1 files changed, 8 insertions(+), 26 deletions(-)

diff --git a/admin/src/views/contract/components/terminateLease.vue b/admin/src/views/contract/components/terminateLease.vue
index 23f9b2f..83108ee 100644
--- a/admin/src/views/contract/components/terminateLease.vue
+++ b/admin/src/views/contract/components/terminateLease.vue
@@ -84,6 +84,7 @@
                     label="璐﹀崟缂栧彿">
                 </el-table-column>
                 <el-table-column
+                    width="100"
                     label="璐圭敤绫诲瀷">
                     <template slot-scope="{row}">
                         <span v-if="row.costType === 0">绉熻祦璐�</span>
@@ -103,13 +104,14 @@
                     label="搴旀敹浠橀噾棰�/鍘熷搴旀敹浠�">
                     <template v-slot="{row}">
                         <div style="display: flex; align-items: center;">
-                            <el-input v-model="row.receivableFee" @input="changeReceivableFee($event, row)" placeholder="璇疯緭鍏ュ唴瀹�" style="width: 90px;"></el-input>
+                            <el-input v-model="row.receivableFee" @input="changeReceivableFee($event, row)" placeholder="璇疯緭鍏ュ唴瀹�" style="flex: 1;"></el-input>
                             <span style="margin: 0 10px;">/</span>
                             {{row.receivableFeeCopy}}
                         </div>
                     </template>
                 </el-table-column>
                 <el-table-column
+                    width="120"
                     prop="actReceivableFee"
                     label="瀹炴敹/浠橀噾棰�">
                 </el-table-column>
@@ -179,7 +181,7 @@
                 </el-table-column>
             </el-table>
             <div class="footer">
-                鍚堣搴旀敹锛�<span>{{receivable.toFixed(2)}}</span>鍏冿紝 鍚堣搴斾粯锛�<span>{{meet.toFixed(2)}}</span>鍏�
+                鍚堣搴旀敹锛�<span>{{receivable}}</span>鍏冿紝 鍚堣搴斾粯锛�<span>{{meet}}</span>鍏�
             </div>
         </div>
         <!--    鍒涘缓鏀舵璐﹀崟    -->
@@ -247,26 +249,6 @@
         loading: false
       }
     },
-    watch: {
-      // info: {
-      //   deep: true,
-      //   immediate: true,
-      //   handler(news, olds) {
-      //     const arr = [...this.info.terminateList, ...this.info.depositList]
-      //     let total1 = 0
-      //     let total2 = 0
-      //     arr.forEach(item => {
-      //       if (item.billType === 0) {
-      //         total1 += Number(item.price)
-      //       } else if (item.billType === 1) {
-      //         total2 += Number(item.price)
-      //       }
-      //     })
-      //     this.receivable = total1
-      //     this.meet = total2
-      //   }
-      // }
-    },
     methods: {
       open (title, info) {
         this.title = title
@@ -279,12 +261,12 @@
           this.$refs.form.resetFields()
         })
         this.info.canBackRentBills.forEach(item => {
-          this.$set(item, 'receivableFeeCopy', item.receivableFee)
-          this.$set(item, 'receivableFee', item.needReceivableFee)
           if ([2,3,7].includes(item.costType)) {
             this.$set(item, 'billType', 1)
             this.$set(item, 'price', item.actReceivableFee)
           } else {
+            this.$set(item, 'receivableFeeCopy', item.receivableFee)
+            this.$set(item, 'receivableFee', item.needReceivableFee)
             this.$set(item, 'price', item.needReceivableFee)
           }
         })
@@ -315,8 +297,8 @@
             total2 += Number(item.price)
           }
         })
-        this.receivable = total1
-        this.meet = total2
+        this.receivable = total1.toFixed(2)
+        this.meet = total2.toFixed(2)
       },
       getDay () {
         const today = new Date();

--
Gitblit v1.9.3