|  |  |  | 
|---|
|  |  |  | <!-- 搜索表单 --> | 
|---|
|  |  |  | <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <el-form-item label="用户" prop="memberId"> | 
|---|
|  |  |  | <el-input v-model="searchForm.memberId" placeholder="请输入" @keypress.enter.native="search"></el-input> | 
|---|
|  |  |  | <el-form-item label="用户" prop="openid"> | 
|---|
|  |  |  | <el-input v-model="searchForm.openid" placeholder="请输入" @keypress.enter.native="search"></el-input> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-form-item label="车辆编码" prop="bikeCode"> | 
|---|
|  |  |  | <el-input v-model="searchForm.bikeCode" placeholder="请输入车辆编码" @keypress.enter.native="search"></el-input> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-form-item label="结算状态" prop="closeStatus"> | 
|---|
|  |  |  | <el-select v-model="searchForm.status" placeholder="请选择"> | 
|---|
|  |  |  | <el-select v-model="searchForm.closeStatus" placeholder="请选择"> | 
|---|
|  |  |  | <el-option | 
|---|
|  |  |  | label="未结算" | 
|---|
|  |  |  | :value="1"> | 
|---|
|  |  |  | :value="0"> | 
|---|
|  |  |  | </el-option> | 
|---|
|  |  |  | <el-option | 
|---|
|  |  |  | label="已结算" | 
|---|
|  |  |  | 
|---|
|  |  |  | <el-date-picker | 
|---|
|  |  |  | v-model="value1" | 
|---|
|  |  |  | type="daterange" | 
|---|
|  |  |  | @change="selectDate" | 
|---|
|  |  |  | format="yyyy-MM-dd" | 
|---|
|  |  |  | value-format="yyyy-MM-dd HH:mm:ss" | 
|---|
|  |  |  | range-separator="至" | 
|---|
|  |  |  | start-placeholder="开始日期" | 
|---|
|  |  |  | end-placeholder="结束日期"> | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <section> | 
|---|
|  |  |  | <el-button type="primary" @click="search">搜索</el-button> | 
|---|
|  |  |  | <el-button type="primary" :loading="isWorking.export" v-permissions="['business:memberrides:exportExcel']" @click="exportExcel">导出</el-button> | 
|---|
|  |  |  | <el-button @click="reset">重置</el-button> | 
|---|
|  |  |  | </section> | 
|---|
|  |  |  | </el-form> | 
|---|
|  |  |  | <!-- 表格和分页 --> | 
|---|
|  |  |  | <template v-slot:table-wrap> | 
|---|
|  |  |  | <ul class="toolbar" v-permissions="['business:member:create']"> | 
|---|
|  |  |  | <li><el-button type="primary" :loading="isWorking.export" v-permissions="['business:memberrides:exportExcel']" @click="exportExcel">导出</el-button></li> | 
|---|
|  |  |  | </ul> | 
|---|
|  |  |  | <el-table | 
|---|
|  |  |  | v-loading="isWorking.search" | 
|---|
|  |  |  | :data="tableData.list" | 
|---|
|  |  |  | 
|---|
|  |  |  | <el-table-column prop="bikeType" label="车辆类型" min-width="100px" align="center"></el-table-column> | 
|---|
|  |  |  | <el-table-column prop="rideTime" label="借出时长(分)" min-width="100px" align="center"></el-table-column> | 
|---|
|  |  |  | <el-table-column prop="duration" label="计费时长(分)" min-width="100px" align="center"></el-table-column> | 
|---|
|  |  |  | <el-table-column prop="rentDate" label="创建时间" min-width="100px" align="center"></el-table-column> | 
|---|
|  |  |  | <el-table-column prop="rentDate" label="借出时间" min-width="100px" align="center"></el-table-column> | 
|---|
|  |  |  | <el-table-column prop="backDate" label="还车时间" min-width="100px" align="center"></el-table-column> | 
|---|
|  |  |  | <el-table-column prop="closeStatus" label="结算状态" min-width="100px" align="center"> | 
|---|
|  |  |  | <!-- 0未结算 1已结束 --> | 
|---|
|  |  |  | 
|---|
|  |  |  | import BaseTable from '@/components/base/BaseTable' | 
|---|
|  |  |  | import TableLayout from '@/layouts/TableLayout' | 
|---|
|  |  |  | import Pagination from '@/components/common/Pagination' | 
|---|
|  |  |  | import dayjs from 'dayjs' | 
|---|
|  |  |  | export default { | 
|---|
|  |  |  | name: 'MemberRides', | 
|---|
|  |  |  | extends: BaseTable, | 
|---|
|  |  |  | 
|---|
|  |  |  | editor: '', | 
|---|
|  |  |  | isdeleted: '', | 
|---|
|  |  |  | info: '', | 
|---|
|  |  |  | memberId: '', | 
|---|
|  |  |  | openid: '', | 
|---|
|  |  |  | bikeCode: '', | 
|---|
|  |  |  | balance: '', | 
|---|
|  |  |  | paramId: '', | 
|---|
|  |  |  | 
|---|
|  |  |  | backType: '', | 
|---|
|  |  |  | backReason: '', | 
|---|
|  |  |  | backInfo: '', | 
|---|
|  |  |  | startDate: '', | 
|---|
|  |  |  | endDate: '', | 
|---|
|  |  |  | backUserid: '' | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | value1: [] | 
|---|
|  |  |  | value1: [new Date(), new Date()] | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | created () { | 
|---|
|  |  |  | 
|---|
|  |  |  | 'field.id': 'id', | 
|---|
|  |  |  | 'field.main': 'id' | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | this.searchForm.startDate = dayjs().format('YYYY-MM-DD') + ' 00:00:00' | 
|---|
|  |  |  | this.searchForm.endDate = dayjs().format('YYYY-MM-DD') + ' 23:59:59' | 
|---|
|  |  |  | // this.searchForm.startDate = formatDateTime(new Date(), 'yyyy-MM-dd') + ' 00:00:00' | 
|---|
|  |  |  | // this.searchForm.endDate = formatDateTime(new Date(), 'yyyy-MM-dd') + ' 23:59:59' | 
|---|
|  |  |  | this.search() | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | methods: { | 
|---|
|  |  |  | reset() { | 
|---|
|  |  |  | this.value1 = [] | 
|---|
|  |  |  | this.searchForm.startDate = '' | 
|---|
|  |  |  | this.searchForm.endDate = '' | 
|---|
|  |  |  | this.$refs.searchForm.resetFields() | 
|---|
|  |  |  | this.search() | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | selectDate(v) { | 
|---|
|  |  |  | this.searchForm.startDate = '' | 
|---|
|  |  |  | this.searchForm.endDate = '' | 
|---|
|  |  |  | if (v) { | 
|---|
|  |  |  | this.searchForm.startDate = v[0] | 
|---|
|  |  |  | this.searchForm.endDate = v[1] | 
|---|
|  |  |  | } | 
|---|
|  |  |  | this.search() | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | } | 
|---|
|  |  |  | </script> | 
|---|