|
@@ -97,7 +97,6 @@
|
|
|
workorderList,
|
|
workorderList,
|
|
|
getByCode,
|
|
getByCode,
|
|
|
scanLedger
|
|
scanLedger
|
|
|
-
|
|
|
|
|
} from '@/api/pda/workOrder.js'
|
|
} from '@/api/pda/workOrder.js'
|
|
|
|
|
|
|
|
import {
|
|
import {
|
|
@@ -187,7 +186,7 @@
|
|
|
palletList = palletList.concat(f)
|
|
palletList = palletList.concat(f)
|
|
|
} else if (f.rootCategoryLevelId == 26) {
|
|
} else if (f.rootCategoryLevelId == 26) {
|
|
|
revolvingDiskList = revolvingDiskList.concat(f)
|
|
revolvingDiskList = revolvingDiskList.concat(f)
|
|
|
- } else if ([23, 2, 9,28].includes(Number(f.rootCategoryLevelId))) {
|
|
|
|
|
|
|
+ } else if ([23, 2, 9, 28].includes(Number(f.rootCategoryLevelId))) {
|
|
|
semiProductList = semiProductList.concat(f)
|
|
semiProductList = semiProductList.concat(f)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -223,7 +222,7 @@
|
|
|
scrolltolower() {},
|
|
scrolltolower() {},
|
|
|
|
|
|
|
|
save() {
|
|
save() {
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
this.List.forEach(f => {
|
|
this.List.forEach(f => {
|
|
|
f.instanceList.forEach(e => {
|
|
f.instanceList.forEach(e => {
|
|
|
if (Object.prototype.hasOwnProperty.call(e, 'type')) {
|
|
if (Object.prototype.hasOwnProperty.call(e, 'type')) {
|
|
@@ -265,7 +264,7 @@
|
|
|
|
|
|
|
|
if (m.pickOutInList.length > 0) {
|
|
if (m.pickOutInList.length > 0) {
|
|
|
m.pickOutInList.forEach(f => {
|
|
m.pickOutInList.forEach(f => {
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
if (f.rootCategoryLevelId == 1) {
|
|
if (f.rootCategoryLevelId == 1) {
|
|
|
m.instanceList.push(f)
|
|
m.instanceList.push(f)
|
|
|
} else if (f.rootCategoryLevelId == 4) {
|
|
} else if (f.rootCategoryLevelId == 4) {
|
|
@@ -280,7 +279,8 @@
|
|
|
m.palletList.push(f)
|
|
m.palletList.push(f)
|
|
|
} else if (f.rootCategoryLevelId == 26) {
|
|
} else if (f.rootCategoryLevelId == 26) {
|
|
|
m.revolvingDiskList.push(f)
|
|
m.revolvingDiskList.push(f)
|
|
|
- } else if ([23, 2, 9,28].includes(Number(f.rootCategoryLevelId))) {
|
|
|
|
|
|
|
+ } else if ([23, 2, 9, 28].includes(Number(f
|
|
|
|
|
+ .rootCategoryLevelId))) {
|
|
|
m.semiProductList.push(f)
|
|
m.semiProductList.push(f)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -365,20 +365,20 @@
|
|
|
|
|
|
|
|
},
|
|
},
|
|
|
scanIt(id) {
|
|
scanIt(id) {
|
|
|
- console.log(id)
|
|
|
|
|
-
|
|
|
|
|
|
|
|
|
|
uni.scanCode({
|
|
uni.scanCode({
|
|
|
success: (res) => {
|
|
success: (res) => {
|
|
|
this.scanItData(res.result, id)
|
|
this.scanItData(res.result, id)
|
|
|
- console.log(res.result, id)
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
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
|
|
@@ -445,24 +445,31 @@
|
|
|
|
|
|
|
|
this.$forceUpdate()
|
|
this.$forceUpdate()
|
|
|
} else if (res.length >= 1 && res[0].rootCategoryLevelId == 7) { // 周转车
|
|
} else if (res.length >= 1 && res[0].rootCategoryLevelId == 7) { // 周转车
|
|
|
- let isFals = _arr[index].turnover.some(m => m.code == res[0].code)
|
|
|
|
|
- if (isFals) {
|
|
|
|
|
- uni.showToast({
|
|
|
|
|
- title: '周转车已存在',
|
|
|
|
|
- icon: 'none'
|
|
|
|
|
- })
|
|
|
|
|
- return false
|
|
|
|
|
- } else {
|
|
|
|
|
- _arr = this.List
|
|
|
|
|
- _arr.forEach((e, index) => {
|
|
|
|
|
- if (e.workOrderId == id) {
|
|
|
|
|
- _arr[index].turnover = _arr[index].turnover.concat(res)
|
|
|
|
|
|
|
+ _arr = this.List
|
|
|
|
|
+ _arr.forEach((e, index) => {
|
|
|
|
|
+ if (e.workOrderId == id) {
|
|
|
|
|
+ let isFals = _arr[index].turnover.some(m => m.code == res[0].code)
|
|
|
|
|
+ if (isFals) {
|
|
|
|
|
+ uni.showToast({
|
|
|
|
|
+ title: '周转车已存在',
|
|
|
|
|
+ icon: 'none'
|
|
|
|
|
+ })
|
|
|
|
|
+ return false
|
|
|
}
|
|
}
|
|
|
- })
|
|
|
|
|
- this.List = _arr
|
|
|
|
|
-
|
|
|
|
|
- this.$forceUpdate()
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
|
|
+ _arr.forEach((e, index) => {
|
|
|
|
|
+ if (e.workOrderId == id) {
|
|
|
|
|
+ _arr[index].turnover = _arr[index].turnover.concat(res)
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ this.List = _arr
|
|
|
|
|
+ this.$forceUpdate()
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|