Browse Source

修改预生产上架

hella_online_20240829
niexiting 4 months ago
parent
commit
3c8f4bf5f8
  1. 24
      src/api/request2.js
  2. 27
      src/pages/productPutaway/record/productPutawayRecord.vue

24
src/api/request2.js

@ -510,6 +510,30 @@ export function getPutawayRecommendLocation(params) {
}
//获取推荐目标库位
// expectinNumber: 预计入number
// itemCode: 物料代码
// inventoryStatus:库存状态
export function getrecommendLocationExpectin(params) {
return request({
url: baseApi + "/wms/location/recommendLocationExpectin",
method: "post",
data: params,
});
}
//移除预占用的推荐库位
// expectinNumber: 预计入number
// itemCode: 物料代码
// inventoryStatus:库存状态
export function recommendLocationRemoveExpectin(params) {
return request({
url: baseApi + "/wms/location/recommendLocationRemoveExpectin",
method: "post",
data: params,
});
}
/**
* 查询物品信息接口

27
src/pages/productPutaway/record/productPutawayRecord.vue

@ -44,7 +44,8 @@
<script>
import {
productPutawayRecordSubmit,
getPutawayRecommendLocation
getrecommendLocationExpectin,
recommendLocationRemoveExpectin
} from '@/api/request2.js';
import {
goHome,
@ -199,14 +200,12 @@
})
let param = {
expectinNumber: balance.id,
itemCode: balance.itemCode,
batch: balance.batch,
inventoryStatus: balance.inventoryStatus,
supplierCode: '',
businessCode: this.bussinessCode
};
console.log(JSON.stringify(param))
getPutawayRecommendLocation(param).then(res => {
getrecommendLocationExpectin(param).then(res => {
callback(res.data);
uni.hideLoading();
}).catch(error => {
@ -216,8 +215,15 @@
},
//
removeRecommendLocation() {
this.showMessage('移除推荐的预占用库位')
removeRecommendLocation(lst) {
let param = {
expectinNumberList: lst,
};
recommendLocationRemoveExpectin(param).then(res => {
}).catch(err => {
this.showErrorMessage('【'++'】移除预占用失败,请在PC端的预占用中移除')
})
},
showScanToLocation(item) {
@ -239,7 +245,7 @@
this.calcHandleQty();
},
removeItem(index, item) {
this.removeRecommendLocation();
this.removeRecommendLocation([item.id]);
this.detailSource.splice(index, 1)
},
removePack() {
@ -312,6 +318,11 @@
uni.hideLoading()
if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成制品上架记录<br>" + res.data)
let removeId = [];
this.detailSource.forEach(r => {
removeId.push(r.id);
})
this.removeRecommendLocation(removeId);
} else {
this.showErrorMessage("提交失败[" + res.msg + "]")
}

Loading…
Cancel
Save