<template>
	<view>
		<view class="box">
			<view class="top">
				<text class="title">业务录入</text>
			</view>
			<view class="item">
				<view class="l">企业名称：</view>
				<view class="r">
					{{form.customerName}}
				</view>
			</view>
			<view class="item">
				<view class="l">境外车牌：</view>
				<view class="r">
					{{form.cardNo}}
				</view>
			</view>
			<view class="item" v-if="form.realInTime">
				<view class="l">入场时间：</view>
				<view class="r">
					{{form.realInTime}}
				</view>
			</view>
			<view class="item" v-if="form.outDayTime">
				<view class="l">出场时间：</view>
				<view class="r">
					{{form.outDayTime}}
				</view>
			</view>
			<view class="item" v-if="form.partTime">
				<view class="l">停车时长：</view>
				<view class="r">
					{{form.partTime}}(分)
				</view>
			</view>
			<view class="item" v-if="form.partMoney">
				<view class="l">停车费用：</view>
				<view class="r">
					{{form.partMoney}}(分)
				</view>
			</view>
			<view class="item">
				<view class="l">规格(米)：</view>
				<view class="r">
					{{form.cardSize}}
				</view>
			</view>
			<view class="item">
				<view class="l">载重(吨)：</view>
				<view class="r">
					{{form.netWeight}}
				</view>
			</view>
			<view class="item">
				<view class="l">货物：</view>
				<view class="r">
					{{form.goodsName}}
				</view>
			</view>
			<view class="item">
				<view class="l">预计入场：</view>
				<view class="r">
					{{form.expectInDay}}
				</view>
			</view>
			<view class="item">
				<view class="l">中国车牌号：</view>
				<view class="r">
					{{form.chinaCarNo}}
				</view>
			</view>
			<view class="item">
				<view class="l">中国司机：</view>
				<view class="r">
					{{form.driverName}}
				</view>
			</view>
			<view class="item">
				<view class="l">联系号码：</view>
				<view class="r">
					{{form.driverPhone}}
				</view>
			</view>
			<view class="item-line">
				业务项
			</view>
			<view class="item" v-for="item in form.items" :key="item.id">
				<view class="l">{{item.itemTypeName}}：</view>
				<view class="r">
					{{item.itemName}}({{item.itemPrice}}x{{item.num}}={{item.total}}元)
				</view>
			</view>
			<view class="item">
				<text class="p1">订单状态:</text>
				<text class="p2">
					<text v-if="form.confirmInput==0">未确认</text>
					<text v-else>已确认</text>
				</text>
			</view>
			<view class="item">
				<text class="p1">支付状态:</text>
				<text class="p2">
					<text v-if="form.payStatus==1">未支付</text>
					<text v-if="form.payStatus==2">已支付(未确认)</text>
					<text v-if="form.payStatus==3">已支付(已确认)</text>
				</text>
			</view>
			<view class="hj">
				总费用：{{form.totalMoney}}元
			</view>
		</view>
		<u-button type="primary" text="返回" @click="backFn"></u-button>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				form: {}
			}
		},
		onShow() {},

		onLoad(options) {
			this.id = options.id;
		},
		onShow() {
			this.getBusinessById();
		},
		methods: {
			backFn() {
				this.$common.back();
			},
			getBusinessById() {
				this.$api.getBusinessById({
					id: this.id
				}).then(resp => {
					this.form = resp.data;
				})
			},
		}
	}
</script>

<style lang="scss">
	page {
		background-color: #fff;
	}

	.hs-item {
		text-align: center;
	}

	.item-line {
		color: #a2a2a2;
		padding: 5px 0 10px 29px;
		border-bottom: 1px solid #E5E5E5;
	}

	.hj {
		padding: 50rpx;
		font-size: 40rpx;
		color: red;
		font-weight: bold;
	}

	.save-btn {
		background-color: #ff4200;
		height: 88rpx;
		display: flex;
		justify-content: center;
		align-items: center;
		margin: 60rpx;
		color: #fff;
		font-size: 30rpx;
		font-weight: bold;
		border-radius: 10rpx;
	}

	@import '@/common/common.scss'
</style>
