From f67075dfb8757171d3287a31f9fc48cd15d37bd7 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期四, 05 十二月 2024 18:35:23 +0800
Subject: [PATCH] 修改bug

---
 admin/.env                                             |    4 
 admin/src/layouts/AppLayout.vue                        |    2 
 admin/src/views/contract/components/contractEdit.vue   |  108 ++++++++++++++++-----
 admin/src/views/contract/components/terminateLease.vue |   88 +++++++++--------
 admin/src/views/finance/payments.vue                   |    2 
 admin/src/views/finance/components/flowingWater.vue    |   12 ++
 admin/src/views/contract/contractList.vue              |    6 +
 admin/src/views/contract/components/contractDetail.vue |   20 ++-
 admin/.env.test                                        |    9 +
 admin/src/api/business/company.js                      |    5 +
 admin/src/api/contract.js                              |    4 
 admin/src/views/finance/components/bullDetail.vue      |    2 
 admin/src/views/finance/components/companyEdit.vue     |   17 ++
 13 files changed, 190 insertions(+), 89 deletions(-)

diff --git a/admin/.env b/admin/.env
index 18495ab..c471f0b 100644
--- a/admin/.env
+++ b/admin/.env
@@ -3,8 +3,8 @@
 # 璺敱鏂瑰紡
 VUE_APP_ROUTER_MODE = 'hash'
 
-# 椤圭洰涓婁笅鏂囪矾寰�
-VUE_APP_CONTEXT_PATH = '/fn_admin/#/'
+# 椤圭洰涓婁笅鏂囪矾寰� fn_admin/#/
+VUE_APP_CONTEXT_PATH = '/'
 
 # 鎺ュ彛鍓嶇紑
 VUE_APP_API_PREFIX = '/gateway_interface'
diff --git a/admin/.env.test b/admin/.env.test
index 0097b88..8690fa3 100644
--- a/admin/.env.test
+++ b/admin/.env.test
@@ -3,6 +3,11 @@
 
 # VUE_APP_API_URL  = 'http://192.168.5.13/gateway_interface'
 
-VUE_APP_API_URL  = 'http://192.168.0.163:10010/'
+# 浠诲悍
+# VUE_APP_API_URL  = 'http://192.168.0.163:10010/'
 
-# VUE_APP_API_URL  = 'http://192.168.0.108:10030/'
+# 钀嶅
+VUE_APP_API_URL  = 'http://192.168.0.105:10010/'
+
+# 娴嬭瘯鏈嶅姟
+# VUE_APP_API_URL  = 'https://dmtest.ahapp.net/gateway_interface'
diff --git a/admin/src/api/business/company.js b/admin/src/api/business/company.js
index 28b67ec..55d9dea 100644
--- a/admin/src/api/business/company.js
+++ b/admin/src/api/business/company.js
@@ -74,3 +74,8 @@
     }
   })
 }
+
+// 鏍规嵁ID鏌ヨ
+export function getById (id) {
+  return request.get(`/visitsAdmin/cloudService/business/company/${id}`)
+}
diff --git a/admin/src/api/contract.js b/admin/src/api/contract.js
index 1449001..ab08c1c 100644
--- a/admin/src/api/contract.js
+++ b/admin/src/api/contract.js
@@ -42,3 +42,7 @@
   return request.post('/visitsAdmin/cloudService/business/ywContractBill/getCanBackBill', data)
 }
 
+// 鏌ヨ璐﹀崟
+export function findForBills (data) {
+  return request.post('/visitsAdmin/cloudService/business/ywContract/findForBills', data)
+}
diff --git a/admin/src/layouts/AppLayout.vue b/admin/src/layouts/AppLayout.vue
index 837c9bb..b13f5dc 100644
--- a/admin/src/layouts/AppLayout.vue
+++ b/admin/src/layouts/AppLayout.vue
@@ -58,7 +58,7 @@
 
   display: flex;
   // overflow: hidden;
