From cab86a7fa59e6d1b8de4d254be8b280aaf0414aa Mon Sep 17 00:00:00 2001
From: songguoqiang <765017469@qq.com>
Date: Wed, 17 Apr 2024 08:33:41 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20=E6=A3=80=E4=BF=AE=E5=B7=A5=E5=8D=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/overhaulOrder.js | 4 +
src/api/upkeepOrder.js | 4 +
src/components/item/slectItemList.vue | 269 +++++++++++++++++++
src/pages/deviceReport/index.vue | 2 +-
src/pages/index.vue | 36 ++-
src/pages/overhaulOrder/addForm.vue | 129 ++++++++-
src/pages/overhaulOrder/addServiceRecord.vue | 8 +-
src/pages/overhaulOrder/detail.vue | 138 +++++++---
src/pages/overhaulOrder/index.vue | 9 +
src/pages/repairOrder/addServiceRecord.vue | 96 ++++++-
src/pages/repairOrder/detail.vue | 159 ++++++++---
src/pages/repairOrder/index.vue | 4 +-
src/pages/repairOrder/transfer.vue | 4 +-
src/pages/upkeepOrder/addServiceRecord.vue | 8 +-
src/pages/upkeepOrder/detail.vue | 73 ++++-
src/static/images/icon11.svg | 18 ++
16 files changed, 860 insertions(+), 101 deletions(-)
create mode 100644 src/components/item/slectItemList.vue
create mode 100644 src/static/images/icon11.svg
diff --git a/src/api/overhaulOrder.js b/src/api/overhaulOrder.js
index c066caa..fe4a538 100644
--- a/src/api/overhaulOrder.js
+++ b/src/api/overhaulOrder.js
@@ -17,6 +17,10 @@ export function overhaulOrderPage(params) {
export function orderClick(params) {
return http.get('/eam/device-inspection-job-main/onClick',{params})
}
+
+export function onVerify(params) {
+ return http.get('/eam/device-inspection-job-main/onVerify',{params})
+}
// 添加维修工单子项维修内容
export function overhaulOrderDetailCreate(data) {
return http.post('/eam/device-inspection-job-detail/create',data)
diff --git a/src/api/upkeepOrder.js b/src/api/upkeepOrder.js
index 923ba55..7cfc7f1 100644
--- a/src/api/upkeepOrder.js
+++ b/src/api/upkeepOrder.js
@@ -18,6 +18,10 @@ export function orderClick(params) {
return http.get('/eam/device-maintain-job-main/orderClick',{params})
}
+export function orderClickVerify(params) {
+ return http.get('/eam/device-maintain-job-main/orderClickVerify',{params})
+}
+
// 完成保养工单
export function orderClickFinish(params) {
return http.get('/eam/device-maintain-job-main/orderClickFinish',{params})
diff --git a/src/components/item/slectItemList.vue b/src/components/item/slectItemList.vue
new file mode 100644
index 0000000..70cdb35
--- /dev/null
+++ b/src/components/item/slectItemList.vue
@@ -0,0 +1,269 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/pages/deviceReport/index.vue b/src/pages/deviceReport/index.vue
index a42034e..8982982 100644
--- a/src/pages/deviceReport/index.vue
+++ b/src/pages/deviceReport/index.vue
@@ -2,7 +2,7 @@
+ title="报修申请">
diff --git a/src/pages/index.vue b/src/pages/index.vue
index d7c5e22..26b7629 100644
--- a/src/pages/index.vue
+++ b/src/pages/index.vue
@@ -38,16 +38,24 @@
-
+
+
设备维护
-
-
+
+ >
设备报修
+
+
+
+
+ 报修确认
+
+
+
@@ -73,15 +81,29 @@
-
+
+
模具维护
-
+
+ >
模具报修
+
+
+
+
+ 报修确认
+
+
+
+
diff --git a/src/pages/overhaulOrder/addForm.vue b/src/pages/overhaulOrder/addForm.vue
index 6d53198..b2d3b77 100644
--- a/src/pages/overhaulOrder/addForm.vue
+++ b/src/pages/overhaulOrder/addForm.vue
@@ -57,7 +57,34 @@
+
+
+
+ {{selectFormatRadin(form.maintenance,selecUserList)}}
+
+
+ 请选择维修人员
+
+
+
+
+
+
+
+
+
+
+
+
@@ -83,6 +112,7 @@
import * as dictApi from "@/api/dict.js"
import * as repairOrderApi from "@/api/repairOrder.js"
import * as deviceApi from "@/api/device.js"
+ import * as deptApi from "@/api/dept.js"
const { proxy } = getCurrentInstance()
const loading = ref(false)
@@ -96,7 +126,8 @@
faultType: '',
deviceName: '',
deviceNumber: '',
- faultTypeName: ''
+ faultTypeName: '',
+ maintenance:''
})
@@ -108,6 +139,10 @@
const isDisabled = ref(false)
const choosesingleColumnItem = ref([])
const msg = ref('')
+ //维修人员
+ const selecUserList = ref([])//维修人员
+ const isShowSelecUser = ref(false)
+ const chooseUserInfo = ref({})
function submit() {
// 校验
if (!form.value.describes) {
@@ -127,6 +162,10 @@
proxy.$modal.showToast('请选择故障类型')
return;
}
+ if (!form.value.maintenance) {
+ proxy.$modal.showToast('请选择维修人员')
+ return;
+ }
const data = {
id: form.value && form.value.id ? form.value.id : '',
describes: form.value.describes,
@@ -135,6 +174,7 @@
factoryAreaNumber: form.value.factoryAreaNumber,
type: type.value,
faultType: form.value.faultType,
+ maintenance:form.value.maintenance
}
if (form.value.id) {
proxy.$modal.confirm('是否修改检修工单').then(() => {
@@ -200,7 +240,8 @@
faultType: '',
deviceName:'',
deviceNumber:'',
- faultTypeName:''
+ faultTypeName:'',
+ maintenance:''
}
isDisabled.value = false
}
@@ -339,6 +380,50 @@
})
})
+
+ // 打开人员列表
+ function openSelecUser(fieldName) {
+ field.value = fieldName
+ getSelecUser();
+ isShowSelecUser.value = true
+ }
+ function radioGroupChange(field, e, list) {
+ form.value.maintenance = e;
+ chooseUserInfo.value = e
+ }
+ // 选择人员
+ function chooseUser() {
+ form.value[field.value] = chooseUserInfo.value
+ isShowSelecUser.value = false
+ }
+ // 获取人员列表
+ async function getSelecUser() {
+ let data = {
+ classType: type.value,
+ factoryAreaNumber: form.value.factoryAreaNumber,
+ }
+ let arr = []
+ if (form.value.maintenances) {
+ arr = form.value.maintenances.split(',')
+ }
+ await deptApi.getSelecUser(data).then(res => {
+ res.data.forEach(item => {
+ item.checked = false
+ arr.forEach(cur => {
+ if (item.id == cur) {
+ item.checked = true
+ }
+ })
+ })
+ selecUserList.value = res.data
+ })
+ }
+
+ // 多选选择框回显
+ function selectFormatRadin(val, array) {
+ let str = array.filter(item => item.id == val)[0].name
+ return str
+ }
\ No newline at end of file
diff --git a/src/pages/overhaulOrder/addServiceRecord.vue b/src/pages/overhaulOrder/addServiceRecord.vue
index 597c228..cd45ce7 100644
--- a/src/pages/overhaulOrder/addServiceRecord.vue
+++ b/src/pages/overhaulOrder/addServiceRecord.vue
@@ -412,7 +412,12 @@
}
// 获取备件列表
async function getSparePartsList() {
- await sparePartsApi.getSparePartsList().then(res => {
+ number =deviceNumber.value
+ let param = {
+ number:number,
+ name:name
+ }
+ await sparePartsApi.getSparePartsList(param).then(res => {
res.data.map(item => {
item.value = item.number
item.label = item.name
@@ -492,6 +497,7 @@
if (option.type) type.value = option.type;
if (option.factoryAreaNumber) factoryAreaNumber.value = option.factoryAreaNumber;
if (option.number) form.value.number = option.number;
+ if (option.deviceNumber) form.value.deviceNumber = option.deviceNumber;
if (option.data && JSON.parse(decodeURIComponent(option.data)) && JSON.parse(decodeURIComponent(option
.data)).id) {
form.value = JSON.parse(decodeURIComponent(option.data))
diff --git a/src/pages/overhaulOrder/detail.vue b/src/pages/overhaulOrder/detail.vue
index 0937c1e..2a70f42 100644
--- a/src/pages/overhaulOrder/detail.vue
+++ b/src/pages/overhaulOrder/detail.vue
@@ -42,7 +42,7 @@
设备编号:
- {{data.number}}
+ {{data.deviceNumber}}
设备名称:
@@ -122,7 +122,7 @@
-
+
添加检修内容
@@ -131,11 +131,25 @@
+
+
+
+
+
+
@@ -169,6 +183,7 @@
const loading = ref(false)
const type = ref('')
const serviceList = ref([])
+ const isVerifyShowSuccess = ref(false)//验证确认弹出层
function change(index) {
current.value = index
@@ -176,52 +191,81 @@
}
// 添加表格表单
function addSubForm(clickType, item) {
+ if (data.value.status == 'COMPLETED') {
+ return
+ }
if (data.value.status == 'PENDING') {
proxy.$modal.showToast('请先接单')
return
}
if (clickType == 'updata') {
proxy.$tab.navigateTo(
- `/pages/overhaulOrder/addServiceRecord?type=${data.value.type}&factoryAreaNumber=${data.value.factoryAreaNumber}&number=${data.value.number}&data=${encodeURIComponent(JSON.stringify(item))}`
+ `/pages/overhaulOrder/addServiceRecord?type=${data.value.type}&factoryAreaNumber=${data.value.factoryAreaNumber}&number=${data.value.number}&data=${encodeURIComponent(JSON.stringify(item))}&deviceNumber=${data.value.deviceNumber}`
)
} else {
proxy.$tab.navigateTo(
- `/pages/overhaulOrder/addServiceRecord?type=${data.value.type}&factoryAreaNumber=${data.value.factoryAreaNumber}&number=${data.value.number}`
+ `/pages/overhaulOrder/addServiceRecord?type=${data.value.type}&factoryAreaNumber=${data.value.factoryAreaNumber}&number=${data.value.number}&deviceNumber=${data.value.deviceNumber}`
)
}
}
// APP维修工单接单、点击完成、验证
- function orderClick() {
- if (!serviceList.value || serviceList.value && serviceList.value.length == 0) {
- proxy.$modal.showToast('请添加检修内容')
- return;
- }
+ function orderClick(type1) {
const paramseData = {
// number: data.number,
// status: data.status,
id: data.value.id,
+ verifyContent:data.value.applyContent
// requestNumber: ''
}
- let tips = '是否完成'
- proxy.$modal.confirm(tips).then(() => {
- proxy.$modal.loading('加载中')
- loading.value = true
- overhaulOrderApi.orderClick(paramseData).then((res) => {
- if (res.data) {
- proxy.$modal.showToast('操作成功')
- setTimeout(() => {
- proxy.$tab.navigateBack()
+ if(type1==0){//点击完成
+ if (!serviceList.value || serviceList.value && serviceList.value.length == 0) {
+ proxy.$modal.showToast('请添加检修内容')
+ return;
+ }
+
+ let tips = '是否完成?'
+ proxy.$modal.confirm(tips).then(() => {
+ proxy.$modal.loading('加载中')
+ loading.value = true
+ overhaulOrderApi.orderClick(paramseData).then((res) => {
+ if (res.data) {
+ proxy.$modal.showToast('操作成功')
+ setTimeout(() => {
+ proxy.$tab.navigateTo(`/pages/overhaulOrder/index?type=${type.value}`)
+ loading.value = false
+ }, 1500)
+ } else {
+ proxy.$modal.showToast('操作失败')
loading.value = false
- }, 1500)
- } else {
- proxy.$modal.showToast('操作失败')
+ }
+ }).catch(() => {
+ proxy.$modal.closeLoading()
loading.value = false
- }
- }).catch(() => {
- proxy.$modal.closeLoading()
- loading.value = false
+ })
})
- })
+ }else if(type1==1){//点击验证
+ let tips = '是否验证完结?'
+ proxy.$modal.confirm(tips).then(async () => {
+ proxy.$modal.loading('加载中')
+ loading.value = true
+ overhaulOrderApi.onVerify(paramseData).then((res) => {
+ if (res.data) {
+ proxy.$modal.showToast('操作成功')
+ setTimeout(() => {
+ proxy.$tab.navigateTo(`/pages/overhaulOrder/index?type=${type.value}`)
+ loading.value = false
+ }, 1500)
+ } else {
+ proxy.$modal.showToast('操作失败')
+ loading.value = false
+ }
+ }).catch(() => {
+ proxy.$modal.closeLoading()
+ loading.value = false
+ })
+ })
+ }
+
}
// 获取维修内容列表
function getOverhaulOrderDetailList() {
@@ -235,13 +279,39 @@
}
// 删除维修内容
function delService(item) {
- proxy.$modal.confirm('确定删除维修内容吗?').then(() => {
- proxy.$modal.loading('加载中')
- overhaulOrderApi.overhaulOrderDetailDelete(item.id).then((res) => {
- proxy.$modal.closeLoading()
- getOverhaulOrderDetailList()
- }).catch(() => { })
- })
+ if(data.status == 'PECEIVED'){
+ proxy.$modal.confirm('确定删除维修内容吗?').then(() => {
+ proxy.$modal.loading('加载中')
+ overhaulOrderApi.overhaulOrderDetailDelete(item.id).then((res) => {
+ proxy.$modal.closeLoading()
+ getOverhaulOrderDetailList()
+ }).catch(() => { })
+ })
+ }
+
+ }
+
+ /**
+ * 点击验证完结填写意见
+ */
+ function orderClickVerify() {
+ data.value.applyContent = null;
+ isVerifyShowSuccess.value = true
+ }
+ /**
+ * 验证取消
+ */
+ function cancel(){
+ data.applyContent = null;
+ isVerifyShowSuccess.value = false
+ }
+
+ /**
+ * 验证确认
+ */
+ function verify() {
+ isVerifyShowSuccess.value = false
+ orderClick(1)
}
onLoad(async (option) => {
if (option.type) type.value = option.type;
diff --git a/src/pages/overhaulOrder/index.vue b/src/pages/overhaulOrder/index.vue
index fd6a857..705417f 100644
--- a/src/pages/overhaulOrder/index.vue
+++ b/src/pages/overhaulOrder/index.vue
@@ -3,6 +3,7 @@
+
@@ -69,6 +70,14 @@
getCurrentInstance
} from 'vue'
import * as overhaulOrderApi from "@/api/overhaulOrder.js"
+ import { useCountStore } from '@/store'
+ const store = useCountStore()
+ const isEngineer = ref(false)
+ if(store.roles.some(item=>item.indexOf('Engineer')>-1)){//如果角色是工程师带添加 普通维修工不能添加
+ isEngineer.value = true
+ }else{
+ isEngineer.value = false
+ }
const { proxy } = getCurrentInstance()
const params = ref({
pageNo: 1,
diff --git a/src/pages/repairOrder/addServiceRecord.vue b/src/pages/repairOrder/addServiceRecord.vue
index f1c1f0e..b33ac29 100644
--- a/src/pages/repairOrder/addServiceRecord.vue
+++ b/src/pages/repairOrder/addServiceRecord.vue
@@ -92,15 +92,41 @@
{{item.name}}
-
-
+
+
+
+
+
+
@@ -115,11 +141,13 @@
import * as repairOrderApi from "@/api/repairOrder.js"
import * as sparePartsApi from "@/api/spareParts.js"
import * as deptApi from "@/api/dept.js"
+ import SelectItemList from "../../components/item/slectItemList.vue"
const { proxy } = getCurrentInstance()
const loading = ref(false)
const type = ref('')
+ const deviceNumber = ref('')
const isPopupShow = ref(false)
const sparePartsList = ref([])
@@ -127,7 +155,7 @@
const singleColumnDefaultValue = ref([])
const singleColumnList = ref([])
const field = ref('')
-
+ const isShowSelectItem = ref(false)
const selecUserList = ref([])
const isShowSelecUser = ref(false)
const form = ref({
@@ -141,7 +169,10 @@
const form1 = ref({
number: "",
name:"",
- qty: 0
+ qty: 0,
+ temporarilyNumber:"",//;临时选中的编码
+ temporarilyName:"",//临时选中的名称
+ searchName:"",//模糊搜索
})
const factoryAreaNumber = ref('')
@@ -218,6 +249,34 @@
}
}
+
+ function chooseItem(item){
+ let arr = singleColumnList.value.filter(cur=>cur.number != item.number)
+ arr.forEach(item=>{
+ item.checked = false
+ })
+ item.checked = !item.checked
+ let arr1 = singleColumnList.value.filter(cur=>cur.number == item.number)
+ form1.value.temporarilyNumber = arr1[0].number;
+ form1.value.temporarilyName = arr1[0].name;
+ }
+
+ async function searchItem(name){
+ await getSparePartsList(null,name);
+ }
+
+ async function chooseItem1(type,forms){
+ if(!forms.value.number&&type==1){
+ proxy.$modal.showToast('请选择备件')
+ return
+ }
+ if(type==1){
+ form1.value.number = forms.value.temporarilyNumber
+ form1.value.name =forms.value.temporarilyName
+ }
+ await getSparePartsList(null,null);
+ isShowSelectItem.value = false;
+ }
// 重置
function reset() {
form.value.describes = ''
@@ -277,7 +336,12 @@
} else {
singleColumnDefaultValue.value = []
}
- singleColumnShow.value = true
+ form1.value.searchName = "";
+ form1.value.temporarilyName = "";
+ form1.value.temporarilyNumber = "";
+ //singleColumnShow.value = true
+ isShowSelectItem.value = true;
+ singleColumnList.value = list
}
// 单列模式点击确定之后
function chooseSingleColumn(e) {
@@ -288,15 +352,22 @@
singleColumnShow.value = false
}
// 获取备件列表
- async function getSparePartsList() {
- await sparePartsApi.getSparePartsList().then(res => {
+ async function getSparePartsList(number,name) {
+ number =deviceNumber.value
+ let param = {
+ number:number,
+ name:name
+ }
+ await sparePartsApi.getSparePartsList(param).then(res => {
res.data.map(item => {
item.value = item.number
item.label = item.name
})
sparePartsList.value = res.data
+ singleColumnList.value = sparePartsList.value
}).catch(() => { })
}
+
// 打开弹窗
function open() {
form1.value = {
@@ -333,6 +404,7 @@
}
onLoad(async (option) => {
if (option.type) type.value = option.type;
+ if (option.deviceNumber) deviceNumber.value = option.deviceNumber;
if (option.factoryAreaNumber) factoryAreaNumber.value = option.factoryAreaNumber;
if (option.number) form.value.number = option.number;
if (option.data && JSON.parse(decodeURIComponent(option.data)) && JSON.parse(decodeURIComponent(option
@@ -500,4 +572,12 @@
::v-deep .u-checkbox-group {
display: grid !important;
}
+ .item-name{
+ font-size: 30rpx;
+ font-weight: bold;
+ padding: 20rpx 0px 0px;
+ }
+ .item-dec{
+ color: #8f8f8f;
+ }
\ No newline at end of file
diff --git a/src/pages/repairOrder/detail.vue b/src/pages/repairOrder/detail.vue
index bcc277d..ff76239 100644
--- a/src/pages/repairOrder/detail.vue
+++ b/src/pages/repairOrder/detail.vue
@@ -5,8 +5,11 @@
维修工单
- 转办
+ -->
+ 转办
@@ -73,6 +76,14 @@
完成时间:
{{$time.formatDate(data.completionTime)}}
+
+ 确认时间:
+ {{$time.formatDate(data.applyTime)}}
+
+
+ 确认意见:
+ {{data.applyContent}}
+
验证时间:
{{$time.formatDate(data.verifyTime)}}
@@ -81,6 +92,10 @@
验证人员:
{{data.verifyer}}
+
+ 验证内容:
+ {{data.verifyContent}}
+
@@ -129,7 +144,7 @@
报修时间:
- {{$time.formatDate(data.createTime)}}
+ {{data1.createTime? $time.formatDate(data1.createTime):null}}
@@ -147,7 +162,7 @@
@@ -202,8 +217,11 @@
完成
-
- 验证完结
+
+ 验证
+
+
+ 维修确认
@@ -222,6 +240,30 @@
确认
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -267,6 +309,8 @@
const type = ref('')
const serviceList = ref([])
const isShowSuccess = ref(false)
+ const isVerifyShowSuccess = ref(false)//验证确认弹出层
+ const isApplyShowSuccess = ref(false)//维修确认弹出层
const orderCompleteResult = ref([]) //订单完成类型
const result = ref('TEMPORARILY')
const data1 = ref('')
@@ -284,17 +328,20 @@
}
// 添加表格表单
function addSubForm(clickType, item) {
+ if (data.value.status == 'APPLYPASS' || data.value.status == 'COMPLETED') {
+ return
+ }
if (data.value.status == 'PENDING') {
proxy.$modal.showToast('请先接单')
return
}
if (clickType == 'updata') {
proxy.$tab.navigateTo(
- `/pages/repairOrder/addServiceRecord?type=${data.value.type}&factoryAreaNumber=${data.value.factoryAreaNumber}&number=${data.value.number}&data=${encodeURIComponent(JSON.stringify(item))}`
+ `/pages/repairOrder/addServiceRecord?type=${data.value.type}&factoryAreaNumber=${data.value.factoryAreaNumber}&number=${data.value.number}&data=${encodeURIComponent(JSON.stringify(item))}&deviceNumber=${data.value.deviceNumber}`
)
} else {
proxy.$tab.navigateTo(
- `/pages/repairOrder/addServiceRecord?type=${data.value.type}&factoryAreaNumber=${data.value.factoryAreaNumber}&number=${data.value.number}`
+ `/pages/repairOrder/addServiceRecord?type=${data.value.type}&factoryAreaNumber=${data.value.factoryAreaNumber}&number=${data.value.number}&deviceNumber=${data.value.deviceNumber}`
)
}
}
@@ -319,6 +366,26 @@
}
isShowSuccess.value = true
}
+ /**
+ * 维修确认点击时间
+ */
+ function orderClickApply() {
+ data.value.applyContent = null;
+ isApplyShowSuccess.value = true
+ }
+ /**
+ * 点击验证完结填写意见
+ */
+ function orderClickVerify() {
+ data.value.applyContent = null;
+ isVerifyShowSuccess.value = true
+ }
+ function cancel(){
+ data.applyContent = null;
+ isVerifyShowSuccess.value = false
+ isApplyShowSuccess.value = false
+ }
+
function radioGroupChange(e) {
result.value = e
}
@@ -326,8 +393,23 @@
isShowSuccess.value = false
orderClick(2)
}
+ /**
+ * 维修确认
+ */
+ function apply(status) {
+ isApplyShowSuccess.value = false
+ result.value = status
+ orderClick(3)
+ }
+ /**
+ * 验证确认
+ */
+ function verify() {
+ isVerifyShowSuccess.value = false
+ orderClick(2)
+ }
// APP维修工单接单、点击完成、验证
- async function orderClick(type) {
+ async function orderClick(type1) {
// 如果是接单
// if (this.data.status == 'PENDING') {
// if (this.$store.state.user.dept.parentId != this.data.factoryAreaNumber) {
@@ -345,8 +427,9 @@
number: data.value.number,
status: data.value.status,
id: data.value.id,
- result: type == 2 ? result.value : '',
+ result: type1 == 2||type1 == 3 ? result.value : '',
requestNumber: data.value.requestNumber,
+ content:data.value.applyContent ? data.value.applyContent:''
}
// 修改工单接口参数
const dataTwo = {
@@ -358,9 +441,8 @@
classes: data.value.classes,
faultType: data.value.faultType
}
- if(type ==2){
- proxy.$modal.loading('加载中')
- loading.value = true
+ 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(() => {
@@ -368,24 +450,31 @@
loading.value = false
})
}
- await repairOrderApi.orderClick(dataOne).then((res) => {
- if (res.data) {
- proxy.$modal.showToast('操作成功')
- setTimeout(() => {
- proxy.$tab.navigateBack()
+ 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`)
+ }else{
+ proxy.$tab.navigateTo(`/pages/repairOrder/index?type=${type.value}`)
+ }
+
+ loading.value = false
+ }, 1500)
+ } else {
+ proxy.$modal.showToast('操作失败')
loading.value = false
- }, 1500)
- } else {
- proxy.$modal.showToast('操作失败')
+ }
+ }).catch(() => {
+ proxy.$modal.closeLoading()
loading.value = false
- }
- }).catch(() => {
- 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
@@ -419,14 +508,16 @@
}
// 获取维修报修信息
async function getDeviceRepairDetailsByNumber() {
- await repairOrderApi.getDeviceRepairDetailsByNumber({
- type: type.value,
- requestNumber: number.value
- }).then((res) => {
- if (res.data) {
- data1.value = res.data
- }
- }).catch(() => { })
+ if(data.value.requestNumber){
+ await repairOrderApi.getDeviceRepairDetailsByNumber({
+ type: type.value,
+ requestNumber: data.value.requestNumber
+ }).then((res) => {
+ if (res.data) {
+ data1.value = res.data
+ }
+ }).catch(() => { })
+ }
}
// 获取维修内容列表
function getRepairOrderDetaiList() {
diff --git a/src/pages/repairOrder/index.vue b/src/pages/repairOrder/index.vue
index 46ce4fe..19d2d0b 100644
--- a/src/pages/repairOrder/index.vue
+++ b/src/pages/repairOrder/index.vue
@@ -3,7 +3,7 @@
-
+
@@ -20,6 +20,7 @@
+
工单单号:{{item.number}}
@@ -106,6 +107,7 @@
}
onLoad((option) => {
if (option.type) params.value.type = option.type;
+ if (option.flag) params.value.flag = option.flag;
})
onShow(() => {
params.value.pageNo = 1
diff --git a/src/pages/repairOrder/transfer.vue b/src/pages/repairOrder/transfer.vue
index 4976c90..51121d5 100644
--- a/src/pages/repairOrder/transfer.vue
+++ b/src/pages/repairOrder/transfer.vue
@@ -49,7 +49,7 @@
-
+
{{selectFormatRadin(form.receiverUserId,selecUserList)}}
@@ -159,7 +159,7 @@
proxy.$modal.showToast('请选择厂区')
return;
}
- if (!form.value.receiverUserId) {
+ if (!form.value.receiverUserId && form.value.status==1) {
proxy.$modal.showToast('请选择维修人员')
return;
}
diff --git a/src/pages/upkeepOrder/addServiceRecord.vue b/src/pages/upkeepOrder/addServiceRecord.vue
index 8820e54..8dec9be 100644
--- a/src/pages/upkeepOrder/addServiceRecord.vue
+++ b/src/pages/upkeepOrder/addServiceRecord.vue
@@ -385,12 +385,16 @@ const form = ref({
form1.value.name = e[0].label
}
}
-
singleColumnShow.value = false
}
// 获取备件列表
async function getSparePartsList() {
- await sparePartsApi.getSparePartsList().then(res => {
+ number =deviceNumber.value
+ let param = {
+ number:number,
+ name:name
+ }
+ await sparePartsApi.getSparePartsList(param).then(res => {
res.data.map(item => {
item.value = item.number
item.label = item.name
diff --git a/src/pages/upkeepOrder/detail.vue b/src/pages/upkeepOrder/detail.vue
index 4a3c766..e654d17 100644
--- a/src/pages/upkeepOrder/detail.vue
+++ b/src/pages/upkeepOrder/detail.vue
@@ -53,7 +53,7 @@
设备编号:
- {{data.number}}
+ {{data.deviceNumber}}
设备名称:
@@ -93,6 +93,10 @@
实际分钟:
{{item.actualMinutes}}分钟
+
+ 保养部位:
+ {{item.equipmentParts}}
+
责任人:
{{item.chargePeoplesName}}
@@ -139,9 +143,23 @@
:disabled='loading'>接单
完成
+ 验证
+
+
+
+
+
+
+
@@ -172,12 +190,16 @@
const type = ref('')
const serviceList = ref([])
const isTrue = ref(false)
+ const isVerifyShowSuccess = ref(false)
function change(index) {
current.value = index
changeItem.value = list.value[current.value]
}
// 添加表格表单
function addSubForm(clickType, item) {
+ if(data.value.status == 'COMPLETED'){//验证
+ return
+ }
if (data.value.status == 'PENDING') {
proxy.$modal.showToast('请先接单')
return
@@ -192,11 +214,12 @@
)
}
}
- function orderClick(type) {
+ function orderClick(type1) {
if(!serviceList.value || serviceList.value&&serviceList.value.length == 0){
proxy.$modal.showToast('没有保养内容')
return;
}
+ let tips = data.value.status == 'PENDING' ? '是否接单?' : data.value.status == 'PECEIVED' ? '是否完成?' : data.value.status == 'COMPLETED' ? '是否验证完结?' :''
// if(type == 2){
// isTrue.value = serviceList.value.some(item=>item.items.length == 0)
// if(isTrue.value){
@@ -204,15 +227,15 @@
// return;
// }
// }
-
+
const paramsData = {
- id: data.value.id
+ id: data.value.id,
+ verifyContent: data.value.applyContent
}
- let tips = data.value.status == 'PENDING' ? '是否接单?' : data.value.status == 'PECEIVED' ? '是否完成?' : ''
proxy.$modal.confirm(tips).then(() => {
proxy.$modal.loading('加载中')
loading.value = true
- if(type == 1){
+ if(type1 == 1){
upkeepOrderApi.orderClick(paramsData).then((res) => {
if (res.data) {
proxy.$modal.showToast('操作成功')
@@ -228,7 +251,7 @@
proxy.$modal.closeLoading()
loading.value = false
})
- }else if(type == 2){
+ }else if(type1 == 2){
upkeepOrderApi.orderClickFinish(paramsData).then((res) => {
if (res.data) {
proxy.$modal.showToast('操作成功')
@@ -244,8 +267,23 @@
proxy.$modal.closeLoading()
loading.value = false
})
+ }else if(type1==3){//验证
+ upkeepOrderApi.orderClickVerify(paramsData).then((res) => {
+ if (res.data) {
+ proxy.$modal.showToast('操作成功')
+ setTimeout(() => {
+ proxy.$tab.navigateTo(`/pages/upkeepOrder/index?type=${type.value}`)
+ loading.value = false
+ }, 1500)
+ } else {
+ proxy.$modal.showToast('操作失败')
+ loading.value = false
+ }
+ }).catch(() => {
+ proxy.$modal.closeLoading()
+ loading.value = false
+ })
}
-
})
}
// 获取维修内容列表
@@ -281,7 +319,24 @@
onShow(() => {
getUpkeepOrderDetailList()
})
-
+ /**
+ * 点击验证完结填写意见
+ */
+ function orderClickVerify() {
+ data.value.applyContent = null;
+ isVerifyShowSuccess.value = true
+ }
+ /**
+ * 验证确认
+ */
+ function verify() {
+ isVerifyShowSuccess.value = false
+ orderClick(3)
+ }
+ function cancel(){
+ data.applyContent = null;
+ isVerifyShowSuccess.value = false
+ }