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.
154 lines
3.6 KiB
154 lines
3.6 KiB
<template>
|
|
<view class="" style="background-color: #fff;">
|
|
<uni-collapse ref="collapse1" @change="">
|
|
<uni-collapse-item :open="true">
|
|
<template v-slot:title>
|
|
<uni-swipe-action ref="swipeAction">
|
|
<uni-swipe-action-item @click="removeData($event,dataContent)" :right-options="removeOptions">
|
|
<!-- 明盘 -->
|
|
<item-qty v-if="settingParam.isOpenCount=='TRUE'" :dataContent="dataContent"
|
|
:handleQty="dataContent.handleQty">
|
|
</item-qty>
|
|
<!-- 盲盘 -->
|
|
<item v-else :dataContent="dataContent"></item>
|
|
</uni-swipe-action-item>
|
|
</uni-swipe-action>
|
|
</template>
|
|
<view class="" v-for="(item,index) in dataContent.subList">
|
|
<uni-swipe-action ref="swipeAction">
|
|
<uni-swipe-action-item @click="swipeClick($event,item)"
|
|
:right-options="item.scaned?scanOptions:detailOptions">
|
|
<recommend-count :detail="item" :isShowFromLocation="false" style='margin:1px 0px;'
|
|
:isShowRecommendQty="settingParam.isOpenCount=='TRUE'">
|
|
</recommend-count>
|
|
<u-line />
|
|
</uni-swipe-action-item>
|
|
</uni-swipe-action>
|
|
</view>
|
|
</uni-collapse-item>
|
|
</uni-collapse>
|
|
<detail-info-popup ref="detailInfoPopup"></detail-info-popup>
|
|
<com-message ref="comMessage"></com-message>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import itemQty from '@/mycomponents/item/itemQty.vue'
|
|
import item from '@/mycomponents/item/item.vue'
|
|
import recommendCount from '@/mycomponents/recommend/recommendCount.vue'
|
|
import detailInfoPopup from '@/pages/count/coms/detailInfoPopup.vue'
|
|
import comMessage from '@/mycomponents/common/comMessage.vue'
|
|
|
|
import {
|
|
getDetailOption,
|
|
getDetailEditRemoveOption,
|
|
getClearOption
|
|
} from '@/common/array.js';
|
|
|
|
export default {
|
|
components: {
|
|
item,
|
|
itemQty,
|
|
recommendCount,
|
|
detailInfoPopup,
|
|
comMessage
|
|
},
|
|
props: {
|
|
dataContent: {
|
|
type: Object,
|
|
default: {}
|
|
},
|
|
settingParam: {
|
|
type: Object,
|
|
default: {}
|
|
},
|
|
},
|
|
watch: {
|
|
dataContent: {
|
|
handler(newName, oldName) {
|
|
if (this.dataContent.subList.length > 0) {
|
|
if (this.$refs.collapse1 != undefined) {
|
|
this.$nextTick(res => {
|
|
this.$refs.collapse1.resize()
|
|
})
|
|
}
|
|
}
|
|
},
|
|
immediate: true,
|
|
deep: true
|
|
}
|
|
},
|
|
|
|
data() {
|
|
return {
|
|
option: [],
|
|
title: "推荐详情",
|
|
showItem: {},
|
|
editItem: {
|
|
record: {
|
|
|
|
}
|
|
},
|
|
detailOptions: [],
|
|
scanOptions: [],
|
|
removeOptions: [],
|
|
}
|
|
},
|
|
|
|
|
|
mounted() {
|
|
this.detailOptions = getDetailOption();
|
|
this.scanOptions = getDetailEditRemoveOption();
|
|
this.removeOptions = getClearOption();
|
|
},
|
|
|
|
methods: {
|
|
removeData(e, dataContent) {
|
|
if (e.content.text == "清空") {
|
|
this.$refs.comMessage.showQuestionMessage("确定清空物料及箱码信息?",
|
|
res => {
|
|
if (res) {
|
|
this.$emit('removeItem')
|
|
// this.$emit('removeItem', this.dataContent)
|
|
}
|
|
});
|
|
}
|
|
},
|
|
swipeClick(e, item) {
|
|
if (e.content.text == "详情") {
|
|
this.detail(item)
|
|
} else if (e.content.text == "编辑") {
|
|
this.edit(item)
|
|
} else if (e.content.text == "移除") {
|
|
this.remove(item)
|
|
}
|
|
},
|
|
|
|
edit(detail) {
|
|
this.$emit("editItem", detail)
|
|
},
|
|
|
|
detail(item) {
|
|
this.showItem = item;
|
|
this.$refs.detailInfoPopup.openPopup(item);
|
|
},
|
|
remove(item, index) {
|
|
this.$refs.comMessage.showQuestionMessage("确定移除扫描信息?",
|
|
res => {
|
|
if (res) {
|
|
// this.dataContent.subList.splice(index, 1)
|
|
item.scaned = false;
|
|
item.handleQty = 0;
|
|
this.$emit('removePack')
|
|
}
|
|
});
|
|
},
|
|
confirm(qty) {
|
|
this.$emit('updateData')
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style>
|
|
</style>
|
|
|