-  overflow: scroll;
+  /*overflow: scroll;*/
   // 宸﹁竟鑿滃崟
   .el-aside {
     width: $menu-width !important;
diff --git a/admin/src/views/contract/components/contractDetail.vue b/admin/src/views/contract/components/contractDetail.vue
index 730f2c2..a9c43db 100644
--- a/admin/src/views/contract/components/contractDetail.vue
+++ b/admin/src/views/contract/components/contractDetail.vue
@@ -113,12 +113,17 @@
         </div>
         <div class="item">
           <div class="la">鍏嶇鏈�</div>
-          <div class="val">{{ info.zlFreeStartDate }} ~ {{ info.zlFreeEndDate }}</div>
+          <div class="val" v-if="info.zlFreeStartDate && info.zlFreeEndDate">
+            {{ info.zlFreeStartDate }} ~ {{ info.zlFreeEndDate }}
+          </div>
+          <div class="val" v-else>
+            -
+          </div>
         </div>
       </div>
       <el-table :data="info.zlDetailList" stripe style="margin-bottom: 20px;" v-if="info.type === 2 || info.type === 0">
-        <el-table-column prop="startDate" label="寮�濮嬫棩鏈�" min-width="100" show-overflow-tooltip />
-        <el-table-column prop="endDate" label="缁撴潫鏃ユ湡" min-width="100" show-overflow-tooltip />
+        <el-table-column prop="startDate" label="寮�濮嬫棩鏈�" :key="Date.now()" min-width="100" show-overflow-tooltip />
+        <el-table-column prop="endDate" label="缁撴潫鏃ユ湡" :key="Date.now()" min-width="100" show-overflow-tooltip />
         <el-table-column label="鍚堝悓鍗曚环" min-width="100" show-overflow-tooltip>
           <template slot-scope="{row}">
             {{row.price}} {{returnUnit(row.circleType)}}
@@ -126,7 +131,9 @@
         </el-table-column>
         <el-table-column label="浠樻鎻愬墠澶╂暟" min-width="100" show-overflow-tooltip>
           <template slot-scope="{row}">
-            {{row.advanceDays}}澶�
+            <template v-if="row.advanceDays">
+              {{row.advanceDays}}澶�
+            </template>
           </template>
         </el-table-column>
       </el-table>
@@ -149,8 +156,8 @@
         </div>
       </div>
       <el-table :data="info.wyDetailList" stripe style="margin-bottom: 20px;" v-if="info.type === 1 || info.type === 0">
-        <el-table-column prop="startDate" label="寮�濮嬫棩鏈�" min-width="100" show-overflow-tooltip />
-        <el-table-column prop="endDate" label="缁撴潫鏃ユ湡" min-width="100" show-overflow-tooltip />
+        <el-table-column prop="startDate" label="寮�濮嬫棩鏈�" :key="Date.now()" min-width="100" show-overflow-tooltip />
+        <el-table-column prop="endDate" label="缁撴潫鏃ユ湡" :key="Date.now()" min-width="100" show-overflow-tooltip />
         <el-table-column label="鍚堝悓鍗曚环" min-width="100" show-overflow-tooltip>
           <template slot-scope="{row}">
             {{row.price}} {{returnUnit(row.circleType)}}
@@ -402,7 +409,6 @@
       })
     },
     changeType (e) {
-      console.log(e)
       this.type = e
       this.page = 1
       this.pageSize = 10
diff --git a/admin/src/views/contract/components/contractEdit.vue b/admin/src/views/contract/components/contractEdit.vue
index 3fa3f50..cc88366 100644
--- a/admin/src/views/contract/components/contractEdit.vue
+++ b/admin/src/views/contract/components/contractEdit.vue
@@ -127,7 +127,7 @@
                   <el-input v-model="form.zlDeposit" @input="clearzl" placeholder="璇疯緭鍏�" v-trim />
                 </el-form-item>
                 <el-form-item label="浠樻鏂瑰紡" prop="zlPayType">
-                  <el-select v-model="form.zlPayType" @change="clearzl" placeholder="璇烽�夋嫨">
+                  <el-select v-model="form.zlPayType" @change="changePayType" placeholder="璇烽�夋嫨">
                     <el-option v-for="(item, index) in payMethods" :key="index" :value="item.value" :label="item.name"></el-option>
                   </el-select>
                 </el-form-item>
@@ -216,7 +216,7 @@
                   <el-input v-model="form.wyDeposit" @input="clearwy" placeholder="璇疯緭鍏�" v-trim />
                 </el-form-item>
                 <el-form-item label="浠樻鏂瑰紡" prop="wyPayType">
-                  <el-select v-model="form.wyPayType" @change="clearwy" placeholder="璇烽�夋嫨">
+                  <el-select v-model="form.wyPayType" @change="changePayType1" placeholder="璇烽�夋嫨">
                     <el-option v-for="(item, index) in payMethods" :key="index" :value="item.value" :label="item.name"></el-option>
                   </el-select>
                 </el-form-item>
@@ -241,7 +241,7 @@
                   }">
                     <el-input placeholder="璇疯緭鍏�" @input="clearwy" v-model="wyDetailList.price">
                       <el-select v-model="wyDetailList.circleType" @change="clearwy" style="width: 150px;" slot="append" placeholder="璇烽�夋嫨">
