|
@ -22,9 +22,13 @@ |
|
|
|
|
|
|
|
|
<view class="page-main"> |
|
|
<view class="page-main"> |
|
|
<scroll-view scroll-y="true" class="page-main-scroll"> |
|
|
<scroll-view scroll-y="true" class="page-main-scroll"> |
|
|
<comReturnDetailCardBatch ref='comIssueDetailCard' :dataContent="detailSource" :settingParam="jobContent" |
|
|
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id"> |
|
|
@updateData='updateData' v-if="managementType == 'BY_BATCH'"> |
|
|
<view class=""> |
|
|
</comReturnDetailCardBatch> |
|
|
<comRecommendDetailCard :dataContent="item" :index="index" :settingParam="jobContent" |
|
|
|
|
|
@remove="updateData" @updateData="updateData" @openDetail="openDetail" :isShowToLocation='false' formLocationTitle='库位'> |
|
|
|
|
|
</comRecommendDetailCard> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
</scroll-view> |
|
|
</scroll-view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
@ -42,9 +46,8 @@ |
|
|
<win-scan-button @goScan='openScanDetailPopup'></win-scan-button> |
|
|
<win-scan-button @goScan='openScanDetailPopup'></win-scan-button> |
|
|
<comScanReturnPack ref="comScanIssuePack" @closeScan='closeScan' @updateData='updateData'> |
|
|
<comScanReturnPack ref="comScanIssuePack" @closeScan='closeScan' @updateData='updateData'> |
|
|
</comScanReturnPack> |
|
|
</comScanReturnPack> |
|
|
<!-- 按批次的扫码--> |
|
|
|
|
|
<comScanReturnPackBatch ref="comScanReturnPackBatch" @closeScan='closeScan' @updateData='updateData'> |
|
|
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult'></win-scan-pack-and-location> |
|
|
</comScanReturnPackBatch> |
|
|
|
|
|
|
|
|
|
|
|
<return-detail-info-popup ref="jobDetailPopup"></return-detail-info-popup> |
|
|
<return-detail-info-popup ref="jobDetailPopup"></return-detail-info-popup> |
|
|
<comMessage ref="comMessage"></comMessage> |
|
|
<comMessage ref="comMessage"></comMessage> |
|
@ -70,14 +73,16 @@ |
|
|
getInventoryStatusName |
|
|
getInventoryStatusName |
|
|
} from '@/common/directory.js'; |
|
|
} from '@/common/directory.js'; |
|
|
|
|
|
|
|
|
import { |
|
|
// import { |
|
|
getDataSource |
|
|
// getDataSource |
|
|
} from '@/pages/issue/js/issue.js'; |
|
|
// } from '@/pages/issue/js/issue.js'; |
|
|
|
|
|
|
|
|
import { |
|
|
import { |
|
|
createRecordInfo, |
|
|
createRecordInfo, |
|
|
calcHandleQty, |
|
|
calcHandleQty, |
|
|
getScanCount |
|
|
getScanCount, |
|
|
|
|
|
getDataSource, |
|
|
|
|
|
calcHandleNewQty, |
|
|
} from '@/common/detail.js'; |
|
|
} from '@/common/detail.js'; |
|
|
|
|
|
|
|
|
import { |
|
|
import { |
|
@ -96,6 +101,7 @@ |
|
|
import comReturnDetailCardBatch from '@/pages/purchaseReturn/coms/comReturnDetailCardBatch.vue' |
|
|
import comReturnDetailCardBatch from '@/pages/purchaseReturn/coms/comReturnDetailCardBatch.vue' |
|
|
import comScanReturnPack from '@/pages/purchaseReturn/coms/comScanReturnPack.vue' |
|
|
import comScanReturnPack from '@/pages/purchaseReturn/coms/comScanReturnPack.vue' |
|
|
import comScanReturnPackBatch from '@/pages/purchaseReturn/coms/comScanReturnPackBatch.vue' |
|
|
import comScanReturnPackBatch from '@/pages/purchaseReturn/coms/comScanReturnPackBatch.vue' |
|
|
|
|
|
import comRecommendDetailCard from "@/mycomponents/detail/comRecommendDetailCard.vue" |
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
|
name: 'returnDetail', |
|
|
name: 'returnDetail', |
|
@ -107,7 +113,8 @@ |
|
|
jobTop, |
|
|
jobTop, |
|
|
comScanReturnPack, |
|
|
comScanReturnPack, |
|
|
comScanReturnPackBatch, |
|
|
comScanReturnPackBatch, |
|
|
comReturnDetailCardBatch |
|
|
comReturnDetailCardBatch, |
|
|
|
|
|
comRecommendDetailCard |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
data() { |
|
|
data() { |
|
@ -201,7 +208,7 @@ |
|
|
mask: true |
|
|
mask: true |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
getPurchasereturnJobDetail(that.id).then(res => { |
|
|
getPurchasereturnJobDetail(that.id).then(async res => { |
|
|
uni.hideLoading(); |
|
|
uni.hideLoading(); |
|
|
if (res.data == null) { |
|
|
if (res.data == null) { |
|
|
that.showMessage('未获取到详情'); |
|
|
that.showMessage('未获取到详情'); |
|
@ -211,28 +218,14 @@ |
|
|
that.jobStatus = res.data.status |
|
|
that.jobStatus = res.data.status |
|
|
that.subList = res.data.subList; |
|
|
that.subList = res.data.subList; |
|
|
that.toLocationCode = that.jobContent.toLocationCode |
|
|
that.toLocationCode = that.jobContent.toLocationCode |
|
|
that.detailSource = getDataSource(that.detailSource,that.subList); |
|
|
that.subList.forEach(item=>{ |
|
|
|
|
|
item.isRecommend = true |
|
|
|
|
|
}) |
|
|
|
|
|
that.detailSource = await getDataSource(that.subList) |
|
|
|
|
|
console.log(222,that.detailSource) |
|
|
that.fromLocationCode =that.subList[0].fromLocationCode |
|
|
that.fromLocationCode =that.subList[0].fromLocationCode |
|
|
that.poNumber =that.subList[0].poNumber |
|
|
that.poNumber =that.subList[0].poNumber |
|
|
|
|
|
|
|
|
//获取管理模式,封装参数 |
|
|
|
|
|
var itemCodes = [] |
|
|
|
|
|
res.data.subList.forEach(item => { |
|
|
|
|
|
itemCodes.push(item.itemCode) |
|
|
|
|
|
item.scaned = false |
|
|
|
|
|
}) |
|
|
|
|
|
getManagementPrecisions(itemCodes, that.fromLocationCode, ret => { |
|
|
|
|
|
if (ret.success) { |
|
|
|
|
|
this.managementList = ret.list; |
|
|
|
|
|
this.managementType = this.managementList.some(item => item.ManagementPrecision == |
|
|
|
|
|
'BY_BATCH') ? 'BY_BATCH' : '' |
|
|
|
|
|
if (this.managementType == 'BY_BATCH') { |
|
|
|
|
|
that.detailSource = res.data |
|
|
|
|
|
} else { |
|
|
|
|
|
that.detailSource = getDataSource(that.detailSource, that.subList); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
} else { |
|
|
that.showMessage('列表数据为0'); |
|
|
that.showMessage('列表数据为0'); |
|
|
} |
|
|
} |
|
@ -254,108 +247,182 @@ |
|
|
// }) |
|
|
// }) |
|
|
// }); |
|
|
// }); |
|
|
}, |
|
|
}, |
|
|
|
|
|
getScanResult(result, managementPrecision) { |
|
|
updateData(record) { |
|
|
console.log(33, result, managementPrecision) |
|
|
|
|
|
if (managementPrecision == 'BY_QUANTITY') { |
|
|
if(record){ |
|
|
result.label.batch = '' |
|
|
// let requestLocation = this.detailSource.find(r => r.toLocationCode == record.toLocationCode); |
|
|
this.setDataBatch(result) |
|
|
// let item = requestLocation.Items.find(r => r.itemCode == record.itemCode); |
|
|
} else if (managementPrecision == 'BY_BATCH') { |
|
|
// let itemHandleQty = 0; |
|
|
this.setDataBatch(result) |
|
|
// if (item != undefined) { |
|
|
|
|
|
// item.Locations.forEach(l => { |
|
|
|
|
|
// let batch = l.Batchs.find(b => (b.packingNumber == record.packingNumber || b |
|
|
|
|
|
// .packingNumber == null || b.packingNumber == '') && b.batch == |
|
|
|
|
|
// record.batch); |
|
|
|
|
|
// let handleQty = 0; |
|
|
|
|
|
// if (batch != undefined) { |
|
|
|
|
|
// batch.Records.forEach(res => { |
|
|
|
|
|
// handleQty = calc.add(handleQty, res.qty) |
|
|
|
|
|
// }) |
|
|
|
|
|
// batch.handleQty = handleQty; |
|
|
|
|
|
// itemHandleQty = calc.add(itemHandleQty, handleQty) |
|
|
|
|
|
// } |
|
|
|
|
|
// }) |
|
|
|
|
|
// item.handleQty=itemHandleQty; |
|
|
|
|
|
// } |
|
|
|
|
|
// this.$forceUpdate() |
|
|
|
|
|
} else { |
|
|
} else { |
|
|
//计算扫描数量 |
|
|
this.setData(result) |
|
|
this.detailSource.forEach(detail => { |
|
|
|
|
|
detail.Items.forEach(item => { |
|
|
|
|
|
var taskQty =0; |
|
|
|
|
|
item.taskQty =calc.add(taskQty,item.qty) |
|
|
|
|
|
var totalQty =0; |
|
|
|
|
|
item.Locations.forEach(lco => { |
|
|
|
|
|
lco.Batchs.forEach(batch => { |
|
|
|
|
|
batch.Records.forEach(record => { |
|
|
|
|
|
if(record){ |
|
|
|
|
|
var handleQty =record.qty?record.qty:0 |
|
|
|
|
|
totalQty = calc.add(totalQty,handleQty) |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
}, |
|
|
}) |
|
|
setDataBatch(result) { |
|
|
}) |
|
|
try { |
|
|
}) |
|
|
var packingNumber = result.balance.packingNumber; |
|
|
//实际扫描的数量 |
|
|
var batch = result.label.batch; |
|
|
item.handleQty =totalQty |
|
|
var qty = result.balance.qty; |
|
|
|
|
|
var itemCode = result.balance.itemCode; |
|
|
|
|
|
var locationCode = result.balance.locationCode; |
|
|
|
|
|
var inventoryStatus = result.balance.inventoryStatus; |
|
|
|
|
|
var detail = this.detailSource.find(r => r.itemCode == itemCode); |
|
|
|
|
|
|
|
|
|
|
|
console.log(999, detail.subList) |
|
|
|
|
|
if (detail == undefined) { |
|
|
|
|
|
this.showErrorMessage("物料号【" + itemCode + "】不在列表中") |
|
|
|
|
|
} else { |
|
|
|
|
|
var itemDetail = detail.subList.find(r => { |
|
|
|
|
|
return r.batch == batch && |
|
|
|
|
|
r.fromLocationCode == result.fromLocationCode && |
|
|
|
|
|
r.isRecommend == false |
|
|
}) |
|
|
}) |
|
|
|
|
|
if (itemDetail == undefined) { |
|
|
|
|
|
var newAdd = { |
|
|
|
|
|
itemCode: itemCode, |
|
|
|
|
|
packingNumber: packingNumber, |
|
|
|
|
|
batch: batch, |
|
|
|
|
|
handleQty: Number(result.label.qty), |
|
|
|
|
|
qty: detail.qty, |
|
|
|
|
|
fromLocationCode: locationCode, |
|
|
|
|
|
inventoryStatus: inventoryStatus, |
|
|
|
|
|
toInventoryStatus: inventoryStatus, |
|
|
|
|
|
balance: result.balance, |
|
|
|
|
|
isRecommend: false, |
|
|
|
|
|
isNewAdd: "newAdd" |
|
|
|
|
|
} |
|
|
|
|
|
newAdd.balance.balanceQty = Number(result.balance.qty); |
|
|
|
|
|
newAdd.balance.packQty = Number(result.package.packQty) |
|
|
|
|
|
newAdd.balance.packUnit = result.package.packUnit |
|
|
|
|
|
newAdd.scaned = true; |
|
|
|
|
|
detail.subList.push(newAdd) |
|
|
|
|
|
} else { |
|
|
|
|
|
if (itemDetail.scaned) { |
|
|
|
|
|
itemDetail.handleQty = calc.add(itemDetail.handleQty, Number(result.label.qty)); |
|
|
|
|
|
// this.showErrorMessage("箱码【" + packingNumber + "】,批次【" + batch + "】库位【" + result |
|
|
|
|
|
// .fromLocationCode + "】已经扫描") |
|
|
|
|
|
}else{ |
|
|
|
|
|
itemDetail.scaned = true; |
|
|
|
|
|
itemDetail.handleQty= Number(result.label.qty) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
this.calcHandleQty(); |
|
|
|
|
|
} |
|
|
|
|
|
} catch (e) { |
|
|
|
|
|
this.showMessage(e.message) |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
setData(result) { |
|
|
|
|
|
try { |
|
|
|
|
|
var packingNumber = result.balance.packingNumber; |
|
|
|
|
|
var batch = result.balance.batch; |
|
|
|
|
|
var qty = result.balance.qty; |
|
|
|
|
|
var itemCode = result.balance.itemCode; |
|
|
|
|
|
var locationCode = result.balance.locationCode; |
|
|
|
|
|
var inventoryStatus = result.balance.inventoryStatus; |
|
|
|
|
|
var detail = this.detailSource.find(r => r.itemCode == itemCode); |
|
|
|
|
|
|
|
|
|
|
|
if (detail == undefined) { |
|
|
|
|
|
this.showErrorMessage("物料号【" + itemCode + "】不在列表中") |
|
|
|
|
|
} else { |
|
|
|
|
|
var itemDetail = detail.subList.find(r => { |
|
|
|
|
|
return r.packingNumber == packingNumber && |
|
|
|
|
|
r.batch == batch && |
|
|
|
|
|
r.fromLocationCode == result.fromLocationCode && |
|
|
|
|
|
r.isRecommend == false |
|
|
}) |
|
|
}) |
|
|
|
|
|
if (itemDetail == undefined) { |
|
|
|
|
|
var newAdd = { |
|
|
|
|
|
itemCode: itemCode, |
|
|
|
|
|
packingNumber: packingNumber, |
|
|
|
|
|
batch: batch, |
|
|
|
|
|
handleQty: detail.qty < Number(result.balance.qty) ? detail.qty : Number(result.balance.qty), |
|
|
|
|
|
qty: detail.qty, |
|
|
|
|
|
fromLocationCode: locationCode, |
|
|
|
|
|
inventoryStatus: inventoryStatus, |
|
|
|
|
|
toInventoryStatus: inventoryStatus, |
|
|
|
|
|
balance: result.balance, |
|
|
|
|
|
isRecommend: false, |
|
|
|
|
|
isNewAdd: "newAdd" |
|
|
|
|
|
} |
|
|
|
|
|
newAdd.balance.balanceQty = Number(result.balance.qty); |
|
|
|
|
|
newAdd.balance.packQty = Number(result.package.packQty) |
|
|
|
|
|
newAdd.balance.packUnit = result.package.packUnit |
|
|
|
|
|
newAdd.scaned = true; |
|
|
|
|
|
detail.subList.push(newAdd) |
|
|
|
|
|
this.calcHandleQty(); |
|
|
|
|
|
} else { |
|
|
|
|
|
if (itemDetail.scaned) { |
|
|
|
|
|
this.showErrorMessage("箱码【" + packingNumber + "】,批次【" + batch + "】库位【" + result |
|
|
|
|
|
.fromLocationCode + "】已经扫描") |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} catch (e) { |
|
|
|
|
|
this.showMessage(e.message) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// |
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
calcHandleQty() { |
|
|
submit(){ |
|
|
calcHandleNewQty(this.detailSource) |
|
|
uni.showLoading({ |
|
|
// this.continueScan() |
|
|
title: "提交中....", |
|
|
this.$forceUpdate(); |
|
|
mask: true |
|
|
}, |
|
|
}); |
|
|
updateData() { |
|
|
var params = this.setParams() |
|
|
//删除新添加的 |
|
|
console.log("提交参数", JSON.stringify(params)); |
|
|
for (var i = 0; i < this.detailSource.length; i++) { |
|
|
|
|
|
var item = this.detailSource[i] |
|
|
if (params.subList.length == 0) { |
|
|
for (var j = 0; j < item.subList.length; j++) { |
|
|
uni.hideLoading() |
|
|
var sub = item.subList[j] |
|
|
this.$refs.comMessage.showConfirmMessageModal('请扫描箱码') |
|
|
if (!sub.isRecommend && !sub.scaned) { |
|
|
return |
|
|
item.subList.splice(j, 1) |
|
|
} |
|
|
} |
|
|
if(!this.checkCount()){ |
|
|
|
|
|
uni.hideLoading() |
|
|
|
|
|
return ; |
|
|
|
|
|
} |
|
|
} |
|
|
this.submitJob() |
|
|
} |
|
|
|
|
|
this.calcHandleQty(); |
|
|
|
|
|
}, |
|
|
|
|
|
submit(){ |
|
|
|
|
|
this.checkCount() |
|
|
|
|
|
// uni.showLoading({ |
|
|
|
|
|
// title: "提交中....", |
|
|
|
|
|
// mask: true |
|
|
|
|
|
// }); |
|
|
|
|
|
// var params = this.setParams() |
|
|
|
|
|
// console.log("提交参数", JSON.stringify(params)); |
|
|
|
|
|
|
|
|
|
|
|
// if (params.subList.length == 0) { |
|
|
|
|
|
// uni.hideLoading() |
|
|
|
|
|
// this.$refs.comMessage.showConfirmMessageModal('请扫描箱码') |
|
|
|
|
|
// return |
|
|
|
|
|
// } |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
checkCount(){ |
|
|
checkCount(){ |
|
|
let str="" |
|
|
// 提交的数量和任务数量不一致提示 |
|
|
let commitHint="" |
|
|
let str = '' |
|
|
this.detailSource.subList.forEach(item => { |
|
|
let num = 0 |
|
|
if (this.jobContent.allowPartialComplete == "FALSE") { |
|
|
this.detailSource.forEach((item) => { |
|
|
if (item.qty != item.handleQty) { |
|
|
|
|
|
str += `物料号【${item.itemCode}】实际提交数量【${item.handleQty}】与任务数量【${item.qty}】不一致\n` |
|
|
|
|
|
} |
|
|
|
|
|
} else { |
|
|
|
|
|
//允许部分提交,提交的数量和任务数量不一致,提示 |
|
|
|
|
|
if (item.qty != item.handleQty) { |
|
|
if (item.qty != item.handleQty) { |
|
|
commitHint += `物料号【${item.itemCode}】实际提交数量【${item.handleQty}】与任务数量【${item.qty}】不一致,是否提交?\n` |
|
|
str += `物料号【${item.itemCode}】任务数量【${item.qty}】与实际提交数量【${item.handleQty}】不一致` |
|
|
} |
|
|
} |
|
|
|
|
|
item.subList.forEach((cur,key)=>{ |
|
|
|
|
|
if(cur.isRecommend == false && cur.handleQty){ |
|
|
|
|
|
num++ |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
if(str){ |
|
|
}) |
|
|
str = '不允许提交\n' + str |
|
|
if(!num){ |
|
|
this.showErrorMessage(str) |
|
|
this.$refs.comMessage.showConfirmMessageModal('请扫描箱码') |
|
|
|
|
|
return |
|
|
} |
|
|
} |
|
|
|
|
|
if (str) { |
|
|
if(commitHint){ |
|
|
str = str + '\n是否提交?' |
|
|
this.showQuestionMessage(commitHint,res=>{ |
|
|
this.$refs.comMessage.showQuestionMessage1(str, 'red', res => { |
|
|
if (res) { |
|
|
if (res) { |
|
|
this.submitJob() |
|
|
this.submitJob() |
|
|
} |
|
|
} |
|
|
}) |
|
|
}); |
|
|
} |
|
|
|
|
|
if(str||commitHint){ |
|
|
|
|
|
return false |
|
|
|
|
|
} else { |
|
|
} else { |
|
|
return true |
|
|
this.submitJob() |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
@ -366,9 +433,11 @@ |
|
|
mask: true |
|
|
mask: true |
|
|
}); |
|
|
}); |
|
|
var itemCodes = [] |
|
|
var itemCodes = [] |
|
|
this.detailSource.subList.forEach(cur => { |
|
|
this.detailSource.forEach(item => { |
|
|
|
|
|
item.subList.forEach(cur => { |
|
|
itemCodes.push(cur.itemCode) |
|
|
itemCodes.push(cur.itemCode) |
|
|
}) |
|
|
}) |
|
|
|
|
|
}) |
|
|
//获取管理模式,封装参数 |
|
|
//获取管理模式,封装参数 |
|
|
getManagementPrecisions(itemCodes, this.fromLocationCode, res => { |
|
|
getManagementPrecisions(itemCodes, this.fromLocationCode, res => { |
|
|
if (res.success) { |
|
|
if (res.success) { |
|
@ -395,38 +464,35 @@ |
|
|
var subList = [] |
|
|
var subList = [] |
|
|
var createTime = getCurrDateTime(); |
|
|
var createTime = getCurrDateTime(); |
|
|
var creator = this.$store.state.user.id |
|
|
var creator = this.$store.state.user.id |
|
|
this.detailSource.subList.forEach(r => { |
|
|
this.detailSource.forEach(item => { |
|
|
if (r.scaned) { |
|
|
item.subList.forEach(detail => { |
|
|
let subItem = { |
|
|
if (detail.scaned && !detail.isRecommend) { |
|
|
...r |
|
|
detail.recordList = [] |
|
|
} |
|
|
|
|
|
subItem.recordList = [] |
|
|
|
|
|
let record = {}; |
|
|
let record = {}; |
|
|
record.handleQty = r.qty; |
|
|
record.handleQty = detail.qty; |
|
|
record.toContainerNumber = r |
|
|
record.toContainerNumber = detail |
|
|
.ContainerNumber; |
|
|
.ContainerNumber; |
|
|
record.inventoryStatus = r |
|
|
record.inventoryStatus = detail |
|
|
.inventoryStatus; |
|
|
.inventoryStatus; |
|
|
record.toLocationCode = subItem |
|
|
record.toLocationCode = item |
|
|
.toLocationCode; |
|
|
.toLocationCode; |
|
|
record.supplierCode = r.supplierCode; |
|
|
record.supplierCode =detail.supplierCode; |
|
|
|
|
|
|
|
|
//使用在途库不改变管理模式 |
|
|
//使用在途库不改变管理模式 |
|
|
var info = getPackingNumberAndBatch(this.managementList, r.itemCode, |
|
|
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode, |
|
|
record.packingNumber, r.batch); |
|
|
record.packingNumber, detail.batch); |
|
|
subItem.toPackingNumber = info.packingNumber; |
|
|
detail.toPackingNumber = info.packingNumber; |
|
|
subItem.packingNumber = info.packingNumber; |
|
|
detail.packingNumber = info.packingNumber; |
|
|
subItem.fromPackingNumber = info.packingNumber; |
|
|
detail.fromPackingNumber = info.packingNumber; |
|
|
record.toPackingNumber = info.packingNumber; |
|
|
record.toPackingNumber = info.packingNumber; |
|
|
record.packingNumber = info.packingNumber; |
|
|
record.packingNumber = info.packingNumber; |
|
|
record.fromPackingNumber = info.packingNumber; |
|
|
record.fromPackingNumber = info.packingNumber; |
|
|
record.fromBatch = r.batch; |
|
|
record.fromBatch = detail.batch; |
|
|
record.fromPackingNumber = r.packingNumber |
|
|
record.fromPackingNumber = detail.packingNumber |
|
|
subItem.recordList.push(record); |
|
|
detail.recordList.push(record); |
|
|
subList.push(deepCopyData(subItem)); |
|
|
subList.push(deepCopyData(detail)) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
|
|
|
}) |
|
|
this.jobContent.subList = subList |
|
|
this.jobContent.subList = subList |
|
|
this.jobContent.createTime = createTime; |
|
|
this.jobContent.createTime = createTime; |
|
|
this.jobContent.creator = creator; |
|
|
this.jobContent.creator = creator; |
|
@ -434,7 +500,27 @@ |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
openScanDetailPopup() { |
|
|
openScanDetailPopup() { |
|
|
this.$refs.comScanReturnPackBatch.openScanPopup(this.detailSource, this.jobContent); |
|
|
let fromlocationCode = ''; |
|
|
|
|
|
let fromlocationList = []; |
|
|
|
|
|
console.log(this.detailSource) |
|
|
|
|
|
for (var i = 0; i < this.detailSource.length; i++) { |
|
|
|
|
|
let item = this.detailSource[i]; |
|
|
|
|
|
item.subList.forEach(l => { |
|
|
|
|
|
//重复的库位不往里面插入 |
|
|
|
|
|
var location = fromlocationList.find(res => res == l.fromLocationCode) |
|
|
|
|
|
if (location == undefined) { |
|
|
|
|
|
fromlocationList.push(l.fromLocationCode); |
|
|
|
|
|
} |
|
|
|
|
|
//来源库位赋默认值 |
|
|
|
|
|
if (fromlocationCode == '') { |
|
|
|
|
|
if (!l.scaned) { |
|
|
|
|
|
fromlocationCode = l.fromLocationCode; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
console.log(fromlocationCode, fromlocationList, this.jobContent) |
|
|
|
|
|
this.$refs.scanPopup.openScanPopupForJob(fromlocationCode, fromlocationList, this.jobContent); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
scanPopupGetFocus() { |
|
|
scanPopupGetFocus() { |
|
|