From 22e97d76d38070506accdeee4ef78c919fd3cf78 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期六, 30 十一月 2024 10:34:43 +0800
Subject: [PATCH] 开发

---
 admin/.env                                                |    2 
 admin/src/api/ywContractRevenue.js                        |    5 
 admin/src/views/login.vue                                 |    4 
 admin/src/views/contract/components/terminateLease.vue    |  112 +++++++--
 admin/src/views/finance/payments.vue                      |   31 +-
 admin/src/views/finance/components/flowingWater.vue       |    8 
 admin/src/views/contract/components/addCollectionBill.vue |   12 
 admin/.env.production                                     |    2 
 admin/src/views/finance/components/details.vue            |  335 ++++++++++++++++++++++++++++++
 admin/.env.test                                           |    2 
 admin/src/api/contract.js                                 |    6 
 admin/src/views/finance/components/bullDetail.vue         |   62 +----
 admin/src/views/finance/components/bullEdit.vue           |   10 
 admin/src/views/finance/bull.vue                          |   35 ++
 14 files changed, 508 insertions(+), 118 deletions(-)

diff --git a/admin/.env b/admin/.env
index 2e37a67..1b78e31 100644
--- a/admin/.env
+++ b/admin/.env
@@ -10,4 +10,4 @@
 VUE_APP_API_PREFIX = '/gateway_interface'
 
 # 椤圭洰鍚嶇О
-VUE_APP_TITLE = '闃滃畞鏂囦綋涓績'
+VUE_APP_TITLE = '绉熻祦骞冲彴'
diff --git a/admin/.env.production b/admin/.env.production
index 7406b0f..92c5c4d 100644
--- a/admin/.env.production
+++ b/admin/.env.production
@@ -1,4 +1,4 @@
 # 鐢熶骇鐜閰嶇疆
 NODE_ENV = 'production'
 
-# VUE_APP_API_URL  = 'http://10.50.250.178:8088/gateway_interface'
+# VUE_APP_API_URL  = 'http://192.168.0.173/gateway_interface'
diff --git a/admin/.env.test b/admin/.env.test
index c3d8b95..ac3450e 100644
--- a/admin/.env.test
+++ b/admin/.env.test
@@ -5,4 +5,4 @@
 
 VUE_APP_API_URL  = 'http://192.168.0.162:10010/'
 
-# VUE_APP_API_URL  = 'http://192.168.0.136:10010/'
+# VUE_APP_API_URL  = 'http://192.168.0.108:10030/'
diff --git a/admin/src/api/contract.js b/admin/src/api/contract.js
index f8ff2ca..1449001 100644
--- a/admin/src/api/contract.js
+++ b/admin/src/api/contract.js
@@ -36,3 +36,9 @@
 export function getYwContractBillById (id) {
   return request.get(`/visitsAdmin/cloudService/business/ywContractBill/${id}`)
 }
+
+// 鍙��娆捐处鍗�
+export function getCanBackBill (data) {
+  return request.post('/visitsAdmin/cloudService/business/ywContractBill/getCanBackBill', data)
+}
+
diff --git a/admin/src/api/ywContractRevenue.js b/admin/src/api/ywContractRevenue.js
index 92abf72..dddc74c 100644
--- a/admin/src/api/ywContractRevenue.js
+++ b/admin/src/api/ywContractRevenue.js
@@ -16,3 +16,8 @@
 export function close (id) {
   return request.get(`/visitsAdmin/cloudService/business/ywContractRevenue/close?id=${id}`)
 }
+
+// 鏍规嵁ID鏌ヨ
+export function getById (id) {
+  return request.get(`/visitsAdmin/cloudService/business/ywContractRevenue/${id}`)
+}
diff --git a/admin/src/views/contract/components/addCollectionBill.vue b/admin/src/views/contract/components/addCollectionBill.vue
index 1d4a3f5..a67dc5b 100644
--- a/admin/src/views/contract/components/addCollectionBill.vue
+++ b/admin/src/views/contract/components/addCollectionBill.vue
@@ -10,7 +10,7 @@
             <div class="main_content">
                 <el-form :model="form" label-position="top" ref="form" :rules="rules">
                     <div class="head">
-                        <div class="m_title">鍩虹淇℃伅</div>
+                        <div class="m_title">鍩虹淇℃伅-{{time.startDate}}~{{time.endDate}}</div>
                         <div class="tabs">
                             <div class="tab" :class="{ active: form.feeType === 0 }" @click="timeTabClick(0)">鍛ㄦ湡璐圭敤</div>
                             <div class="tab" :class="{ active: form.feeType === 1 }" @click="timeTabClick(1)">涓�娆℃�ц垂鐢�</div>
@@ -37,6 +37,8 @@
                                 type="daterange"
                                 range-separator="鑷�"
                                 v-model="form.date"
+                                :min-date="new Date(time.startDate)"
+                                :max-date="new Date(time.endDate)"
                                 @change="changeDate"
                                 start-placeholder="寮�濮嬫棩鏈�"
                                 end-placeholder="缁撴潫鏃ユ湡"
@@ -109,6 +111,10 @@
           billTypeCopy: 0,
           date: []
         },
