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

45
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() {

45
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() {

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

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

50
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() {

45
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() {

45
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() {

42
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() {

Loading…
Cancel
Save