| | |
| | | |
| | | const { |
| | | getColumnSearchProps, |
| | | handleResizeColumn, |
| | | } = useTableSearch(); |
| | | |
| | | const columns = [ |
| | |
| | | }; |
| | | |
| | | function getPage() { |
| | | post(props.ioModel == 'in' ? '/api/order/in/page' : '/api/order/out/page', { |
| | | let apiUrl = '/api/order/page'; |
| | | if (props.ioModel == 'in') { |
| | | apiUrl = '/api/order/in/page'; |
| | | } else if (props.ioModel == 'out') { |
| | | apiUrl = '/api/order/out/page'; |
| | | } |
| | | |
| | | post(apiUrl, { |
| | | current: currentPage, |
| | | pageSize: pageSize, |
| | | condition: searchInput.value, |
| | |
| | | } |
| | | |
| | | const handleExport = async (intl) => { |
| | | postBlob('/api/order/export', {}).then(result => { |
| | | postBlob('/api/order/export', { |
| | | ioModel: props.ioModel |
| | | }).then(result => { |
| | | const blob = new Blob([result.data], { type: 'application/vnd.ms-excel' }); |
| | | window.location.href = window.URL.createObjectURL(blob); |
| | | return true; |
| | |
| | | |
| | | <template> |
| | | <div> |
| | | <EditView ref="editChild" @tableReload="handleTableReload" :ioModel="ioModel == 'in' ? 1 : 2" /> |
| | | <EditView ref="editChild" @tableReload="handleTableReload" :ioModel="ioModel == 'in' ? 1 : ioModel == 'out' ? 2 : null" /> |
| | | <div class="table-header"> |
| | | <a-input-search v-model:value="searchInput" :placeholder="formatMessage('page.input', '请输入')" |
| | | style="width: 200px;" @search="onSearch" /> |
| | |
| | | <a-table :row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }" |
| | | :data-source="tableData.records" :defaultExpandAllRows="false" :key="TABLE_KEY" rowKey="id" |
| | | :pagination="{ total: tableData.total, onChange: onPageChange }" |
| | | :scroll="{ y: 768, scrollToFirstRowOnChange: true }" :columns="columns"> |
| | | :scroll="{ y: 768, scrollToFirstRowOnChange: true }" :columns="columns" @resizeColumn="handleResizeColumn"> |
| | | <template #bodyCell="{ column, text, record }"> |
| | | <template v-if="column.dataIndex === 'oper'"> |
| | | <div style="display: flex;justify-content: space-evenly;"> |