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. 84
      fe/PDA/pages/task/unProducePickDetail.vue
  7. 90
      fe/PDA/pages/task/unProducePickWipDetail.vue
  8. 39
      fe/PDA/pages/task/unProduceReturnDetail.vue
  9. 39
      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( export const finshUnProduceReturnJob = (jobNumber,worker ,params) => request(
devUrl + "/api/pda/job/unplanned-receipt/finish/"+id+"?jobNumber="+jobNumber+"&worker="+worker, { // devUrl + "/api/pda/job/unplanned-receipt/finish?"+"jobNumber="+jobNumber+"&worker="+worker, { //
data: params, data: params,
method: "post" 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 == 21) return 'AssembleIssueJob' //装配发料
else if (val == 22) return 'KittingIssueJob' //kitting发料 else if (val == 22) return 'KittingIssueJob' //kitting发料
else if (val == 23) return 'SparePartIssueJob' //备品发料 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' else return 'Other'
} }

8
fe/PDA/pages.js

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

8
fe/PDA/pages.json

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

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

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

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

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

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

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

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

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

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

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

Loading…
Cancel
Save