<template>
	<view class="myCard">
		<view class="cardTopName">
			<text>{{ item.grey_fabric_code || '-' }}</text>
			<text class="stockTag">{{ item.stock_roll_display }} 匹</text>
		</view>
		<view class="cardRow">
			<view>坯布名称：</view>
			<view>{{ item.grey_fabric_name || '-' }}</view>
		</view>
		<view class="cardRow">
			<view>仓　　库：</view>
			<view>{{ item.warehouse_name || item.receiver_name || '-' }}</view>
		</view>
		<view class="cardRow">
			<view>库存数量：</view>
			<view>{{ item.stock_weight_display }} KG{{ item.unit_label }}</view>
		</view>
		<view v-if="!isDetail" class="lookDetail">
			<text>查看维度汇总</text>
			<u-icon name="arrow-right" size="36" />
		</view>
	</view>
</template>

<script>
export default {
	props: {
		item: { type: Object, default: () => ({}) },
		index: { type: Number, default: 0 },
		isDetail: { type: Boolean, default: false },
	},
};
</script>

<style scoped>
.cardTopName {
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.stockTag {
	font-size: 24rpx;
	padding: 4rpx 12rpx;
	border-radius: 6rpx;
	font-weight: normal;
	background: #e6f7ff;
	color: #1890ff;
}
</style>