-                        <el-option v-for="(item, index) in unitOps" :key="index" :value="item.value" :label="item.name"></el-option>
+                        <el-option v-for="(item, index) in unitOps1" :key="index" :value="item.value" :label="item.name"></el-option>
                       </el-select>
                     </el-input>
                   </el-form-item>
@@ -340,7 +340,7 @@
         startDate: '',
         endDate: '',
         projectId: '',
-        roundedUp: '',
+        roundedUp: 0,
         companyId: '',
         renterId: '',
         renterName: '',
@@ -423,6 +423,15 @@
         { name: '鍏�/m虏路骞�', value: 2 },
         { name: '鍏�/鍦�', value: 6 },
       ],
+      unitOps1: [
+        { name: '鍏�/m虏路澶�', value: 0 },
+        { name: '鍏�/m虏路鏈�', value: 1 },
+        { name: '鍏�/澶�', value: 3 },
+        { name: '鍏�/鏈�', value: 4 },
+        { name: '鍏�/骞�', value: 5 },
+        { name: '鍏�/m虏路骞�', value: 2 },
+        { name: '鍏�/鍦�', value: 6 },
+      ],
       
       houseLvThree: []
     }
@@ -473,8 +482,65 @@
             advanceDays: ''
           }
         ]
+        this.form.roundedUp = 0
         // this.getHouseTree()
       })