+        time: {
+          startDate: '',
+          endDate: ''
+        },
         rules: {
           contractCode: [
             { required: true, message: '璇疯緭鍏�', trigger: 'blur' }
@@ -136,8 +142,10 @@
       }
     },
     methods: {
-      open (title, target) {
+      open (title, target, time) {
         this.title = title
+        this.time.startDate = time.startDate
+        this.time.endDate = time.endDate
         this.getCompany()
         this.visible = true
         // 鏂板缓
diff --git a/admin/src/views/contract/components/terminateLease.vue b/admin/src/views/contract/components/terminateLease.vue
index ed32531..982e7f0 100644
--- a/admin/src/views/contract/components/terminateLease.vue
+++ b/admin/src/views/contract/components/terminateLease.vue
@@ -24,6 +24,7 @@
                             </el-select>
                         </el-form-item>
                         <el-form-item label="閫�绉熸棩鏈�" prop="btDate" style="width: 33%;">
+<!--                            @change="changeBtDate"-->
                             <el-date-picker
                                 v-model="form.btDate"
                                 type="date"
@@ -69,13 +70,14 @@
             <div class="title">
                 <span>閫�绉熶俊鎭�</span>
                 <div style="display: flex; align-items: center;">
-                    <el-button type="primary" @click="$refs.addCollectionBill.open('鍒涘缓鏀舵璐﹀崟', { contractCode: info.code, contractId: info.id, renterName: info.renterName, renterId: info.renterId, billType: 0, billTypeCopy: 0, feeType: 0 })">娣诲姞鏀舵</el-button>
-                    <el-button type="primary" @click="$refs.AddPaymentBill.open('鍒涘缓浠樻璐﹀崟', { contractCode: info.code, contractId: info.id, renterName: info.renterName, renterId: info.renterId, billType: 1, billTypeCopy: 1 })">娣诲姞浠樻</el-button>
+                    <el-button type="primary" @click="addZD">娣诲姞鏀舵</el-button>
+                    <el-button type="primary" @click="addFK">娣诲姞浠樻</el-button>
                 </div>
             </div>
             <el-table
                 :data="info.terminateList"
                 border
+                v-loading="loading"
                 style="width: 100%; margin-bottom: 15px;">
                 <el-table-column
                     prop="code"
@@ -193,7 +195,7 @@
   import AddCollectionBill from './addCollectionBill'
   import AddPaymentBill from './addPaymentBill'
   import { getUserList } from '@/api/system/user'
-  import { backRent } from '@/api/contract'
+  import { backRent, getCanBackBill } from '@/api/contract'
   export default {
     name: "terminateLease",
     components: {
@@ -236,7 +238,9 @@
         agentList: [],
 
         receivable: '',
-        meet: ''
+        meet: '',
+        
+        loading: false
       }
     },
     watch: {
@@ -264,28 +268,74 @@
         this.title = title
         this.info = info
         this.form.id = info.id
-        this.info.billList.forEach(item => {
+        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, 'price', item.receivableFee)
+            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 = item.billType
+            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 = item.billType
+            item.billTypeCopy = JSON.parse(JSON.stringify(item.billType))
             return item
           }
         })
         this.getUser()
         this.visible = true
+      },
+      addZD () {
+        if (!this.form.btDate) return this.$message.warning('璇烽�夋嫨閫�绉熸棩鏈�')
+        this.$refs.addCollectionBill.open('鍒涘缓鏀舵璐﹀崟', {
+          contractCode: this.info.code,
+          contractId: this.info.id,
+          renterName: this.info.renterName,
+          renterId: this.info.renterId,
+          billType: 0,
+          billTypeCopy: 0,
+          feeType: 0
+        }, { startDate: this.info.startDate, endDate: this.form.btDate })
+      },
+      addFK () {
+        if (!this.form.btDate) return this.$message.warning('璇烽�夋嫨閫�绉熸棩鏈�')
+        this.$refs.AddPaymentBill.open('鍒涘缓浠樻璐﹀崟', {
+          contractCode: this.info.code,
+          contractId: this.info.id,
+          renterName: this.info.renterName,
+          renterId: this.info.renterId,
+          billType: 1,
+          billTypeCopy: 1
+        }, { startDate: this.info.startDate, endDate: this.form.btDate })
+      },
+      changeBtDate (planPayDateEnd) {
+        this.loading = true
+        getCanBackBill({
+          contractId: this.info.id,
+          planPayDateEnd
+        }).then(res => {
+          res.forEach(item => {
+            this.$set(item, 'receivableFeeCopy', item.receivableFee)
+            this.$set(item, 'receivableFee', item.needReceivableFee)
+            this.$set(item, 'price', item.needReceivableFee)
+          })
+          this.info.terminateList = res.filter(item => {
+            if ([0,1,4,5,6].includes(item.costType)) {
+              item.billTypeCopy = JSON.parse(JSON.stringify(item.billType))
+              return item
+            }
+          })
+        }).finally(() => {
+          this.loading = false
+        })
       },
       getObjS (obj) {
         this.info.terminateList.push(obj)
@@ -336,34 +386,32 @@
           row.price = 0
           this.$message.warning('涓嶈兘澶т簬鍘熷搴旀敹浠橀噾棰�')
         } else {
-          row.price = Number(num) - row.actReceivableFee
-          // 鏀�
-          if (row.billTypeCopy === 0) {
-            if (row.price > 0) {
-              row.billType = 0
-            } else if (row.price < 0) {
-              row.billType = 1
+          if (num) {
+            row.price = Number(num) - row.actReceivableFee
+            // 鏀�
+            if (row.billTypeCopy === 0) {
+              if (row.price > 0) {
+                row.billType = 0
+              } else if (row.price < 0) {
+                row.billType = 1
+              } else {
+                row.billType = 0
+              }
             } else {
-              row.billType = 0
+              if (row.price > 0) {
+                row.billType = 1
+              } else if (row.price < 0) {
+                row.billType = 0
+              } else {
+                row.billType = 1
+              }
             }
           } else {
-            if (row.price > 0) {
-              row.billType = 1
-            } else if (row.price < 0) {
-              row.billType = 0
-            } else {
-              row.billType = 1
-            }
+            row.price = 0
+            row.billType = row.billTypeCopy
+            console.log('billTypeCopy', row.billTypeCopy)
           }
-          // if (row.price > 0) {
-          //   row.billType = 0
-          // } else if (row.price < 0) {
-          //   row.billType = 1
-          // }
-          row.price = String(row.price)
-          if (row.price.indexOf('-') > 0) {
-            row.price = row.price.substring(0, row.price.length)
-          }
+          row.price = Math.abs(row.price);
         }
       }
     }
diff --git a/admin/src/views/finance/bull.vue b/admin/src/views/finance/bull.vue
index 936cc3c..4f502d9 100644
--- a/admin/src/views/finance/bull.vue
+++ b/admin/src/views/finance/bull.vue
@@ -38,24 +38,40 @@
       <el-table-column prop="needReceivableFee" label="闇�鏀堕噾棰�" min-width="100" show-overflow-tooltip />
       <el-table-column label="璐圭敤绫诲瀷" min-width="100" show-overflow-tooltip>
         <template slot-scope="{row}">
-          <span v-if="row.feeType === 0">鍛ㄦ湡璐圭敤</span>
-          <span v-if="row.feeType === 1">涓�娆℃�ц垂鐢�</span>
+          <span v-if="row.costType === 0">绉熻祦璐�</span>
+          <span v-if="row.costType === 1">鐗╀笟璐�</span>
+          <span v-if="row.costType === 2">绉熻祦鎶奸噾</span>
+          <span v-if="row.costType === 3">鐗╀笟鎶奸噾</span>
+          <span v-if="row.costType === 4">姘寸數璐�</span>
+          <span v-if="row.costType === 5">鏉傞」璐�</span>
+          <span v-if="row.costType === 6">鍏跺畠</span>
+          <span v-if="row.costType === 7">淇濊瘉閲�</span>
         </template>
       </el-table-column>
       <el-table-column label="鏄惁閫炬湡" min-width="100" show-overflow-tooltip>
         <template slot-scope="{row}">
-          <span v-if="row.isOverdue === 0">鍚�</span>
-          <span v-if="row.isOverdue === 1">鏄�</span>
+          <span v-if="row.isOverdue === 0">鏈�炬湡</span>
+          <span v-if="row.isOverdue === 1" style="color: red;">宸查�炬湡</span>
         </template>
       </el-table-column>
-      <el-table-column label="璁¤垂鍛ㄦ湡" min-width="100" show-overflow-tooltip>
+      <el-table-column label="璁¤垂鍛ㄦ湡" min-width="200" show-overflow-tooltip>
         <template slot-scope="{row}">
           {{ row.startDate }} ~ {{ row.endDate }}
         </template>
       </el-table-column>
       <el-table-column prop="planPayDate" label="搴旀敹鏃ユ湡" min-width="100" show-overflow-tooltip />
-      <el-table-column prop="createTime" label="璐﹀崟鏉ユ簮" min-width="100" show-overflow-tooltip />
-      <el-table-column prop="statusName" label="鍚堝悓鐘舵��" min-width="100" fixed="right" show-overflow-tooltip />
+      <el-table-column label="璐﹀崟鏉ユ簮" min-width="100" show-overflow-tooltip>
+        <template slot-scope="{row}">
+          <span v-if="row.type === 0">鍚堝悓璐﹀崟</span>
+          <span v-if="row.type === 1">鑷缓璐﹀崟</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="璐﹀崟鐘舵��" min-width="100" fixed="right" show-overflow-tooltip>
+        <template slot-scope="{row}">
+          <span v-if="row.status === 0">寮�鍚�</span>
+          <span v-if="row.status === 1" style="color: red;">鍏抽棴</span>
+        </template>
+      </el-table-column>
       <el-table-column label="鎿嶄綔" min-width="120" fixed="right">
         <template slot-scope="{row}">
           <el-button type="text" @click="handleDetail(row)" icon="el-icon-edit" v-permissions="['business:category:update']">鏌ョ湅璇︽儏</el-button>
@@ -150,6 +166,11 @@
     },
     getList (page) {
       const { pagination, filters } = this
+      let form = JSON.parse(JSON.stringify(filters))
+      if (form && form.selDate && form.selDate.length > 0) {
+        form.planPayDateStart = form.payDate[0]
+        form.planPayDateEnd = form.payDate[1]
+      }
       this.loading = true
       fetchList({
         model: {
diff --git a/admin/src/views/finance/components/bullDetail.vue b/admin/src/views/finance/components/bullDetail.vue
index 6334c44..844888d 100644
--- a/admin/src/views/finance/components/bullDetail.vue
+++ b/admin/src/views/finance/components/bullDetail.vue
@@ -5,12 +5,13 @@
       <div class="left">
         <span class="mr10">浠樻鏂癸細{{info.customerName}}</span>
         <el-tag type="success" v-if="info.status === 0">寮�鍚�</el-tag>
-        <el-tag type="success" v-if="info.status === 1">鍏抽棴</el-tag>
+        <el-tag type="info" v-if="info.status === 1">鍏抽棴</el-tag>
       </div>
-      <el-button plain type="primary" @click="$refs.flowingWater.open(info.billType === 0 ? '鍒涘缓鏀舵璐﹀崟' : '鍒涘缓浠樻璐﹀崟', {
+      <el-button plain type="primary" @click="$refs.flowingWater.open('鍒涘缓鏀舵敮娴佹按', {
         billType: info.billType,
         billId: info.id,
         costType: info.costType,
+        receivableFee: info.needReceivableFee,
         costTypeName: returnText(info.costType),
         contractCode: info.contractCode,
         contractId: info.contractId,
@@ -36,19 +37,19 @@
           <div class="val" style="margin-top: 10px;" v-if="info.payStatus === 5">宸插叧闂�</div>
         </div>
         <div class="item" style="flex: 1;">
-          <div class="la">搴旀敹閲戦锛堝厓锛�</div>
+          <div class="la">搴攞{info.billType === 0 ? '鏀�' : '浠�'}}閲戦锛堝厓锛�</div>
           <div class="val" style="margin-top: 10px;">{{info.receivableFee}}</div>
         </div>
         <div class="item" style="flex: 1;">
-          <div class="la">瀹炴敹閲戦锛堝厓锛�</div>
+          <div class="la">瀹瀧{info.billType === 0 ? '鏀�' : '浠�'}}閲戦锛堝厓锛�</div>
           <div class="val" style="margin-top: 10px;">{{info.actReceivableFee}}</div>
         </div>
         <div class="item" style="flex: 1;">
-          <div class="la">闇�浠橀噾棰濓紙鍏冿級</div>
+          <div class="la">闇�{{info.billType === 0 ? '鏀�' : '浠�'}}閲戦锛堝厓锛�</div>
           <div class="val" style="margin-top: 10px;">{{info.needReceivableFee}}</div>
         </div>
         <div class="item" style="flex: 1;">
-          <div class="la">搴旀敹鏃ユ湡</div>
+          <div class="la">搴攞{info.billType === 0 ? '鏀�' : '浠�'}}鏃ユ湡</div>
           <div class="val" style="margin-top: 10px;">{{info.planPayDate}}</div>
         </div>
       </div>
@@ -62,9 +63,8 @@
       <div class="title">鍩虹淇℃伅</div>
       <div class="list" style="background: rgba(0,0,0,0); padding: 0;">
         <div class="item">
-          <div class="la">璐﹀崟绫诲瀷</div>
-          <div class="val" v-if="info.billType === 0">鏀舵</div>
-          <div class="val" v-if="info.billType === 1">浠樻</div>
+          <div class="la">璐圭敤绫诲瀷</div>
+          <div class="val">{{returnText(info.costType)}}</div>
         </div>
         <div class="item">
           <div class="la">璁¤垂鍛ㄦ湡</div>
@@ -92,7 +92,7 @@
         </div>
         <div class="item">
           <div class="la">缁忓姙浜�</div>
-          <div class="val">寮犱笁</div>
+          <div class="val">{{info.realname}}</div>
         </div>
         <div class="item">
           <div class="la">鎵�灞炲叕鍙�</div>
@@ -126,47 +126,13 @@
             </template>
           </el-table-column>
           <el-table-column
-            prop="area"
             label="闈㈢Н">
+            <template slot-scope="{row}">
+              {{row.area}}銕�
+            </template>
           </el-table-column>
         </el-table>
       </div>
-<!--      <div class="title">璐﹀崟鏄庣粏</div>-->
-<!--      <div class="list" style="background: rgba(0,0,0,0); padding: 0;">-->
-<!--        <el-table-->
-<!--          :data="tableData"-->
-<!--          border-->
-<!--          style="width: 100%">-->
-<!--          <el-table-column-->
-<!--            prop="date"-->
-<!--            label="璐圭敤绫诲瀷">-->
-<!--          </el-table-column>-->
-<!--          <el-table-column-->
-<!--            prop="name"-->
-<!--            label="搴旀敹/浠橀噾棰�">-->
-<!--          </el-table-column>-->
-<!--          <el-table-column-->
-<!--            prop="address"-->
-<!--            label="瀹炴敹閲戦">-->
-<!--          </el-table-column>-->
-<!--          <el-table-column-->
-<!--            prop="address"-->
-<!--            label="闇�鏀堕噾棰�">-->
-<!--          </el-table-column>-->
-<!--          <el-table-column-->
-<!--            prop="address"-->
-<!--            label="璁¤垂鍛ㄦ湡">-->
-<!--          </el-table-column>-->
-<!--          <el-table-column-->
-<!--            prop="address"-->
-<!--            label="搴旀敹/浠樻棩鏈�">-->
-<!--          </el-table-column>-->
-<!--          <el-table-column-->
-<!--            prop="address"-->
-<!--            label="澶囨敞">-->
-<!--          </el-table-column>-->
-<!--        </el-table>-->
-<!--      </div>-->
       <div class="title">鏀舵敮娴佹按</div>
       <div class="list" style="background: rgba(0,0,0,0); padding: 0;">
         <el-table
@@ -197,7 +163,7 @@
             </template>
           </el-table-column>
           <el-table-column
-            prop="payDateEnd"
+            prop="actPayDate"
             label="鍏ヨ处鏃ユ湡">
           </el-table-column>
           <el-table-column
diff --git a/admin/src/views/finance/components/bullEdit.vue b/admin/src/views/finance/components/bullEdit.vue
index 0d77432..9eaf189 100644
--- a/admin/src/views/finance/components/bullEdit.vue
+++ b/admin/src/views/finance/components/bullEdit.vue
@@ -21,11 +21,11 @@
                 <el-input v-model="form.renterName" disabled placeholder="璇疯緭鍏ュ簲鏀堕噾棰�" v-trim />
             </el-form-item>
             <el-form-item label="鎴挎簮" prop="ywContractRoomList">
-              <el-select v-model="form.ywContractRoomList" multiple placeholder="璇烽�夋嫨">
+              <el-select v-model="form.ywContractRoomList" @click="clickHouse" multiple placeholder="璇烽�夋嫨">
                 <el-option
                   v-for="(item, index) in houseList"
                   :key="index"
-                  :value="item.id"
+                  :value="item.roomId"
                   :label="item.projectName + item.buildingName + item.floorName + item.roomName" />
               </el-select>
             </el-form-item>
@@ -149,6 +149,7 @@
   methods: {
     open (title, target) {
       this.title = title
+      this.form.feeType = 0
       this.form.multifileList = []
       this.getListAll()
       this.getCompanyList()
@@ -168,6 +169,11 @@
         }
       })
     },
