|
|
@@ -157,12 +157,14 @@
|
|
|
this.isLastJob = false
|
|
|
}
|
|
|
|
|
|
- if (m.normalQuality == null || m.workOrderType == 2) {
|
|
|
+
|
|
|
+ if (!Object.prototype.hasOwnProperty.call(m, 'normalQuality')) {
|
|
|
this.$set(m, 'normalQuality', {})
|
|
|
- m.normalQuality.quantity = 0
|
|
|
- m.normalQuality.inspectionId = this.inspectionId
|
|
|
- m.normalQuality.inspectionName = this.inspectionName
|
|
|
}
|
|
|
+ m.normalQuality.quantity = 0
|
|
|
+ m.normalQuality.inspectionId = this.inspectionId
|
|
|
+ m.normalQuality.inspectionName = this.inspectionName
|
|
|
+
|
|
|
|
|
|
|
|
|
m.lastObj = {
|
|
|
@@ -173,7 +175,7 @@
|
|
|
m.feedType = 3
|
|
|
|
|
|
|
|
|
- console.log(333, m)
|
|
|
+
|
|
|
|
|
|
delete m.id
|
|
|
|
|
|
@@ -305,21 +307,19 @@
|
|
|
|
|
|
this.List[0].normalQuality.inspectionList = this.inspectionList
|
|
|
|
|
|
+ // let _arr = JSON.parse(JSON.stringify(this.List))
|
|
|
+ // _arr.forEach(e => {
|
|
|
+ // e.turnover.forEach((o) => {
|
|
|
+ // o.extInfo.positionList.forEach(f => {
|
|
|
+ // f.quantity = f.quantity - Number(f.sampleNum)
|
|
|
+ // f.sampleNum = 0
|
|
|
|
|
|
- let _arr = JSON.parse(JSON.stringify(this.List))
|
|
|
- _arr.forEach(e => {
|
|
|
- e.turnover.forEach((o) => {
|
|
|
- o.extInfo.positionList.forEach(f => {
|
|
|
- f.quantity = f.quantity - Number(f.sampleNum)
|
|
|
- f.sampleNum = 0
|
|
|
-
|
|
|
- })
|
|
|
- })
|
|
|
-
|
|
|
- })
|
|
|
+ // })
|
|
|
+ // })
|
|
|
|
|
|
+ // })
|
|
|
|
|
|
- batchSave(_arr).then(res => {
|
|
|
+ batchSave(this.List).then(res => {
|
|
|
uni.navigateBack()
|
|
|
})
|
|
|
},
|