<template>
  <div class="dialog" v-if="dialogForm">
    <div class="head_box">
      <span class="title">停产停业信息{{ 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="请输入停产停业业务流水号"/>
          </el-form-item>
          <el-form-item label="统一社会信用代码">
            <el-input v-model="listQuery.tyshxydm" placeholder="请输入统一社会信用代码"/>
          </el-form-item>
        </div>

        <div class="form-row">
          <el-form-item label="检查人姓名">
            <el-input v-model="listQuery.jcrxm" placeholder="请输入检查人姓名"/>
          </el-form-item>
          <el-form-item label="填发人姓名">
            <el-input v-model="listQuery.tfrxm" placeholder="请输入填发人姓名"/>
          </el-form-item>
        </div>

        <div class="form-row">
          <el-form-item label="批准人姓名">
            <el-input v-model="listQuery.pzrxm" placeholder="请输入批准人姓名"/>
          </el-form-item>
          <el-form-item label="批准文件证件号码">
            <el-input v-model="listQuery.pzwjzjhm" placeholder="请输入批准文件证件号码"/>
          </el-form-item>
        </div>

        <div class="form-row">
          <el-form-item label="被通知人姓名">
            <el-input v-model="listQuery.btzrxm" placeholder="请输入被通知人姓名"/>
          </el-form-item>
          <el-form-item label="填发时间">
            <el-date-picker v-model="listQuery.tfsj" type="datetime" style="width:100%" placeholder="请选择填发时间"/>
          </el-form-item>
        </div>

        <div class="form-row">
          <el-form-item label="登记人姓名">
            <el-input v-model="listQuery.djrxm" placeholder="请输入登记人姓名"/>
          </el-form-item>
          <el-form-item label="登记单位名称">
            <el-input v-model="listQuery.djdwmc" placeholder="请输入登记单位名称"/>
          </el-form-item>
        </div>

        <div class="form-row">
          <el-form-item label="受理行政区划单位名称">
            <el-input v-model="listQuery.slxzqhdwmc" placeholder="请输入受理行政区划单位名称"/>
          </el-form-item>
          <el-form-item label="办案单位名称">
            <el-input v-model="listQuery.badwmc" placeholder="请输入办案单位名称"/>
          </el-form-item>
        </div>

        <div class="form-row">
          <el-form-item label="具体修正项目详细情况">
            <el-input
              type="textarea"
              v-model="listQuery.jtxzxmxxqk"
              :rows="4"
              placeholder="请输入具体修正项目详细情况"
              style="width: 100%"
            />
          </el-form-item>
        </div>

        <div class="form-row">
          <el-form-item label="执法依据详细情况">
            <el-input
              type="textarea"
              v-model="listQuery.zfyjxxqk"
              :rows="4"
              placeholder="请输入执法依据详细情况"
              style="width: 100%"
            />
          </el-form-item>
        </div>

        <div class="form-row">
          <el-form-item label="违法犯罪经历描述">
            <el-input
              type="textarea"
              v-model="listQuery.wffzjlms"
              :rows="4"
              placeholder="请输入违法犯罪经历描述"
              style="width: 100%"
            />
          </el-form-item>
        </div>
      </el-form>
    </div>
  </div>
</template>

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

const dialogForm = ref(false);
const listQuery = ref({});
const title = ref('');
// 初始化数据
const init = (type, row) => {
  dialogForm.value = true;
  if (row) {
    title.value = type === 'edit' ? '编辑' : '详情';
    listQuery.value = { ...row };
  } else {
    title.value = '新增';
    listQuery.value = {};
  }
};

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

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>
