<template>
	<u-popup v-model="isShow" mode="bottom" height="800" border-radius="25">
		<view class="head u-flex u-row-between">
			<text>已选产品</text>
			<text>清空列表</text>
		</view>
		<scroll-view scroll-y class="scroll-view">
			<view class="partList-list-box">
				<view class="product flex align_center">
					<view class="checkbox">
						<u-icon name="close-circle" color="#999" size="40"></u-icon>
					</view>
					<view class="checkboxRight flex align_center flex_1">
						<view class="pimgs">
							<u-image src="`../../static/${$config('themePath')}/def_img@2x.png`" width="128" height="128" border-radius="10"></u-image>
						</view>
						<view class="pinfo">
							<view class="pname">
								<text>A01</text>
								JQ-21026E
							</view>
							<view class="productName u-line-1">
								名i嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻
							</view>
							<view class="ptxt flex align_center">
								<view>
									最大库容
									<text class="pnums">100</text>
								</view>
								<view>
									/货架库存
									<text class="pnums">20</text>
								</view>
								<view>
									/滞销
									<text class="pnums">12个月23天</text>
								</view>
							</view>
						</view>
					</view>
				</view>
				<view class="ptools flex align_center justify_between">
					<view class="ptools_l u-flex">
						<view>
							补货在途
							<text class="pnums">1</text>
						</view>
						<view>
							/调回在途
							<text class="pnums">2</text>
						</view>
					</view>
					<view class="pcurnums flex align_center">
						<text>调回数量</text>
						<view class="u-ninput"><u-number-box color="#000" :input-height="60" bg-color="#fff" v-model="shifa" :min="0" :max="10"></u-number-box></view>
					</view>
				</view>
			</view>
			<view class="partList-list-box">
				<view class="product flex align_center">
					<view class="checkbox">
						<u-icon name="close-circle" color="#999" size="40"></u-icon>
					</view>
					<view class="checkboxRight flex align_center flex_1">
						<view class="pimgs">
							<u-image src="`../../static/${$config('themePath')}/def_img@2x.png`" width="128" height="128" border-radius="10"></u-image>
						</view>
						<view class="pinfo">
							<view class="pname">
								<text>A01</text>
								JQ-21026E
							</view>
							<view class="productName u-line-1">
								名i嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻
							</view>
							<view class="ptxt flex align_center">
								<view>
									最大库容
									<text class="pnums">100</text>
								</view>
								<view>
									/货架库存
									<text class="pnums">20</text>
								</view>
								<view>
									/滞销
									<text class="pnums">12个月23天</text>
								</view>
							</view>
						</view>
					</view>
				</view>
				<view class="ptools flex align_center justify_between">
					<view class="ptools_l u-flex">
						<view>
							补货在途
							<text class="pnums">1</text>
						</view>
						<view>
							/调回在途
							<text class="pnums">2</text>
						</view>
					</view>
					<view class="pcurnums flex align_center">
						<text>调回数量</text>
						<view class="u-ninput"><u-number-box color="#000" :input-height="60" bg-color="#fff" v-model="shifa" :min="0" :max="10"></u-number-box></view>
					</view>
				</view>
			</view>
			<view class="partList-list-box">
				<view class="product flex align_center">
					<view class="checkbox">
						<u-icon name="close-circle" color="#999" size="40"></u-icon>
					</view>
					<view class="checkboxRight flex align_center flex_1">
						<view class="pimgs">
							<u-image src="`../../static/${$config('themePath')}/def_img@2x.png`" width="128" height="128" border-radius="10"></u-image>
						</view>
						<view class="pinfo">
							<view class="pname">
								<text>A01</text>
								JQ-21026E
							</view>
							<view class="productName u-line-1">
								名i嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻
							</view>
							<view class="ptxt flex align_center">
								<view>
									最大库容
									<text class="pnums">100</text>
								</view>
								<view>
									/货架库存
									<text class="pnums">20</text>
								</view>
								<view>
									/滞销
									<text class="pnums">12个月23天</text>
								</view>
							</view>
						</view>
					</view>
				</view>
				<view class="ptools flex align_center justify_between">
					<view class="ptools_l u-flex">
						<view>
							补货在途
							<text class="pnums">1</text>
						</view>
						<view>
							/调回在途
							<text class="pnums">2</text>
						</view>
					</view>
					<view class="pcurnums flex align_center">
						<text>调回数量</text>
						<view class="u-ninput"><u-number-box color="#000" :input-height="60" bg-color="#fff" v-model="shifa" :min="0" :max="10"></u-number-box></view>
					</view>
				</view>
			</view>
			<view class="partList-list-box">
				<view class="product flex align_center">
					<view class="checkbox">
						<u-icon name="close-circle" color="#999" size="40"></u-icon>
					</view>
					<view class="checkboxRight flex align_center flex_1">
						<view class="pimgs">
							<u-image src="`../../static/${$config('themePath')}/def_img@2x.png`" width="128" height="128" border-radius="10"></u-image>
						</view>
						<view class="pinfo">
							<view class="pname">
								<text>A01</text>
								JQ-21026E
							</view>
							<view class="productName u-line-1">
								名i嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻
							</view>
							<view class="ptxt flex align_center">
								<view>
									最大库容
									<text class="pnums">100</text>
								</view>
								<view>
									/货架库存
									<text class="pnums">20</text>
								</view>
								<view>
									/滞销
									<text class="pnums">12个月23天</text>
								</view>
							</view>
						</view>
					</view>
				</view>
				<view class="ptools flex align_center justify_between">
					<view class="ptools_l u-flex">
						<view>
							补货在途
							<text class="pnums">1</text>
						</view>
						<view>
							/调回在途
							<text class="pnums">2</text>
						</view>
					</view>
					<view class="pcurnums flex align_center">
						<text>调回数量</text>
						<view class="u-ninput"><u-number-box color="#000" :input-height="60" bg-color="#fff" v-model="shifa" :min="0" :max="10"></u-number-box></view>
					</view>
				</view>
			</view>
		</scroll-view>
	</u-popup>
