Browse Source

修改非生产退料

pda_nev
李俊城 8 months ago
parent
commit
6a00b34729
  1. 13
      fe/PDA/api/index.js
  2. 8
      fe/PDA/mycomponents/comjob/comJobScanDetail.vue
  3. 8
      fe/PDA/mycomponents/comjob/comJobUnScanDetail.vue
  4. 46
      fe/PDA/mycomponents/coms/task/comUnProduce.vue
  5. 127
      fe/PDA/mycomponents/popup/recommendList.vue
  6. 428
      fe/PDA/pages/task/unProducePickDetail.vue
  7. 161
      fe/PDA/pages/task/unProduceReturnDetail.vue
  8. 8
      fe/PDA/pages/task/unProduceReturnWipDetail.vue

13
fe/PDA/api/index.js

@ -725,7 +725,19 @@ export const finshIssueJob = (id, params) => request(
data: params,
method: "post"
})
//非生产领料 承接任务
export const takeUnProduceIssueJob = (params) => request(
devUrl + "/api/pda/job/unplanned-issue/take/" + params.id, { //
data: {},
method: "post"
});
//非生产领料 取消承接任务
export const cancelTakeUnProduceIssueJob = (id) => request(
devUrl + "/api/pda/job/unplanned-issue/cancel-take/" + id, { //
data: {},
method: "post"
});
//非生产领料任务
export const getUnProducePickList = (params) => request(
@ -748,6 +760,7 @@ export const finshUnProducePickJob = (id, params) => request(
method: "post"
})
//非生产退料任务
export const getUnProduceReturnList = (params) => request(
devUrl + "/api/pda/job/unplanned-receipt/list", {

8
fe/PDA/mycomponents/comjob/comJobScanDetail.vue

@ -9,7 +9,7 @@
<text class="tit_ljh">{{ jobContent.number }}</text>
</view> -->
<view class="cell_box uni-flex uni-row margin_top" >
<view class="cell_info">
<view class="cell_info" v-if="isShowAllCountHint">
<view class="text_lightblue">{{allCountHint}}</view>
<view class="text_black text_bold">{{ allCount}}</view>
</view>
@ -75,6 +75,12 @@
type: Boolean,
default: true
},
isShowAllCountHint:{
type: Boolean,
default: true
},
isShowOther:{
type: Boolean,
default: false

8
fe/PDA/mycomponents/comjob/comJobUnScanDetail.vue

@ -13,22 +13,22 @@
<text style="font-weight: bold; color:black" >{{jobContent.fromErpLocationCode}}</text>
</view>
<view class="label_order">
<text >料号</text>
<text >ERP料号</text>
<text style="font-weight: bold; color:black" >{{jobContent.itemCode}}</text>
</view>
<view class="label_order">
<text >名称</text>
<text >料号名称</text>
<text style="font-weight: bold; color:black" >{{jobContent.itemName}}</text>
</view>
<view class="label_order">
<text >描述1</text>
<text >料号描述</text>
<text style="font-weight: bold; color:black" >{{jobContent.itemDesc1}}</text>
</view>
<view class="label_order">
<text >描述2</text>
<text >正厂编码</text>
<text style="font-weight: bold; color:black" >{{jobContent.itemDesc2}}</text>
</view>

46
fe/PDA/mycomponents/coms/task/comUnProduce.vue

@ -14,31 +14,33 @@
<text style="font-weight: bold; color:black" v-if="fromType=='pick'">{{dataContent.unplannedIssueRequestNumber}}</text>
<!-- <text>申请单{{dataContent.materialRequestNumber}}</text> -->
<text style="font-weight: bold; color:black" v-else>{{dataContent.unplannedReceiptRequestNumber}}</text>
</view>
<view class="label_order">
<text >ERP储位</text>
<text style="font-weight: bold; color:black" >{{dataContent.fromErpLocationCode}}</text>
</view>
<view class="label_order">
<text >料号</text>
<text style="font-weight: bold; color:black" >{{dataContent.itemCode}}</text>
</view>
<view class="label_order">
<text >名称</text>
<text style="font-weight: bold; color:black" >{{dataContent.itemName}}</text>
</view>
<view class="label_order">
<text >描述1</text>
<text style="font-weight: bold; color:black" >{{dataContent.itemDesc1}}</text>
<view class="" v-if="fromType=='return'">
<view class="label_order">
<text >ERP储位</text>
<text style="font-weight: bold; color:black" >{{dataContent.fromErpLocationCode}}</text>
</view>
<view class="label_order">
<text >ERP料号</text>
<text style="font-weight: bold; color:black" >{{dataContent.itemCode}}</text>
</view>
<view class="label_order">
<text >料号名称</text>
<text style="font-weight: bold; color:black" >{{dataContent.itemName}}</text>
</view>
<view class="label_order">
<text >料号描述</text>
<text style="font-weight: bold; color:black" >{{dataContent.itemDesc1}}</text>
</view>
<view class="label_order">
<text >正厂编码</text>
<text style="font-weight: bold; color:black" >{{dataContent.itemDesc2}}</text>
</view>
</view>
<view class="label_order">
<text >描述2</text>
<text style="font-weight: bold; color:black" >{{dataContent.itemDesc2}}</text>
</view>
</view>
<view class="uni-flex uni-row receipt_bot">

127
fe/PDA/mycomponents/popup/recommendList.vue

@ -0,0 +1,127 @@
<template>
<view class="container">
<uni-popup ref="popup" :maskClick="true">
<view class="" style="align-items: center;background-color: #fff; border-radius: 15rpx; margin: 20rpx;">
<view class="uni-center popup-content"
style="font-weight: bold; font-size: 40rpx;padding-top: 20rpx; padding-bottom: 20rpx;">
{{title}}
</view>
<view class="" style="background-color: black; height: 1rpx; ">
</view>
<scroll-view scroll-y=""
style="background-color: #fff; align-items: center; border-radius: 10rpx; height: 600rpx; width: 100%">
<view class="uni-flex " style="flex-direction: column; " v-for="(item,index) in dataList" :key="index">
<view class="uni-flex " style="font-size: 38rpx; padding: 25rpx; flex-direction: row;" >
<view class="" style="font-size: 32rpx; font-weight: bold;">
({{index+1}}).
</view>
<view class="" style="font-size: 32rpx;">
<view class="" >
<text >ERP料号 :</text>
<text style="font-size: 32rpx; font-weight: bold;">{{item.itemCode}}</text>
</view>
<view class="">
<text >物料名称 : </text>
<text style="font-size: 32rpx; font-weight: bold;">{{item.itemName}}</text>
</view>
<view class="">
<text >料号描述 : </text>
<text style="font-size: 32rpx; font-weight: bold;">{{item.itemDesc1}}</text>
</view>
<view class="" v-if="item.recommendPackingCode">
<text >箱码 : </text>
<text style="font-size: 32rpx; font-weight: bold;">{{item.recommendPackingCode}}</text>
</view>
<view class="" v-if="item.recommendLot">
<text >批次 : </text>
<text style="font-size: 32rpx; font-weight: bold;">{{item.recommendLot}}</text>
</view>
<view class="" >
<text >ERP储位 : </text>
<text style="font-size: 32rpx; font-weight: bold;">{{item.recommendFromLocationErpCode}}</text>
</view>
<view class="" >
<text >库位 : </text>
<text style="font-size: 32rpx; font-weight: bold;">{{item.recommendFromLocationCode}}</text>
</view>
<view class="">
<text >数量 : </text>
<text style="font-size: 32rpx; font-weight: bold;">{{item.recommendQty}}</text>
</view>
<view class="">
<text >单位 : </text>
<text style="font-size: 32rpx; font-weight: bold;">{{item.uom}}</text>
</view>
</view>
</view>
<u-line></u-line>
</view>
</scroll-view>
</view>
</uni-popup>
</view>
</template>
<script>
export default {
props: {
title: {
type: String,
default: ""
},
},
data() {
return {
dataList: [],
}
},
methods: {
openScanPopup(list) {
this.dataList = list;
this.$refs.popup.open('center')
},
closeScanPopup() {
this.$refs.popup.close()
},
select(item) {
this.closeScanPopup();
this.$emit("select", item)
}
}
}
</script>
<style>
.popup_box {
justify-content: center;
width: 100%;
margin-right: 50rpx;
padding-right: 50rpx;
height: 500rpx;
margin: 0 auto;
}
.container {
display: flex;
justify-content: center;
align-items: center;
height: 100%; /* 需要确保父容器有足够的高度 */
}
.popup-content {
display: flex;
justify-content: center;
align-items: center;
/* 其他样式 */
}
</style>

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

@ -3,13 +3,17 @@
<page-meta root-font-size="16px"></page-meta>
<view class="">
<view class="top_card">
<com-job-scan-detail :jobContent="datacontent" :allCount="allCount" :scanCount="scanCount">
<com-job-scan-detail :jobContent="datacontent" :isShowAllCountHint="false" :isShowScanHint="false"
:allCount="allCount" :scanCount="scanCount">
</com-job-scan-detail>
</view>
<view class="" style="margin-top: 20rpx; margin-left: 20rpx; margin-right: 20rpx;">
<button type="primary" @click="showRecommend"> 推荐信息</button>
</view>
<scroll-view :scroll-top="scrollTop" scroll-y="true" @scrolltoupper="upper" @scrolltolower="lower"
@scroll="scroll" class="scroll-detail">
<view class="detail-list margin_top" v-for="(item, index) in details" :key="item.id">
<view class="detail-list margin_top" v-for="(item, index) in facDetails" :key="item.id">
<view class="detail-content">
<view class="choose_main">
<view class="ljh_box">
@ -22,23 +26,13 @@
<view class="list_form">
<view class="uni-container">
<uni-table style="overflow-x: hidden;">
<uni-tr>
<!-- <uni-th width="90"></uni-th>
<uni-th width="100" align="center">推荐</uni-th>
<uni-th width="100" align="center">实际</uni-th> -->
<uni-th width="50"></uni-th>
<uni-th width="120" align="center">推荐</uni-th>
<uni-th width="120" align="center">实际</uni-th>
</uni-tr>
<uni-tr>
<uni-th width="50">数量</text></uni-th>
<uni-th width="120" align="center">
<text class="text_black">{{item.recommendQty}}({{item.uom}})</text>
<uni-th width="0" align="center">
</uni-th>
<uni-th width="120" align="center">
<view v-if="item.scaned"
<uni-th width="270" align="center">
<view
style="display: flex;flex-direction: row;justify-content:center;align-items: center;">
<com-number-box :ref="'comNumberBox_'+index" v-model="item.handledQty"
:max="99999" :min="0" style='width: 100px;'
@change="qtyChanged($event,item,index)">
@ -49,33 +43,28 @@
</uni-tr>
<uni-tr>
<uni-th width="50">箱码</uni-th>
<uni-th width="120" align="center">
<view class="text_packingCode">
{{ item.recommendPackingCode }}
</view>
<uni-th width="0" align="center">
</uni-th>
<uni-th width="120" align="center">
<view v-if="item.scaned" class="text_packingCode">
<uni-th width="270" align="center">
<view class="text_packingCode">
{{ item.handledPackingCode }}
</view>
</uni-th>
</uni-tr>
<uni-tr>
<uni-th width="50">批次</uni-th>
<uni-th width="120" align="center">
<view class="text_black">{{item.recommendLot }}</view>
<uni-th width="0" align="center">
</uni-th>
<uni-th width="120" align="center">
<view v-if="item.scaned" class="text_black">{{item.handledLot }}</view>
<uni-th width="270" align="center">
<view class="text_black">{{item.handledLot }}</view>
</uni-th>
</uni-tr>
<uni-tr>
<uni-th width="70">来源库位</uni-th>
<uni-th width="100" align="center">
<view class="text_black">{{ item.recommendFromLocationCode }}</view>
<uni-th width="0" align="center">
</uni-th>
<uni-th width="100" align="center">
<view class="text_black" v-if="item.scaned">
<uni-th width="270" align="center">
<view class="text_black">
{{ item.handledFromLocationCode }}
</view>
</uni-th>
@ -102,7 +91,7 @@
<com-balance ref='issueitems' @selectedItem='selectedBalanceItem'></com-balance>
<win-scan-button @goScan='openScanPopup'></win-scan-button>
<win-scan-by-pack ref="scanPopup" @getScanResult='getScanResult'></win-scan-by-pack>
<recommendList ref="recommendList" title="推荐信息"></recommendList>
<com-balance ref="balanceItems" @selectedItem='selectedBalanceItem'></com-balance>
<com-message ref="comMessage" @afterCloseCommitMessage='closeCommitMessage()'
@afterCloseScanMessage='closeScanMessage'></com-message>
@ -112,8 +101,8 @@
<script>
import {
getUnProducePickDetail,
takeIssueJob,
cancelTakeIssueJob,
takeUnProduceIssueJob,
cancelTakeUnProduceIssueJob,
finshUnProducePickJob,
getBalancesByFilter
} from '@/api/index.js';
@ -125,8 +114,10 @@
compareDesc,
compareStr,
getCurrDateTime,
getCurrDateTimeAndT,
scanSuccessAudio,
scanFailedAudio
scanFailedAudio,
guid
} from '@/common/basic.js';
import comMessage from '@/mycomponents/common/comMessage.vue'
import winScanButton from '@/mycomponents/wincom/winScanButton.vue'
@ -135,7 +126,7 @@
import comJobScanDetail from '@/mycomponents/comjob/comJobScanDetail.vue'
import winScanByPack from '@/mycomponents/wincom/winScanByPack.vue'
import comNumberBox from '@/mycomponents/common/comNumberBox.vue';
import recommendList from '@/mycomponents/popup/recommendList.vue';
export default {
components: {
comMessage,
@ -144,13 +135,15 @@
comBalance,
comJobScanDetail,
winScanByPack,
comNumberBox
comNumberBox,
recommendList
},
data() {
return {
id: "",
datacontent: {},
details: {},
details: [],
facDetails: [],
toLocation: '',
scrollTop: 0,
old: {
@ -164,6 +157,7 @@
scanCount: 0,
isPack: true,
titleArray: ['箱标签'],
}
},
filters: {
@ -179,14 +173,14 @@
},
onLoad(param) {
this.id = param.id;
// if (param.jobStatus == 1) {
// this.receive((callback => {
// this.getDetail();
// }));
// } else {
// this.getDetail();
// }
this.getDetail();
if (param.jobStatus == 1) {
this.receive((callback => {
this.getDetail();
}));
} else {
this.getDetail();
}
},
onReady() {},
//
@ -199,12 +193,20 @@
},
//
onBackPress(e) {
//
// cancelTakeIssueJob(this.id)
// .then(res => {})
// .catch(err => {
// this.showMessage(err.message);
// });
//
if (e.from == 'backbutton') {
if (this.jobStatus == 2) {
//
cancelTakeUnProduceIssueJob(this.id).then(res => {
uni.navigateBack();
}).catch(error => {
uni.navigateBack();
})
} else {
uni.navigateBack();
}
return true;
}
},
mounted() {
uni.setNavigationBarColor({
@ -235,176 +237,117 @@
};
getUnProducePickDetail(params)
.then(item => {
console.log('item', item);
that.datacontent = item;
that.details = item.details;
if (that.details != null) {
that.details.forEach(
r => {
r.scaned = false;
r.scanDate = new Date()
}
);
that.ispending = item.jobStatus === 2;
// if (that.toLocation === '') {
// that.toLocation = item.details[0].requestLocationCode;
// }
this.allCount = that.details.length;
this.scanCount = 0;
}
uni.hideLoading();
})
.catch(err => {
this.showMessage('未查找到详细信息')
uni.hideLoading();
});
},
getScanResult(result) {
//
let item = this.details.find(r => r.recommendPackingCode === result.data.packingCode && r
.scanPackingCode != result.data.packingCode);
if (item != undefined && item.scaned) {
scanFailedAudio()
showConfirmMsg('扫描的箱码【' + result.data.packingCode + '】匹配到任务中的【' + item.scanPackingCode +
'】箱,是否要重新匹配任务中的【' + item.scanPackingCode + '】箱?',
confirm => {
if (confirm) {
this.handledPackCode(result, true);
} else {
return;
}
})
} else {
if (this.allCount === this.scanCount) {
scanFailedAudio()
this.showMessage("零件已经全部扫描完成");
return;
}
this.handledPackCode(result, false);
}
this.scrollToTop();
},
showRecommend() {
this.$refs.recommendList.openScanPopup(this.details)
//
//scaned
handledPackCode(result, scaned) {
//
let that = this;
that.currentScanLebel = result;
let scanItem = this.details.find(r => r.scanItemCode === that.currentScanLebel.data.itemCode &&
r.scanPackingCode === that.currentScanLebel.data.packingCode &&
r.scanLot === that.currentScanLebel.data.lot &&
r.scaned == true)
if (scanItem != undefined) {
scanFailedAudio()
this.showScanMessage('箱码【' + that.currentScanLebel.data.packingCode + '】已经扫描,请扫描下一箱零件');
} else {
this.dyIssue(result, scaned);
}
},
dyIssue(result, scaned) {
let that = this;
result.data.lot ='20240717'
var itemCode = that.details.find(r => {
return r.itemCode === result.data.itemCode &&
r.scaned === scaned
})
if (itemCode == undefined) {
scanFailedAudio()
that.showScanMessage('所扫描的箱码【' + result.data.code + '】对应的物料【' + result.data.itemCode + '】不在任务中');
} else {
//ERP
var itemCode1 = that.details.find(r => {
return r.itemCode === result.data.itemCode &&
r.recommendPackingCode === result.data.code
r.scaned === scaned
})
//ERP
if (itemCode1 == undefined) {
var itemCode2 = that.details.find(r => {
return r.itemCode === result.data.itemCode &&
r.recommendLot === result.data.lot &&
r.scaned === scaned
})
//ERP
if (itemCode2 == undefined) {
//ERP
console.log("ERP料号相同、箱码不相同、批次不相同")
scanFailedAudio()
setTimeout(res => {
showConfirmMsg(itemCode.recommendPackingCode + '未执行先进先出或不是最先批次,是否继续?', confirm => {
if (confirm) {
that.currentItem = itemCode;
that.afterScanPackLabel(result);
} else {
that.scanPopupGetFocus();
}
});
}, 100)
} else {
console.log("ERP料号相同、箱码不相同、批次相同")
//ERP
that.currentItem = itemCode2;
that.afterScanPackLabel(result);
}
getScanResult(result) {
this.currentItem =result;
//
let item = this.details.find(r => r.itemCode == result.data.itemCode);
//
if (item) {
//
let scanItem = this.facDetails.find(r => r.handledPackingCode == result.data.code);
if (scanItem) {
scanFailedAudio()
this.showMessage('扫描箱码[' + result.data.code + "]已经在列表中,请勿重复扫描")
} else {
//ERP
var itemCode3 = that.details.find(r => {
return r.itemCode === result.data.itemCode &&
r.recommendPackingCode === result.data.code &&
r.recommendLot === result.data.lot &&
r.scaned === scaned
})
if (itemCode3 == undefined) {
//ERP
console.log("ERP料号相同、箱码相同、批次不同")
scanFailedAudio()
setTimeout(res => {
showConfirmMsg(itemCode1.recommendPackingCode + '未执行先进先出或不是最先批次,是否继续?',
confirm => {
if (confirm) {
that.currentItem = itemCode1;
that.afterScanPackLabel(result);
} else {
that.scanPopupGetFocus();
this.getBalance(result, res => {
if (res.totalCount === 1) {
this.balancesItem = res.items[0];
if (this.balancesItem) {
var addItem = this.setItemInfo(result, this.balancesItem)
if( item.recommendFromLocationErpCode !=addItem.handledFromLocationErpCode){
this.showMessage('扫描箱码[' + result.data.code + "]的ERP储位与推荐的不在同一个ERP储位")
}else {
this.facDetails.push(addItem)
}
});
}, 100)
}
} else {
this.$refs['issueitems'].openPopup(res.items);
}
});
} else {
console.log("ERP料号相同、箱码相同、批次相同")
//ERP
that.currentItem = itemCode3;
that.afterScanPackLabel(result);
}
}
} else {
scanFailedAudio()
//
this.showMessage('扫描的物料[' + result.data.itemCode + "]不在推荐任务列表中")
}
},
afterScanPackLabel(result) {
let that = this;
that.getBalance(result, res => {
if (res.totalCount === 1) {
that.balancesItem = res.items[0];
if (that.balancesItem != null || that.balancesItem != undefined) {
that.setBalanceInfo(this.currentItem, that.balancesItem);
that.scanPopupGetFocus();
}
} else {
this.$refs['issueitems'].openPopup(res.items);
}
});
setItemInfo(result, balance) {
var item = {
id: guid(),
itemCode: result.data.itemCode,
itemName: result.data.itemName,
itemDesc1: result.data.itemDesc1,
itemDesc2: result.data.itemDesc2,
stdPackQty: result.data.stdPackQty,
masterID: this.datacontent.id,
recommendContainerCode: "",
recommendPackingCode: result.data.packingCode,
recommendSupplierBatch: result.data.supplierBatch,
recommendArriveDate: result.data.arriveDate,
recommendProduceDate: result.data.produceDate,
recommendExpireDate: result.data.expireDate,
recommendLot: result.data.lot,
recommendFromLocationCode: balance.locationCode,
recommendFromLocationArea: balance.locationArea,
recommendFromLocationGroup: balance.locationCode,
recommendFromLocationErpCode: balance.locationErpCode,
recommendFromWarehouseCode: balance.warehouseCode,
recommendQty: result.data.qty,
uom: result.data.uom,
handledContainerCode: "",
handledPackingCode: result.data.packingCode,
handledSupplierBatch: result.data.supplierBatch,
handledArriveDate: result.data.arriveDate,
handledProduceDate: result.data.produceDate,
handledExpireDate: result.data.expireDate,
handledLot: result.data.lot,
handledFromLocationCode: balance.locationCode,
handledFromLocationArea: balance.locationArea,
handledFromLocationGroup: balance.locationCode,
handledFromLocationErpCode: balance.locationErpCode,
handledFromWarehouseCode: balance.warehouseCode,
handledQty: result.data.qty,
creatorId: guid(),
creationTime: getCurrDateTimeAndT(),
tenantId: guid(),
lastModificationTime: getCurrDateTimeAndT(),
lastModifierId: guid(),
number: this.datacontent.number,
remark: "",
status: 2,
reasonCode: "",
caseCode: "",
projCapacityCode: "",
onceBusiCode: "",
explain: "",
}
return item;
},
//
getBalance(result, callback) {
uni.showLoading({
@ -417,17 +360,17 @@
packingCode: result.data.code,
itemCode: result.data.itemCode,
lot: result.data.lot,
inventoryStatus: 2, //2
locationTypes: [2,3,4],
sortBy: 'PackingCode asc'
};
getBalancesByFilter(params)
.then(res => {
if (res.totalCount === 0) {
scanFailedAudio()
this.showScanMessage('按ERP料号【' + result.data.itemCode + '】箱码【' + result.data.code + '】批次【' +
this.showScanMessage('按ERP料号【' + result.data.itemCode + '】箱码【' + result.data
.code +
'】批次【' +
result
.data.lot + '】在【原料库】或【半成品库】或【成品库】未查询到库存信息');
.data.lot + '】未查询到库存信息');
} else {
scanSuccessAudio()
callback(res);
@ -455,8 +398,9 @@
item.handledBatch = balanceItem.batch;
item.handledLot = balanceItem.lot;
item.defaultHandleQty = balanceItem.qty>item.recommendQty?item.recommendQty:balanceItem.qty;
item.handledQty = balanceItem.qty>item.recommendQty?item.recommendQty:balanceItem.qty;
item.defaultHandleQty = balanceItem.qty > item.recommendQty ? item.recommendQty : balanceItem
.qty;
item.handledQty = balanceItem.qty > item.recommendQty ? item.recommendQty : balanceItem.qty;
item.handledFromLocationCode = balanceItem.locationCode;
item.handledFromLocationArea = balanceItem.locationArea;
item.handledFromLocationGroup = balanceItem.locationGroup;
@ -472,16 +416,21 @@
item.scanPackingCode = this.currentScanLebel.data.code;
item.scanLot = this.currentScanLebel.data.lot;
item.worker = localStorage.userName_CN == "" ? localStorage.userName : localStorage.userName_CN;
item.worker = localStorage.userName_CN == "" ? localStorage.userName : localStorage
.userName_CN;
item.uom = balanceItem.uom;
this.details.sort(compareDesc('scanDate')); //
this.calcScanCount(); //
this.$forceUpdate();
},
selectedBalanceItem(balanceItem) {
this.setBalanceInfo(this.currentItem, balanceItem);
var addItem = this.setItemInfo(this.currentItem, this.balancesItem)
if( item.recommendFromLocationErpCode !=addItem.handledFromLocationErpCode){
this.showMessage('扫描箱码[' + this.currentItem.data.code + "]的ERP储位与推荐的不在同一个ERP储位")
}else {
this.facDetails.push(addItem)
}
},
// //
@ -489,7 +438,7 @@
let params = {
id: this.id
};
takeIssueJob(params)
takeUnProduceIssueJob(params)
.then(res => {
callback(true);
})
@ -500,67 +449,14 @@
},
submit() {
let that = this;
if (that.datacontent.details.length === 0) {
this.showMessage('该任务没有选择的零件');
if (this.details.length == 0) {
this.showMessage('扫描列表为0,请先扫描');
return;
}
let checkItems = that.details.filter(r => r.scaned === true);
if (checkItems.length < that.details.length) {
showConfirmMsg('还有未扫描的零件,是否提交?', confirm => {
if (confirm) {
that.finsh();
}
});
} else {
that.finsh();
}
},
handleLocation() {
let that = this;
if (that.details[0].requestLocationCode != that.toLocation) {
showConfirmMsg('目标库位【' + that.toLocation + '】与需求库位不一致,是否要将以上零件发到目标库位?', confirm => {
if (confirm) {
that.handledPackingCode();
} else {
that.clearScanLocation();
}
});
} else {
showConfirmMsg('是否要将以上零件发到目标库位:【' + that.toLocation + "】", confirm => {
if (confirm) {
that.handledPackingCode();
} else {
that.clearScanLocation();
}
});
}
this.finsh();
},
//
handledPackingCode() {
let that = this;
let items = this.details.filter(r => {
return r.scaned && (r.handledPackingCode === null || r.handledPackingCode === '')
})
if (items.length > 0) {
let packingCodes = '';
items.forEach(r => {
packingCodes += r.recommendPackingCode + ','
})
showConfirmMsg('以下箱码对应的实际箱码为空,是否要继续领料?【' + packingCodes + "】", confirm => {
if (confirm) {
that.finsh();
} else {
that.clearScanLocation();
}
});
} else {
that.finsh();
}
},
finsh() {
let that = this;
@ -572,8 +468,8 @@
that.datacontent.completeUserName = localStorage.getItem('userName_CN')
that.datacontent.completeTime = getCurrDateTime();
that.datacontent.worker = localStorage.userName_CN == "" ? localStorage.userName : localStorage
.userName_CN;
that.datacontent.details = that.details;
.userName_CN;
that.datacontent.facDetails = that.facDetails;
let params = JSON.stringify(that.datacontent);
console.log(params)
return
@ -684,4 +580,4 @@
</script>
<style scoped lang="scss">
</style>
</style>

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

@ -7,13 +7,13 @@
</comJobUnScanDetail>
</view>
<scroll-view :scroll-top="scrollTop" scroll-y="true" @scrolltoupper="upper" @scrolltolower="lower"
@scroll="scroll" class="scroll-detail" >
@scroll="scroll" class="scroll-detail">
<view class="" style="margin-bottom:120rpx">
<view class="detail-list margin_top" v-for="(item, index) in details" :key="item.id">
<view class="detail-list margin_top" v-for="(item, index) in details" :key="item.id">
<uni-swipe-action>
<uni-swipe-action-item :right-options="options" :auto-close="false"
@click="swipeClick($event,item,index)" style='background-color: #ffffff;'>
<view class="detail-content">
<view class="choose_main">
<view class="ljh_box">
@ -26,7 +26,7 @@
<view class="list_form">
<view class="uni-container">
<uni-table style="overflow-x: hidden;">
<uni-tr>
<uni-th width="50">数量</text></uni-th>
<uni-th width="0" align="center">
@ -34,7 +34,7 @@
<uni-th width="360" align="center">
<view
style="display: flex;flex-direction: row;justify-content:center;align-items: center;">
<com-number-box :ref="'comNumberBox_'+index"
v-model="item.handledQty" :max="99999" :min="0"
style='width: 100px;'
@ -69,7 +69,7 @@
<view v-if="item.scaned" class="choose_marked_count"
style="background-color: #5FCB94; opacity: 0.65">
<view class="" style="background-color: #5FCB94; width: 200rpx;height: 300rpx;">
</view>
<!-- <image src="@/static/image_marked.svg"></image> -->
</view>
@ -78,7 +78,7 @@
</uni-swipe-action>
</view>
</view>
</scroll-view>
<view class="new_bot_box">
<win-collapse-location ref='comCollapseLocation' @getLocationCode='getToLocation' @clear='clearLocation'>
@ -159,7 +159,7 @@
isPack: true,
titleArray: ['箱标签'],
options: [],
locationInfo:null,
locationInfo: null,
jobStatus: "",
}
},
@ -227,7 +227,7 @@
},
//
getDetail() {
let that = this;
if (that.id == undefined) {
return;
@ -245,6 +245,11 @@
that.datacontent = item;
that.jobStatus = item.jobStatus;
that.scanCount = 0
that.details = []
that.locationInfo = null;
if (that.$refs.comCollapseLocation) {
that.$refs.comCollapseLocation.clearLocation();
}
uni.hideLoading();
})
.catch(err => {
@ -265,9 +270,7 @@
if (res.confirm) {
this.details.splice(index, 1)
this.scanCount = 0;
var tempQty =Number(this.datacontent.qty)/Number(this.details.length)
this.details.forEach(res => {
res.handledQty =tempQty
this.scanCount += res.handledQty
})
}
@ -290,24 +293,17 @@
this.showScanMessage('箱码【' + result.data.code + '】已经扫描');
} else {
// if (this.scanCount == this.datacontent.qty) {
// this.showMessage("")
// return;
// }
var item = {
itemCode: result.data.itemCode,
handledPackingCode: result.data.code,
handledLot: result.data.lot,
handledQty: Number(this.datacontent.qty)
handledQty: Number(result.data.qty)
}
this.setParam(item,result)
this.details.push(item)
var tempQty =Number(this.datacontent.qty)/Number(this.details.length)
this.setParam(item, result)
this.details.unshift(item)
this.scanCount = 0;
this.details.forEach(res => {
res.handledQty =tempQty
this.scanCount += res.handledQty
})
this.$forceUpdate()
@ -333,15 +329,15 @@
} else {
if (that.datacontent.fromErpLocationCode != res.erpLocationCode) {
scanFailedAudio()
that.showMessage('目标库位的ERP储位【' + res.erpLocationCode + '】与【' +
this.datacontent.fromErpLocationCode +
that.showMessage('目标库位的ERP储位【' + res.erpLocationCode + '】与【' +
this.datacontent.fromErpLocationCode +
'】不是同一ERP储位,请重新扫描');
this.$refs.comCollapseLocation.clearLocation();
} else {
scanSuccessAudio()
this.locationInfo=res
this.locationInfo = res
}
}
uni.hideLoading();
}).catch(err => {
@ -357,9 +353,9 @@
},
setParam(item, result) {
item.id = guid(),
item.id = guid()
item.creationTime = getCurrDateTimeAndT()
item.creatorId =guid()
item.creatorId = guid()
item.lastModificationTime = getCurrDateTimeAndT()
item.lastModifierId = guid()
item.masterID = this.datacontent.id
@ -369,7 +365,7 @@
item.itemDesc1 = result.data.itemDesc1
item.itemDesc2 = result.data.itemDesc2
item.itemCode = result.data.itemCode
item.stdPackQty = result.data.stdPackQty
item.stdPackQty = result.data.stdPackQty
item.status = 2
item.recommendContainerCode = ""
item.recommendPackingCode = result.data.packingCode
@ -385,7 +381,7 @@
item.recommendToWarehouseCode = ""
item.recommendQty = item.handledQty
item.uom = result.data.uom
item.handledContainerCode = result.data.containerCode
item.handledPackingCode = result.data.packingCode
item.handledSupplierBatch = result.data.supplierBatch
@ -393,14 +389,14 @@
item.handledProduceDate = result.data.produceDate
item.handledExpireDate = result.data.expireDate
item.handledLot = result.data.lot
item.handledToLocationCode = ""
item.handledToLocationArea = ""
item.handledToLocationGroup = ""
item.handledToLocationErpCode = ""
item.handledToWarehouseCode = ""
item.handledQty = item.handledQty
item.extraProperties= {
item.extraProperties = {
additionalProp1: "",
additionalProp2: "",
additionalProp3: ""
@ -408,62 +404,6 @@
},
setParams(item, result) {
item.scaned = true;
item.scanDate = new Date() //
item.fromLocationCode = "";
item.fromLocationErpCode = "";
item.toLocationCode = result.data.locationCode;
item.toLocationErpCode = result.data.locationErpCode;
//
item.handledContainerCode = result.data.containerCode;
item.handledPackingCode = result.data.packingCode;
item.handledBatch = result.data.batch;
item.handledLot = result.data.lot;
item.defaultHandleQty = result.data.qty > item.recommendQty ? item.recommendQty : result.data.qty;
item.handledQty = result.data.qty > item.recommendQty ? item.recommendQty : result.data.qty;
item.handledFromLocationCode = "";
item.handledFromLocationArea = "";
item.handledFromLocationGroup = "";
item.handledFromLocationErpCode = "";
item.handledFromWarehouseCode = "";
item.handledToLocationCode = item.recommendToLocationCode,
item.handledToLocationArea = item.recommendToLocationArea
item.handledToLocationGroup = item.recommendToLocationGroup
item.handledToLocationErpCode = item.recommendToLocationErpCode
item.handledToWarehouseCode = item.recommendToWarehouseCode
item.toLocationCode = item.recommendToLocationCode;
item.recommendLot = result.data.lot;
item.recommendPackingCode = result.data.packingCode;
item.toLocationArea = "";
item.toLocationGroup = "";
item.toLocationErpCode = "";
//
item.scanItemCode = this.currentScanLebel.data.itemCode;
item.scanPackingCode = this.currentScanLebel.data.code;
item.scanLot = this.currentScanLebel.data.lot;
item.worker = localStorage.userName_CN == "" ? localStorage.userName : localStorage.userName_CN;
item.uom = result.data.uom;
this.details.sort(compareDesc('scanDate')); //
this.calcScanCount(); //
this.$forceUpdate();
},
afterScanPackLabel(result) {
this.setParams(this.currentItem, result)
this.scanPopupGetFocus();
scanSuccessAudio()
},
// //
receive(callback) {
let params = {
@ -474,24 +414,34 @@
callback(true);
})
.catch(err => {
this.showMessage(err.message);
callback(false);
//this.showMessage("12"+err.message);
callback(true);
});
},
submit() {
if (this.details.length == 0) {
this.showMessage('扫描列表为0,请先扫描');
return;
}
if (!this.locationInfo) {
this.showMessage('请先扫描目标库位');
return;
}
this.finsh();
},
if (this.details.length == 0) {
showConfirmMsg("扫描数量为0,是否继续提交?", res => {
if (res) {
this.finsh();
}
})
return;
}else {
if(this.scanCount>this.datacontent.qty){
this.showMessage('提交的数量大于扫描的数量,不可以提交');
}else {
this.finsh();
}
}
},
finsh() {
let that = this;
@ -504,22 +454,23 @@
that.datacontent.completeTime = getCurrDateTime();
that.datacontent.worker = localStorage.userName_CN == "" ? localStorage.userName : localStorage
.userName_CN;
//
//
that.details.forEach(res => {
res.recommendToLocationCode = this.locationInfo.code
res.recommendToLocationArea = this.locationInfo.areaCode
res.recommendToLocationGroup = this.locationInfo.locationGroupCode
res.recommendToLocationErpCode = this.locationInfo.erpLocationCode
res.handledToLocationCode =this.locationInfo.code
res.handledToLocationArea=this.locationInfo.areaCode
res.handledToLocationGroup =this.locationInfo.locationGroupCode
res.handledToLocationErpCode =this.locationInfo.erpLocationCode
res.handledToLocationCode = this.locationInfo.code
res.handledToLocationArea = this.locationInfo.areaCode
res.handledToLocationGroup = this.locationInfo.locationGroupCode
res.handledToLocationErpCode = this.locationInfo.erpLocationCode
})
that.datacontent.details = that.details;
let params = JSON.stringify(that.details);
console.log("提交", params)
finshUnProduceReturnJob(that.id,this.datacontent.number,localStorage.userName_CN == "" ? localStorage.userName : localStorage.userName_CN, params)
finshUnProduceReturnJob(that.id, this.datacontent.number, localStorage.userName_CN == "" ? localStorage
.userName : localStorage.userName_CN, params)
.then(res => {
uni.hideLoading();
if (res != null) {
@ -616,8 +567,8 @@
this.scanCount = this.datacontent.qty
this.showMessage("实际退料数量不能大于申请数量")
this.$refs['comNumberBox_' + index][0].setValue(this.scanCount);
}else {
this.scanCount=value;
} else {
this.scanCount = value;
}
},
}

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

@ -283,6 +283,10 @@
that.datacontent = item;
that.jobStatus = item.jobStatus;
that.scanCount = 0
that.locationInfo = null;
if (that.$refs.comCollapseLocation) {
that.$refs.comCollapseLocation.clearLocation();
}
})
.catch(err => {
uni.hideLoading();
@ -458,8 +462,8 @@
callback(true);
})
.catch(err => {
this.showMessage(err.message);
callback(false);
// this.showMessage(err.message);
callback(true);
});
},

Loading…
Cancel
Save