<template>
	<view>
		<status v-if="isShowStatus" :status='dataContent.inventoryStatus'></status>

		<view class="uni-flex uni-row  center">
			<view class="text_recommend ">
				{{Number(dataContent.qty)}}
			</view>
			<!-- 	/{{Number(dataContent.packQty)}} -->
			<!-- v-show="!isShowStdPack" -->
			<uom :uom="dataContent.uom"></uom>
			<view v-if="dataContent.packQty!=undefined" class="uni-flex uni-row ">
				<view  class="uom">/</view>
				<view class="text_packQty">{{ calc(dataContent.qty,dataContent.packQty)}}
				</view>
			</view>
		</view>

		<view>
			<pack-unit :dataContent="dataContent"></pack-unit>
			<!-- 	<std-pack-qty v-show="isShowStdPack" :dataContent="dataContent"></std-pack-qty> -->
		</view>
	</view>
</template>

<script>
	// import packQty from '@/mycomponents/qty/packQty.vue'			
	import packUnit from '@/mycomponents/qty/packUnit.vue'
	import uom from '@/mycomponents/qty/uom.vue'
	import status from '@/mycomponents/status/status.vue'

	export default {
		components: {
			// packQty,
			packUnit,
			uom,
			status
		},
		data() {
			return {

			};
		},
		// 此处定义传入的数据
		props: {
			type: {
				type: String,
				default: 'default' //recommend:推荐 compare:对比 
			},

			dataContent: {
				type: Object,
				default: {}
			},
			recommendQty: {
				type: Number,
				default: 0
			},

			handleQty: {
				type: Number,
				default: 0
			},

			isShowStatus: {
				type: Boolean,
				default: true
			},
			isShowStdPack: {
				type: Boolean,
				default: true
			},
			objTextStyle: {
				type: Object,
				default: null
			}
		},
		watch: {

		},
		methods: {
			calc(qty, packQty) {
				return Math.ceil(Number(qty) / Number(packQty));
			}
		},
	}
</script>

<style lang="scss">
</style>