114 lines
3.4 KiB
Vue
114 lines
3.4 KiB
Vue
![]() |
<template>
|
||
|
<div>
|
||
|
<!-- 搜索 -->
|
||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px">
|
||
|
<el-form-item label="关键字" prop="ticketNo">
|
||
|
<el-input style="width: 20rem" type="text" placeholder="工单号、车牌号、联系电话" v-model="queryParams.ticketNo"/>
|
||
|
</el-form-item>
|
||
|
<el-form-item label="时间" prop="searchTimeArray">
|
||
|
<el-date-picker
|
||
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||
|
v-model="queryParams.searchTimeArray"
|
||
|
type="daterange"
|
||
|
range-separator="至"
|
||
|
start-placeholder="开始日期"
|
||
|
end-placeholder="结束日期" />
|
||
|
</el-form-item>
|
||
|
<el-form-item>
|
||
|
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||
|
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||
|
</el-form-item>
|
||
|
</el-form>
|
||
|
<!-- 操作 -->
|
||
|
<el-row :gutter="10" class="mb8">
|
||
|
<!-- todo 待补充 -->
|
||
|
<right-toolbar :showSearch.sync="showSearch"></right-toolbar>
|
||
|
</el-row>
|
||
|
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
||
|
<el-table-column label="序号" align="center">
|
||
|
<template scope="scope">
|
||
|
<span>{{ scope.$index + 1 }}</span>
|
||
|
</template>
|
||
|
</el-table-column>
|
||
|
<el-table-column label="订单编号" align="center" prop="ticketNo" width="200"/>
|
||
|
<el-table-column label="维修类别" align="center" prop="repairType" width="180">
|
||
|
<template slot-scope="scope">
|
||
|
<dict-tag :type="DICT_TYPE.REPAIR_TYPE" v-model="scope.row.repairType"/>
|
||
|
</template>
|
||
|
</el-table-column>
|
||
|
<el-table-column label="客户名称" align="center" prop="userName" width="180"/>
|
||
|
<el-table-column label="车牌号" align="center" prop="carNo" width="180"/>
|
||
|
<el-table-column label="车系" align="center" prop="carBrandName" width="180"/>
|
||
|
<el-table-column label="手机号" align="center" prop="userMobile" width="180"/>
|
||
|
<el-table-column label="操作" fixed="right" align="center" width="180">
|
||
|
<template slot-scope="scope">
|
||
|
<el-button size="mini" type="text" icon="el-icon-view" @click="handleShow(scope.row)"
|
||
|
>查看
|
||
|
</el-button>
|
||
|
</template>
|
||
|
</el-table-column>
|
||
|
</el-table>
|
||
|
<!-- 分页组件 -->
|
||
|
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
|
||
|
@pagination="listTickets"
|
||
|
/>
|
||
|
</div>
|
||
|
</template>
|
||
|
|
||
|
<script>
|
||
|
import {getPageType} from "@/api/repair/tickets/Tickets";
|
||
|
|
||
|
export default {
|
||
|
name: "TicketManagerItem",
|
||
|
props:{
|
||
|
// 是否展示了页面,是才请求
|
||
|
isShow:{
|
||
|
type: Boolean,
|
||
|
},
|
||
|
isFinish:{
|
||
|
type: Boolean,
|
||
|
}
|
||
|
},
|
||
|
data() {
|
||
|
return {
|
||
|
queryParams: {
|
||
|
ticketNo: null,
|
||
|
searchTimeArray: [],
|
||
|
isFinish: this.isFinish ? "1" : "0"
|
||
|
},
|
||
|
showSearch: true,
|
||
|
loading: false,
|
||
|
list: [],
|
||
|
total: 0
|
||
|
}
|
||
|
},
|
||
|
mounted() {
|
||
|
if(this.isShow){
|
||
|
this.listTickets()
|
||
|
}
|
||
|
},
|
||
|
methods:{
|
||
|
async listTickets(){
|
||
|
const res = await getPageType(this.queryParams)
|
||
|
if (res.data){
|
||
|
this.list = res.data.records
|
||
|
this.total = res.data.total
|
||
|
}
|
||
|
},
|
||
|
handleQuery(){
|
||
|
|
||
|
},
|
||
|
resetQuery(){
|
||
|
|
||
|
},
|
||
|
handleShow(row){
|
||
|
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
</script>
|
||
|
|
||
|
<style scoped lang="scss">
|
||
|
|
||
|
</style>
|