chenrui 4 年之前
父节点
当前提交
62aec48942

+ 50 - 4
src/api/settle.js

@@ -30,6 +30,32 @@ export const settleUnitSave = (params) => {
     method: 'post'
   })
 }
+//  单位收付款记录  详情 列表 结算记录 分页
+export const settleUnitDetailList = (params) => {
+  const url = `/settle/unit/detail/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  单位收付款记录  详情
+export const settleUnitDetail = (params) => {
+  return axios({
+    url: `/settle/unit/findById/${params.id}`,
+    method: 'get'
+  })
+}
+//  单位收付款记录  合计
+export const settleUnitQuerySum = (params) => {
+  return axios({
+    url: '/settle/unit/querySum',
+    data: params,
+    method: 'post'
+  })
+}
 //  单位收付款 全部单据
 export const settleInfoAllList = (params) => {
   return axios({
@@ -38,10 +64,30 @@ export const settleInfoAllList = (params) => {
     method: 'post'
   })
 }
-//  单位收付款 详情
-export const settleUnitDetail = (params) => {
+//  单位收付款 列表 分页
+export const settleInfoList = (params) => {
+  const url = `/settle/info/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
   return axios({
-    url: `/settle/unit/findById/${params.sn}`,
-    method: 'get'
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  单位收付款  详情 合计
+export const settleInfoQueryReceiptOrPaySum = (params) => {
+  return axios({
+    url: '/settle/info/queryReceiptOrPaySum',
+    data: params,
+    method: 'post'
+  })
+}
+//  单位收付款  列表 合计
+export const settleInfoQuerySum = (params) => {
+  return axios({
+    url: '/settle/info/querySum',
+    data: params,
+    method: 'post'
   })
 }

+ 2 - 2
src/config/router.config.js

@@ -1451,7 +1451,7 @@ export const asyncRouterMap = [
                 }
               },
               {
-                path: 'collectionPayment/:sn',
+                path: 'collectionPayment/:sn/:name',
                 name: 'companyReceivablePayableCollectionPayment',
                 component: () => import(/* webpackChunkName: "financialManagement" */ '@/views/financialManagement/companyReceivablePayable/collectionPayment.vue'),
                 meta: {
@@ -1462,7 +1462,7 @@ export const asyncRouterMap = [
                 }
               },
               {
-                path: 'detail/:sn',
+                path: 'detail/:sn/:name',
                 name: 'companyReceivablePayableDetail',
                 component: () => import(/* webpackChunkName: "financialManagement" */ '@/views/financialManagement/companyReceivablePayable/detail.vue'),
                 meta: {

+ 53 - 64
src/views/financialManagement/companyCollectionPayment/detail.vue

@@ -1,9 +1,10 @@
 <template>
   <div class="companyCollectionPaymentDetail-wrap">
-    <a-page-header :ghost="false" @back="handleBack" >
+    <a-page-header :ghost="false" :backIcon="false" class="companyCollectionPaymentDetail-cont" >
       <!-- 自定义的二级文字标题 -->
       <template slot="subTitle">
-        <a id="companyCollectionPaymentDetail-back-btn" href="javascript:;" @click="handleBack">返回列表</a>
+        <a id="companyCollectionPaymentDetail-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+        <p style=" display: inline-block;margin: 0 0 0 60px;color: #000;font-size: 16px;font-weight: 600;">单号:{{ (basicInfoData&&basicInfoData.unitSettleNo) || '--' }}</p>
       </template>
       <!-- 操作区,位于 title 行的行尾 -->
       <template slot="extra">
@@ -11,8 +12,6 @@
         <a-button key="1" type="primary" id="companyCollectionPaymentDetail-print-btn">快速打印</a-button>
       </template>
     </a-page-header>
-    <!-- 内容 -->
-    <a-page-header title="单号:CG2021010100001" ></a-page-header>
     <!-- 基础信息 -->
     <a-card size="small" :bordered="false" class="companyCollectionPaymentDetail-cont">
       <a-collapse :activeKey="['1']">
@@ -37,7 +36,7 @@
         <a-collapse-panel key="1" header="收款明细">
           <!-- 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>6</strong> 条明细,金额合计 <strong>¥{{ (productTotal&&productTotal.totalAmount) || 0 }}</strong> ,结算金额合计 <strong>¥{{ (productTotal&&productTotal.settleAmount) || 0 }}</strong> </div>
           </a-alert>
           <!-- 列表 -->
           <s-table
@@ -48,14 +47,6 @@
             :columns="columns"
             :data="loadData"
             bordered>
-            <!-- 采购数量 -->
-            <template slot="purchaseNum" slot-scope="text, record">
-              <span>{{record.purchaseNum}}</span>
-            </template>
-            <!-- 缺货数量 -->
-            <template slot="outOfStockNum" slot-scope="text, record">
-              <span>{{record.outOfStockNum}}</span>
-            </template>
           </s-table>
         </a-collapse-panel>
       </a-collapse>
@@ -64,60 +55,58 @@
 </template>
 
 <script>
-  import { STable, VSelect } from '@/components'
-  export default{
-    components: { STable, VSelect },
-    data(){
-      return{
-        // 表头
-        columns: [
-          { title: '序号', dataIndex: 'no', align: 'center' },
-          { title: '单据号', dataIndex: 'creatDate', align: 'center' },
-          { title: '类型', dataIndex: 'custName', align: 'center' },
-          { title: '审核时间', dataIndex: 'totalP', align: 'center' },
-          { title: '金额', scopedSlots: { customRender: 'purchaseNum' }, align: 'center' },
-          { title: '余额', scopedSlots: { customRender: 'purchasesNum' }, align: 'center' },
-          { title: '结算金额', dataIndex: 'totalNums', align: 'center' }
-        ],
-        // 加载数据方法 必须为 Promise 对象
-        loadData: parameter => {
-          this.disabled = true
-          // return customerBundleDelayList( Object.assign(parameter, this.queryParam) ).then(res => {
-          //   const data = res.data
-          //   const no = (data.pageNo - 1) * data.pageSize
-          //   for (var i = 0; i < data.list.length; i++) {
-          //     data.list[i].no = no + i + 1
-          //   }
-          //   this.disabled = false
-          //   return data
-          // })
-          const _this = this
-          return new Promise(function(resolve, reject){
-            const data = {
-              pageNo: 1,
-              pageSize: 10,
-              list: [
-                { id: '1', purchaseNo: 'jgqp11111111111', creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '122' }
-              ],
-              count: 10
-            }
-            const no = (data.pageNo - 1) * data.pageSize
-            for (var i = 0; i < data.list.length; i++) {
-              data.list[i].no = no + i + 1
-            }
-            _this.disabled = false
-            resolve(data)
-          })
-        },
-      }
-    },
-    methods: {
-      //  返回列表
-      handleBack(){
-        this.$router.push({ path: '/financialManagement/companyCollectionPayment/list'})
+import { STable, VSelect } from '@/components'
+import { settleUnitDetailList, settleUnitDetail } from '@/api/settle'
+export default {
+  components: { STable, VSelect },
+  data () {
+    return {
+      // 表头
+      columns: [
+        { title: '序号', dataIndex: 'no', align: 'center' },
+        { title: '单据号', dataIndex: 'bizNo', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '类型', dataIndex: 'bizTypeDictValue', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '金额', dataIndex: 'totalAmount', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '结算金额', dataIndex: 'settleAmount', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        return settleUnitDetailList(Object.assign(parameter, this.queryParam)).then(res => {
+          const data = res.data
+          const no = (data.pageNo - 1) * data.pageSize
+          for (var i = 0; i < data.list.length; i++) {
+            data.list[i].no = no + i + 1
+          }
+          this.disabled = false
+          return data
+        })
       },
+      basicInfoData: null //  基本信息
+    }
+  },
+  methods: {
+    //  返回列表
+    handleBack () {
+      this.$router.push({ path: '/financialManagement/companyCollectionPayment/list' })
+    },
+    // 详情
+    getDetail () {
+      settleUnitDetail({ id: this.$route.params.id }).then(res => {
+        if (res.status == 200) {
+          this.basicInfoData = res.data
+        } else {
+          this.basicInfoData = null
+        }
+      })
     }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {
+      vm.getDetail()
+    })
   }
+}
 </script>
 
 <style lang="less">

+ 30 - 39
src/views/financialManagement/companyCollectionPayment/list.vue

@@ -69,7 +69,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> 条,付款金额合计 <strong>¥14</strong> </div>
+      <div slot="message">共 <strong>6</strong> 条记录,其中收款单 <strong>{{ (productTotal&&productTotal.receiptCount) || 0 }}</strong> 条,收款金额合计 <strong>¥{{ (productTotal&&productTotal.receiptAmount) || 0 }}</strong> ,付款单 <strong>{{ (productTotal&&productTotal.payCount) || 0 }}</strong> 条,付款金额合计 <strong>¥{{ (productTotal&&productTotal.payAmount) || 0 }}</strong> </div>
     </a-alert>
     <!-- 列表 -->
     <s-table
@@ -82,24 +82,20 @@
       :scroll="{ x: 1180 }"
       bordered>
       <!-- 结算单号 -->
-      <template slot="purchaseNo" slot-scope="text, record">
-        <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.purchaseNo }}</span>
+      <template slot="unitSettleNo" slot-scope="text, record">
+        <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.unitSettleNo }}</span>
       </template>
       <!-- 结算方式 -->
       <template slot="sss" slot-scope="text, record">
         <span>{{ record.state == 1 ? '现金' : '微信' }}</span>
       </template>
-      <!-- 操作 -->
-      <template slot="action" slot-scope="text, record">
-        <a-button size="small" type="primary" class="button-success" @click="handleDetail(record)" id="companyCollectionPaymentList-detail-btn">详情</a-button>
-      </template>
     </s-table>
   </a-card>
 </template>
 
 <script>
 import { STable, VSelect } from '@/components'
-// import { getRoleList, getServiceList } from '@/api/manage'
+import { settleUnitList, settleUnitQuerySum } from '@/api/settle'
 export default {
   components: { STable, VSelect },
   data () {
@@ -111,46 +107,31 @@ export default {
       // 表头
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
-        { title: '单位名称', dataIndex: 'name', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '单位类型', dataIndex: 'pssayType', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '结算类型', dataIndex: 'paddyType', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '结算单号', scopedSlots: { customRender: 'purchaseNo' }, width: 140, align: 'center' },
-        { title: '结算金额', dataIndex: 'totalP', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '结算时间', dataIndex: 'creatDate', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '操作人', dataIndex: 'payType', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '结算方式', scopedSlots: { customRender: 'sss' }, width: 100, align: 'center' },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
+        { title: '单位名称', dataIndex: 'settleClientName', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '单位类型', dataIndex: 'settleClientTypeDictValue', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '结算类型', dataIndex: 'settleTypeDictValue', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '结算单号', scopedSlots: { customRender: 'unitSettleNo' }, width: 140, align: 'center' },
+        { title: '结算金额', dataIndex: 'settleAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '结算时间', dataIndex: 'createDate', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作人', dataIndex: 'operateName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '结算方式', dataIndex: 'settleStyleName', width: 100, align: 'center', customRender: function (text) { return text || '--' } }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
-        // return customerBundleDelayList( Object.assign(parameter, this.queryParam) ).then(res => {
-        //   const data = res.data
-        //   const no = (data.pageNo - 1) * data.pageSize
-        //   for (var i = 0; i < data.list.length; i++) {
-        //     data.list[i].no = no + i + 1
-        //   }
-        //   this.disabled = false
-        //   return data
-        // })
-        const _this = this
-        return new Promise(function (resolve, reject) {
-          const data = {
-            pageNo: 1,
-            pageSize: 10,
-            list: [
-              { id: '1', purchaseNo: 'jgqp11111111111', creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '122' }
-            ],
-            count: 10
-          }
+        return settleUnitList(Object.assign(parameter, this.queryParam)).then(res => {
+          const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
           for (var i = 0; i < data.list.length; i++) {
             data.list[i].no = no + i + 1
           }
-          _this.disabled = false
-          resolve(data)
+          this.disabled = false
+          this.getTotal(Object.assign(parameter, this.queryParam))
+          return data
         })
-      }
+      },
+      total: 0, //  总条数
+      productTotal: null
     }
   },
   methods: {
@@ -158,6 +139,16 @@ export default {
     handleDetail (row) {
       this.$router.push({ path: `/financialManagement/companyCollectionPayment/detail/${row.id}` })
     },
+    // 合计
+    getTotal (param) {
+      settleUnitQuerySum(param).then(res => {
+        if (res.status == 200 && res.data) {
+          this.productTotal = res.data
+        } else {
+          this.productTotal = null
+        }
+      })
+    },
     //  审核
     handleExamine (row, type) {
       const _this = this

+ 6 - 2
src/views/financialManagement/companyReceivablePayable/chooseBillModal.vue

@@ -84,6 +84,10 @@ export default {
       default: () => {
         return []
       }
+    },
+    settleClientSn: {
+      type: String,
+      default: ''
     }
   },
   data () {
@@ -108,7 +112,7 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
-        // 创建时间
+        // 审核时间
         if (this.auditTime && this.auditTime.length > 0) {
           this.queryParam.auditBeginDate = moment(this.auditTime[0]).format(this.dateFormat) + '00:00:00'
           this.queryParam.auditEndDate = moment(this.auditTime[1]).format(this.dateFormat) + '23:59:59'
@@ -116,7 +120,7 @@ export default {
           this.queryParam.auditBeginDate = undefined
           this.queryParam.auditEndDate = undefined
         }
-        return settleInfoAllList(this.queryParam).then(res => {
+        return settleInfoAllList(Object.assign(this.queryParam, { settleClientSn: this.settleClientSn })).then(res => {
           const data = res.data
           this.selectedRowKeys = []
           this.selectedRows = []

+ 4 - 3
src/views/financialManagement/companyReceivablePayable/collectionPayment.vue

@@ -4,7 +4,7 @@
       <!-- 自定义的二级文字标题 -->
       <template slot="subTitle">
         <a id="collectionPayment-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
-        <span style="margin: 0 15px;color: #666;">客户:敬爱的国家首都</span>
+        <p style=" display: inline-block;margin: 0 0 0 60px;color: #000;font-size: 16px;font-weight: 600;">客户:{{ $route.params.name || '--' }}</p>
       </template>
     </a-page-header>
     <!-- 已选单据 -->
@@ -133,7 +133,7 @@
           style="padding: 0 60px;">提交</a-button>
       </div>
     </a-affix>
-    <choose-bill-modal :openModal="openModal" :nowChoose="chooseLoadData" @ok="handleOk" @close="handleClose" />
+    <choose-bill-modal :openModal="openModal" :nowChoose="chooseLoadData" :settleClientSn="$route.params.sn" @ok="handleOk" @close="handleClose" />
   </div>
 </template>
 
@@ -253,7 +253,8 @@ export default {
           _this.chooseLoadData.map(item => {
             form.detailList.push({
               bizSn: item.bizSn,
-              settleAmount: item.settleAmount
+              settleAmount: item.settleAmount,
+              prFlag: item.prFlag
             })
           })
           console.log(form, '--------------提交信息')

+ 67 - 54
src/views/financialManagement/companyReceivablePayable/detail.vue

@@ -1,9 +1,10 @@
 <template>
   <div class="companyCollectionPaymentDetail-wrap">
-    <a-page-header :ghost="false" @back="handleBack" >
+    <a-page-header :ghost="false" :backIcon="false" class="companyCollectionPaymentDetail-cont" >
       <!-- 自定义的二级文字标题 -->
       <template slot="subTitle">
-        <a id="companyCollectionPaymentDetail-back-btn" href="javascript:;" @click="handleBack">返回列表</a>
+        <a id="companyCollectionPaymentDetail-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+        <p style=" display: inline-block;margin: 0 0 0 60px;color: #000;font-size: 16px;font-weight: 600;">客户:{{ $route.params.name || '--' }}</p>
       </template>
       <!-- 操作区,位于 title 行的行尾 -->
       <template slot="extra">
@@ -11,8 +12,6 @@
         <a-button key="1" type="primary" id="companyCollectionPaymentDetail-print-btn">快速打印</a-button>
       </template>
     </a-page-header>
-    <!-- 内容 -->
-    <a-page-header title="客户:监管营销中心" ></a-page-header>
     <a-card>
       <!-- 搜索条件 -->
       <div class="table-page-search-wrapper">
@@ -20,18 +19,24 @@
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
               <a-form-item label="单据号">
-                <a-input id="companyReceivablePayableDetail-purchaseNo" v-model.trim="queryParam.purchaseNo" allowClear placeholder="请输入单据号"/>
+                <a-input id="companyReceivablePayableDetail-bizNo" v-model.trim="queryParam.bizNo" allowClear placeholder="请输入单据号"/>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="审核时间">
-                <a-range-picker v-model="queryParam.creatDate" id="companyCollectionPaymentDetail-creatDate"/>
+                <a-range-picker
+                  style="width:100%"
+                  id="companyCollectionPaymentDetail-auditTime"
+                  :disabledDate="disabledDate"
+                  v-model="auditTime"
+                  :format="dateFormat"
+                  :placeholder="['开始时间', '结束时间']" />
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <span class="table-page-search-submitButtons">
                 <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="companyReceivablePayableDetail-refresh">查询</a-button>
-                <a-button style="margin-left: 8px" @click="resetSearchForm()" :disabled="disabled" id="companyReceivablePayableDetail-reset">重置</a-button>
+                <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="companyReceivablePayableDetail-reset">重置</a-button>
                 <a-button
                   type="danger"
                   style="margin-left: 8px"
@@ -46,7 +51,7 @@
       </div>
       <!-- alert -->
       <a-alert type="info" showIcon style="margin-bottom:15px">
-        <div slot="message">共 <strong>6</strong> 条明细,金额合计 <strong>¥14</strong> ,余额合计 <strong>¥14</strong> </div>
+        <div slot="message">共 <strong>{{ total }}</strong> 条明细,金额合计 <strong>¥{{ (productTotal&&productTotal.totalAmount) || 0 }}</strong> ,余额合计 <strong>¥{{ (productTotal&&productTotal.unsettleAmount) || 0 }}</strong> </div>
       </a-alert>
       <!-- 列表 -->
       <s-table
@@ -71,83 +76,91 @@
 </template>
 
 <script>
+import moment from 'moment'
 import { STable, VSelect } from '@/components'
+import { settleInfoList, settleInfoQueryReceiptOrPaySum } from '@/api/settle'
 export default {
   components: { STable, VSelect },
   data () {
     return {
       disabled: false, //  查询、重置按钮是否可操作
       // 查询参数
-      queryParam: {},
+      queryParam: {
+        bizNo: ''
+      },
+      auditTime: [], //  审核时间
+      dateFormat: 'YYYY-MM-DD',
       exportLoading: false, // 导出loading
       // 表头
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
-        { title: '单据号', dataIndex: 'creatDate', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '类型', dataIndex: 'custName', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '审核时间', dataIndex: 'totalP', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '金额', scopedSlots: { customRender: 'purchaseNum' }, align: 'center' },
-        { title: '余额', scopedSlots: { customRender: 'purchasesNum' }, align: 'center' }
+        { title: '单据号', dataIndex: 'bizNo', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '类型', dataIndex: 'bizTypeDictValue', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '审核时间', dataIndex: 'auditTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '金额', dataIndex: 'totalAmount', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '余额', dataIndex: 'unsettleAmount', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
-        // return customerBundleDelayList( Object.assign(parameter, this.queryParam) ).then(res => {
-        //   const data = res.data
-        //   const no = (data.pageNo - 1) * data.pageSize
-        //   for (var i = 0; i < data.list.length; i++) {
-        //     data.list[i].no = no + i + 1
-        //   }
-        //   this.disabled = false
-        //   return data
-        // })
-        const _this = this
-        return new Promise(function (resolve, reject) {
-          const data = {
-            pageNo: 1,
-            pageSize: 10,
-            list: [
-              { id: '1', purchaseNo: 'jgqp11111111111', creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '122' }
-            ],
-            count: 10
-          }
+        // 审核时间
+        if (this.auditTime && this.auditTime.length > 0) {
+          this.queryParam.auditBeginDate = moment(this.auditTime[0]).format(this.dateFormat) + '00:00:00'
+          this.queryParam.auditEndDate = moment(this.auditTime[1]).format(this.dateFormat) + '23:59:59'
+        } else {
+          this.queryParam.auditBeginDate = undefined
+          this.queryParam.auditEndDate = undefined
+        }
+        const params = Object.assign(parameter, this.queryParam, { settleClientSn: this.$route.params.sn })
+        return settleInfoList(params).then(res => {
+          const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
           for (var i = 0; i < data.list.length; i++) {
             data.list[i].no = no + i + 1
           }
-          _this.disabled = false
-          resolve(data)
+          this.disabled = false
+          this.total = data.list.length
+          this.getTotal(params)
+          return data
         })
-      }
+      },
+      basicInfoData: null, //  基本信息
+      total: 0, //  总条数
+      productTotal: null //  合计
     }
   },
   methods: {
+    // 不可选日期
+    disabledDate (date, dateStrings) {
+      return date && date.valueOf() > Date.now()
+    },
     //  返回列表
     handleBack () {
       this.$router.push({ path: '/financialManagement/companyReceivablePayable/list' })
     },
+    // 合计
+    getTotal (param) {
+      settleInfoQueryReceiptOrPaySum(param).then(res => {
+        if (res.status == 200 && res.data) {
+          this.productTotal = res.data
+        } else {
+          this.productTotal = null
+        }
+      })
+    },
+    // 重置
+    resetSearchForm () {
+      this.queryParam.bizNo = ''
+      this.auditTime = []
+    },
     //  导出
     handleExport () {
       const params = this.queryParam
-      if (this.oldTime && this.oldTime.length > 0) {
-        params.beginOldExpiryDate = moment(this.oldTime[0]).format('YYYY-MM-DD')
-        params.endOldExpirydDate = moment(this.oldTime[1]).format('YYYY-MM-DD')
-      } else {
-        params.beginOldExpiryDate = ''
-        params.endOldExpirydDate = ''
-      }
-      if (this.newTime && this.newTime.length > 0) {
-        params.beginDate = moment(this.newTime[0]).format('YYYY-MM-DD')
-        params.endDate = moment(this.newTime[1]).format('YYYY-MM-DD')
-      } else {
-        params.beginDate = ''
-        params.endDate = ''
-      }
       this.exportLoading = true
-      customerBundleExportDelay(params).then(res => {
-        this.exportLoading = false
-        this.download(res)
-      })
+      // customerBundleExportDelay(params).then(res => {
+      //   this.exportLoading = false
+      //   this.download(res)
+      // })
     },
     download (data) {
       if (!data) { return }

+ 29 - 16
src/views/financialManagement/companyReceivablePayable/list.vue

@@ -6,15 +6,15 @@
         <a-row :gutter="15">
           <a-col :md="6" :sm="24">
             <a-form-item label="单位名称">
-              <a-input id="companyReceivablePayableList-purchaseNo" v-model.trim="queryParam.purchaseNo" allowClear placeholder="请输入单位名称"/>
+              <a-input id="companyReceivablePayableList-settleClientName" v-model.trim="queryParam.settleClientName" allowClear placeholder="请输入单位名称"/>
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="24">
             <a-form-item label="单位类型">
               <v-select
-                v-model="queryParam.billStatus"
-                ref="billStatus"
-                id="companyReceivablePayableList-billStatus"
+                v-model="queryParam.settleClientType"
+                ref="settleClientType"
+                id="companyReceivablePayableList-settleClientType"
                 code="SETTLE_CLIENT_TYPE"
                 placeholder="请选择单位类型"
                 allowClear></v-select>
@@ -31,7 +31,7 @@
     </div>
     <!-- alert -->
     <a-alert type="info" showIcon style="margin-bottom:15px">
-      <div slot="message">共 <strong>6</strong> 条记录,应收金额合计 <strong>¥14</strong> ,应付金额合计 <strong>¥14</strong> </div>
+      <div slot="message">共 <strong>{{ total }}</strong> 条记录,应收金额合计 <strong>¥{{ (productTotal&&productTotal.receipt) || 0 }}</strong> ,应付金额合计 <strong>¥{{ (productTotal&&productTotal.pay) || 0 }}</strong> </div>
     </a-alert>
     <!-- 列表 -->
     <s-table
@@ -53,14 +53,17 @@
 
 <script>
 import { STable, VSelect } from '@/components'
-import { settleUnitClientList } from '@/api/settle'
+import { settleUnitClientList, settleInfoQuerySum } from '@/api/settle'
 export default {
   components: { STable, VSelect },
   data () {
     return {
       disabled: false, //  查询、重置按钮是否可操作
       // 查询参数
-      queryParam: {},
+      queryParam: {
+        settleClientName: '',
+        settleClientType: undefined
+      },
       // 表头
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
@@ -80,28 +83,38 @@ export default {
             data.list[i].no = no + i + 1
           }
           this.disabled = false
+          this.total = data.list.length
+          this.getTotal(Object.assign(parameter, this.queryParam))
           return data
         })
-      }
+      },
+      total: 0, //  总条数
+      productTotal: null
     }
   },
   methods: {
     //  详情
     handleDetail (row) {
-      this.$router.push({ path: `/financialManagement/companyReceivablePayable/detail/${row.settleClientSn}` })
+      this.$router.push({ path: `/financialManagement/companyReceivablePayable/detail/${row.settleClientSn}/${row.settleClientName}` })
+    },
+    // 合计
+    getTotal (param) {
+      settleInfoQuerySum(param).then(res => {
+        if (res.status == 200 && res.data) {
+          this.productTotal = res.data
+        } else {
+          this.productTotal = null
+        }
+      })
     },
     //  收付款
     handleCollectionPayment (row) {
-      this.$router.push({ path: `/financialManagement/companyReceivablePayable/collectionPayment/${row.settleClientSn}` })
+      this.$router.push({ path: `/financialManagement/companyReceivablePayable/collectionPayment/${row.settleClientSn}/${row.settleClientName}` })
     },
     //  重置
     resetSearchForm () {
-      this.queryParam.orderBundleNo = ''
-      this.queryParam.orderBundle.custMobile = ''
-      this.queryParam.bundleName = ''
-      this.queryParam.itemName = ''
-      this.oldTime = undefined
-      this.newTime = undefined
+      this.queryParam.settleClientName = ''
+      this.queryParam.settleClientType = undefined
       this.$refs.table.refresh(true)
     }
   }