| | |
| | | |
| | | import { useGridColumns, useGridFormSchema } from './data'; |
| | | import Form from './modules/form.vue'; |
| | | import ImportForm from './modules/import-form.vue'; |
| | | import OrderForm from './modules/order-form.vue'; |
| | | import ProcessSelectModal from './modules/process-select-modal.vue'; |
| | | |
| | |
| | | |
| | | const [FormModal, formModalApi] = useVbenModal({ |
| | | connectedComponent: Form, |
| | | destroyOnClose: true, |
| | | }); |
| | | |
| | | const [ImportModal, importModalApi] = useVbenModal({ |
| | | connectedComponent: ImportForm, |
| | | destroyOnClose: true, |
| | | }); |
| | | |
| | |
| | | async function handleExport() { |
| | | const data = await exportPurchaseRequest(await gridApi.formApi.getValues()); |
| | | downloadFileFromBlobPart({ fileName: '采购申请.xls', source: data }); |
| | | } |
| | | |
| | | /** 导入采购申请 */ |
| | | function handleImport() { |
| | | importModalApi.open(); |
| | | } |
| | | |
| | | /** 新增采购申请 */ |
| | |
| | | <template> |
| | | <Page auto-content-height> |
| | | <FormModal @success="handleRefresh" /> |
| | | <ImportModal @success="handleRefresh" /> |
| | | <OrderFormModal @success="handleRefresh" /> |
| | | <ProcessModal @success="handleRefresh" /> |
| | | <Grid table-title="采购申请列表"> |
| | |
| | | onClick: handleExport, |
| | | }, |
| | | { |
| | | label: '导入', |
| | | type: 'primary', |
| | | icon: ACTION_ICON.UPLOAD, |
| | | auth: ['erp:purchase-request:import'], |
| | | onClick: handleImport, |
| | | }, |
| | | { |
| | | label: '批量删除', |
| | | type: 'primary', |
| | | danger: true, |