<template>
	<view class="shipmentBriefInfo">
		<subscribe-pageHeader-orderNo :shipmentNo="orderInfo.accessNo" />
		<view class="primary-info routine_radius_card">
			<view class="flex_center addressinfo">
				<view class="left-icon">
					<img src="../../static/img/icon/dock.png"/>
				</view>
				<view class="primary-desc flex_col">
					<view>
						{{isEmpty(materialInfo["dock.name"])?isEmpty(materialInfo["dock.name"]):"该物料无预约月台"}}
					</view>
				</view>
			</view>
			<view class="flex_center addressinfo">
				<view class="left-icon">
					<img src="../../static/img/icon/cargo.png"/>
				</view>
				<view class="primary-desc">
					<view>
						{{isEmpty(materialInfo["product.name"])}}
					</view>
				</view>
				<view class="primary-desc" style="flex: 1; text-align: right; color: #8C8C8C;">
					<view>
						{{`${materialInfo.qty}件/${materialInfo.weight}Kg`}}
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: "shipmentBriefInfo",
		options: { styleIsolation: 'shared' },
		props: {
			orderInfo: {
				type: Object,
				default: {}
			},
			materialInfo: {
				type: Object,
				default: {}
			},
			addressName: {
				type: String,
				default: ""
			}
		},
		data() {
			return {
				data: []
			};
		},
		methods:{
			isEmpty(value){
				if (value) return value
				return ''
			}
		}
	}
</script>

<style lang="scss">
	.primary-info {
		.addressinfo{
			height: 40rpx;
			line-height: 40rpx;
			margin: 10rpx 0;
		}
		.left-icon {
			img{
				width: 32rpx;
				height: 32rpx;
			}
		}

		/deep/.custom-cell-row {
			margin-top: 16rpx;

			.custom-cell-label {
				color: #8C8C8C;
			}
		}
	}
</style>