+    },
+    changePayType (e) {
+      if (e === 0) {
+        this.unitOps = [
+          { name: '鍏�/m虏路澶�', value: 0 },
+          { name: '鍏�/m虏路鏈�', value: 1 },
+          { name: '鍏�/澶�', value: 3 },
+          { name: '鍏�/鏈�', value: 4 },
+          { name: '鍏�/骞�', value: 5 },
+          { name: '鍏�/m虏路骞�', value: 2 },
+          { name: '鍏�/鍦�', value: 6 },
+        ]
+      } else {
+        this.form.zlDetailList.forEach(item => {
+          if (item.circleType === 6) {
+            item.circleType = 0
+          }
+        })
+        this.unitOps = [
+          { name: '鍏�/m虏路澶�', value: 0 },
+          { name: '鍏�/m虏路鏈�', value: 1 },
+          { name: '鍏�/澶�', value: 3 },
+          { name: '鍏�/鏈�', value: 4 },
+          { name: '鍏�/骞�', value: 5 },
+          { name: '鍏�/m虏路骞�', value: 2 }
+        ]
+      }
+      this.clearzl()
+    },
+    changePayType1 (e) {
+      if (e === 0) {
+        this.unitOps1 = [
+          { name: '鍏�/m虏路澶�', value: 0 },
+          { name: '鍏�/m虏路鏈�', value: 1 },
+          { name: '鍏�/澶�', value: 3 },
+          { name: '鍏�/鏈�', value: 4 },
+          { name: '鍏�/骞�', value: 5 },
+          { name: '鍏�/m虏路骞�', value: 2 },
+          { name: '鍏�/鍦�', value: 6 },
+        ]
+      } else {
+        this.form.wyDetailList.forEach(item => {
+          if (item.circleType === 6) {
+            item.circleType = 0
+          }
+        })
+        this.unitOps1 = [
+          { name: '鍏�/m虏路澶�', value: 0 },
+          { name: '鍏�/m虏路鏈�', value: 1 },
+          { name: '鍏�/澶�', value: 3 },
+          { name: '鍏�/鏈�', value: 4 },
+          { name: '鍏�/骞�', value: 5 },
+          { name: '鍏�/m虏路骞�', value: 2 }
+        ]
+      }
+      this.clearwy()
     },
     // 鑾峰彇鑱旂郴浜�
     getYwList () {
@@ -487,6 +553,16 @@
     getHouseData () {
       if (this.form.startDate && this.form.endDate) {
         this.getHouseTree()
+        if (this.form.zlDetailList.length === 1) {
+          this.form.zlDetailList[0].startDate = this.form.startDate
+          this.form.zlDetailList[0].endDate = this.form.endDate
+          this.form.zlDetailList[0].time = [this.form.startDate, this.form.endDate]
+        }
+        if (this.form.wyDetailList.length === 1) {
+          this.form.wyDetailList[0].startDate = this.form.startDate
+          this.form.wyDetailList[0].endDate = this.form.endDate
+          this.form.wyDetailList[0].time = [this.form.startDate, this.form.endDate]
+        }
       }
     },
     changeType (e) {
@@ -499,35 +575,13 @@
     getDayTime (num) {
       const today = new Date();
       const year = today.getFullYear();
-      const month = today.getMonth() + 1; // 鏈堜唤鏄粠 0 寮�濮嬬殑锛屽洜姝ら渶瑕佸姞 1
+      const month = today.getMonth() + 1;
       const day = today.getDate();
       if (!num) {
         return `${year}-${month < 10 ? '0' + month : month}-${day < 10 ? '0' + day : day}`;
       } else {
         return `${year + 1}-${month < 10 ? '0' + month : month}-${day < 10 ? '0' + day - 1 : day - 1}`;
       }
-    },
-    clearData () {
-      this.form.zlDetailList = [
-        {
-          circleType: 0,
-          startDate: this.form.startDate,
-          endDate: this.form.endDate,
-          time: [this.form.startDate, this.form.endDate],
-          price: '',
-          advanceDays: ''
-        }
-      ]
-      this.form.wyDetailList = [
-        {
-          circleType: 0,
-          startDate: this.form.startDate,
-          endDate: this.form.endDate,
-          time: [this.form.startDate, this.form.endDate],
-          price: '',
-          advanceDays: ''
-        }
-      ]
     },
     clearzl () {
       this.zlList = []
diff --git a/admin/src/views/contract/components/terminateLease.vue b/admin/src/views/contract/components/terminateLease.vue
index 83108ee..b4e60cb 100644
--- a/admin/src/views/contract/components/terminateLease.vue
+++ b/admin/src/views/contract/components/terminateLease.vue
@@ -121,7 +121,7 @@
                         <div style="display: flex; align-items: center;">
                             <el-tag type="success" v-if="row.billType === 0">鏀�</el-tag>
                             <el-tag type="warning" v-if="row.billType === 1">浠�</el-tag>
-                            <span style="margin-left: 10px;">{{row.price}}</span>
+                            <span style="margin-left: 10px;">{{Math.abs(row.price)}}</span>
                         </div>
                     </template>
                 </el-table-column>
@@ -155,9 +155,12 @@
                         {{row.startDate}} ~ {{row.endDate}}
                     </template>
                 </el-table-column>
+<!--                prop="receivableFee"-->
                 <el-table-column
-                    prop="receivableFee"
                     label="搴旀敹閲戦">
+                    <template slot-scope="{row}">
+                        0
+                    </template>
                 </el-table-column>
                 <el-table-column
                     prop="actReceivableFee"
@@ -197,7 +200,7 @@
   import AddCollectionBill from './addCollectionBill'
   import AddPaymentBill from './addPaymentBill'
   import { getUserList } from '@/api/system/user'
-  import { backRent, getCanBackBill } from '@/api/contract'
+  import { backRent, getCanBackBill, findForBills } from '@/api/contract'
   import { mapState } from 'vuex'
   export default {
     name: "terminateLease",
@@ -255,36 +258,24 @@
         this.info = info
         this.form.id = info.id
         this.form.btSignDate = this.getDay()
-        console.log(this.userInfo)
         this.form.btUserId = this.userInfo.id
         this.$nextTick(() => {
           this.$refs.form.resetFields()
         })
-        this.info.canBackRentBills.forEach(item => {
-          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)
-          }
-        })
-        this.info.terminateList = this.info.canBackRentBills.filter(item => {
-          if ([0,1,4,5,6].includes(item.costType)) {
-            item.billTypeCopy = JSON.parse(JSON.stringify(item.billType))
-            return item
-          }
-        })
-        this.info.depositList = this.info.canBackRentBills.filter(item => {
-          if ([2,3,7].includes(item.costType)) {
-            item.billTypeCopy = JSON.parse(JSON.stringify(item.billType))
-            return item
-          }
-        })
+        this.info.terminateList = []
+        this.info.depositList = []
+        this.form.btDate = this.getDay()
         this.countData()
         this.getUser()
+        this.changeBtDate(this.form.btDate)
         this.visible = true
+      },
+      getDayTime () {
+        const today = new Date();
+        const year = today.getFullYear();
+        const month = today.getMonth() + 1;
+        const day = today.getDate();
+        return `${year}-${month < 10 ? '0' + month : month}-${day < 10 ? '0' + day : day}`;
       },
       countData () {
         const arr = [...this.info.terminateList, ...this.info.depositList]
@@ -292,9 +283,9 @@
         let total2 = 0
         arr.forEach(item => {
           if (item.billType === 0) {
-            total1 += Number(item.price)
+            total1 += Math.abs(Number(item.price))
           } else if (item.billType === 1) {
-            total2 += Number(item.price)
+            total2 += Math.abs(Number(item.price))
           }
         })
         this.receivable = total1.toFixed(2)
@@ -303,7 +294,7 @@
       getDay () {
         const today = new Date();
         const year = today.getFullYear();
-        const month = today.getMonth() + 1; // 鏈堜唤鏄粠 0 寮�濮嬬殑锛屽洜姝ら渶瑕佸姞 1
+        const month = today.getMonth() + 1;
         const day = today.getDate();
         return `${year}-${month < 10 ? '0' + month : month}-${day < 10 ? '0' + day : day}`;
       },
@@ -331,19 +322,33 @@
           billTypeCopy: 1
         }, { startDate: this.info.startDate, endDate: this.form.btDate })
       },
