|
|
@@ -57,7 +57,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
- <view class="item rx-sc">
|
|
|
+ <!-- <view class="item rx-sc">
|
|
|
<view class="rx ww50">
|
|
|
<view class="lable lable150 rx-cc ">设备</view>
|
|
|
<view class="content rx-sc">
|
|
|
@@ -75,7 +75,7 @@
|
|
|
|
|
|
</view>
|
|
|
|
|
|
- </view>
|
|
|
+ </view> -->
|
|
|
|
|
|
|
|
|
<view class="item rx-sc">
|
|
|
@@ -113,20 +113,21 @@
|
|
|
|
|
|
</view>
|
|
|
|
|
|
-
|
|
|
-
|
|
|
</view>
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
<view class="content_table2">
|
|
|
<view class="head row rx-sc">
|
|
|
- <view class="item ww25" style="font-size: 20rpx;">
|
|
|
+ <view class="item ww15" style="font-size: 20rpx;">
|
|
|
合格品数量
|
|
|
</view>
|
|
|
<view class="item ww25">报工总重量/{{it.extInfo.weightUnit}} </view>
|
|
|
-
|
|
|
- <view class="item ww40 rx-bc">
|
|
|
+ <view class="item ww20" style="font-size: 20rpx;">
|
|
|
+ 设备
|
|
|
+ </view>
|
|
|
+ <view class="item ww20" style="font-size: 20rpx;">
|
|
|
+ 炉次号
|
|
|
+ </view>
|
|
|
+ <view class="item ww20 rx-bc">
|
|
|
<text>处置</text>
|
|
|
<image v-if='!isDetails' class="icon" @click="handAddListPL(it, idx)"
|
|
|
src="~@/static/pda/add.svg" style="width: 46rpx;height: 46rpx;margin-right: 12rpx;"></image>
|
|
|
@@ -139,7 +140,7 @@
|
|
|
|
|
|
<view class="table">
|
|
|
<view class="tr row rx-sc" v-for="(yy, yyIdx) in it.extInfo.batchReportInfo">
|
|
|
- <view class="item ww25 content_num">
|
|
|
+ <view class="item ww15 content_num">
|
|
|
<view v-if='isDetails'>{{yy.allFeedQuantity }}</view>
|
|
|
<input class="uni-input" v-else v-model="yy.allFeedQuantity"
|
|
|
@input="blurNum($event,idx, yyIdx)" type='number'></input>
|
|
|
@@ -148,14 +149,24 @@
|
|
|
<view v-if='isDetails'>{{yy.allReportWeight }}</view>
|
|
|
<input class="uni-input" v-else v-model="yy.allReportWeight" type='digit'></input>
|
|
|
</view>
|
|
|
+ <view class="item ww20 content_num">
|
|
|
+ <view v-if='isDetails'>{{yy.deviceName }}</view>
|
|
|
+ <zxz-uni-data-select v-else :localdata="deviceList" v-model="yy.deviceId" dataValue='instanceId'
|
|
|
+ format='{name}' dataKey="instanceId" filterable
|
|
|
+ @change=" e => selectValBatch(e, it, idx, yyIdx)" :clear='false'></zxz-uni-data-select>
|
|
|
+ </view>
|
|
|
+ <view class="item ww20 content_num">
|
|
|
+ <view v-if='isDetails'>{{yy.heatNumber }}</view>
|
|
|
+ <input class="uni-input" v-else v-model="yy.heatNumber" type='digit'></input>
|
|
|
+ </view>
|
|
|
|
|
|
|
|
|
|
|
|
- <view class="item ww40" v-if='isDetails'>
|
|
|
+ <view class="item ww20" v-if='isDetails'>
|
|
|
{{ yy.taskName}}
|
|
|
</view>
|
|
|
|
|
|
- <view class="item ww40" v-else>
|
|
|
+ <view class="item ww20" v-else>
|
|
|
<zxz-uni-data-select :localdata="stepsList" v-model="yy.taskId" dataValue='taskId'
|
|
|
format='{taskTypeName}' dataKey="taskId" filterable
|
|
|
@change=" e => yy.taskName = e.taskTypeName" :clear='false'></zxz-uni-data-select>
|
|
|
@@ -179,17 +190,22 @@
|
|
|
|
|
|
<view class="content_table2">
|
|
|
<view class="head row rx-sc">
|
|
|
- <view class="item ww15" style="font-size: 20rpx;">
|
|
|
+ <view class="item ww10" style="font-size: 20rpx;">
|
|
|
不合格数
|
|
|
</view>
|
|
|
|
|
|
- <view class="item ww15" style="font-size: 20rpx;">
|
|
|
+ <view class="item ww10" style="font-size: 20rpx;">
|
|
|
重量
|
|
|
</view>
|
|
|
|
|
|
- <view class="item ww25">类型</view>
|
|
|
-
|
|
|
- <view class="item ww35 rx-bc">
|
|
|
+ <view class="item ww15">类型</view>
|
|
|
+ <view class="item ww15" style="font-size: 20rpx;">
|
|
|
+ 设备
|
|
|
+ </view>
|
|
|
+ <view class="item ww15" style="font-size: 20rpx;">
|
|
|
+ 炉次号
|
|
|
+ </view>
|
|
|
+ <view class="item ww25 rx-bc">
|
|
|
<text>处置/原因</text>
|
|
|
<image v-if='!isDetails' class="icon" @click="handAddListPL4(it, idx)"
|
|
|
src="~@/static/pda/add.svg" style="width: 46rpx;height: 46rpx;margin-right: 12rpx;"></image>
|
|
|
@@ -202,32 +218,40 @@
|
|
|
|
|
|
<view class="table">
|
|
|
<view class="tr row rx-sc" v-for="(yy, yyIdx) in it.extInfo.notBatchReportInfo" :key="'not'+ idx + yyIdx">
|
|
|
- <view class="item ww15 content_num">
|
|
|
+ <view class="item ww10 content_num">
|
|
|
<view v-if='isDetails'>{{yy.allFeedQuantity }}</view>
|
|
|
<input class="uni-input" v-else v-model="yy.allFeedQuantity"
|
|
|
@input="blurNum2($event,idx, yyIdx)" type='number'></input>
|
|
|
</view>
|
|
|
|
|
|
- <view class="item ww15 content_num">
|
|
|
+ <view class="item ww10 content_num">
|
|
|
<view v-if='isDetails'>{{yy.allReportWeight }}</view>
|
|
|
<input class="uni-input" v-else v-model="yy.allReportWeight"
|
|
|
type='number'></input>
|
|
|
</view>
|
|
|
|
|
|
- <view class="item ww25 content_num">
|
|
|
+ <view class="item ww15 content_num">
|
|
|
<zxz-uni-data-select :localdata="notTypeList" v-model="yy.notType" dataValue='code'
|
|
|
format='{name}' dataKey="code" filterable :disabled="isDetails" @change="handLoad()"
|
|
|
:clear='false'></zxz-uni-data-select>
|
|
|
</view>
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- <view class="item ww35" v-if='isDetails'>
|
|
|
+
|
|
|
+ <view class="item ww15 content_num">
|
|
|
+ <view v-if='isDetails'>{{yy.deviceName }}</view>
|
|
|
+ <zxz-uni-data-select :localdata="deviceList" v-model="yy.deviceId" dataValue='instanceId'
|
|
|
+ format='{name}' dataKey="instanceId" filterable
|
|
|
+ @change=" e => selectValNoBatch(e, it, idx, yyIdx)" :clear='false'></zxz-uni-data-select>
|
|
|
+ </view>
|
|
|
+ <view class="item ww15 content_num">
|
|
|
+ <view v-if='isDetails'>{{yy.heatNumber }}</view>
|
|
|
+ <input class="uni-input" v-else v-model="yy.heatNumber" ></input>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="item ww25" v-if='isDetails'>
|
|
|
{{ yy.notType == 5 ? yy.taskName : yy.notReason}}
|
|
|
</view>
|
|
|
|
|
|
-
|
|
|
- <view class="item ww35 content_num" v-if="!isDetails && yy.notType == 5">
|
|
|
+ <view class="item ww25 content_num" v-if="!isDetails && yy.notType == 5">
|
|
|
|
|
|
<zxz-uni-data-select :localdata="stepsList" v-model="yy.taskId" dataValue='taskId'
|
|
|
format='{taskTypeName}' dataKey="taskId" filterable
|
|
|
@@ -235,7 +259,7 @@
|
|
|
|
|
|
|
|
|
</view>
|
|
|
- <view class="item ww35 content_num" v-if="!isDetails && yy.notType != 5">
|
|
|
+ <view class="item ww25 content_num" v-if="!isDetails && yy.notType != 5">
|
|
|
<input class="uni-input" v-if="yy.notType != 5 " v-model="yy.notReason"></input>
|
|
|
</view>
|
|
|
|
|
|
@@ -300,7 +324,15 @@
|
|
|
immediate: true,
|
|
|
deep: true,
|
|
|
handler(newVal) {
|
|
|
- this.deviceList = newVal
|
|
|
+ // this.deviceList = newVal
|
|
|
+ //设备下拉框数据来源
|
|
|
+ let newData=JSON.parse(JSON.stringify(newVal))
|
|
|
+ if(this.isDetails){
|
|
|
+ this.deviceList = newData;
|
|
|
+ }else{
|
|
|
+ this.deviceArr(newData)
|
|
|
+ }
|
|
|
+
|
|
|
this.changeHeatNumber()
|
|
|
}
|
|
|
},
|
|
|
@@ -356,12 +388,26 @@
|
|
|
console.log(this.list)
|
|
|
|
|
|
},
|
|
|
+ mounted(){
|
|
|
+ this.theFirst()
|
|
|
+ },
|
|
|
methods: {
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+ theFirst(){
|
|
|
+ if(this.deviceList.length>0){
|
|
|
+ let obj = this.deviceList[0];
|
|
|
+
|
|
|
+ this.list.map((item,index)=>{
|
|
|
+ this.$set(this.list[index].extInfo.batchReportInfo[0],'deviceName',obj.name)
|
|
|
+ this.$set(this.list[index].extInfo.batchReportInfo[0], 'heatNumber',obj.extInfo.heatNumber)
|
|
|
+ this.$set(this.list[index].extInfo.batchReportInfo[0],'deviceId',obj.instanceId)
|
|
|
+ this.$set(this.list[index].extInfo.notBatchReportInfo[0],'deviceName',obj.name)
|
|
|
+ this.$set(this.list[index].extInfo.notBatchReportInfo[0], 'heatNumber',obj.extInfo.heatNumber)
|
|
|
+ this.$set(this.list[index].extInfo.notBatchReportInfo[0],'deviceId',obj.instanceId)
|
|
|
+
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
getSteps() {
|
|
|
-
|
|
|
getTaskInstanceList(this.item.workOrderId).then(res => {
|
|
|
if (this.item.singleReport == 1) {
|
|
|
this.stepsList = res
|
|
|
@@ -371,14 +417,49 @@
|
|
|
|
|
|
})
|
|
|
},
|
|
|
+ deviceArr(data){
|
|
|
+ data.forEach((o,i) => {
|
|
|
+ o.id=o.id ? o.id.toString()+'/'+i : '';
|
|
|
+ o.instanceId=o.instanceId ? o.instanceId.toString()+'/'+i : '';
|
|
|
+ })
|
|
|
+
|
|
|
+ this.deviceList = data;
|
|
|
+ if (this.deviceList.length == 0) {
|
|
|
+ this.list.forEach((o,index) => {
|
|
|
+ //碳谷合格分批设备炉次号
|
|
|
+ o.extInfo.batchReportInfo.map((report,ridx)=>{
|
|
|
+ this.$set(this.list[index].extInfo.batchReportInfo[ridx],'deviceName',this.deviceList[0].name)
|
|
|
+ this.$set(this.list[index].extInfo.batchReportInfo[ridx],'deviceId',this.deviceList[0].id||this.deviceList[0].instanceId)
|
|
|
+ //炉次号
|
|
|
+ this.$set(this.list[index].extInfo.batchReportInfo[ridx], 'heatNumber',this.deviceList[0].extInfo.heatNumber)
|
|
|
+ })
|
|
|
+ o.extInfo.notBatchReportInfo.map((noReport,noidx)=>{
|
|
|
+ this.$set(this.list[index].extInfo.notBatchReportInfo[noidx],'deviceName',this.deviceList[0].name)
|
|
|
+ this.$set(this.list[index].extInfo.notBatchReportInfo[noidx],'deviceId',this.deviceList[0].id||this.deviceList[0].instanceId)
|
|
|
+ //炉次号
|
|
|
+ this.$set(this.list[index].extInfo.notBatchReportInfo[noidx], 'heatNumber',this.deviceList[0].extInfo.heatNumber)
|
|
|
+ })
|
|
|
+ //碳谷合格分批设备炉次号
|
|
|
+ this.$forceUpdate();
|
|
|
+
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
|
|
|
|
|
|
handAddListPL(it, idx) {
|
|
|
+ let deviceid=''
|
|
|
+ if(this.deviceList.length>0){
|
|
|
+ deviceid=this.deviceList[0].id||this.deviceList[0].instanceId
|
|
|
+ }
|
|
|
this.list[idx].extInfo.batchReportInfo.push({
|
|
|
allFeedQuantity: '',
|
|
|
allReportWeight: '',
|
|
|
taskId: '',
|
|
|
- taskName: ''
|
|
|
+ taskName: '',
|
|
|
+ deviceId: deviceid?deviceid:'',
|
|
|
+ deviceName:this.deviceList.length>0?this.deviceList[0].deviceName:'',
|
|
|
+ heatNumber: this.deviceList.length>0?this.deviceList[0].extInfo.heatNumber:'',
|
|
|
})
|
|
|
this.$forceUpdate()
|
|
|
},
|
|
|
@@ -466,15 +547,45 @@
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
+ selectValBatch(e, item, idx,bidx){
|
|
|
+ let obj = this.deviceList.find((f) => f.id||f.instanceId == e.instanceId);
|
|
|
+ //设备名称
|
|
|
+ this.$set(this.list[idx].extInfo.batchReportInfo[bidx],'deviceName',obj.name)
|
|
|
+ //炉次号
|
|
|
+ this.$set(this.list[idx].extInfo.batchReportInfo[bidx], 'heatNumber',obj.extInfo.heatNumber)
|
|
|
+ //设备id
|
|
|
+ this.$set(this.list[idx].extInfo.batchReportInfo[bidx],'deviceId',obj.id||obj.instanceId)
|
|
|
+ this.$forceUpdate();
|
|
|
+ },
|
|
|
+ selectValNoBatch(e, item, idx,bidx){
|
|
|
+ let obj = this.deviceList.find((f) => f.id||f.instanceId == e.instanceId);
|
|
|
+ //设备名称
|
|
|
+ this.$set(this.list[idx].extInfo.notBatchReportInfo[bidx],'deviceName',obj.name)
|
|
|
+ //炉次号
|
|
|
+ this.$set(this.list[idx].extInfo.notBatchReportInfo[bidx], 'heatNumber',obj.extInfo.heatNumber)
|
|
|
+ //设备id
|
|
|
+ this.$set(this.list[idx].extInfo.notBatchReportInfo[bidx],'deviceId',obj.id||obj.instanceId)
|
|
|
+ console.log('456',this.list[idx].extInfo.notBatchReportInfo[bidx])
|
|
|
+ this.$forceUpdate();
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
handAddListPL4(it, idx) {
|
|
|
+ let deviceid=''
|
|
|
+ if(this.deviceList.length>0){
|
|
|
+ deviceid=this.deviceList[0].id||this.deviceList[0].instanceId
|
|
|
+ }
|
|
|
this.list[idx].extInfo.notBatchReportInfo.push({
|
|
|
allFeedQuantity: '',
|
|
|
allReportWeight: '',
|
|
|
notType: '',
|
|
|
taskId: '',
|
|
|
taskName: '',
|
|
|
- notReason: ''
|
|
|
+ notReason: '',
|
|
|
+ deviceId: deviceid?deviceid:'',
|
|
|
+ deviceName:this.deviceList.length>0?this.deviceList[0].deviceName:'',
|
|
|
+ heatNumber: this.deviceList.length>0?this.deviceList[0].extInfo.heatNumber:''
|
|
|
})
|
|
|
this.$forceUpdate()
|
|
|
},
|
|
|
@@ -491,17 +602,51 @@
|
|
|
|
|
|
|
|
|
changeHeatNumber() {
|
|
|
- this.deviceList.forEach(f => {
|
|
|
- this.list.forEach(o => {
|
|
|
- if (o.deviceId && f.instanceId == o.deviceId && this.deviceList.length > 1) {
|
|
|
- o.extInfo.heatNumber = f.extInfo.heatNumber
|
|
|
- this.$forceUpdate()
|
|
|
- } else if (this.deviceList.length == 1) {
|
|
|
- o.extInfo.heatNumber = this.deviceList[0].extInfo.heatNumber
|
|
|
- this.$forceUpdate()
|
|
|
- }
|
|
|
- })
|
|
|
- })
|
|
|
+ this.deviceList.forEach((f) => {
|
|
|
+ this.list.forEach((o,index) => {
|
|
|
+ // o.deviceId &&
|
|
|
+ // f.instanceId == o.deviceId &&
|
|
|
+ if (
|
|
|
+ this.deviceList.length > 1
|
|
|
+ ) {
|
|
|
+ // o.extInfo.heatNumber = f.extInfo.heatNumber;
|
|
|
+ this.$set(this.list[index].extInfo,'heatNumber',f.extInfo.heatNumber)
|
|
|
+
|
|
|
+ //碳谷合格分批设备炉次号
|
|
|
+ o.extInfo.batchReportInfo.map((report,ridx)=>{
|
|
|
+ if(report.deviceId==f.instanceId){
|
|
|
+ this.$set(this.list[index].extInfo.batchReportInfo[ridx],'heatNumber',f.extInfo.heatNumber)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ o.extInfo.notBatchReportInfo.map((noReport,noidx)=>{
|
|
|
+ if(noReport.deviceId==f.instanceId){
|
|
|
+ this.$set(this.list[index].extInfo.notBatchReportInfo[noidx],'heatNumber',f.extInfo.heatNumber)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.$forceUpdate();
|
|
|
+
|
|
|
+ } else if (this.deviceList.length == 1) {
|
|
|
+ o['deviceId'] = this.deviceList[0].id;
|
|
|
+ // o.extInfo.heatNumber = this.deviceList[0].extInfo.heatNumber;
|
|
|
+ this.$set(this.list[index].extInfo,'heatNumber',this.deviceList[0].extInfo.heatNumber)
|
|
|
+
|
|
|
+ //碳谷合格分批设备炉次号
|
|
|
+ o.extInfo.batchReportInfo.map((report,ridx)=>{
|
|
|
+ this.$set(this.list[index].extInfo.batchReportInfo[ridx],'deviceId',this.deviceList[0].instanceId)
|
|
|
+ this.$set(this.list[index].extInfo.batchReportInfo[ridx],'heatNumber',this.deviceList[0].extInfo.heatNumber)
|
|
|
+ this.$set(this.list[index].extInfo.batchReportInfo[ridx],'deviceName',this.deviceList[0].extInfo.name)
|
|
|
+ })
|
|
|
+ //碳谷合格分批设备炉次号
|
|
|
+ o.extInfo.notBatchReportInfo.map((noReport,noidx)=>{
|
|
|
+ this.$set(this.list[index].extInfo.notBatchReportInfo[noidx],'deviceId',this.deviceList[0].instanceId)
|
|
|
+ this.$set(this.list[index].extInfo.notBatchReportInfo[noidx],'heatNumber',this.deviceList[0].extInfo.heatNumber)
|
|
|
+ this.$set(this.list[index].extInfo.notBatchReportInfo[noidx],'deviceName',this.deviceList[0].extInfo.name)
|
|
|
+ })
|
|
|
+
|
|
|
+ this.$forceUpdate();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
},
|
|
|
|
|
|
toFixedFn(weight, num) {
|
|
|
@@ -820,4 +965,5 @@
|
|
|
margin-right: 10rpx;
|
|
|
|
|
|
}
|
|
|
+
|
|
|
</style>
|