Browse Source

修改预生产上架 2024/8/2

hella_vue3
王志国 1 month ago
parent
commit
9614bd465e
  1. 23
      src/api/request2.js
  2. 24
      src/pages/productPutaway/record/productPutawayRecord.vue

23
src/api/request2.js

@ -332,7 +332,30 @@ export function validateItemAndLocation(data) {
export function getPutawayRecommendLocation(data) {
return http.post("/wms/location/recommendLocationNew",data)
}
//获取推荐目标库位
// 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,
});
}
/**
* 查询物品信息接口
* @param {*} code 物品代码

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

@ -43,7 +43,7 @@
<script setup lang="ts">
import { ref, getCurrentInstance, nextTick } from 'vue'
import { onLoad, onNavigationBarButtonTap, onReady, onReachBottom, onPullDownRefresh } from '@dcloudio/uni-app'
import { productPutawayRecordSubmit,getPutawayRecommendLocation } from '@/api/request2.js'
import { productPutawayRecordSubmit,getrecommendLocationExpectin, recommendLocationRemoveExpectin } from '@/api/request2.js'
import { goHome, getPackingNumberAndBatchByList, deepCopyData, updateTitle } from '@/common/basic.js'
import { getPrecisionStrategyList } from '@/common/balance.js'
@ -162,14 +162,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 => {
@ -180,7 +178,14 @@
//
const removeRecommendLocation = ()=> {
showMessage('移除推荐的预占用库位')
let param = {
expectinNumberList: lst,
};
recommendLocationRemoveExpectin(param).then(res => {
}).catch(err => {
showErrorMessage('【'+err+'】移除预占用失败,请在PC端的预占用中移除')
})
}
const showScanToLocation = (item)=> {
@ -203,7 +208,7 @@
const item = detailSource.value[i]
if (item.subList.length == 0) {
detailSource.value.splice(i, 1)
removeRecommendLocation()
removeRecommendLocation([item.id])
}
}
updateData()
@ -269,6 +274,11 @@
uni.hideLoading()
if (res.data) {
showCommitSuccessMessage(`提交成功<br>生成制品上架记录<br>${res.data}`)
let removeId = [];
detailSource.value.forEach(r => {
removeId.push(r.id);
})
removeRecommendLocation(removeId);
} else {
showErrorMessage(`提交失败[${res.msg}]`)
}

Loading…
Cancel
Save