|
|
@ -322,7 +322,7 @@ |
|
|
|
orderClick(2) |
|
|
|
} |
|
|
|
// APP维修工单接单、点击完成、验证 |
|
|
|
function orderClick(type) { |
|
|
|
async function orderClick(type) { |
|
|
|
// 如果是接单 |
|
|
|
// if (this.data.status == 'PENDING') { |
|
|
|
// if (this.$store.state.user.dept.parentId != this.data.factoryAreaNumber) { |
|
|
@ -353,9 +353,7 @@ |
|
|
|
classes: data.value.classes, |
|
|
|
faultType: data.value.faultType |
|
|
|
} |
|
|
|
let tips = data.value.status == 'PENDING' ? '是否接单?' : data.value.status == 'PECEIVED' ? '是否完成?' : data |
|
|
|
.value.status == 'COMPLETED' ? '是否验证完结?' : '' |
|
|
|
proxy.$modal.confirm(tips).then(async () => { |
|
|
|
if(type ==2){ |
|
|
|
proxy.$modal.loading('加载中') |
|
|
|
loading.value = true |
|
|
|
// 如果直接点击完成先走修改工单接口 |
|
|
@ -380,7 +378,36 @@ |
|
|
|
proxy.$modal.closeLoading() |
|
|
|
loading.value = false |
|
|
|
}) |
|
|
|
}) |
|
|
|
}else{ |
|
|
|
let tips = data.value.status == 'PENDING' ? '是否接单?' : data.value.status == 'PECEIVED' ? '是否完成?' : data |
|
|
|
.value.status == 'COMPLETED' ? '是否验证完结?' : '' |
|
|
|
proxy.$modal.confirm(tips).then(async () => { |
|
|
|
proxy.$modal.loading('加载中') |
|
|
|
loading.value = true |
|
|
|
// 如果直接点击完成先走修改工单接口 |
|
|
|
if (data.value.status == 'PECEIVED') { |
|
|
|
await repairOrderApi.repairOrderUpdate(dataTwo).then((res) => { }).catch(() => { |
|
|
|
proxy.$modal.closeLoading() |
|
|
|
loading.value = false |
|
|
|
}) |
|
|
|
} |
|
|
|
await repairOrderApi.orderClick(dataOne).then((res) => { |
|
|
|
if (res.data) { |
|
|
|
proxy.$modal.showToast('操作成功') |
|
|
|
setTimeout(() => { |
|
|
|
proxy.$tab.navigateBack() |
|
|
|
loading.value = false |
|
|
|
}, 1500) |
|
|
|
} else { |
|
|
|
proxy.$modal.showToast('操作失败') |
|
|
|
loading.value = false |
|
|
|
} |
|
|
|
}).catch(() => { |
|
|
|
proxy.$modal.closeLoading() |
|
|
|
loading.value = false |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
// 获取维修报修信息 |
|
|
|
function getDeviceRepairDetailsByNumber() { |
|
|
|