修改重新派工逻辑
This commit is contained in:
parent
500b41f844
commit
3115710fcb
@ -84,38 +84,35 @@
|
||||
type="text" icon="el-icon-monitor" @click="handleRecord(scope.row, 'sgwczj')">
|
||||
施工完成
|
||||
</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"
|
||||
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
|
||||
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">
|
||||
申请配件
|
||||
</el-button>
|
||||
<el-dropdown
|
||||
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)">
|
||||
<el-button size="mini" type="text" icon="el-icon-d-arrow-right">更多</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item v-if="!isFinish && scope.row.ticketsWorkStatus !== '01' && userRole === 'repair_staff'"
|
||||
command="handleGet" size="mini" type="text" icon="el-icon-document-add"
|
||||
>申请配件
|
||||
</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>-->
|
||||
<!-- 还要判断是不是员工 -->
|
||||
<el-dropdown-item
|
||||
v-if="userRole !== 'repair_staff' && !isFinish && scope.row.ticketsWorkStatus !== '01'"
|
||||
command="handleReTake" size="mini" type="text" icon="el-icon-refresh"
|
||||
>重新指派
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</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')"-->
|
||||
<!-- @command="(command) => handleCommand(command, scope.$index, scope.row)">-->
|
||||
<!-- <el-button size="mini" type="text" icon="el-icon-d-arrow-right">更多</el-button>-->
|
||||
<!-- <el-dropdown-menu slot="dropdown">-->
|
||||
<!-- <el-dropdown-item v-if="!isFinish && scope.row.ticketsWorkStatus !== '01' && userRole === 'repair_staff'"-->
|
||||
<!-- command="handleGet" size="mini" type="text" icon="el-icon-document-add"-->
|
||||
<!-- >申请配件-->
|
||||
<!-- </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>–>-->
|
||||
<!-- <!– 还要判断是不是员工 –>-->
|
||||
<!-- <el-dropdown-item-->
|
||||
<!-- v-if="userRole !== 'repair_staff' && !isFinish && scope.row.ticketsWorkStatus !== '01'"-->
|
||||
<!-- command="handleReTake" size="mini" type="text" icon="el-icon-refresh"-->
|
||||
<!-- >{{userRole === 'service_advisor' ? "修改派工" : "内返派工"}}-->
|
||||
<!-- </el-dropdown-item>-->
|
||||
<!-- </el-dropdown-menu>-->
|
||||
<!-- </el-dropdown>-->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -124,7 +121,7 @@
|
||||
@pagination="listTickets"
|
||||
/>
|
||||
<TicketsShow ref="ticketsShow" :user-role="userRole"/>
|
||||
<UpdateRepair ref="updateRepair" @success="listTickets"/>
|
||||
<UpdateRepair :user-role="userRole" ref="updateRepair" @success="listTickets"/>
|
||||
<TWOperate ref="twOperate" @success="listTickets"/>
|
||||
<UpdateRecord ref="updateRecord" @success="listTickets"/>
|
||||
|
||||
@ -264,6 +261,9 @@ export default {
|
||||
},
|
||||
async listTickets() {
|
||||
try {
|
||||
if (this.userRole === 'general_inspection' && this.queryParams.isFinish !== '1'){
|
||||
this.queryParams['selectType'] = 'all'
|
||||
}
|
||||
this.loading = true
|
||||
const res = await getPageType(this.queryParams)
|
||||
if (res.data) {
|
||||
|
@ -54,7 +54,7 @@
|
||||
处理
|
||||
</el-button>
|
||||
<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 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>
|
||||
</el-dialog>
|
||||
|
||||
<UpdateRepair ref="updateRepair" @success="getList"/>
|
||||
<UpdateRepair ref="updateRepair" @success="getList" :user-role="userRole"/>
|
||||
<EditTickets ref="editTickets" @success="getList"/>
|
||||
<RecordSetting ref="recordSet" />
|
||||
</div>
|
||||
|
@ -115,6 +115,35 @@
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</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">
|
||||
<!-- 卡片头 -->
|
||||
<div slot="header" class="clearfix">
|
||||
@ -164,6 +193,9 @@ import {updateRepair} from "@/api/repair/tickets/Tickets";
|
||||
|
||||
export default {
|
||||
name: "UpdateRepair",
|
||||
props:{
|
||||
userRole: String
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
@ -176,11 +208,20 @@ export default {
|
||||
id: null,
|
||||
nowRepairId: null,
|
||||
nowRepairName: null,
|
||||
}
|
||||
image: null,
|
||||
remark: null
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async open(row) {
|
||||
this.formData = {
|
||||
id: null,
|
||||
nowRepairId: null,
|
||||
nowRepairName: null,
|
||||
image: null,
|
||||
remark: null
|
||||
}
|
||||
this.dialogVisible = true
|
||||
if (row) {
|
||||
try {
|
||||
@ -204,6 +245,12 @@ export default {
|
||||
this.$modal.msgError("没有指派员工")
|
||||
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()
|
||||
await updateRepair(this.formData)
|
||||
this.$modal.msgSuccess("指派成功")
|
||||
|
Loading…
Reference in New Issue
Block a user