Browse Source

YT-420发料补料 pda直接操作报库位有库存余额,此库位库存满了,应推荐下一个库存

intex_online20241111
zhang_li 1 month ago
parent
commit
dffa89a729
  1. 5
      src/pages/issue/record/directIssue.vue
  2. 89
      src/pages/repleinsh/record/directRepleinshRecord.vue

5
src/pages/issue/record/directIssue.vue

@ -81,7 +81,7 @@
getPrecisionStrategyList,
getPrecisionStrategyParams
} from '@/common/balance.js';
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPack from '@/mycomponents/scan/winScanPack.vue'
import requiredLocation from '@/mycomponents/location/requiredLocation.vue'
@ -187,7 +187,7 @@
getScanResult(result) {
this.setData(result);
},
setData(result) {
async setData(result) {
let balance = result.balance;
let label = result.label;
let pack = result.package;
@ -224,6 +224,7 @@
this.detailSource.push(itemp)
this.itemCode = balance.itemCode;
this.fromLocationCode = balance.locationCode
await this.getToLocationBalance(this.fromLocationCode,result)
this.scanPopupGetFocus()
} else {
var detail = item.subList.find(r => {

89
src/pages/repleinsh/record/directRepleinshRecord.vue

@ -17,10 +17,8 @@
<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="false" @removeItem="removeItem(index,item)"
:isShowToLocation="false"
:isShowParentToLocation="false"
@updateData="updateData" @removePack="removePack">
:isShowFromLocation="false" @removeItem="removeItem(index,item)" :isShowToLocation="false"
:isShowParentToLocation="false" @updateData="updateData" @removePack="removePack">
</record-com-detail-card>
</view>
</view>
@ -28,8 +26,7 @@
</view>
<view class="page-footer">
<view class="uni-flex u-col-center space-between padding_10"
style="background-color:ghostwhite; width: 100%; ">
<view class="uni-flex u-col-center space-between padding_10" style="background-color:ghostwhite; width: 100%; ">
<view class="">
<requiredLocation v-if="showToLoaction" title="目标库位" :locationCode="toLocationCode"
@getLocation='getToLocationCode' :locationAreaTypeList="toLocationAreaTypeList">
@ -81,6 +78,7 @@
calcHandleQty
} from '@/common/record.js';
import {
getManagementPrecisions,
getPrecisionStrategyList,
@ -218,14 +216,14 @@
this.setData(result);
},
setData(result) {
async setData(result) {
let balance = result.balance;
let label = result.label;
let pack = result.package;
if (this.fromLocationCode && this.fromLocationCode != balance.locationCode) {
this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]在库位[" + this
this.showErrorMessage("批次[" + balance.batch + "]在库位[" + this
.fromLocationCode + "]没有库存余额")
return;
}
@ -256,11 +254,11 @@
this.detailSource.push(itemp)
this.itemCode = balance.itemCode;
this.fromLocationCode = balance.locationCode
await this.getToLocationBalance(this.toLocationCode,result)
this.scanPopupGetFocus()
} else {
var detail = item.subList.find(r => {
if (r.packingNumber == pack.number &&
r.batch == balance.batch &&
if (r.batch == balance.batch &&
r.locationCode == balance.locationCode &&
r.inventoryStatus == balance.inventoryStatus) {
return r;
@ -303,7 +301,7 @@
})
if (checkData) {
//
this.$refs.comMessage.showQuestionMessage("扫描箱码[" + checkData.parentNumber+"]" + "批次[" + balance
this.$refs.comMessage.showQuestionMessage("扫描箱码[" + checkData.parentNumber + "]" + "批次[" + balance
.batch + "]是父包装,是否移除子包装", res => {
if (res) {
item.subList = [];
@ -334,14 +332,81 @@
this.scanPopupGetFocus()
} else {
if (detail.scaned == true) {
this.showErrorMessage("箱码[" + detail.packingNumber + "批次[" + balance.batch + "]重复扫描")
detail.handleQty = calc.add(detail.handleQty, result.label.qty)
// this.showErrorMessage("[" + detail.packingNumber + "[" + balance.batch + "]")
}
}
}
calcHandleQty(this.detailSource);
},
//
async getToLocationBalance(toLocationCode, result) {
uni.showLoading({
title: '查询中',
mask: true
})
var filters = []
if (result.package.parentNumber) {
var packingNumber = result.package.parentNumber + "," + result.package.number;
filters.push({
column: "packingNumber",
action: "in",
value: packingNumber
})
} else {
filters.push({
column: "packingNumber",
action: "==",
value: result.package.number
})
}
filters.push({
column: "itemCode",
action: "==",
value: result.package.itemCode
})
filters.push({
column: "batch",
action: "==",
value: result.package.batch
})
filters.push({
column: "areaType",
action: "in",
value: this.toLocationAreaTypeList.join(',')
})
var params = {
filters: filters,
pageNo: 1,
pageSize: 100,
}
await getManagementPrecisions([result.package.itemCode], toLocationCode, async res => {
if (res.success) {
this.managementList = res.list;
this.managementType = this.managementList.some(item => item.ManagementPrecision == 'BY_BATCH') ?
'BY_BATCH' : ''
if (this.managementType == 'BY_BATCH') {
uni.hideLoading()
} else {
await getBalanceByFilter(params).then(res => {
uni.hideLoading()
if (res.data.list.length > 0) {
this.showErrorMessage("包装在库位【" + res.data.list[0].locationCode + "】已有库存余额");
}
// callback(res.data)
}).catch(err => {
this.showErrorMessage(err.message);
})
}
}
})
},
showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => {

Loading…
Cancel
Save