+    clickHouse () {
+      if (!this.form.contractId) {
+        return this.$message.warning('璇峰厛閫夋嫨鍚堝悓')
+      }
+    },
     changeContract (e) {
       this.form.renterName = this.contract.filter(item => {
         if (item.id === e) {
diff --git a/admin/src/views/finance/components/details.vue b/admin/src/views/finance/components/details.vue
new file mode 100644
index 0000000..1336c5a
--- /dev/null
+++ b/admin/src/views/finance/components/details.vue
@@ -0,0 +1,335 @@
+<template>
+    <GlobalWindow :title="title" :visible.sync="visible" :confirm-working="isWorking" @close="close"
+        @confirm="confirm">
+        <div class="home_title">
+            <div class="left">
+                <span class="mr10">瀵规柟鍗曚綅鍚嶇О锛歿{info.customerName}}</span>
+                <el-tag type="success" v-if="info.status === 0">寮�鍚�</el-tag>
+                <el-tag type="info" v-if="info.status === 1">鍏抽棴</el-tag>
+            </div>
+            <el-button type="danger" v-if="info.status === 0" @click="closeDW()">鍏抽棴娴佹按</el-button>
+        </div>
+        <div class="line"></div>
+        <div class="main">
+            <div class="list" style="background: rgba(0,0,0,0); padding: 0; margin-bottom: 0;">
+                <div class="item" style="flex: 1;">
+                    <div class="la">缁撴竻鐘舵��</div>
+                    <div class="val" style="margin-top: 10px;" v-if="info1.payStatus === 0">寰呮敹娆�</div>
+                    <div class="val" style="margin-top: 10px;" v-if="info1.payStatus === 1">宸茬粨娓�</div>
+                    <div class="val" style="margin-top: 10px;" v-if="info1.payStatus === 2">閮ㄥ垎缁撴竻</div>
+                    <div class="val" style="margin-top: 10px;" v-if="info1.payStatus === 3">寰呬粯娆�</div>
+                    <div class="val" style="margin-top: 10px;" v-if="info1.payStatus === 4">寰呴��娆�</div>
+                    <div class="val" style="margin-top: 10px;" v-if="info1.payStatus === 5">宸插叧闂�</div>
+                </div>
+                <div class="item" style="flex: 1;">
+                    <div class="la">搴攞{info.revenueType === 0 ? '鏀�' : '浠�'}}閲戦锛堝厓锛�</div>
+                    <div class="val" style="margin-top: 10px;">{{info1.receivableFee}}</div>
+                </div>
+                <div class="item" style="flex: 1;">
+                    <div class="la">瀹瀧{info.revenueType === 0 ? '鏀�' : '浠�'}}閲戦锛堝厓锛�</div>
+                    <div class="val" style="margin-top: 10px;">{{info1.actReceivableFee}}</div>
+                </div>
+                <div class="item" style="flex: 1;">
+                    <div class="la">闇�{{info.revenueType === 0 ? '鏀�' : '浠�'}}閲戦锛堝厓锛�</div>
+                    <div class="val" style="margin-top: 10px;">{{info1.needReceivableFee}}</div>
+                </div>
+                <div class="item" style="flex: 1;">
+                    <div class="la">搴攞{info.revenueType === 0 ? '鏀�' : '浠�'}}鏃ユ湡</div>
+                    <div class="val" style="margin-top: 10px;">{{info1.planPayDate}}</div>
+                </div>
+            </div>
+        </div>
+        <div class="tabs">
+            <div class="tab" :class="{ active: activeTabs == 0 }" @click="tabsClick(0)">娴佹按淇℃伅</div>
+            <div class="tab" :class="{ active: activeTabs == 1 }" @click="tabsClick(1)">鍏宠仈璐﹀崟</div>
+        </div>
+        <div class="main">
+            <div class="title">娴佹按淇℃伅</div>
+            <div class="list" style="background: rgba(0,0,0,0); padding: 0;">
+                <div class="item">
+                    <div class="la">鏀舵敮绫诲瀷</div>
+                    <div class="val" v-if="info.revenueType === 0">鏀跺叆</div>
+                    <div class="val" v-if="info.revenueType === 1">鏀嚭</div>
+                </div>
+                <div class="item">
+                    <div class="la">鍏ヨ处鏃ユ湡</div>
+                    <div class="val">{{info.actPayDate}}</div>
+                </div>
+                <div class="item">
+                    <div class="la">鍙戠敓棰濓紙鍏冿級</div>
+                    <div class="val">{{info.actReceivableFee}}</div>
+                </div>
+                <div class="item">
+                    <div class="la">璐﹀崟缂栧彿</div>
+                    <div class="val">{{info.billCode}}</div>
+                </div>
+                <div class="item">
+                    <div class="la">鍚堝悓缂栧彿</div>
+                    <div class="val">{{info.contractCode}}</div>
+                </div>
+                <div class="item">
+                    <div class="la">鍒涘缓鏃堕棿</div>
+                    <div class="val">{{info.createDate}}</div>
+                </div>
+                <div class="item">
+                    <div class="la">瀵规柟鍏徃</div>
+                    <div class="val">{{info.customerName}}</div>
+                </div>
+                <div class="item">
+                    <div class="la">缁忓姙浜�</div>
+                    <div class="val">{{info.realname}}</div>
+                </div>
+                <div class="item">
+                    <div class="la">娴佹按璐︽埛</div>
+                    <div class="val">{{info.accountTitle}}</div>
+                </div>
+                <div class="item">
+                    <div class="la">澶囨敞</div>
+                    <div class="val">{{info.remark}}</div>
+                </div>
+                <div class="item"></div>
+                <div class="item"></div>
+            </div>
+            <div class="title">鍏宠仈璐﹀崟</div>
+            <div class="list" style="background: rgba(0,0,0,0); padding: 0;">
+                <el-table
+                    :data="[info1]"
+                    border
+                    style="width: 100%">
+                    <el-table-column
+                        label="璐圭敤绫诲瀷">
+                        <template slot-scope="{row}">
+                            <span v-if="row.costType === 0">绉熻祦璐�</span>
+                            <span v-if="row.costType === 1">鐗╀笟璐�</span>
+                            <span v-if="row.costType === 2">绉熻祦鎶奸噾</span>
+                            <span v-if="row.costType === 3">鐗╀笟鎶奸噾</span>
+                            <span v-if="row.costType === 4">姘寸數璐�</span>
+                            <span v-if="row.costType === 5">鏉傞」璐�</span>
+                            <span v-if="row.costType === 6">鍏跺畠</span>
+                            <span v-if="row.costType === 7">淇濊瘉閲�</span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column
+                        prop="receivableFee"
+                        label="搴旀敹/浠橀噾棰�">
+                    </el-table-column>
+                    <el-table-column
+                        prop="actReceivableFee"
+                        label="瀹炴敹閲戦">
+                    </el-table-column>
+                    <el-table-column
+                        prop="needReceivableFee"
+                        label="闇�鏀堕噾棰�">
+                    </el-table-column>
+                    <el-table-column
+                        label="璁¤垂鍛ㄦ湡">
+                        <template slot-scope="{row}">
+                            {{row.startDate}} ~ {{row.endDate}}
+                        </template>
+                    </el-table-column>
+                    <el-table-column
+                        prop="planPayDate"
+                        label="搴旀敹/浠樻棩鏈�">
+                    </el-table-column>
+                    <el-table-column
+                        prop="remark"
+                        label="澶囨敞">
+                    </el-table-column>
+                </el-table>
+            </div>
+            <div class="title">娴佹按闄勪欢</div>
+            <div class="list" style="background: rgba(0,0,0,0); padding: 0;">
+                <el-table
+                    :data="info.multifileList"
+                    border
+                    style="width: 100%">
+                    <el-table-column
+                        prop="name"
+                        label="闄勪欢鍚嶇О">
+                    </el-table-column>
+                    <el-table-column
+                        prop="userName"
+                        label="鎿嶄綔浜�">
+                    </el-table-column>
+                    <el-table-column
+                        prop="createDate"
+                        label="鎿嶄綔鏃堕棿">
+                    </el-table-column>
+                </el-table>
+            </div>
+            <div class="title">鎿嶄綔璁板綍</div>
+            <div class="list" style="background: rgba(0,0,0,0); padding: 0;">
+                <el-table
+                    :data="info.editRecordDataVOList"
+                    border
+                    style="width: 100%">
+                    <el-table-column
+                        width="200"
+                        prop="editUserName"
+                        label="鎿嶄綔浜�">
+                    </el-table-column>
+                    <el-table-column
+                        width="200"
+                        prop="editTime"
+                        label="鎿嶄綔鏃堕棿">
+                    </el-table-column>
+                    <el-table-column
+                        prop="editRemark"
+                        label="鎿嶄綔鍐呭">
+                    </el-table-column>
+                </el-table>
+            </div>
+        </div>
+    </GlobalWindow>
+</template>
+
+<script>
+  import GlobalWindow from '@/components/common/GlobalWindow'
+  import BaseOpera from '@/components/base/BaseOpera'
+  import { close, getById } from '@/api/ywContractRevenue'
+  import { getYwContractBillById } from '@/api/contract'
+  export default {
+    name: 'details',
+    components: {
+      GlobalWindow
+    },
+    extends: BaseOpera,
+    data() {
+      return {
+        id: '',
+        activeTabs: '',
+        info: {},
+        info1: {}
+      }
+    },
+    methods: {
+      open (title, id) {
+        this.title = title
+        this.id = id
+        this.getDetails()
+      },
+      getDetails () {
+        getById(this.id)
+          .then(res => {
+            this.info = res
+            this.getDetails1()
+          })
+      },
+      getDetails1 () {
+        getYwContractBillById(this.info.billId)
+          .then(res => {
+            this.info1 = res
+            this.visible = true
+          })
+      },
+      tabsClick(val) {
+        this.activeTabs = val
+      },
+      closeDW (id) {
+        this.$confirm('纭鍏抽棴姝ゆ祦姘村悧?', '鎻愮ず', {
+          confirmButtonText: '纭畾',
+          cancelButtonText: '鍙栨秷',
+          type: 'warning'
+        }).then(() => {
+          close(id)
+            .then(res => {
+              this.getDetails()
+            })
+        }).catch(() => {
+
+        });
+      },
+    }
+  }
+</script>
+
+<style lang="scss" scoped>
+    @import '@/assets/style/variables.scss';
+    .home_title {
+        display: flex;
+        justify-content: space-between;
+        align-items: center;
+        
+        .left {
+            font-weight: 500;
+            font-size: 16px;
+            margin-right: 10px;
+            display: flex;
+            align-items: center;
+            
+            .status {
+                padding: 0 6px;
+                height: 22px;
+                line-height: 22px;
+                border-radius: 2px;
+                border: 1px solid #00BA92;
+                color: #00BA92;
+                font-weight: 400;
+                font-size: 12px;
+                color: #00BA92;
+            }
+        }
+    }
+    
+    .remark {
+        background: #E8EBF7;
+        border-radius: 2px;
+        padding: 10px 20px;
+        font-size: 16px;
+        margin: 20px 0
+    }
+    
+    .tabs {
+        border-bottom: 1px solid #DFE2E8;
+        display: flex;
+        margin-bottom: 20px;
+        .tab {
+            height: 58px;
+            line-height: 58px;
+            font-size: 16px;
+            color: #666666;
+            margin-right: 30px;
+            cursor: pointer;
+        }
+        
+        .active {
+            font-weight: 500;
+            color: $primary-color;
+            border-bottom: 2px solid $primary-color;
+        }
+    }
+    
+    .line {
+        width: 100%;
+        margin: 15px 0;
+        border-bottom: 1px dashed #eaeaea;
+    }
+    
+    .main {
+        .title {
+            font-weight: 500;
+            font-size: 18px;
+            color: $primary-color;
+            margin-bottom: 15px;
+        }
+        
+        .list {
+            display: flex;
+            flex-wrap: wrap;
+            /*background: #F7F7F7;*/
+            border-radius: 2px;
+            padding: 0 20px;
+            margin-bottom: 20px;
+            
+            .item {
+                flex: 25%;
+                margin-bottom: 20px;
+                
+                .la {
+                    color: #7f7f7f;
+                    margin-bottom: 5px;
+                }
+            }
+        }
+    }
+</style>
diff --git a/admin/src/views/finance/components/flowingWater.vue b/admin/src/views/finance/components/flowingWater.vue
index a646fb0..827e578 100644
--- a/admin/src/views/finance/components/flowingWater.vue
+++ b/admin/src/views/finance/components/flowingWater.vue
@@ -17,8 +17,8 @@
                         <el-form-item label="璁¤垂鍛ㄦ湡" required>
                             <el-input v-model="form.date" disabled placeholder="璇疯緭鍏�" v-trim />
                         </el-form-item>
