<template>
	<view class="main">
		<view class="opinionList bg-white">
			<view class="margin-top-sm margin-lr-sm">
				<view class="text-df margin-top-sm" style="color: rgb(102,102,102);">
					<text class="text-leftstyle">订单号：</text><text style="color: rgb(51,51,51);">{{infodata.order.order_sn}}</text>
				</view>
				<view class="text-df margin-top-sm" style="color: rgb(102,102,102);">
					<text class="text-leftstyle">填写医生：</text><text style="color: rgb(51,51,51);">{{infodata.order.docter.name}}</text>
				</view>
				<view class="text-df margin-top-sm" style="color: rgb(102,102,102);">
					<text class="text-leftstyle">填写时间：</text><text style="color: rgb(51,51,51);">{{infodata.created_at}}</text>
				</view>
			</view>
		</view>
		<view class="margin-top-sm bg-white padding-sm">
			<view class="text-df margin-top-sm" style="color: rgb(102,102,102);">
				<text class="text-leftstyle1">病症：</text><text style="color: rgb(51,51,51);">{{infodata.symptoms}}</text>
			</view>
			<view class="text-df margin-top-sm" style="color: rgb(102,102,102);">
				<text class="text-leftstyle1">病因：</text><text style="color: rgb(51,51,51);">{{infodata.pathogen}}</text>
			</view>
			<view class="text-df margin-top-sm" style="color: rgb(102,102,102);">
				<text class="text-leftstyle1">结论建议：</text>
				<view style="color: rgb(51,51,51);margin-top: 10rpx;line-height: 43rpx;padding-left: 140rpx;">{{infodata.suggest}}</view>
			</view>
		</view>
		<view class="margin-top-sm bg-white padding-sm" style="border-top: 2rpx solid #efefef;">
			<view class="text-df margin-top-sm" style="color: rgb(102,102,102);">
				<text class="text-leftstyle1" style="font-weight: bold;">补充意见</text>
			</view>
			<view class="" v-for="(item,index) in infodata.suggests_detail" :key="index">
				<view class="text-df margin-top-sm" style="color: rgb(102,102,102);">
					<text class="text-leftstyle1">补充原因：</text>
					<text style="color: rgb(51,51,51);">{{item.supplement_content}}</text>
				</view>
				<view class="text-df margin-top-sm" style="color: rgb(102,102,102);">
					<text class="text-leftstyle1">补充内容：</text>
					<view style="color: rgb(51,51,51);margin-top: 10rpx;line-height: 43rpx; padding-left: 140rpx;">{{item.supplement_reason}}</view>
				</view>
			</view>
		</view>
		<view class="cu-tabbar-height"></view>
	</view>
</template>

<script>
	export default {
		onLoad(op) {
			this.infoid = op.id
		},
		mounted() {
			this.getopinionInfo()
		},
		data() {
			return {
				infoid: "",
				infodata: {}
			}
		},
		methods: {
			getopinionInfo: async function() {
				let res = await this.$request.post("/api/v1/suggest/suggestDetail", {
					suggest_id: this.infoid
				})
				console.log(res)
				if (res.status == 0) {
					this.infodata = res.data
				}
			}
		},
		onShow() {

		}
	}
</script>

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

	.opinionList {
		padding-top: 20rpx;
		padding-bottom: 20rpx;
	}

	.text-leftstyle {
		text-align: right;
		width: 138rpx;
		display: inline-block;
	}

	.text-leftstyle1 {
		text-align: left;
		width: 138rpx;
		display: inline-block;
	}
</style>
