Browse Source

修改非生产领料

pda_nev
李俊城 7 months ago
parent
commit
4f481fe597
  1. 8
      fe/PDA/api/index.js
  2. 2
      fe/PDA/mycomponents/coms/task/comUnProduce.vue
  3. 127
      fe/PDA/mycomponents/popup/balanceList.vue
  4. 2
      fe/PDA/pages/index/index.vue
  5. 1
      fe/PDA/pages/task/countFgDetail.vue
  6. 4
      fe/PDA/pages/task/unProducePick.vue
  7. 119
      fe/PDA/pages/task/unProducePickDetail.vue
  8. 2
      fe/PDA/pages/task/unProducePickWip.vue
  9. 40
      fe/PDA/pages/task/unProducePickWipDetail.vue
  10. 2
      fe/PDA/pages/task/unProduceReturn.vue
  11. 2
      fe/PDA/pages/task/unProduceReturnWip.vue

8
fe/PDA/api/index.js

@ -139,6 +139,14 @@ export const getRecommendBalanceByLocationAsync = (params,itemCode,isPackingCode
data: params,
method: "post"
})
//通过ERP料号和ERP储位查询库存
export const getRecommendBalanceByErplocation = (itemCode,erpLocationCode,isPackingCode) => request(
devUrl + "/api/pda/inventory/balances/get-recommend-balance-erplocation?itemCode="+itemCode+"&erpLocationCode="+erpLocationCode+"&isPackingCode="+isPackingCode,{ //
data: {},
method: "post"
})
//通用

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

@ -15,7 +15,7 @@
<!-- <text>申请单{{dataContent.materialRequestNumber}}</text> -->
<text style="font-weight: bold; color:black" v-else>{{dataContent.unplannedReceiptRequestNumber}}</text>
</view>
<view class="" v-if="fromType=='return'">
<view class="" >
<view class="label_order">
<text >ERP储位</text>
<text style="font-weight: bold; color:black" >{{dataContent.fromErpLocationCode}}</text>

127
fe/PDA/mycomponents/popup/balanceList.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="" >
<text >箱码 : </text>
<text style="font-size: 32rpx; font-weight: bold;">{{item.packingCode}}</text>
</view>
<view class="" >
<text >批次 : </text>
<text style="font-size: 32rpx; font-weight: bold;">{{item.lot}}</text>
</view>
<view class="" >
<text >ERP储位 : </text>
<text style="font-size: 32rpx; font-weight: bold;">{{item.locationErpCode}}</text>
</view>
<view class="" >
<text >库位 : </text>
<text style="font-size: 32rpx; font-weight: bold;">{{item.locationCode}}</text>
</view>
<view class="">
<text >数量 : </text>
<text style="font-size: 32rpx; font-weight: bold;">{{item.qty}}</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>

2
fe/PDA/pages/index/index.vue

@ -229,7 +229,7 @@
let that = this;
let isToday = this.$isReceiptToday;
let jobItems = await getJobCountAsync(isToday,localStorage.getItem('userId'));
jobItems.items.push({jobType:18,count:3})
// jobItems.items.push({jobType:18,count:3})
let jobTypes = jobItems.items; //

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

