<template>
	<view class="container">
		<view class="title">关联耗材</view>

		<!-- 每一个耗材盒子区域 -->
		<view class="detail_box">
			<view class="detail_box_item">
				<view class="item_key">耗材名称</view>
				<view class="item_value">螺丝钉</view>
			</view>
			<view class="detail_box_item">
				<view class="item_key">耗材数量</view>
				<view class="item_value">
					<uni-number-box v-model="count" :min="0" @change="bindChange"></uni-number-box>
				</view>
			</view>
			<view class="detail_box_item">
				<view class="item_key">耗材单价</view>
				<view class="item_value">0.5</view>
			</view>
		</view>

		<!-- 添加耗材区域 -->
		<view class="add" @click="handleAdd">
			<text>＋</text>
			添加耗材
		</view>

		<!-- 合计费用区域 -->
		<view class="total">
			<view>合计费用</view>
			<view>10元</view>
		</view>

		<view class="title">维修师傅</view>

		<view class="box">
			<img src="../../static/images/repairsImg/people.png" />
			张三
		</view>

		<view class="title2">手机</view>

		<view class="box">
			<img src="../../static/images/repairsImg/phone2.png" />
			13659854589
		</view>

		<view class="btn">确认提交</view>
	</view>
</template>

<script>
export default {
	data() {
		return {
			count: 3
		}
	},
	methods: {
		bindChange(val) {
			console.log(val)
		},
		handleAdd() {
			uni.navigateTo({
				url: '/pagesRepairs/addGoods/addGoods'
			})
		}
	}
}
</script>

<style lang="scss" scoped>
.container {
	box-sizing: border-box;
	padding: 0 30rpx;
	width: 100vw;
	height: 100vh;
	overflow-y: auto;

	.title {
		height: 109rpx;
		line-height: 109rpx;
		font-size: 36rpx;
		font-weight: bold;
	}

	.detail_box {
		box-sizing: border-box;
		margin-bottom: 46rpx;
		padding: 5rpx 30rpx 0;
		width: 690rpx;
		height: 284rpx;
		border-radius: 9rpx;
		box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.25);

		.detail_box_item {
			display: flex;
			justify-content: space-between;
			align-items: center;
			height: 92rpx;
			font-size: 32rpx;
			border-bottom: 1rpx solid #e5e5e5;

			.item_key {
				width: 150rpx;
				color: #808080;
			}

			.item_value {
				font-weight: bold;
			}
		}
	}

	.add {
		display: flex;
		justify-content: center;
		align-items: center;
		width: 690rpx;
		height: 90rpx;
		color: #6fb6b8;
		font-size: 32rpx;
		border-radius: 9rpx;
		background-color: #ebf2f2;

		text {
			margin-right: 10rpx;
			font-size: 48rpx;
		}
	}

	.total {
		display: flex;
		justify-content: space-between;
		align-items: center;
		margin: auto;
		width: 622rpx;
		height: 100rpx;
		font-size: 32rpx;
		font-weight: bold;
		border-bottom: 1rpx solid #e5e5e5;
	}

	.box {
		display: flex;
		align-items: center;
		height: 94rpx;
		font-size: 32rpx;
		border-radius: 10rpx;
		border: 1rpx solid #cccccc;

		img {
			margin: 0 14rpx 0 30rpx;
			width: 40rpx;
			height: 40rpx;
		}
	}

	.title2 {
		height: 126rpx;
		line-height: 126rpx;
		font-size: 36rpx;
		font-weight: bold;
	}

	.btn {
		display: flex;
		justify-content: center;
		align-items: center;
		margin: 194rpx 0 60rpx;
		height: 100rpx;
		color: #fff;
		font-size: 32rpx;
		border-radius: 12rpx;
		background-color: #6fb6b8;
	}
}
</style>
