<template>
	<view class="shipPlan">
		<head-view :title="title"></head-view>
		<view class="container">
			<p class="title">基本信息</p>
			<view class="ul">
				<view class="li wLi">船名：</view>
				<view class="li">进口航次：</view>
				<view class="li">贸易类型：</view>
				<view class="li">航线：？？？</view>
				<view class="li">船公司：？？？</view>
				<view class="li wLi">船名：</view>
				<view class="li">进口航次：</view>
				<view class="li">贸易类型：</view>
				<view class="li">航线：？？？</view>
				<view class="li">船公司：？？？</view>
				<view class="li wLi">船代：？？？</view>
			</view>
			<p class="title">船期信息</p>
			<view class="ul">
				<view class="li">计划到港时间：？？？</view>
				<view class="li">计划离港时间：？？？</view>
				<view class="li">计划靠泊时间：？？？</view>
				<view class="li">计划离泊时间：？？？</view>
				<view class="li">确报时间：？？？</view>
				<view class="li">船期状态：？？？</view>
				<view class="li">靠泊状态：？？？</view>
				<view class="li">计划泊位：</view>
			</view>
			<p class="title">计划信息</p>
			<view class="ul">
				<view class="li">计划开工时间：</view>
				<view class="li">计划完工时间：</view>
				<view class="li">品牌：？？？</view>
				<view class="li">计划数量：</view>
				<view class="li">工班人数：？？？</view>
				<view class="li">计划组数：？？？</view>
			</view>
		</view>
	</view>
</template>

<script>
	import sqlite from "../../common/sqlite.js"
	export default {
		data() {
			return {
				title: "船名 - 船舶计划",
				shipInfo: {},
			}
		},
		mounted() {
			// this.shipInfo = uni.getStorageSync('shipInfo')
			this.executeSql1('shipInfoTable')
		},
		methods: {
			// 查
			executeSql1(tableName) {
				let sql = `select * from ${tableName}`
				sqlite.executeSqlCeshi(sql).then((value) => {
					// 在resolve时执行的回调函数
					this.shipInfo = value[0]
					this.title = `${this.shipInfo.vslCnname} - 船舶计划`
				}).catch((error) => {
					// 在reject时执行的回调函数
					console.error(error);
				});
			},
		}
	}
</script>

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

			.title {
				padding-left: 10px;
				border-left: 5px solid #2979ff;
				font-size: 20px;
				font-weight: bold;
			}

			.ul {
				display: flex;
				flex-wrap: wrap;
				padding: 0 20px;
				margin-bottom: 20px;

				.li {
					min-width: 45%;
					margin: 10px 20px;
				}

				.wLi {
					width: 100%;
				}
			}
		}
	}
</style>