|  |  |  | 
|---|
|  |  |  | <TableLayout :permissions="['business:member:query']"> | 
|---|
|  |  |  | <!-- 搜索表单 --> | 
|---|
|  |  |  | <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="120px" inline> | 
|---|
|  |  |  | <el-form-item label="车牌号" prop="code"> | 
|---|
|  |  |  | <el-input v-model="searchForm.code" placeholder="请输入车牌号" @keypress.enter.native="search"></el-input> | 
|---|
|  |  |  | <el-form-item label="车牌号" prop="carCode"> | 
|---|
|  |  |  | <el-input v-model="searchForm.carCode" placeholder="请输入车牌号" @keypress.enter.native="search"></el-input> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-form-item label="员工姓名/手机号" prop="memberName"> | 
|---|
|  |  |  | <el-input v-model="searchForm.memberName" placeholder="请输入员工姓名/手机号" @keypress.enter.native="search"></el-input> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-form-item label="部门" prop="companyName"> | 
|---|
|  |  |  | <el-input v-model="searchForm.companyName" placeholder="请输入部门" @keypress.enter.native="search"></el-input> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-form-item label="停车库名称" prop="parksName"> | 
|---|
|  |  |  | <el-input v-model="searchForm.parksName" placeholder="请输入停车库名称" @keypress.enter.native="search"></el-input> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <section> | 
|---|
|  |  |  | <el-button type="primary" @click="search">搜索</el-button> | 
|---|
|  |  |  | 
|---|
|  |  |  | <!-- 表格和分页 --> | 
|---|
|  |  |  | <template v-slot:table-wrap> | 
|---|
|  |  |  | <ul class="toolbar" v-permissions="['business:member:create', 'business:member:delete']"> | 
|---|
|  |  |  | <!--                <li><el-button type="primary" @click="$refs.operaCarsWindow.open('新建车辆信息表')" icon="el-icon-plus" v-permissions="['business:member:create']">新建</el-button></li>--> | 
|---|
|  |  |  | <li><el-button @click="syncCars" icon="el-icon-delete" v-permissions="['business:cars:sync']">同步</el-button></li> | 
|---|
|  |  |  | <!-- | 
|---|
|  |  |  | <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['business:cars:delete']">删除</el-button></li> | 
|---|
|  |  |  | --> | 
|---|
|  |  |  | </ul> | 
|---|
|  |  |  | <el-table | 
|---|
|  |  |  | v-loading="isWorking.search" | 
|---|
|  |  |  | 
|---|
|  |  |  | @selection-change="handleSelectionChange" | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <el-table-column type="selection" width="55"></el-table-column> | 
|---|
|  |  |  | <el-table-column prop="code" label="车牌号" min-width="100px"></el-table-column> | 
|---|
|  |  |  | <el-table-column prop="carCode" label="车牌号" min-width="100px"></el-table-column> | 
|---|
|  |  |  | <el-table-column prop="parksName" label="停车场" min-width="100px"></el-table-column> | 
|---|
|  |  |  | <el-table-column label="用户类型" min-width="100px"> | 
|---|
|  |  |  | <template slot-scope="{row}"> | 
|---|
|  |  |  | 
|---|
|  |  |  | <el-table-column prop="memberName" label="姓名" min-width="100px"></el-table-column> | 
|---|
|  |  |  | <el-table-column prop="memberPhone" label="手机号" min-width="100px"></el-table-column> | 
|---|
|  |  |  | <el-table-column prop="companyName" label="部门/公司" min-width="100px"></el-table-column> | 
|---|
|  |  |  | <el-table-column prop="remark" label="备注" min-width="100px"></el-table-column> | 
|---|
|  |  |  | <el-table-column prop="remark" label="有效期" min-width="100px"> | 
|---|
|  |  |  | <el-table-column prop="startTime" label="有效期" min-width="100px"> | 
|---|
|  |  |  | <template slot-scope="{row}"> | 
|---|
|  |  |  | <span>{{validity(row.startTime, row.endTime)}}</span> | 
|---|
|  |  |  | <!--                        <span v-if="!row.startTime || !row.endTime">长期</span>--> | 
|---|
|  |  |  | <!--                        <span v-else>{{row.startTime}} 至 {{row.endTime}}</span>--> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | </el-table-column> | 
|---|
|  |  |  | <el-table-column prop="startTime" label="状态" min-width="100px"> | 
|---|
|  |  |  | <template slot-scope="{row}"> | 
|---|
|  |  |  | <div v-if="row.isdeleted==1"  style="color: red">已删除</div> | 
|---|
|  |  |  | <div v-else style="color: green"> | 
|---|
|  |  |  | <span v-if="row.hkStatus==0"  style="color: #435EBE">待下发</span> | 
|---|
|  |  |  | <span v-if="row.hkStatus==1"  style="color: green">下发成功</span> | 
|---|
|  |  |  | <span v-if="row.hkStatus==2"  style="color: red">下发失败</span> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | </el-table-column> | 
|---|
|  |  |  | <el-table-column prop="remark" label="备注" min-width="100px"> | 
|---|
|  |  |  | <template slot-scope="{row}"> | 
|---|
|  |  |  | <span v-if="row.isdeleted !=2">{{row.remark}}</span> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | </el-table-column> | 
|---|
|  |  |  | <el-table-column prop="createDate" label="创建时间" min-width="100px"></el-table-column> | 
|---|
|  |  |  | <el-table-column | 
|---|
|  |  |  | v-if="containPermissions(['business:member:update', 'business:member:delete'])" | 
|---|
|  |  |  | label="操作" | 
|---|
|  |  |  | min-width="120" | 
|---|
|  |  |  | fixed="right" | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <template slot-scope="{row}"> | 
|---|
|  |  |  | <!--                        <el-button type="text" @click="$refs.operaCarsWindow.open('编辑车辆信息表', row)" icon="el-icon-edit" v-permissions="['business:member:update']">编辑</el-button>--> | 
|---|
|  |  |  | <el-button type="text" @click="deleteById(row)" icon="el-icon-delete" v-permissions="['business:member:delete']">删除</el-button> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | </el-table-column> | 
|---|
|  |  |  | <!--                <el-table-column--> | 
|---|
|  |  |  | <!--                    v-if="containPermissions(['business:member:update', 'business:member:delete'])"--> | 
|---|
|  |  |  | <!--                    label="操作"--> | 
|---|
|  |  |  | <!--                    min-width="120"--> | 
|---|
|  |  |  | <!--                    fixed="right"--> | 
|---|
|  |  |  | <!--                >--> | 
|---|
|  |  |  | <!--                    <template slot-scope="{row}">--> | 
|---|
|  |  |  | <!--<!–                        <el-button type="text" @click="$refs.operaCarsWindow.open('编辑车辆信息表', row)" icon="el-icon-edit" v-permissions="['business:member:update']">编辑</el-button>–>--> | 
|---|
|  |  |  | <!--                        <el-button type="text" @click="deleteById(row)" v-if="row.isdeleted !=1" icon="el-icon-delete" v-permissions="['business:parkbook:delete']">删除</el-button>--> | 
|---|
|  |  |  | <!--<!–--> | 
|---|
|  |  |  | <!--                        <el-button type="text" @click="reUpdate(row)" v-if="row.isdeleted !=1 && row.hkStatus ==0" icon="el-icon-edit" v-permissions="['business:parkbook:update']">立刻下发</el-button>--> | 
|---|
|  |  |  | <!--–>--> | 
|---|
|  |  |  | <!--                    </template>--> | 
|---|
|  |  |  | <!--                </el-table-column>--> | 
|---|
|  |  |  | </el-table> | 
|---|
|  |  |  | <pagination | 
|---|
|  |  |  | @size-change="handleSizeChange" | 
|---|
|  |  |  | 
|---|
|  |  |  | import TableLayout from '@/layouts/TableLayout' | 
|---|
|  |  |  | import Pagination from '@/components/common/Pagination' | 
|---|
|  |  |  | import OperaCarsWindow from '@/components/business/OperaCarsWindow' | 
|---|
|  |  |  | import { validity } from '@/utils/util' | 
|---|
|  |  |  | import { sync } from '@/api/business/cars' | 
|---|
|  |  |  | import { batchLoss } from '@/api/business/memberCard' | 
|---|
|  |  |  | import {reUpdate} from "@/api/business/parkBook"; | 
|---|
|  |  |  | export default { | 
|---|
|  |  |  | name: 'parkBook', | 
|---|
|  |  |  | extends: BaseTable, | 
|---|
|  |  |  | 
|---|
|  |  |  | return { | 
|---|
|  |  |  | // 搜索 | 
|---|
|  |  |  | searchForm: { | 
|---|
|  |  |  | code: '', | 
|---|
|  |  |  | carCode: '', | 
|---|
|  |  |  | memberName: '', | 
|---|
|  |  |  | parksName: '', | 
|---|
|  |  |  | companyName: '' | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | 'field.main': 'id' | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | this.search() | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | methods: { | 
|---|
|  |  |  | validity (startTime, endTime) { | 
|---|
|  |  |  | return validity(startTime, endTime) | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | reUpdate (row) { | 
|---|
|  |  |  | reUpdate({ id: row.id }) | 
|---|
|  |  |  | .then(res => { | 
|---|
|  |  |  | this.$message.success('操作成功') | 
|---|
|  |  |  | this.search() | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | </script> | 
|---|