2024-10-12 20:06:56 +08:00
|
|
|
<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="开始日期"
|
2024-10-12 20:20:34 +08:00
|
|
|
end-placeholder="结束日期"/>
|
2024-10-12 20:06:56 +08:00
|
|
|
</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">
|
|
|
|
<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>
|
2024-10-12 20:20:34 +08:00
|
|
|
<el-button size="mini" type="text" icon="el-icon-document-add" @click="handleGet(scope.row)">
|
|
|
|
申请领料
|
|
|
|
</el-button>
|
2024-10-12 20:06:56 +08:00
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table>
|
|
|
|
<!-- 分页组件 -->
|
|
|
|
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
|
|
|
|
@pagination="listTickets"
|
|
|
|
/>
|
2024-10-12 20:20:34 +08:00
|
|
|
<TicketsShow ref="ticketsShow"/>
|
2024-10-12 20:06:56 +08:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import {getPageType} from "@/api/repair/tickets/Tickets";
|
2024-10-12 20:20:34 +08:00
|
|
|
import TicketsShow from "@/views/repair/tickets/Components/TicketsShow.vue";
|
2024-10-12 20:06:56 +08:00
|
|
|
|
|
|
|
export default {
|
|
|
|
name: "TicketManagerItem",
|
2024-10-12 20:20:34 +08:00
|
|
|
components: {TicketsShow},
|
|
|
|
props: {
|
|
|
|
isFinish: {
|
2024-10-12 20:06:56 +08:00
|
|
|
type: Boolean,
|
|
|
|
}
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
queryParams: {
|
2024-10-12 20:20:34 +08:00
|
|
|
pageNo: 1,
|
|
|
|
pageSize: 10,
|
2024-10-12 20:06:56 +08:00
|
|
|
ticketNo: null,
|
|
|
|
searchTimeArray: [],
|
|
|
|
isFinish: this.isFinish ? "1" : "0"
|
|
|
|
},
|
|
|
|
showSearch: true,
|
|
|
|
loading: false,
|
|
|
|
list: [],
|
|
|
|
total: 0
|
|
|
|
}
|
|
|
|
},
|
|
|
|
mounted() {
|
2024-10-12 20:20:34 +08:00
|
|
|
this.listTickets()
|
2024-10-12 20:06:56 +08:00
|
|
|
},
|
2024-10-12 20:20:34 +08:00
|
|
|
methods: {
|
|
|
|
async listTickets() {
|
|
|
|
try {
|
|
|
|
this.loading = true
|
|
|
|
const res = await getPageType(this.queryParams)
|
|
|
|
if (res.data) {
|
|
|
|
this.list = res.data.records
|
|
|
|
this.total = res.data.total
|
|
|
|
}
|
|
|
|
}finally {
|
|
|
|
this.loading = false
|
2024-10-12 20:06:56 +08:00
|
|
|
}
|
|
|
|
},
|
2024-10-12 20:20:34 +08:00
|
|
|
handleQuery() {
|
|
|
|
this.queryParams.pageNo = 1
|
|
|
|
this.listTickets()
|
2024-10-12 20:06:56 +08:00
|
|
|
},
|
2024-10-12 20:20:34 +08:00
|
|
|
resetQuery() {
|
|
|
|
this.resetForm('queryForm')
|
|
|
|
this.handleQuery()
|
|
|
|
},
|
|
|
|
handleShow(row) {
|
|
|
|
this.$refs.ticketsShow.open(row)
|
2024-10-12 20:06:56 +08:00
|
|
|
},
|
2024-10-12 20:20:34 +08:00
|
|
|
handleGet(row){
|
2024-10-12 20:06:56 +08:00
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
|
|
|
|
</style>
|