|
@ -9,7 +9,7 @@ |
|
|
v-if="data.status == 'PECEIVED' && (!serviceList || serviceList && serviceList.length == 0)">转办 |
|
|
v-if="data.status == 'PECEIVED' && (!serviceList || serviceList && serviceList.length == 0)">转办 |
|
|
</view> --> |
|
|
</view> --> |
|
|
<view @click="transfer" |
|
|
<view @click="transfer" |
|
|
v-if="data.status == 'PECEIVED'&&auth.hasPermiOr(['eam:device-maintenance-job-main:turnTo','eam:mold-maintenance-job-main:turnTo','eam:tech-maintenance-job-main:orderClick'])"> |
|
|
v-if="data.status == 'PECEIVED'&&((type=='DEVICE'&&auth.hasPermi('eam:device-maintenance-job-main:turnToAPP'))||(type=='MOLD'&&auth.hasPermi('eam:mold-maintenance-job-main:turnToAPP'))||(type=='TECH'&&auth.hasPermi('eam:tech-maintenance-job-main:turnToAPP')))"> |
|
|
转办 |
|
|
转办 |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
@ -207,23 +207,23 @@ |
|
|
</view> |
|
|
</view> |
|
|
<view class="footer"> |
|
|
<view class="footer"> |
|
|
<view class="btns" |
|
|
<view class="btns" |
|
|
v-if="data.status == 'PENDING'&&auth.hasPermiOr(['eam:device-maintenance-job-main:orderClick','eam:mold-maintenance-job-main:orderClick','eam:tech-maintenance-job-main:orderClick'])"> |
|
|
v-if="data.status == 'PENDING'&&((type=='DEVICE'&&auth.hasPermi('eam:device-maintenance-job-main:orderClickAPP'))||(type=='MOLD'&&auth.hasPermi('eam:mold-maintenance-job-main:orderClickAPP'))||(type=='TECH'&&auth.hasPermi('eam:tech-maintenance-job-main:orderClickAPP')))"> |
|
|
<u-button type="primary" @click="orderClick(1)" :loading='loading' :disabled='loading'>接单</u-button> |
|
|
<u-button type="primary" @click="orderClick(1)" :loading='loading' :disabled='loading'>接单</u-button> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<view class="btns" v-if="data.status == 'PECEIVED'"> |
|
|
<view class="btns" v-if="data.status == 'PECEIVED'"> |
|
|
<u-button shape="shape" type="warning" style="min-width: 120rpx;" :loading='loading1' @click="editForm" |
|
|
<u-button shape="shape" type="warning" style="min-width: 120rpx;" :loading='loading1' @click="editForm" |
|
|
:disabled='loading1' |
|
|
:disabled='loading1' v-if="(type=='DEVICE'&&auth.hasPermi('eam:device-maintenance-job-main:updateAPP'))||(type=='MOLD'&&auth.hasPermi('eam:mold-maintenance-job-main:updateAPP'))||(type=='TECH'&&auth.hasPermi('eam:tech-maintenance-job-main:updateAPP'))">修改工单</u-button> |
|
|
v-if="auth.hasPermiOr(['eam:device-maintenance-job-main:update','eam:mold-maintenance-job-main:update','eam:tech-maintenance-job-main:update'])">修改工单</u-button> |
|
|
|
|
|
<u-button type="primary" @click="orderClickSuccess()" :loading='loading' :disabled='loading' |
|
|
<u-button type="primary" @click="orderClickSuccess()" :loading='loading' :disabled='loading' |
|
|
v-if="auth.hasPermiOr(['eam:device-maintenance-job-main:orderClickFinish','eam:mold-maintenance-job-main:orderClickFinish','eam:tech-maintenance-job-main:orderClickFinish'])">完成</u-button> |
|
|
v-if="(type=='DEVICE'&&auth.hasPermi('eam:device-maintenance-job-main:orderClickFinishAPP'))||(type=='MOLD'&&auth.hasPermi('eam:mold-maintenance-job-main:orderClickFinishAPP'))||(type=='TECH'&&auth.hasPermi('eam:tech-maintenance-job-main:orderClickFinishAPP'))">完成</u-button> |
|
|
</view> |
|
|
</view> |
|
|
<view class="btns" |
|
|
<view class="btns" |
|
|
v-if="((data.status == 'COMPLETED' && !data.requestNumber) || (data.status == 'APPLYPASS')) && auth.hasPermiOr(['eam:device-maintenance-job-main:orderClickVerify','eam:mold-maintenance-job-main:orderClickVerify','eam:tech-maintenance-job-main:orderClickVerify'])"> |
|
|
v-if="((data.status == 'COMPLETED' && !data.requestNumber) || (data.status == 'APPLYPASS')) && ((type=='DEVICE'&&auth.hasPermi('eam:device-maintenance-job-main:orderClickVerifyAPP'))||(type=='MOLD'&&auth.hasPermi('eam:mold-maintenance-job-main:orderClickVerifyAPP'))||(type=='TECH'&&auth.hasPermi('eam:tech-maintenance-job-main:orderClickVerifyAPP')))"> |
|
|
<u-button type="primary" @click="verify()" :loading='loading' :disabled='loading'>验证</u-button> |
|
|
<u-button type="primary" @click="verify()" :loading='loading' :disabled='loading'>验证</u-button> |
|
|
</view> |
|
|
</view> |
|
|
<view class="btns" |
|
|
<view class="btns" |
|
|
v-if="(data.status == 'COMPLETED' && data.requestNumber && data.applyer == store.id)&&auth.hasPermiOr(['eam:device-maintenance-job-main:orderClickConfirm','eam:mold-maintenance-job-main:orderClickConfirm','eam:tech-maintenance-job-main:orderClickConfirm'])"> |
|
|
v-if="(data.status == 'COMPLETED' && data.requestNumber && data.applyer == store.id)&& ((type=='DEVICE'&&auth.hasPermi('eam:device-maintenance-job-main:orderClickConfirmAPP'))||(type=='MOLD'&&auth.hasPermi('eam:mold-maintenance-job-main:orderClickConfirmAPP'))||(type=='TECH'&&auth.hasPermi('eam:tech-maintenance-job-main:orderClickConfirmAPP')))"> |
|
|
<u-button type="primary" @click="orderClickApply()" :loading='loading' |
|
|
<u-button type="primary" @click="orderClickApply()" :loading='loading' |
|
|
:disabled='loading'>维修确认</u-button> |
|
|
:disabled='loading'>维修确认</u-button> |
|
|
</view> |
|
|
</view> |
|
@ -430,7 +430,7 @@ |
|
|
loading.value = false |
|
|
loading.value = false |
|
|
}, 1500) |
|
|
}, 1500) |
|
|
} else { |
|
|
} else { |
|
|
proxy.$modal.showToast('操作失败') |
|
|
proxy.$modal.showToast(res.msg) |
|
|
loading.value = false |
|
|
loading.value = false |
|
|
} |
|
|
} |
|
|
}).catch(() => { |
|
|
}).catch(() => { |
|
@ -441,7 +441,7 @@ |
|
|
/** |
|
|
/** |
|
|
* 维修确认 |
|
|
* 维修确认 |
|
|
*/ |
|
|
*/ |
|
|
async function orderClickConfirm() { |
|
|
async function orderClickConfirm(status) { |
|
|
isApplyShowSuccess.value = false |
|
|
isApplyShowSuccess.value = false |
|
|
result.value = status |
|
|
result.value = status |
|
|
isShowSuccess.value = false |
|
|
isShowSuccess.value = false |
|
@ -449,43 +449,26 @@ |
|
|
number: data.value.number, |
|
|
number: data.value.number, |
|
|
status: data.value.status, |
|
|
status: data.value.status, |
|
|
id: data.value.id, |
|
|
id: data.value.id, |
|
|
result: result.value, |
|
|
result: result.value , |
|
|
requestNumber: data.value.requestNumber, |
|
|
requestNumber: data.value.requestNumber, |
|
|
content: data.value.applyContent ? data.value.applyContent : '' |
|
|
content: data.value.applyContent ? data.value.applyContent : '' |
|
|
} |
|
|
} |
|
|
// 修改工单接口参数 |
|
|
proxy.$modal.loading('加载中') |
|
|
const dataTwo = { |
|
|
loading.value = true |
|
|
id: data.value && data.value.id ? data.value.id : '', |
|
|
await repairOrderApi.orderClickConfirm(dataOne, type.value).then((res) => { |
|
|
describes: data.value.describes, |
|
|
if (res.data) { |
|
|
type: data.value.type, |
|
|
proxy.$modal.showToast('操作成功') |
|
|
deviceNumber: data.value.deviceNumber, |
|
|
setTimeout(() => { |
|
|
factoryAreaNumber: data.value.factoryAreaNumber, |
|
|
proxy.$tab.navigateBack() |
|
|
classes: data.value.classes, |
|
|
|
|
|
faultType: data.value.faultType |
|
|
|
|
|
} |
|
|
|
|
|
// 如果直接点击完成先走修改工单接口 |
|
|
|
|
|
await repairOrderApi.orderClickConfirm(dataTwo).then((res) => { }).catch(() => { |
|
|
|
|
|
proxy.$modal.closeLoading() |
|
|
|
|
|
loading.value = false |
|
|
|
|
|
}) |
|
|
|
|
|
proxy.$modal.confirm('是否完成?').then(async () => { |
|
|
|
|
|
proxy.$modal.loading('加载中') |
|
|
|
|
|
loading.value = true |
|
|
|
|
|
await repairOrderApi.orderClickFinish(dataOne).then((res) => { |
|
|
|
|
|
if (res.data) { |
|
|
|
|
|
proxy.$modal.showToast('操作成功') |
|
|
|
|
|
setTimeout(() => { |
|
|
|
|
|
proxy.$tab.navigateBack() |
|
|
|
|
|
loading.value = false |
|
|
|
|
|
}, 1500) |
|
|
|
|
|
} else { |
|
|
|
|
|
proxy.$modal.showToast('操作失败') |
|
|
|
|
|
loading.value = false |
|
|
loading.value = false |
|
|
} |
|
|
}, 1500) |
|
|
}).catch(() => { |
|
|
} else { |
|
|
proxy.$modal.closeLoading() |
|
|
proxy.$modal.showToast(res.msg) |
|
|
loading.value = false |
|
|
loading.value = false |
|
|
}) |
|
|
} |
|
|
|
|
|
}).catch(() => { |
|
|
|
|
|
proxy.$modal.closeLoading() |
|
|
|
|
|
loading.value = false |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
/** |
|
|
/** |
|
@ -501,22 +484,6 @@ |
|
|
requestNumber: data.value.requestNumber, |
|
|
requestNumber: data.value.requestNumber, |
|
|
content: data.value.applyContent ? data.value.applyContent : '' |
|
|
content: data.value.applyContent ? data.value.applyContent : '' |
|
|
} |
|
|
} |
|
|
// 修改工单接口参数 |
|
|
|
|
|
const dataTwo = { |
|
|
|
|
|
id: data.value && data.value.id ? data.value.id : '', |
|
|
|
|
|
describes: data.value.describes, |
|
|
|
|
|
type: data.value.type, |
|
|
|
|
|
deviceNumber: data.value.deviceNumber, |
|
|
|
|
|
factoryAreaNumber: data.value.factoryAreaNumber, |
|
|
|
|
|
classes: data.value.classes, |
|
|
|
|
|
faultType: data.value.faultType |
|
|
|
|
|
} |
|
|
|
|
|
// 如果直接点击完成先走修改工单接口 |
|
|
|
|
|
await repairOrderApi.repairOrderUpdate(dataTwo, type.value).then((res) => { }).catch(() => { |
|
|
|
|
|
proxy.$modal.closeLoading() |
|
|
|
|
|
loading.value = false |
|
|
|
|
|
}) |
|
|
|
|
|
proxy.$modal.confirm('是否完成?').then(async () => { |
|
|
|
|
|
proxy.$modal.loading('加载中') |
|
|
proxy.$modal.loading('加载中') |
|
|
loading.value = true |
|
|
loading.value = true |
|
|
await repairOrderApi.orderClickVerify(dataOne, type.value).then((res) => { |
|
|
await repairOrderApi.orderClickVerify(dataOne, type.value).then((res) => { |
|
@ -527,14 +494,13 @@ |
|
|
loading.value = false |
|
|
loading.value = false |
|
|
}, 1500) |
|
|
}, 1500) |
|
|
} else { |
|
|
} else { |
|
|
proxy.$modal.showToast('操作失败') |
|
|
proxy.$modal.showToast(res.msg) |
|
|
loading.value = false |
|
|
loading.value = false |
|
|
} |
|
|
} |
|
|
}).catch(() => { |
|
|
}).catch(() => { |
|
|
proxy.$modal.closeLoading() |
|
|
proxy.$modal.closeLoading() |
|
|
loading.value = false |
|
|
loading.value = false |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
|
|
|
} |
|
|
} |
|
|
// APP维修工单接单、点击完成、验证 |
|
|
// APP维修工单接单、点击完成、验证 |
|
|
// async function orderClick(type1) { |
|
|
// async function orderClick(type1) { |
|
@ -656,7 +622,7 @@ |
|
|
await getDeviceRepairDetailsByNumber() |
|
|
await getDeviceRepairDetailsByNumber() |
|
|
loading.value = false |
|
|
loading.value = false |
|
|
} else { |
|
|
} else { |
|
|
proxy.$modal.showToast('操作失败') |
|
|
proxy.$modal.showToast(res.msg) |
|
|
loading.value = false |
|
|
loading.value = false |
|
|
} |
|
|
} |
|
|
}).catch(() => { |
|
|
}).catch(() => { |
|
@ -770,7 +736,7 @@ |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
async function getDeviceRepairDetail(number) { |
|
|
async function getDeviceRepairDetail(number) { |
|
|
await repairOrderApi.getDeviceRepairDetail(number,type.value).then((res) => { |
|
|
await repairOrderApi.getDeviceRepairDetail(number, type.value).then((res) => { |
|
|
proxy.$modal.closeLoading() |
|
|
proxy.$modal.closeLoading() |
|
|
data.value = res.data |
|
|
data.value = res.data |
|
|
if (data.value.requestNumber) { |
|
|
if (data.value.requestNumber) { |
|
|