<template>
	<view class="info">
		<view class="info_card">
			<view class="title">处方信息</view>
			<view class="info_item">
				处方编号：{{pageData.detail.ptwybm}}
			</view>
			<view class="info_item">
				性别：{{pageData.detail.gender}}
			</view>
			<view class="info_item">
				年龄：{{pageData.detail.age}}
			</view>
			<view class="info_item">
				开方时间：{{pageData.detail.kfriq}}
			</view>
			<view class="info_item">
				诊断：{{pageData.detail.zdnr}}
			</view>
			<uni-table class="medicines_table" border stripe >
				<!-- 表头行 -->
				<uni-tr>
					<uni-th align="center" width="145rpx" class="table_th">药品名称</uni-th>
					<uni-th align="center" width="145rpx" class="table_th">单帖计量(克)</uni-th>
					<uni-th align="center" width="120rpx" class="table_th">炮制方法</uni-th>
					<uni-th align="center" width="100rpx" class="table_th">脚注</uni-th>
				</uni-tr>
				<!-- 表格数据行 -->
				<uni-tr v-for="(item,index) in pageData.medicines" :key="index">
					<uni-td align="center">{{item.ypmc}}</uni-td>
					<uni-td align="center">{{item.dtsl}}</uni-td>
					<uni-td align="center">{{item.pzfs}}</uni-td>
					<uni-td align="center">{{item.tsjfLabel}}</uni-td>
				</uni-tr>
			</uni-table>
			<view class="info_item">
				服药方式：{{pageData.detail.fyfsyf=="1"?"内服":"外用"}}
			</view>
			<view class="info_item">
				贴数：{{pageData.detail.cfts}}
			</view>
		</view>
	</view>
</template>

<script setup>
import {ref,reactive,computed} from "vue";
import {onLoad,onShow,onUnload,onPullDownRefresh} from "@dcloudio/uni-app";
import http from '@/utils/request';

const pageData=reactive({
	detail:{},
	medicines:[]
})

onLoad((data)=>{
	pageData.detail = JSON.parse(decodeURIComponent(data.detail))
	pageData.medicines = JSON.parse(decodeURIComponent(data.medicines))
})
</script>

<style lang="scss" scoped>
@import './index.scss'
</style>
