You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

149 lines
3.7 KiB

1 year ago
<template>
<view class="" style="background-color: #fff;">
<uni-collapse ref="collapse1" @change="">
<uni-collapse-item :open="true">
<template v-slot:title>
<item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty" :showItemQty ="false"></item-qty>
1 year ago
</template>
<u-line />
1 year ago
<view class="" v-for="(item,index) in dataContent.subList">
1 year ago
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,item)"
:right-options="item.scaned?scanOptions:detailOptions">
1 year ago
<recommend :detail="item" :isShowFromLocation="false" :isShowToLocation="true">
1 year ago
</recommend>
</uni-swipe-action-item>
</uni-swipe-action>
<u-line color="#D8D8D8"></u-line>
</view>
</uni-collapse-item>
</uni-collapse>
1 year ago
<recommend-qty-edit ref="receiptEdit" :dataContent="editItem" :settingParam="settingParam"
@confirm="confirm">
1 year ago
</recommend-qty-edit>
1 year ago
<win-scan-location ref="scanLocationCode" title="目标库位" @getLocation='getLocation'
:locationTypeList="locationTypeList"></win-scan-location>
1 year ago
<detail-info-popup ref="detailInfoPopup"></detail-info-popup>
<comMessage ref="message"></comMessage>
</view>
</template>
<script>
import itemQty from '@/mycomponents/item/itemQty.vue'
import recommend from '@/mycomponents/recommend/recommend.vue'
import recommendQtyEdit from '@/mycomponents/qty/recommendQtyEdit.vue'
import jobDetailPopup from '@/mycomponents/job/jobDetailPopup.vue'
import comMessage from '@/mycomponents/common/comMessage.vue'
import detailInfoPopup from '@/pages/unPlanned/coms/detailInfoPopup.vue'
1 year ago
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue"
1 year ago
import {
getDetailOption,
1 year ago
getPurchaseReceiptOption
1 year ago
} from '@/common/array.js';
export default {
components: {
itemQty,
recommend,
recommendQtyEdit,
detailInfoPopup,
1 year ago
comMessage,
winScanLocation
1 year ago
},
props: {
dataContent: {
type: Object,
default: {}
},
settingParam: {
type: Object,
default: {}
},
isShowLocation: {
type: Boolean,
default: false
1 year ago
},
locationTypeList: {
type: Object,
default: {}
},
1 year ago
},
watch: {
},
data() {
return {
showItem: {},
editItem: {
record: {
}
},
detailOptions: [],
scanOptions: []
}
},
mounted() {
if (this.detailOptions.length == 0) {
this.detailOptions = getDetailOption();
}
if (this.scanOptions.length == 0) {
1 year ago
this.scanOptions = getPurchaseReceiptOption(this.settingParam.allowModifyQty,this.settingParam.allowModifyLocation)
1 year ago
}
},
methods: {
swipeClick(e, item) {
if (e.content.text == "详情") {
this.detail(item)
} else if (e.content.text == "编辑") {
this.edit(item)
1 year ago
} else if (e.content.text == "库位") {
this.showLocation(item)
1 year ago
} else if (e.content.text == "移除") {
this.remove(item)
}
},
edit(item) {
1 year ago
this.editItem = item;
this.$refs.receiptEdit.openTaskEditPopup(item.qty, item.handleQty,item.labelQty);
},
showLocation(item) {
this.locatonItem =item;
this.$refs.scanLocationCode.openScanPopup();
},
//扫描源库位
getLocation(location, code) {
this.locatonItem.toLocationCode =code;
this.$emit('updateData')
},
detail(item) {
this.showItem = item;
this.$refs.detailInfoPopup.openPopup(item)
},
remove(item) {
this.$refs.message.showQuestionMessage("确定移除扫描信息?",
res => {
if (res) {
item.scaned = false
item.handleQty = null
this.$forceUpdate()
this.$emit('remove', item)
}
});
},
confirm(qty) {
this.editItem.handleQty = qty;
this.$emit('updateData')
}
1 year ago
}
}
</script>
<style>
</style>