<template>
	<view>
		<view class="uni-flex uni-row">
			<text>{{qty}}/{{stdPackQty}}({{stdPackUom}})</text>
			<text v-if="allowEdit" @click="openQtyEdit()">编辑</text>
		</view>
		<win-qty-edit ref="qtyEdit" :allQty="qty"></win-qty-edit>
	</view>
</template>

<script>
	import winQtyEdit from '@/mycomponents/wincom/unitCom/winQtyEdit.vue'
	export default {
		components: {
			winQtyEdit
		},
		data() {
			return {}
		},
		props: {
			allowEdit: {
				type: Boolean,
				default: true
			},
			itemCode: {
				type: String,
				default: ""
			},
			qty: {
				type: Number,
				default: 0
			},
			uom: {
				type: String,
				default: ""
			},
			stdPackQty: {
				type: Number,
				default: 0
			},
			stdPackUom: {
				type: String,
				default: ""
			},
		},
		methods: {
			openQtyEdit() {
				this.$refs.qtyEdit.openEdit();
			}
		}
	}
</script>


<style>
</style>