@ -753,6 +753,7 @@
that.datacontent.completeTime = getCurrDateTime()
let params = JSON.stringify(this.datacontent);
console.log("提交参数",params)
return;
finishCountJob(this.id, params)
.then(res => {
uni.hideLoading();

4
fe/PDA/pages/task/unProducePick.vue

@ -5,7 +5,7 @@
<win-empty-view v-if="dataList.length==0"></win-empty-view>
<view hover-class="uni-list-cell-hover" v-for="(item, index) in dataList" :key="item.id"
@click="openDetail(item)">
<comUnProduce :dataContent="item" fromType ="pick"></comUnProduce>
<comUnProduce :dataContent="item" fromType="pick"></comUnProduce>
</view>
<uni-load-more :status="loadingType" v-if="dataList.length>0" />
<!-- <win-scan-button @goScan='openScanPopup'></win-scan-button> -->
@ -111,7 +111,7 @@
pageIndex: that.pageIndex,
isCreationTimeSorting: that.isIssueTimeChange,
isToday: that.isToday,
enumUnplannedIssueType:1
ishaspag:1
};
getUnProducePickList(params)
.then(res => {

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

@ -3,12 +3,12 @@
<page-meta root-font-size="16px"></page-meta>
<view class="">
<view class="top_card">
<com-job-scan-detail :jobContent="datacontent" :isShowAllCountHint="false" :isShowScanHint="false"
:allCount="allCount" :scanCount="scanCount">
</com-job-scan-detail>
<comJobUnScanDetail :jobContent="datacontent" :scanCount="scanCount">
</comJobUnScanDetail>
</view>
<view class="" style="margin-top: 20rpx; margin-left: 20rpx; margin-right: 20rpx;">
<button type="primary" @click="showRecommend"> 推荐信息</button>
<button style="margin-top: 20rpx; " type="primary" @click="query"> 查询库存</button>
</view>
<scroll-view :scroll-top="scrollTop" scroll-y="true" @scrolltoupper="upper" @scrolltolower="lower"
@scroll="scroll" class="scroll-detail">
@ -95,6 +95,7 @@
<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>
<balanceList ref="balanceList" title="库存信息"></balanceList>
<com-message ref="comMessage" @afterCloseCommitMessage='closeCommitMessage()'
@afterCloseScanMessage='closeScanMessage'></com-message>
</view>
@ -106,7 +107,8 @@
takeUnProduceIssueJob,
cancelTakeUnProduceIssueJob,
finshUnProducePickJob,
getBalancesByFilter
getBalancesByFilter,
getRecommendBalanceByErplocation
} from '@/api/index.js';
import {
getJobStatuStyle,
@ -126,27 +128,30 @@
import winScanButton from '@/mycomponents/wincom/winScanButton.vue'
import winMulitScan from '@/mycomponents/wincom/winMulitScan.vue'
import comBalance from '@/mycomponents/common/comBalance.vue'
import comJobScanDetail from '@/mycomponents/comjob/comJobScanDetail.vue'
import comJobUnScanDetail from '@/mycomponents/comjob/comJobUnScanDetail.vue'
import winScanByPack from '@/mycomponents/wincom/winScanByPack.vue'
import comNumberBox from '@/mycomponents/common/comNumberBox.vue';
import recommendList from '@/mycomponents/popup/recommendList.vue';
import balanceList from '@/mycomponents/popup/balanceList.vue';
export default {
components: {
comMessage,
winScanButton,
winMulitScan,
comBalance,
comJobScanDetail,
comJobUnScanDetail,
winScanByPack,
comNumberBox,
recommendList
recommendList,
balanceList
},
data() {
return {
id: "",
datacontent: {},
details: [], //
facDetails: [],//
facDetails: [], //
toLocation: '',
scrollTop: 0,
old: {
@ -160,8 +165,13 @@
scanCount: 0,
isPack: true,
titleArray: ['箱标签'],
options:[],
recommendQty:0
options: [],
recommendQty: 0,
userForm: {
names: [],
values: [],
origin: []
},
}
},
@ -261,7 +271,7 @@
getUnProducePickDetail(params)
.then(item => {
that.datacontent = item;
that.facDetails=item.facDetails
that.facDetails = item.facDetails
that.details = [];
uni.hideLoading();
@ -276,6 +286,26 @@
this.$refs.recommendList.openScanPopup(this.facDetails)
},
query() {
uni.showLoading({
title: "加载中",
mask: true
})
getRecommendBalanceByErplocation(this.datacontent.itemCode,this.datacontent.fromErpLocationCode,false).then(res => {
uni.hideLoading()
if(res.length>0){
this.$refs.balanceList.openScanPopup(res)
}else {
this.showMessage("按物料["+this.datacontent.itemCode+"] ERP库位["+this.datacontent.fromErpLocationCode+"]未查询到库存");
}
}).catch(error => {
uni.hideLoading()
this.showMessage(err.message);
})
},
getScanResult(result) {
this.currentItem = result;
//ERP
@ -296,14 +326,23 @@
if (item.recommendFromLocationErpCode != addItem.handledFromLocationErpCode) {
this.showMessage('扫描箱码[' + result.data.code + "]的ERP储位与推荐的不在同一个ERP储位")
} else {
if(item.recommendPackingCode!= result.data.code){
showConfirmMsg("扫描的箱码[" + result.data.code+"]与任务中的箱码["+item.recommendPackingCode+"]不一致,是否添加到列表中",res=>{
if(res){
this.details.unshift(addItem)
}
})
}else {
if (item.recommendPackingCode != result.data.code) {
showConfirmMsg("扫描的箱码[" + result.data.code + "]与任务中的箱码[" + item
.recommendPackingCode + "]不一致,是否添加到列表中", res => {
if (res) {
this.details.unshift(addItem)
this.scanCount = 0;
this.details.forEach(res => {
this.scanCount += res.handledQty
})
}
})
} else {
this.details.unshift(addItem)
this.scanCount = 0;
this.details.forEach(res => {
this.scanCount += res.handledQty
})
}
}
}
@ -391,7 +430,7 @@
packingCode: result.data.code,
itemCode: result.data.itemCode,
lot: result.data.lot,
sortBy: 'PackingCode asc'
sortBy: ''
};
getBalancesByFilter(params)
.then(res => {
@ -421,14 +460,23 @@
if (item.recommendFromLocationErpCode != addItem.handledFromLocationErpCode) {
this.showMessage('扫描箱码[' + result.data.code + "]的ERP储位与推荐的不在同一个ERP储位")
} else {
if(item.recommendPackingCode!= result.data.code){
showConfirmMsg("扫描的箱码[" + result.data.code+"]与任务中的箱码["+item.recommendPackingCode+"]不一致,是否添加到列表中",res=>{
if(res){
this.details.unshift(addItem)
}
})
}else {
if (item.recommendPackingCode != result.data.code) {
showConfirmMsg("扫描的箱码[" + result.data.code + "]与任务中的箱码[" + item.recommendPackingCode +
"]不一致,是否添加到列表中", res => {
if (res) {
this.details.unshift(addItem)
this.scanCount = 0;
this.details.forEach(res => {
this.scanCount += res.handledQty
})
}
})
} else {
this.details.unshift(addItem)
this.scanCount = 0;
this.details.forEach(res => {
this.scanCount += res.handledQty
})
}
}
@ -453,27 +501,19 @@
this.showMessage('扫描列表为0,请先扫描');
return;
}
var hint = ""
this.scanCount = 0;
this.details.forEach(res => {
var temp = this.facDetails.find(fac => {
if (res.itemCode == fac.itemCode) {
return fac
}
})
if (temp && temp.recommendQty < res.handledQty) {
hint += "ERP料号[" + res.itemCode + "]箱码[" + res.handledPackingCode + "]扫描数量["+res.handledQty+"]大于推荐的数量["+temp.recommendQty+"]"
}
this.scanCount += res.handledQty
})
if (hint) {
this.showMessage(hint);
} else {
if(this.scanCount>this.datacontent.qty){
this.showMessage('提交的数量大于扫描的数量,不可以提交');
}else {
this.finsh();
}
},
finsh() {
let that = this;
uni.showLoading({
@ -486,6 +526,7 @@
that.datacontent.worker = localStorage.userName_CN == "" ? localStorage.userName : localStorage
.userName_CN;
that.datacontent.details = that.details;
that.datacontent.details
let params = JSON.stringify(that.datacontent);
console.log(params)
finshUnProducePickJob(that.id, params)

2
fe/PDA/pages/task/unProducePickWip.vue

@ -111,7 +111,7 @@
pageIndex: that.pageIndex,
isCreationTimeSorting: that.isIssueTimeChange,
isToday: that.isToday,
enumUnplannedIssueType:2
ishaspag:0
};
getUnProducePickList(params)
.then(res => {

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

@ -3,12 +3,12 @@
<page-meta root-font-size="16px"></page-meta>
<view class="">
<view class="top_card">
<com-job-scan-detail :jobContent="datacontent" :isShowAllCountHint="false" :isShowScanHint="false"
:allCount="allCount" :scanCount="scanCount">
</com-job-scan-detail>
<comJobUnScanDetail :jobContent="datacontent" :scanCount="scanCount">
</comJobUnScanDetail>
</view>
<view class="" style="margin-top: 20rpx; margin-left: 20rpx; margin-right: 20rpx;">
<button type="primary" @click="showRecommend"> 推荐信息</button>
<button style="margin-top: 20rpx; " type="primary" @click="queryItemCode">ERP料号查询</button>
</view>
<scroll-view scroll-y="true" @scrolltoupper="upper" @scrolltolower="lower" @scroll="scroll"
class="scroll-detail">
@ -83,8 +83,8 @@
</view>
<com-balance ref='issueitems' @selectedItem='selectedBalanceItem'></com-balance>
<win-scan-button @goScan='openScanPopup' title="单件码"></win-scan-button>
<winScanButtonTop @goScan='openItemScanPopup' title="ERP料号"></winScanButtonTop>
<winScanButtonBottom @goScan='queryItemCode' title="ERP查询"></winScanButtonBottom>
<winScanButtonBottom @goScan='openItemScanPopup' title="ERP料号"></winScanButtonBottom>
<!-- <winScanButtonBottom @goScan='queryItemCode' title="ERP查询"></winScanButtonBottom> -->
<winScanByProductCode ref="scanPackPopup" title="单件码" @getScanResult='getScanResult'></winScanByProductCode>
<winScanLocationCode ref="location" title="库位" @getLocation="getToLocation"></winScanLocationCode>
<win-scan-by-code ref="scanPopupItem" title='ERP料号' @getScanCode='getScanCode'>
@ -134,6 +134,8 @@
import winScanLocationCode from '@/mycomponents/wincom/winScanLocationCode.vue';
import winScanByCode from '@/mycomponents/wincom/winScanByCode.vue'
import recommendList from '@/mycomponents/popup/recommendList.vue';
import comJobUnScanDetail from '@/mycomponents/comjob/comJobUnScanDetail.vue'
export default {
components: {
@ -149,7 +151,8 @@
winScanByProductCode,
winScanLocationCode,
winScanByCode,
recommendList
recommendList,
comJobUnScanDetail
},
data() {
return {
@ -273,6 +276,7 @@
openItemScanPopup() {
this.$refs.scanPopupItem.openScanPopup();
},
queryItemCode() {
this.$refs.wzSelectPopup.open({
mode: 'radio', //radio checkbox
@ -327,7 +331,6 @@
getUnProducePickDetail(params)
.then(item => {
uni.hideLoading();
console.log('item', item);
that.datacontent = item;
that.facDetails = item.facDetails
that.details = [];
@ -381,6 +384,10 @@
scanSuccessAudio()
var addItem = this.setItemInfo(result, item)
this.details.unshift(addItem)
this.scanCount = 0;
this.details.forEach(res => {
this.scanCount += res.handledQty
})
this.$forceUpdate()
}
@ -487,22 +494,9 @@
this.showMessage(locationHint);
return
}
var hint = ""
this.details.forEach(res => {
var temp = this.facDetails.find(fac => {
if (res.itemCode == fac.itemCode) {
return fac
}
})
if (temp && temp.recommendQty < res.handledQty) {
hint += "物料[" + res.itemCode + "]箱码[" + res.handledPackingCode + "]扫描数量[" + res
.handledQty + "]大于推荐的数量[" + temp.recommendQty + "]"
}
})
if (hint) {
this.showMessage(hint);
} else {
if(this.scanCount>this.datacontent.qty){
this.showMessage('提交的数量大于扫描的数量,不可以提交');
}else {
this.finsh();
}

2
fe/PDA/pages/task/unProduceReturn.vue

@ -115,7 +115,7 @@
pageIndex: that.pageIndex,
isCreationTimeSorting: that.isIssueTimeChange,
isToday: that.isToday,
enumUnplannedReceiptType:1
ishaspag:1
};
getUnProduceReturnList(params)
.then(res => {

2
fe/PDA/pages/task/unProduceReturnWip.vue

@ -111,7 +111,7 @@
pageIndex: that.pageIndex,
isCreationTimeSorting: that.isIssueTimeChange,
isToday: that.isToday,
enumUnplannedReceiptType:2
ishaspag:0
};
getUnProduceReturnList(params)
.then(res => {

Loading…
Cancel
Save