Browse Source

修改发料查询库存

pda_nev
李俊城 11 months ago
parent
commit
f6d6a8c98a
  1. 6
      fe/PDA/api/index.js
  2. 19
      fe/PDA/pages/task/assembleIssueJobDetail.vue
  3. 19
      fe/PDA/pages/task/coatingIssuleJobDetail.vue
  4. 11
      fe/PDA/pages/task/countFgDetail.vue
  5. 19
      fe/PDA/pages/task/countRawDetail.vue
  6. 24
      fe/PDA/pages/task/injectionIssueJobDetail.vue
  7. 19
      fe/PDA/pages/task/kittingIssueJobDetail.vue
  8. 19
      fe/PDA/pages/task/sparePartIssueJobDetail.vue
  9. 8
      fe/PDA/pages/task/thirdLocationDetail.vue

6
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,{ //

19
fe/PDA/pages/task/assembleIssueJobDetail.vue

@ -176,7 +176,8 @@
cancelTakeAssembleIssueJob,
finshAssembleIssueJob,
getRecommendBalance,
balances
balances,
getBalanceRemoveInAndOut
} from '@/api/index.js';
import {
getJobStatuStyle,
@ -478,6 +479,7 @@
// sortBy: 'PackingCode asc'
};
if(this.details[0].recommendFromPackingCode==result.data.code){
balances(params)
.then(res => {
if (res.totalCount === 0) {
@ -491,6 +493,21 @@
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() {

19
fe/PDA/pages/task/coatingIssuleJobDetail.vue

@ -176,7 +176,8 @@
cancelTakeCoatingIssueJob,
finshCoatingIssueJob,
getRecommendBalance,
balances
balances,
getBalanceRemoveInAndOut
} from '@/api/index.js';
import {
getJobStatuStyle,
@ -478,6 +479,7 @@
// sortBy: 'PackingCode asc'
};
if(this.details[0].recommendFromPackingCode==result.data.code){
balances(params)
.then(res => {
if (res.totalCount === 0) {
@ -491,6 +493,21 @@
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() {

11
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) {

19
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);
@ -700,9 +700,9 @@
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;
}
}
@ -713,7 +713,6 @@
}
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) {

24
fe/PDA/pages/task/injectionIssueJobDetail.vue

@ -176,7 +176,8 @@
cancelTakeInjectionIssueJob,
finshInjectionIssueJob,
getRecommendBalance,
balances
balances,
getBalanceRemoveInAndOut
} from '@/api/index.js';
import {
getJobStatuStyle,
@ -478,6 +479,7 @@
// sortBy: 'PackingCode asc'
};
if(this.details[0].recommendFromPackingCode==result.data.code){
balances(params)
.then(res => {
if (res.totalCount === 0) {
@ -491,6 +493,22 @@
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() {

19
fe/PDA/pages/task/kittingIssueJobDetail.vue

@ -176,7 +176,8 @@
cancelTakeKittingIssueJob,
finshKittingIssueJob,
getRecommendBalance,
balances
balances,
getBalanceRemoveInAndOut
} from '@/api/index.js';
import {
getJobStatuStyle,
@ -479,6 +480,7 @@
// sortBy: 'PackingCode asc'
};
if(this.details[0].recommendFromPackingCode==result.data.code){
balances(params)
.then(res => {
if (res.totalCount === 0) {
@ -492,6 +494,21 @@
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() {

19
fe/PDA/pages/task/sparePartIssueJobDetail.vue

@ -176,7 +176,8 @@
cancelTakeSparePartIssueJob,
finshSparePartIssueJob,
getRecommendBalance,
balances
balances,
getBalanceRemoveInAndOut
} from '@/api/index.js';
import {
getJobStatuStyle,
@ -479,6 +480,7 @@
// sortBy: 'PackingCode asc'
};
if(this.details[0].recommendFromPackingCode==result.data.code){
balances(params)
.then(res => {
if (res.totalCount === 0) {
@ -492,6 +494,21 @@
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() {

8
fe/PDA/pages/task/thirdLocationDetail.vue

@ -251,7 +251,6 @@
item.scaned = false;
item.handledQty = null;
item.singleCodeJob = ""
this.getScanCount()
}
})
},
@ -287,7 +286,7 @@
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()
@ -320,7 +319,6 @@
item.scaned = true;
item.handledQty = item.recommendQty;
item.singleCodeJob = result.scanCode
this.getScanCount()
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 = this.datacontent.details.filter(r => r.scaned).length;
},
closeScanPopup() {

Loading…
Cancel
Save