Browse Source

YT-2899WMS-手持校验发料功能,需要取消改数功能,因为现场校验发料存在一次发多箱的情况

intex
张立 6 days ago
parent
commit
05b03f5c87
  1. 560
      src/mycomponents/record/recordComDetailCard.vue
  2. 2
      src/pages/issue/record/directIssueByBatchCom.vue

560
src/mycomponents/record/recordComDetailCard.vue

@ -1,278 +1,284 @@
<template>
<view class="" style="background-color: #fff;">
<uni-collapse ref="collapse1">
<uni-collapse-item :open="true">
<template v-slot:title>
<uni-swipe-action>
<uni-swipe-action-item @click="removeItem($event,dataContent)" :right-options="scanOptions">
<item-qty :dataContent="dataContent" :isShowBalance="true"
:isShowBalanceQty="isShowBalanceQty"
:isShowRecommendQty="isShowRecommendQty"
:isSpecial='isSpecial'
:isShowNumView='isShowNumView'
></item-qty>
<view style="margin-left: 10px; margin-top: 5px;">
<pack title='父包装' v-if="dataContent.containerNumber" :packingCode='dataContent.containerNumber'></pack>
<location v-if="isShowParentToLocation" title='目标库位'
:locationCode='dataContent.toLocationCode'></location>
</view>
</uni-swipe-action-item>
</uni-swipe-action>
</template>
<view class='split_line'></view>
<view class="" v-for="(detail,index) in dataContent.subList" :key="index">
<uni-swipe-action>
<uni-swipe-action-item @click="swipeClick($event,detail,index)"
:right-options="detail.scaned?scanOptions:detailOptions">
<balance :dataContent="detail" :isShowStdPack="false" :isShowStatus="isShowStatus"
:isShowPack="true"
:isShowPackingNumberProps="isShowPackingNumberProps"
:isShowFromLocation="isShowFromLocation"
:isShowToLocation="isShowToLocation" :isShowParentPack="isShowParentPack" :isShowPackUnit='isShowPackUnit'>
</balance>
<view class="" v-if="isOverPackageRecord">
<view class="flex u-m-t-20 align-center">
<view>每包数量</view>
<u-number-box v-model="detail.everyPackageQty" :min='1' :max='9999' @change="valChange($event,detail)"></u-number-box>
<uom :uom="detail.uom"></uom>
</view>
<view class="flex u-m-t-20 align-center">
<view>包装个数</view>
<view>{{detail.flippedNumber}}</view>
</view>
</view>
</uni-swipe-action-item>
</uni-swipe-action>
<!-- <view class='split_line'></view> -->
</view>
</uni-collapse-item>
</uni-collapse>
<balance-qty-edit ref="balanceQtyEdit" @confirm="confirm" :queryBalance="queryBalance" ></balance-qty-edit>
<record-detail-popup ref="recordDetailPopup"></record-detail-popup>
<comMessage ref="comMessage"></comMessage>
</view>
</template>
<script>
import itemQty from '@/mycomponents/item/itemQty.vue'
import balance from '@/mycomponents/balance/balance.vue'
import recommend from '@/mycomponents/recommend/recommend.vue'
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue'
import balanceDetailPopup from '@/mycomponents/balance/balanceDetailPopup.vue'
import purchaseLabel from '@/mycomponents/balance/purchaseLabel.vue'
import location from '@/mycomponents/balance/location.vue'
import recordDetailPopup from '@/mycomponents/detail/recordDetailPopup.vue'
import pack from '@/mycomponents/balance/pack.vue'
import PackageAndItemCard from '@/mycomponents/package/PackageAndItemCard.vue'
import uom from '@/mycomponents/qty/uom.vue'
import {
getDetailOption,
getDetailEditRemoveOption,
getClearOption,
getEditLocationRemoveOption,
getRecordOption
} from '@/common/array.js';
export default {
components: {
itemQty,
recommend,
balance,
balanceQtyEdit,
balanceDetailPopup,
purchaseLabel,
location,
recordDetailPopup,
pack,
PackageAndItemCard,
uom
// winListHint
},
props: {
dataContent: {
type: Object,
default: {}
},
settingParam: {
type: Object,
default: {}
},
isShowStatus: {
type: Boolean,
default: true
},
isShowFromLocation: {
type: Boolean,
default: true
},
isShowToLocation: {
type: Boolean,
default: true
},
isShowParentToLocation: {
type: Boolean,
default: true
},
isShowBalanceQty: {
type: Boolean,
default: false
},
isShowParentPack: {
type: Boolean,
default: true
},
isShowHandleQty: {
type: Boolean,
default: true
},
isShowModifedLocation: {
type: Boolean,
default: false
},
allowModifyQty: {
type: Boolean,
default: true
},
allowModifyLocation: {
type: Boolean,
default: false
},
queryBalance: {
type: Boolean,
default: true
},
isShowPackingNumberProps: {
type: Boolean,
default: false
},
isShowRecommendQty:{
type: Boolean,
default: true
},
isSpecial: {
type: Boolean,
default: false
},
//
isShowNumView: {
type: Boolean,
default: true
},
//
isOverPackageRecord: {
type: Boolean,
default: false
},
isShowPackUnit: {
type: Boolean,
default: true
},
},
watch: {
dataContent: {
handler(newName, oldName) {
if (this.dataContent.subList.length > 0) {
this.$nextTick(res => {
setTimeout(() => {
if (this.$refs.collapse1) {
this.$refs.collapse1.resize();
}
}, 500)
})
}
},
immediate: true,
deep: true
}
},
data() {
return {
option: [],
title: "推荐详情",
showItem: {},
editItem: {},
detailOptions: [],
scanOptions: [],
removeOptions: [],
dataList: []
}
},
mounted() {
this.detailOptions = getDetailOption();
this.scanOptions = getRecordOption(this.allowModifyQty,this.allowModifyLocation);
this.removeOptions = this.isShowModifedLocation ?getEditLocationRemoveOption():getClearOption();
},
methods: {
removeItem(e, dataContent) {
if (e.content.text == "移除") {
this.$refs.comMessage.showQuestionMessage("确定清空物料及箱码信息?",
res => {
if (res) {
this.$emit('removeItem', dataContent)
// this.$emit('removeItem', this.dataContent)
}
});
} else {
this.editLocation(dataContent)
}
},
swipeClick(e, item, index) {
if (e.content.text == "详情") {
this.detail(item)
} else if (e.content.text == "编辑") {
this.edit(item)
} else if (e.content.text == "移除") {
this.remove(item, index)
}
},
edit(item) {
this.editItem = item;
this.$refs.balanceQtyEdit.openEditPopup(this.editItem, this.editItem.handleQty);
},
detail(item) {
this.showItem = item;
this.$refs.recordDetailPopup.openPopup(item);
},
remove(item, index) {
this.$refs.comMessage.showQuestionMessage("确定移除扫描信息?",
res => {
if (res) {
this.dataContent.subList.splice(index, 1)
this.$emit('removePack')
}
});
},
editLocation(item) {
this.editItem = item;
this.$emit('editLocation', item)
},
confirm(qty) {
// this.editItem.qty = qty;
this.editItem.handleQty = qty;
this.$emit('updateData')
},
valChange(e,item){
item.flippedNumber =Math.ceil(item.qty /e.value )
}
}
}
</script>
<style>
<template>
<view class="" style="background-color: #fff;">
<uni-collapse ref="collapse1">
<uni-collapse-item :open="true">
<template v-slot:title>
<uni-swipe-action>
<uni-swipe-action-item @click="removeItem($event,dataContent)" :right-options="scanOptions">
<item-qty :dataContent="dataContent" :isShowBalance="true"
:isShowBalanceQty="isShowBalanceQty"
:isShowRecommendQty="isShowRecommendQty"
:isSpecial='isSpecial'
:isShowNumView='isShowNumView'
></item-qty>
<view style="margin-left: 10px; margin-top: 5px;">
<pack title='父包装' v-if="dataContent.containerNumber" :packingCode='dataContent.containerNumber'></pack>
<location v-if="isShowParentToLocation" title='目标库位'
:locationCode='dataContent.toLocationCode'></location>
</view>
</uni-swipe-action-item>
</uni-swipe-action>
</template>
<view class='split_line'></view>
<view class="" v-for="(detail,index) in dataContent.subList" :key="index">
<uni-swipe-action>
<uni-swipe-action-item @click="swipeClick($event,detail,index)"
:right-options="detail.scaned?scanOptions:detailOptions">
<balance :dataContent="detail" :isShowStdPack="false" :isShowStatus="isShowStatus"
:isShowPack="true"
:isShowPackingNumberProps="isShowPackingNumberProps"
:isShowFromLocation="isShowFromLocation"
:isShowToLocation="isShowToLocation" :isShowParentPack="isShowParentPack" :isShowPackUnit='isShowPackUnit'>
</balance>
<view class="" v-if="isOverPackageRecord">
<view class="flex u-m-t-20 align-center">
<view>每包数量</view>
<u-number-box v-model="detail.everyPackageQty" :min='1' :max='9999' @change="valChange($event,detail)"></u-number-box>
<uom :uom="detail.uom"></uom>
</view>
<view class="flex u-m-t-20 align-center">
<view>包装个数</view>
<view>{{detail.flippedNumber}}</view>
</view>
</view>
</uni-swipe-action-item>
</uni-swipe-action>
<!-- <view class='split_line'></view> -->
</view>
</uni-collapse-item>
</uni-collapse>
<balance-qty-edit ref="balanceQtyEdit" @confirm="confirm" :queryBalance="queryBalance" ></balance-qty-edit>
<record-detail-popup ref="recordDetailPopup"></record-detail-popup>
<comMessage ref="comMessage"></comMessage>
</view>
</template>
<script>
import itemQty from '@/mycomponents/item/itemQty.vue'
import balance from '@/mycomponents/balance/balance.vue'
import recommend from '@/mycomponents/recommend/recommend.vue'
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue'
import balanceDetailPopup from '@/mycomponents/balance/balanceDetailPopup.vue'
import purchaseLabel from '@/mycomponents/balance/purchaseLabel.vue'
import location from '@/mycomponents/balance/location.vue'
import recordDetailPopup from '@/mycomponents/detail/recordDetailPopup.vue'
import pack from '@/mycomponents/balance/pack.vue'
import PackageAndItemCard from '@/mycomponents/package/PackageAndItemCard.vue'
import uom from '@/mycomponents/qty/uom.vue'
import {
getDetailOption,
getDetailEditRemoveOption,
getClearOption,
getEditLocationRemoveOption,
getRecordOption
} from '@/common/array.js';
export default {
components: {
itemQty,
recommend,
balance,
balanceQtyEdit,
balanceDetailPopup,
purchaseLabel,
location,
recordDetailPopup,
pack,
PackageAndItemCard,
uom
// winListHint
},
props: {
dataContent: {
type: Object,
default: {}
},
settingParam: {
type: Object,
default: {}
},
isShowStatus: {
type: Boolean,
default: true
},
isShowFromLocation: {
type: Boolean,
default: true
},
isShowToLocation: {
type: Boolean,
default: true
},
isShowParentToLocation: {
type: Boolean,
default: true
},
isShowBalanceQty: {
type: Boolean,
default: false
},
isShowParentPack: {
type: Boolean,
default: true
},
isShowHandleQty: {
type: Boolean,
default: true
},
isShowModifedLocation: {
type: Boolean,
default: false
},
allowModifyQty: {
type: Boolean,
default: true
},
allowModifyLocation: {
type: Boolean,
default: false
},
queryBalance: {
type: Boolean,
default: true
},
isShowPackingNumberProps: {
type: Boolean,
default: false
},
isShowRecommendQty:{
type: Boolean,
default: true
},
isSpecial: {
type: Boolean,
default: false
},
//
isShowNumView: {
type: Boolean,
default: true
},
//
isOverPackageRecord: {
type: Boolean,
default: false
},
isShowPackUnit: {
type: Boolean,
default: true
},
// checkIssue
fromType:{
type:String,
default:''
}
},
watch: {
dataContent: {
handler(newName, oldName) {
if (this.dataContent.subList.length > 0) {
this.$nextTick(res => {
setTimeout(() => {
if (this.$refs.collapse1) {
this.$refs.collapse1.resize();
}
}, 500)
})
}
},
immediate: true,
deep: true
}
},
data() {
return {
option: [],
title: "推荐详情",
showItem: {},
editItem: {},
detailOptions: [],
scanOptions: [],
removeOptions: [],
dataList: []
}
},
mounted() {
this.detailOptions = getDetailOption();
// this.scanOptions = getRecordOption(this.allowModifyQty,this.allowModifyLocation);
if(this.fromType =='checkIssue'){ this.scanOptions = getRecordOption(false,this.allowModifyLocation); }else{ this.scanOptions = getRecordOption(this.allowModifyQty,this.allowModifyLocation); }
this.removeOptions = this.isShowModifedLocation ?getEditLocationRemoveOption():getClearOption();
},
methods: {
removeItem(e, dataContent) {
if (e.content.text == "移除") {
this.$refs.comMessage.showQuestionMessage("确定清空物料及箱码信息?",
res => {
if (res) {
this.$emit('removeItem', dataContent)
// this.$emit('removeItem', this.dataContent)
}
});
} else {
this.editLocation(dataContent)
}
},
swipeClick(e, item, index) {
if (e.content.text == "详情") {
this.detail(item)
} else if (e.content.text == "编辑") {
this.edit(item)
} else if (e.content.text == "移除") {
this.remove(item, index)
}
},
edit(item) {
this.editItem = item;
this.$refs.balanceQtyEdit.openEditPopup(this.editItem, this.editItem.handleQty);
},
detail(item) {
this.showItem = item;
this.$refs.recordDetailPopup.openPopup(item);
},
remove(item, index) {
this.$refs.comMessage.showQuestionMessage("确定移除扫描信息?",
res => {
if (res) {
this.dataContent.subList.splice(index, 1)
this.$emit('removePack')
}
});
},
editLocation(item) {
this.editItem = item;
this.$emit('editLocation', item)
},
confirm(qty) {
// this.editItem.qty = qty;
this.editItem.handleQty = qty;
this.$emit('updateData')
},
valChange(e,item){
item.flippedNumber =Math.ceil(item.qty /e.value )
}
}
}
</script>
<style>
</style>

2
src/pages/issue/record/directIssueByBatchCom.vue

@ -13,7 +13,7 @@
:isShowFromLocation="true" @removeItem="removeItem(index,item)"
:isShowToLocation="false" :isShowParentToLocation="false" @updateData="updateData"
:isShowRecommendQty="false"
:allowModifyQty="true" :isShowPackingNumberProps="true" @removePack="removePack">
:allowModifyQty="true" :isShowPackingNumberProps="true" @removePack="removePack" :fromType='fromType'>
</record-com-detail-card>
</view>

Loading…
Cancel
Save