<!--发料任务卡片-->
<template>
	<view class="choose_main">
		<view class="ljh_box">
			<view class="tit_ljh">{{ dataContent.itemCode }}</view>
			<view class="ljh_left">
				<view class="font_xs text_lightblue">{{ dataContent.itemName }}</view>
				<view class="font_xs text_lightblue">{{ dataContent.item.desc2 }}</view>
				
			</view>
		</view>
		<view class="cen_card margin_xs_bottom">
			<view class="label_box uni-flex uni-row">
				<view class="label_info">
					<label class="">
						<image class="icon_normal" src="@/static/icons_ui/icon_tm.svg">
						</image>
					</label>
					<text>{{ dataContent.locationCode }}</text>
					<!-- 库位 -->
				</view>
			</view>
		</view>
		<view class="list_form hold_form">
			<view class="uni-container">
				<uni-table style="overflow-x: hidden;">
					<uni-tr>
						<uni-th width="100"></uni-th>
						<uni-th width="100" align="center" v-if="holdItem.holdStatus === 3">
							<view>合格</view>
						</uni-th>
						<uni-th width="100" align="center" v-else>隔离</uni-th>
						<uni-th width="100" align="center">实际</uni-th>
					</uni-tr>
					<uni-tr>
						<uni-th width="100">
							<view>数量（{{ dataContent.qty.uom===null?'空': dataContent.qty.uom}}）</view>
						</uni-th>
						<uni-th width="100" align="center" v-if="holdItem.holdStatus === 3">
							<view class="text_black">
								{{dataContent.fromQty.qty }}
							</view>
						</uni-th>
						<uni-th width="100" align="center" v-else>
							<view class="text_black">
								{{dataContent.fromQty.qty }}
							</view>
						</uni-th>
						<uni-th width="100" align="center">
							<uni-easyinput v-if="editQty" type="digit" v-model="dataContent.qty.qty"
								@input="qtyInput($event,dataContent)">
							</uni-easyinput>
							<view v-else class="text_black">{{dataContent.qty.qty}}</view>
						</uni-th>
					</uni-tr>
					<uni-tr>
						<uni-th width="100">
							<view>批次</view>
						</uni-th>
						<uni-th width="100" align="center" v-if="holdItem.holdStatus === 3">
							<view class="text_black">{{dataContent.fromLot }}</view>
						</uni-th>
						<uni-th width="100" align="center" v-else>
							<view class="text_black">{{dataContent.fromLot }}</view>
						</uni-th>
						<uni-th width="100" align="center">
							<view class="text_black">{{dataContent.toLot }}</view>
						</uni-th>
					</uni-tr>
					<uni-tr>
						<uni-th width="100">
							<view>箱码</view>
						</uni-th>
						<uni-th width="100" align="center" v-if="holdItem.holdStatus === 3">
							<view class="text_black">{{ dataContent.fromPackingCode }}</view>
						</uni-th>
						<uni-th width="100" align="center" v-else>
							<view class="text_black">{{ dataContent.fromPackingCode }}</view>
						</uni-th>
						<uni-th width="100" align="center">
							<view class="text_black">{{ dataContent.toPackingCode }}</view>
						</uni-th>
					</uni-tr>
				</uni-table>
			</view>
		</view>
	</view>

</template>

<script>
	export default {
		name: "comHold",
		data() {
			return {};
		},
		// 此处定义传入的数据
		props: {
			holdItem: {
				type: Object,
				value: null
			},
			dataContent: {
				type: Object,
				value: null
			},
			editQty: {
				type: Boolean,
				value: false
			}
		},
		filters: {},
		methods: {
			qtyInput(value, item) {
				this.$emit('qtyInput', value, item)
			}
		}
	}
</script>

<style scoped lang="scss">

</style>
