MrShi
4 天以前 4fabfe4dbd2eb28d07a4350597d314958cc1c281
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<template>
  <TableLayout :permissions="['business:memberrides:query']">
    <!-- 搜索表单 -->
    <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline>
 
      <el-form-item label="车辆编号" prop="bikeCode">
        <el-input v-model="searchForm.bikeCode" placeholder="请输入车辆编码" @keypress.enter.native="search"></el-input>
      </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>
      <el-table
        v-loading="isWorking.search"
        :data="tableData.list"
        stripe
        border
      >
        <el-table-column prop="openid" label="用户" min-width="180px" align="center"></el-table-column>
        <el-table-column prop="bikeCode" label="车辆编号" min-width="100px" align="center"></el-table-column>
        <el-table-column prop="bikeType" label="车辆类型" min-width="100px" align="center"></el-table-column>
        <el-table-column prop="rentSiteId" label="借出站点" min-width="100px" align="center"></el-table-column>
        <el-table-column prop="rentLockId" 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 label="操作" min-width="100px" align="center"  v-if="containPermissions(['business:memberRides:forceBack'])">
          <!-- 0未结算 1已结束 -->
          <template slot-scope="{row}">
            <el-button type="text" @click="$refs.operaForcedReturnWindow.open('强制还车', row)">强制还车</el-button>
          </template>
        </el-table-column>
 
      </el-table>
      <pagination
        @size-change="handleSizeChange"
        @current-change="handlePageChange"
        :pagination="tableData.pagination"
      >
      </pagination>
    </template>
    <OperaForcedReturnWindow ref="operaForcedReturnWindow" @success="handlePageChange"/>
  </TableLayout>
</template>
 
<script>
import BaseTable from '@/components/base/BaseTable'
import TableLayout from '@/layouts/TableLayout'
import Pagination from '@/components/common/Pagination'
import OperaForcedReturnWindow from '@/components/business/OperaForcedReturnWindow.vue'
// import { forceBack } from '@/api/business/memberRides'
export default {
  name: 'MemberRides',
  extends: BaseTable,
  components: { TableLayout, Pagination, OperaForcedReturnWindow },
  data () {
    return {
      // 搜索
      searchForm: {
        bikeCode: '',
        status: '1',
        
      },
      value1: []
    }
  },
  created () {
    this.config({
      module: '用户骑行记录表',
      api: '/business/memberRides',
      'field.id': 'id',
      'field.main': 'id'
    })
    this.search()
  },
  methods: {
    
  },
}
/**
 * 
 */
</script>