| <template> | 
|   <TableLayout :permissions="['business:wxbill:query']"> | 
|     <!-- 搜索表单 --> | 
|     <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline> | 
|       <el-form-item label="对账日期" prop="name"> | 
|         <el-date-picker | 
|           v-model="value1" | 
|           type="daterange" | 
|           range-separator="至" | 
|           start-placeholder="开始日期" | 
|           end-placeholder="结束日期" | 
|           format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss" | 
|           @change="selectDate" | 
|         ></el-date-picker> | 
|       </el-form-item> | 
|       <section> | 
|         <el-button type="primary" @click="search">搜索</el-button> | 
|         <el-button @click="reset">重置</el-button> | 
|       </section> | 
|     </el-form> | 
|     <!-- 表格和分页 --> | 
|     <template v-slot:table-wrap> | 
|       <div class="sum"> | 
|         <div class="sum-title"> | 
|           <div>本次筛选</div> | 
|           <div>合计</div> | 
|         </div> | 
|         <div class="sum-value"> | 
|           <div>收款笔数</div> | 
|           <div>{{ sumData.sumBill }}</div> | 
|         </div> | 
|         <div class="sum-value"> | 
|           <div>收款金额(元)</div> | 
|           <div>{{ sumData.sumTotalFee }}</div> | 
|         </div> | 
|         <div class="sum-value"> | 
|           <div>收款手续费(元)</div> | 
|           <div>{{ sumData.sumCmmsAmt }}</div> | 
|         </div> | 
|         <div class="sum-value"> | 
|           <div>退款笔数</div> | 
|           <div>{{ sumData.sumRefundBill }}</div> | 
|         </div> | 
|         <div class="sum-value"> | 
|           <div>退款金额(元)</div> | 
|           <div>{{ sumData.sumRefundBill }}</div> | 
|         </div> | 
|         <div class="sum-value"> | 
|           <div>退款手续费(元)</div> | 
|           <div>{{ sumData.sumRefundCmmsAmt }}</div> | 
|         </div> | 
|         <div class="sum-value"> | 
|           <div>结算金额(元)</div> | 
|           <div>{{ sumData.total }}</div> | 
|         </div> | 
|       </div> | 
|       <el-table | 
|         v-loading="isWorking.search" | 
|         :data="tableData.list" | 
|         stripe | 
|         border | 
|       > | 
|         <el-table-column prop="createDate" label="日期" min-width="100px" align="center"></el-table-column> | 
|         <el-table-column prop="sumBill" label="收款笔数" min-width="100px" align="center"></el-table-column> | 
|         <el-table-column prop="sumTotalFee" label="收款金额" min-width="100px" align="center"></el-table-column> | 
|         <el-table-column prop="sumCmmsAmt" label="收款手续费" min-width="100px" align="center"></el-table-column> | 
|         <el-table-column prop="sumRefundBill" label="退款笔数" min-width="100px" align="center"></el-table-column> | 
|         <el-table-column prop="sumRefundFee" label="退款金额" min-width="100px" align="center"></el-table-column> | 
|         <el-table-column prop="sumRefundCmmsAmt" label="退款手续费" min-width="100px" align="center"></el-table-column> | 
|   | 
|         <!-- <el-table-column prop="sumSuccessFee" label="应结订单总金额" min-width="100px" align="center"></el-table-column> | 
|         <el-table-column prop="sumCouponRefundFee" label="充值券退款总金额" min-width="100px" align="center"></el-table-column> | 
|         <el-table-column prop="sumApplyRefundFee" label="申请退款总金额" min-width="100px" align="center"></el-table-column> --> | 
|         <el-table-column prop="total" label="结算金额" min-width="100px" align="center"></el-table-column> | 
|         <el-table-column prop="bikeFee" label="自行车收入" min-width="100px" align="center"></el-table-column> | 
|       </el-table> | 
|       <pagination | 
|         @size-change="handleSizeChange" | 
|         @current-change="handlePageChange" | 
|         :pagination="tableData.pagination" | 
|       > | 
|       </pagination> | 
|     </template> | 
|   </TableLayout> | 
| </template> | 
|   | 
| <script> | 
| import BaseTable from '@/components/base/BaseTable' | 
| import TableLayout from '@/layouts/TableLayout' | 
| import Pagination from '@/components/common/Pagination' | 
| export default { | 
|   name: 'WxBill', | 
|   extends: BaseTable, | 
|   components: { TableLayout, Pagination }, | 
|   data () { | 
|     return { | 
|       value1: [], | 
|       // 搜索 | 
|       searchForm: { | 
|         endDate: '', | 
|         startDate: '', | 
|       }, | 
|       sumData: { | 
|   | 
|       } | 
|     } | 
|   }, | 
|   created () { | 
|     this.config({ | 
|       module: '', | 
|       api: '/business/wxBill', | 
|       'field.id': 'id', | 
|       'field.main': 'id' | 
|     }) | 
|     this.search() | 
|   }, | 
|   methods: { | 
|     reset() { | 
|       this.searchForm.startDate = '' | 
|       this.searchForm.endDate = '' | 
|       this.value1 = [] | 
|       this.search() | 
|     }, | 
|     selectDate(v) { | 
|       this.searchForm.startDate = '' | 
|       this.searchForm.endDate = '' | 
|       if (v) { | 
|         this.searchForm.startDate = v[0] | 
|         this.searchForm.endDate = v[1] | 
|       } | 
|       this.search() | 
|     }, | 
|     // 页码变更处理 | 
|     handlePageChange (pageIndex) { | 
|       this.__checkApi() | 
|       this.tableData.pagination.pageIndex = pageIndex || this.tableData.pagination.pageIndex | 
|       this.isWorking.search = true | 
|       this.api.fetchList({ | 
|         page: this.tableData.pagination.pageIndex, | 
|         capacity: this.tableData.pagination.pageSize, | 
|         model: this.searchForm, | 
|         sorts: this.tableData.sorts | 
|       }) | 
|         .then(data => { | 
|           this.tableData.list = data.records | 
|           this.tableData.pagination.total = data.total | 
|           this.sumData = data.extData | 
|         }) | 
|         .catch(e => { | 
|           this.$tip.apiFailed(e) | 
|         }) | 
|         .finally(() => { | 
|           this.isWorking.search = false | 
|         }) | 
|     }, | 
|   }, | 
| } | 
| </script> | 
| <style lang="scss" scoped> | 
| .sum { | 
|   display: flex; | 
|   font-size: 16px; | 
|   margin-bottom: 10px; | 
|   background-color: rgb(243, 243, 251); | 
|   .sum-title { | 
|     background-color: rgb(111, 129, 198); | 
|     color: #fff; | 
|     font-weight: 500; | 
|     text-align: center; | 
|     padding: 15px; | 
|   } | 
|   .sum-value { | 
|     padding: 15px 30px; | 
|     :first-child { | 
|       font-size: 14px; | 
|     } | 
|     :last-child { | 
|       font-weight: 600; | 
|     } | 
|   } | 
| } | 
| </style> |