Browse Source

修改发料查询库存

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

6
fe/PDA/api/index.js

@ -127,6 +127,12 @@ export const getBalanceRemoveInAndOutAsync = (params) => promise(
data: params, data: params,
method: "post" 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( export const getRecommendBalanceByLocationAsync = (params,itemCode,isPackingCode) => promise(
devUrl + "/api/pda/inventory/balances/get-recommend-balance-by-locations?itemCode="+itemCode+"&isPackingCode="+isPackingCode,{ // devUrl + "/api/pda/inventory/balances/get-recommend-balance-by-locations?itemCode="+itemCode+"&isPackingCode="+isPackingCode,{ //

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

@ -176,7 +176,8 @@
cancelTakeAssembleIssueJob, cancelTakeAssembleIssueJob,
finshAssembleIssueJob, finshAssembleIssueJob,
getRecommendBalance, getRecommendBalance,
balances balances,
getBalanceRemoveInAndOut
} from '@/api/index.js'; } from '@/api/index.js';
import { import {
getJobStatuStyle, getJobStatuStyle,
@ -478,19 +479,35 @@
// sortBy: 'PackingCode asc' // sortBy: 'PackingCode asc'
}; };
balances(params) if(this.details[0].recommendFromPackingCode==result.data.code){
.then(res => { balances(params)
if (res.totalCount === 0) { .then(res => {
this.showScanMessage('按箱码【' + result.data.code + '】未查询到库存信息'); if (res.totalCount === 0) {
} else { this.showScanMessage('按箱码【' + result.data.code + '】未查询到库存信息');
callback(res); } else {
} callback(res);
uni.hideLoading(); }
}) uni.hideLoading();
.catch(err => { })
this.showScanMessage(err.message); .catch(err => {
uni.hideLoading(); 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() { recommend() {

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

@ -176,7 +176,8 @@
cancelTakeCoatingIssueJob, cancelTakeCoatingIssueJob,
finshCoatingIssueJob, finshCoatingIssueJob,
getRecommendBalance, getRecommendBalance,
balances balances,
getBalanceRemoveInAndOut
} from '@/api/index.js'; } from '@/api/index.js';
import { import {
getJobStatuStyle, getJobStatuStyle,
@ -478,19 +479,35 @@
// sortBy: 'PackingCode asc' // sortBy: 'PackingCode asc'
}; };
balances(params) if(this.details[0].recommendFromPackingCode==result.data.code){
.then(res => { balances(params)
if (res.totalCount === 0) { .then(res => {
this.showScanMessage('按箱码【' + result.data.code + '】未查询到库存信息'); if (res.totalCount === 0) {
} else { this.showScanMessage('按箱码【' + result.data.code + '】未查询到库存信息');
callback(res); } else {
} callback(res);
uni.hideLoading(); }
}) uni.hideLoading();
.catch(err => { })
this.showScanMessage(err.message); .catch(err => {
uni.hideLoading(); 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() { recommend() {

11
fe/PDA/pages/task/countFgDetail.vue

@ -382,7 +382,7 @@
// //
const start = (pageNo - 1) * pageSize; const start = (pageNo - 1) * pageSize;
const end = start + 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) return list.slice(start, end)
}, },
@ -503,7 +503,7 @@
creatDetail(result) { creatDetail(result) {
let detail = { let detail = {
isNew: true, isNew: true,
IsDelete:false, isDelete:false,
modified:true, modified:true,
countTime: new Date(), countTime: new Date(),
masterID: this.id, masterID: this.id,
@ -561,7 +561,7 @@
item.countQty = Number(qty); item.countQty = Number(qty);
item.countTime = new Date(); item.countTime = new Date();
item.IsDelete =false; item.isDelete =false;
item.modified =true; item.modified =true;
item.countOperator = localStorage.userId; item.countOperator = localStorage.userId;
if (isAdd) { if (isAdd) {
@ -584,7 +584,7 @@
this.showList.splice(index, 1) this.showList.splice(index, 1)
this.scanAllDetails.splice(index, 1) this.scanAllDetails.splice(index, 1)
}else { }else {
item.IsDelete = true; item.isDelete = true;
item.modified = true; item.modified = true;
} }
this.initList(); this.initList();
@ -622,6 +622,7 @@
return; return;
} }
var temp=""; var temp="";
for (var i = 0; i < this.scanAllDetails.length; i++) { for (var i = 0; i < this.scanAllDetails.length; i++) {
if(this.scanAllDetails[i].countQty==0){ if(this.scanAllDetails[i].countQty==0){
@ -681,7 +682,7 @@
calcScanCount() { calcScanCount() {
this.scanCount = this.scanAllDetails.filter(r=>r.IsDelete==false).length; this.scanCount = this.scanAllDetails.filter(r=>r.isDelete==false).length;
}, },
bindPickerChange(e, item) { bindPickerChange(e, item) {

23
fe/PDA/pages/task/countRawDetail.vue

@ -445,7 +445,7 @@
that.scanCount = that.scanAllDetails.length that.scanCount = that.scanAllDetails.length
that.scanAllDetails.forEach(res => { that.scanAllDetails.forEach(res => {
res.IsDelete = false; res.isDelete = false;
res.modified = false; res.modified = false;
}) })
@ -469,7 +469,7 @@
// //
const start = (pageNo - 1) * pageSize; const start = (pageNo - 1) * pageSize;
const end = start + 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) return list.slice(start, end)
}, },
@ -579,7 +579,7 @@
creatDetail(result) { creatDetail(result) {
let detail = { let detail = {
isNew: true, isNew: true,
IsDelete: false, isDelete: false,
modified: true, modified: true,
countTime: new Date(), countTime: new Date(),
masterID: this.id, masterID: this.id,
@ -636,7 +636,7 @@
setQty(item, qty, isAdd) { setQty(item, qty, isAdd) {
item.countQty = Number(qty); item.countQty = Number(qty);
item.countTime = new Date(); item.countTime = new Date();
item.IsDelete = false; item.isDelete = false;
item.modified = true; item.modified = true;
item.countOperator = localStorage.userId; item.countOperator = localStorage.userId;
if (isAdd) { if (isAdd) {
@ -659,7 +659,7 @@
this.showList.splice(index, 1) this.showList.splice(index, 1)
this.scanAllDetails.splice(index, 1) this.scanAllDetails.splice(index, 1)
} else { } else {
item.IsDelete = true; item.isDelete = true;
item.modified = true; item.modified = true;
} }
// this.scanAllDetails.splice(index, 1); // this.scanAllDetails.splice(index, 1);
@ -698,11 +698,11 @@
return; return;
} }
var temp = ""; var temp = "";
for (var i = 0; i < this.scanAllDetails.length; i++) { for (var i = 0; i < commitList.length; i++) {
if (this.scanAllDetails[i].countQty == 0) { if (commitList[i].countQty == 0) {
temp = this.scanAllDetails[i]; temp = commitList[i];
break; break;
} }
} }
@ -711,8 +711,7 @@
this.showMessage("箱码:[" + temp.packingCode + "]盘点数量为0,请输入盘点数量") this.showMessage("箱码:[" + temp.packingCode + "]盘点数量为0,请输入盘点数量")
return; return;
} }
this.finishJob(); this.finishJob();
}, },
@ -760,7 +759,7 @@
calcScanCount() { calcScanCount() {
this.scanCount = this.scanAllDetails.filter(r => r.IsDelete == false).length; this.scanCount = this.scanAllDetails.filter(r => r.isDelete == false).length;
}, },
bindPickerChange(e, item) { bindPickerChange(e, item) {

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

@ -176,7 +176,8 @@
cancelTakeInjectionIssueJob, cancelTakeInjectionIssueJob,
finshInjectionIssueJob, finshInjectionIssueJob,
getRecommendBalance, getRecommendBalance,
balances balances,
getBalanceRemoveInAndOut
} from '@/api/index.js'; } from '@/api/index.js';
import { import {
getJobStatuStyle, getJobStatuStyle,
@ -478,19 +479,36 @@
// sortBy: 'PackingCode asc' // sortBy: 'PackingCode asc'
}; };
balances(params) if(this.details[0].recommendFromPackingCode==result.data.code){
.then(res => { balances(params)
if (res.totalCount === 0) { .then(res => {
this.showScanMessage('按箱码【' + result.data.code + '】未查询到库存信息'); if (res.totalCount === 0) {
} else { this.showScanMessage('按箱码【' + result.data.code + '】未查询到库存信息');
callback(res); } else {
} callback(res);
uni.hideLoading(); }
}) uni.hideLoading();
.catch(err => { })
this.showScanMessage(err.message); .catch(err => {
uni.hideLoading(); 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() { recommend() {
@ -611,7 +629,9 @@
}, },
scanPopupGetFocus() { scanPopupGetFocus() {
this.$refs.scanPopupForm.getfocus(); if(this.$refs.scanPopupTo){
this.$refs.scanPopupTo.getfocus();
}
}, },
scrollToTop() { scrollToTop() {

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

@ -176,7 +176,8 @@
cancelTakeKittingIssueJob, cancelTakeKittingIssueJob,
finshKittingIssueJob, finshKittingIssueJob,
getRecommendBalance, getRecommendBalance,
balances balances,
getBalanceRemoveInAndOut
} from '@/api/index.js'; } from '@/api/index.js';
import { import {
getJobStatuStyle, getJobStatuStyle,
@ -479,19 +480,35 @@
// sortBy: 'PackingCode asc' // sortBy: 'PackingCode asc'
}; };
balances(params) if(this.details[0].recommendFromPackingCode==result.data.code){
.then(res => { balances(params)
if (res.totalCount === 0) { .then(res => {
this.showScanMessage('按箱码【' + result.data.code + '】未查询到库存信息'); if (res.totalCount === 0) {
} else { this.showScanMessage('按箱码【' + result.data.code + '】未查询到库存信息');
callback(res); } else {
} callback(res);
uni.hideLoading(); }
}) uni.hideLoading();
.catch(err => { })
this.showScanMessage(err.message); .catch(err => {
uni.hideLoading(); 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() { recommend() {

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

@ -176,7 +176,8 @@
cancelTakeSparePartIssueJob, cancelTakeSparePartIssueJob,
finshSparePartIssueJob, finshSparePartIssueJob,
getRecommendBalance, getRecommendBalance,
balances balances,
getBalanceRemoveInAndOut
} from '@/api/index.js'; } from '@/api/index.js';
import { import {
getJobStatuStyle, getJobStatuStyle,
@ -479,19 +480,35 @@
// sortBy: 'PackingCode asc' // sortBy: 'PackingCode asc'
}; };
balances(params) if(this.details[0].recommendFromPackingCode==result.data.code){
.then(res => { balances(params)
if (res.totalCount === 0) { .then(res => {
this.showScanMessage('按箱码【' + result.data.code + '】未查询到库存信息'); if (res.totalCount === 0) {
} else { this.showScanMessage('按箱码【' + result.data.code + '】未查询到库存信息');
callback(res); } else {
} callback(res);
uni.hideLoading(); }
}) uni.hideLoading();
.catch(err => { })
this.showScanMessage(err.message); .catch(err => {
uni.hideLoading(); 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() { recommend() {

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

@ -155,7 +155,7 @@
scanCount: 0, scanCount: 0,
jobStatus: "", jobStatus: "",
toLocationInfo: null, toLocationInfo: null,
showFinishButton:false showFinishButton: false
} }
}, },
onLoad(param) { onLoad(param) {
@ -225,7 +225,7 @@
clearDefaultLocation() { clearDefaultLocation() {
this.toLocationInfo = null this.toLocationInfo = null
}, },
finish(){ finish() {
showConfirmMsg("是否确认终止?", callback => { showConfirmMsg("是否确认终止?", callback => {
if (callback) { if (callback) {
uni.showLoading({ uni.showLoading({
@ -235,7 +235,7 @@
thirdLocationRequestClose(this.id).then(res => { thirdLocationRequestClose(this.id).then(res => {
uni.hideLoading() uni.hideLoading()
uni.showToast({ uni.showToast({
title:"终止成功" title: "终止成功"
}) })
navigateBack(1) navigateBack(1)
}).catch(error => { }).catch(error => {
@ -250,8 +250,7 @@
if (res) { if (res) {
item.scaned = false; item.scaned = false;
item.handledQty = null; item.handledQty = null;
item.singleCodeJob="" item.singleCodeJob = ""
this.getScanCount()
} }
}) })
}, },
@ -260,13 +259,13 @@
this.showMessage('收货货数量必须大于0') this.showMessage('收货货数量必须大于0')
item.qty = item.handledQty item.qty = item.handledQty
this.$refs['comNumberBox_' + index][0].setValue(item.qty); this.$refs['comNumberBox_' + index][0].setValue(item.qty);
}else { } else {
if(value>item.recommendQty){ if (value > item.recommendQty) {
this.showMessage("收货货数量["+value+"]不能大于申请数量["+item.recommendQty+"]"); this.showMessage("收货货数量[" + value + "]不能大于申请数量[" + item.recommendQty + "]");
item.handledQty = item.recommendQty item.handledQty = item.recommendQty
this.$refs['comNumberBox_' + index][0].setValue(item.handledQty); this.$refs['comNumberBox_' + index][0].setValue(item.handledQty);
} }
} }
}, },
openScanPopup() { openScanPopup() {
@ -287,14 +286,14 @@
that.allCount = 0; that.allCount = 0;
that.details.forEach(res => { that.details.forEach(res => {
res.scaned = false; res.scaned = false;
that.allCount = that.allCount + res.recommendQty that.allCount = that.allCount + res.recommendQty + res.handledQty
}) })
that.ispending = item.jobStatus === 2; that.ispending = item.jobStatus === 2;
this.getScanCount() this.getScanCount()
if(this.scanCount>0){ if (this.scanCount > 0) {
this.showFinishButton=true this.showFinishButton = true
}else { } else {
this.showFinishButton=false this.showFinishButton = false
} }
// that.toLocation = item.details[0].recommendLocationCode; // that.toLocation = item.details[0].recommendLocationCode;
@ -319,8 +318,7 @@
} else { } else {
item.scaned = true; item.scaned = true;
item.handledQty = item.recommendQty; item.handledQty = item.recommendQty;
item.singleCodeJob =result.scanCode item.singleCodeJob = result.scanCode
this.getScanCount()
setTimeout(res => { setTimeout(res => {
this.$forceUpdate() this.$forceUpdate()
}, 1000) }, 1000)
@ -330,16 +328,12 @@
}, },
getScanCount() { getScanCount() {
this.scanCount=0; this.scanCount = 0;
this.datacontent.details.forEach(res=>{ this.datacontent.details.forEach(res => {
if(res.scaned){ this.scanCount = this.scanCount + res.handledQty
this.scanCount=this.scanCount+res.handledQty
}
}) })
// this.scanCount = this.datacontent.details.filter(r => r.scaned).length;
}, },
closeScanPopup() { closeScanPopup() {

Loading…
Cancel
Save