|
|
@ -9,7 +9,8 @@ |
|
|
|
v-if="data.status == 'PECEIVED' && (!serviceList || serviceList && serviceList.length == 0)">转办 |
|
|
|
</view> --> |
|
|
|
<view @click="transfer" |
|
|
|
v-if="data.status == 'PECEIVED'">转办 |
|
|
|
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'])"> |
|
|
|
转办 |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="dec"> |
|
|
@ -162,8 +163,7 @@ |
|
|
|
</view> |
|
|
|
<view class="" @click.stop="delService(item)"> |
|
|
|
<u-icon name="trash" color="#aaaaaa" size="40" |
|
|
|
v-if="data.status == 'PECEIVED'" |
|
|
|
></u-icon> |
|
|
|
v-if="data.status == 'PECEIVED'"></u-icon> |
|
|
|
</view> |
|
|
|
|
|
|
|
</view> |
|
|
@ -198,8 +198,7 @@ |
|
|
|
</view> |
|
|
|
<!-- <u-icon name="minus-circle" color="#aaaaaa" size="60" ></u-icon> --> |
|
|
|
</view> |
|
|
|
<view class="add-btn" |
|
|
|
v-if="data.status == 'PENDING' || data.status == 'PECEIVED'"> |
|
|
|
<view class="add-btn" v-if="data.status == 'PENDING' || data.status == 'PECEIVED'"> |
|
|
|
<u-button type="primary" @click="addSubForm('creat')"><u-icon name="plus-circle" color="#ffffff" |
|
|
|
size="36"></u-icon>添加维修内容</u-button> |
|
|
|
</view> |
|
|
@ -207,21 +206,26 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="footer"> |
|
|
|
<view class="btns" v-if="data.status == 'PENDING'"> |
|
|
|
<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'])"> |
|
|
|
<u-button type="primary" @click="orderClick(1)" :loading='loading' :disabled='loading'>接单</u-button> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="btns" v-if="data.status == 'PECEIVED'"> |
|
|
|
<u-button shape="shape" type="warning" style="min-width: 120rpx;" :loading='loading1' @click="editForm" |
|
|
|
:disabled='loading1'>修改工单</u-button> |
|
|
|
<u-button type="primary" @click="orderClickSuccess()" :loading='loading' |
|
|
|
:disabled='loading'>完成</u-button> |
|
|
|
:disabled='loading1' |
|
|
|
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' |
|
|
|
v-if="auth.hasPermiOr(['eam:device-maintenance-job-main:orderClickFinish','eam:mold-maintenance-job-main:orderClickFinish','eam:tech-maintenance-job-main:orderClickFinish'])">完成</u-button> |
|
|
|
</view> |
|
|
|
<view class="btns" v-if="(data.status == 'COMPLETED' && !data.requestNumber) || (data.status == 'APPLYPASS')"> |
|
|
|
<u-button type="primary" @click="orderClickVerify()" :loading='loading' :disabled='loading'>验证</u-button> |
|
|
|
<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'])"> |
|
|
|
<u-button type="primary" @click="verify()" :loading='loading' :disabled='loading'>验证</u-button> |
|
|
|
</view> |
|
|
|
<view class="btns" v-if="data.status == 'COMPLETED' && data.requestNumber && data.applyer == store.id"> |
|
|
|
<u-button type="primary" @click="orderClickApply()" :loading='loading' :disabled='loading'>维修确认</u-button> |
|
|
|
<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'])"> |
|
|
|
<u-button type="primary" @click="orderClickApply()" :loading='loading' |
|
|
|
:disabled='loading'>维修确认</u-button> |
|
|
|
</view> |
|
|
|
<view style="height: constant(safe-area-inset-bottom); height: env(safe-area-inset-bottom);"></view> |
|
|
|
</view> |
|
|
@ -237,7 +241,7 @@ |
|
|
|
</view> |
|
|
|
<view class="popup-footer"> |
|
|
|
<view @click="isShowSuccess = false">取消</view> |
|
|
|
<view class="sure" @click="sure">确认</view> |
|
|
|
<view class="sure" @click="orderClickFinish">确认</view> |
|
|
|
</view> |
|
|
|
</u-popup> |
|
|
|
|
|
|
@ -249,7 +253,7 @@ |
|
|
|
</view> |
|
|
|
<view class="popup-footer"> |
|
|
|
<view @click="cancel">取消</view> |
|
|
|
<view class="sure" @click="verify">确认</view> |
|
|
|
<view class="sure" @click="orderClickVerify">确认</view> |
|
|
|
</view> |
|
|
|
</u-popup> |
|
|
|
|
|
|
@ -260,8 +264,8 @@ |
|
|
|
<textarea v-model="data.applyContent" placeholder="请输入内容"></textarea> |
|
|
|
</view> |
|
|
|
<view class="popup-footer"> |
|
|
|
<view class="sure" @click="apply('APPLYPASS')">通过</view> |
|
|
|
<view class="reject" @click="apply('APPLYREJECTED')" style="color: red;">驳回</view> |
|
|
|
<view class="sure" @click="orderClickConfirm('APPLYPASS')">通过</view> |
|
|
|
<view class="reject" @click="orderClickConfirm('APPLYREJECTED')" style="color: red;">驳回</view> |
|
|
|
</view> |
|
|
|
</u-popup> |
|
|
|
<view style="height: constant(safe-area-inset-bottom); height: env(safe-area-inset-bottom);"></view> |
|
|
@ -283,6 +287,7 @@ |
|
|
|
import * as dictApi from "@/api/dict.js" |
|
|
|
import * as repairOrderApi from "@/api/repairOrder.js" |
|
|
|
import { useCountStore } from '@/store' |
|
|
|
import auth from '@/plugins/auth' |
|
|
|
|
|
|
|
const { proxy } = getCurrentInstance() |
|
|
|
// 获取自定义的store |
|
|
@ -376,7 +381,7 @@ |
|
|
|
/** |
|
|
|
* 点击验证完结填写意见 |
|
|
|
*/ |
|
|
|
function orderClickVerify() { |
|
|
|
function verify() { |
|
|
|
data.value.applyContent = null; |
|
|
|
isVerifyShowSuccess.value = true |
|
|
|
} |
|
|
@ -389,45 +394,110 @@ |
|
|
|
function radioGroupChange(e) { |
|
|
|
result.value = e |
|
|
|
} |
|
|
|
function sure() { |
|
|
|
// 完成 |
|
|
|
async function orderClickFinish() { |
|
|
|
isShowSuccess.value = false |
|
|
|
orderClick(2) |
|
|
|
const dataOne = { |
|
|
|
number: data.value.number, |
|
|
|
status: data.value.status, |
|
|
|
id: data.value.id, |
|
|
|
result: result.value, |
|
|
|
requestNumber: data.value.requestNumber, |
|
|
|
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.loading('加载中') |
|
|
|
loading.value = true |
|
|
|
await repairOrderApi.orderClickFinish(dataOne, type.value).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 apply(status) { |
|
|
|
async function orderClickConfirm() { |
|
|
|
isApplyShowSuccess.value = false |
|
|
|
result.value = status |
|
|
|
orderClick(3) |
|
|
|
isShowSuccess.value = false |
|
|
|
const dataOne = { |
|
|
|
number: data.value.number, |
|
|
|
status: data.value.status, |
|
|
|
id: data.value.id, |
|
|
|
result: result.value, |
|
|
|
requestNumber: data.value.requestNumber, |
|
|
|
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.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 |
|
|
|
} |
|
|
|
}).catch(() => { |
|
|
|
proxy.$modal.closeLoading() |
|
|
|
loading.value = false |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
/** |
|
|
|
* 验证确认 |
|
|
|
*/ |
|
|
|
function verify() { |
|
|
|
async function orderClickVerify() { |
|
|
|
isVerifyShowSuccess.value = false |
|
|
|
orderClick(2) |
|
|
|
} |
|
|
|
// APP维修工单接单、点击完成、验证 |
|
|
|
async function orderClick(type1) { |
|
|
|
// 如果是接单 |
|
|
|
// if (this.data.status == 'PENDING') { |
|
|
|
// if (this.$store.state.user.dept.parentId != this.data.factoryAreaNumber) { |
|
|
|
// this.$modal.showToast('当前人员厂区与工单来源的厂区不一致') |
|
|
|
// return; |
|
|
|
// } |
|
|
|
// if (this.$store.state.user.dept.classType != this.data.type) { |
|
|
|
// this.$modal.showToast('当前人员班组与工单类型不一致') |
|
|
|
// return; |
|
|
|
// } |
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
const dataOne = { |
|
|
|
number: data.value.number, |
|
|
|
status: data.value.status, |
|
|
|
id: data.value.id, |
|
|
|
result: type1 == 2||type1 == 3 ? result.value : '', |
|
|
|
result: result.value, |
|
|
|
requestNumber: data.value.requestNumber, |
|
|
|
content: data.value.applyContent ? data.value.applyContent : '' |
|
|
|
} |
|
|
@ -441,30 +511,19 @@ |
|
|
|
classes: data.value.classes, |
|
|
|
faultType: data.value.faultType |
|
|
|
} |
|
|
|
let tips = data.value.status == 'PENDING' ? '是否接单?' : data.value.status == 'PECEIVED' ? '是否完成?' : data.value.status == 'COMPLETED' && data.value.requestNumber && data.value.applyer == store.id ? '是否确认提交?' :data.value.status == 'COMPLETED' && !data.value.requestNumber ? '是否验证完结?':data.value.status == 'APPLYPASS' ? '是否验证完结?':'' |
|
|
|
if(type1 == 2 || type1 ==3){ |
|
|
|
// 如果直接点击完成先走修改工单接口 |
|
|
|
if (data.value.status == 'PECEIVED') { |
|
|
|
await repairOrderApi.repairOrderUpdate(dataTwo).then((res) => { }).catch(() => { |
|
|
|
await repairOrderApi.repairOrderUpdate(dataTwo, type.value).then((res) => { }).catch(() => { |
|
|
|
proxy.$modal.closeLoading() |
|
|
|
loading.value = false |
|
|
|
}) |
|
|
|
} |
|
|
|
proxy.$modal.confirm(tips).then(async () => { |
|
|
|
proxy.$modal.confirm('是否完成?').then(async () => { |
|
|
|
proxy.$modal.loading('加载中') |
|
|
|
loading.value = true |
|
|
|
await repairOrderApi.orderClick(dataOne).then((res) => { |
|
|
|
await repairOrderApi.orderClickVerify(dataOne, type.value).then((res) => { |
|
|
|
if (res.data) { |
|
|
|
proxy.$modal.showToast('操作成功') |
|
|
|
setTimeout(() => { |
|
|
|
if(type1==3){ |
|
|
|
// proxy.$tab.navigateTo(`/pages/repairOrder/index?type=${type.value}&flag=2`) |
|
|
|
proxy.$tab.navigateBack() |
|
|
|
}else{ |
|
|
|
// proxy.$tab.navigateTo(`/pages/repairOrder/index?type=${type.value}`) |
|
|
|
proxy.$tab.navigateBack() |
|
|
|
} |
|
|
|
|
|
|
|
loading.value = false |
|
|
|
}, 1500) |
|
|
|
} else { |
|
|
@ -476,27 +535,126 @@ |
|
|
|
loading.value = false |
|
|
|
}) |
|
|
|
}) |
|
|
|
}else{ |
|
|
|
proxy.$modal.confirm(tips).then(async () => { |
|
|
|
} |
|
|
|
// APP维修工单接单、点击完成、验证 |
|
|
|
// async function orderClick(type1) { |
|
|
|
// // 如果是接单 |
|
|
|
// // if (this.data.status == 'PENDING') { |
|
|
|
// // if (this.$store.state.user.dept.parentId != this.data.factoryAreaNumber) { |
|
|
|
// // this.$modal.showToast('当前人员厂区与工单来源的厂区不一致') |
|
|
|
// // return; |
|
|
|
// // } |
|
|
|
// // if (this.$store.state.user.dept.classType != this.data.type) { |
|
|
|
// // this.$modal.showToast('当前人员班组与工单类型不一致') |
|
|
|
// // return; |
|
|
|
// // } |
|
|
|
// // } |
|
|
|
|
|
|
|
|
|
|
|
// const dataOne = { |
|
|
|
// number: data.value.number, |
|
|
|
// status: data.value.status, |
|
|
|
// id: data.value.id, |
|
|
|
// result: type1 == 2||type1 == 3 ? result.value : '', |
|
|
|
// requestNumber: data.value.requestNumber, |
|
|
|
// 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 |
|
|
|
// } |
|
|
|
// let tips = data.value.status == 'PENDING' ? '是否接单?' : data.value.status == 'PECEIVED' ? '是否完成?' : data.value.status == 'COMPLETED' && data.value.requestNumber && data.value.applyer == store.id ? '是否确认提交?' :data.value.status == 'COMPLETED' && !data.value.requestNumber ? '是否验证完结?':data.value.status == 'APPLYPASS' ? '是否验证完结?':'' |
|
|
|
// if(type1 == 2 || type1 ==3){ |
|
|
|
// // 如果直接点击完成先走修改工单接口 |
|
|
|
// if (data.value.status == 'PECEIVED') { |
|
|
|
// await repairOrderApi.repairOrderUpdate(dataTwo).then((res) => { }).catch(() => { |
|
|
|
// proxy.$modal.closeLoading() |
|
|
|
// loading.value = false |
|
|
|
// }) |
|
|
|
// } |
|
|
|
// proxy.$modal.confirm(tips).then(async () => { |
|
|
|
// proxy.$modal.loading('加载中') |
|
|
|
// loading.value = true |
|
|
|
// await repairOrderApi.orderClick(dataOne).then((res) => { |
|
|
|
// if (res.data) { |
|
|
|
// proxy.$modal.showToast('操作成功') |
|
|
|
// setTimeout(() => { |
|
|
|
// if(type1==3){ |
|
|
|
// // proxy.$tab.navigateTo(`/pages/repairOrder/index?type=${type.value}&flag=2`) |
|
|
|
// proxy.$tab.navigateBack() |
|
|
|
// }else{ |
|
|
|
// // proxy.$tab.navigateTo(`/pages/repairOrder/index?type=${type.value}`) |
|
|
|
// proxy.$tab.navigateBack() |
|
|
|
// } |
|
|
|
|
|
|
|
// loading.value = false |
|
|
|
// }, 1500) |
|
|
|
// } else { |
|
|
|
// proxy.$modal.showToast('操作失败') |
|
|
|
// loading.value = false |
|
|
|
// } |
|
|
|
// }).catch(() => { |
|
|
|
// proxy.$modal.closeLoading() |
|
|
|
// loading.value = false |
|
|
|
// }) |
|
|
|
// }) |
|
|
|
// }else{ |
|
|
|
// 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(async(res) => { |
|
|
|
// if (res.data) { |
|
|
|
// proxy.$modal.showToast('操作成功') |
|
|
|
// await getDeviceRepairDetail(number.value) |
|
|
|
// await getDeviceRepairDetailsByNumber() |
|
|
|
// loading.value = false |
|
|
|
// // setTimeout(() => { |
|
|
|
// // // proxy.$tab.navigateBack() |
|
|
|
|
|
|
|
// // }, 1500) |
|
|
|
// } else { |
|
|
|
// proxy.$modal.showToast('操作失败') |
|
|
|
// loading.value = false |
|
|
|
// } |
|
|
|
// }).catch(() => { |
|
|
|
// proxy.$modal.closeLoading() |
|
|
|
// loading.value = false |
|
|
|
// }) |
|
|
|
// }) |
|
|
|
// } |
|
|
|
// } |
|
|
|
// 点击接单 |
|
|
|
async function orderClick() { |
|
|
|
const dataOne = { |
|
|
|
number: data.value.number, |
|
|
|
status: data.value.status, |
|
|
|
id: data.value.id, |
|
|
|
result: '', |
|
|
|
requestNumber: data.value.requestNumber, |
|
|
|
content: data.value.applyContent ? data.value.applyContent : '' |
|
|
|
} |
|
|
|
proxy.$modal.confirm('是否接单').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(async(res) => { |
|
|
|
await repairOrderApi.orderClick(dataOne, type.value).then(async (res) => { |
|
|
|
if (res.data) { |
|
|
|
proxy.$modal.showToast('操作成功') |
|
|
|
await getDeviceRepairDetail(number.value) |
|
|
|
await getDeviceRepairDetailsByNumber() |
|
|
|
loading.value = false |
|
|
|
// setTimeout(() => { |
|
|
|
// // proxy.$tab.navigateBack() |
|
|
|
|
|
|
|
// }, 1500) |
|
|
|
} else { |
|
|
|
proxy.$modal.showToast('操作失败') |
|
|
|
loading.value = false |
|
|
@ -507,14 +665,14 @@ |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 获取维修报修信息 |
|
|
|
async function getDeviceRepairDetailsByNumber() { |
|
|
|
if (data.value.requestNumber) { |
|
|
|
await repairOrderApi.getDeviceRepairDetailsByNumber({ |
|
|
|
type: type.value, |
|
|
|
requestNumber: data.value.requestNumber |
|
|
|
}).then((res) => { |
|
|
|
}, type.value).then((res) => { |
|
|
|
if (res.data) { |
|
|
|
data1.value = res.data |
|
|
|
} |
|
|
@ -524,8 +682,8 @@ |
|
|
|
// 获取维修内容列表 |
|
|
|
function getRepairOrderDetaiList() { |
|
|
|
repairOrderApi.repairOrderDetailList({ |
|
|
|
number: number.value |
|
|
|
}).then((res) => { |
|
|
|
number: number.value, |
|
|
|
}, type.value).then((res) => { |
|
|
|
if (res.data) { |
|
|
|
serviceList.value = res.data |
|
|
|
} |
|
|
@ -593,7 +751,7 @@ |
|
|
|
proxy.$modal.confirm('是否修改维修工单').then(() => { |
|
|
|
proxy.$modal.loading('加载中') |
|
|
|
loading1.value = true |
|
|
|
repairOrderApi.repairOrderUpdate(paramesData).then((res) => { |
|
|
|
repairOrderApi.repairOrderUpdate(paramesData, type.value).then((res) => { |
|
|
|
proxy.$modal.closeLoading() |
|
|
|
if (res.data) { |
|
|
|
proxy.$modal.showToast('修改成功') |
|
|
@ -612,10 +770,28 @@ |
|
|
|
}) |
|
|
|
} |
|
|
|
async function getDeviceRepairDetail(number) { |
|
|
|
await repairOrderApi.getDeviceRepairDetail(number).then((res) => { |
|
|
|
await repairOrderApi.getDeviceRepairDetail(number,type.value).then((res) => { |
|
|
|
proxy.$modal.closeLoading() |
|
|
|
data.value = res.data |
|
|
|
if (res.data) { |
|
|
|
if (data.value.requestNumber) { |
|
|
|
list.value = [{ |
|
|
|
name: '设备信息', |
|
|
|
value: 1 |
|
|
|
}, { |
|
|
|
name: '报修信息', |
|
|
|
value: 2 |
|
|
|
}, { |
|
|
|
name: '维修内容', |
|
|
|
value: 3 |
|
|
|
}] |
|
|
|
} else { |
|
|
|
list.value = [{ |
|
|
|
name: '设备信息', |
|
|
|
value: 1 |
|
|
|
}, { |
|
|
|
name: '维修内容', |
|
|
|
value: 3 |
|
|
|
}] |
|
|
|
} |
|
|
|
loading.value = false |
|
|
|
}).catch(() => { |
|
|
@ -637,27 +813,7 @@ |
|
|
|
|
|
|
|
}) |
|
|
|
onShow(async () => { |
|
|
|
if (number.value) { |
|
|
|
|
|
|
|
list.value = [{ |
|
|
|
name: '设备信息', |
|
|
|
value: 1 |
|
|
|
}, { |
|
|
|
name: '报修信息', |
|
|
|
value: 2 |
|
|
|
}, { |
|
|
|
name: '维修内容', |
|
|
|
value: 3 |
|
|
|
}] |
|
|
|
} else { |
|
|
|
list.value = [{ |
|
|
|
name: '设备信息', |
|
|
|
value: 1 |
|
|
|
}, { |
|
|
|
name: '维修内容', |
|
|
|
value: 3 |
|
|
|
}] |
|
|
|
} |
|
|
|
getRepairOrderDetaiList() |
|
|
|
maintenanceShift.value = await dictApi.getDict('maintenance_shift') |
|
|
|
faultType.value = await dictApi.getDict('fault_type') |
|
|
|