<template>
	<view class="border width-100 bg-white my-2">
	 <view class="border-bottom flex">
			<view class="border-right label-name p-1">采购号</view>
			<view class="border-right flex-1 p-1">{{item.GYLCKH}}</view>
			<view class="border-right label-name p-1">物品号</view>
			<view class="border-right label-value p-1">{{item.WPH}}</view>
		</view>
		<view class="border-bottom flex">
			<view class="border-right flex-shrink label-name p-1">名称/规格</view>
			<view class="border-right flex-1 p-1"
			>{{item.WPMC}}</view>
		</view>
		<view class="border-bottom flex">
			<view class="border-right label-name p-1">数量</view>
			<view class="border-right flex-1 p-1">{{item.QTY}}</view>
			<view class="border-right label-name p-1">生产日期</view>
			<view class="border-right label-value p-1">{{item.SWRQ}}</view>
		</view>
		<view class="boder-bottom flex p-1">
			<image :src="item.WPTM" mode="" class="codepic" @load="onLoadPic"></image>
		</view>
	</view>
</template>

<script>
	export default {
		props:{
			item:{
				type:Object,
				default:()=>{}
			},
			index:{
				type:Number,
				default:-1
			}
		},
		methods:{
			// 监听图片加载完毕
			onLoadPic () {
				this.$nextTick(function(){
					this.$emit("picLoad",{index:this.index})
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
@import "~@/common/styles/label-print.scss"
</style>
