<template>
	<page-meta root-font-size="16px"></page-meta>
	<uni-popup ref="popupItems" type="center">
		<scroll-view :scroll-top="scrollTop" scroll-y="true" class="scroll-Y" @scrolltoupper="upper"
			@scrolltolower="lower" @scroll="scroll" style="background-color: #EEEEEE;">
			<view>
				<view hover-class="uni-list-cell-hover" v-for="(item, index) in issueItems" :key="item.id"
					@click="callback(item)">
					<combalance :datacontent="item"></combalance>
				</view>
			</view>
		</scroll-view>
	</uni-popup>
</template>

<script>
	import {
		getInventoryStatusDesc
	} from '@/common/basic.js';

	import combalance from '../../mycomponents/task/combalance.vue';

	export default {
		name: 'issueItems',
		components: {
			combalance
		},
		data() {
			return {
				issueItems: [],
				scrollTop: 0,
				old: {
					scrollTop: 0
				},
			};
		},
		props: {
			datacontent: {
				type: Object,
				value: null
			},
		},

		methods: {
			openPopup(items) {
				this.issueItems = items;
				this.$refs['popupItems'].open("center");
			},

			callback(item) {
				this.$emit("callback", item);
				this.$refs['popupItems'].close();
			},

			upper: function(e) {
				// console.log(e)
			},

			lower: function(e) {
				// console.log(e)
			},

			scroll: function(e) {
				// console.log(e)
				this.old.scrollTop = e.detail.scrollTop;
			},
		}
	};
</script>


<style scoped lang="scss">

</style>
