diff --git a/fe/PDA/api/index.js b/fe/PDA/api/index.js index 0837d76de..77036531d 100644 --- a/fe/PDA/api/index.js +++ b/fe/PDA/api/index.js @@ -127,6 +127,12 @@ export const getBalanceRemoveInAndOutAsync = (params) => promise( data: params, method: "post" }) +//获取库存信息去除预计出 +export const getBalanceRemoveInAndOut = (params) => request( + devUrl + "/api/pda/inventory/balances/by-balances-request-many-parameter-not-in-expect-out",{ // + data: params, + method: "post" + }) //通过零件号和库位查询库存,去除预计出 export const getRecommendBalanceByLocationAsync = (params,itemCode,isPackingCode) => promise( devUrl + "/api/pda/inventory/balances/get-recommend-balance-by-locations?itemCode="+itemCode+"&isPackingCode="+isPackingCode,{ // diff --git a/fe/PDA/pages/task/assembleIssueJobDetail.vue b/fe/PDA/pages/task/assembleIssueJobDetail.vue index 6d96aad49..1f997bb9e 100644 --- a/fe/PDA/pages/task/assembleIssueJobDetail.vue +++ b/fe/PDA/pages/task/assembleIssueJobDetail.vue @@ -176,7 +176,8 @@ cancelTakeAssembleIssueJob, finshAssembleIssueJob, getRecommendBalance, - balances + balances, + getBalanceRemoveInAndOut } from '@/api/index.js'; import { getJobStatuStyle, @@ -478,19 +479,35 @@ // sortBy: 'PackingCode asc' }; - balances(params) - .then(res => { - if (res.totalCount === 0) { - this.showScanMessage('按箱码【' + result.data.code + '】未查询到库存信息'); - } else { - callback(res); - } - uni.hideLoading(); - }) - .catch(err => { - this.showScanMessage(err.message); - uni.hideLoading(); - }); + if(this.details[0].recommendFromPackingCode==result.data.code){ + balances(params) + .then(res => { + if (res.totalCount === 0) { + this.showScanMessage('按箱码【' + result.data.code + '】未查询到库存信息'); + } else { + callback(res); + } + uni.hideLoading(); + }) + .catch(err => { + this.showScanMessage(err.message); + uni.hideLoading(); + }); + }else { + getBalanceRemoveInAndOut(params) + .then(res => { + if (res.totalCount === 0) { + this.showScanMessage('按箱码【' + result.data.code + '】未查询到库存信息'); + } else { + callback(res); + } + uni.hideLoading(); + }) + .catch(err => { + this.showScanMessage(err.message); + uni.hideLoading(); + }); + } }, recommend() { diff --git a/fe/PDA/pages/task/coatingIssuleJobDetail.vue b/fe/PDA/pages/task/coatingIssuleJobDetail.vue index 0211f0759..cc18c7627 100644 --- a/fe/PDA/pages/task/coatingIssuleJobDetail.vue +++ b/fe/PDA/pages/task/coatingIssuleJobDetail.vue @@ -176,7 +176,8 @@ cancelTakeCoatingIssueJob, finshCoatingIssueJob, getRecommendBalance, - balances + balances, + getBalanceRemoveInAndOut } from '@/api/index.js'; import { getJobStatuStyle, @@ -478,19 +479,35 @@ // sortBy: 'PackingCode asc' }; - balances(params) - .then(res => { - if (res.totalCount === 0) { - this.showScanMessage('按箱码【' + result.data.code + '】未查询到库存信息'); - } else { - callback(res); - } - uni.hideLoading(); - }) - .catch(err => { - this.showScanMessage(err.message); - uni.hideLoading(); - }); + if(this.details[0].recommendFromPackingCode==result.data.code){ + balances(params) + .then(res => { + if (res.totalCount === 0) { + this.showScanMessage('按箱码【' + result.data.code + '】未查询到库存信息'); + } else { + callback(res); + } + uni.hideLoading(); + }) + .catch(err => { + this.showScanMessage(err.message); + uni.hideLoading(); + }); + }else { + getBalanceRemoveInAndOut(params) + .then(res => { + if (res.totalCount === 0) { + this.showScanMessage('按箱码【' + result.data.code + '】未查询到库存信息'); + } else { + callback(res); + } + uni.hideLoading(); + }) + .catch(err => { + this.showScanMessage(err.message); + uni.hideLoading(); + }); + } }, recommend() { diff --git a/fe/PDA/pages/task/countFgDetail.vue b/fe/PDA/pages/task/countFgDetail.vue index 099de8a24..8baa00cb5 100644 --- a/fe/PDA/pages/task/countFgDetail.vue +++ b/fe/PDA/pages/task/countFgDetail.vue @@ -382,7 +382,7 @@ //当前页起始索引 const start = (pageNo - 1) * pageSize; const end = start + pageSize; //当前页结束索引 - var list =this.scanAllDetails.filter((r=>r.IsDelete==false)) + var list =this.scanAllDetails.filter((r=>r.isDelete==false)) return list.slice(start, end) }, @@ -503,7 +503,7 @@ creatDetail(result) { let detail = { isNew: true, - IsDelete:false, + isDelete:false, modified:true, countTime: new Date(), masterID: this.id, @@ -561,7 +561,7 @@ item.countQty = Number(qty); item.countTime = new Date(); - item.IsDelete =false; + item.isDelete =false; item.modified =true; item.countOperator = localStorage.userId; if (isAdd) { @@ -584,7 +584,7 @@ this.showList.splice(index, 1) this.scanAllDetails.splice(index, 1) }else { - item.IsDelete = true; + item.isDelete = true; item.modified = true; } this.initList(); @@ -622,6 +622,7 @@ return; } + var temp=""; for (var i = 0; i < this.scanAllDetails.length; i++) { if(this.scanAllDetails[i].countQty==0){ @@ -681,7 +682,7 @@ calcScanCount() { - this.scanCount = this.scanAllDetails.filter(r=>r.IsDelete==false).length; + this.scanCount = this.scanAllDetails.filter(r=>r.isDelete==false).length; }, bindPickerChange(e, item) { diff --git a/fe/PDA/pages/task/countRawDetail.vue b/fe/PDA/pages/task/countRawDetail.vue index e24880ef7..7d8b15967 100644 --- a/fe/PDA/pages/task/countRawDetail.vue +++ b/fe/PDA/pages/task/countRawDetail.vue @@ -445,7 +445,7 @@ that.scanCount = that.scanAllDetails.length that.scanAllDetails.forEach(res => { - res.IsDelete = false; + res.isDelete = false; res.modified = false; }) @@ -469,7 +469,7 @@ //当前页起始索引 const start = (pageNo - 1) * pageSize; const end = start + pageSize; //当前页结束索引 - var list = this.scanAllDetails.filter((r => r.IsDelete == false)) + var list = this.scanAllDetails.filter((r => r.isDelete == false)) return list.slice(start, end) }, @@ -579,7 +579,7 @@ creatDetail(result) { let detail = { isNew: true, - IsDelete: false, + isDelete: false, modified: true, countTime: new Date(), masterID: this.id, @@ -636,7 +636,7 @@ setQty(item, qty, isAdd) { item.countQty = Number(qty); item.countTime = new Date(); - item.IsDelete = false; + item.isDelete = false; item.modified = true; item.countOperator = localStorage.userId; if (isAdd) { @@ -659,7 +659,7 @@ this.showList.splice(index, 1) this.scanAllDetails.splice(index, 1) } else { - item.IsDelete = true; + item.isDelete = true; item.modified = true; } // this.scanAllDetails.splice(index, 1); @@ -698,11 +698,11 @@ return; } - + var temp = ""; - for (var i = 0; i < this.scanAllDetails.length; i++) { - if (this.scanAllDetails[i].countQty == 0) { - temp = this.scanAllDetails[i]; + for (var i = 0; i < commitList.length; i++) { + if (commitList[i].countQty == 0) { + temp = commitList[i]; break; } } @@ -711,8 +711,7 @@ this.showMessage("箱码:[" + temp.packingCode + "]盘点数量为0,请输入盘点数量") return; } - - + this.finishJob(); }, @@ -760,7 +759,7 @@ calcScanCount() { - this.scanCount = this.scanAllDetails.filter(r => r.IsDelete == false).length; + this.scanCount = this.scanAllDetails.filter(r => r.isDelete == false).length; }, bindPickerChange(e, item) { diff --git a/fe/PDA/pages/task/injectionIssueJobDetail.vue b/fe/PDA/pages/task/injectionIssueJobDetail.vue index e6366732f..a05ec8f94 100644 --- a/fe/PDA/pages/task/injectionIssueJobDetail.vue +++ b/fe/PDA/pages/task/injectionIssueJobDetail.vue @@ -176,7 +176,8 @@ cancelTakeInjectionIssueJob, finshInjectionIssueJob, getRecommendBalance, - balances + balances, + getBalanceRemoveInAndOut } from '@/api/index.js'; import { getJobStatuStyle, @@ -478,19 +479,36 @@ // sortBy: 'PackingCode asc' }; - balances(params) - .then(res => { - if (res.totalCount === 0) { - this.showScanMessage('按箱码【' + result.data.code + '】未查询到库存信息'); - } else { - callback(res); - } - uni.hideLoading(); - }) - .catch(err => { - this.showScanMessage(err.message); - uni.hideLoading(); - }); + if(this.details[0].recommendFromPackingCode==result.data.code){ + balances(params) + .then(res => { + if (res.totalCount === 0) { + this.showScanMessage('按箱码【' + result.data.code + '】未查询到库存信息'); + } else { + callback(res); + } + uni.hideLoading(); + }) + .catch(err => { + this.showScanMessage(err.message); + uni.hideLoading(); + }); + }else { + getBalanceRemoveInAndOut(params) + .then(res => { + if (res.totalCount === 0) { + this.showScanMessage('按箱码【' + result.data.code + '】未查询到库存信息'); + } else { + callback(res); + } + uni.hideLoading(); + }) + .catch(err => { + this.showScanMessage(err.message); + uni.hideLoading(); + }); + } + }, recommend() { @@ -611,7 +629,9 @@ }, scanPopupGetFocus() { - this.$refs.scanPopupForm.getfocus(); + if(this.$refs.scanPopupTo){ + this.$refs.scanPopupTo.getfocus(); + } }, scrollToTop() { diff --git a/fe/PDA/pages/task/kittingIssueJobDetail.vue b/fe/PDA/pages/task/kittingIssueJobDetail.vue index 5dc1530b8..c1434add6 100644 --- a/fe/PDA/pages/task/kittingIssueJobDetail.vue +++ b/fe/PDA/pages/task/kittingIssueJobDetail.vue @@ -176,7 +176,8 @@ cancelTakeKittingIssueJob, finshKittingIssueJob, getRecommendBalance, - balances + balances, + getBalanceRemoveInAndOut } from '@/api/index.js'; import { getJobStatuStyle, @@ -479,19 +480,35 @@ // sortBy: 'PackingCode asc' }; - balances(params) - .then(res => { - if (res.totalCount === 0) { - this.showScanMessage('按箱码【' + result.data.code + '】未查询到库存信息'); - } else { - callback(res); - } - uni.hideLoading(); - }) - .catch(err => { - this.showScanMessage(err.message); - uni.hideLoading(); - }); + if(this.details[0].recommendFromPackingCode==result.data.code){ + balances(params) + .then(res => { + if (res.totalCount === 0) { + this.showScanMessage('按箱码【' + result.data.code + '】未查询到库存信息'); + } else { + callback(res); + } + uni.hideLoading(); + }) + .catch(err => { + this.showScanMessage(err.message); + uni.hideLoading(); + }); + }else { + getBalanceRemoveInAndOut(params) + .then(res => { + if (res.totalCount === 0) { + this.showScanMessage('按箱码【' + result.data.code + '】未查询到库存信息'); + } else { + callback(res); + } + uni.hideLoading(); + }) + .catch(err => { + this.showScanMessage(err.message); + uni.hideLoading(); + }); + } }, recommend() { diff --git a/fe/PDA/pages/task/sparePartIssueJobDetail.vue b/fe/PDA/pages/task/sparePartIssueJobDetail.vue index 59f10eaff..3b65c512f 100644 --- a/fe/PDA/pages/task/sparePartIssueJobDetail.vue +++ b/fe/PDA/pages/task/sparePartIssueJobDetail.vue @@ -176,7 +176,8 @@ cancelTakeSparePartIssueJob, finshSparePartIssueJob, getRecommendBalance, - balances + balances, + getBalanceRemoveInAndOut } from '@/api/index.js'; import { getJobStatuStyle, @@ -479,19 +480,35 @@ // sortBy: 'PackingCode asc' }; - balances(params) - .then(res => { - if (res.totalCount === 0) { - this.showScanMessage('按箱码【' + result.data.code + '】未查询到库存信息'); - } else { - callback(res); - } - uni.hideLoading(); - }) - .catch(err => { - this.showScanMessage(err.message); - uni.hideLoading(); - }); + if(this.details[0].recommendFromPackingCode==result.data.code){ + balances(params) + .then(res => { + if (res.totalCount === 0) { + this.showScanMessage('按箱码【' + result.data.code + '】未查询到库存信息'); + } else { + callback(res); + } + uni.hideLoading(); + }) + .catch(err => { + this.showScanMessage(err.message); + uni.hideLoading(); + }); + }else { + getBalanceRemoveInAndOut(params) + .then(res => { + if (res.totalCount === 0) { + this.showScanMessage('按箱码【' + result.data.code + '】未查询到库存信息'); + } else { + callback(res); + } + uni.hideLoading(); + }) + .catch(err => { + this.showScanMessage(err.message); + uni.hideLoading(); + }); + } }, recommend() { diff --git a/fe/PDA/pages/task/thirdLocationDetail.vue b/fe/PDA/pages/task/thirdLocationDetail.vue index 7dac55377..614314658 100644 --- a/fe/PDA/pages/task/thirdLocationDetail.vue +++ b/fe/PDA/pages/task/thirdLocationDetail.vue @@ -155,7 +155,7 @@ scanCount: 0, jobStatus: "", toLocationInfo: null, - showFinishButton:false + showFinishButton: false } }, onLoad(param) { @@ -225,7 +225,7 @@ clearDefaultLocation() { this.toLocationInfo = null }, - finish(){ + finish() { showConfirmMsg("是否确认终止?", callback => { if (callback) { uni.showLoading({ @@ -235,7 +235,7 @@ thirdLocationRequestClose(this.id).then(res => { uni.hideLoading() uni.showToast({ - title:"终止成功" + title: "终止成功" }) navigateBack(1) }).catch(error => { @@ -250,8 +250,7 @@ if (res) { item.scaned = false; item.handledQty = null; - item.singleCodeJob="" - this.getScanCount() + item.singleCodeJob = "" } }) }, @@ -260,13 +259,13 @@ this.showMessage('收货货数量必须大于0') item.qty = item.handledQty this.$refs['comNumberBox_' + index][0].setValue(item.qty); - }else { - if(value>item.recommendQty){ - this.showMessage("收货货数量["+value+"]不能大于申请数量["+item.recommendQty+"]"); + } else { + if (value > item.recommendQty) { + this.showMessage("收货货数量[" + value + "]不能大于申请数量[" + item.recommendQty + "]"); item.handledQty = item.recommendQty this.$refs['comNumberBox_' + index][0].setValue(item.handledQty); } - + } }, openScanPopup() { @@ -287,14 +286,14 @@ that.allCount = 0; that.details.forEach(res => { res.scaned = false; - that.allCount = that.allCount + res.recommendQty + that.allCount = that.allCount + res.recommendQty + res.handledQty }) that.ispending = item.jobStatus === 2; this.getScanCount() - if(this.scanCount>0){ - this.showFinishButton=true - }else { - this.showFinishButton=false + if (this.scanCount > 0) { + this.showFinishButton = true + } else { + this.showFinishButton = false } // that.toLocation = item.details[0].recommendLocationCode; @@ -319,8 +318,7 @@ } else { item.scaned = true; item.handledQty = item.recommendQty; - item.singleCodeJob =result.scanCode - this.getScanCount() + item.singleCodeJob = result.scanCode setTimeout(res => { this.$forceUpdate() }, 1000) @@ -330,16 +328,12 @@ }, - getScanCount() { - this.scanCount=0; - this.datacontent.details.forEach(res=>{ - if(res.scaned){ - this.scanCount=this.scanCount+res.handledQty - } + this.scanCount = 0; + this.datacontent.details.forEach(res => { + this.scanCount = this.scanCount + res.handledQty }) - - // this.scanCount = this.datacontent.details.filter(r => r.scaned).length; + }, closeScanPopup() {