Browse Source

修改预生产上架

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

Loading…
Cancel
Save