Browse Source

修改非生产

pda_nev
李俊城 6 months ago
parent
commit
5f972da99f
  1. 4
      fe/PDA/api/index.js
  2. 4
      fe/PDA/common/basic.js
  3. 8
      fe/PDA/pages.js
  4. 8
      fe/PDA/pages.json
  5. 5
      fe/PDA/pages/task/countFgDetail.vue
  6. 106
      fe/PDA/pages/task/unProducePickDetail.vue
  7. 116
      fe/PDA/pages/task/unProducePickWipDetail.vue
  8. 41
      fe/PDA/pages/task/unProduceReturnDetail.vue
  9. 41
      fe/PDA/pages/task/unProduceReturnWipDetail.vue

4
fe/PDA/api/index.js

@ -797,8 +797,8 @@ export const cancelTakeUnProduceReturnJob = (id) => request(
});
//完成非生产退料任务
export const finshUnProduceReturnJob = (id,jobNumber,worker ,params) => request(
devUrl + "/api/pda/job/unplanned-receipt/finish/"+id+"?jobNumber="+jobNumber+"&worker="+worker, { //
export const finshUnProduceReturnJob = (jobNumber,worker ,params) => request(
devUrl + "/api/pda/job/unplanned-receipt/finish?"+"jobNumber="+jobNumber+"&worker="+worker, { //
data: params,
method: "post"
})

4
fe/PDA/common/basic.js

@ -216,6 +216,10 @@ export function getJobType(val) {
else if (val == 21) return 'AssembleIssueJob' //装配发料
else if (val == 22) return 'KittingIssueJob' //kitting发料
else if (val == 23) return 'SparePartIssueJob' //备品发料
else if (val == 96) return 'unProducePick' //非生产领料 原料
else if (val == 97) return 'unProducePickWip' //非生产领料 线边
else if (val == 98) return 'unProduceReturn' //非生产退料 原料
else if (val == 99) return 'unProduceReturnWip' //非生产退料 线边
else return 'Other'
}

8
fe/PDA/pages.js

@ -581,14 +581,14 @@ module.exports = () => ({
{
"path": "pages/task/unProducePickWip",
"style": {
"navigationBarTitleText": "非生产领料(线边)",
"navigationBarTitleText": "非生产领料(无箱码)",
"enablePullDownRefresh": true
}
},
{
"path": "pages/task/unProducePickWipDetail",
"style": {
"navigationBarTitleText": "非生产领料(线边)详情",
"navigationBarTitleText": "非生产领料(无箱码)详情",
"enablePullDownRefresh": true
}
},
@ -610,7 +610,7 @@ module.exports = () => ({
{
"path": "pages/task/unProduceReturnWip",
"style": {
"navigationBarTitleText": "非生产退料(线边)",
"navigationBarTitleText": "非生产退料(无箱码)",
"enablePullDownRefresh": true
}
},
@ -618,7 +618,7 @@ module.exports = () => ({
{
"path": "pages/task/unProduceReturnWipDetail",
"style": {
"navigationBarTitleText": "非生产退料(线边)详情",
"navigationBarTitleText": "非生产退料(无箱码)详情",
"enablePullDownRefresh": true
}
},

8
fe/PDA/pages.json

@ -562,14 +562,14 @@
{
"path": "pages/task/unProducePickWip",
"style": {
"navigationBarTitleText": "非生产领料(线边)",
"navigationBarTitleText": "非生产领料(无箱码)",
"enablePullDownRefresh": true
}
},
{
"path": "pages/task/unProducePickWipDetail",
"style": {
"navigationBarTitleText": "非生产领料(线边)详情",
"navigationBarTitleText": "非生产领料(无箱码)详情",
"enablePullDownRefresh": false
}
},
@ -595,7 +595,7 @@
{
"path": "pages/task/unProduceReturnWip",
"style": {
"navigationBarTitleText": "非生产退料(线边)",
"navigationBarTitleText": "非生产退料(无箱码)",
"enablePullDownRefresh": true
}
},
@ -603,7 +603,7 @@
{
"path": "pages/task/unProduceReturnWipDetail",
"style": {
"navigationBarTitleText": "非生产退料(线边)详情",
"navigationBarTitleText": "非生产退料(无箱码)详情",
"enablePullDownRefresh": true
}
},

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

@ -444,7 +444,7 @@
that.scanAllDetails = res.depDetails.filter(r => r.inventoryStage == res.inventoryStage);
that.scanCount = res.depDetails.length
that.scanAllDetails.forEach(res=>{
res.IsDelete = false;
res.isDelete = false;
res.modified=false;
})
@ -746,14 +746,13 @@
title: "提交中...",
mask: true
});
this.datacontent.depDetails =this.scanAllDetails.filter(r=>r.modified==true);
this.datacontent.depDetails =this.scanAllDetails.filter(r=>r.modified==true&&r.isDelete==false);
this.datacontent.details =[];
that.datacontent.completeUserId = localStorage.getItem('userId')
that.datacontent.completeUserName = localStorage.getItem('userName_CN')
that.datacontent.completeTime = getCurrDateTime()
let params = JSON.stringify(this.datacontent);
console.log("提交参数",params)
return;
finishCountJob(this.id, params)
.then(res => {
uni.hideLoading();

106
fe/PDA/pages/task/unProducePickDetail.vue

@ -41,7 +41,6 @@
style='width: 100px;'
@change="qtyChanged($event,item,index)">
</com-number-box>
<text class="text_black">({{item.uom}})</text>
</view>
</uni-th>
</uni-tr>
@ -283,6 +282,10 @@
},
showRecommend() {
if(this.facDetails.length==0){
this.showMessage("无推荐信息")
return;
}
this.$refs.recommendList.openScanPopup(this.facDetails)
},
@ -309,9 +312,8 @@
getScanResult(result) {
this.currentItem = result;
//ERP
let item = this.facDetails.find(r => r.itemCode == result.data.itemCode);
//
if (item) {
let item =""
if(result.data.itemCode==this.datacontent.itemCode){
//
let scanItem = this.details.find(r => r.handledPackingCode == result.data.code);
if (scanItem) {
@ -322,13 +324,28 @@
if (res.totalCount === 1) {
this.balancesItem = res.items[0];
if (this.balancesItem) {
if(this.balancesItem.qty<0){
scanFailedAudio()
this.showMessage("扫描数量必须大于等于0")
return;
}
var addItem = this.setItemInfo(result, this.balancesItem)
if (item.recommendFromLocationErpCode != addItem.handledFromLocationErpCode) {
if (this.datacontent.fromErpLocationCode != addItem.handledFromLocationErpCode) {
scanFailedAudio()
this.showMessage('扫描箱码[' + result.data.code + "]的ERP储位与推荐的不在同一个ERP储位")
} else {
if (item.recommendPackingCode != result.data.code) {
showConfirmMsg("扫描的箱码[" + result.data.code + "]与任务中的箱码[" + item
.recommendPackingCode + "]不一致,是否添加到列表中", res => {
var item =this.facDetails.find(r=>r.handledPackingCode==result.data.code)
//
if(item){
scanSuccessAudio()
this.details.unshift(addItem)
this.scanCount = 0;
this.details.forEach(res => {
this.scanCount += res.handledQty
})
}else {
scanFailedAudio()
showConfirmMsg("扫描的箱码[" + result.data.code + "]与推荐的箱码不一致,是否确认?", res => {
if (res) {
this.details.unshift(addItem)
this.scanCount = 0;
@ -337,12 +354,6 @@
})
}
})
} else {
this.details.unshift(addItem)
this.scanCount = 0;
this.details.forEach(res => {
this.scanCount += res.handledQty
})
}
}
}
@ -352,13 +363,12 @@
});
}
} else {
}else {
scanFailedAudio()
//
this.showMessage('扫描的ERP料号[' + result.data.itemCode + "]不在推荐任务列表中")
}
},
setItemInfo(result, balance) {
@ -383,7 +393,7 @@
recommendFromLocationGroup: balance.locationCode,
recommendFromLocationErpCode: balance.locationErpCode,
recommendFromWarehouseCode: balance.warehouseCode,
recommendQty: result.data.qty,
recommendQty: balance.qty,
uom: result.data.uom,
handledContainerCode: "",
@ -398,7 +408,7 @@
handledFromLocationGroup: balance.locationCode,
handledFromLocationErpCode: balance.locationErpCode,
handledFromWarehouseCode: balance.warehouseCode,
handledQty: result.data.qty,
handledQty: balance.qty,
creatorId: guid(),
creationTime: getCurrDateTimeAndT(),
@ -442,7 +452,7 @@
result
.data.lot + '】未查询到库存信息');
} else {
scanSuccessAudio()
callback(res);
}
uni.hideLoading();
@ -456,6 +466,11 @@
selectedBalanceItem(balanceItem) {
if(balancesItem.qty<0){
scanFailedAudio()
this.showMessage("扫描数量必须大于等于0")
return;
}
var addItem = this.setItemInfo(result, this.balancesItem)
if (item.recommendFromLocationErpCode != addItem.handledFromLocationErpCode) {
this.showMessage('扫描箱码[' + result.data.code + "]的ERP储位与推荐的不在同一个ERP储位")
@ -497,18 +512,29 @@
},
submit() {
if (this.details.length == 0) {
this.showMessage('扫描列表为0,请先扫描');
return;
}
this.scanCount = 0;
this.details.forEach(res => {
this.scanCount += res.handledQty
})
if(this.scanCount>this.datacontent.qty){
this.showMessage('提交的数量大于扫描的数量,不可以提交');
if(this.details.length==0){
showConfirmMsg("扫描列表为0,是否提交?",res=>{
if(res){
this.finsh();
}
})
}else {
this.finsh();
this.scanCount = 0;
this.details.forEach(res => {
this.scanCount += res.handledQty
})
if(this.scanCount<this.datacontent.qty){
showConfirmMsg("提交的数量小于需求的数量,是否提交?",res=>{
if(res){
this.finsh();
}
})
}else if(this.scanCount>this.datacontent.qty){
this.showMessage('提交的数量大于需求的数量,不可以提交');
}else {
this.finsh();
}
}
},
@ -619,14 +645,22 @@
qtyChanged(value, item, index) {
if (value <= 0) {
this.showMessage('领料数量不能小于或等于0')
item.handledQty = this.currentItem.data.qty
item.handledQty = this.datacontent.qty
this.$refs['comNumberBox_' + index][0].setValue(item.handledQty);
}else if(value>this.datacontent.qty){
item.handledQty =this.datacontent.qty
this.showMessage("实际领料数量不能大于申请数量")
this.$refs['comNumberBox_' + index][0].setValue(item.handledQty);
}
// else if (value > this.currentItem.data.qty) {
// item.handledQty = this.currentItem.data.qty
// this.showMessage("")
// this.$refs['comNumberBox_' + index][0].setValue(item.handledQty);
// }
else {
item.handledQty =value
}
this.scanCount = 0;
this.details.forEach(res => {
this.scanCount += res.handledQty
})
this.$forceUpdate();
},
}
}

116
fe/PDA/pages/task/unProducePickWipDetail.vue

@ -41,7 +41,6 @@
style='width: 100px;'
@change="qtyChanged($event,item,index)">
</com-number-box>
<text class="text_black">({{item.uom}})</text>
</view>
</uni-th>
</uni-tr>
@ -174,7 +173,6 @@
},
options: [],
facDetails: [],
currentData: null
}
},
filters: {
@ -229,10 +227,10 @@
this.$refs.location.openScanPopup()
},
getToLocation(locationInfo) {
if (this.currentItem.originalLocationCode != locationInfo.code) {
if (this.datacontent.fromErpLocationCode != locationInfo.erpLocationCode) {
scanFailedAudio()
this.showMessage("扫描库位[" + locationInfo.code + "]与推荐来源库位[" + this.currentItem
.originalLocationCode + "]不一致")
this.showMessage("扫描库位[" + locationInfo.code + "]的ERP储位与推荐来源库位的ERP储位[" + this.datacontent
.fromErpLocationCode + "]不一致")
return;
}
scanSuccessAudio()
@ -312,6 +310,10 @@
},
showRecommend() {
if(this.facDetails.length==0){
this.showMessage("无推荐信息")
return;
}
this.$refs.recommendList.openScanPopup(this.facDetails)
},
@ -350,7 +352,8 @@
uni.hideLoading();
if (res) {
var result = {
itemCode: res.code
itemCode: res.code,
uom:res.basicUom
}
this.getScanResult(result, false)
} else {
@ -365,13 +368,7 @@
},
getScanResult(result, isMesCode = true) {
// AH240321AM0153 AH240321AM0198 AH240321AM0199
let item = this.facDetails.find(r => {
return r.itemCode == result.itemCode
});
if (item) {
this.currentData = item;
if(result.itemCode==this.datacontent.itemCode){
let scanItem = this.details.find(r => r.itemCode === result.itemCode)
//
if (scanItem) {
@ -382,7 +379,7 @@
}
} else {
scanSuccessAudio()
var addItem = this.setItemInfo(result, item)
var addItem = this.setItemInfo(result)
this.details.unshift(addItem)
this.scanCount = 0;
this.details.forEach(res => {
@ -390,8 +387,7 @@
})
this.$forceUpdate()
}
} else {
}else {
if (isMesCode) {
this.showMessage('单件码【' + result.scanCode + '】所对应的ERP料号与任务中的ERP料号不一致,请重新扫描');
} else {
@ -399,16 +395,17 @@
}
}
},
setItemInfo(result, item) {
setItemInfo(result) {
var item = {
id: guid(),
itemCode: item.itemCode,
itemName: item.itemName,
itemDesc1: item.itemDesc1,
itemDesc2: item.itemDesc2,
stdPackQty: item.stdPackQty,
itemCode: this.datacontent.itemCode,
itemName: this.datacontent.itemName,
itemDesc1: this.datacontent.itemDesc1,
itemDesc2: this.datacontent.itemDesc2,
stdPackQty: this.datacontent.stdPackQty,
masterID: this.datacontent.id,
recommendContainerCode: "",
@ -418,9 +415,8 @@
recommendProduceDate: getCurrDateTimeAndT(),
recommendExpireDate: getCurrDateTimeAndT(),
recommendLot: "",
originalLocationCode: item.recommendFromLocationCode,
recommendQty: item.qty,
uom: item.uom,
recommendQty: this.datacontent.qty,
uom: result.uom,
handledContainerCode: "",
handledPackingCode: "",
@ -429,7 +425,7 @@
handledProduceDate: getCurrDateTimeAndT(),
handledExpireDate: getCurrDateTimeAndT(),
handledLot: "",
handledQty: item.recommendQty,
handledQty: this.datacontent.qty,
creatorId: guid(),
creationTime: getCurrDateTimeAndT(),
@ -449,18 +445,23 @@
},
qtyChanged(value, item, index) {
if (value == 0) {
if (value<= 0) {
this.showMessage('领料数量必须大于0')
item.handledQty = this.currentData.recommendQty
item.handledQty = this.datacontent.qty
this.$refs['comNumberBox_' + index][0].setValue(item.handledQty);
return;
}
if (value > this.currentData.recommendQty) {
}else if (value > this.datacontent.qty) {
this.showMessage("实际领料数量不能大于申请数量")
this.$refs['comNumberBox_' + index][0].setValue(this.currentData.recommendQty);
return;
item.handledQty = this.datacontent.qty
this.$refs['comNumberBox_' + index][0].setValue(item.handledQty);
}else {
item.handledQty =value
}
this.scanCount = 0;
this.details.forEach(res => {
this.scanCount += res.handledQty
})
},
// //
@ -479,27 +480,44 @@
},
submit() {
if (this.details.length == 0) {
this.showMessage('扫描列表为0,请先扫描');
return;
}
var locationHint = ""
this.details.forEach(res => {
if (!res.handledFromLocationCode) {
locationHint += "物料[" + res.itemCode + "]请扫描来源库位"
showConfirmMsg("扫描列表为0,是否提交?",res=>{
if(res){
this.finsh();
}
})
}else {
this.scanCount = 0;
this.details.forEach(res => {
this.scanCount += res.handledQty
})
var locationHint = ""
this.details.forEach(res => {
if (!res.handledFromLocationCode) {
locationHint += "物料[" + res.itemCode + "]请扫描来源库位"
}
})
if(locationHint){
this.showMessage(locationHint);
return
}
})
if(locationHint){
this.showMessage(locationHint);
return
}
if(this.scanCount>this.datacontent.qty){
this.showMessage('提交的数量大于扫描的数量,不可以提交');
}else {
this.finsh();
if(this.scanCount<this.datacontent.qty){
showConfirmMsg("提交的数量小于需求的数量,是否提交?",res=>{
if(res){
this.finsh();
}
})
}else if(this.scanCount>this.datacontent.qty){
this.showMessage('提交的数量大于需求的数量,不可以提交');
}else {
this.finsh();
}
}
},

41
fe/PDA/pages/task/unProduceReturnDetail.vue

@ -40,7 +40,6 @@
style='width: 100px;'
@change="qtyChanged($event,item,index)">
</com-number-box>
<text v-if="false" class="text_black">({{item.uom}})</text>
</view>
</uni-th>
</uni-tr>
@ -290,8 +289,10 @@
r.handledPackingCode === result.data.code)
if (scanItem) {
scanFailedAudio()
this.showScanMessage('箱码【' + result.data.code + '】已经扫描');
} else {
scanSuccessAudio()
var item = {
itemCode: result.data.itemCode,
@ -425,22 +426,30 @@
this.showMessage('请先扫描目标库位');
return;
}
if (this.details.length == 0) {
showConfirmMsg("扫描数量为0,是否继续提交?", res => {
if (res) {
this.finsh();
}
})
return;
}else {
if(this.scanCount>this.datacontent.qty){
this.showMessage('提交的数量大于扫描的数量,不可以提交');
} else {
this.scanCount = 0;
this.details.forEach(res => {
this.scanCount += res.handledQty
})
if(this.scanCount<this.datacontent.qty){
showConfirmMsg("提交的数量小于需求的数量,是否提交?",res=>{
if(res){
this.finsh();
}
})
}else if(this.scanCount>this.datacontent.qty){
this.showMessage('提交的数量大于需求的数量,不可以提交');
}else {
this.finsh();
}
}
},
finsh() {
@ -469,7 +478,7 @@
that.datacontent.details = that.details;
let params = JSON.stringify(that.details);
console.log("提交", params)
finshUnProduceReturnJob(that.id, this.datacontent.number, localStorage.userName_CN == "" ? localStorage
finshUnProduceReturnJob(this.datacontent.number, localStorage.userName_CN == "" ? localStorage
.userName : localStorage.userName_CN, params)
.then(res => {
uni.hideLoading();
@ -559,16 +568,22 @@
},
qtyChanged(value, item, index) {
if (value <= 0) {
item.handledQty = this.datacontent.qty
this.showMessage('退料数量不能小于或等于0')
this.scanCount = this.datacontent.qty
this.$refs['comNumberBox_' + index][0].setValue(this.scanCount);
this.$refs['comNumberBox_' + index][0].setValue(item.handledQty);
} else if (value > this.datacontent.qty) {
this.scanCount = this.datacontent.qty
item.handledQty = this.datacontent.qty
this.showMessage("实际退料数量不能大于申请数量")
this.$refs['comNumberBox_' + index][0].setValue(this.scanCount);
this.$refs['comNumberBox_' + index][0].setValue(item.handledQty);
} else {
this.scanCount = value;
item.handledQty = value
}
this.scanCount = 0;
this.details.forEach(res => {
this.scanCount += res.handledQty
})
},
}
}

41
fe/PDA/pages/task/unProduceReturnWipDetail.vue

@ -40,7 +40,6 @@
style='width: 100px;'
@change="qtyChanged($event,item,index)">
</com-number-box>
<text class="text_black">({{item.uom}})</text>
</view>
</uni-th>
</uni-tr>
@ -347,11 +346,12 @@
getScanResult(result, isMesCode = true) {
// AH240321AM0153 AH240321AM0198 AH240321AM0199
if (result.itemCode != this.datacontent.itemCode) {
if (isMesCode) {
scanFailedAudio()
this.showMessage('单件码【' + result.scanCode + '】所对应的ERP料号与任务中的ERP料号不一致,请重新扫描');
} else {
scanFailedAudio()
this.showMessage('没有找到ERP料号[' + result.itemCode + "]的信息,请重新扫描");
}
return;
@ -361,8 +361,10 @@
//
if (scanItem) {
if (isMesCode) {
scanFailedAudio()
this.showMessage('单件码[' + result.scanCode + "]对应的ERP料号["+result.itemCode+"]已经扫描")
} else {
scanFailedAudio()
this.showMessage('ERP料号[' + result.itemCode + "]已经扫描")
}
} else {
@ -388,7 +390,7 @@
setParam(item, result) {
item.id = guid(),
item.creationTime = getCurrDateTimeAndT()
item.creationTime = getCurrDateTimeAndT()
item.creatorId = guid()
item.lastModificationTime = getCurrDateTimeAndT()
item.lastModifierId = guid()
@ -439,17 +441,22 @@
qtyChanged(value, item, index) {
if (value <= 0) {
item.handledQty=this.datacontent.qty
this.showMessage('退料数量不能小于或等于0')
this.scanCount = this.datacontent.qty
this.$refs['comNumberBox_' + index][0].setValue(this.scanCount);
this.$refs['comNumberBox_' + index][0].setValue(item.handledQty);
} else if (value > this.datacontent.qty) {
this.scanCount = this.datacontent.qty
item.handledQty =this.datacontent.qty
this.showMessage("实际退料数量不能大于申请数量")
this.$refs['comNumberBox_' + index][0].setValue(this.scanCount);
this.$refs['comNumberBox_' + index][0].setValue(item.handledQty);
} else {
this.scanCount = value;
item.handledQty=value
}
this.scanCount = 0;
this.details.forEach(res => {
this.scanCount += res.handledQty
})
},
// //
@ -479,10 +486,20 @@
this.finsh();
}
})
return;
}else {
if(this.scanCount>this.datacontent.qty){
this.showMessage('提交的数量大于扫描的数量,不可以提交');
this.scanCount = 0;
this.details.forEach(res => {
this.scanCount += res.handledQty
})
if(this.scanCount<this.datacontent.qty){
showConfirmMsg("提交的数量小于需求的数量,是否提交?",res=>{
if(res){
this.finsh();
}
})
}else if(this.scanCount>this.datacontent.qty){
this.showMessage('提交的数量大于需求的数量,不可以提交');
}else {
this.finsh();
}
@ -510,7 +527,7 @@
let params = JSON.stringify(that.details);
var worker = localStorage.userName_CN == "" ? localStorage.userName : localStorage.userName_CN
console.log("提交", params);
finshUnProduceReturnJob(that.id, this.datacontent.number, worker, params)
finshUnProduceReturnJob(this.datacontent.number, worker, params)
.then(res => {
uni.hideLoading();
if (res != null) {

Loading…
Cancel
Save