-                        <el-form-item label="搴旀敹閲戦" prop="receivableFee">
-                            <el-input v-model="form.receivableFee" placeholder="璇疯緭鍏�" v-trim />
+                        <el-form-item label="搴旀敹閲戦" required>
+                            <el-input v-model="form.receivableFee" disabled placeholder="璇疯緭鍏�" v-trim />
                         </el-form-item>
                         <el-form-item label="瀹炴敹閲戦" prop="actReceivableFee">
                             <el-input v-model="form.actReceivableFee" placeholder="璇疯緭鍏�" v-trim />
@@ -100,6 +100,7 @@
           contractId: '',
           startDate: '',
           endDate: '',
+          receivableFee: '',
           date: '',
           companyId: '',
           actReceivableFee: '',
@@ -204,7 +205,6 @@
           }
         })
         const item = file.data[0]
-        console.log(item)
         this.form.multifileList.push({ ...item, fileurl: item.imgaddr, name: item.originname, userName: this.userInfo.realname, createTime: this.getDay() })
       },
       close() {
@@ -214,11 +214,11 @@
         this.title = title
         this.visible = true
         this.$nextTick(() => {
+          this.$refs.form.resetFields();
           for (const key in this.form) {
             this.form[key] = target[key]
           }
         })
-        console.log(this.form)
         this.getDates(target.companyId)
       }
     }
