通知客户取车1/2

This commit is contained in:
xiaofajia 2024-10-23 23:19:58 +08:00
parent c941368473
commit aedaf4e73f
3 changed files with 134 additions and 8 deletions

View File

@ -140,3 +140,12 @@ export function confirm(data){
data
})
}
// 服务顾问通知客户取车
export function noticeCus(data){
return request({
url: preUrl + "/noticeCus",
method: 'post',
data
})
}

View File

@ -0,0 +1,28 @@
<template>
<div>
<el-dialog title="编辑工单" :visible.sync="dialogVisible" width="80%" v-dialogDrag append-to-body>
<!-- todo -->
</el-dialog>
</div>
</template>
<script>
export default {
name: "EditTickets",
data(){
return{
info: {},
}
},
methods:{
async open(row){
}
}
}
</script>
<style scoped lang="scss">
</style>

View File

@ -44,14 +44,16 @@
<el-button size="mini" type="text" icon="el-icon-view" @click="handleShow(scope.row)"
>查看
</el-button>
<el-button v-if="userRole === 'service_advisor'" size="mini" type="text" icon="el-icon-setting">
编辑工单
</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 size="mini" type="text" icon="el-icon-refresh" v-if="scope.row.ticketsWorkStatus !== '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 size="mini" @click="noticeCus(scope.row)" type="text" icon="el-icon-finished" v-if="userRole === 'service_advisor' && scope.row.ticketsWorkStatus === '03'">
通知客户取车
</el-button>
</template>
@ -93,14 +95,59 @@
</div>
</el-dialog>
<el-dialog title="通知客户取车" :visible.sync="noticeDialog" width="60%" v-dialogDrag append-to-body>
<el-form :model="noticeData" ref="noticeRef" :rules="noticeRules" v-loading="noticeLoading" :inline="true" label-width="20rem">
<el-row :gutter="1">
<el-col :span="24">
<el-form-item label="取车时间" prop="time">
<el-date-picker
value-format="yyyy-MM-dd"
v-model="noticeData.time"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="1">
<el-col :span="24">
<el-form-item label="联系人" prop="name">
<el-input v-model="noticeData.name" style="width: 20rem"/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="1">
<el-col :span="24">
<el-form-item label="联系电话" prop="mobile">
<el-input v-model="noticeData.mobile" style="width: 20rem"/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="1">
<el-col :span="24">
<el-form-item label="备注" prop="remark">
<el-input type="textarea" style="width: 35rem" :autosize="{ minRows: 2, maxRows: 4}" v-model="noticeData.remark" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="doNotice">确定</el-button>
<el-button @click="noticeDialog = false">取消</el-button>
</div>
</el-dialog>
<UpdateRepair ref="updateRepair" @success="getList"/>
</div>
</template>
<script>
import {getPageByRole, inspection, confirm} from "@/api/repair/tickets/Tickets";
import {getPageByRole, inspection, confirm, noticeCus} from "@/api/repair/tickets/Tickets";
import TicketsShow from "@/views/repair/tickets/Components/TicketsShow.vue";
import UpdateRepair from "@/views/repair/tickets/form/UpdateRepair.vue";
import {getUserProfile} from "@/api/system/user";
export default {
name: "TicketFinishManager",
@ -127,7 +174,20 @@ export default {
id: null
},
formRules:{},
formLoading:{}
formLoading:{},
noticeData:{
time: [],
name: null,
mobile: null,
id: null,
remark: null,
},
noticeRules:{
time: [{required: true, message: '时间不能为空', trigger: 'blur'}],
mobile: [{required: true, message: '联系电话不能为空', trigger: 'blur'}]
},
noticeLoading: false,
noticeDialog: false,
}
},
mounted() {
@ -153,14 +213,14 @@ export default {
this.handleQuery()
},
handleShow(row){
this.$refs.ticketsShow.open(row)
},
handleDispose(row){
this.formData = {
image: null,
remark: null,
id: null
}
this.$refs.ticketsShow.open(row)
},
handleDispose(row){
this.formData.id = row.id
this.dialogVisible = true
},
@ -194,6 +254,35 @@ export default {
},
handleReTake(row){
this.$refs.updateRepair.open(row)
},
async noticeCus(row){
this.noticeData = {
time: [],
name: null,
mobile: null,
id: null,
remark: null,
}
this.noticeDialog = true
this.noticeData.id = row.id
try {
this.noticeLoading = true
const res = await getUserProfile()
this.noticeData.name = res.data.nickname
this.noticeData.mobile = res.data.mobile
}finally {
this.noticeLoading = false
}
},
async doNotice(){
try {
await this.$refs.noticeRef.validate()
this.noticeLoading = true
await noticeCus(this.noticeData)
this.noticeDialog = false
this.$modal.msgSuccess("操作成功")
await this.getList()
}catch {}
}
}
}