InvoiceDetail.vue 1.76 KB
<template>
  <template>
    <BasicDrawer
      @register="register"
      v-bind="$attrs"
      title="订单信息"
      width="60%"
      :isDetail="true"
      :showDetailBack="false"
      :destroyOnClose="true"
    >
      <div class="p-4">
        <BasicTable @register="registerTable">
          <template #bodyCell="{ column, record }">
            <template v-if="column.key === 'action'"> </template>
          </template>
        </BasicTable>
      </div>
    </BasicDrawer>
  </template>
</template>
<script lang="ts" setup>
  import { BasicDrawer, useDrawerInner } from '@/components/Drawer';
  import { BasicForm, FormSchema, useForm } from '@/components/Form';
  import { defineComponent, ref, computed, unref, toRaw, reactive } from 'vue';
  import { demoListApi } from '/@/api/demo/table';
  import { BasicColumn, useTable, BasicTable, ColumnChangeParam } from '/@/components/Table';
  import { getBaseInvoice } from '/@/api/project/invoice';

  const columns: BasicColumn[] = [
    {
      title: '客户编码',
      dataIndex: 'customerCode',
      width: 50,
    },
    {
      title: '项目号',
      dataIndex: 'projectNo',
      width: 60,
    },
    {
      title: '内部编码',
      dataIndex: 'innerNo',
      width: 60,
    },
    {
      title: '客户po号',
      dataIndex: 'customerPo',
      width: 60,
    },
  ];
  const invoiceNo = ref();
  const [register, { setDrawerProps, closeDrawer }] = useDrawerInner((data) => {
    // 方式1
    invoiceNo.value = data.data.invoiceNo;
    // getBaseInvoice({ invoiceNo: invoiceNo.value });
  });
  const params = ref({
    invoiceNo: invoiceNo.value,
  });
  const [registerTable] = useTable({
    api: () => getBaseInvoice({ invoiceNo: invoiceNo.value }),
    columns: columns,
    bordered: true,
  });
</script>