소스 검색

bug 修复

lilei 4 년 전
부모
커밋
c1fdc453ca
1개의 변경된 파일22개의 추가작업 그리고 3개의 파일을 삭제
  1. 22 3
      src/views/financialManagement/financialPayment/list.vue

+ 22 - 3
src/views/financialManagement/financialPayment/list.vue

@@ -58,7 +58,7 @@
     </div>
     <!-- alert -->
     <a-alert type="info" showIcon style="margin-bottom:15px">
-      <div slot="message">共 <strong>6</strong> 条记录,付款金额合计 <strong>¥14</strong> ,其中已付 <strong>¥14</strong> ,未付 <strong>¥14</strong> </div>
+      <div slot="message">共 <strong>{{ totalData.count }}</strong> 条记录,付款金额合计 <strong>¥{{ totalData.totalAmount }}</strong> ,其中已付 <strong>¥{{ totalData.settledAmount }}</strong> ,未付 <strong>¥{{ totalData.unsettleAmount }}</strong> </div>
     </a-alert>
     <div style="margin-bottom: 15px">
       <a-button type="primary" id="finacialPay-export" :disabled="!hasSelected" :loading="loading" @click="handlePayment">
@@ -98,7 +98,7 @@
 
 <script>
 import { STable, VSelect } from '@/components'
-import { settlePayQuery, queryByTypeSum, settlePayMoney, findPayDetail } from '@/api/settlePay.js'
+import { settlePayQuery, queryByTypeSum, settlePayMoney, findPayDetail, settlePayQuerySum } from '@/api/settlePay.js'
 import moment from 'moment'
 export default {
   components: { STable, VSelect },
@@ -118,13 +118,20 @@ export default {
         auditBeginDate: '',
         auditEndDate: ''
       },
+      // 总计
+      totalData: {
+        settledAmount: 0,
+        totalAmount: 0,
+        unsettleAmount: 0,
+        count: 0
+      },
       // 表头
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
         { title: '付款单号', dataIndex: 'settleNo', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '关联单号', dataIndex: 'bizNo', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '商户名称', dataIndex: 'settleClientName', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '付款金额', dataIndex: 'totalAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '付款金额', dataIndex: 'totalAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') } },
         { title: '付款类型', dataIndex: 'bizName', width: 100, align: 'center' },
         { title: '付款方式', dataIndex: 'settleStyleName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '付款时间', dataIndex: 'settleTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
@@ -147,6 +154,9 @@ export default {
             data.list[i].no = no + i + 1
           }
           this.disabled = false
+          this.totalData.count = data.count
+          // 查询总计
+          this.settlePayQuerySum(Object.assign(parameter, this.queryParam))
           return data
         })
       },
@@ -177,6 +187,15 @@ export default {
     })
   },
   methods: {
+    // 总计
+    settlePayQuerySum (params) {
+      settlePayQuerySum(params).then(res => {
+        console.log(res)
+        if (res.status == 200) {
+          this.totalData = Object.assign(this.totalData, res.data)
+        }
+      })
+    },
     // 获取类型
     queryByTypeSum () {
       queryByTypeSum({}).then(res => {