<template>
  <div class="dialog" v-if="dialogForm">
    <div class="head_box">
      <span class="title">机动车修理业务信息详情</span>
      <div>
        <el-button size="small" @click="close">关闭</el-button>
      </div>
    </div>
    <div class="cntinfo">
      <el-form :model="listQuery" :label-width="230" label-position="left">
        <div class="form-row">
          <el-form-item label="业务流水号码">
            <el-input v-model="listQuery.ywlsh" placeholder="01131213"/>
          </el-form-item>
          <el-form-item label="机动车修理项目序号">
            <el-input v-model="listQuery.xmxh" placeholder="05"/>
          </el-form-item>
        </div>

        <div class="form-row">
          <el-form-item label="承接车辆号牌号">
            <el-input v-model="listQuery.cph" placeholder="藏G.123456"/>
          </el-form-item>
          <el-form-item label="机动车修理项目">
            <el-input v-model="listQuery.xmmc" placeholder="换轮胎"/>
          </el-form-item>
        </div>

        <div class="form-row">
          <el-form-item label="承接日期">
            <el-input v-model="listQuery.cjrq" placeholder="2025/1/18 10:00:00"/>
          </el-form-item>
          <el-form-item label="交付日期">
            <el-input v-model="listQuery.jfrq" placeholder="2025/1/20 10:00:00"/>
          </el-form-item>
        </div>

        <div class="form-row">
          <el-form-item label="车主驾驶证号">
            <el-input v-model="listQuery.jszh" placeholder="654644654654"/>
          </el-form-item>
          <el-form-item label="从业人员">
            <el-input v-model="listQuery.cyry" placeholder="李四"/>
          </el-form-item>
        </div>
      </el-form>
    </div>
  </div>
</template>

<script setup>
import { ref, reactive } from 'vue';

const dialogForm = ref(false);
const listQuery = ref({});

// 初始化数据
const init = (type, row) => {
  dialogForm.value = true;
  // 根据type和row初始化表单数据
};

const close = () => {
  dialogForm.value = false;
};

defineExpose({init})
</script>

<style lang="scss" scoped>
.dialog {
  padding: 20px;

  :deep(.el-form-item__label) {
    background-color: #F7FAFB;
    padding: 0px 8px;
    color: #000;
    font-weight: 500;
    border: 1px solid #E3E7ED;
  }

  .head_box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
  }
  .cntinfo{
    height: calc(100% - 70px);
    overflow: hidden;
    overflow-y: auto;
  }

  .form-row {
    display: flex;
    
    .el-form-item {
      flex: 1;
    }
  }

   ::v-deep .el-input__inner{
    height: 36px !important;
    line-height: 36px !important;
    border-radius: 0;
    color: #777575;
  }
}
.el-form-item--default{
  margin-bottom: 0px;
}
</style>