<template>
  <el-card :body-style="{margin:'20px'}"
           style="margin:20px 20px 20px 20px;height: 200px;background-color: #e1f3fb;border-radius: 12px"
  >
    <template #header>
      <el-form class="query-form" size="mini">
        <el-form-item class="query-form-item" label-width="23%" label="姓 名:">
          <el-input
            v-model="info.name"
            placeholder="请输入姓名"
            clearable
            disabled
            class="custom-disabled-input"
          >
          </el-input>
        </el-form-item>

        <el-form-item class="query-form-item" label-width="23%" label="住院号:">
          <el-input
            v-model="info.adNum"
            placeholder="请输入住院号"
            clearable
            disabled
            class="custom-disabled-input"
          >
          </el-input>
        </el-form-item>
        <el-form-item class="query-form-item" label-width="23%" label="状态:">
          <el-tag v-if="info.status==1" :type="statusFilterType(info.status)"> {{
              checkStatus[info.status]
            }}
          </el-tag>
        </el-form-item>
        <el-form-item>
          <el-button-group style=" float: right;">
            <el-button type="primary" @click="onCodeSubmit" style="margin-left: 10px ;"
                       icon="el-icon-thumb"
            >处理单据
            </el-button>
          </el-button-group>
        </el-form-item>
      </el-form>
    </template>

  </el-card>
</template>
<script>

export default {
  name: '',
  data() {
    return {
      info: {},
      checkStatus: {
        1: "未完成",
        0: "已完成",
        null: "无"
      },
    }
  },
  props: {
    info: Object
  },
  created() {
  },
  mounted() {
  },
  methods: {
    onCodeSubmit() {
      this.$emit('baziPanel', this.info)
    },
    statusFilterType(status) {
      const statusMap = {
        1: 'warning',
        2: 'success',
        null: 'success'
      }
      return statusMap[status]
    },
  },
  computed: {}
}
</script>

<style>
.custom-disabled-input input.el-input__inner:disabled {
  color: #000000; /* 修改为需要的颜色 */
}
</style>
