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