diff --git a/admin/src/views/finance/payments.vue b/admin/src/views/finance/payments.vue
index 6b98c8d..ce5fd22 100644
--- a/admin/src/views/finance/payments.vue
+++ b/admin/src/views/finance/payments.vue
@@ -2,7 +2,7 @@
   <div class="main_app">
     <QueryForm v-model="filters" :query-form-config="queryFormConfig" @handleQuery="getList(1)" @clear="clear" />
     <div class="mt20">
-      <el-button @click="handleEdit()" v-permissions="['business:ywpatrolline:create']">瀵煎嚭</el-button>
+      <el-button v-permissions="['business:ywpatrolline:create']">瀵煎嚭</el-button>
     </div>
     <el-table v-loading="loading" :data="list" stripe>
       <el-table-column prop="customerName" label="瀹㈡埛鍚嶇О" min-width="100" show-overflow-tooltip />
@@ -33,7 +33,7 @@
           <span v-if="row.payType === 6">鍏朵粬</span>
         </template>
       </el-table-column>
-      <el-table-column prop="payDateEnd" label="鍏ヨ处鏃ユ湡" show-overflow-tooltip />
+      <el-table-column prop="actPayDate" label="鍏ヨ处鏃ユ湡" show-overflow-tooltip />
       <el-table-column prop="createDate" label="鍒涘缓鏃ユ湡" show-overflow-tooltip />
       <el-table-column prop="realname" label="鍒涘缓浜�" show-overflow-tooltip />
       <el-table-column label="鐘舵��" min-width="100" fixed="right" show-overflow-tooltip>
