<template>
	<view class="warp">
		<view class="topInfo">
			<view class="topInfo-item">
				<view class="flex info">
					<view class="logo">
						<image src="../../../static/img/reject.png" mode="" v-if="list.priceStatus == '已驳回'"
							style="height: 40rpx;"></image><!-- 驳回 -->
						<image src="../../../static/img/tongguo.png" mode="" v-if="list.priceStatus == '已通过'"
							style="height: 40rpx;"></image><!-- 通过 -->
						<image src="../../../static/img/daishenhe.png" mode="" v-if="list.priceStatus == '审核中'"
							style="height: 40rpx;"></image><!-- 待审核 -->
					</view>
					<view class="infoText">{{list.priceStatus}}</view>
				</view>
				<view class="infoData">{{list.updateDate}}</view>
			</view>
		</view>
		<view class="transaction">
			<u-form :model="list" ref="list" class="uForm">
				<u-form-item label="合同编号" prop="contractNo" label-width="140">
					<u-input v-model="list.contractNo" input-align="right" placeholder="" disabled />
				</u-form-item>
				<u-form-item label="任务编号" prop="processNo" label-width="140">
					<u-input v-model="list.processNo" input-align="right" placeholder="" disabled />
				</u-form-item>
				<u-form-item label="货名" prop="goodsName" label-width="140">
					<u-input v-model="list.goodsName" input-align="right" placeholder="" disabled />
				</u-form-item>
				<u-form-item label="发货地址" prop="sendDetailedAddress" label-width="140">
					<u-input v-model="list.sendDetailedAddress" input-align="right" placeholder="发货地址" disabled />
				</u-form-item>
				<u-form-item label="收货地址" prop="receiveDetailedAddress" label-width="140">
					<u-input v-model="list.receiveDetailedAddress" input-align="right" placeholder="收货地址" disabled />
				</u-form-item>
				<u-form-item label="运费（元/吨）" prop="tranPrice" label-width="250">
					<u-input v-model="list.tranPrice" input-align="right" placeholder="请输入运费单价" disabled/>
				</u-form-item>
			</u-form>
		</view>
	     <u-button type="primary" class="submit" @click="fanHui()">返回</u-button>
	</view>
</template>

<script>
	import {
		mapState
	} from 'vuex';
	export default {
		data() {
			return {
				list: {
					priceStatus:"",
				},
				id: "",
			}
		},
		onLoad(options) {
			this.id = options.id
			this.getList()
		},
		computed: {
			...mapState(['hasLogin', 'userInfo']),
		},
		methods: {
			getList() {
				this.$api.doRequest('get', '/tranProcessInfo/getTranProcess', {
					id: this.id
				}).then(res => {
					this.list = res.data.data
				})
			},
			fanHui(){
				uni.navigateBack()
			}
		}
	}
</script>

<style scoped lang="scss">
	.transaction {
		background-color: #FFFFFF;
		margin: 10rpx;
		padding-bottom: 10rpx;
		border-radius: 20rpx;
	}

	.uForm {
		padding: 0 40rpx;
	}

	.u-form-item {
		padding: 0;
	}

	.bottom-btn {
		width: 100%;
		position: fixed;
		bottom: 40rpx;
		display: flex;
		z-index: 2;
	}

	.topInfo {
		height: 210rpx;
		background: linear-gradient(270deg, #22C572 0%, #34DE8A 100%);
		padding: 30rpx;

		.topInfo-item {
			height: 150rpx;
			background-color: #FFFFFF;
			border-radius: 20rpx;
			padding: 40rpx;

			.logo {
				width: 40rpx;
				height: 40rpx;
				margin-top: 8rpx;
			}

			.infoText {
				font-size: 36rpx;
				font-weight: 600;
				margin-left: 20rpx;
			}

			.infoData {
				color: #878C9C;
				font-size: 26rpx;
				margin-top: 10rpx;
			}
		}
	}

	.submit {
		width: 98%;
		background: #22C572;
		border-radius: 40rpx;
		margin-top: 40rpx;
	}
</style>
