| | |
| | | const state = reactive({
|
| | | selectedRowKeys: [],
|
| | | loading: false,
|
| | | orderType: 1
|
| | | });
|
| | |
|
| | | let tableData = ref([]);
|
| | |
| | | ...getColumnSearchProps('orderNo'),
|
| | | },
|
| | | {
|
| | | title: formatMessage('db.man_order_log.order_type', '单据类型'),
|
| | | dataIndex: 'orderType$',
|
| | | width: 140,
|
| | | ellipsis: true,
|
| | | ...getColumnSearchProps('orderType$'),
|
| | | },
|
| | | {
|
| | | title: formatMessage('db.man_order_detl.mat_id', '物料'),
|
| | | dataIndex: 'matId$',
|
| | | width: 140,
|
| | | ellipsis: true,
|
| | | ...getColumnSearchProps('matId$'),
|
| | | },
|
| | | {
|
| | | title: formatMessage('db.man_order_detl.maktx', '物料名称'),
|
| | | dataIndex: 'maktx',
|
| | | width: 140,
|
| | | ellipsis: true,
|
| | | ...getColumnSearchProps('maktx'),
|
| | | },
|
| | | {
|
| | | title: formatMessage('db.man_order_detl.anfme', '数量'),
|
| | | dataIndex: 'anfme',
|
| | | width: 140,
|
| | |
| | | ellipsis: true,
|
| | | ...getColumnSearchProps('workQty'),
|
| | | },
|
| | | {
|
| | | title: formatMessage('db.man_order_detl.mat_id', '物料'),
|
| | | dataIndex: 'matId$',
|
| | | width: 140,
|
| | | ellipsis: true,
|
| | | ...getColumnSearchProps('matId$'),
|
| | | },
|
| | |
|
| | | {
|
| | | title: formatMessage('db.man_order_detl.batch', '批号'),
|
| | | dataIndex: 'batch',
|
| | |
| | |
|
| | | function getPage() {
|
| | | state.loading = true;
|
| | |
|
| | | post('/api/orderDetl/page', {
|
| | | current: currentPage,
|
| | | pageSize: pageSize,
|
| | | orderType: state.orderType,
|
| | | condition: searchInput.value
|
| | | }).then((resp) => {
|
| | | let result = resp.data;
|
| | |
| | | <div>
|
| | | <EditView ref="editChild" @tableReload="handleTableReload" />
|
| | | <div class="table-header">
|
| | | <a-input-search v-model:value="searchInput" :placeholder="formatMessage('page.input', '请输入')"
|
| | | style="width: 200px;" @search="onSearch" />
|
| | | <div>
|
| | | <a-select v-model:value="state.orderType" :placeholder="formatMessage('page.locDetl.orderNo.input', '请选择单据类型')"
|
| | | :options="[
|
| | | { label: '手动入库单', value: 1 }, { label: '手动出库单', value: 2 },]" style="width: 160px;margin: 0 10px;">
|
| | | </a-select>
|
| | | <a-input-search v-model:value="searchInput" :placeholder="formatMessage('page.input', '请输入')"
|
| | | style="width: 200px;" @search="onSearch" />
|
| | | </div>
|
| | | <div class="table-header-right">
|
| | | <a-button @click="handleEdit(null)" type="primary">{{ formatMessage('page.add', '添加') }}</a-button>
|
| | | <a-button @click="handleExport">{{ formatMessage('page.export', '导出') }}</a-button>
|
| | |
| | | <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" @resizeColumn="handleResizeColumn" :loading="state.loading">
|
| | | :scroll="{ y: 768, scrollToFirstRowOnChange: true }" :columns="columns" @resizeColumn="handleResizeColumn"
|
| | | :loading="state.loading">
|
| | | <template #bodyCell="{ column, text, record }">
|
| | | <template v-if="column.dataIndex === 'oper'">
|
| | | <div style="display: flex;justify-content: space-evenly;">
|
| | | <a-button type="link" primary @click="handleEdit(record)">{{ formatMessage('page.edit', '编辑') }}</a-button>
|
| | | <a-button type="link" danger @click="handleDel([record])">{{ formatMessage('page.delete', '删除')
|
| | | }}</a-button>
|
| | | }}</a-button>
|
| | | </div>
|
| | | </template>
|
| | | </template>
|