|
|
@ -13,8 +13,8 @@ |
|
|
|
margin-right: 20rpx; |
|
|
|
padding:20rpx; |
|
|
|
border-radius: 8rpx;"> |
|
|
|
<view class="uni-center" style="width: 25%; "> |
|
|
|
位置 : |
|
|
|
<view class="uni-center"> |
|
|
|
位置 : |
|
|
|
</view> |
|
|
|
<view class="" style="width: 75%;padding: 0rpx"> |
|
|
|
<view class="uni-flex u-col-center uni-row" @click="showSelect"> |
|
|
@ -140,8 +140,8 @@ |
|
|
|
scanOptions: {}, |
|
|
|
editItem: {}, |
|
|
|
positionInfo: "请选择位置", |
|
|
|
positionList:[], |
|
|
|
defaultValueList:[] |
|
|
|
positionList: [], |
|
|
|
defaultValueList: [] |
|
|
|
} |
|
|
|
}, |
|
|
|
created() { |
|
|
@ -154,12 +154,12 @@ |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
openScanPopup(content, jobcontent) { |
|
|
|
debugger |
|
|
|
this.issueRecord = []; |
|
|
|
this.dataContent = content; |
|
|
|
this.jobContent = jobcontent; |
|
|
|
this.initData(); |
|
|
|
this.positionInfo =this.jobContent.workShopCode+"-"+this.jobContent.subList[0].productionLineCode+"-"+this.jobContent.subList[0].workStationCode |
|
|
|
this.positionInfo = this.jobContent.workShopCode + "-" + this.jobContent.subList[0].productionLineCode + |
|
|
|
"-" + this.jobContent.subList[0].workStationCode |
|
|
|
this.$refs.popup.open('bottom'); |
|
|
|
}, |
|
|
|
|
|
|
@ -171,7 +171,6 @@ |
|
|
|
}, |
|
|
|
|
|
|
|
initData() { |
|
|
|
debugger |
|
|
|
let that = this; |
|
|
|
that.fromLocationList = []; |
|
|
|
if (that.dataContent != null) { |
|
|
@ -210,7 +209,7 @@ |
|
|
|
onScan(result) { |
|
|
|
try { |
|
|
|
let that = this; |
|
|
|
|
|
|
|
|
|
|
|
if (that.fromLocationCode == '') { |
|
|
|
that.showErrorMessage('请选择来源库位', res => { |
|
|
|
that.$refs.toLocationCombox.onFocus(); |
|
|
@ -237,19 +236,19 @@ |
|
|
|
|
|
|
|
getBalanceByManagementPrecision(result.label, that.fromLocationCode, balanceRes => { |
|
|
|
if (balanceRes.success) { |
|
|
|
if (balanceRes.Data.length == 0) { |
|
|
|
if (balanceRes.data.list.length == 0) { |
|
|
|
this.showErrorMessage('在来源库位[' + this.fromLocationCode + '],未查找到该包装的库存记录', |
|
|
|
res => { |
|
|
|
this.packGetFocus(); |
|
|
|
}) |
|
|
|
} else if (balanceRes.Data.length == 1) { |
|
|
|
let balance = balanceRes.Data[0]; |
|
|
|
} else if (balanceRes.data.list.length == 1) { |
|
|
|
let balance = balanceRes.data.list[0]; |
|
|
|
this.afterGetBalance(result.label, balance); |
|
|
|
} else { |
|
|
|
this.showBalanceSelect(balanceRes.Data); |
|
|
|
this.showBalanceSelect(balanceRes.data.list); |
|
|
|
} |
|
|
|
} else { |
|
|
|
this.showErrorMessage(balanceRes.message); |
|
|
|
this.showErrorMessage(balanceRes.message.message); |
|
|
|
} |
|
|
|
uni.hideLoading(); |
|
|
|
}); |
|
|
@ -274,16 +273,18 @@ |
|
|
|
if (batch.Records == undefined) { |
|
|
|
batch.Records = []; |
|
|
|
} |
|
|
|
|
|
|
|
let record = batch.Records.find(r => r.packingNumber == packingCode); |
|
|
|
if (record == undefined) { |
|
|
|
//有推荐箱码 |
|
|
|
if (batch.Recommends != undefined) { |
|
|
|
|
|
|
|
//如果有推荐箱码 |
|
|
|
if (batch.Recommends.length > 0) { |
|
|
|
let recommend = batch.Recommends.find(r => r.packingNumber == packingCode); |
|
|
|
if (recommend != undefined) { |
|
|
|
that.addRecord(batch, label, balance) |
|
|
|
} else { |
|
|
|
//允许修改箱码 |
|
|
|
if (this.jobContent.AllowModifyPackingNumber) { |
|
|
|
if (this.jobContent.allowModifyPackingNumber == 'TRUE') { |
|
|
|
that.addRecord(batch, label, balance); |
|
|
|
} else { |
|
|
|
that.showErrorMessage('未查找到该箱码【' + packingCode + '】的明细', |
|
|
|