修改重新派工逻辑
This commit is contained in:
parent
500b41f844
commit
3115710fcb
@ -84,38 +84,35 @@
|
|||||||
type="text" icon="el-icon-monitor" @click="handleRecord(scope.row, 'sgwczj')">
|
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>-->
|
|
||||||
<el-button @click="handleReTake(scope.row)" size="mini" type="text" icon="el-icon-refresh"
|
<el-button @click="handleReTake(scope.row)" size="mini" type="text" icon="el-icon-refresh"
|
||||||
v-if="(userRole === 'repair_staff' ? (leader ? !isFinish : false) : false) && !(scope.row.ticketsWorkStatus !== '01' && userRole === 'repair_staff' && !isFinish)">
|
v-if="userRole !== 'repair_staff'">
|
||||||
重新指派
|
{{userRole === 'service_advisor' ? "修改派工" : "内返派工"}}
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
v-if="userRole === 'repair_staff' && !isFinish && scope.row.ticketsWorkStatus === '01' && !(nowUser.id === scope.row.nowRepairId)"
|
v-if="userRole === 'repair_staff' && !isFinish && scope.row.ticketsWorkStatus === '01' && !(nowUser.id === scope.row.nowRepairId)"
|
||||||
@click="handleGet(scope.row)" size="mini" type="text" icon="el-icon-document-add">
|
@click="handleGet(scope.row)" size="mini" type="text" icon="el-icon-document-add">
|
||||||
申请配件
|
申请配件
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-dropdown
|
<!-- <el-dropdown-->
|
||||||
v-if="(scope.row.ticketsWorkStatus !== '01' && ((userRole === 'service_advisor' || userRole === 'general_inspection') && !isFinish)) || (userRole === 'repair_staff' && !isFinish && scope.row.ticketsWorkStatus !== '01')"
|
<!-- v-if="(scope.row.ticketsWorkStatus !== '01' && ((userRole === 'service_advisor' || userRole === 'general_inspection') && !isFinish)) || (userRole === 'repair_staff' && !isFinish && scope.row.ticketsWorkStatus !== '01')"-->
|
||||||
@command="(command) => handleCommand(command, scope.$index, scope.row)">
|
<!-- @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">-->
|
||||||
<el-dropdown-item v-if="!isFinish && scope.row.ticketsWorkStatus !== '01' && userRole === 'repair_staff'"
|
<!-- <el-dropdown-item v-if="!isFinish && scope.row.ticketsWorkStatus !== '01' && userRole === 'repair_staff'"-->
|
||||||
command="handleGet" size="mini" type="text" icon="el-icon-document-add"
|
<!-- command="handleGet" size="mini" type="text" icon="el-icon-document-add"-->
|
||||||
>申请配件
|
<!-- >申请配件-->
|
||||||
</el-dropdown-item>
|
<!-- </el-dropdown-item>-->
|
||||||
<!-- <el-dropdown-item v-if="scope.row.ticketsWorkStatus !== '01' && userRole === 'repair_staff'" command="handleBack" size="mini" type="text" icon="el-icon-document-delete"-->
|
<!-- <!– <el-dropdown-item v-if="scope.row.ticketsWorkStatus !== '01' && userRole === 'repair_staff'" command="handleBack" size="mini" type="text" icon="el-icon-document-delete"–>-->
|
||||||
<!-- >申请退料-->
|
<!-- <!– >申请退料–>-->
|
||||||
<!-- </el-dropdown-item>-->
|
<!-- <!– </el-dropdown-item>–>-->
|
||||||
<!-- 还要判断是不是员工 -->
|
<!-- <!– 还要判断是不是员工 –>-->
|
||||||
<el-dropdown-item
|
<!-- <el-dropdown-item-->
|
||||||
v-if="userRole !== 'repair_staff' && !isFinish && scope.row.ticketsWorkStatus !== '01'"
|
<!-- v-if="userRole !== 'repair_staff' && !isFinish && scope.row.ticketsWorkStatus !== '01'"-->
|
||||||
command="handleReTake" size="mini" type="text" icon="el-icon-refresh"
|
<!-- command="handleReTake" size="mini" type="text" icon="el-icon-refresh"-->
|
||||||
>重新指派
|
<!-- >{{userRole === 'service_advisor' ? "修改派工" : "内返派工"}}-->
|
||||||
</el-dropdown-item>
|
<!-- </el-dropdown-item>-->
|
||||||
</el-dropdown-menu>
|
<!-- </el-dropdown-menu>-->
|
||||||
</el-dropdown>
|
<!-- </el-dropdown>-->
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@ -124,7 +121,7 @@
|
|||||||
@pagination="listTickets"
|
@pagination="listTickets"
|
||||||
/>
|
/>
|
||||||
<TicketsShow ref="ticketsShow" :user-role="userRole"/>
|
<TicketsShow ref="ticketsShow" :user-role="userRole"/>
|
||||||
<UpdateRepair ref="updateRepair" @success="listTickets"/>
|
<UpdateRepair :user-role="userRole" ref="updateRepair" @success="listTickets"/>
|
||||||
<TWOperate ref="twOperate" @success="listTickets"/>
|
<TWOperate ref="twOperate" @success="listTickets"/>
|
||||||
<UpdateRecord ref="updateRecord" @success="listTickets"/>
|
<UpdateRecord ref="updateRecord" @success="listTickets"/>
|
||||||
|
|
||||||
@ -264,6 +261,9 @@ export default {
|
|||||||
},
|
},
|
||||||
async listTickets() {
|
async listTickets() {
|
||||||
try {
|
try {
|
||||||
|
if (this.userRole === 'general_inspection' && this.queryParams.isFinish !== '1'){
|
||||||
|
this.queryParams['selectType'] = 'all'
|
||||||
|
}
|
||||||
this.loading = true
|
this.loading = true
|
||||||
const res = await getPageType(this.queryParams)
|
const res = await getPageType(this.queryParams)
|
||||||
if (res.data) {
|
if (res.data) {
|
||||||
|
@ -54,7 +54,7 @@
|
|||||||
处理
|
处理
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button size="mini" type="text" icon="el-icon-refresh" v-if="scope.row.ticketsWorkStatus !== '03'" @click="handleReTake(scope.row)">
|
<el-button size="mini" type="text" icon="el-icon-refresh" v-if="scope.row.ticketsWorkStatus !== '03'" @click="handleReTake(scope.row)">
|
||||||
重新指派
|
{{userRole === 'service_advisor' ? "修改派工" : "内返派工"}}
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button size="mini" @click="noticeCus(scope.row)" type="text" icon="el-icon-finished" v-if="userRole === 'service_advisor' && scope.row.ticketsWorkStatus === '03'">
|
<el-button size="mini" @click="noticeCus(scope.row)" type="text" icon="el-icon-finished" v-if="userRole === 'service_advisor' && scope.row.ticketsWorkStatus === '03'">
|
||||||
通知客户取车
|
通知客户取车
|
||||||
@ -128,7 +128,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<UpdateRepair ref="updateRepair" @success="getList"/>
|
<UpdateRepair ref="updateRepair" @success="getList" :user-role="userRole"/>
|
||||||
<EditTickets ref="editTickets" @success="getList"/>
|
<EditTickets ref="editTickets" @success="getList"/>
|
||||||
<RecordSetting ref="recordSet" />
|
<RecordSetting ref="recordSet" />
|
||||||
</div>
|
</div>
|
||||||
|
@ -115,6 +115,35 @@
|
|||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
|
<el-card class="box-card" v-if="userRole === 'general_inspection'">
|
||||||
|
<!-- 卡片头 -->
|
||||||
|
<div slot="header" class="clearfix">
|
||||||
|
<i class="el-icon-plus"/>
|
||||||
|
<span>内返信息</span>
|
||||||
|
</div>
|
||||||
|
<!-- 卡片内容 -->
|
||||||
|
<div>
|
||||||
|
<el-form :inline="true" label-width="30rem" v-model="formData" ref="formRef">
|
||||||
|
<el-row :gutter="1">
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="图片">
|
||||||
|
<ImageUpload v-model="formData.image"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="1">
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="原因">
|
||||||
|
<el-input style="width: 30rem" type="textarea" v-model="formData.remark"
|
||||||
|
:autosize="{ minRows: 4, maxRows: 8}"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
<el-card class="box-card">
|
<el-card class="box-card">
|
||||||
<!-- 卡片头 -->
|
<!-- 卡片头 -->
|
||||||
<div slot="header" class="clearfix">
|
<div slot="header" class="clearfix">
|
||||||
@ -164,6 +193,9 @@ import {updateRepair} from "@/api/repair/tickets/Tickets";
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "UpdateRepair",
|
name: "UpdateRepair",
|
||||||
|
props:{
|
||||||
|
userRole: String
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
@ -176,11 +208,20 @@ export default {
|
|||||||
id: null,
|
id: null,
|
||||||
nowRepairId: null,
|
nowRepairId: null,
|
||||||
nowRepairName: null,
|
nowRepairName: null,
|
||||||
}
|
image: null,
|
||||||
|
remark: null
|
||||||
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async open(row) {
|
async open(row) {
|
||||||
|
this.formData = {
|
||||||
|
id: null,
|
||||||
|
nowRepairId: null,
|
||||||
|
nowRepairName: null,
|
||||||
|
image: null,
|
||||||
|
remark: null
|
||||||
|
}
|
||||||
this.dialogVisible = true
|
this.dialogVisible = true
|
||||||
if (row) {
|
if (row) {
|
||||||
try {
|
try {
|
||||||
@ -204,6 +245,12 @@ export default {
|
|||||||
this.$modal.msgError("没有指派员工")
|
this.$modal.msgError("没有指派员工")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
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(",")
|
||||||
|
}
|
||||||
this.initFormData()
|
this.initFormData()
|
||||||
await updateRepair(this.formData)
|
await updateRepair(this.formData)
|
||||||
this.$modal.msgSuccess("指派成功")
|
this.$modal.msgSuccess("指派成功")
|
||||||
|
Loading…
Reference in New Issue
Block a user