<template>
	<view class="common-nav-container">
		<u-list height="640px">
			<u-list-item v-for="(item, index) in dataList" :key="index">
				<u-cell :title="'批次号:'+item.packageCodeClient"
					:label="'零件号:'+item.partnumber + '\n库位:'+item.locationCode + '\n入库时间:'+item.entryWarehouseTime + '\n备注:'+item.remark"
					:value="'零件数:'+item.goodsNumAction">
				</u-cell>
			</u-list-item>
		</u-list>
		<!-- <view class="body card"  v-for="(item, index) in dataList" :key="index">
			<view class="title">{{ item.packageCodeClient }}</view>
			<view >
				<text>库位：</text>
				<text>{{ item.locationCode }}</text>
			</view>
			<view >
				<text>零件号：</text>
				<text>{{ item.partnumber }}</text>
			</view>
			<view >
				<text>数量：</text>
				<text>{{ item.goodsNumAction }}</text>
			</view>
			<view  >
				<text>入库时间：</text>
				<text>{{ item.entryWarehouseTime }}</text>
			</view>
			<view  >
				<text>备注：</text>
				<text>{{ item.remark }}</text>
			</view>
		</view> -->
	</view>
</template>

<script>
	import * as watchGoodsApi from '@/api/watchGoods/watchGoods.js';
	export default {
		onLoad: function(option) {
			this.shortpatchcode = option.shortpatchcode;
		},
		data() {
			return {
				shortpatchcode: '',
				dataList: []
			};
		},
		mounted() {
			this.getList();
		},
		methods: {
			getList() {
				const query = {
					packageCodeClient: this.shortpatchcode
				};
				watchGoodsApi.GetGoodsNowProduction_detail(query).then((res) => {
					if (res.code == 200) {
						this.dataList = res.data;
					}
				});
			}
		}
	};
</script>

<style scoped lang="scss">
	.body {
		background-color: white;
		margin-top: 10px;

		.title {
			color: #2979ff;

			font-size: 50rpx;
			font-weight: 50;
		}
	}

	.card {
		background-color: #fff;
		/* 白色背景 */
		border-radius: 8px;
		/* 圆角边框 */
		padding: 12px;
		/* 内边距 */
		margin-bottom: 16px;
		/* 底部间距 */
		box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
		/* 阴影效果 */
	}

	.card text {
		font-weight: bold;
		/* 文本加粗 */
		margin-bottom: 6px;
		/* 底部间距 */
	}

	.card view {
		color: #333;
		/* 文本颜色 */
	}
</style>