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. 12
      fe/PDA/mycomponents/coms/task/comUnProduce.vue
  5. 127
      fe/PDA/mycomponents/popup/recommendList.vue
  6. 404
      fe/PDA/pages/task/unProducePickDetail.vue
  7. 103
      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, data: params,
method: "post" 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( export const getUnProducePickList = (params) => request(
@ -748,6 +760,7 @@ export const finshUnProducePickJob = (id, params) => request(
method: "post" method: "post"
}) })
//非生产退料任务 //非生产退料任务
export const getUnProduceReturnList = (params) => request( export const getUnProduceReturnList = (params) => request(
devUrl + "/api/pda/job/unplanned-receipt/list", { 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> <text class="tit_ljh">{{ jobContent.number }}</text>
</view> --> </view> -->
<view class="cell_box uni-flex uni-row margin_top" > <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_lightblue">{{allCountHint}}</view>
<view class="text_black text_bold">{{ allCount}}</view> <view class="text_black text_bold">{{ allCount}}</view>
</view> </view>
@ -75,6 +75,12 @@
type: Boolean, type: Boolean,
default: true default: true
}, },
isShowAllCountHint:{
type: Boolean,
default: true
},
isShowOther:{ isShowOther:{
type: Boolean, type: Boolean,
default: false default: false

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

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

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

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

@ -3,13 +3,17 @@
<page-meta root-font-size="16px"></page-meta> <page-meta root-font-size="16px"></page-meta>
<view class=""> <view class="">
<view class="top_card"> <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> </com-job-scan-detail>
</view> </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-view :scroll-top="scrollTop" scroll-y="true" @scrolltoupper="upper" @scrolltolower="lower"
@scroll="scroll" class="scroll-detail"> @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="detail-content">
<view class="choose_main"> <view class="choose_main">
<view class="ljh_box"> <view class="ljh_box">
@ -22,23 +26,13 @@
<view class="list_form"> <view class="list_form">
<view class="uni-container"> <view class="uni-container">
<uni-table style="overflow-x: hidden;"> <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-tr>
<uni-th width="50">数量</text></uni-th> <uni-th width="50">数量</text></uni-th>
<uni-th width="120" align="center"> <uni-th width="0" align="center">
<text class="text_black">{{item.recommendQty}}({{item.uom}})</text>
</uni-th> </uni-th>
<uni-th width="120" align="center"> <uni-th width="270" align="center">
<view v-if="item.scaned" <view
style="display: flex;flex-direction: row;justify-content:center;align-items: center;"> style="display: flex;flex-direction: row;justify-content:center;align-items: center;">
<com-number-box :ref="'comNumberBox_'+index" v-model="item.handledQty" <com-number-box :ref="'comNumberBox_'+index" v-model="item.handledQty"
:max="99999" :min="0" style='width: 100px;' :max="99999" :min="0" style='width: 100px;'
@change="qtyChanged($event,item,index)"> @change="qtyChanged($event,item,index)">
@ -49,33 +43,28 @@
</uni-tr> </uni-tr>
<uni-tr> <uni-tr>
<uni-th width="50">箱码</uni-th> <uni-th width="50">箱码</uni-th>
<uni-th width="120" align="center"> <uni-th width="0" align="center">
<view class="text_packingCode">
{{ item.recommendPackingCode }}
</view>
</uni-th> </uni-th>
<uni-th width="120" align="center"> <uni-th width="270" align="center">
<view v-if="item.scaned" class="text_packingCode"> <view class="text_packingCode">
{{ item.handledPackingCode }} {{ item.handledPackingCode }}
</view> </view>
</uni-th> </uni-th>
</uni-tr> </uni-tr>
<uni-tr> <uni-tr>
<uni-th width="50">批次</uni-th> <uni-th width="50">批次</uni-th>
<uni-th width="120" align="center"> <uni-th width="0" align="center">
<view class="text_black">{{item.recommendLot }}</view>
</uni-th> </uni-th>
<uni-th width="120" align="center"> <uni-th width="270" align="center">
<view v-if="item.scaned" class="text_black">{{item.handledLot }}</view> <view class="text_black">{{item.handledLot }}</view>
</uni-th> </uni-th>
</uni-tr> </uni-tr>
<uni-tr> <uni-tr>
<uni-th width="70">来源库位</uni-th> <uni-th width="70">来源库位</uni-th>
<uni-th width="100" align="center"> <uni-th width="0" align="center">
<view class="text_black">{{ item.recommendFromLocationCode }}</view>
</uni-th> </uni-th>
<uni-th width="100" align="center"> <uni-th width="270" align="center">
<view class="text_black" v-if="item.scaned"> <view class="text_black">
{{ item.handledFromLocationCode }} {{ item.handledFromLocationCode }}
</view> </view>
</uni-th> </uni-th>
@ -102,7 +91,7 @@
<com-balance ref='issueitems' @selectedItem='selectedBalanceItem'></com-balance> <com-balance ref='issueitems' @selectedItem='selectedBalanceItem'></com-balance>
<win-scan-button @goScan='openScanPopup'></win-scan-button> <win-scan-button @goScan='openScanPopup'></win-scan-button>
<win-scan-by-pack ref="scanPopup" @getScanResult='getScanResult'></win-scan-by-pack> <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-balance ref="balanceItems" @selectedItem='selectedBalanceItem'></com-balance>
<com-message ref="comMessage" @afterCloseCommitMessage='closeCommitMessage()' <com-message ref="comMessage" @afterCloseCommitMessage='closeCommitMessage()'
@afterCloseScanMessage='closeScanMessage'></com-message> @afterCloseScanMessage='closeScanMessage'></com-message>
@ -112,8 +101,8 @@
<script> <script>
import { import {
getUnProducePickDetail, getUnProducePickDetail,
takeIssueJob, takeUnProduceIssueJob,
cancelTakeIssueJob, cancelTakeUnProduceIssueJob,
finshUnProducePickJob, finshUnProducePickJob,
getBalancesByFilter getBalancesByFilter
} from '@/api/index.js'; } from '@/api/index.js';
@ -125,8 +114,10 @@
compareDesc, compareDesc,
compareStr, compareStr,
getCurrDateTime, getCurrDateTime,
getCurrDateTimeAndT,
scanSuccessAudio, scanSuccessAudio,
scanFailedAudio scanFailedAudio,
guid
} from '@/common/basic.js'; } from '@/common/basic.js';
import comMessage from '@/mycomponents/common/comMessage.vue' import comMessage from '@/mycomponents/common/comMessage.vue'
import winScanButton from '@/mycomponents/wincom/winScanButton.vue' import winScanButton from '@/mycomponents/wincom/winScanButton.vue'
@ -135,7 +126,7 @@
import comJobScanDetail from '@/mycomponents/comjob/comJobScanDetail.vue' import comJobScanDetail from '@/mycomponents/comjob/comJobScanDetail.vue'
import winScanByPack from '@/mycomponents/wincom/winScanByPack.vue' import winScanByPack from '@/mycomponents/wincom/winScanByPack.vue'
import comNumberBox from '@/mycomponents/common/comNumberBox.vue'; import comNumberBox from '@/mycomponents/common/comNumberBox.vue';
import recommendList from '@/mycomponents/popup/recommendList.vue';
export default { export default {
components: { components: {
comMessage, comMessage,
@ -144,13 +135,15 @@
comBalance, comBalance,
comJobScanDetail, comJobScanDetail,
winScanByPack, winScanByPack,
comNumberBox comNumberBox,
recommendList
}, },
data() { data() {
return { return {
id: "", id: "",
datacontent: {}, datacontent: {},
details: {}, details: [],
facDetails: [],
toLocation: '', toLocation: '',
scrollTop: 0, scrollTop: 0,
old: { old: {
@ -164,6 +157,7 @@
scanCount: 0, scanCount: 0,
isPack: true, isPack: true,
titleArray: ['箱标签'], titleArray: ['箱标签'],
} }
}, },
filters: { filters: {
@ -179,14 +173,14 @@
}, },
onLoad(param) { onLoad(param) {
this.id = param.id; this.id = param.id;
// if (param.jobStatus == 1) { if (param.jobStatus == 1) {
// this.receive((callback => { this.receive((callback => {
// this.getDetail(); this.getDetail();
// })); }));
// } else { } else {
// this.getDetail();
// }
this.getDetail(); this.getDetail();
}
}, },
onReady() {}, onReady() {},
// //
@ -200,11 +194,19 @@
// //
onBackPress(e) { onBackPress(e) {
// //
// cancelTakeIssueJob(this.id) if (e.from == 'backbutton') {
// .then(res => {}) if (this.jobStatus == 2) {
// .catch(err => { //
// this.showMessage(err.message); cancelTakeUnProduceIssueJob(this.id).then(res => {
// }); uni.navigateBack();
}).catch(error => {
uni.navigateBack();
})
} else {
uni.navigateBack();
}
return true;
}
}, },
mounted() { mounted() {
uni.setNavigationBarColor({ uni.setNavigationBarColor({
@ -235,176 +237,117 @@
}; };
getUnProducePickDetail(params) getUnProducePickDetail(params)
.then(item => { .then(item => {
console.log('item', item);
that.datacontent = item; that.datacontent = item;
that.details = item.details; 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(); uni.hideLoading();
}) })
.catch(err => { .catch(err => {
this.showMessage('未查找到详细信息') this.showMessage('未查找到详细信息')
uni.hideLoading(); uni.hideLoading();
}); });
}, },
getScanResult(result) { showRecommend() {
// this.$refs.recommendList.openScanPopup(this.details)
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();
}, },
// getScanResult(result) {
//scaned this.currentItem =result;
handledPackCode(result, scaned) { //
// let item = this.details.find(r => r.itemCode == result.data.itemCode);
let that = this; //
that.currentScanLebel = result; if (item) {
let scanItem = this.details.find(r => r.scanItemCode === that.currentScanLebel.data.itemCode && //
r.scanPackingCode === that.currentScanLebel.data.packingCode && let scanItem = this.facDetails.find(r => r.handledPackingCode == result.data.code);
r.scanLot === that.currentScanLebel.data.lot && if (scanItem) {
r.scaned == true)
if (scanItem != undefined) {
scanFailedAudio() scanFailedAudio()
this.showScanMessage('箱码【' + that.currentScanLebel.data.packingCode + '】已经扫描,请扫描下一箱零件'); this.showMessage('扫描箱码[' + result.data.code + "]已经在列表中,请勿重复扫描")
} else { } else {
this.dyIssue(result, scaned); this.getBalance(result, res => {
} if (res.totalCount === 1) {
}, this.balancesItem = res.items[0];
if (this.balancesItem) {
var addItem = this.setItemInfo(result, this.balancesItem)
dyIssue(result, scaned) { if( item.recommendFromLocationErpCode !=addItem.handledFromLocationErpCode){
let that = this; this.showMessage('扫描箱码[' + result.data.code + "]的ERP储位与推荐的不在同一个ERP储位")
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 { }else {
//ERP this.facDetails.push(addItem)
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 { } else {
that.scanPopupGetFocus(); this.$refs['issueitems'].openPopup(res.items);
} }
}); });
}, 100)
} else {
console.log("ERP料号相同、箱码不相同、批次相同")
//ERP
that.currentItem = itemCode2;
that.afterScanPackLabel(result);
} }
} else { } 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() scanFailedAudio()
setTimeout(res => { //
showConfirmMsg(itemCode1.recommendPackingCode + '未执行先进先出或不是最先批次,是否继续?', this.showMessage('扫描的物料[' + result.data.itemCode + "]不在推荐任务列表中")
confirm => {
if (confirm) {
that.currentItem = itemCode1;
that.afterScanPackLabel(result);
} else {
that.scanPopupGetFocus();
} }
});
}, 100)
} else {
console.log("ERP料号相同、箱码相同、批次相同")
//ERP
that.currentItem = itemCode3;
that.afterScanPackLabel(result);
}
}
}
}, },
afterScanPackLabel(result) { setItemInfo(result, balance) {
let that = this; var item = {
that.getBalance(result, res => { id: guid(),
if (res.totalCount === 1) { itemCode: result.data.itemCode,
that.balancesItem = res.items[0]; itemName: result.data.itemName,
if (that.balancesItem != null || that.balancesItem != undefined) { itemDesc1: result.data.itemDesc1,
that.setBalanceInfo(this.currentItem, that.balancesItem); itemDesc2: result.data.itemDesc2,
that.scanPopupGetFocus(); stdPackQty: result.data.stdPackQty,
} masterID: this.datacontent.id,
} else {
this.$refs['issueitems'].openPopup(res.items); 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) { getBalance(result, callback) {
uni.showLoading({ uni.showLoading({
@ -417,17 +360,17 @@
packingCode: result.data.code, packingCode: result.data.code,
itemCode: result.data.itemCode, itemCode: result.data.itemCode,
lot: result.data.lot, lot: result.data.lot,
inventoryStatus: 2, //2
locationTypes: [2,3,4],
sortBy: 'PackingCode asc' sortBy: 'PackingCode asc'
}; };
getBalancesByFilter(params) getBalancesByFilter(params)
.then(res => { .then(res => {
if (res.totalCount === 0) { if (res.totalCount === 0) {
scanFailedAudio() scanFailedAudio()
this.showScanMessage('按ERP料号【' + result.data.itemCode + '】箱码【' + result.data.code + '】批次【' + this.showScanMessage('按ERP料号【' + result.data.itemCode + '】箱码【' + result.data
.code +
'】批次【' +
result result
.data.lot + '】在【原料库】或【半成品库】或【成品库】未查询到库存信息'); .data.lot + '】未查询到库存信息');
} else { } else {
scanSuccessAudio() scanSuccessAudio()
callback(res); callback(res);
@ -455,7 +398,8 @@
item.handledBatch = balanceItem.batch; item.handledBatch = balanceItem.batch;
item.handledLot = balanceItem.lot; item.handledLot = balanceItem.lot;
item.defaultHandleQty = 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.handledQty = balanceItem.qty > item.recommendQty ? item.recommendQty : balanceItem.qty;
item.handledFromLocationCode = balanceItem.locationCode; item.handledFromLocationCode = balanceItem.locationCode;
item.handledFromLocationArea = balanceItem.locationArea; item.handledFromLocationArea = balanceItem.locationArea;
@ -472,16 +416,21 @@
item.scanPackingCode = this.currentScanLebel.data.code; item.scanPackingCode = this.currentScanLebel.data.code;
item.scanLot = this.currentScanLebel.data.lot; 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; item.uom = balanceItem.uom;
this.details.sort(compareDesc('scanDate')); // this.details.sort(compareDesc('scanDate')); //
this.calcScanCount(); //
this.$forceUpdate(); this.$forceUpdate();
}, },
selectedBalanceItem(balanceItem) { 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 = { let params = {
id: this.id id: this.id
}; };
takeIssueJob(params) takeUnProduceIssueJob(params)
.then(res => { .then(res => {
callback(true); callback(true);
}) })
@ -500,67 +449,14 @@
}, },
submit() { submit() {
let that = this; if (this.details.length == 0) {
if (that.datacontent.details.length === 0) { this.showMessage('扫描列表为0,请先扫描');
this.showMessage('该任务没有选择的零件');
return; return;
} }
let checkItems = that.details.filter(r => r.scaned === true); this.finsh();
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();
}
});
}
},
//
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() { finsh() {
let that = this; let that = this;
@ -573,7 +469,7 @@
that.datacontent.completeTime = getCurrDateTime(); that.datacontent.completeTime = getCurrDateTime();
that.datacontent.worker = localStorage.userName_CN == "" ? localStorage.userName : localStorage that.datacontent.worker = localStorage.userName_CN == "" ? localStorage.userName : localStorage
.userName_CN; .userName_CN;
that.datacontent.details = that.details; that.datacontent.facDetails = that.facDetails;
let params = JSON.stringify(that.datacontent); let params = JSON.stringify(that.datacontent);
console.log(params) console.log(params)
return return

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

@ -245,6 +245,11 @@
that.datacontent = item; that.datacontent = item;
that.jobStatus = item.jobStatus; that.jobStatus = item.jobStatus;
that.scanCount = 0 that.scanCount = 0
that.details = []
that.locationInfo = null;
if (that.$refs.comCollapseLocation) {
that.$refs.comCollapseLocation.clearLocation();
}
uni.hideLoading(); uni.hideLoading();
}) })
.catch(err => { .catch(err => {
@ -265,9 +270,7 @@
if (res.confirm) { if (res.confirm) {
this.details.splice(index, 1) this.details.splice(index, 1)
this.scanCount = 0; this.scanCount = 0;
var tempQty =Number(this.datacontent.qty)/Number(this.details.length)
this.details.forEach(res => { this.details.forEach(res => {
res.handledQty =tempQty
this.scanCount += res.handledQty this.scanCount += res.handledQty
}) })
} }
@ -290,24 +293,17 @@
this.showScanMessage('箱码【' + result.data.code + '】已经扫描'); this.showScanMessage('箱码【' + result.data.code + '】已经扫描');
} else { } else {
// if (this.scanCount == this.datacontent.qty) {
// this.showMessage("")
// return;
// }
var item = { var item = {
itemCode: result.data.itemCode, itemCode: result.data.itemCode,
handledPackingCode: result.data.code, handledPackingCode: result.data.code,
handledLot: result.data.lot, handledLot: result.data.lot,
handledQty: Number(this.datacontent.qty) handledQty: Number(result.data.qty)
} }
this.setParam(item, result) this.setParam(item, result)
this.details.push(item) this.details.unshift(item)
var tempQty =Number(this.datacontent.qty)/Number(this.details.length)
this.scanCount = 0; this.scanCount = 0;
this.details.forEach(res => { this.details.forEach(res => {
res.handledQty =tempQty
this.scanCount += res.handledQty this.scanCount += res.handledQty
}) })
this.$forceUpdate() this.$forceUpdate()
@ -357,7 +353,7 @@
}, },
setParam(item, result) { setParam(item, result) {
item.id = guid(), item.id = guid()
item.creationTime = getCurrDateTimeAndT() item.creationTime = getCurrDateTimeAndT()
item.creatorId = guid() item.creatorId = guid()
item.lastModificationTime = getCurrDateTimeAndT() item.lastModificationTime = getCurrDateTimeAndT()
@ -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) { receive(callback) {
let params = { let params = {
@ -474,24 +414,34 @@
callback(true); callback(true);
}) })
.catch(err => { .catch(err => {
this.showMessage(err.message); //this.showMessage("12"+err.message);
callback(false); callback(true);
}); });
}, },
submit() { submit() {
if (this.details.length == 0) {
this.showMessage('扫描列表为0,请先扫描');
return;
}
if (!this.locationInfo) { if (!this.locationInfo) {
this.showMessage('请先扫描目标库位'); this.showMessage('请先扫描目标库位');
return; return;
} }
if (this.details.length == 0) {
showConfirmMsg("扫描数量为0,是否继续提交?", res => {
if (res) {
this.finsh(); this.finsh();
}, }
})
return;
}else {
if(this.scanCount>this.datacontent.qty){
this.showMessage('提交的数量大于扫描的数量,不可以提交');
}else {
this.finsh();
}
}
},
finsh() { finsh() {
let that = this; let that = this;
@ -519,7 +469,8 @@
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.userName : localStorage.userName_CN, params) finshUnProduceReturnJob(that.id, this.datacontent.number, localStorage.userName_CN == "" ? localStorage
.userName : localStorage.userName_CN, params)
.then(res => { .then(res => {
uni.hideLoading(); uni.hideLoading();
if (res != null) { if (res != null) {

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

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

Loading…
Cancel
Save