|
@@ -19,6 +19,11 @@
|
|
|
:list='item.instanceList'></instanceBom>
|
|
:list='item.instanceList'></instanceBom>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+ <aridRegion v-if='item.aridRegionList.length != 0' :list='item.aridRegionList'
|
|
|
|
|
+ @handleScan='handleScan'></aridRegion>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
<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>
|
|
@@ -45,6 +50,7 @@
|
|
|
import deviceBom from './components/deviceBom.vue'
|
|
import deviceBom from './components/deviceBom.vue'
|
|
|
import modelBom from './components/modelBom.vue'
|
|
import modelBom from './components/modelBom.vue'
|
|
|
import instanceBom from './components/instanceBom.vue'
|
|
import instanceBom from './components/instanceBom.vue'
|
|
|
|
|
+ import aridRegion from './components/aridRegion'
|
|
|
import {
|
|
import {
|
|
|
workorderList,
|
|
workorderList,
|
|
|
getByCode,
|
|
getByCode,
|
|
@@ -62,7 +68,8 @@
|
|
|
workOrderBom,
|
|
workOrderBom,
|
|
|
deviceBom,
|
|
deviceBom,
|
|
|
modelBom,
|
|
modelBom,
|
|
|
- instanceBom
|
|
|
|
|
|
|
+ instanceBom,
|
|
|
|
|
+ aridRegion
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
@@ -95,6 +102,7 @@
|
|
|
if (m.workOrderId == id) {
|
|
if (m.workOrderId == id) {
|
|
|
let modelList = [] // 模具
|
|
let modelList = [] // 模具
|
|
|
let instanceList = [] // 投料
|
|
let instanceList = [] // 投料
|
|
|
|
|
+ let aridRegionList = [] // 干燥区
|
|
|
|
|
|
|
|
selectList.forEach(f => {
|
|
selectList.forEach(f => {
|
|
|
if (f.rootCategoryLevelId == 5) {
|
|
if (f.rootCategoryLevelId == 5) {
|
|
@@ -103,6 +111,8 @@
|
|
|
} else if (f.rootCategoryLevelId == 1) {
|
|
} else if (f.rootCategoryLevelId == 1) {
|
|
|
instanceList = instanceList.concat(f)
|
|
instanceList = instanceList.concat(f)
|
|
|
|
|
|
|
|
|
|
+ } else if (f.rootCategoryLevelId == 11) {
|
|
|
|
|
+ aridRegionList = aridRegionList.concat(f)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
})
|
|
})
|
|
@@ -110,6 +120,7 @@
|
|
|
|
|
|
|
|
this.$set(m, 'modelList', modelList)
|
|
this.$set(m, 'modelList', modelList)
|
|
|
this.$set(m, 'instanceList', instanceList)
|
|
this.$set(m, 'instanceList', instanceList)
|
|
|
|
|
+ this.$set(m, 'aridRegionList', aridRegionList)
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|
|
@@ -120,6 +131,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
},
|
|
},
|
|
@@ -128,19 +140,25 @@
|
|
|
scrolltolower() {},
|
|
scrolltolower() {},
|
|
|
|
|
|
|
|
save() {
|
|
save() {
|
|
|
- let _arr = []
|
|
|
|
|
- _arr = this.List.map(m => {
|
|
|
|
|
|
|
|
|
|
- return {
|
|
|
|
|
- ...m
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ this.List.every(m => {
|
|
|
|
|
+
|
|
|
|
|
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
|
|
+ // if(this.objData.aridRegionList.length > 0) {
|
|
|
|
|
+ // if(!this.objData.aridRegionList[0].occupationTime) {
|
|
|
|
|
+ // uni.showToast({
|
|
|
|
|
+ // title: '请输入干燥时间',
|
|
|
|
|
+ // icon: 'none'
|
|
|
|
|
+ // })
|
|
|
|
|
+ // return false
|
|
|
|
|
+ // }
|
|
|
|
|
+ // }
|
|
|
|
|
|
|
|
console.log(_arr)
|
|
console.log(_arr)
|
|
|
-
|
|
|
|
|
- batchSave(_arr).then(res => {
|
|
|
|
|
|
|
+ return false
|
|
|
|
|
+ batchSave(this.List).then(res => {
|
|
|
|
|
|
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
|
url: `/pages/pda/feeding/index/index?feedStatus=1`,
|
|
url: `/pages/pda/feeding/index/index?feedStatus=1`,
|
|
@@ -156,6 +174,7 @@
|
|
|
m.equipmentList = [] // 设备
|
|
m.equipmentList = [] // 设备
|
|
|
m.modelList = [] // 模具
|
|
m.modelList = [] // 模具
|
|
|
m.instanceList = [] // 投料
|
|
m.instanceList = [] // 投料
|
|
|
|
|
+ m.aridRegionList = [] // 干燥区
|
|
|
delete m.id
|
|
delete m.id
|
|
|
if (this.taskId) {
|
|
if (this.taskId) {
|
|
|
m.taskId = this.taskId
|
|
m.taskId = this.taskId
|
|
@@ -172,6 +191,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
handleScan(id, type) {
|
|
handleScan(id, type) {
|
|
|
console.log(id)
|
|
console.log(id)
|
|
|
console.log(type)
|
|
console.log(type)
|
|
@@ -222,8 +242,9 @@
|
|
|
// CX-EQ-YLSJL-008 设备
|
|
// CX-EQ-YLSJL-008 设备
|
|
|
// M001 M002 模具
|
|
// M001 M002 模具
|
|
|
// S310000552731 物料
|
|
// S310000552731 物料
|
|
|
- // this.scanItData('S310000552731', id)
|
|
|
|
|
- // return false
|
|
|
|
|
|
|
+ // 干燥区
|
|
|
|
|
+ this.scanItData('GZQ026173007-D', id)
|
|
|
|
|
+ return false
|
|
|
|
|
|
|
|
let _this = this
|
|
let _this = this
|
|
|
uni.scanCode({
|
|
uni.scanCode({
|
|
@@ -236,13 +257,13 @@
|
|
|
|
|
|
|
|
scanItData(result, id) {
|
|
scanItData(result, id) {
|
|
|
scanLedger(result).then(res => {
|
|
scanLedger(result).then(res => {
|
|
|
-
|
|
|
|
|
|
|
+ console.log(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
|
|
|
_arr.forEach((e, index) => {
|
|
_arr.forEach((e, index) => {
|
|
|
if (e.workOrderId == id) {
|
|
if (e.workOrderId == id) {
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
_arr[index].equipmentList = res
|
|
_arr[index].equipmentList = res
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
@@ -272,6 +293,37 @@
|
|
|
|
|
|
|
|
this.$forceUpdate()
|
|
this.$forceUpdate()
|
|
|
|
|
|
|
|
|
|
+ } else if (res.length >= 1 && res[0].rootCategoryLevelId == 11) { // 干燥区
|
|
|
|
|
+ _arr = this.List
|
|
|
|
|
+ _arr.forEach((e, index) => {
|
|
|
|
|
+ if (e.workOrderId == id) {
|
|
|
|
|
+ let isFals = _arr[index].aridRegionList.some(m => m.code == res[0]
|
|
|
|
|
+ .aridRegionList[0].code)
|
|
|
|
|
+ if (isFals) {
|
|
|
|
|
+ uni.showToast({
|
|
|
|
|
+ title: '干燥区已存在',
|
|
|
|
|
+ icon: 'none'
|
|
|
|
|
+ })
|
|
|
|
|
+ return false
|
|
|
|
|
+ }
|
|
|
|
|
+ let _obj = res[0].aridRegionList[0]
|
|
|
|
|
+ if (_obj.status == 0) {
|
|
|
|
|
+ _obj['name'] = res[0].name
|
|
|
|
|
+ _obj['region'] = res[0].extInfo.region
|
|
|
|
|
+ _arr[index].aridRegionList = _arr[index].aridRegionList.concat(res[0]
|
|
|
|
|
+ .aridRegionList)
|
|
|
|
|
+ } else {
|
|
|
|
|
+ uni.showToast({
|
|
|
|
|
+ title: '干燥区已占用',
|
|
|
|
|
+ icon: 'none'
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ this.List = _arr
|
|
|
|
|
+
|
|
|
|
|
+ this.$forceUpdate()
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
})
|
|
})
|