<template>
	<view class="reimburse-detail-container">
		<view class="detail-item">
		  <view class="item-label">报销申请</view>
		  <view class="item-value">{{ detail.createBy }}</view>
		</view>
	  <!-- 出差开始时间 -->
	  <view class="detail-item">
	    <view class="item-label">用印类型</view>
	    <view class="item-value">{{ detail.sealType || '无' }}</view>
	  </view>
	  <!-- 出差结束时间 -->
	  <view class="detail-item">
	    <view class="item-label">原因</view>
	    <view class="item-value">{{ detail.purpose || '无' }}</view>
	  </view>
	  <!-- 备注 -->
	  <view class="detail-item">
	    <view class="item-label">备注</view>
	    <view class="item-value">{{ detail.remark || '无' }}</view>
	  </view>
	  <!-- 创建人 -->
	  <view class="detail-item">
	    <view class="item-label">创建人</view>
	    <view class="item-value">{{ detail.createBy || '无' }}</view>
	  </view>
	  <!-- 创建时间 -->
	  <view class="detail-item">
	    <view class="item-label">创建时间</view>
	    <view class="item-value">{{ detail.createTime || '无' }}</view>
	  </view>
	  <!-- 更新人 -->
	  <view class="detail-item">
	    <view class="item-label">更新人</view>
	    <view class="item-value">{{ detail.updateBy || '无' }}</view>
	  </view>
	  <!-- 更新时间（最后一项，样式会自动去掉下边框） -->
	  <view class="detail-item">
	    <view class="item-label">更新时间</view>
	    <view class="item-value">{{ detail.updateTime || '无' }}</view>
	  </view>
	</view>
</template>

<script>
	import { getSealReq } from '@/api/hrm/seal.js'
	
	export default {
		props: {
			bizId: {
				type: String,
				required: true
			}
		},
		data() {
			return {
				detail: {}
			}
		},
		watch: {
			bizId: {
				handler(newVal) {
					getSealReq(newVal).then(res => {
						this.detail = res.data
						console.log(this.detail)
					})
				},
				immediate: true
			}
		},
	}
</script>

<style scoped>
/* 容器样式 */
.reimburse-detail-container {
	padding: 20rpx;
	background-color: #ffffff;
	border-radius: 12rpx;
	margin: 10rpx;
	box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
}

/* 每一项的样式 */
.detail-item {
	display: flex;
	align-items: flex-start; /* 多行文本对齐 */
	padding: 18rpx 0;
	border-bottom: 1px solid #f5f5f5;
}

/* 最后一项去掉下边框 */
.detail-item:last-child {
	border-bottom: none;
}

/* 标签样式 */
.item-label {
	width: 140rpx;
	font-size: 28rpx;
	color: #666666;
	font-weight: 500;
	padding-top: 2rpx; /* 对齐多行文本 */
}

/* 值的样式 */
.item-value {
	flex: 1;
	font-size: 28rpx;
	color: #333333;
	line-height: 40rpx; /* 多行文本行高 */
}
</style>