|
|
@@ -23,10 +23,11 @@
|
|
|
<turnoverBom v-if='objData.turnover.length != 0' :list='objData.turnover' :wordItem='objData'
|
|
|
@handleScan='handleScan' @handleDel='handleDel'>
|
|
|
</turnoverBom>
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- <aridRegion v-if='objData.aridRegionList.length != 0' :list='objData.aridRegionList' @handleScan='handleScan' @handleDel='handleDel'></aridRegion>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <aridRegion v-if='objData.aridRegionList.length != 0' :list='objData.aridRegionList'
|
|
|
+ @handleScan='handleScan' @handleDel='handleDel'></aridRegion>
|
|
|
|
|
|
|
|
|
<view class="operate_box rx-sc">
|
|
|
@@ -89,6 +90,8 @@
|
|
|
productRecycleList: [],
|
|
|
aridRegionList: []
|
|
|
},
|
|
|
+
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
@@ -108,29 +111,29 @@
|
|
|
uni.$off("setSelectList");
|
|
|
|
|
|
uni.$on("setSelectList", (selectList, id) => {
|
|
|
-
|
|
|
- let turnover = []
|
|
|
+
|
|
|
+ let turnover = []
|
|
|
let aridRegionList = []
|
|
|
-
|
|
|
+
|
|
|
|
|
|
selectList.forEach(f => {
|
|
|
if (f.rootCategoryLevelId == 7) { // 周转车
|
|
|
- turnover = turnover.concat(f)
|
|
|
+ turnover = turnover.concat(f)
|
|
|
}
|
|
|
})
|
|
|
-
|
|
|
+
|
|
|
selectList.forEach(f => {
|
|
|
if (f.rootCategoryLevelId == 11) { // 干燥区
|
|
|
- aridRegionList = aridRegionList.concat(f)
|
|
|
+ aridRegionList = aridRegionList.concat(f)
|
|
|
}
|
|
|
})
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
this.$set(this.objData, 'turnover', turnover)
|
|
|
this.$set(this.objData, 'aridRegionList', aridRegionList)
|
|
|
this.$forceUpdate()
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
|
|
|
});
|
|
|
|
|
|
@@ -159,34 +162,42 @@
|
|
|
scanItAllData(result) {
|
|
|
scanLedger(result).then(res => {
|
|
|
if (res.length == 1 && res[0].rootCategoryLevelId == 4) { // 设备
|
|
|
- if(this.objData.equipmentList.length == 0) {
|
|
|
- this.objData.equipmentList = res
|
|
|
- this.$forceUpdate()
|
|
|
- } else {
|
|
|
- if(this.objData.equipmentList[0].instanceId != res[0].instanceId) {
|
|
|
- uni.showToast({
|
|
|
- title: '设备不匹配',
|
|
|
- icon: 'none'
|
|
|
- })
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
+ if (this.objData.equipmentList.length == 0) {
|
|
|
+ this.objData.equipmentList = res
|
|
|
+ this.$forceUpdate()
|
|
|
+ } else {
|
|
|
+ if (this.objData.equipmentList[0].instanceId != res[0].instanceId) {
|
|
|
+ uni.showToast({
|
|
|
+ title: '设备不匹配',
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ uni.showToast({
|
|
|
+ title: '设备匹配成功',
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
if (res.length >= 1 && res[0].rootCategoryLevelId == 5) { // 磨具
|
|
|
- if(this.objData.modelList.length == 0) {
|
|
|
- this.objData.modelList = res
|
|
|
- this.$forceUpdate()
|
|
|
- } else {
|
|
|
- if(this.objData.modelList[0].instanceId != res[0].instanceId) {
|
|
|
- uni.showToast({
|
|
|
- title: '模具不匹配',
|
|
|
- icon: 'none'
|
|
|
- })
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- else if (res.length == 1 && res[0].rootCategoryLevelId == 7) { // 周转车
|
|
|
+ if (this.objData.modelList.length == 0) {
|
|
|
+ this.objData.modelList = res
|
|
|
+ this.$forceUpdate()
|
|
|
+ } else {
|
|
|
+ if (this.objData.modelList[0].instanceId != res[0].instanceId) {
|
|
|
+ uni.showToast({
|
|
|
+ title: '模具不匹配',
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ uni.showToast({
|
|
|
+ title: '设备匹配成功',
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else if (res.length == 1 && res[0].rootCategoryLevelId == 7) { // 周转车
|
|
|
|
|
|
let isFals = this.objData.turnover.some(m => m.code == result)
|
|
|
if (isFals) {
|
|
|
@@ -209,7 +220,7 @@
|
|
|
this.objData.turnover.splice(idx, 1)
|
|
|
this.$forceUpdate()
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
if (type == 'aridRegion') {
|
|
|
this.objData.aridRegionList.splice(idx, 1)
|
|
|
this.$forceUpdate()
|
|
|
@@ -287,7 +298,16 @@
|
|
|
|
|
|
|
|
|
save() {
|
|
|
- console.log(this.objData)
|
|
|
+ if(this.objData.aridRegionList.length > 0) {
|
|
|
+ if(!this.objData.aridRegionList[0].occupationTime) {
|
|
|
+ uni.showToast({
|
|
|
+ title: '请输入干燥时间',
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
}
|