5 changed files with 734 additions and 590 deletions
@ -0,0 +1,40 @@ |
|||||
|
<template> |
||||
|
<view class="page-wraper"> |
||||
|
<directIssueByBatchCom ref='directIssueByBatchComRef' fromType='checkIssue'></directIssueByBatchCom> |
||||
|
</view> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
|
||||
|
import directIssueByBatchCom from '@/pages/issue/record/directIssueByBatchCom.vue' |
||||
|
|
||||
|
|
||||
|
export default { |
||||
|
components: { |
||||
|
directIssueByBatchCom |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
|
||||
|
}; |
||||
|
}, |
||||
|
onLoad(option) { |
||||
|
uni.setNavigationBarTitle({ |
||||
|
title: option.title |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
//返回首页 |
||||
|
onNavigationBarButtonTap(e) { |
||||
|
if (e.index === 0) { |
||||
|
this.$refs.directIssueByBatchComRef.goHome(); |
||||
|
} else if (e.index == 1) { |
||||
|
this.$refs.directIssueByBatchComRef.$refs.refFifoQuery.showDrawer(); |
||||
|
this.$refs.directIssueByBatchComRef.closeScanPopup(); |
||||
|
} |
||||
|
}, |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style scoped lang="scss"> |
||||
|
</style> |
@ -0,0 +1,648 @@ |
|||||
|
<template> |
||||
|
<view class="page-wraper"> |
||||
|
<view class=""> |
||||
|
<com-blank-view @goScan='showFromLocationPopup' v-if="detailSource.length==0"></com-blank-view> |
||||
|
</view> |
||||
|
<view class="page-wraper" v-if="detailSource.length>0"> |
||||
|
|
||||
|
<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=""> |
||||
|
<record-com-detail-card :dataContent="item" :index="index" :settingParam="dataContent" |
||||
|
:isShowFromLocation="true" @removeItem="removeItem(index,item)" |
||||
|
:isShowToLocation="false" :isShowParentToLocation="false" @updateData="updateData" |
||||
|
:isShowRecommendQty="false" |
||||
|
:allowModifyQty="true" :isShowPackingNumberProps="true" @removePack="removePack"> |
||||
|
</record-com-detail-card> |
||||
|
|
||||
|
</view> |
||||
|
</view> |
||||
|
</scroll-view> |
||||
|
</view> |
||||
|
<view class="page-footer"> |
||||
|
<view class="uni-flex u-col-center space-between padding_10" |
||||
|
style="background-color:ghostwhite; width: 100%; "> |
||||
|
<view class=""> |
||||
|
|
||||
|
<requiredProductionLine ref='comScanLocation' title="生产线" :productionLine="positionInfo" |
||||
|
@getProductionLine='scanProductionLine' :isShowEdit="true"></requiredProductionLine> |
||||
|
<!-- <view class="uni-row uni-flex u-p-l-10" style="font-size: 32rpx;" v-if="positionInfo"> |
||||
|
<text>生 产 线</text> |
||||
|
<view class="uni-flex u-col-center uni-row" @click="showSelect"> |
||||
|
<view class="" style="margin-left: 20rpx;"> |
||||
|
{{positionInfo}} |
||||
|
</view> |
||||
|
</view> |
||||
|
</view> --> |
||||
|
</view> |
||||
|
<view class=" uni-flex uni-row"> |
||||
|
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button> |
||||
|
</view> |
||||
|
</view> |
||||
|
</view> |
||||
|
<win-scan-button @goScan='openScanPopup'></win-scan-button> |
||||
|
</view> |
||||
|
<win-scan-location ref="scanFromLocationCode" title="来源库位" @getLocation='getFromLocation' |
||||
|
:locationAreaTypeList="fromLocationAreaTypeList"></win-scan-location> |
||||
|
|
||||
|
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' :title="'箱码'"> |
||||
|
</win-scan-pack-and-location> |
||||
|
<!-- <winComScanBalance ref="scanPopup" @getBalance='getScanResult' :bussinessCode="businessTypeCode"> |
||||
|
</winComScanBalance> --> |
||||
|
<fifoQuery ref="refFifoQuery" :businessTypeCode="businessTypeCode"></fifoQuery> |
||||
|
|
||||
|
<comMessage ref="comMessage"></comMessage> |
||||
|
</view> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { |
||||
|
issueRecordSubmit, |
||||
|
getWorkShopLineStation, |
||||
|
getBalanceByFilter, |
||||
|
issueCheck, |
||||
|
workstationByLocation, |
||||
|
getIssueList |
||||
|
} from '@/api/request2.js'; |
||||
|
|
||||
|
import { |
||||
|
goHome, |
||||
|
getPackingNumberAndBatchByList, |
||||
|
deepCopyData, |
||||
|
getSwitchInfoByCode |
||||
|
} from '@/common/basic.js'; |
||||
|
|
||||
|
import { |
||||
|
calc |
||||
|
} from '@/common/calc.js'; |
||||
|
|
||||
|
import { |
||||
|
getInventoryStatusDesc, |
||||
|
getDirectoryItemArray |
||||
|
} from '@/common/directory.js'; |
||||
|
|
||||
|
import { |
||||
|
getBusinessType, |
||||
|
createItemInfo, |
||||
|
createDetailInfo, |
||||
|
calcHandleQty, |
||||
|
} from '@/common/record.js'; |
||||
|
|
||||
|
import { |
||||
|
getManagementPrecisions, |
||||
|
getPrecisionStrategyList, |
||||
|
getPrecisionStrategyParams |
||||
|
} from '@/common/balance.js'; |
||||
|
|
||||
|
import { |
||||
|
Decimal |
||||
|
} from 'decimal.js'; //引入 |
||||
|
|
||||
|
import winScanButton from '@/mycomponents/scan/winScanButton.vue' |
||||
|
import winScanPack from '@/mycomponents/scan/winScanPack.vue' |
||||
|
import requiredProductionLine from '@/mycomponents/location/requiredProductionLine.vue' |
||||
|
import comBlankView from '@/mycomponents/common/comBlankView.vue' |
||||
|
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue" |
||||
|
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue" |
||||
|
import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue' |
||||
|
import recordDetailCard from '@/mycomponents/record/recordDetailCard.vue' |
||||
|
import balanceSelect from '@/mycomponents/balance/balanceSelect.vue' |
||||
|
import winComScanBalance from '@/mycomponents/scan/winComScanBalance.vue' |
||||
|
import fifoQuery from '@/mycomponents/query/fifoQuery.vue' |
||||
|
|
||||
|
|
||||
|
export default { |
||||
|
components: { |
||||
|
winScanButton, |
||||
|
winScanPack, |
||||
|
requiredProductionLine, |
||||
|
comBlankView, |
||||
|
winScanLocation, |
||||
|
winScanPackAndLocation, |
||||
|
recordComDetailCard, |
||||
|
recordDetailCard, |
||||
|
balanceSelect, |
||||
|
winComScanBalance, |
||||
|
fifoQuery |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
id: '', |
||||
|
dataContent: {}, //内容 |
||||
|
detailSource: [], //绑定在页面上的数据源 |
||||
|
fromLocationInfo: {}, |
||||
|
fromLocationCode: "", |
||||
|
fromLocationAreaTypeList: [], |
||||
|
toLocationAreaTypeList: [], |
||||
|
inInventoryStatus: "", //目标入库库存状态 |
||||
|
outInventoryStatus: "", //来源出库库存状态 |
||||
|
businessType: {}, |
||||
|
showToLoaction: true, |
||||
|
recommendLocationList: [], //推荐库位列表 |
||||
|
fromWarehouseCode: '', //来源仓库 |
||||
|
businessTypeCode: "Issue", |
||||
|
positionList: [], |
||||
|
show: false, |
||||
|
positionInfo: "", |
||||
|
resultData: {}, |
||||
|
itemCode: "", |
||||
|
managementType: '', |
||||
|
fifoSwitch: false, |
||||
|
toLocationCode:'', |
||||
|
}; |
||||
|
}, |
||||
|
props: { |
||||
|
// checkIssue是校验发料 |
||||
|
fromType:{ |
||||
|
type:String, |
||||
|
default:'' |
||||
|
} |
||||
|
}, |
||||
|
mounted() { |
||||
|
this.clearData(); |
||||
|
this.getBusinessType() |
||||
|
this.fifoSwitch = getSwitchInfoByCode("directIssueFifoSwitch") |
||||
|
// if (this.positionList.length == 0) { |
||||
|
getWorkShopLineStation().then(res => { |
||||
|
if (res.data != null && res.data.length > 0) { |
||||
|
this.positionList = res.data |
||||
|
} else { |
||||
|
this.showErrorMessage('未查找到位置信息'); |
||||
|
} |
||||
|
|
||||
|
}).catch(error => { |
||||
|
this.showErrorMessage(error); |
||||
|
}) |
||||
|
// } |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
methods: { |
||||
|
goHome() { |
||||
|
goHome(); |
||||
|
}, |
||||
|
getBusinessType() { |
||||
|
getBusinessType(this.businessTypeCode, res => { |
||||
|
if (res.success) { |
||||
|
this.businessType = res.businessType; |
||||
|
this.fromInventoryStatuses = getDirectoryItemArray(res.fromInventoryStatuses); |
||||
|
this.fromLocationAreaTypeList = res.fromLocationAreaTypeList |
||||
|
this.toLocationAreaTypeList = res?.toLocationAreaTypeList; |
||||
|
this.showFromLocationPopup(); |
||||
|
} else { |
||||
|
this.showErrorMessage(res.message) |
||||
|
} |
||||
|
}); |
||||
|
}, |
||||
|
|
||||
|
getScanResult(result, managementTypeParams) { |
||||
|
this.managementType = managementTypeParams |
||||
|
// if (managementTypeParams == "BY_BATCH" || managementTypeParams == "BY_QUANTITY") { |
||||
|
// this.setDataBatch(result); |
||||
|
// } else { |
||||
|
// this.setData(result); |
||||
|
// } |
||||
|
if(!result.package.number){ |
||||
|
this.showErrorMessage("包装号不能为空") |
||||
|
return; |
||||
|
} |
||||
|
// uni.showLoading({ |
||||
|
// title:"校验中...", |
||||
|
// mask:true |
||||
|
// }) |
||||
|
|
||||
|
this.setData(result); |
||||
|
//校验箱码是否已经发料 |
||||
|
// issueCheck(result.package.number).then(res=>{ |
||||
|
// uni.hideLoading() |
||||
|
// if(res.data.length==0){ |
||||
|
// this.setData(result); |
||||
|
// }else { |
||||
|
// this.showErrorMessage("箱码["+result.package.number+"]已经发过料") |
||||
|
// } |
||||
|
|
||||
|
// }).catch(error=>{ |
||||
|
// uni.hideLoading() |
||||
|
// this.showErrorMessage(error.message) |
||||
|
// }) |
||||
|
|
||||
|
|
||||
|
}, |
||||
|
async setData(result) { |
||||
|
let balance = result.balance; |
||||
|
let label = result.label; |
||||
|
let pack = result.package; |
||||
|
|
||||
|
if(this.fromType =='checkIssue'){ |
||||
|
// 校验扫按包装发料记录中是否已经有该包装号了 |
||||
|
const obj={ |
||||
|
pageNo: 1, |
||||
|
pageSize: 20, |
||||
|
filters : [{ |
||||
|
action: '==', |
||||
|
column: 'fromPackingNumber', |
||||
|
value: pack.number, |
||||
|
},{ |
||||
|
action: '==', |
||||
|
column: 'sourceType', |
||||
|
value: 'check', |
||||
|
}, |
||||
|
] |
||||
|
} |
||||
|
const res1 = await getIssueList(obj) |
||||
|
console.log(111,res1) |
||||
|
if(res1.data && res1.data.list && res1.data.list.length > 0){ |
||||
|
this.showErrorMessage(`包装号【${pack.number}】已经扫描`) |
||||
|
return; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
var item = this.detailSource.find(res => { |
||||
|
if (res.itemCode == balance.itemCode) { |
||||
|
return res |
||||
|
} |
||||
|
}) |
||||
|
if (item == undefined) { |
||||
|
var itemp = createItemInfo(balance, pack); |
||||
|
let newDetail = createDetailInfo(balance, pack); // |
||||
|
itemp.itemName = balance.itemName |
||||
|
newDetail.packingNumber = pack.number |
||||
|
newDetail.handleQty =label.qty |
||||
|
newDetail.supplierCode =label.supplierCode |
||||
|
itemp.subList.push(newDetail); |
||||
|
this.detailSource.push(itemp) |
||||
|
} else { |
||||
|
var detail = item.subList.find(r => { |
||||
|
if (r.packingNumber == pack.number && |
||||
|
r.batch == balance.batch && |
||||
|
r.locationCode == balance.locationCode && |
||||
|
r.inventoryStatus == balance.inventoryStatus) { |
||||
|
return r; |
||||
|
} |
||||
|
}) |
||||
|
if (detail == undefined) { |
||||
|
let newDetail = createDetailInfo(balance, pack); |
||||
|
newDetail.packingNumber = pack.number |
||||
|
newDetail.handleQty =label.qty |
||||
|
newDetail.supplierCode =label.supplierCode |
||||
|
item.subList.push(newDetail); |
||||
|
} else { |
||||
|
if(this.fromType =='checkIssue'){ |
||||
|
this.showErrorMessage(`包装号【${pack.number}】已经扫描`) |
||||
|
return; |
||||
|
}else{ |
||||
|
detail.handleQty=calc.add(detail.handleQty,result.label.qty) |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
calcHandleQty(this.detailSource) |
||||
|
}, |
||||
|
|
||||
|
async setDataBatch(result) { |
||||
|
let balance = result.balance; |
||||
|
let label = result.label; |
||||
|
let pack = result.package; |
||||
|
var item = this.detailSource.find(res => { |
||||
|
if (res.itemCode == balance.itemCode) { |
||||
|
return res |
||||
|
} |
||||
|
}) |
||||
|
if (item == undefined) { |
||||
|
var itemp = createItemInfo(balance, pack); |
||||
|
let newDetail = createDetailInfo(balance, pack, label); |
||||
|
newDetail.handleQty = label.qty |
||||
|
|
||||
|
itemp.subList.push(newDetail); |
||||
|
this.detailSource.push(itemp) |
||||
|
} else { |
||||
|
var detail = item.subList.find(r => { |
||||
|
if (r.batch == balance.batch && |
||||
|
r.locationCode == balance.locationCode && |
||||
|
r.inventoryStatus == balance.inventoryStatus) { |
||||
|
return r; |
||||
|
} |
||||
|
}) |
||||
|
if (detail == undefined) { |
||||
|
let newDetail = createDetailInfo(balance, pack, label); |
||||
|
newDetail.handleQty = label.qty |
||||
|
newDetail.packingNumber = pack.number |
||||
|
item.subList.push(newDetail); |
||||
|
} else { |
||||
|
detail.handleQty = calc.add(detail.handleQty, result.label.qty) |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
calcHandleQty(this.detailSource) |
||||
|
}, |
||||
|
|
||||
|
showErrorMessage(message) { |
||||
|
this.$refs.comMessage.showErrorMessage(message, res => { |
||||
|
if (res) { |
||||
|
this.scanPopupGetFocus() |
||||
|
} |
||||
|
}); |
||||
|
}, |
||||
|
|
||||
|
showSelect() { |
||||
|
// if (this.editPosition) { |
||||
|
this.show = true |
||||
|
// } |
||||
|
}, |
||||
|
|
||||
|
confirmSelect(e) { |
||||
|
this.positionInfo = e[0].label + "-" + e[1].label + "-" + e[2].label |
||||
|
console.log("位置", this.positionInfo) |
||||
|
this.workshopCode = e[0].value |
||||
|
this.productionLineCode = e[1].value |
||||
|
this.workStationCode = e[2].value |
||||
|
this.workShopName = e[0].label |
||||
|
this.productionLineName = e[1].label |
||||
|
this.workStationName = e[2].label |
||||
|
|
||||
|
let shop = this.positionList.find(shop => shop.value == this.workshopCode); |
||||
|
if (shop != undefined && shop.children != undefined) { |
||||
|
let prodLine = shop.children.find(line => line.value == this.productionLineCode); |
||||
|
if (prodLine != undefined && prodLine.children != undefined) { |
||||
|
let station = prodLine.children.find(r => r.value == this.workStationCode); |
||||
|
if (station.rawLocationCode == '' && station.rawLocationCode == null) { |
||||
|
this.showErrorMessage(this.workStationName + "的原材料库位为空,请重新选择") |
||||
|
return; |
||||
|
} else { |
||||
|
this.rawLocationCode = station.rawLocationCode; |
||||
|
this.fgLocationCode = station.fgLocationCode; |
||||
|
} |
||||
|
} else { |
||||
|
this.showErrorMessage("生产线-工位基础信息维护错误") |
||||
|
} |
||||
|
} else { |
||||
|
this.showErrorMessage("车间-生产线基础信息维护错误") |
||||
|
} |
||||
|
|
||||
|
//赋值到库位代码 |
||||
|
let toLocationCode = '' |
||||
|
this.positionList.forEach(item => { |
||||
|
if (this.workshopCode == item.value) { // 车间 |
||||
|
item.children.find(child => { |
||||
|
if (this.productionLineCode == child.value) { |
||||
|
toLocationCode = child.children.find(subChild => this.workStationCode == |
||||
|
subChild.value).rawLocationCode; |
||||
|
} |
||||
|
}) |
||||
|
} |
||||
|
}) |
||||
|
this.detailSource.forEach(item => { |
||||
|
item.subList.forEach(detail => { |
||||
|
detail.toLocationCode = toLocationCode |
||||
|
detail.productionLineCode = this.productionLineCode |
||||
|
detail.workStationCode = this.workStationCode |
||||
|
}) |
||||
|
}) |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
removeItem(index, item) { |
||||
|
this.detailSource.splice(index, 1) |
||||
|
}, |
||||
|
|
||||
|
removePack() { |
||||
|
for (var i = 0; i < this.detailSource.length; i++) { |
||||
|
var item = this.detailSource[i]; |
||||
|
if (item.subList.length == 0) { |
||||
|
this.detailSource.splice(i, 1) |
||||
|
} |
||||
|
} |
||||
|
this.updateData(); |
||||
|
}, |
||||
|
|
||||
|
openScanPopup() { |
||||
|
if (this.businessType) { |
||||
|
if (this.fromLocationCode == "") { |
||||
|
this.showFromLocationPopup(); |
||||
|
return |
||||
|
} |
||||
|
this.$refs.scanPopup.openScanPopupForType(this.fromLocationCode, this.businessType); |
||||
|
} else { |
||||
|
this.getBusinessType() |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
showFromLocationPopup() { |
||||
|
this.$nextTick(() => { |
||||
|
this.$refs.scanFromLocationCode.openScanPopup(); |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
closeScanPopup() { |
||||
|
if (this.$refs.scanFromLocationCode != undefined) { |
||||
|
this.$refs.scanFromLocationCode.closeScanPopup(); |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
scanPopupGetFocus() { |
||||
|
if (this.$refs.scanPopup) { |
||||
|
this.$refs.scanPopup.packGetFocus(); |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
async scanProductionLine(productionLine, code) { |
||||
|
this.positionInfo = productionLine.productionLineCode |
||||
|
this.workStationCode = productionLine.workshopCode |
||||
|
this.toLocationCode = productionLine.rawLocationCode |
||||
|
this.detailSource.forEach(item => { |
||||
|
item.subList.forEach(detail => { |
||||
|
detail.toLocationCode = this.toLocationCode |
||||
|
detail.productionLineCode = this.positionInfo |
||||
|
detail.workStationCode = this.workStationCode |
||||
|
}) |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
commit() { |
||||
|
if (!this.positionInfo) { |
||||
|
this.showErrorMessage("请扫描生产线") |
||||
|
return |
||||
|
} |
||||
|
var commitHint = "" |
||||
|
this.detailSource.forEach((item) => { |
||||
|
item.subList.forEach(cur => { |
||||
|
if (cur.scaned) { |
||||
|
if (parseFloat(cur.handleQty) > parseFloat(cur.qty)) { |
||||
|
commitHint += |
||||
|
`物料号【${item.itemCode}】批次【${cur.batch}】实际提交数量【${cur.handleQty}】不可以大于库存数量【${cur.qty}】\n` |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
}) |
||||
|
if (commitHint) { |
||||
|
this.showErrorMessage(commitHint) |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
uni.showLoading({ |
||||
|
title: "提交中....", |
||||
|
mask: true |
||||
|
}); |
||||
|
|
||||
|
//记录有目标库位,需要查询管理模式 |
||||
|
let precisionStrategyParams = getPrecisionStrategyParams(this.detailSource); |
||||
|
//2:获取管理模式,封装参数 |
||||
|
getPrecisionStrategyList(precisionStrategyParams, res => { |
||||
|
if (res.success) { |
||||
|
this.managementList = res.list; |
||||
|
var params = { |
||||
|
...this.setRecordParams() |
||||
|
} |
||||
|
const isHaveItem = params.subList.find(item => item.handleQty > item.balanceQty) |
||||
|
if (isHaveItem) { |
||||
|
this.showErrorMessage(`物料号${isHaveItem.itemCode}`) |
||||
|
this.$refs.comMessage.showConfirmWarningModal('物料号' + isHaveItem.itemCode + '数量[' + |
||||
|
isHaveItem.handleQty + ']不允许大于库存数量[' + isHaveItem.balanceQty + ']') |
||||
|
uni.hideLoading() |
||||
|
return |
||||
|
} |
||||
|
issueRecordSubmit(params).then(res => { |
||||
|
uni.hideLoading() |
||||
|
if (res.data) { |
||||
|
this.showCommitSuccessMessage("提交成功\n生成直接发料记录\n" + res.data) |
||||
|
} else { |
||||
|
this.showErrorMessage("提交失败[" + res.msg + "]") |
||||
|
} |
||||
|
}).catch(error => { |
||||
|
uni.hideLoading() |
||||
|
this.showErrorMessage(error) |
||||
|
}) |
||||
|
} else { |
||||
|
uni.hideLoading(); |
||||
|
this.showErrorMessage(res.message); |
||||
|
} |
||||
|
}); |
||||
|
}, |
||||
|
|
||||
|
setRecordParams() { |
||||
|
var subList = [] |
||||
|
var creator = this.$store.state.user.id |
||||
|
this.detailSource.forEach(item => { |
||||
|
item.subList.forEach(detail => { |
||||
|
if (detail.scaned) { |
||||
|
var info = getPackingNumberAndBatchByList(this.managementList, detail.itemCode, |
||||
|
detail.packingNumber, detail.toLocationCode, detail.batch); |
||||
|
var submitItem = deepCopyData(detail) |
||||
|
submitItem.toPackingNumber = info.packingNumber; |
||||
|
submitItem.toBatch = info.batch; |
||||
|
submitItem.toContainerNumber = detail.containerNumber; |
||||
|
|
||||
|
submitItem.fromPackingNumber = info.packingNumber; |
||||
|
submitItem.fromBatch = info.batch; |
||||
|
submitItem.fromContainerNumber = detail.containerNumber; |
||||
|
|
||||
|
submitItem.fromLocationCode = detail.locationCode; |
||||
|
submitItem.toLocationCode = detail.toLocationCode; |
||||
|
submitItem.productionLineCode = detail.productionLineCode; |
||||
|
submitItem.workStationCode = detail.workStationCode |
||||
|
|
||||
|
|
||||
|
// detail.toInventoryStatus = detail.inventoryStatus |
||||
|
// detail.toLocationCode = detail.toLocationCode |
||||
|
submitItem.qty = detail.handleQty; |
||||
|
submitItem.package = ""; |
||||
|
submitItem.balanceQty = detail.balanceQty; |
||||
|
submitItem.recordList = [{ |
||||
|
toInventoryStatus: detail.inventoryStatus, |
||||
|
fromParentPackingNumber: detail.parentNumber, |
||||
|
fromPackingNumber: detail.packingNumber, |
||||
|
fromBatch: info.batch, |
||||
|
toPackingNumber: info.packingNumber, |
||||
|
toBatch: info.batch, |
||||
|
fromLocationCode: detail.locationCode, |
||||
|
toLocationCode: detail.toLocationCode, |
||||
|
productionLineCode : detail.productionLineCode, |
||||
|
workStationCode : detail.workshopCode, |
||||
|
handleQty: detail.handleQty, |
||||
|
fromPackUnit: detail.packUnit, |
||||
|
toPackUnit: detail.packUnit, |
||||
|
fromPackQty: detail.packQty, |
||||
|
toPackQty: detail.packQty, |
||||
|
supplierCode:detail.supplierCode |
||||
|
}] |
||||
|
subList.push(submitItem) |
||||
|
} |
||||
|
}) |
||||
|
}) |
||||
|
if (subList.length > 0) { |
||||
|
this.dataContent.toWarehouseCode = subList[0].toWarehouseCode; |
||||
|
} |
||||
|
this.dataContent.subList = subList |
||||
|
this.dataContent.creator = creator; |
||||
|
this.dataContent.fromWarehouseCode = this.fromWarehouseCode; |
||||
|
if(this.fromType =='checkIssue'){ |
||||
|
this.dataContent.sourceType="check" |
||||
|
}else{ |
||||
|
this.dataContent.sourceType="record" |
||||
|
} |
||||
|
return this.dataContent; |
||||
|
}, |
||||
|
|
||||
|
showMessage(message) { |
||||
|
this.$refs.comMessage.showMessage(message, res => { |
||||
|
if (res) {} |
||||
|
}); |
||||
|
}, |
||||
|
|
||||
|
showScanMessage(message) { |
||||
|
this.$refs.comMessage.showScanMessage(message); |
||||
|
}, |
||||
|
|
||||
|
afterCloseMessage() { |
||||
|
this.scanPopupGetFocus(); |
||||
|
}, |
||||
|
|
||||
|
closeScanMessage() { |
||||
|
this.scanPopupGetFocus(); |
||||
|
}, |
||||
|
getLocation(location, code) { |
||||
|
this.getFromLocationCode(location, code) |
||||
|
}, |
||||
|
getFromLocationCode(location, code) { |
||||
|
this.fromLocationInfo = location; |
||||
|
this.fromLocationCode = code; |
||||
|
this.openScanPopup(); |
||||
|
}, |
||||
|
|
||||
|
showCommitSuccessMessage(hint) { |
||||
|
this.$refs.comMessage.showSuccessMessage(hint, res => { |
||||
|
this.clearData(); |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
updateData() { |
||||
|
calcHandleQty(this.detailSource); |
||||
|
for (var i = 0; i < this.detailSource.length; i++) { |
||||
|
let item = this.detailSource[i]; |
||||
|
if (item.qty == 0) { |
||||
|
this.detailSource.splice(i, 1) |
||||
|
} |
||||
|
} |
||||
|
this.$forceUpdate(); |
||||
|
|
||||
|
}, |
||||
|
getFromLocation(location) { |
||||
|
this.fromLocationCode = location.code; |
||||
|
this.fromLocationInfo = location; |
||||
|
this.openScanPopup(); |
||||
|
}, |
||||
|
clearData() { |
||||
|
this.fromLocationInfo = {}; |
||||
|
this.fromLocationCode = ''; |
||||
|
this.fromWarehouseCode = ''; |
||||
|
this.toWarehouseCode = ''; |
||||
|
this.detailSource = []; |
||||
|
this.positionInfo = ""; |
||||
|
this.itemCode = "" |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style scoped lang="scss"> |
||||
|
</style> |
Loading…
Reference in new issue