Browse Source

合格转隔离

intex_online20241111
zhang_li 3 weeks ago
parent
commit
204d493184
  1. 7
      src/pages.json
  2. 112
      src/pages/inventoryMove/coms/comMoveRecord.vue
  3. 94
      src/pages/inventoryMove/coms/okToHoldRecordPack.vue
  4. 15
      src/pages/inventoryMove/record/okToQuarantineRecord.vue

7
src/pages.json

@ -2213,6 +2213,13 @@
"enablePullDownRefresh": false
}
},
{
"path": "pages/inventoryMove/record/okToHoldRecord",
"style": {
"navigationBarTitleText": "物料隔离记录",
"enablePullDownRefresh": false
}
},
{
"path": "pages/inventoryMove/record/okToQuarantineRecord",
"style": {

112
src/pages/inventoryMove/coms/comMoveRecord.vue

@ -34,6 +34,8 @@
</view>
<win-scan-button @goScan='openScanPopup'></win-scan-button>
</view>
<!-- 合格转隔离单独的弹窗-->
<okToHoldRecordPack ref="okToHoldRecordPackRef" :fromLocationCodeProps='fromLocationCode' :itemCodeProps='itemCode' :batchProps='batch' :showOnePop='showOnePop' @showFromLocationPopup='showFromLocationPopup' @itemCodeClick='openScanPopup' @confirm='okToHoldRecordPackConfirm'></okToHoldRecordPack>
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' :title="'箱码'">
</win-scan-pack-and-location>
<win-scan-location ref="scanFromLocationCode" title="来源库位" @getLocation='getFromLocation'
@ -50,6 +52,7 @@
import comBlankView from '@/mycomponents/common/comBlankView.vue'
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue"
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue"
import okToHoldRecordPack from '@/pages/inventoryMove/coms/okToHoldRecordPack.vue'
import {
getInventoryStatusName
@ -92,6 +95,7 @@
comBlankView,
winScanLocation,
winScanPackAndLocation,
okToHoldRecordPack
},
props: {
// fromInventoryStatus: {
@ -122,6 +126,11 @@
type: String,
default: ""
},
//
showOnePop: {
type: Boolean,
default: false
},
},
data() {
return {
@ -137,7 +146,9 @@
dataContent: {},
fromLocationAreaTypeList: [],
toLocationAreaTypeList: [],
isShowEditLocation: false
isShowEditLocation: false,
itemCode:'',
batch:'',
}
},
@ -147,7 +158,13 @@
this.businessType = res.businessType;
this.fromLocationAreaTypeList = res.fromLocationAreaTypeList;
this.toLocationAreaTypeList = res.toLocationAreaTypeList;
if(this.showOnePop){
console.log(this.$refs.okToHoldRecordPackRef)
this.$refs.okToHoldRecordPackRef.show = true
}else{
this.showFromLocationPopup();
}
} else {
this.showErrorMessage(res.message)
}
@ -237,18 +254,49 @@
getFromLocation(location) {
this.fromLocationCode = location.code;
this.fromLocationInfo = location;
if(!this.showOnePop){
this.openScanPopup();
}
},
getToLocation(location, code) {
this.toLocationCode = code;
this.toLocationInfo = location;
},
getScanResult(result,managementType) {
console.log(result)
if(this.showOnePop){
this.itemCode= result.label.itemCode
this.batch = result.label.batch
this.getResult = result//
this.$refs.scanPopup.closeScanPopup()
}else{
if(managementType == "BY_BATCH" ||managementType == "BY_QUANTITY" ){
this.getScanResultAfterBatch(result)
}else{
this.getScanResultAfter(result)
}
}
},
okToHoldRecordPackConfirm(obj){
// this.getResult. = result//
if(!obj.fromLocationCode){
this.$refs.comMessage.showErrorMessage('请选择来源库位');
return;
}
if(!obj.itemCode){
this.$refs.comMessage.showErrorMessage('请选择零件');
return;
}
if(!obj.handleQty){
this.$refs.comMessage.showErrorMessage('请输入数量');
return;
}
// this.getResult.fromLocationCode = obj.fromLocationCode
this.getResult.label.batch = obj.handleQty
this.getResult.label.qty = obj.handleQty
this.getScanResultAfterBatchOnePop(this.getResult)
},
getScanResultAfter(result){
var balance = result.balance;
@ -367,6 +415,68 @@
}
calcHandleQty(this.detailSource);
},
getScanResultAfterBatchOnePop(result){
var balance = result.balance;
this.balanceInfo = result.balance;
var pack = result.package;
var item = this.detailSource.find(res => {
if (res.itemCode == balance.itemCode) {
return res
}
})
if (item == undefined) {
var itemp = createItemInfo(balance, pack);
let newDetail = createDetailInfo(balance, pack);
if (newDetail.packingNumber == '') {
newDetail.packingNumber = pack.number;
}
if (this.businessTypeCode == "Move") {
newDetail.toInventoryStatus = balance.inventoryStatus;
} else {
newDetail.toInventoryStatus = this.toInventoryStatus;
}
newDetail.toLocationCode = this.toLocationCode;
newDetail.fromLocationCode = result.fromLocationCode
itemp.subList.push(newDetail);
this.detailSource.push(itemp)
} else {
if( balance.inventoryStatus != this.toInventoryStatus){
this.showErrorMessage("库存状态的库存")
return
}
var detail = item.subList.find(r => {
if (r.batch == pack.batch &&
r.fromLocationCode == balance.locationCode &&
r.toInventoryStatus == balance.inventoryStatus &&
r.scaned == true) {
return r;
}
})
console.log(2333,detail)
if (detail == undefined) {
let newDetail = createDetailInfo(balance, pack);
// newDetail.inventoryStatus = balance.inventoryStatus;
if (this.businessTypeCode == "Move") {
newDetail.toInventoryStatus = balance.inventoryStatus;
} else {
newDetail.toInventoryStatus = this.toInventoryStatus;
}
if (newDetail.packingNumber == '') {
newDetail.packingNumber = pack.number;
}
newDetail.toLocationCode = this.toLocationCode;
newDetail.fromLocationCode = result.fromLocationCode
item.subList.push(newDetail);
} else {
detail.handleQty =calc.add(detail.handleQty, result.label.qty)
}
}
calcHandleQty(this.detailSource);
},
showErrorMessage(message) {
if (this.$refs.scanPopup) {
this.$refs.scanPopup.packLoseFocus()

94
src/pages/inventoryMove/coms/okToHoldRecordPack.vue

@ -1,6 +1,6 @@
<template>
<view class="">
<u-popup v-model="show" mode="bottom" border-radius="14" z-index='12'>
<u-popup v-model="showOnePop" mode="bottom" border-radius="14" z-index='12'>
<view class="title">
<view class="title-txt">
需求信息
@ -9,7 +9,7 @@
</view>
<view class="item">
<view class="label">来源库位</view>
<view class="value">{{itemCode}}</view>
<view class="value">{{fromLocationCode}}</view>
<view class="searchIcon">
<image src="/static/search.svg" mode="" @click="fromLocationClick"/>
</view>
@ -23,13 +23,15 @@
</view>
<view class="item">
<view class="label">批次</view>
<view class="value">{{itemCode}}</view>
<view class="value">
<u-input v-model='batch'></u-input>
</view>
<view class="searchIcon"></view>
</view>
<view class="item">
<view class="label">数量</view>
<view class="value1">
<u-number-box v-model="value" @change="valChange"></u-number-box>
<u-number-box v-model="handleQty" @change="valChange"></u-number-box>
<view class="uom">EA</view>
</view>
</view>
@ -39,8 +41,9 @@
</view>
</u-popup>
<win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getLocation'
:locationAreaTypeList="fromLocationAreaTypeList"></win-scan-location>
<!-- <win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getFromLocation'
:locationAreaTypeList="fromLocationAreaTypeList"></win-scan-location> -->
<comMessage ref="comMessage"></comMessage>
</view>
</template>
@ -54,36 +57,76 @@
components: {
winScanLocation
},
emits: ["showFromLocationPopup",'itemCodeClick','confirm','fromLocationBlur'],
data() {
return {
show:true,
businessTypeCode: "OkToHold",
handleQty:0,
fromLocationCode:'',
itemCode:'',
batch:'',
}
},
props: {
fromLocationCodeProps:{
type: String,
default: ''
},
//
showOnePop: {
type: Boolean,
default: false
},
itemCodeProps:{
type: String,
default: ''
},
batchProps:{
type: String,
default: ''
},
},
mounted() {
},
methods: {
//
openFromLocation(){
this.$refs.scanLocationCode.openScanPopup()
fromLocationClick(){
// this.$refs.scanLocationCode.openScanPopup()
this.$emit("showFromLocationPopup");
},
getLocation(location, code){
console.log(location,code)
//
itemCodeClick(){
// this.$refs.scanLocationCode.openScanPopup()
this.$emit("itemCodeClick");
},
getBusinessTypeFunc() {
getBusinessType(this.businessTypeCode, res => {
if (res.success) {
this.businessType = res.businessType;
this.fromInventoryStatuses = res.fromInventoryStatuses.split(',');
this.fromLocationAreaTypeList = res.fromLocationAreaTypeList
this.openFromLocation();
} else {
this.showErrorMessage(res.message)
confirm(){
// this.$refs.scanLocationCode.openScanPopup()
let obj = {
fromLocationCode:this.fromLocationCode,
itemCode:this.itemCode,
batch:this.batch,
handleQty:this.handleQty,
}
});
this.$emit("confirm",obj);
},
fromLocationBlur(){
// this.$refs.scanLocationCode.openScanPopup()
console.log(this.fromLocationCode)
this.$emit("fromLocationBlur");
},
},
watch: {
fromLocationCodeProps(newVal) {
console.log(newVal)
this.fromLocationCode = newVal
},
itemCodeProps(newVal) {
this.itemCode = newVal
},
batchProps(newVal) {
this.batch = newVal
},
}
}
</script>
@ -122,6 +165,10 @@
width: 0px;
height: 80rpx;
border: 1px solid #dedede;
display: flex;
align-items: center;
font-size: 32rpx;
padding: 0px 20rpx;
}
.value1{
flex:1;
@ -129,6 +176,7 @@
height: 80rpx;
display: flex;
align-items: center;
font-size: 32rpx;
}
.searchIcon{
width: 40rpx;

15
src/pages/inventoryMove/record/okToQuarantineRecord.vue

@ -1,28 +1,25 @@
<template>
<!-- 合格转隔离 -->
<view class="page-wraper">
<okToHoldRecordPack ref="okToHoldRecordPackRef" > </okToHoldRecordPack>
<!-- <okToHoldRecordPack ref="okToHoldRecordPackRef" > </okToHoldRecordPack> -->
<comMoveRecord :myTitle="title" businessTypeCode='OkToHold' :showOnePop='true'> </comMoveRecord>
</view>
</template>
<script>
import okToHoldRecordPack from '@/pages/inventoryMove/coms/okToHoldRecordPack.vue'
// import okToHoldRecordPack from '@/pages/inventoryMove/coms/okToHoldRecordPack.vue'
import comMoveRecord from '@/pages/inventoryMove/coms/comMoveRecord.vue'
export default {
components: {
okToHoldRecordPack
// okToHoldRecordPack
comMoveRecord
},
data() {
return {
title:'',
show:true
}
},
onLoad(option){
this.$nextTick(()=>{
this.$refs.okToHoldRecordPackRef.openFromLocation.open('bottom')
})
},
methods: {

Loading…
Cancel
Save