</template>

<script>
	export default {
		props: {
			detailShow: { //  弹框显示状态
				type: Boolean,
				default: false
			}
		},
		data() {
			return {
				isShow:this.detailShow,
				list:[]
			}
		},
		methods: {
			// 确认
			handleConfirm(){
				 this.$emit("ok")
				 this.isShow = false
			},
			// 获取列表数据
			getList(){
				queryWaitListByShelfSn({shelfSn: this.infoData.shelfSn}).then(res => {
					if(res.status == 200){
						this.list = res.data||[]
					}
				})
			}
		},
		watch: {
			//  父页面传过来的弹框状态
			detailShow (newValue, oldValue) {
				this.isShow = newValue
			},
			//  重定义的弹框状态
			isShow (newValue, oldValue) {
				if (!newValue) {
					this.$emit('close')
				}else{
					this.getList()
				}
			}
		}
	}
</script>

<style lang="less" scoped>
	.head{
		width: 100%;
		box-sizing: border-box;
		padding:30rpx 20rpx;
		background: #e0e0e0;
		text{
			&:first-child{
				font-weight: bold;
			}
		}
	}
	.scroll-view{
		height: 702rpx;
	}
	.partList-list-box {
		padding: 20rpx;
		border-bottom: 2rpx solid #f5f5f5;
		&:last-child {
			border: 0;
		}
		.product {
			flex-grow: 1;
			.checkbox {
				width: 60rpx;
			}
			.checkboxRight{
				width: calc(100% - 60rpx);
			}
			.pinfo {
				width: calc(100% - 148rpx);
				flex-grow: 1;
				padding-left: 20rpx;
				.pname {
					font-size: 32rpx;
					color: #191919;
					margin-bottom: 10rpx;
					text {
						font-weight: normal;
						margin-right: 6rpx;
						padding: 0 10rpx;
						background: rgba(3, 54, 146, 0.15);
						border-radius: 100rpx;
						color: #033692;
						font-size: 28rpx;
					}
				}
				.productName{
					width: 100%;
					font-size: 32rpx;
					color: #191919;
					font-weight: bold;
					margin:10rpx 0;
				}
				.pno {
					background-color: rgba(3, 54, 146, 0.15);
					border-radius: 50rpx;
					padding: 0 20rpx;
					color: #033692;
					font-size: 24rpx;
					margin-right: 10rpx;
				}
				.ptxt {
					font-size: 24rpx;
					color: #999;
					.pnums {
						color: #222;
						padding: 0 4upx;
					}
				}
			}
		}
		.ptools {
			margin-top: 30rpx;
			margin-left: 60rpx;
			.ptools_l{
				font-size: 24rpx;
				color: #999;
				.pnums {
					color: #ff5500;
					padding: 0 4rpx;
				}
			}
			.pcurnums {
				> text {
					font-size: 24rpx;
					color: #999;
					margin-right: 20rpx;
				}
			}
			.u-ninput {
				border: 2rpx solid #eee;
				border-radius: 50rpx;
				padding: 0 6rpx;
			}
			/deep/ .u-icon-disabled {
				background: #fff !important;
			}
			/deep/ .u-number-input {
				margin: 0 0;
				border: 2rpx solid #eee;
				border-top: 0;
				border-bottom: 0;
			}
			/deep/ .u-icon-plus,
			/deep/ .u-icon-minus {
				border-radius: 50rpx;
			}
		}
	}
</style>