开始施工、施工过程记录
This commit is contained in:
parent
c9b026d327
commit
058e72627c
@ -97,3 +97,12 @@ export function updateRepair(data){
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 更新工单状态
|
||||||
|
export function updateStatus(data){
|
||||||
|
return request({
|
||||||
|
url: preUrl + "/updateStatus",
|
||||||
|
method: "post",
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
@ -1 +1,20 @@
|
|||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
const preUrl = '/repair/titem'
|
||||||
|
|
||||||
|
// 维修工单子表 分页
|
||||||
|
export function getTItemPage(params){
|
||||||
|
return request({
|
||||||
|
url: preUrl + "/page",
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取当前操作人操作的工单中的项目
|
||||||
|
export function getProjectList(ticketId){
|
||||||
|
return request({
|
||||||
|
url: preUrl + "/listProject?ticketId=" + ticketId,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
@ -50,6 +50,15 @@
|
|||||||
<el-button v-if="userRole === 'service_advisor' && scope.row.ticketsWorkStatus === '01'" size="mini" type="text" icon="el-icon-check" @click="handleNotify(scope.row)">
|
<el-button v-if="userRole === 'service_advisor' && scope.row.ticketsWorkStatus === '01'" size="mini" type="text" icon="el-icon-check" @click="handleNotify(scope.row)">
|
||||||
通知施工
|
通知施工
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<el-button size="mini" type="text" icon="el-icon-monitor" @click="handleRecord(scope.row, 'sgz')">
|
||||||
|
过程记录
|
||||||
|
</el-button>
|
||||||
|
<el-button size="mini" type="text" icon="el-icon-monitor" @click="handleRecord(scope.row, 'kssg')">
|
||||||
|
开始施工
|
||||||
|
</el-button>
|
||||||
|
<el-button size="mini" type="text" icon="el-icon-monitor" @click="handleRecord(scope.row, 'sgwczj')">
|
||||||
|
施工完成
|
||||||
|
</el-button>
|
||||||
<el-dropdown @command="(command) => handleCommand(command, scope.$index, scope.row)">
|
<el-dropdown @command="(command) => handleCommand(command, scope.$index, scope.row)">
|
||||||
<el-button size="mini" type="text" icon="el-icon-d-arrow-right">更多</el-button>
|
<el-button size="mini" type="text" icon="el-icon-d-arrow-right">更多</el-button>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
@ -77,6 +86,7 @@
|
|||||||
<TicketsShow ref="ticketsShow"/>
|
<TicketsShow ref="ticketsShow"/>
|
||||||
<UpdateRepair ref="updateRepair" @success="listTickets"/>
|
<UpdateRepair ref="updateRepair" @success="listTickets"/>
|
||||||
<TWOperate ref="twOperate" @success="listTickets"/>
|
<TWOperate ref="twOperate" @success="listTickets"/>
|
||||||
|
<UpdateRecord ref="updateRecord" @success="listTickets" />
|
||||||
|
|
||||||
<el-dialog title="退料申请" :visible.sync="backVisible" width="60%" v-dialogDrag append-to-body>
|
<el-dialog title="退料申请" :visible.sync="backVisible" width="60%" v-dialogDrag append-to-body>
|
||||||
<el-table v-loading="backLoading" :data="partList" :stripe="true" :show-overflow-tooltip="true"
|
<el-table v-loading="backLoading" :data="partList" :stripe="true" :show-overflow-tooltip="true"
|
||||||
@ -123,10 +133,11 @@ import {listTwItem} from "@/api/repair/tickets/TWItem";
|
|||||||
import {createUniqueCodeByHead} from "@/utils/createUniqueCode";
|
import {createUniqueCodeByHead} from "@/utils/createUniqueCode";
|
||||||
import {updateTicketWares} from "@/api/repair/tickets/TicketWares";
|
import {updateTicketWares} from "@/api/repair/tickets/TicketWares";
|
||||||
import {getIfLeader} from "@/api/repair/repairworker";
|
import {getIfLeader} from "@/api/repair/repairworker";
|
||||||
|
import UpdateRecord from "@/views/repair/tickets/form/UpdateRecord.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "TicketManagerItem",
|
name: "TicketManagerItem",
|
||||||
components: {TWOperate, UpdateRepair, TicketsShow},
|
components: {UpdateRecord, TWOperate, UpdateRepair, TicketsShow},
|
||||||
props: {
|
props: {
|
||||||
isFinish: {
|
isFinish: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
@ -340,6 +351,13 @@ export default {
|
|||||||
this.backVisible = false
|
this.backVisible = false
|
||||||
this.$modal.msgSuccess("申请成功");
|
this.$modal.msgSuccess("申请成功");
|
||||||
await this.listTickets()
|
await this.listTickets()
|
||||||
|
},
|
||||||
|
handleRecord(row, type){
|
||||||
|
row = {
|
||||||
|
...row,
|
||||||
|
clickType: type
|
||||||
|
}
|
||||||
|
this.$refs.updateRecord.open(row)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-row :gutter="24">
|
<el-row :gutter="24">
|
||||||
<el-col :span="17" style="padding-right: 0">
|
<!-- <el-col :span="17" style="padding-right: 0">-->
|
||||||
|
<el-col :span="24" style="padding-right: 0">
|
||||||
<el-card class="top-left">
|
<el-card class="top-left">
|
||||||
<el-descriptions class="margin-top" :column="3" :size="'mini'" border>
|
<el-descriptions class="margin-top" :column="3" :size="'mini'" border>
|
||||||
<template slot="extra">
|
<template slot="extra">
|
||||||
@ -111,52 +112,52 @@
|
|||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="7" style="padding-left: 0">
|
<!-- <el-col :span="7" style="padding-left: 0">-->
|
||||||
<el-card style="margin-left: 0">
|
<!-- <el-card style="margin-left: 0">-->
|
||||||
<div slot="header" class="clearfix">
|
<!-- <div slot="header" class="clearfix">-->
|
||||||
<span style="font-weight: bold; font-size: 16px;"> 会员卡券</span>
|
<!-- <span style="font-weight: bold; font-size: 16px;"> 会员卡券</span>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<el-table
|
<!-- <el-table-->
|
||||||
:data="couponList"
|
<!-- :data="couponList"-->
|
||||||
border
|
<!-- border-->
|
||||||
size="mini"
|
<!-- size="mini"-->
|
||||||
height="270"
|
<!-- height="270"-->
|
||||||
style="width: 100%">
|
<!-- style="width: 100%">-->
|
||||||
<el-table-column prop="couponName" label="卡券名称"/>
|
<!-- <el-table-column prop="couponName" label="卡券名称"/>-->
|
||||||
<el-table-column label="卡券类型" width="80" align="center" prop="couponType">
|
<!-- <el-table-column label="卡券类型" width="80" align="center" prop="couponType">-->
|
||||||
<template v-slot="scope">
|
<!-- <template v-slot="scope">-->
|
||||||
<dict-tag :type="DICT_TYPE.MEMBER_COUPON_TYPE" :value="scope.row.couponType"/>
|
<!-- <dict-tag :type="DICT_TYPE.MEMBER_COUPON_TYPE" :value="scope.row.couponType"/>-->
|
||||||
</template>
|
<!-- </template>-->
|
||||||
</el-table-column>
|
<!-- </el-table-column>-->
|
||||||
<el-table-column label="剩余金额/次数" width="120" align="right" prop="balance">
|
<!-- <el-table-column label="剩余金额/次数" width="120" align="right" prop="balance">-->
|
||||||
<template v-slot="scope">
|
<!-- <template v-slot="scope">-->
|
||||||
{{ scope.row.balance }}{{ scope.row.outRule == 'mehx' ? '元' : '次' }}
|
<!-- {{ scope.row.balance }}{{ scope.row.outRule == 'mehx' ? '元' : '次' }}-->
|
||||||
</template>
|
<!-- </template>-->
|
||||||
</el-table-column>
|
<!-- </el-table-column>-->
|
||||||
<el-table-column label="适用车型" width="80" align="center" prop="carModel">
|
<!-- <el-table-column label="适用车型" width="80" align="center" prop="carModel">-->
|
||||||
<template v-slot="scope">
|
<!-- <template v-slot="scope">-->
|
||||||
<span v-if="scope.row.carModel == null">不限</span>
|
<!-- <span v-if="scope.row.carModel == null">不限</span>-->
|
||||||
<dict-tag :type="DICT_TYPE.MEMBER_CAR" :value="scope.row.carModel"/>
|
<!-- <dict-tag :type="DICT_TYPE.MEMBER_CAR" :value="scope.row.carModel"/>-->
|
||||||
</template>
|
<!-- </template>-->
|
||||||
</el-table-column>
|
<!-- </el-table-column>-->
|
||||||
<el-table-column label="核销规则" width="100" align="center" prop="outRule">
|
<!-- <el-table-column label="核销规则" width="100" align="center" prop="outRule">-->
|
||||||
<template v-slot="scope">
|
<!-- <template v-slot="scope">-->
|
||||||
<dict-tag :type="DICT_TYPE.MEMBER_COUPON_OUT_RULE" :value="scope.row.outRule"/>
|
<!-- <dict-tag :type="DICT_TYPE.MEMBER_COUPON_OUT_RULE" :value="scope.row.outRule"/>-->
|
||||||
</template>
|
<!-- </template>-->
|
||||||
</el-table-column>
|
<!-- </el-table-column>-->
|
||||||
<el-table-column label="开始有效期" align="center" prop="beginTime" width="150">
|
<!-- <el-table-column label="开始有效期" align="center" prop="beginTime" width="150">-->
|
||||||
<template v-slot="scope">
|
<!-- <template v-slot="scope">-->
|
||||||
<span>{{ parseTime(scope.row.beginTime) }}</span>
|
<!-- <span>{{ parseTime(scope.row.beginTime) }}</span>-->
|
||||||
</template>
|
<!-- </template>-->
|
||||||
</el-table-column>
|
<!-- </el-table-column>-->
|
||||||
<el-table-column label="结束有效期" align="center" prop="endTime" width="150">
|
<!-- <el-table-column label="结束有效期" align="center" prop="endTime" width="150">-->
|
||||||
<template v-slot="scope">
|
<!-- <template v-slot="scope">-->
|
||||||
<span>{{ parseTime(scope.row.endTime) }}</span>
|
<!-- <span>{{ parseTime(scope.row.endTime) }}</span>-->
|
||||||
</template>
|
<!-- </template>-->
|
||||||
</el-table-column>
|
<!-- </el-table-column>-->
|
||||||
</el-table>
|
<!-- </el-table>-->
|
||||||
</el-card>
|
<!-- </el-card>-->
|
||||||
</el-col>
|
<!-- </el-col>-->
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="5" style="margin-bottom: 1rem">
|
<el-row :gutter="5" style="margin-bottom: 1rem">
|
||||||
<el-col v-if="createTicketType" :span="4.8">
|
<el-col v-if="createTicketType" :span="4.8">
|
||||||
|
130
src/views/repair/tickets/form/UpdateRecord.vue
Normal file
130
src/views/repair/tickets/form/UpdateRecord.vue
Normal file
@ -0,0 +1,130 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-dialog title="流程记录" :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="item.id">
|
||||||
|
<el-select style="width: 20rem" v-model="formData.item.id" >
|
||||||
|
<el-option v-for="item in projectList" :key="item.id" :label="item.itemName" :value="item.id" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<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" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="doUpdate">确 定</el-button>
|
||||||
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {getProjectList} from "@/api/repair/tickets/TicketsItem";
|
||||||
|
import {updateStatus} from "@/api/repair/tickets/Tickets";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "UpdateRecord",
|
||||||
|
data(){
|
||||||
|
return {
|
||||||
|
dialogVisible: false,
|
||||||
|
formData:{
|
||||||
|
// 主表信息
|
||||||
|
id: null,
|
||||||
|
ticketsWorkStatus: null,
|
||||||
|
remark: null,
|
||||||
|
// 子表信息
|
||||||
|
item:{
|
||||||
|
id: null,
|
||||||
|
itemStatus: null,
|
||||||
|
},
|
||||||
|
// 记录信息
|
||||||
|
image: null,
|
||||||
|
recordType: null,
|
||||||
|
},
|
||||||
|
formRules:{
|
||||||
|
'item.id':[{required: true, message: "维修项目不能为空", trigger: 'blur'}]
|
||||||
|
},
|
||||||
|
formLoading: false,
|
||||||
|
projectList: [],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
init(){
|
||||||
|
this.formData = {
|
||||||
|
// 主表信息
|
||||||
|
id: null,
|
||||||
|
ticketsWorkStatus: null,
|
||||||
|
remark: null,
|
||||||
|
// 子表信息
|
||||||
|
item:{
|
||||||
|
id: null,
|
||||||
|
itemStatus: null,
|
||||||
|
},
|
||||||
|
// 记录信息
|
||||||
|
image: null,
|
||||||
|
recordType: null,
|
||||||
|
}
|
||||||
|
this.projectList = []
|
||||||
|
},
|
||||||
|
async open(row){
|
||||||
|
this.init()
|
||||||
|
this.formData.id = row.id
|
||||||
|
this.formData.recordType = row.clickType
|
||||||
|
await this.listProject(row.id)
|
||||||
|
this.dialogVisible = true
|
||||||
|
},
|
||||||
|
async listProject(ticketId){
|
||||||
|
try {
|
||||||
|
this.formLoading = true
|
||||||
|
const res = await getProjectList(ticketId)
|
||||||
|
this.projectList = res.data
|
||||||
|
console.log(this.formData.recordType)
|
||||||
|
if (this.formData.recordType === 'kssg') {
|
||||||
|
this.formData.ticketsWorkStatus = "02"
|
||||||
|
this.formData.item.itemStatus = "02"
|
||||||
|
this.projectList = this.projectList.filter(item => item.itemStatus === '01')
|
||||||
|
}else if (this.formData.recordType === 'sgz'){
|
||||||
|
this.formData.ticketsWorkStatus = "02"
|
||||||
|
this.formData.item.itemStatus = "02"
|
||||||
|
this.projectList = this.projectList.filter(item => item.itemStatus === '02')
|
||||||
|
}
|
||||||
|
}finally {
|
||||||
|
this.formLoading = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async doUpdate(){
|
||||||
|
try {
|
||||||
|
await this.$refs.formRef.validate()
|
||||||
|
this.formData.image = this.formData.image.map(item => item.url).join(",")
|
||||||
|
this.formLoading = true
|
||||||
|
await updateStatus(this.formData)
|
||||||
|
this.$modal.msgSuccess("操作成功")
|
||||||
|
this.dialogVisible = false
|
||||||
|
this.$emit("success")
|
||||||
|
}catch {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
|
||||||
|
</style>
|
Loading…
Reference in New Issue
Block a user