<template>
  <div class="full-height">
    <div class="row items-center">
      <q-avatar
        size="40px"
        font-size="20px"
        color="primary"
        class="q-mr-md"
        text-color="white"
        rounded
        :icon="`iconfont ${node.icon}`"
      />
      <div class="pingfang text-subtitle1">{{ node.name }}</div>
    </div>
    <div class="q-my-md row">
      <q-input
        standout
        v-model="msg.billId"
        dense
        type="text"
        style="width:250px;"
        label="业务单号"
        class="q-mr-md"
      />
      <q-select
        clearable
        dense
        filled
        option-value="Id"
        option-label="Name"
        v-model="msg.receipt"
        :options="OrderTypeList"
        emit-value
        map-options
        style="width:250px;"
        label="单据类型"
        class="q-mr-md"
      />
      <!-- <q-btn
        color="primary"
        class="q-px-md"
        label="查询"
        unelevated
        dense
        @click="searchKeyHandler"
      /> -->
    </div>
    <div style="height:calc(100% - 108px);overflow-y:auto;">
      <changeClassManager
        :isComponents="true"
        :billId="msg.billId"
        :receipt="msg.receipt"
        @success="refreshPage"
      ></changeClassManager>
    </div>
  </div>
</template>

<script>
import changeClassManager from "../../pages/teacher/changeClassManager.vue";
import { GetEducationReceiptType } from "../../api/teacher/index";
export default {
  components: { changeClassManager },
  props: ["node"],
  data() {
    return {
      msg: {
        billId: "",
        receipt: null
      },
      OrderTypeList: []
    };
  },
  mounted() {
    this.getEducationType();
  },
  methods: {
    getEducationType() {
      GetEducationReceiptType()
        .then(res => {
          if (res.Code == 1) {
            this.OrderTypeList = res.Data;
          }
        })
        .catch(() => {});
    },
    refreshPage() {
      this.$root.$emit("updateTodoList");
    }
  }
};
</script>

<style></style>
