| | |
| | | import EditView from './edit.vue' |
| | | import {formatMessage} from '@/utils/localeUtils.js'; |
| | | import useTableSearch from '@/utils/tableUtils.jsx'; |
| | | import MatPrint from '@/components/print/matPrint/index.vue'; |
| | | import { |
| | | DownOutlined, |
| | | UploadOutlined, |
| | |
| | | model: null, |
| | | }) |
| | | const editChild = ref(null) |
| | | const printChild = ref(null); |
| | | |
| | | const state = reactive({ |
| | | selectedRowKeys: [], |
| | |
| | | } |
| | | }; |
| | | |
| | | const handlePrint = () => { |
| | | if (state.selectedRowKeys.length == 0) { |
| | | message.warning(formatMessage('common.select', '请选择')); |
| | | return; |
| | | } |
| | | let data = tableData.value.records; |
| | | let tmp = []; |
| | | data.forEach((item) => { |
| | | if (state.selectedRowKeys.indexOf(item.id) != -1) { |
| | | tmp.push(item); |
| | | } |
| | | }) |
| | | |
| | | printChild.value.printData = tmp; |
| | | printChild.value.open = true; |
| | | } |
| | | |
| | | </script> |
| | | |
| | | <script> |
| | |
| | | <DownOutlined/> |
| | | </a-button> |
| | | </a-dropdown> |
| | | <a-button @click="handlePrint()" type="primary"> |
| | | {{ formatMessage('db.man_zpallet_barcode.batchPrint', '批量打印') }} |
| | | </a-button> |
| | | <a-button @click="handleEdit(null)" type="primary">{{ formatMessage('page.add', '添加') }}</a-button> |
| | | <a-button @click="handleExport">{{ formatMessage('page.export', '导出') }}</a-button> |
| | | </div> |
| | |
| | | </template> |
| | | </a-table> |
| | | </div> |
| | | |
| | | <MatPrint ref="printChild" /> |
| | | </template> |
| | | |
| | | <style></style> |