-      changeBtDate (planPayDateEnd) {
+      changeBtDate (btDate) {
         this.loading = true
-        getCanBackBill({
-          contractId: this.info.id,
-          planPayDateEnd
+        findForBills({
+          id: this.info.id,
+          btDate
         }).then(res => {
-          res.forEach(item => {
-            this.$set(item, 'receivableFeeCopy', item.receivableFee)
-            this.$set(item, 'receivableFee', item.needReceivableFee)
-            this.$set(item, 'price', item.needReceivableFee)
+          res.canBackRentBills.forEach(item => {
+            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 - item.actReceivableFee).toFixed(2))
+            }
           })
-          this.info.terminateList = res.filter(item => {
+          this.info.terminateList = res.canBackRentBills.filter(item => {
             if ([0,1,4,5,6].includes(item.costType)) {
+              item.billTypeCopy = JSON.parse(JSON.stringify(item.billType))
+              if (Number(item.price) < 0) {
+                item.billType = 1
+              }
+              return item
+            }
+          })
+          this.info.depositList = res.canBackRentBills.filter(item => {
+            if ([2,3,7].includes(item.costType)) {
               item.billTypeCopy = JSON.parse(JSON.stringify(item.billType))
               return item
             }
@@ -354,11 +359,10 @@
         })
       },
       getObjS (obj) {
+        console.log(obj)
+        obj.startDate = obj.startDate.substring(0, 10)
+        obj.endDate = obj.endDate.substring(0, 10)
         this.info.terminateList.push(obj)
-        // this.info.terminateList.forEach(item => {
-        //   item.receivableFee = Number(item.receivableFee) + 1
-        //   item.receivableFee = Number(item.receivableFee) - 1
-        // })
         this.countData()
       },
       confirm () {
diff --git a/admin/src/views/contract/contractList.vue b/admin/src/views/contract/contractList.vue
index 089e6f5..baeffdf 100644
--- a/admin/src/views/contract/contractList.vue
+++ b/admin/src/views/contract/contractList.vue
@@ -20,7 +20,11 @@
                 </div>
             </template>
         </el-table-column>
-      <el-table-column prop="totalArea" label="绉熻祦闈㈢Н" min-width="100" show-overflow-tooltip />
+        <el-table-column label="绉熻祦闈㈢Н" min-width="100" show-overflow-tooltip>
+            <template slot-scope="{row}">
+                {{row.totalArea}}銕�
+            </template>
+        </el-table-column>
       <el-table-column prop="signDate" label="绛捐鏃�" min-width="100" show-overflow-tooltip />
       <el-table-column prop="code" label="鍚堝悓缂栧彿" min-width="100" show-overflow-tooltip />
       <el-table-column label="鍚堝悓鐘舵��" min-width="90" fixed="right" show-overflow-tooltip>
diff --git a/admin/src/views/finance/components/bullDetail.vue b/admin/src/views/finance/components/bullDetail.vue
index d08fee0..ba7206d 100644
--- a/admin/src/views/finance/components/bullDetail.vue
+++ b/admin/src/views/finance/components/bullDetail.vue
@@ -1,5 +1,5 @@
 <template>
-  <GlobalWindow :title="'璐﹀崟璇︽儏'" :visible.sync="visible" :confirm-working="isWorking" @close="close"
+  <GlobalWindow :title="'璐﹀崟璇︽儏'" :withFooter="false" :visible.sync="visible" :confirm-working="isWorking" @close="close"
     @confirm="confirm">
     <div style="width: 100%; position: sticky; top: 0; left: 0; z-index: 999; background: #ffffff;">
       <div class="home_title">
diff --git a/admin/src/views/finance/components/companyEdit.vue b/admin/src/views/finance/components/companyEdit.vue
index 2b5005b..d9b1ffb 100644
--- a/admin/src/views/finance/components/companyEdit.vue
+++ b/admin/src/views/finance/components/companyEdit.vue
@@ -25,7 +25,7 @@
 <script>
 import GlobalWindow from '@/components/common/GlobalWindow'
 import UploadAvatarImage from '@/components/common/UploadAvatarImage'
-import { createFinanceCompany, updateFinanceCompany } from '@/api/business/company'
+import { createFinanceCompany, updateFinanceCompany, getById } from '@/api/business/company'
 import { Message } from 'element-ui'
 export default {
   components: { GlobalWindow, UploadAvatarImage },
@@ -34,6 +34,11 @@
       isShowModal: false,
       subLoading: false,
       param: {
+        id: null,
+        name: '',
+        shortName: '',
+        code: '',
+        address: '',
         type: 2,
         status: '0'
       },
@@ -45,9 +50,15 @@
 
     }
   },
-  created() {
-  },
   methods: {
+    getDetail (id) {
+      getById(id)
+        .then(res => {
+          for (const key in this.param) {
+            this.param[key] = res[key]
+          }
+        })
+    },
     handleSub() {
       const { param, subLoading } = this
       this.$refs['paramRef'].validate((valid) => {
diff --git a/admin/src/views/finance/components/flowingWater.vue b/admin/src/views/finance/components/flowingWater.vue
index c042606..8eed2b8 100644
--- a/admin/src/views/finance/components/flowingWater.vue
+++ b/admin/src/views/finance/components/flowingWater.vue
@@ -23,10 +23,10 @@
                         <el-form-item :label="`瀹�${form.needReceivableFeeCopy > 0 ? '鏀�' : '浠�'}閲戦`" prop="actReceivableFee">
                             <el-input v-model="form.actReceivableFee" placeholder="璇疯緭鍏�" v-trim />
                         </el-form-item>
-                        <el-form-item label="鍏ヨ处鏃ユ湡" prop="actPayDate">
+                        <el-form-item :label="`${form.needReceivableFeeCopy > 0 ? '鍏�' : '鍑�'}璐︽棩鏈焋" prop="actPayDate">
                             <el-date-picker type="date" v-model="form.actPayDate" value-format="yyyy-MM-dd" placeholder="璇烽�夋嫨" />
                         </el-form-item>
-                        <el-form-item label="鏀舵鏂瑰紡" prop="payType">
+                        <el-form-item :label="`${form.needReceivableFeeCopy > 0 ? '鏀�' : '浠�'}娆炬柟寮廯" prop="payType">
                             <el-select v-model="form.payType" placeholder="璇烽�夋嫨">
                                 <el-option label="鐜伴噾" :value="1"></el-option>
                                 <el-option label="缃戦摱杞处" :value="2"></el-option>
@@ -136,6 +136,13 @@
       }
     },
     methods: {
+      getDayTime () {
+        const today = new Date();
+        const year = today.getFullYear();
+        const month = today.getMonth() + 1;
+        const day = today.getDate();
+        return `${year}-${month < 10 ? '0' + month : month}-${day < 10 ? '0' + day : day}`;
+      },
       confirm () {
         this.$refs.form.validate((valid) => {
           if (!valid) return
@@ -220,6 +227,7 @@
           for (const key in this.form) {
             this.form[key] = target[key]
           }
+          this.form.actPayDate = this.getDayTime()
         })
         this.getDates(target.companyId)
       }
diff --git a/admin/src/views/finance/payments.vue b/admin/src/views/finance/payments.vue
index 63c2576..037813b 100644
--- a/admin/src/views/finance/payments.vue
+++ b/admin/src/views/finance/payments.vue
@@ -45,7 +45,7 @@
       <el-table-column label="鎿嶄綔" min-width="190" fixed="right">
         <template slot-scope="{row}">
           <el-button type="text" @click="$refs.details.open('鏀舵敮娴佹按璇︽儏', row.id)">鏌ョ湅璇︽儏</el-button>
-          <el-button type="text" @click="closeDW(row.id)" v-if="row.status !== 1">鍏抽棴娴佹按</el-button>
+          <el-button type="text" @click="closeDW(row.id)" v-if="row.status !== 1 || !['3','4'].includes(row.contractStatus)">鍏抽棴娴佹按</el-button>
         </template>
       </el-table-column>
     </el-table>

--
Gitblit v1.9.3