| | |
| | | |
| | | import { useGridColumns, useGridFormSchema } from './data'; |
| | | import Form from './modules/form.vue'; |
| | | import SaleOrderPrint from './modules/print.vue'; |
| | | import SalesNoticeForm from '#/views/wls/salesnotice/modules/form.vue'; |
| | | |
| | | /** ERP 销售订单列表 */ |
| | |
| | | formModalApi.setData({ formType: 'detail', id: row.id }).open(); |
| | | } |
| | | |
| | | /** 打印/导出销售订单详情,供企业盖章留存 */ |
| | | const printRef = ref<InstanceType<typeof SaleOrderPrint>>(); |
| | | function handlePrint(row: ErpSaleOrderApi.SaleOrder) { |
| | | printRef.value?.print(row.id!); |
| | | } |
| | | |
| | | /** 查看关联合同 */ |
| | | function handleViewContract(row: ErpSaleOrderApi.SaleOrder) { |
| | | if (row.contractId) { |
| | |
| | | <Page auto-content-height> |
| | | <FormModal @success="handleRefresh" /> |
| | | <SalesNoticeFormModal /> |
| | | <SaleOrderPrint ref="printRef" /> |
| | | <Grid table-title="销售订单列表"> |
| | | <template #toolbar-tools> |
| | | <TableAction |
| | |
| | | onClick: handleDetail.bind(null, row), |
| | | }, |
| | | { |
| | | label: '打印', |
| | | type: 'link', |
| | | icon: 'lucide:printer', |
| | | auth: ['erp:sale-order:query'], |
| | | onClick: handlePrint.bind(null, row), |
| | | }, |
| | | { |
| | | label: $t('common.edit'), |
| | | type: 'link', |
| | | icon: ACTION_ICON.EDIT, |
| | |
| | | type: 'link', |
| | | icon: 'ant-design:file-protect-outlined', |
| | | auth: ['mes:wm-sales-notice:create'], |
| | | ifShow: () => row.status === 20 && row.canCreateSalesNotice, |
| | | ifShow: () => row.status === 20 && !!row.canCreateSalesNotice, |
| | | onClick: handleGenerateNotice.bind(null, row), |
| | | }, |
| | | { |