|
|
@ -1,42 +1,44 @@ |
|
|
|
<template> |
|
|
|
<view class="page-wraper"> |
|
|
|
<view class="page-header"> |
|
|
|
<view class="header_job_top"> |
|
|
|
<job-top :dataContent="jobContent"></job-top> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="page-main"> |
|
|
|
<scroll-view scroll-y="true" class="page-main-scroll"> |
|
|
|
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id"> |
|
|
|
<view class="cen_card" style="padding: 5rpx;"> |
|
|
|
<view class="cell_box uni-flex uni-row"> |
|
|
|
<view class="cell_info"> |
|
|
|
<view class="text_lightblue">车间</view> |
|
|
|
<view> |
|
|
|
{{jobContent.workShopCode}} |
|
|
|
</view> |
|
|
|
<view class="header-view"> |
|
|
|
<view class="header_job_top"> |
|
|
|
<job-top :dataContent="jobContent"></job-top> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="cen_card" style="padding: 5rpx;"> |
|
|
|
<view class="cell_box uni-flex uni-row"> |
|
|
|
<view class="cell_info"> |
|
|
|
<view class="text_lightblue">车间</view> |
|
|
|
<view> |
|
|
|
{{jobContent.workShopCode}} |
|
|
|
</view> |
|
|
|
<view class="cell_info"> |
|
|
|
<view class="text_lightblue">生产线</view> |
|
|
|
<view> |
|
|
|
{{item.subList[0].productionLineCode}} |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="cell_info"> |
|
|
|
<view class="text_lightblue">生产线</view> |
|
|
|
<view> |
|
|
|
{{productionLineCode}} |
|
|
|
</view> |
|
|
|
<view class="cell_info"> |
|
|
|
<view class="text_lightblue">班组</view> |
|
|
|
<view> |
|
|
|
{{jobContent.team}} |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="cell_info"> |
|
|
|
<view class="text_lightblue">班组</view> |
|
|
|
<view> |
|
|
|
{{jobContent.team}} |
|
|
|
</view> |
|
|
|
<view class="cell_info"> |
|
|
|
<view class="text_lightblue">班次</view> |
|
|
|
<view> |
|
|
|
{{jobContent.shift}} |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="cell_info"> |
|
|
|
<view class="text_lightblue">班次</view> |
|
|
|
<view> |
|
|
|
{{jobContent.shift}} |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="split_line"></view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="page-main"> |
|
|
|
<scroll-view scroll-y="true" class="page-main-scroll"> |
|
|
|
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id"> |
|
|
|
<view class=""> |
|
|
|
<com-product-detail-card :dataContent="item" :settingParam="jobContent" :isShowLocation="false" |
|
|
|
@remove="updateData" @updateData="updateData" :locationTypeList='toLocationTypeList'> |
|
|
@ -70,7 +72,9 @@ |
|
|
|
import { |
|
|
|
getManagementPrecisions |
|
|
|
} from '@/common/balance.js'; |
|
|
|
import { getCurrDateTime} from '@/common/basic.js'; |
|
|
|
import { |
|
|
|
getCurrDateTime |
|
|
|
} from '@/common/basic.js'; |
|
|
|
|
|
|
|
import { |
|
|
|
getProductReceiptJobDetail, |
|
|
@ -143,15 +147,16 @@ |
|
|
|
jobToLocationCode: "", |
|
|
|
fgList: [], |
|
|
|
itemCode: "", |
|
|
|
productionLineCode: "", |
|
|
|
scanMessage: "", |
|
|
|
}; |
|
|
|
}, |
|
|
|
onLoad(option) { |
|
|
|
uni.setNavigationBarTitle({ |
|
|
|
title: option.title+'详情' |
|
|
|
onLoad(option) { |
|
|
|
uni.setNavigationBarTitle({ |
|
|
|
title: option.title + '详情' |
|
|
|
}) |
|
|
|
this.id = option.id; |
|
|
|
this.scanMessage = option.scanMessage ; |
|
|
|
this.scanMessage = option.scanMessage; |
|
|
|
if (this.id != undefined) { |
|
|
|
//新建的任务自动接收 |
|
|
|
if (option.status == "1") { |
|
|
@ -226,8 +231,9 @@ |
|
|
|
that.subList = res.data.subList; |
|
|
|
that.jobStatus = res.data.status |
|
|
|
that.jobToLocationCode = that.subList[0].toLocationCode |
|
|
|
if(that.jobContent.allowModifyLocation=='FALSE'){ |
|
|
|
that.toLocationCode = that.subList[0].toLocationCode |
|
|
|
that.productionLineCode = that.subList[0].productionLineCode; |
|
|
|
if (that.jobContent.allowModifyLocation == 'FALSE') { |
|
|
|
that.toLocationCode = that.subList[0].toLocationCode |
|
|
|
} |
|
|
|
that.toLocationTypeList = getDirectoryItemArray(that.jobContent.toLocationTypes) |
|
|
|
that.detailSource = getDataSource(that.subList) |
|
|
@ -243,11 +249,11 @@ |
|
|
|
}, |
|
|
|
|
|
|
|
getScanResult(result) { |
|
|
|
let that = this; |
|
|
|
let that = this; |
|
|
|
//TODO缺少零件号的对应关系 |
|
|
|
//查询mes码是否完工 |
|
|
|
isCheckMesCode(result.content).then(res=>{ |
|
|
|
if(res.data){ |
|
|
|
isCheckMesCode(result.content).then(res => { |
|
|
|
if (res.data) { |
|
|
|
if (that.detailSource.length > 0) { |
|
|
|
let item = that.detailSource[0]; //应该按零件号查找 |
|
|
|
result.uom = item.uom; |
|
|
@ -257,7 +263,7 @@ |
|
|
|
if (subItem.fgList == undefined) { |
|
|
|
subItem.fgList = []; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (subItem.fgList.length == 0) { |
|
|
|
subItem.fgList.push(result); |
|
|
|
that.calcFgQty(this.detailSource); |
|
|
@ -270,23 +276,24 @@ |
|
|
|
subItem.fgList.push(result); |
|
|
|
that.calcFgQty(this.detailSource); |
|
|
|
} else { |
|
|
|
this.showQuestionMessage("标签【" + result.content + '】已经扫描,是否移除', confirm => { |
|
|
|
subItem.fgList.splice(itemIndex, 1) |
|
|
|
that.calcFgQty(this.detailSource); |
|
|
|
}) |
|
|
|
this.showQuestionMessage("标签【" + result.content + '】已经扫描,是否移除', |
|
|
|
confirm => { |
|
|
|
subItem.fgList.splice(itemIndex, 1) |
|
|
|
that.calcFgQty(this.detailSource); |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
setTimeout(r => { |
|
|
|
this.scanPopupGetFocus(); |
|
|
|
}, 500) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}).catch(error=>{ |
|
|
|
}).catch(error => { |
|
|
|
this.showErrorMessage(error) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
calcFgQty() { |
|
|
@ -359,9 +366,9 @@ |
|
|
|
this.detailSource.forEach(item => { |
|
|
|
item.subList.forEach(detail => { |
|
|
|
if (detail.scaned) { |
|
|
|
// var info = getPackingNumberAndBatch(this.managementList, detail.itemCode, |
|
|
|
// detail.packingNumber, detail.batch); |
|
|
|
// detail.toPackingNumber = info.packingNumber; |
|
|
|
// var info = getPackingNumberAndBatch(this.managementList, detail.itemCode, |
|
|
|
// detail.packingNumber, detail.batch); |
|
|
|
// detail.toPackingNumber = info.packingNumber; |
|
|
|
packingNumber.push(detail.packingNumber) |
|
|
|
} |
|
|
|
}) |
|
|
@ -374,19 +381,19 @@ |
|
|
|
console.log('打印', res) |
|
|
|
let pointData = [] |
|
|
|
res.data.forEach(item => { |
|
|
|
pointData.push({ |
|
|
|
barcodeString: item.barcodeString, //标签 |
|
|
|
itemCode: item.itemCode || '', //物品代码 |
|
|
|
itemName: item.itemName || '', //物品名称 |
|
|
|
packName: item.packName || '', //包装名称 |
|
|
|
itemType: item.itemType || '', //物料类型 |
|
|
|
itemDesc1: item.itemDesc1 || '', //物品描述 |
|
|
|
relateNumber: item.relateNumber || '', //relateNumber包装号 |
|
|
|
batch: item.batch || '', //批次 |
|
|
|
productionLineCode: item.productionLineCode || '', //生产线 |
|
|
|
shiftCode: item.shiftCode || '', //班次 |
|
|
|
qty: item.qty || '', //数量 |
|
|
|
printTimes: getCurrDateTime() //打印时间 |
|
|
|
pointData.push({ |
|
|
|
barcodeString: item.barcodeString, //标签 |
|
|
|
itemCode: item.itemCode || '', //物品代码 |
|
|
|
itemName: item.itemName || '', //物品名称 |
|
|
|
packName: item.packName || '', //包装名称 |
|
|
|
itemType: item.itemType || '', //物料类型 |
|
|
|
itemDesc1: item.itemDesc1 || '', //物品描述 |
|
|
|
relateNumber: item.relateNumber || '', //relateNumber包装号 |
|
|
|
batch: item.batch || '', //批次 |
|
|
|
productionLineCode: item.productionLineCode || '', //生产线 |
|
|
|
shiftCode: item.shiftCode || '', //班次 |
|
|
|
qty: item.qty || '', //数量 |
|
|
|
printTimes: getCurrDateTime() //打印时间 |
|
|
|
}) |
|
|
|
}) |
|
|
|
console.log('pointData', pointData) |
|
|
@ -414,7 +421,7 @@ |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
getH5BatchPrintingLable( number) { |
|
|
|
getH5BatchPrintingLable(number) { |
|
|
|
let _this = this |
|
|
|
batchPrintingLable(number).then(resLable => { |
|
|
|
console.log('batchPrintingLable', resLable) |
|
|
@ -438,10 +445,10 @@ |
|
|
|
if (!this.checkLocation()) { |
|
|
|
return |
|
|
|
} |
|
|
|
var valiDate =getSwitchInfoByCode("fgProductReceipCommitValidate") |
|
|
|
var valiDate = getSwitchInfoByCode("fgProductReceipCommitValidate") |
|
|
|
this.detailSource.forEach(item => { |
|
|
|
item.subList.forEach(subitem => { |
|
|
|
if(valiDate){ |
|
|
|
if (valiDate) { |
|
|
|
if (subitem.handleQty == undefined) { |
|
|
|
this.showMessage("还没扫码成品不能提交") |
|
|
|
} else { |
|
|
@ -455,14 +462,14 @@ |
|
|
|
this.submitJob(); |
|
|
|
} |
|
|
|
} |
|
|
|
}else { |
|
|
|
if(!subitem.handleQty){ |
|
|
|
subitem.handleQty=subitem.qty |
|
|
|
} else { |
|
|
|
if (!subitem.handleQty) { |
|
|
|
subitem.handleQty = subitem.qty |
|
|
|
} |
|
|
|
subitem.scaned = true |
|
|
|
this.submitJob(); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
@ -511,22 +518,22 @@ |
|
|
|
detail.toBatch = info.batch; |
|
|
|
detail.toContainerNumber = ''; |
|
|
|
detail.toInventoryStatus = detail.inventoryStatus |
|
|
|
detail.toLocationCode = this.toLocationCode |
|
|
|
detail.toLocationCode = this.toLocationCode |
|
|
|
detail.available = 'TRUE' |
|
|
|
if (detail.fgList) { |
|
|
|
detail.fgList.forEach(res => { |
|
|
|
res.outsideItemCode = res.itemCode |
|
|
|
// res.outsideProduceDate = res.productDate |
|
|
|
res.outsideProduceDate = null |
|
|
|
res.outsideProduceDate = null |
|
|
|
res.outsideSerialNumber = res.order |
|
|
|
}) |
|
|
|
}else { |
|
|
|
detail.fgList=[] |
|
|
|
} else { |
|
|
|
detail.fgList = [] |
|
|
|
} |
|
|
|
subList.push(detail) |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
this.jobContent.available = 'TRUE' |
|
|
|
this.jobContent.subList = subList |
|
|
|
this.jobContent.creator = creator; |
|
|
|