服务顾问通知客户取车前,判断项目价格、配件价格是否已填写
This commit is contained in:
parent
b49c27c10f
commit
cfa1e585bc
@ -175,3 +175,11 @@ export function removeTicketById(id){
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 验证是否有项目或配件的价格为空或0
|
||||
export function hasPrice(id){
|
||||
return request({
|
||||
url: preUrl + "/hasPrice?id=" + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
@ -147,7 +147,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getPageByRole, inspection, confirm, noticeCus} from "@/api/repair/tickets/Tickets";
|
||||
import {getPageByRole, inspection, confirm, noticeCus, hasPrice} 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";
|
||||
@ -260,6 +260,21 @@ export default {
|
||||
this.$refs.updateRepair.open(row)
|
||||
},
|
||||
async noticeCus(row){
|
||||
// 在下面的代码执行之前,先去判断是否有项目或配件没有价格或为0
|
||||
const flag = await hasPrice(row.id)
|
||||
let choose = true
|
||||
if (!flag.data){
|
||||
await this.$confirm('有项目或配件的价格为0,是否确认通知客户?', '选择', {
|
||||
confirmButtonText: '是',
|
||||
cancelButtonText: '否',
|
||||
type: 'info'
|
||||
}).then(() => {
|
||||
choose = true
|
||||
}).catch(() => {
|
||||
choose = false
|
||||
})
|
||||
}
|
||||
if (choose){
|
||||
this.$confirm('请选择使用什么方式通知客户?', '选择', {
|
||||
confirmButtonText: '短信通知',
|
||||
cancelButtonText: '拨打电话',
|
||||
@ -289,7 +304,7 @@ export default {
|
||||
this.noticeData.name = row.userName
|
||||
this.noticeData.mobile = row.userMobile
|
||||
})
|
||||
|
||||
}
|
||||
},
|
||||
async doNotice(){
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user