@@ -44,7 +44,7 @@
       </el-table-column>
       <el-table-column label="鎿嶄綔" min-width="190" fixed="right">
         <template slot-scope="{row}">
-          <el-button type="text">鏌ョ湅璇︽儏</el-button>
+          <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>
         </template>
       </el-table-column>
@@ -52,25 +52,25 @@
     <div class="mt20">
       <Pagination @size-change="handleSizeChange" @current-change="getList" :pagination="pagination" />
     </div>
-    <Edit v-if="showEdit" ref="EditRef" @success="getList" @close="showEdit = false" />
+    <!--  璇︽儏  -->
+    <Details ref="details" />
   </div>
 </template>
 
 <script>
 import Pagination from '@/components/common/Pagination'
 import QueryForm from '@/components/common/QueryForm'
-import Edit from './components/paymentsEdit.vue'
+import Details from './components/details'
 import { fetchList, close } from '@/api/ywContractRevenue'
 export default {
   components: {
     Pagination,
     QueryForm,
-    Edit
+    Details
   },
   data() {
     return {
       loading: false,
-      showEdit: false,
       pagination: {
         pageSize: 10,
         page: 1,
@@ -125,10 +125,15 @@
   methods: {
     getList(page) {
       const { pagination, filters } = this
+      let form = JSON.parse(JSON.stringify(filters))
+      if (form && form.payDate && form.payDate.length > 0) {
+        form.payDateStart = form.payDate[0]
+        form.payDateEnd = form.payDate[1]
+      }
       this.loading = true
       fetchList({
         model: {
-          ...filters
+          ...form
         },
         capacity: pagination.pageSize,
         page: page || pagination.page,
@@ -153,16 +158,6 @@
       }).catch(() => {
       
       });
-    },
-    handleEdit(row) {
-      this.showEdit = true
-      this.$nextTick(() => {
-        this.$refs.EditRef.isShowModal = true
-        if (row && row.id) {
-          this.$refs.EditRef.getDetail(row.id)
-        }
-      })
-
     },
     handleDel(row) {
       let message = `纭鍒犻櫎璇ヨ褰曞悧?`
diff --git a/admin/src/views/login.vue b/admin/src/views/login.vue
index ff79acb..819ab49 100644
--- a/admin/src/views/login.vue
+++ b/admin/src/views/login.vue
@@ -3,8 +3,8 @@
     <img src="@/assets/images/bg@2x.png" class="main_bg" alt="">
     <div class="login_wrap">
       <div class="login_img">
-        <!-- <div class="h2">闃滃畞鏂囦綋涓績</div> -->
-        <div class="h3">鏅烘収鍦洪杩愮淮绠$悊绯荤粺</div>
+         <div class="h3">闃滃畞鏂囦綋涓績</div>
+<!--        <div class="h3">鏅烘収鍦洪杩愮淮绠$悊绯荤粺</div>-->
       </div>
       <div class="form_wrap">
         <div class="tabs">

--
Gitblit v1.9.3