更新代码,暂提
This commit is contained in:
parent
54f0c80496
commit
6345f7fc70
@ -114,3 +114,29 @@ export function updateShow(id, show){
|
||||
method: "get"
|
||||
})
|
||||
}
|
||||
|
||||
// 查待总检或待出厂检验的工单
|
||||
export function getPageByRole(params){
|
||||
return request({
|
||||
url: preUrl + "/pageByRole",
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 维修总检完成总检
|
||||
export function inspection(data){
|
||||
return request({
|
||||
url: preUrl + "/inspection",
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 服务顾问上传出厂检验日志
|
||||
export function confirm(data){
|
||||
return request({
|
||||
url: preUrl + "/confirm",
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
@ -325,7 +325,7 @@ export default {
|
||||
data.model = data.spec
|
||||
break
|
||||
case "part":
|
||||
data.itemStatus = "08"
|
||||
data.itemStatus = "03"
|
||||
break
|
||||
case "other":
|
||||
data.itemStatus = "06"
|
||||
|
@ -16,8 +16,8 @@
|
||||
<el-tab-pane label="退料确认" name="finishBackWares" v-if="userRole === 'repair_staff'">
|
||||
<GetAndBackWares :type="false" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="待总检工单" name="unInspection" v-if="userRole === 'general_inspection'">
|
||||
<TicketManagerItem :user-role="userRole" :is-finish="false"/>
|
||||
<el-tab-pane :label="userRole === 'service_advisor' ? '可交车工单' : '待总检工单'" name="unInspection" v-if="userRole !== 'repair_staff'">
|
||||
<TicketFinishManager :user-role="userRole" />
|
||||
</el-tab-pane>
|
||||
<!-- <el-tab-pane label="退料申请单" name="backApply">-->
|
||||
<!-- <TicketWares :type="false" :user-role="userRole"/>-->
|
||||
@ -31,10 +31,11 @@ import TicketManagerItem from "@/views/repair/tickets/Components/TicketManagerIt
|
||||
import {getUserRole} from "@/api/repair/tickets/Tickets";
|
||||
import TicketWares from "@/views/repair/tickets/Components/TicketWares.vue";
|
||||
import GetAndBackWares from "@/views/repair/tickets/form/GetAndBackWares.vue";
|
||||
import TicketFinishManager from "@/views/repair/tickets/form/TicketFinishManager.vue";
|
||||
|
||||
export default {
|
||||
name: "TicketManager",
|
||||
components: {GetAndBackWares, TicketWares, TicketManagerItem},
|
||||
components: {TicketFinishManager, GetAndBackWares, TicketWares, TicketManagerItem},
|
||||
data() {
|
||||
return {
|
||||
activeTab: 'unFinish',
|
||||
|
204
src/views/repair/tickets/form/TicketFinishManager.vue
Normal file
204
src/views/repair/tickets/form/TicketFinishManager.vue
Normal file
@ -0,0 +1,204 @@
|
||||
<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">
|
||||
<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="200">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-view" @click="handleShow(scope.row)"
|
||||
>查看
|
||||
</el-button>
|
||||
|
||||
<el-button v-if="!(userRole === 'service_advisor' && scope.row.ticketsWorkStatus === '03')" size="mini" type="text" icon="el-icon-edit-outline" @click="handleDispose(scope.row)">
|
||||
处理
|
||||
</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-refresh" v-if="scope.row.ticketStatus !== '03'" @click="handleReTake(scope.row)">
|
||||
重新指派
|
||||
</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-finished" v-if="userRole === 'service_advisor' && scope.row.ticketsWorkStatus === '03'">
|
||||
通知客户取车
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页组件 -->
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<TicketsShow ref="ticketsShow" :user-role="userRole"/>
|
||||
|
||||
<el-dialog :title="userRole === 'service_advisor' ? '出厂检验' : '总检'" :visible.sync="dialogVisible" width="60%" v-dialogDrag append-to-body >
|
||||
<el-form :model="formData" ref="formRef" :rules="formRules" :loading="formLoading" :inline="true"
|
||||
label-width="15rem">
|
||||
<el-row :gutter="1">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="描述" prop="remark">
|
||||
<el-input style="width: 30rem" type="textarea" v-model="formData.remark"
|
||||
:autosize="{ minRows: 4, maxRows: 8}"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="1">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="附件" prop="image">
|
||||
<!-- <FileUpload v-model="formData.image" />-->
|
||||
<ImageUpload v-model="formData.image"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" v-if="userRole === 'service_advisor'" @click="handleConfirm">
|
||||
确定
|
||||
</el-button>
|
||||
<el-button type="success" v-if="userRole === 'general_inspection'" @click="handleFinish">
|
||||
确定并完成工单
|
||||
</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<UpdateRepair ref="updateRepair" @success="getList"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getPageByRole, inspection, confirm} from "@/api/repair/tickets/Tickets";
|
||||
import TicketsShow from "@/views/repair/tickets/Components/TicketsShow.vue";
|
||||
import UpdateRepair from "@/views/repair/tickets/form/UpdateRepair.vue";
|
||||
|
||||
export default {
|
||||
name: "TicketFinishManager",
|
||||
components: {UpdateRepair, TicketsShow},
|
||||
props:{
|
||||
userRole: String
|
||||
},
|
||||
data(){
|
||||
return{
|
||||
queryParams:{
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
ticketNo: null,
|
||||
searchTimeArray: [],
|
||||
},
|
||||
showSearch: true,
|
||||
loading: false,
|
||||
list: [],
|
||||
total: 0,
|
||||
dialogVisible: false,
|
||||
formData:{
|
||||
image: null,
|
||||
remark: null,
|
||||
id: null
|
||||
},
|
||||
formRules:{},
|
||||
formLoading:{}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
},
|
||||
methods:{
|
||||
async getList(){
|
||||
try {
|
||||
this.loading = true
|
||||
const res = await getPageByRole(this.queryParams)
|
||||
this.list = res.data.records
|
||||
this.total = res.data.total
|
||||
}finally {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
handleQuery(){
|
||||
this.queryParams.pageNo = 1
|
||||
this.getList()
|
||||
},
|
||||
resetQuery(){
|
||||
this.resetForm('queryForm')
|
||||
this.handleQuery()
|
||||
},
|
||||
handleShow(row){
|
||||
this.formData = {
|
||||
image: null,
|
||||
remark: null,
|
||||
id: null
|
||||
}
|
||||
this.$refs.ticketsShow.open(row)
|
||||
},
|
||||
handleDispose(row){
|
||||
this.formData.id = row.id
|
||||
this.dialogVisible = true
|
||||
},
|
||||
async handleFinish(){
|
||||
try {
|
||||
if (this.formData.image){
|
||||
const data = this.formData.image.split(",")
|
||||
this.formData.image = data.map(item => {
|
||||
return item.replace(process.env.VUE_APP_FILE_API, "")
|
||||
}).join(",")
|
||||
}
|
||||
await inspection(this.formData)
|
||||
this.dialogVisible = false
|
||||
this.$modal.msgSuccess("操作成功")
|
||||
await this.getList()
|
||||
}catch{}
|
||||
},
|
||||
async handleConfirm(){
|
||||
try {
|
||||
if (this.formData.image){
|
||||
const data = this.formData.image.split(",")
|
||||
this.formData.image = data.map(item => {
|
||||
return item.replace(process.env.VUE_APP_FILE_API, "")
|
||||
}).join(",")
|
||||
}
|
||||
await confirm(this.formData)
|
||||
this.dialogVisible = false
|
||||
this.$modal.msgSuccess("操作成功")
|
||||
await this.getList()
|
||||
}catch{}
|
||||
},
|
||||
handleReTake(row){
|
||||
this.$refs.updateRepair.open(row)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
</style>
|
Loading…
Reference in New Issue
Block a user