|
|
@@ -310,8 +310,7 @@
|
|
|
m.palletList.push(f)
|
|
|
} else if (f.rootCategoryLevelId == 26) {
|
|
|
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)
|
|
|
}
|
|
|
|
|
|
@@ -350,11 +349,9 @@
|
|
|
|
|
|
|
|
|
handleScan(id, type) {
|
|
|
- console.log(id)
|
|
|
- console.log(type)
|
|
|
|
|
|
- // this.scanData('SCJHGD20240117002', type, id)
|
|
|
- // return false
|
|
|
+
|
|
|
+
|
|
|
|
|
|
uni.scanCode({
|
|
|
success: (res) => {
|
|
|
@@ -394,7 +391,7 @@
|
|
|
|
|
|
},
|
|
|
scanIt(id) {
|
|
|
-
|
|
|
+
|
|
|
uni.scanCode({
|
|
|
success: (res) => {
|
|
|
this.scanItData(res.result, id)
|
|
|
@@ -406,8 +403,8 @@
|
|
|
scanItData(result, id) {
|
|
|
|
|
|
scanLedger(result).then(res => {
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
let _arr = []
|
|
|
if (res.length == 1 && res[0].rootCategoryLevelId == 4) { // 设备
|
|
|
_arr = this.List
|
|
|
@@ -430,8 +427,7 @@
|
|
|
this.List = _arr
|
|
|
this.$forceUpdate()
|
|
|
|
|
|
- } else if (res.length >= 1 && ['1'].includes(res[0].rootCategoryLevelId)) { // 物料
|
|
|
-
|
|
|
+ } else if (res.length >= 1 && [1].includes(Number(res[0].rootCategoryLevelId))) { // 物料
|
|
|
_arr = this.List
|
|
|
_arr.forEach((e, index) => {
|
|
|
if (e.workOrderId == id) {
|
|
|
@@ -442,7 +438,20 @@
|
|
|
|
|
|
this.$forceUpdate()
|
|
|
|
|
|
- } else if (res.length >= 1 && res[0].rootCategoryLevelId == 11) { // 干燥区
|
|
|
+ } else if (res.length >= 1 && [23, 2, 9, 28].includes(Number(res[0].rootCategoryLevelId))) {
|
|
|
+ _arr = this.List
|
|
|
+ _arr.forEach((e, index) => {
|
|
|
+ if (e.workOrderId == id) {
|
|
|
+ _arr[index].semiProductList = _arr[index].semiProductList.concat(res)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.List = _arr
|
|
|
+
|
|
|
+ this.$forceUpdate()
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ else if (res.length >= 1 && res[0].rootCategoryLevelId == 11) { // 干燥区
|
|
|
_arr = this.List
|
|
|
_arr.forEach((e, index) => {
|
|
|
if (e.workOrderId == id) {
|
|
|
@@ -512,6 +521,7 @@
|
|
|
uni.scanCode({
|
|
|
success: (res) => {
|
|
|
this.scanItAllData(res.result)
|
|
|
+
|
|
|
|
|
|
}
|
|
|
})
|
|
|
@@ -540,8 +550,7 @@
|
|
|
this.List = _arr
|
|
|
this.$forceUpdate()
|
|
|
|
|
|
- } else if (res.length >= 1 && ['1'].includes(res[0].rootCategoryLevelId)) {
|
|
|
-
|
|
|
+ } else if (res.length >= 1 && [1].includes(Number(res[0].rootCategoryLevelId))) {
|
|
|
_arr = this.List
|
|
|
_arr.forEach((e, index) => {
|
|
|
e.instanceList = e.instanceList.concat(res)
|
|
|
@@ -550,6 +559,15 @@
|
|
|
|
|
|
this.$forceUpdate()
|
|
|
|
|
|
+ } else if (res.length >= 1 && [23, 2, 9, 28].includes(Number(res[0].rootCategoryLevelId))) {
|
|
|
+ _arr = this.List
|
|
|
+ _arr.forEach((e, index) => {
|
|
|
+ e.semiProductList = e.semiProductList.concat(res)
|
|
|
+ })
|
|
|
+ this.List = _arr
|
|
|
+
|
|
|
+ this.$forceUpdate()
|
|
|
+
|
|
|
}
|
|
|
})
|
|
|
|