|
|
@@ -9,11 +9,12 @@
|
|
|
|
|
|
<view class="card_box">
|
|
|
|
|
|
- <workOrderBom :item='objData' v-if='objData' @handleScan='handleScan'></workOrderBom>
|
|
|
+ <workOrderBom :item='objData' pType="job" v-if='objData' @handleScan='handleScan'></workOrderBom>
|
|
|
|
|
|
<paramBom v-if='paramDetailList.length != 0' :list='paramDetailList'></paramBom>
|
|
|
|
|
|
- <deviceBom v-if='objData.equipmentList.length != 0' :list='objData.equipmentList' :ishuoWei="false"></deviceBom>
|
|
|
+ <deviceBom v-if='objData.equipmentList.length != 0' :list='objData.equipmentList' :ishuoWei="false">
|
|
|
+ </deviceBom>
|
|
|
|
|
|
<modelBom v-if='objData.modelList.length != 0' :list='objData.modelList' pattern='job'
|
|
|
ref='modelRef'>
|
|
|
@@ -182,6 +183,7 @@
|
|
|
<script>
|
|
|
import {
|
|
|
getByIdReport,
|
|
|
+ outSourceGetByIdReport,
|
|
|
getByCodeReport,
|
|
|
jobSave
|
|
|
} from '@/api/pda/jobBooking.js'
|
|
|
@@ -284,7 +286,8 @@
|
|
|
.clientEnvironmentId, // *1 主环境-601环境 2 soll-索尔环境 3 tg-碳谷环境
|
|
|
|
|
|
|
|
|
- operateBtn: true
|
|
|
+ operateBtn: true,
|
|
|
+ isOutsource: 0,
|
|
|
}
|
|
|
},
|
|
|
onLoad(options) {
|
|
|
@@ -292,6 +295,7 @@
|
|
|
this.taskType = options.taskType
|
|
|
this.id = options.id
|
|
|
this.taskId = options.taskId
|
|
|
+ this.isOutsource = options.isOutsource
|
|
|
this.getList()
|
|
|
},
|
|
|
|
|
|
@@ -450,7 +454,7 @@
|
|
|
|
|
|
|
|
|
formedNumFn(num) {
|
|
|
- console.log(999,num)
|
|
|
+ console.log(999, num)
|
|
|
this.$refs.jobRef.setFormedNum(num)
|
|
|
|
|
|
},
|
|
|
@@ -458,7 +462,9 @@
|
|
|
|
|
|
getList() {
|
|
|
this.isLoad = false
|
|
|
- getByIdReport(this.id, this.taskId).then(res => {
|
|
|
+
|
|
|
+ let URL = this.isOutsource == 0 ? getByIdReport : outSourceGetByIdReport
|
|
|
+ URL(this.id, this.taskId).then(res => {
|
|
|
|
|
|
this.objData = res
|
|
|
console.log(22, res)
|
|
|
@@ -516,7 +522,7 @@
|
|
|
}
|
|
|
|
|
|
|
|
|
- if (this.taskType == 6 && this.clientEnvironmentId == 3) {
|
|
|
+ if ((this.taskType == 6 || this.isOutsource == 1 ) && this.clientEnvironmentId == 3) {
|
|
|
this.objData.semiProductList = this.objData.pickOutInList
|
|
|
}
|
|
|
|
|
|
@@ -529,7 +535,7 @@
|
|
|
taskId: '',
|
|
|
taskName: ''
|
|
|
}]
|
|
|
-
|
|
|
+
|
|
|
a.extInfo.notBatchReportInfo = [{
|
|
|
allFeedQuantity: '',
|
|
|
allReportWeight: '',
|
|
|
@@ -538,11 +544,13 @@
|
|
|
taskName: '',
|
|
|
notReason: ''
|
|
|
}]
|
|
|
-
|
|
|
+
|
|
|
return {
|
|
|
a
|
|
|
}
|
|
|
})
|
|
|
+
|
|
|
+
|
|
|
this.objData.semiProductList = this.objData.semiProductList
|
|
|
}
|
|
|
|
|
|
@@ -553,7 +561,8 @@
|
|
|
formingWeight: null,
|
|
|
formedNum: null,
|
|
|
formedWeight: null,
|
|
|
- taskId: this.taskId
|
|
|
+ taskId: this.taskId,
|
|
|
+ executorTime: ''
|
|
|
|
|
|
}
|
|
|
|
|
|
@@ -665,7 +674,7 @@
|
|
|
title: '加载中'
|
|
|
});
|
|
|
|
|
|
- console.log(this.objData)
|
|
|
+
|
|
|
|
|
|
if (!this.objData.workReportInfo['formedNum'] && this.objData.workReportInfo['formedNum'] != 0) {
|
|
|
uni.showToast({
|
|
|
@@ -692,12 +701,12 @@
|
|
|
if (this.taskType == 6) {
|
|
|
return e.extInfo.hasOwnProperty('taskId') && e.extInfo.taskId
|
|
|
} else {
|
|
|
- if(e.extInfo.isQualified == 1 || e.extInfo.notType == 5) {
|
|
|
- return e.extInfo.hasOwnProperty('taskId') && e.extInfo.taskId && e.extInfo
|
|
|
- .reportWeight
|
|
|
- } else {
|
|
|
- return e.extInfo.hasOwnProperty('notType') && e.extInfo.notType
|
|
|
- }
|
|
|
+ if (e.extInfo.isQualified == 1 || e.extInfo.notType == 5) {
|
|
|
+ return e.extInfo.hasOwnProperty('taskId') && e.extInfo.taskId && e.extInfo
|
|
|
+ .reportWeight
|
|
|
+ } else {
|
|
|
+ return e.extInfo.hasOwnProperty('notType') && e.extInfo.notType
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
|
|
|
@@ -761,10 +770,27 @@
|
|
|
}
|
|
|
|
|
|
|
|
|
- if (this.clientEnvironmentId == 3 && type == 2 && this.taskType == 6 && this.objData.singleReport ==0) {
|
|
|
+ if (this.clientEnvironmentId == 3 && type == 2 && this.taskType == 6 && this.objData.singleReport ==
|
|
|
+ 0) {
|
|
|
this.objData.semiProductList = []
|
|
|
}
|
|
|
|
|
|
+ if (this.clientEnvironmentId == 3) {
|
|
|
+ if (this.objData && this.objData.executorTime && this.objData.executorTime != undefined) {
|
|
|
+ this.objData.workReportInfo['executorTime'] = this.objData.executorTime
|
|
|
+ delete this.objData.executorTime
|
|
|
+ } else {
|
|
|
+ uni.showToast({
|
|
|
+ title: `请先选择实际报工时间`,
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
+
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ console.log('报工', this.objData)
|
|
|
+
|
|
|
|
|
|
jobSave(this.objData).then(res => {
|
|
|
|