<template>
  <layout-card>
    <el-divider content-position="left">基本信息</el-divider>
    <el-descriptions border>
      <el-descriptions-item label="登记编号">
        {{ data.RECORD_NUMBER }}
      </el-descriptions-item>
      <el-descriptions-item label="办理日期">
        {{ data.TRANSACTION_DATE }}
      </el-descriptions-item>
      <el-descriptions-item label="登记人">
        {{ data.REGISTRANT }}
      </el-descriptions-item>
      <el-descriptions-item label="过户类型">
        {{ data.ASSIGNED_TYPE }}
      </el-descriptions-item>
      <el-descriptions-item label="车辆类型">
        {{ data.VEHICLE_TYPE }}
      </el-descriptions-item>
      <el-descriptions-item label="车架号">
        {{ data.FRAMES_NUMBER }}
      </el-descriptions-item>
      <el-descriptions-item label="车辆类型">
        {{ data.VEHICLE_TYPE }}
      </el-descriptions-item>
      <el-descriptions-item label="车辆品牌">
        {{ data.VEHICLE_BRAND }}
      </el-descriptions-item>
      <el-descriptions-item label="车辆型号">
        {{ data.VEHICLE_MODEL }}
      </el-descriptions-item>
      <el-descriptions-item label="发动机号">
        {{ data.ENGINE_NUMBER }}
      </el-descriptions-item>
      <el-descriptions-item label="动力类型">
        {{ data.POWER_TYPE }}
      </el-descriptions-item>
      <el-descriptions-item label="排放标准">
        {{ data.EMISSION_STANDARD }}
      </el-descriptions-item>
    </el-descriptions>
    <el-divider content-position="left">过户信息</el-divider>
    <el-descriptions border>
      <el-descriptions-item label="原车牌号">
        {{ data.RAW_PLATE_NUMBER }}
      </el-descriptions-item>
      <el-descriptions-item label="原车主业主">
        {{ data.RAW_OWNERS }}
      </el-descriptions-item>
      <el-descriptions-item label="原联系电话">
        {{ data.RAW_CONTACT_NUMBER }}
      </el-descriptions-item>
      <el-descriptions-item label="现车牌号">
        {{ data.NOW_PLATE_NUMBER }}
      </el-descriptions-item>
      <el-descriptions-item label="现车主业主">
        {{ data.NOW_OWNERS }}
      </el-descriptions-item>
      <el-descriptions-item label="现联系电话">
        {{ data.NOW_CONTACT_NUMBER }}
      </el-descriptions-item>
      <el-descriptions-item label="原营运证号">
        {{ data.RAW_OPERATION_CERTIFICATE }}
      </el-descriptions-item>
      <el-descriptions-item label="现营运证号">
        {{ data.NOW_OPERATION_CERTIFICATE }}
      </el-descriptions-item>
    </el-descriptions>
    <el-descriptions border>
      <el-descriptions-item label="现营运证照片">
        <img
          v-viewer
          :src="VITE_FILE_URL + data.NOW_VEHICLE_OPERATION_CERTIFICATE"
          width="100"
          height="100"
          alt=""
        />
      </el-descriptions-item>
      <el-descriptions-item label="现行驶证照片">
        <img
          v-viewer
          :src="VITE_FILE_URL + data.NOW_DRIVINGLICENSE_IMG"
          width="100"
          height="100"
          alt=""
        />
      </el-descriptions-item>
    </el-descriptions>
    <el-descriptions :column="1" border>
      <el-descriptions-item label="过户资料">
        {{ data.ASSIGNED_MATERIAL }}
      </el-descriptions-item>
    </el-descriptions>
    <el-descriptions :column="1" border>
      <el-descriptions-item label="备注">
        {{ data.REMARK }}
      </el-descriptions-item>
    </el-descriptions>
  </layout-card>
</template>

<script setup>
import { findByIdAssignedManageInfo } from "@/request/assigned_manage.js";
import { useRoute } from "vue-router";
import { ref } from "vue";

const VITE_FILE_URL = import.meta.env.VITE_FILE_URL;
const route = useRoute();
const { ASSIGNED_ID } = route.query;
const data = ref({});
const getData = async () => {
  const { pd } = await findByIdAssignedManageInfo({ ASSIGNED_ID });
  data.value = pd;
};
getData();
</script>

<style scoped></style>
