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. 2
      src/pages/inventoryMove/record/okToHoldRecord.vue
  5. 15
      src/pages/inventoryMove/record/okToQuarantineRecord.vue

7
src/pages.json

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

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

@ -34,6 +34,8 @@
</view> </view>
<win-scan-button @goScan='openScanPopup'></win-scan-button> <win-scan-button @goScan='openScanPopup'></win-scan-button>
</view> </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 ref="scanPopup" @getResult='getScanResult' :title="'箱码'">
</win-scan-pack-and-location> </win-scan-pack-and-location>
<win-scan-location ref="scanFromLocationCode" title="来源库位" @getLocation='getFromLocation' <win-scan-location ref="scanFromLocationCode" title="来源库位" @getLocation='getFromLocation'
@ -50,6 +52,7 @@
import comBlankView from '@/mycomponents/common/comBlankView.vue' import comBlankView from '@/mycomponents/common/comBlankView.vue'
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue" import winScanLocation from "@/mycomponents/scan/winScanLocation.vue"
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue" import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue"
import okToHoldRecordPack from '@/pages/inventoryMove/coms/okToHoldRecordPack.vue'
import { import {
getInventoryStatusName getInventoryStatusName
@ -92,6 +95,7 @@
comBlankView, comBlankView,
winScanLocation, winScanLocation,
winScanPackAndLocation, winScanPackAndLocation,
okToHoldRecordPack
}, },
props: { props: {
// fromInventoryStatus: { // fromInventoryStatus: {
@ -122,6 +126,11 @@
type: String, type: String,
default: "" default: ""
}, },
//
showOnePop: {
type: Boolean,
default: false
},
}, },
data() { data() {
return { return {
@ -137,7 +146,9 @@
dataContent: {}, dataContent: {},
fromLocationAreaTypeList: [], fromLocationAreaTypeList: [],
toLocationAreaTypeList: [], toLocationAreaTypeList: [],
isShowEditLocation: false isShowEditLocation: false,
itemCode:'',
batch:'',
} }
}, },
@ -147,7 +158,13 @@
this.businessType = res.businessType; this.businessType = res.businessType;
this.fromLocationAreaTypeList = res.fromLocationAreaTypeList; this.fromLocationAreaTypeList = res.fromLocationAreaTypeList;
this.toLocationAreaTypeList = res.toLocationAreaTypeList; this.toLocationAreaTypeList = res.toLocationAreaTypeList;
if(this.showOnePop){
console.log(this.$refs.okToHoldRecordPackRef)
this.$refs.okToHoldRecordPackRef.show = true
}else{
this.showFromLocationPopup(); this.showFromLocationPopup();
}
} else { } else {
this.showErrorMessage(res.message) this.showErrorMessage(res.message)
} }
@ -237,18 +254,49 @@
getFromLocation(location) { getFromLocation(location) {
this.fromLocationCode = location.code; this.fromLocationCode = location.code;
this.fromLocationInfo = location; this.fromLocationInfo = location;
if(!this.showOnePop){
this.openScanPopup(); this.openScanPopup();
}
}, },
getToLocation(location, code) { getToLocation(location, code) {
this.toLocationCode = code; this.toLocationCode = code;
this.toLocationInfo = location; this.toLocationInfo = location;
}, },
getScanResult(result,managementType) { 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" ){ if(managementType == "BY_BATCH" ||managementType == "BY_QUANTITY" ){
this.getScanResultAfterBatch(result) this.getScanResultAfterBatch(result)
}else{ }else{
this.getScanResultAfter(result) 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){ getScanResultAfter(result){
var balance = result.balance; var balance = result.balance;
@ -367,6 +415,68 @@
} }
calcHandleQty(this.detailSource); 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) { showErrorMessage(message) {
if (this.$refs.scanPopup) { if (this.$refs.scanPopup) {
this.$refs.scanPopup.packLoseFocus() this.$refs.scanPopup.packLoseFocus()

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

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

2
src/pages/inventoryMove/record/okToHoldRecord.vue

@ -1,6 +1,6 @@
<template> <template>
<view class="page-wraper"> <view class="page-wraper">
<comMoveRecord :myTitle="title" businessTypeCode='OkToHold' > </comMoveRecord> <comMoveRecord :myTitle="title" businessTypeCode='OkToHold' ></comMoveRecord>
</view> </view>
</template> </template>

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

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

Loading…
Cancel
Save