|
|
@@ -8,6 +8,9 @@
|
|
|
<view v-for="(item,index) in List" :key="index" class="card_box">
|
|
|
<workOrderBom :item='item' @handleScan='handleScan'></workOrderBom>
|
|
|
|
|
|
+
|
|
|
+ <paramBom v-if='item.paramDetailList.length != 0' :list='item.paramDetailList'></paramBom>
|
|
|
+
|
|
|
<deviceBom v-if='item.equipmentList.length != 0' :workOrderId='item.workOrderId'
|
|
|
:list='item.equipmentList' @scanIt='scanIt'></deviceBom>
|
|
|
|
|
|
@@ -18,7 +21,8 @@
|
|
|
<instanceBom v-if='item.instanceList.length != 0' :workOrderId='item.workOrderId'
|
|
|
:list='item.instanceList'></instanceBom>
|
|
|
|
|
|
- <turnoverBom v-if='item.turnover.length != 0' :list='item.turnover' :wordItem='item'
|
|
|
+
|
|
|
+ <turnoverBom v-if='item.turnover.length != 0' :list='item.turnover' :wordItem='item' pattern='feed'
|
|
|
@handleScan='handleScan' @handleDel='handleDel'></turnoverBom>
|
|
|
|
|
|
<aridRegion v-if='item.aridRegionList.length != 0' :list='item.aridRegionList'
|
|
|
@@ -53,7 +57,9 @@
|
|
|
import modelBom from './components/modelBom.vue'
|
|
|
import instanceBom from './components/instanceBom.vue'
|
|
|
import aridRegion from './components/aridRegion'
|
|
|
+ import paramBom from './components/paramBom.vue'
|
|
|
import turnoverBom from '../jobBooking/components/turnoverBom.vue'
|
|
|
+
|
|
|
import {
|
|
|
workorderList,
|
|
|
getByCode,
|
|
|
@@ -74,6 +80,7 @@
|
|
|
modelBom,
|
|
|
instanceBom,
|
|
|
aridRegion,
|
|
|
+ paramBom,
|
|
|
turnoverBom
|
|
|
},
|
|
|
data() {
|
|
|
@@ -108,7 +115,7 @@
|
|
|
let modelList = [] // 模具
|
|
|
let instanceList = [] // 投料
|
|
|
let aridRegionList = [] // 干燥区
|
|
|
- let turnover = [] // 周转车
|
|
|
+
|
|
|
|
|
|
selectList.forEach(f => {
|
|
|
if (f.rootCategoryLevelId == 5) {
|
|
|
@@ -117,10 +124,7 @@
|
|
|
} else if (f.rootCategoryLevelId == 1) {
|
|
|
instanceList = instanceList.concat(f)
|
|
|
|
|
|
- } else if (f.rootCategoryLevelId == 7) {
|
|
|
- turnover = turnover.concat(f)
|
|
|
-
|
|
|
- }else if (f.rootCategoryLevelId == 11) {
|
|
|
+ } else if (f.rootCategoryLevelId == 11) {
|
|
|
aridRegionList = aridRegionList.concat(f)
|
|
|
}
|
|
|
|
|
|
@@ -129,7 +133,6 @@
|
|
|
|
|
|
this.$set(m, 'modelList', modelList)
|
|
|
this.$set(m, 'instanceList', instanceList)
|
|
|
- this.$set(m, 'turnover', turnover)
|
|
|
this.$set(m, 'aridRegionList', aridRegionList)
|
|
|
|
|
|
|
|
|
@@ -151,27 +154,6 @@
|
|
|
|
|
|
save() {
|
|
|
|
|
|
- let bol
|
|
|
- this.List.forEach(e => {
|
|
|
- if (e.aridRegionList && e.aridRegionList.length > 0) {
|
|
|
- bol = e.aridRegionList.every(v => v.occupationTime)
|
|
|
- } else {
|
|
|
- bol = true
|
|
|
- }
|
|
|
- })
|
|
|
-
|
|
|
- if (!bol) {
|
|
|
- uni.showToast({
|
|
|
- title: '请输入干燥时间',
|
|
|
- icon: 'none'
|
|
|
- })
|
|
|
- return false
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
|
|
|
|
|
|
batchSave(this.List).then(res => {
|
|
|
@@ -184,14 +166,30 @@
|
|
|
},
|
|
|
|
|
|
getList() {
|
|
|
- workorderList(this.idsList).then(res => {
|
|
|
+ workorderList({
|
|
|
+ ids: this.idsList,
|
|
|
+ taskId: this.taskId
|
|
|
+ }).then(res => {
|
|
|
this.List = res.map(m => {
|
|
|
m.workOrderId = m.id
|
|
|
- m.equipmentList = [] // 设备
|
|
|
- m.modelList = [] // 模具
|
|
|
- m.instanceList = [] // 投料
|
|
|
- m.turnover = [] // 周转车
|
|
|
- m.aridRegionList = [] // 干燥区
|
|
|
+
|
|
|
+ if (!m.hasOwnProperty('equipmentList')) {
|
|
|
+ m.equipmentList = [] // 设备
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!m.hasOwnProperty('modelList')) {
|
|
|
+ m.modelList = [] // 模具
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!m.hasOwnProperty('instanceList')) {
|
|
|
+ m.instanceList = [] // 投料
|
|
|
+ }
|
|
|
+ if (!m.hasOwnProperty('aridRegionList')) {
|
|
|
+ m.aridRegionList = [] // 干燥区
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
delete m.id
|
|
|
if (this.taskId) {
|
|
|
@@ -262,8 +260,8 @@
|
|
|
// S310000552731 物料
|
|
|
// 干燥区
|
|
|
// w0300000003140004 周转车
|
|
|
- this.scanItData('w0300000003140004', id)
|
|
|
- return false
|
|
|
+ // this.scanItData('w0300000003140004', id)
|
|
|
+ // return false
|
|
|
|
|
|
let _this = this
|
|
|
uni.scanCode({
|
|
|
@@ -343,25 +341,14 @@
|
|
|
|
|
|
this.$forceUpdate()
|
|
|
} else if (res.length >= 1 && res[0].rootCategoryLevelId == 7) { // 周转车
|
|
|
- _arr = this.List
|
|
|
- _arr.forEach((e, index) => {
|
|
|
- if (e.workOrderId == id) {
|
|
|
- console.log(res)
|
|
|
- let isFals = _arr[index].turnover.some(m => m.code == res[0].code)
|
|
|
- if (isFals) {
|
|
|
- uni.showToast({
|
|
|
- title: '周转车已存在',
|
|
|
- icon: 'none'
|
|
|
- })
|
|
|
- return false
|
|
|
- }
|
|
|
- _arr[index].turnover = _arr[index].turnover.concat(res)
|
|
|
-
|
|
|
- }
|
|
|
- })
|
|
|
- this.List = _arr
|
|
|
-
|
|
|
- this.$forceUpdate()
|
|
|
+ let isFals = _arr[index].turnover.some(m => m.code == res[0].code)
|
|
|
+ if (isFals) {
|
|
|
+ uni.showToast({
|
|
|
+ title: '周转车已存在',
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
+ return false
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -376,10 +363,10 @@
|
|
|
// CX-EQ-YLSJL-008 设备
|
|
|
// M001 M002 模具
|
|
|
// S310000552731 物料
|
|
|
- // w0300000003140004 周转车
|
|
|
+ // w0300000003140004 周转车
|
|
|
// this.scanItAllData('w0300000003140004')
|
|
|
// return false
|
|
|
-
|
|
|
+
|
|
|
|
|
|
let _this = this
|
|
|
uni.scanCode({
|
|
|
@@ -423,16 +410,7 @@
|
|
|
|
|
|
this.$forceUpdate()
|
|
|
|
|
|
- } else if (res.length >= 1 && res[0].rootCategoryLevelId == 7) { // 周转车
|
|
|
- _arr = this.List
|
|
|
- _arr.forEach((e, index) => {
|
|
|
- e.turnover = e.turnover.concat(res)
|
|
|
- })
|
|
|
- this.List = _arr
|
|
|
- this.$forceUpdate()
|
|
|
-
|
|
|
}
|
|
|
-
|
|
|
})
|
|
|
|
|
|
},
|