Compare commits
2 Commits
c8751f07c9
...
2c037d5a49
Author | SHA1 | Date | |
---|---|---|---|
![]() |
2c037d5a49 | ||
![]() |
deff2195f3 |
@ -44,24 +44,32 @@
|
|||||||
<el-button size="mini" type="text" icon="el-icon-view" @click="handleShow(scope.row)"
|
<el-button size="mini" type="text" icon="el-icon-view" @click="handleShow(scope.row)"
|
||||||
>查看
|
>查看
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button v-if="scope.row.ticketsWorkStatus === '01' && userRole === 'repair_staff'" size="mini" type="text" icon="el-icon-check" @click="handleTake(scope.row)">
|
<el-button
|
||||||
|
v-if="(scope.row.ticketsWorkStatus === '01' && userRole === 'repair_staff') && nowUser.id === scope.row.nowRepairId"
|
||||||
|
size="mini" type="text" icon="el-icon-check" @click="handleTake(scope.row)">
|
||||||
接单
|
接单
|
||||||
</el-button>
|
</el-button>
|
||||||
<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" v-if="scope.row.ticketsWorkStatus !== '01' &&userRole === 'repair_staff' && !isFinish" type="text" icon="el-icon-monitor" @click="handleRecord(scope.row, 'kssg')">
|
<el-button size="mini"
|
||||||
|
v-if="scope.row.ticketsWorkStatus !== '01' &&userRole === 'repair_staff' && !isFinish && nowUser.id === scope.row.nowRepairId"
|
||||||
|
type="text" icon="el-icon-monitor" @click="handleRecord(scope.row, 'kssg')">
|
||||||
开始施工
|
开始施工
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button size="mini" v-if=" scope.row.ticketsWorkStatus !== '01' && userRole === 'repair_staff' && !isFinish" type="text" icon="el-icon-monitor" @click="handleRecord(scope.row, 'sgz')">
|
<el-button size="mini"
|
||||||
|
v-if=" scope.row.ticketsWorkStatus !== '01' && userRole === 'repair_staff' && !isFinish && nowUser.id === scope.row.nowRepairId"
|
||||||
|
type="text" icon="el-icon-monitor" @click="handleRecord(scope.row, 'sgz')">
|
||||||
过程记录
|
过程记录
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button size="mini" v-if="scope.row.ticketsWorkStatus !== '01' && userRole === 'repair_staff' && !isFinish" type="text" icon="el-icon-monitor" @click="handleRecord(scope.row, 'sgwczj')">
|
<el-button size="mini"
|
||||||
|
v-if="scope.row.ticketsWorkStatus !== '01' && userRole === 'repair_staff' && !isFinish && nowUser.id === scope.row.nowRepairId"
|
||||||
|
type="text" icon="el-icon-monitor" @click="handleRecord(scope.row, 'sgwczj')">
|
||||||
施工完成
|
施工完成
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button @click="handleRecord(scope.row, 'zj')" size="mini" type="text" icon="el-icon-monitor" v-if="userRole === 'general_inspection' && scope.row.ticketsWorkStatus === '05'">
|
<!-- <el-button @click="handleRecord(scope.row, 'zj')" size="mini" type="text" icon="el-icon-monitor" v-if="userRole === 'general_inspection' && scope.row.ticketsWorkStatus === '05'">-->
|
||||||
终检
|
<!-- 终检-->
|
||||||
</el-button>
|
<!-- </el-button>-->
|
||||||
<el-button @click="handleReTake(scope.row)" size="mini" type="text" icon="el-icon-refresh" v-if="(userRole === 'repair_staff' ? leader : false) && !(scope.row.ticketsWorkStatus !== '01' && userRole === 'repair_staff' && !isFinish)">
|
<el-button @click="handleReTake(scope.row)" size="mini" type="text" icon="el-icon-refresh" v-if="(userRole === 'repair_staff' ? leader : false) && !(scope.row.ticketsWorkStatus !== '01' && userRole === 'repair_staff' && !isFinish)">
|
||||||
重新指派
|
重新指派
|
||||||
</el-button>
|
</el-button>
|
||||||
@ -142,6 +150,7 @@ 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";
|
import UpdateRecord from "@/views/repair/tickets/form/UpdateRecord.vue";
|
||||||
|
import {getUserProfile} from "@/api/system/user";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "TicketManagerItem",
|
name: "TicketManagerItem",
|
||||||
@ -180,13 +189,19 @@ export default {
|
|||||||
formData: {},
|
formData: {},
|
||||||
remark: null,
|
remark: null,
|
||||||
leader: false,
|
leader: false,
|
||||||
|
nowUser: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.listTickets()
|
this.listTickets()
|
||||||
this.isLeader()
|
this.isLeader()
|
||||||
|
this.getNowUser()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
async getNowUser(){
|
||||||
|
const res = await getUserProfile()
|
||||||
|
this.nowUser = res.data
|
||||||
|
},
|
||||||
async isLeader(){
|
async isLeader(){
|
||||||
const res = await getIfLeader()
|
const res = await getIfLeader()
|
||||||
this.leader = res.data
|
this.leader = res.data
|
||||||
|
@ -53,11 +53,11 @@
|
|||||||
<el-button v-if="formData.recordType === 'sgwczj' && projectList.length !== 0" type="primary" @click="doUpdate(null)">
|
<el-button v-if="formData.recordType === 'sgwczj' && projectList.length !== 0" type="primary" @click="doUpdate(null)">
|
||||||
部分完成
|
部分完成
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button v-if="formData.recordType === 'sgwczj' && projectList.length !== 0" type="primary" @click="doFinish">
|
<el-button v-if="formData.recordType === 'sgwczj' && projectList.length !== 0" type="primary" @click="doFinish(true)">
|
||||||
完成并移交下一班组
|
完成并移交下一班组
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button v-if="formData.recordType === 'sgwczj' && !isNext && projectList.length !== 0" type="primary"
|
<el-button v-if="formData.recordType === 'sgwczj' && !isNext && projectList.length !== 0" type="primary"
|
||||||
@click="doFinish">
|
@click="doFinish(false)">
|
||||||
{{ isEndCheck ? "完成并移交总检" : "完成工单" }}
|
{{ isEndCheck ? "完成并移交总检" : "完成工单" }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<!-- <el-button v-if="formData.recordType === 'sgwczj'" type="success" @click="doFinish">-->
|
<!-- <el-button v-if="formData.recordType === 'sgwczj'" type="success" @click="doFinish">-->
|
||||||
@ -190,20 +190,20 @@ export default {
|
|||||||
} catch {
|
} catch {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async doFinish() {
|
async doFinish(flag) {
|
||||||
try {
|
try {
|
||||||
await this.$refs.formRef.validate()
|
await this.$refs.formRef.validate()
|
||||||
this.formLoading = true
|
this.formLoading = true
|
||||||
// 不论是什么按钮,这个工单子项是完了的
|
// 不论是什么按钮,这个工单子项是完了的
|
||||||
this.formData.item.itemStatus = "03"
|
this.formData.item.itemStatus = "03"
|
||||||
// 整体完成并指派下一个人
|
// 整体完成并指派下一个人
|
||||||
if (this.isNext) {
|
if (this.isNext || flag) {
|
||||||
this.formData['finishType'] = "01"
|
this.formData['finishType'] = "01"
|
||||||
await this.$refs.updateRepair.open(this.clickRow)
|
await this.$refs.updateRepair.open(this.clickRow)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// 整体完成并移交总检
|
// 整体完成并移交总检
|
||||||
if (this.isEndCheck) {
|
if (this.isEndCheck || !flag) {
|
||||||
this.formData['finishType'] = "02"
|
this.formData['finishType'] = "02"
|
||||||
this.formData.ticketsWorkStatus = "05"
|
this.formData.ticketsWorkStatus = "05"
|
||||||
await this.doUpdate();
|
await this.doUpdate();
|
||||||
|
Loading…
Reference in New Issue
Block a user