| | |
| | | <script setup lang="ts"> |
| | | import type { Recordable } from '@vben/types'; |
| | | |
| | | import { onMounted } from 'vue'; |
| | | import { onMounted, ref } from 'vue'; |
| | | |
| | | import { Page, useVbenDrawer, type VbenFormProps } from '@vben/common-ui'; |
| | | import { $t } from '@vben/locales'; |
| | |
| | | |
| | | import { columns, querySchema } from './data'; |
| | | import drawer from './spare-in-drawer.vue'; |
| | | import { columns as inoutCol } from '#/views/eims/spare-inoutdt/data'; |
| | | import { listSpareInoutdt } from '#/api/eims/spare-inoutdt'; |
| | | import BasisSubTable from '#/views/eims/components/basis-sub-table.vue'; |
| | | |
| | | const formOptions: VbenFormProps = { |
| | | commonConfig: { |
| | |
| | | }, |
| | | id: 'spre-inout-index' |
| | | }; |
| | | |
| | | const inoutId = ref<string>(); |
| | | const [BasicTable, tableApi] = useVbenVxeGrid({ |
| | | formOptions, |
| | | gridOptions, |
| | | gridEvents: { |
| | | sortChange: (sortParams) => vxeSortEvent(tableApi, sortParams) |
| | | sortChange: (sortParams) => vxeSortEvent(tableApi, sortParams), |
| | | cellClick: (e: any) => { |
| | | const { row } = e; |
| | | inoutId.value = row.id; |
| | | } |
| | | } |
| | | }); |
| | | |
| | |
| | | |
| | | <template> |
| | | <Page :auto-content-height="true"> |
| | | <div class="flex h-full gap-[8px]"> |
| | | <BasicTable class="flex-1 overflow-hidden" table-title="备件入库单列表"> |
| | | <div class="flex h-full gap-[8px] flex-col"> |
| | | <BasicTable class="h-2/3" table-title="备件入库单列表"> |
| | | <template #toolbar-tools> |
| | | <Space> |
| | | <a-button v-access:code="['eims:spareInout:export']" @click="handleDownloadExcel"> |
| | |
| | | </Space> |
| | | </template> |
| | | </BasicTable> |
| | | <BasisSubTable |
| | | :columns="inoutCol" |
| | | :list-api="listSpareInoutdt" |
| | | :req-value="inoutId" |
| | | class="h-1/3" |
| | | req-key="inoutId" |
| | | title="入库明细" |
| | | /> |
| | | </div> |
| | | <Drawer @reload="tableApi.query()" /> |
| | | </Page> |