<!-- 上架任务标签 -->
<template>
	<view class="device-detail" style="padding: 0 !important;">
		<view class="ljh_box">
			<view class="tit_ljh">{{ datacontent.itemCode }}</view>
			<view class="uni-flex uni-row space-between">
				<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 class="ljh_right">
					<text class="tnum">{{datacontent.qty.qty}}</text>
					<text class="tunit">{{datacontent.qty.uom}}</text>
				</view>
			</view>
		</view>
		<view class="cen_card">
			<view class="label_box uni-flex uni-row">
				<view class="label_info" v-if="datacontent.containerCode">
					<label class=""><image class="icon_normal" src="@/static/icons_ui/icon_tm.svg"></image></label>
					<text>{{datacontent.containerCode}}</text>
				</view>
			</view>
		</view>
		<view class="uni-flex uni-row bot_card">
			<view class="bot_card_item item_long">
				<label class="icon_bg icon_bg_xm"><image class="icon_normal" src="@/static/icons_ui/icon_xm.svg"></image></label>
				<text>{{datacontent.packingCode}}</text>
			</view>
			<!-- 箱码 -->
			<view class="bot_card_item">
				<label class="icon_bg icon_bg_kw"><image class="icon_normal" src="@/static/icons_ui/icon_kw.svg"></image></label>
				<text>{{datacontent.locationCode}}</text>
			</view>
			<!-- 库位 -->
			<view class="bot_card_item">
				<label class="icon_bg icon_bg_pc"><image class="icon_normal" src="@/static/icons_ui/icon_pc.svg"></image></label>
				<text>{{datacontent.lot}}</text>
			</view>
			<!-- 批次 -->
			<view class="bot_card_item item_short">
				<label class="icon_state" :class="datacontent.status | statusStyle"></label>
				<text class="state-style" :class="datacontent.status | statusStyle">
					{{datacontent.status | statusColor}}
				</text>
			</view>
			<!-- 状态 -->
		</view>
		<view class="list-style">
			<!--<view class="uni-flex uni-row">
				 <view style="-webkit-flex: 1;flex: 1;">库区: {{datacontent.location.area}}</view>
				<view style="-webkit-flex: 1;flex: 1;">库位: {{datacontent.location.locationcode}}</view>
				<view style="-webkit-flex: 1;flex: 1;">库位组: {{datacontent.location.group}}</view>
			</view> -->
		</view>
	</view>
</template>

<script>
	import {
		getInventoryStatusDesc,
		getInventoryTypeStyle
	} from '@/common/basic.js';

	export default {
		data() {
			return {}
		},
		props: {
			datacontent: {
				type: Object,
				value: null
			}
		},
		filters: {
			statusStyle: function(val) {
				return getInventoryTypeStyle(val);
			},
			statusColor: function(val) {
				return getInventoryStatusDesc(val);
			},
		}
	}
</script>

<style>
</style>
