|
@ -322,7 +322,7 @@ |
|
|
orderClick(2) |
|
|
orderClick(2) |
|
|
} |
|
|
} |
|
|
// APP维修工单接单、点击完成、验证 |
|
|
// APP维修工单接单、点击完成、验证 |
|
|
function orderClick(type) { |
|
|
async function orderClick(type) { |
|
|
// 如果是接单 |
|
|
// 如果是接单 |
|
|
// if (this.data.status == 'PENDING') { |
|
|
// if (this.data.status == 'PENDING') { |
|
|
// if (this.$store.state.user.dept.parentId != this.data.factoryAreaNumber) { |
|
|
// if (this.$store.state.user.dept.parentId != this.data.factoryAreaNumber) { |
|
@ -353,9 +353,7 @@ |
|
|
classes: data.value.classes, |
|
|
classes: data.value.classes, |
|
|
faultType: data.value.faultType |
|
|
faultType: data.value.faultType |
|
|
} |
|
|
} |
|
|
let tips = data.value.status == 'PENDING' ? '是否接单?' : data.value.status == 'PECEIVED' ? '是否完成?' : data |
|
|
if(type ==2){ |
|
|
.value.status == 'COMPLETED' ? '是否验证完结?' : '' |
|
|
|
|
|
proxy.$modal.confirm(tips).then(async () => { |
|
|
|
|
|
proxy.$modal.loading('加载中') |
|
|
proxy.$modal.loading('加载中') |
|
|
loading.value = true |
|
|
loading.value = true |
|
|
// 如果直接点击完成先走修改工单接口 |
|
|
// 如果直接点击完成先走修改工单接口 |
|
@ -380,7 +378,36 @@ |
|
|
proxy.$modal.closeLoading() |
|
|
proxy.$modal.closeLoading() |
|
|
loading.value = false |
|
|
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() { |
|
|
function getDeviceRepairDetailsByNumber() { |
|
|