<template>
  <avue-crud class="cl-crud" :option="options" :data="data">
    <template slot="menuLeft">
      <div style="display: flex; align-items: center;">
        <div style="margin-right: 50px;">研发项目编号：{{ data[0].xmbh }}</div>
        <div>项目项目名称：{{ data[0].xmmc }}</div>
      </div>
    </template>
  </avue-crud>
</template>

<script>
export default {
  props: {
    data: {
      type: Array,
      default: () => []
    }
  },
  data() {
    return {
      options: {
        tip: false,
        searchShow: false,
        border: true,
        index: true,
        showSummary: true,
        menu: false,
        addBtn: false,
        refreshBtn: false,
        columnBtn: false,
        gridBtn: false,
        sumColumnList: [
          {
            label: '合计:',
            name: "quantity",
            type: "sum",
          },
          {
            name: "amount",
            type: "sum",
          },
        ],
        column: [
          {
            label: "日期",
            prop: "leaseDate",
            width: 100,
            align: "center",
            showOverflowTooltip: true,
          },
          {
            label: "租赁资产类型",
            prop: "type",
            width: 120,
            align: "center",
            showOverflowTooltip: true,
          },
          {
            label: "租赁资产名称",
            prop: "name",
            minWidth: 140,
            showOverflowTooltip: true,
          },
          {
            label: "型号规格",
            prop: "model",
            width: 120,
            align: "center",
            showOverflowTooltip: true,
          },
          {
            label: "使用天数或使用量",
            prop: "quantity",
            width: 120,
            align: "center",
            showOverflowTooltip: true,
          },
          {
            label: "单价",
            prop: "unitPrice",
            width: 120,
            align: "center",
            showOverflowTooltip: true,
          },
          {
            label: "总价（不含税）",
            prop: "amount",
            width: 120,
            align: "center",
            showOverflowTooltip: true,
          },
        ],
      },
    };
  },
  methods: {},
};
</script>

<style lang="scss">
.cl-crud {
  .avue-crud__header {
    min-height: 26px;
  }
}
</style>
