Browse Source

剩余未满箱自动提交+返回首页 2024/8/8

pull/1/head
test 4 months ago
parent
commit
f002e441d9
  1. 16
      src/pages/fg/receiptByPlan.vue

16
src/pages/fg/receiptByPlan.vue

@ -282,7 +282,7 @@ const commit = async () => {
pageNo: 1, pageNo: 1,
pageSize: 100 pageSize: 100
} }
let isAllSubmit = Number(Number(dataContent.value.goodQty)+ Number(showList.value.length))==Number(dataContent.value.planQty)
const planeInfo = await getPlanByNumber(queryParams) const planeInfo = await getPlanByNumber(queryParams)
if (planeInfo.data && planeInfo.data.list.length > 0) { if (planeInfo.data && planeInfo.data.list.length > 0) {
if (planeInfo.data.list[0].goodQty >= planeInfo.data.list[0].planQty) { if (planeInfo.data.list[0].goodQty >= planeInfo.data.list[0].planQty) {
@ -302,10 +302,14 @@ const commit = async () => {
} }
uni.hideLoading() uni.hideLoading()
// showCommitSuccessMessage('<br><br>', list) // showCommitSuccessMessage('<br><br>', list)
showList.value = []; if(isAllSubmit){
allList.value = []; clearData()
index.value = 1; }else {
dataContent.value.handleQty = 0; showList.value = [];
allList.value = [];
index.value = 1;
dataContent.value.handleQty = 0;
}
nextTick(()=>{ nextTick(()=>{
showCommitSuccessMessage("提交成功<br>生成装配收货记录<br>" + list[0].requestNumber, list) showCommitSuccessMessage("提交成功<br>生成装配收货记录<br>" + list[0].requestNumber, list)
}) })
@ -383,7 +387,7 @@ const getScanResult = (result) => {
} }
const calcFgQty = () => { const calcFgQty = () => {
dataContent.value.handleQty = showList.value.length dataContent.value.handleQty = showList.value.length
if (dataContent.value.handleQty == dataContent.value.packQty) { if (dataContent.value.handleQty == dataContent.value.packQty || (dataContent.value.noGoodQty < dataContent.value.packQty && dataContent.value.handleQty == dataContent.value.noGoodQty)) {
if (scanPopup.value) { if (scanPopup.value) {
scanPopup.value.closeScanPopup() scanPopup.value.closeScanPopup()
} }

Loading…
Cancel
Save