| | |
| | | <template> |
| | | <TableLayout :permissions="['business:driver:query']"> |
| | | <TableLayout :permissions="['business:driverInfo:query']"> |
| | | <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline> |
| | | <el-form-item label="司机信息" prop="keyword"> |
| | | <el-input v-model="searchForm.keyword" clearable placeholder="请输入司机姓名/手机号" @keypress.enter.native="search"></el-input> |
| | |
| | | </el-form-item> |
| | | <el-form-item label="状态" prop="status"> |
| | | <el-select v-model="searchForm.status" clearable placeholder="请选择状态" @change="search"> |
| | | <el-option label="禁用" :value="0"></el-option> |
| | | <el-option label="启用" :value="1"></el-option> |
| | | <el-option label="禁用" :value="1"></el-option> |
| | | <el-option label="启用" :value="0"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="性别" prop="sex"> |
| | |
| | | <section> |
| | | <el-button type="primary" @click="search">搜索</el-button> |
| | | <el-button @click="reset">重置</el-button> |
| | | <el-button :loading="isWorking.export" @click="handleExport">导出</el-button> |
| | | <el-button :loading="isWorking.export" @click="exportExcel">导出</el-button> |
| | | </section> |
| | | </el-form> |
| | | <template v-slot:table-wrap> |
| | |
| | | :data="tableData.list" |
| | | stripe |
| | | > |
| | | <el-table-column prop="nickName" label="用户昵称" min-width="100px"></el-table-column> |
| | | <el-table-column prop="name" label="司机姓名" min-width="100px"></el-table-column> |
| | | <el-table-column label="性别" min-width="60px"> |
| | | <template slot-scope="{row}">{{ row.sex === 1 ? '男' : row.sex === 2 ? '女' : '-' }}</template> |
| | | <template slot-scope="{row}">{{ row.gender === 1 ? '男' : row.gender === 2 ? '女' : '-' }}</template> |
| | | </el-table-column> |
| | | <el-table-column prop="phone" label="注册手机号" min-width="120px"></el-table-column> |
| | | <el-table-column prop="idCard" label="身份证号" min-width="160px"></el-table-column> |
| | | <el-table-column prop="telephone" label="注册手机号" min-width="120px"></el-table-column> |
| | | <el-table-column prop="idcard" label="身份证号" min-width="160px"></el-table-column> |
| | | <el-table-column label="账户余额" min-width="100px"> |
| | | <template slot-scope="{row}">¥{{ (row.amount / 100).toFixed(2) }}</template> |
| | | <template slot-scope="{row}">¥{{ (row.memberAmount / 100).toFixed(2) }}</template> |
| | | </el-table-column> |
| | | <el-table-column prop="carNo" label="车牌号" min-width="100px"></el-table-column> |
| | | <el-table-column prop="carCode" label="车牌号" min-width="100px"></el-table-column> |
| | | <el-table-column prop="createTime" label="创建时间" min-width="160px"></el-table-column> |
| | | <el-table-column label="状态" min-width="80px"> |
| | | <template slot-scope="{row}"> |
| | |
| | | v-model="row.status" |
| | | active-color="#13ce66" |
| | | inactive-color="#ff4949" |
| | | :active-value="1" |
| | | :inactive-value="0" |
| | | :active-value="0" |
| | | :inactive-value="1" |
| | | ></el-switch> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | :pagination="tableData.pagination" |
| | | ></pagination> |
| | | </template> |
| | | <OperaDriverDetail ref="operaDriverDetail" /> |
| | | </TableLayout> |
| | | </template> |
| | | |
| | |
| | | import BaseTable from '@/components/base/BaseTable' |
| | | import TableLayout from '@/layouts/TableLayout' |
| | | import Pagination from '@/components/common/Pagination' |
| | | import { fetchList, updateStatus, exportExcel } from '@/api/business/driver' |
| | | import OperaDriverDetail from '@/components/business/OperaDriverDetail' |
| | | import { updateStatus, exportExcel } from '@/api/business/driver' |
| | | |
| | | export default { |
| | | name: 'DriverList', |
| | | extends: BaseTable, |
| | | components: { TableLayout, Pagination }, |
| | | components: { TableLayout, Pagination, OperaDriverDetail }, |
| | | data () { |
| | | return { |
| | | searchForm: { |
| | |
| | | sex: '', |
| | | createTime: '', |
| | | startTime: '', |
| | | endTime: '' |
| | | endTime: '', |
| | | auditStatus: 1 |
| | | } |
| | | } |
| | | }, |
| | |
| | | this.search() |
| | | }, |
| | | methods: { |
| | | loadTableData (resolve) { |
| | | this.isWorking.search = true |
| | | fetchList(this.getTableParams()) |
| | | .then(data => { |
| | | this.tableData.list = data.list || [] |
| | | this.tableData.pagination.total = data.total || 0 |
| | | if (resolve) resolve(data) |
| | | }) |
| | | .catch(e => { |
| | | this.$tip.apiFailed(e, '加载失败') |
| | | }) |
| | | .finally(() => { |
| | | this.isWorking.search = false |
| | | }) |
| | | }, |
| | | handleDateChange (val) { |
| | | this.searchForm.startTime = val ? val[0] : '' |
| | | this.searchForm.endTime = val ? val[1] : '' |
| | |
| | | this.search() |
| | | }, |
| | | handleDetail (row) { |
| | | this.$refs.operaDriverDetail.open('司机详情', row) |
| | | }, |
| | | handleStatusChange (val, row) { |
| | | updateStatus({ id: row.id, status: val }).then(res => { |