<template>
	<view>
		<view class="commodit_box" v-for="(item,index) in commodityData" :key="index">
			<view class="same_row_in">
				<checkbox-group @change="checkboxChangeAll">
					<checkbox class="round" style="transform:scale(0.8)" :checked="isAllChecked" />
				</checkbox-group>
				<view class="shop_title_box">{{item.shopName}}</view>
			</view>
			<view class="medicine_box" v-for="(drug,k) in item.drugData" :key="k">
				<view>
					<checkbox-group>
						<checkbox class="round" style="transform:scale(0.7)" :checked="item.checked" />
					</checkbox-group>
				</view>
				<view class="box_Drug_information">
					<view class="box_Product_picture"></view>
					<view class="card_commodity" style="height: 100%;">
						<view class="drug_title">{{drug.title}}</view>
						<view class="drug_specification">{{drug.specification}}</view>
						<view class="same_row_in space_between">
							<view class="same_row_in money_symbol">
								<view class="title_money">￥</view>
								<view class="money_num">{{drug.price}}</view>
							</view>
							<view>
								<u-number-box v-model="drug.num"></u-number-box>
							</view>
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			commodityData: {
				type: Array,
				default () {
					return []
				}
			},
		},
		data() {
			return {

			}
		},
		methods: {

		}
	}
</script>

<style lang="scss">
	.commodit_box {
		background-color: #FFF;
		border-radius: 10rpx;
		margin: 20rpx;
		padding: 20rpx;
	}

	.shop_title_box {
		font-size: 32rpx;
		font-weight: 600;
	}

	.medicine_box {
		display: flex;
		align-items: center;
		margin-top: 20rpx;
	}

	.box_Drug_information {
		flex: 1;
		height: 100%;
		display: flex;
	}

	.box_Product_picture {
		flex: none;
		width: 180rpx;
		height: 140rpx;
		background-color: $x-color;
	}

	.card_commodity {
		flex: 1;
		height: 100%;
		display: flex;
		margin-left: 20rpx;
		flex-direction: column;
	}

	.drug_title {
		font-size: 32rpx;
		font-weight: 600;
	}

	.drug_specification {
		font-size: 28rpx;
		margin: 10rpx 0rpx;
		color: #6B7280;
	}

	.money_symbol {
		display: flex;
		align-items: baseline;
	}

	.title_money {
		font-size: 28rpx;
		font-weight: 600;
		color: $u-error;
	}

	.money_num {
		font-size: 34rpx;
		font-weight: bold;
		color: $u-error;
	}
</style>