|
|
@ -8,10 +8,12 @@ |
|
|
|
<scroll-view scroll-y="true" class=""> |
|
|
|
<view v-for="(toLocation, index) in detailSource"> |
|
|
|
<view class="uni-row uni-flex"> |
|
|
|
<!-- <com-issue-request-info :workShopCode="workShopCode" :dataContent="toLocation"> |
|
|
|
<!-- <com-issue-request-info :workShopCode="workShopCode" :dataContent="toLocation"> |
|
|
|
</com-issue-request-info> --> |
|
|
|
<work-station :workshopCode="workShopCode" :productionLineCode="toLocation.productionLineCode" |
|
|
|
:workStationCode="toLocation.workStationCode" :rawLocationCode="toLocation.toLocationCode"></work-station> |
|
|
|
<work-station :workshopCode="workShopCode" |
|
|
|
:productionLineCode="toLocation.productionLineCode" |
|
|
|
:workStationCode="toLocation.workStationCode" |
|
|
|
:rawLocationCode="toLocation.toLocationCode"></work-station> |
|
|
|
</view> |
|
|
|
<com-issue-detail-card ref='comIssueDetailCard' :dataContent="toLocation" |
|
|
|
@updateData='updateData'> |
|
|
@ -61,7 +63,7 @@ |
|
|
|
import { |
|
|
|
calc |
|
|
|
} from '@/common/calc.js'; |
|
|
|
|
|
|
|
|
|
|
|
import { |
|
|
|
getManagementPrecisions |
|
|
|
} from '@/common/balance.js'; |
|
|
@ -76,7 +78,7 @@ |
|
|
|
import winScanButton from '@/mycomponents/scan/winScanButton.vue' |
|
|
|
import comScanIssuePack from '@/pages/issue/coms/comScanIssuePack.vue' |
|
|
|
import workStation from '@/mycomponents/workStation/workStation.vue' |
|
|
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
name: '', |
|
|
|
components: { |
|
|
@ -101,8 +103,8 @@ |
|
|
|
fromInventoryStatuses: "", |
|
|
|
toInventoryStatuses: "", |
|
|
|
requestList: [], |
|
|
|
dataContent:{}, |
|
|
|
managementList:[] |
|
|
|
dataContent: {}, |
|
|
|
managementList: [] |
|
|
|
} |
|
|
|
}, |
|
|
|
mounted() { |
|
|
@ -212,7 +214,7 @@ |
|
|
|
caclcQty() { |
|
|
|
var totalQty = 0; |
|
|
|
this.detailSource.subList.forEach(res => { |
|
|
|
totalQty = calc.add(totalQty,res.qty); |
|
|
|
totalQty = calc.add(totalQty, res.qty); |
|
|
|
}) |
|
|
|
this.detailSource.totalQty = totalQty; |
|
|
|
}, |
|
|
@ -244,10 +246,10 @@ |
|
|
|
let handleQty = 0; |
|
|
|
if (batch != undefined) { |
|
|
|
batch.Records.forEach(res => { |
|
|
|
handleQty = calc.add(handleQty,res.qty); |
|
|
|
handleQty = calc.add(handleQty, res.qty); |
|
|
|
}) |
|
|
|
batch.handleQty = handleQty; |
|
|
|
itemHandleQty = calc.add(itemHandleQty,handleQty) |
|
|
|
itemHandleQty = calc.add(itemHandleQty, handleQty) |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
@ -270,31 +272,39 @@ |
|
|
|
batch.Records.forEach(r => { |
|
|
|
let record = {}; |
|
|
|
record.handleQty = r.qty; |
|
|
|
|
|
|
|
|
|
|
|
record.fromPackingNumber = r |
|
|
|
.packingNumber; |
|
|
|
record.fromBatch = r.batch; |
|
|
|
record.fromContainerNumber = r |
|
|
|
.ContainerNumber; |
|
|
|
|
|
|
|
|
|
|
|
record.toContainerNumber = r |
|
|
|
.ContainerNumber; |
|
|
|
record.toInventoryStatus = r |
|
|
|
.inventoryStatus; |
|
|
|
record.toLocationCode = subItem |
|
|
|
.toLocationCode; |
|
|
|
record.fromLocationCode = fromLocation.fromLocationCode |
|
|
|
record.fromLocationCode = fromLocation |
|
|
|
.fromLocationCode |
|
|
|
record.supplierCode = r.supplierCode; |
|
|
|
|
|
|
|
|
|
|
|
let single_price = r.singlePrice == null ? |
|
|
|
0 : r.singlePrice; |
|
|
|
|
|
|
|
record.singlePrice = single_price; |
|
|
|
record.amount = single_price * r.qty; |
|
|
|
|
|
|
|
|
|
|
|
//使用在途库不改变管理模式 |
|
|
|
var info = getPackingNumberAndBatch( |
|
|
|
this.managementList, r |
|
|
|
.itemCode, |
|
|
|
r.packingNumber, r |
|
|
|
.batch); |
|
|
|
record.toPackingNumber = info |
|
|
|
.packingNumber; |
|
|
|
record.toBatch = info.batch; |
|
|
|
var info = getPackingNumberAndBatch( |
|
|
|
this.managementList, r |
|
|
|
.itemCode, |
|
|
|
r.packingNumber, r |
|
|
|
.batch); |
|
|
|
record.toPackingNumber = info |
|
|
|
.packingNumber; |
|
|
|
record.toBatch = info.batch; |
|
|
|
subItem.recordList.push(record); |
|
|
|
}) |
|
|
|
subList.push(subItem); |
|
|
@ -303,7 +313,7 @@ |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
this.dataContent.subList = subList |
|
|
|
this.dataContent.createTime = createTime; |
|
|
|
this.dataContent.creator = creator; |
|
|
@ -314,7 +324,7 @@ |
|
|
|
title: "提交中....", |
|
|
|
mask: true |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
//目前任务只到一个库位 |
|
|
|
var itemCodes = [] |
|
|
|
let locationCode = this.detailSource[0].toLocationCode |
|
|
@ -323,7 +333,7 @@ |
|
|
|
itemCodes.push(item.itemCode) |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
//获取管理模式,封装参数 |
|
|
|
getManagementPrecisions(itemCodes, locationCode, res => { |
|
|
|
if (res.success) { |
|
|
@ -336,11 +346,11 @@ |
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
submitJob() { |
|
|
|
var params = this.setParams() |
|
|
|
console.log("提交参数", JSON.stringify(params)); |
|
|
|
|
|
|
|
|
|
|
|
issueRecordSubmit(params).then(res => { |
|
|
|
uni.hideLoading() |
|
|
|
if (res.data) { |
|
|
@ -353,20 +363,20 @@ |
|
|
|
this.showErrorMessage(error) |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
showCommitSuccessMessage(hint) { |
|
|
|
this.$refs.comMessage.showSuccessMessage(hint, res => { |
|
|
|
this.clearData(); |
|
|
|
|
|
|
|
}) |
|
|
|
}, |
|
|
|
clearData(){ |
|
|
|
this.detailSource =[]; |
|
|
|
this.requestList=[]; |
|
|
|
this.dataContent ={} |
|
|
|
this.managementList=[] |
|
|
|
clearData() { |
|
|
|
this.detailSource = []; |
|
|
|
this.requestList = []; |
|
|
|
this.dataContent = {} |
|
|
|
this.managementList = [] |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
showMessage(message) { |
|
|
|
this.$refs.comMessage.showMessage(message, res => { |
|
|
|
if (res) { |
|
|
|