<template>
	<view class="mixAdd">
		<view class="container">
			<ul>
				<li>
					<p>船名：</p>
					<span>快乐号</span>
				</li>
				<li>
					<p><span class="required">*</span>航次：</p>
					<uni-data-select v-model="hcValue" :localdata="hcList" @change="hcChange"></uni-data-select>
				</li>
				<li>
					<p>进出口：</p>
					<span>进口</span>
				</li>
				<li>
					<p>贸易类型：</p>
					<span>内贸</span>
				</li>
				<li>
					<p><span class="required">*</span>天气：</p>
					<span>未知</span>
				</li>
				<li>
					<p><span class="required">*</span>泊位：</p>
					<uni-data-select v-model="bwValue" :localdata="bwList" @change="bwChange"></uni-data-select>
				</li>
				<li>
					<p><span class="required">*</span>作业组数：</p>
					<uni-number-box @change="workChange" />
				</li>
				<li>
					<p><span class="required">*</span>单船人数：</p>
					<uni-number-box @change="shipChange" />
				</li>
				<li>
					<p>作业时间：</p>
				</li>
			</ul>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				// 航次下拉框
				hcValue: "",
				hcList: [{
						value: 0,
						text: "航次0"
					},
					{
						value: 1,
						text: "航次1"
					},
					{
						value: 2,
						text: "航次2"
					},
				],
				// 泊位下拉框
				bwValue: "",
				bwList: [{
						value: 0,
						text: "泊位0"
					},
					{
						value: 1,
						text: "泊位1"
					},
					{
						value: 2,
						text: "泊位2"
					},
				],
				// 作业单数
				workValue: 0,
				// 单船人数
				shipValue: 0,
			}
		},
		methods: {
			// 航次下拉
			hcChange(e) {
				this.hcValue = e;
			},
			// 泊位下拉
			bwChange(e) {
				this.bwValue = e;
			},
			// 作业组数
			workChange(val) {
				this.workValue = val;
			},
			// 单船人数
			shipChange(val) {
				this.shipValue = val;
			},
		}
	}
</script>

<style lang="less" scoped>
	.mixAdd {
		.container {
			padding: 30px 20px;

			ul {
				display: flex;
				flex-wrap: wrap;
				justify-content: space-between;

				li {
					width: 44%;
					border-top: 1px solid #ccc;
					border-bottom: 1px solid #ccc;
					display: flex;
					padding: 10px 20px;
					line-height: 35px;
					margin-bottom: 20px;

					.required {
						color: red;
						margin-right: 5px;
					}

					/deep/.uni-numbox {
						border: 1px solid #ccc;
						box-sizing: border-box;
					}

					/deep/.uni-numbox-btns {
						border-right: 1px solid #ccc;
						border-left: 1px solid #ccc;
						padding: 0 14px;
						box-sizing: border-box;
					}

					/deep/.uni-numbox__value {
						width: 100px;
						height: 35px;
						line-height: 35px;
						background-color: #fff !important;
					}
				}
			}
		}
	}
</style>