<!-- 手动贴标列表 -->
<template>
	<view class="container-wrap">
		<uni-nav-bar title="手动贴标" :status-bar="true" background-color="#3F92F9" color="#FFF">
			<view slot="left">
				<u-icon name="account-fill" color="#FFF" size="35"></u-icon>
				<span style="padding: 0 5rpx;color: #FFFFFF;">{{ userInfo.name }}</span>
			</view>
			<view slot="right" @tap="$utils.back()">
				<span style="color: #FFFFFF;">返回</span>
			</view>
		</uni-nav-bar>
		<view class="container">
			<view class="list">
				<view class="item" v-for="(item, index) in data" :key="index" @tap="toDetail(item)">
					<view class="row">
						<view class="col">
							<text class="label">物料名称：</text>
							<text class="value">{{ item.materialName }}</text>
						</view>
					</view>
					<view class="row">
						<view class="col">{{ item.stockInNum }}个入库单</view>
						<view class="col" style="justify-content: flex-end;"><a href="#">查看详情</a></view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	// #ifdef APP-PLUS
	// #endif
	export default {
		data() {
			return {
				data: [],
				isReading: false
			};
		},
		methods: {
			/* 查看详情 */
			toDetail(data) {
				console.log(data)
				this.$utils.open(`/pages/store-in-manage/artificial-paste/artificial-paste-detail?data=${this.$utils.object2Code(data)}`)
			},
			getList() {
				this.$http.GetStockInRfidLabel().then(res => {
					console.log(res)
					if(res.code === 0) {
						this.data = res.result
					}
				})
			}
		},
		onLoad(option) {
			this.getList()
		},
		onUnload() {
			// #ifdef APP-PLUS
			// #endif
		}
	}
</script>

<style lang="scss" scoped>
.container-wrap {
	overflow: hidden;
	.container {
		padding: 10rpx;
		height: calc(100vh - var(--status-bar-height) - 44px);
		overflow: auto;
		.list {
			.item {
				padding: 20rpx;
				margin-bottom: 10rpx;
				background-color: #FFFFFF;
				border: 1rpx solid rgba(215, 215, 215, 1);
				border-radius: 10rpx;
			}
		}
	}
}
</style>
