Commit 52cf72f8 authored by Damon's avatar Damon

异常单定位

parent 9bdc0864
...@@ -328,13 +328,14 @@ ...@@ -328,13 +328,14 @@
console.log('click cell') console.log('click cell')
this.viewOderItem(item.orderId) this.viewOderItem(item.orderId)
}, },
filish(item){ filish(item){
// 去完工 // 去完工
uni.navigateTo({ uni.navigateTo({
url: 'pages/order/complete?orderId='+item.orderId url: 'pages/order/complete?orderId='+item.orderId
+ "&categoryId=" + item.categoryId + "&categoryId=" + item.categoryId
+ "&orderServiceType=" + item.orderServiceType + "&orderServiceType=" + item.orderServiceType
+ "&inGuaranteePeriod=" + item.inGuaranteePeriod + "&inGuaranteePeriod=" + item.inGuaranteePeriod
+ "&auditResultsId=" + Object.keys(item.auditResults)[0]
}) })
}, },
handleAction(item) { handleAction(item) {
......
...@@ -121,7 +121,8 @@ ...@@ -121,7 +121,8 @@
orderId:0, orderId:0,
categoryId:0, categoryId:0,
orderServiceType:'', orderServiceType:'',
inGuaranteePeriod:'', inGuaranteePeriod:'',
auditResultsId: '',
list: [], list: [],
tabIndex: 0, tabIndex: 0,
scrollTop: 0, //tab标题的滚动条位置 scrollTop: 0, //tab标题的滚动条位置
...@@ -194,7 +195,8 @@ ...@@ -194,7 +195,8 @@
this.orderId = option.orderId this.orderId = option.orderId
this.categoryId = option.categoryId this.categoryId = option.categoryId
this.orderServiceType = decodeURIComponent(option.orderServiceType) this.orderServiceType = decodeURIComponent(option.orderServiceType)
this.inGuaranteePeriod = option.inGuaranteePeriod this.inGuaranteePeriod = option.inGuaranteePeriod
this.auditResultsId = option.auditResultsId
} else { } else {
this.orderId = 11880091 this.orderId = 11880091
this.categoryId = 1100000214 this.categoryId = 1100000214
...@@ -249,12 +251,29 @@ ...@@ -249,12 +251,29 @@
self.$u.api.getCompleteConfigAndData(self.orderId).then((res) => { self.$u.api.getCompleteConfigAndData(self.orderId).then((res) => {
if (res.code == 200) { if (res.code == 200) {
self.list = res.data.config self.list = res.data.config
self.form = res.data.value || {} self.form = res.data.value || {}
// 异常单处理
if (self.auditResultsId) self.checkCompleteError()
} else { } else {
console.log(res.message, "获取订单完工项目失败!"); console.log(res.message, "获取订单完工项目失败!");
} }
}); });
} }
},
checkCompleteError() { // 异常单定位错误项
let self = this
self.list.forEach((panel, panelIndex)=>{
panel.items.forEach((group, groupIndex) =>{
group.items.forEach((ele, eleIndex)=>{
if (ele.fieldsName === self.auditResultsId) {
self.waitHandlerPanelIndex = panelIndex
self.waitHandlerGroupIndex = groupIndex
self.waitHandlerEleIndex = eleIndex
}
})
})
})
this.locationCompleteItem(self.waitHandlerPanelIndex, self.waitHandlerGroupIndex, self.waitHandlerEleIndex)
}, },
saveComplete(){// 保存完工信息 saveComplete(){// 保存完工信息
let self = this let self = this
...@@ -307,7 +326,6 @@ ...@@ -307,7 +326,6 @@
}else if(value&&Array.isArray(value)&&value.length > 0){ }else if(value&&Array.isArray(value)&&value.length > 0){
panelResult.submitted++ panelResult.submitted++
}else if(first){// 记录第一个 为空 并且需要必填的项 用于定位 }else if(first){// 记录第一个 为空 并且需要必填的项 用于定位
console.log(ele)
first = false first = false
self.waitHandlerPanelIndex = panelIndex self.waitHandlerPanelIndex = panelIndex
self.waitHandlerGroupIndex = groupIndex self.waitHandlerGroupIndex = groupIndex
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment