|
@@ -8,12 +8,13 @@
|
|
|
<view v-for="(item,index) in List" :key="index" class="card_box">
|
|
<view v-for="(item,index) in List" :key="index" class="card_box">
|
|
|
<workOrderBom :item='item' @handleScan='handleScan'></workOrderBom>
|
|
<workOrderBom :item='item' @handleScan='handleScan'></workOrderBom>
|
|
|
|
|
|
|
|
- <deviceBom v-if='item.equipmentList.length != 0' :workOrderId='item.workOrderId' :list='item.equipmentList'
|
|
|
|
|
- @scanIt='scanIt'></deviceBom>
|
|
|
|
|
-
|
|
|
|
|
- <modelBom v-if='item.modelList.length != 0' :workOrderId='item.workOrderId' :list='item.modelList'></modelBom>
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
|
|
+ <deviceBom v-if='item.equipmentList.length != 0' :workOrderId='item.workOrderId'
|
|
|
|
|
+ :list='item.equipmentList' @scanIt='scanIt'></deviceBom>
|
|
|
|
|
+
|
|
|
|
|
+ <modelBom v-if='item.modelList.length != 0' :workOrderId='item.workOrderId' :list='item.modelList' @scanIt='scanIt'>
|
|
|
|
|
+ </modelBom>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
<view class="operate_box rx-sc">
|
|
<view class="operate_box rx-sc">
|
|
|
<u-button size="small" class="u-reset-button" type="success"
|
|
<u-button size="small" class="u-reset-button" type="success"
|
|
|
@click="handAdd(item.workOrderId)">手动添加</u-button>
|
|
@click="handAdd(item.workOrderId)">手动添加</u-button>
|
|
@@ -49,6 +50,8 @@
|
|
|
batchSave
|
|
batchSave
|
|
|
} from '@/api/pda/picking.js'
|
|
} from '@/api/pda/picking.js'
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
export default {
|
|
export default {
|
|
|
components: {
|
|
components: {
|
|
|
workOrderBom,
|
|
workOrderBom,
|
|
@@ -70,8 +73,6 @@
|
|
|
this.idsList = JSON.parse(queryArray);
|
|
this.idsList = JSON.parse(queryArray);
|
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
this.getList()
|
|
this.getList()
|
|
|
|
|
|
|
|
},
|
|
},
|
|
@@ -177,22 +178,26 @@
|
|
|
|
|
|
|
|
},
|
|
},
|
|
|
scanIt(id) {
|
|
scanIt(id) {
|
|
|
- console.log(id)
|
|
|
|
|
-
|
|
|
|
|
|
|
+ console.log(id)
|
|
|
|
|
+
|
|
|
|
|
+ // CX-EQ-YLSJL-008 设备
|
|
|
|
|
+ // M001 模具
|
|
|
this.scanItData('M001', id)
|
|
this.scanItData('M001', id)
|
|
|
return false
|
|
return false
|
|
|
|
|
|
|
|
- // let _this = this
|
|
|
|
|
- // uni.scanCode({
|
|
|
|
|
- // success: function(res) {
|
|
|
|
|
- // _this.scanItData(res.result, id)
|
|
|
|
|
- // }
|
|
|
|
|
- // })
|
|
|
|
|
|
|
+ let _this = this
|
|
|
|
|
+ uni.scanCode({
|
|
|
|
|
+ success: function(res) {
|
|
|
|
|
+ _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 = []
|
|
|
|
|
|
|
+ console.log(res)
|
|
|
|
|
+ let _arr = []
|
|
|
if (res.length == 1 && res[0].rootCategoryLevelId == 4) { // 设备
|
|
if (res.length == 1 && res[0].rootCategoryLevelId == 4) { // 设备
|
|
|
_arr = this.List
|
|
_arr = this.List
|
|
|
_arr.forEach((e, index) => {
|
|
_arr.forEach((e, index) => {
|
|
@@ -201,17 +206,21 @@
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
this.List = _arr
|
|
this.List = _arr
|
|
|
|
|
+ this.$forceUpdate()
|
|
|
|
|
|
|
|
} else if (res.length >= 1 && res[0].rootCategoryLevelId == 5) {
|
|
} else if (res.length >= 1 && res[0].rootCategoryLevelId == 5) {
|
|
|
- _arr = this.List
|
|
|
|
|
- _arr.forEach((e, index) => {
|
|
|
|
|
- if (e.workOrderId == id) {
|
|
|
|
|
- _arr[index].modelList = res
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- this.List = _arr
|
|
|
|
|
|
|
+ _arr = this.List
|
|
|
|
|
+ _arr.forEach((e, index) => {
|
|
|
|
|
+ if (e.workOrderId == id) {
|
|
|
|
|
+ _arr[index].modelList = res
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ this.List = _arr
|
|
|
|
|
+ this.$forceUpdate()
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
handAdd(id, list) {
|
|
handAdd(id, list) {
|
|
@@ -275,7 +284,7 @@
|
|
|
padding: 10rpx 160rpx;
|
|
padding: 10rpx 160rpx;
|
|
|
|
|
|
|
|
/deep/ .u-button {
|
|
/deep/ .u-button {
|
|
|
- width: 140rpx;
|
|
|
|
|
|
|
+ width: 160rpx;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
</style>
|
|
</style>
|