|
@@ -185,9 +185,10 @@
|
|
|
console.log(id)
|
|
console.log(id)
|
|
|
|
|
|
|
|
// CX-EQ-YLSJL-008 设备
|
|
// CX-EQ-YLSJL-008 设备
|
|
|
- // M001 模具
|
|
|
|
|
- // this.scanItData('M001', id)
|
|
|
|
|
- // return false
|
|
|
|
|
|
|
+ // M001 M002 模具
|
|
|
|
|
+ // W31000055273 物料
|
|
|
|
|
+ this.scanItData('W31000055273', id)
|
|
|
|
|
+ return false
|
|
|
|
|
|
|
|
let _this = this
|
|
let _this = this
|
|
|
uni.scanCode({
|
|
uni.scanCode({
|
|
@@ -200,7 +201,7 @@
|
|
|
|
|
|
|
|
scanItData(result, id) {
|
|
scanItData(result, id) {
|
|
|
scanLedger(result).then(res => {
|
|
scanLedger(result).then(res => {
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
let _arr = []
|
|
let _arr = []
|
|
|
if (res.length == 1 && res[0].rootCategoryLevelId == 4) { // 设备
|
|
if (res.length == 1 && res[0].rootCategoryLevelId == 4) { // 设备
|
|
|
_arr = this.List
|
|
_arr = this.List
|
|
@@ -212,7 +213,7 @@
|
|
|
this.List = _arr
|
|
this.List = _arr
|
|
|
this.$forceUpdate()
|
|
this.$forceUpdate()
|
|
|
|
|
|
|
|
- } else if (res.length >= 1 && res[0].rootCategoryLevelId == 5) {
|
|
|
|
|
|
|
+ } else if (res.length >= 1 && res[0].rootCategoryLevelId == 5) { // 模具
|
|
|
|
|
|
|
|
_arr = this.List
|
|
_arr = this.List
|
|
|
_arr.forEach((e, index) => {
|
|
_arr.forEach((e, index) => {
|
|
@@ -221,10 +222,24 @@
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
this.List = _arr
|
|
this.List = _arr
|
|
|
- console.log(this.List)
|
|
|
|
|
this.$forceUpdate()
|
|
this.$forceUpdate()
|
|
|
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ else if(res.length >= 1 && ['1'].includes(res[0].rootCategoryLevelId)) {
|
|
|
|
|
+
|
|
|
|
|
+ _arr = this.List
|
|
|
|
|
+ _arr.forEach((e, index) => {
|
|
|
|
|
+ if (e.workOrderId == id) {
|
|
|
|
|
+ _arr[index].instanceList = _arr[index].instanceList.concat(res)
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ this.List = _arr
|
|
|
|
|
+
|
|
|
|
|
+ this.$forceUpdate()
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
},
|
|
},
|