|
|
@ -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}]`) |
|
|
|
} |
|
|
|