<template>
	<view class="std_pack" v-if="dataContent.packQty!=undefined">
		<text>
			<!-- {{Number(dataContent.packQty)}}{{getUomInfo(dataContent.uom)}}/{{getPackUnitName(dataContent.packUnit)}} -->
			{{getPackUnitName(dataContent.packUnit)}}({{Number(dataContent.packQty)}}{{getUomInfo(dataContent.uom)}})
		</text>
	</view>
</template>
<script>
	import {
		getUomInfo,
		getPackUnitName
	} from '@/common/directory.js';

	export default {
		data() {
			return {

			};
		},
		// 此处定义传入的数据
		props: {
			dataContent: {
				packQty: 1000,
				uom: "EA",
			},
		},
		methods: {
			getUomInfo(uom) {
				let item = getUomInfo(uom);
				if (item == '') {
					return uom;
				} else {
					return item.label
				}
			},

			getPackUnitName(packUnit) {
				let unit = getPackUnitName(packUnit);
				return unit;
			}
		}
	}
</script>


<style>
</style>