|  |  |  | 
|---|
|  |  |  | <TableLayout> | 
|---|
|  |  |  | <!-- 搜索表单 --> | 
|---|
|  |  |  | <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="结束日期" | 
|---|
|  |  |  | 
|---|
|  |  |  | @change="selectDate" | 
|---|
|  |  |  | ></el-date-picker> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <section> | 
|---|
|  |  |  | <el-button type="primary" @click="search">搜索</el-button> | 
|---|
|  |  |  | <el-button @click="reset">重置</el-button> | 
|---|
|  |  |  | 
|---|
|  |  |  | ></el-table-column> | 
|---|
|  |  |  | </el-table-column> | 
|---|
|  |  |  | </el-table> | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | <!-- 新建/修改 --> | 
|---|
|  |  |  | </TableLayout> | 
|---|
|  |  |  | 
|---|
|  |  |  | import BaseTable from '@/components/base/BaseTable' | 
|---|
|  |  |  | import TableLayout from '@/layouts/TableLayout' | 
|---|
|  |  |  | import { fetchList } from '@/api/business/onlinePayStatistics' | 
|---|
|  |  |  | import { formatDateTime } from '@/utils/util' | 
|---|
|  |  |  | import dayjs from 'dayjs' | 
|---|
|  |  |  | export default { | 
|---|
|  |  |  | name: 'PricingParam', | 
|---|
|  |  |  | extends: BaseTable, | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | created () { | 
|---|
|  |  |  | // this.searchForm.startDate = formatDateTime(new Date(), 'yyyy-MM-dd') + ' 00:00:00' | 
|---|
|  |  |  | this.searchForm.startDate = dayjs().format('YYYY-MM-DD') + ' 00:00:00' | 
|---|
|  |  |  | this.searchForm.endDate = dayjs().format('YYYY-MM-DD') + ' 23:59:59' | 
|---|
|  |  |  | this.search() | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | methods: { | 
|---|
|  |  |  | 
|---|
|  |  |  | this.$refs.searchForm.resetFields() | 
|---|
|  |  |  | this.search() | 
|---|
|  |  |  | }, | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | search() { | 
|---|
|  |  |  | fetchList(this.searchForm) | 
|---|
|  |  |  | .then(res => { | 
|---|
|  |  |  | this.tableData.list = [ | 
|---|
|  |  |  | { name: '套餐收入', payNum: res.discountNum, payMoney: res.discountMoney }, | 
|---|
|  |  |  | { name: '支付押金', payNum: res.payNum, payMoney: res.payMoney }, | 
|---|
|  |  |  | { name: '退款', payNum: res.refundNum, payMoney: res.refundMoney }, | 
|---|
|  |  |  | { name: '未结算', payNum: res.unClosedNum, payMoney: res.unClosedMoney }, | 
|---|