<!--pages/cattle/exit-detail/exit-detail.wxml-->
<view class="page-container">
  <!-- 加载状态 -->
  <view class="loading-container" wx:if="{{loading}}">
    <text>加载中...</text>
  </view>

  <!-- 详情内容 -->
  <view class="detail-content" wx:else>
    <!-- 头部：记录编号 -->
    <view class="detail-header">
      <view class="header-left">
        <text class="record-label">记录编号</text>
        <text class="record-id">{{record.recordId}}</text>
      </view>
      <text class="status-badge">{{record.status || '已确认'}}</text>
    </view>

    <!-- 基本信息 -->
    <view class="info-section">
      <view class="section-title">基本信息</view>
      <view class="info-list">
        <view class="info-item">
          <text class="label">记录ID：</text>
          <text class="value">{{record.id}}</text>
        </view>
        <view class="info-item">
          <text class="label">记录编号：</text>
          <text class="value">{{record.recordId}}</text>
        </view>
        <view class="info-item">
          <text class="label">状态：</text>
          <text class="value">{{record.status || '已确认'}}</text>
        </view>
      </view>
    </view>

    <!-- 牛只信息 -->
    <view class="info-section">
      <view class="section-title">牛只信息</view>
      <view class="info-list">
        <view class="info-item">
          <text class="label">牛只ID：</text>
          <text class="value">{{record.animalId}}</text>
        </view>
        <view class="info-item">
          <text class="label">耳号：</text>
          <text class="value">{{record.earNumber}}</text>
        </view>
      </view>
    </view>

    <!-- 离栏信息 -->
    <view class="info-section">
      <view class="section-title">离栏信息</view>
      <view class="info-list">
        <view class="info-item">
          <text class="label">离栏日期：</text>
          <text class="value">{{record.exitDateText}}</text>
        </view>
        <view class="info-item">
          <text class="label">离栏原因：</text>
          <text class="value">{{record.exitReason || '-'}}</text>
        </view>
        <view class="info-item">
          <text class="label">去向：</text>
          <text class="value">{{record.destination || '-'}}</text>
        </view>
        <view class="info-item">
          <text class="label">处置方式：</text>
          <text class="value">{{record.disposalMethod || '-'}}</text>
        </view>
        <view class="info-item">
          <text class="label">原栏舍ID：</text>
          <text class="value">{{record.originalPenId}}</text>
        </view>
        <view class="info-item">
          <text class="label">原栏舍名称：</text>
          <text class="value">{{record.originalPenName}}</text>
        </view>
        <view class="info-item">
          <text class="label">原栏舍编码：</text>
          <text class="value">{{record.originalPenCode}}</text>
        </view>
      </view>
    </view>

    <!-- 养殖场信息 -->
    <view class="info-section">
      <view class="section-title">养殖场信息</view>
      <view class="info-list">
        <view class="info-item">
          <text class="label">养殖场ID：</text>
          <text class="value">{{record.farmId}}</text>
        </view>
        <view class="info-item">
          <text class="label">养殖场名称：</text>
          <text class="value">{{record.farmName}}</text>
        </view>
      </view>
    </view>

    <!-- 操作信息 -->
    <view class="info-section">
      <view class="section-title">操作信息</view>
      <view class="info-list">
        <view class="info-item">
          <text class="label">操作人：</text>
          <text class="value">{{record.handler || '-'}}</text>
        </view>
        <view class="info-item">
          <text class="label">备注：</text>
          <text class="value">{{record.remark || '-'}}</text>
        </view>
      </view>
    </view>

    <!-- 时间信息 -->
    <view class="info-section">
      <view class="section-title">时间信息</view>
      <view class="info-list">
        <view class="info-item">
          <text class="label">创建时间：</text>
          <text class="value">{{record.createdAtText}}</text>
        </view>
        <view class="info-item">
          <text class="label">更新时间：</text>
          <text class="value">{{record.updatedAtText}}</text>
        </view>
      </view>
    </view>
  </view>
</view>

