列表优化

hwork-master
齐慧慧 2025-11-07 16:34:20 +08:00
parent d92a44e67f
commit b602266648
72 changed files with 3080 additions and 2453 deletions

View File

@ -341,7 +341,7 @@ html {
.fixedHeader.muiltTab { .fixedHeader.muiltTab {
z-index: 600; z-index: 600;
#content { #content {
height: calc(~"(100% - 38px)"); height: calc(~"(100% - 42px)");
-ms-overflow-style: none; -ms-overflow-style: none;
overflow: -moz-scrollbars-none; overflow: -moz-scrollbars-none;
} }
@ -436,4 +436,4 @@ html {
overflow: hidden; overflow: hidden;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }

View File

@ -16,8 +16,10 @@ export default defineComponent({
name: 'ATable', name: 'ATable',
inheritAttrs: false, inheritAttrs: false,
setup(_, { attrs, slots }) { setup(_, { attrs, slots }) {
const patchedColumns = patchColumns(attrs.columns); // 每次渲染时基于最新的 columns 重新打补丁,确保列显示/隐藏等变更能够生效
return () => h(Table, { ...attrs, columns: patchedColumns }, slots); return () => {
const patchedColumns = patchColumns(attrs.columns);
return h(Table, { ...attrs, columns: patchedColumns }, slots);
};
}, },
}); });

View File

@ -8,7 +8,6 @@
.pro-table-next { .pro-table-next {
float: right; float: right;
.ant-btn { .ant-btn {
margin: 4px;
margin-bottom: 8px; margin-bottom: 8px;
} }
} }

View File

@ -1,14 +1,22 @@
<template> <template>
<div id="pro-table"> <div id="pro-table">
<!-- 表格工具栏 --> <!-- 表格工具栏 -->
<div class="pro-table-tool"> <div class="pro-table-tool" :style="proTableToolStyle">
<!-- 自定义工具栏 --> <!-- 自定义工具栏 -->
<div class="pro-table-prev"> <div class="pro-table-prev" >
<template :key="index" v-for="(item, index) in toolbar"> <!-- 将工具栏改为合并后的 mergedToolbar包含外部传入与内置的 打印/导出 按钮 -->
<template :key="index" v-for="(item, index) in mergedToolbar">
<!-- 更多按钮 --> <!-- 更多按钮 -->
<pro-authority :value="item.code ? item.code : false" v-if="item.children && item.children.length > 0"> <pro-authority :value="item.code ? item.code : false" v-if="item.children && item.children.length > 0">
<a-dropdown> <a-dropdown>
<a-button @click="item.event(selectedRowKeys)">{{ item.label }}</a-button> <!-- 支持 danger icon 插槽 -->
<a-button :danger="item.danger === true || item.type === 'danger'"
@click="item.event(selectedRowKeys)">
<template v-if="item.icon" #icon>
<component :is="item.icon" />
</template>
{{ item.label }}
</a-button>
<template #overlay> <template #overlay>
<a-menu> <a-menu>
<!-- 遍历子集 --> <!-- 遍历子集 -->
@ -22,69 +30,26 @@
</a-dropdown> </a-dropdown>
</pro-authority> </pro-authority>
<pro-authority :value="item.code ? item.code : false" v-else> <pro-authority :value="item.code ? item.code : false" v-else>
<a-button <a-button size="small"
:type="item.type&&['primary','ghost','dashed','link','text','default'].includes(item.type) ? item.type : index == 0 ? 'primary' : 'default'" :type="item.type&&['primary','ghost','dashed','link','text','default',].includes(item.type) ? item.type : 'default'"
:danger="item.danger === true || item.type === 'danger'"
@click="item.event(selectedRowKeys)" :style="item.style ?? ''"> @click="item.event(selectedRowKeys)" :style="item.style ?? ''">
<template v-if="item.icon" #icon>
<component :is="item.icon" />
</template>
{{ item.label }} {{ item.label }}
</a-button> </a-button>
</pro-authority> </pro-authority>
</template> </template>
</div> </div>
<!-- 默认工具栏 --> <!-- 默认工具栏使用 Antd a-table-settings 呈现列设置 + 行高并保留刷新按钮 -->
<div class="pro-table-next" v-if="defaultToolbar"> <div class="pro-table-next" v-if="defaultToolbar">
<!-- 刷新工具栏 --> <a-table-settings v-model:columns="columnsModel" :sizeOptions="[]" size="small"/>
<a-button @click="reload"> <!-- <a-button @click="reload" style="margin-left: 8px">
<template #icon> <template #icon>
<SyncOutlined /> <SyncOutlined />
</template> </template>
</a-button> </a-button> -->
<!-- 过滤工具栏 -->
<a-dropdown>
<a-button>
<template #icon>
<AppstoreOutlined />
</template>
</a-button>
<template #overlay>
<a-menu class="filtration">
<a-checkbox-group v-model:value="filtrationColumnKeys" @change="filtration">
<a-row>
<!-- 遍历字段 -->
<a-col :span="24" :key="index" v-for="(filtrationColumn, index) in filtrationColumns">
<a-checkbox :value="filtrationColumn.value">
{{ filtrationColumn.label }}
</a-checkbox>
</a-col>
</a-row>
</a-checkbox-group>
</a-menu>
</template>
</a-dropdown>
<!-- 过滤工具栏 -->
<a-dropdown>
<a-button><template #icon>
<ColumnHeightOutlined />
</template></a-button>
<template #overlay>
<a-menu :selectedKeys="[size]">
<a-menu-item @click="changeSize('default')" key="default">默认尺寸</a-menu-item>
<a-menu-item @click="changeSize('middle')" key="middle">中等尺寸</a-menu-item>
<a-menu-item @click="changeSize('small')" key="small">最小尺寸</a-menu-item>
</a-menu>
</template>
</a-dropdown>
<!--打印按钮-->
<a-button @click="print">
<template #icon>
<ExportOutlined />
</template>
</a-button>
<!--excel导出按钮-->
<a-button @click="ExportExcel">
<template #icon>
<CloudDownloadOutlined />
</template>
</a-button>
</div> </div>
</div> </div>
<!--数据导出栏--> <!--数据导出栏-->
@ -94,14 +59,14 @@
:pagination="exportExcelPagination" style="display: none"> :pagination="exportExcelPagination" style="display: none">
</a-table> </a-table>
<!-- 表格组件 --> <!-- 表格组件 -->
<a-table id="table" :rowKey="rowKey" @change="fetch" :columns="columns" :loading="loading" :pagination="pagination" <a-table id="table" :rowKey="rowKey" @change="fetch" :columns="columnsModel" :loading="loading" :pagination="pagination"
:dataSource="datasource" :row-selection="rowSelection" :dataSource="datasource" :row-selection="rowSelection"
:row-height="100" :customRow="rowClick" :sortDirections="['descend', 'ascend', '']" :row-height="100" :customRow="rowClick" :sortDirections="['descend', 'ascend', '']"
:rowClassName="setRowClassName" @resizeColumn="handleResizeColumn" bordered> :rowClassName="setRowClassName" @resizeColumn="handleResizeColumn">
<!--列搜索组件封装--> <!--列搜索组件封装-->
<template #filterDropdown="{ setSelectedKeys, selectedKeys, confirm, clearFilters, column }"> <template #filterDropdown="{ setSelectedKeys, selectedKeys, confirm, clearFilters, column }">
<div style="padding: 8px"> <div style="padding: 8px">
<a-input ref="searchInput" :placeholder="`Search ${column.dataIndex}`" :value="selectedKeys[0]" <a-input ref="searchInput" :placeholder="'请输入'" :value="selectedKeys[0]"
style="width: 188px; margin-bottom: 8px; display: block" style="width: 188px; margin-bottom: 8px; display: block"
@change="(e) => { @change="(e) => {
setSelectedKeys(e.target.value ? [e.target.value] : []); setSelectedKeys(e.target.value ? [e.target.value] : []);
@ -114,7 +79,7 @@
</template> </template>
搜索 搜索
</a-button> </a-button>
<a-button size="small" style="width: 90px" @click="handleReset(clearFilters)"></a-button> <a-button size="small" style="width: 90px" @click="handleReset(clearFilters, setSelectedKeys, column.dataIndex, confirm)">重置</a-button>
</div> </div>
</template> </template>
<!--列过滤组件封装--> <!--列过滤组件封装-->
@ -162,7 +127,11 @@
</template> </template>
<!-- 表格内容单元格插槽 --> <!-- 表格内容单元格插槽 -->
<template #bodyCell="{ column, record }"> <template #bodyCell="{ column, record, index }">
<!-- 序号 -->
<template v-if="column.dataIndex === 'index'">
{{ index + 1 }}
</template>
<!-- 行操作 --> <!-- 行操作 -->
<template v-if="column.dataIndex === 'operate'"> <template v-if="column.dataIndex === 'operate'">
<template :key="i" v-for="(item, i) in operate"> <template :key="i" v-for="(item, i) in operate">
@ -186,7 +155,7 @@
<pro-authority :value="item.code ? item.code : false" v-else> <pro-authority :value="item.code ? item.code : false" v-else>
<a-popconfirm v-if="item.isDel" title="确认删除?" ok-text="" cancel-text="" <a-popconfirm v-if="item.isDel" title="确认删除?" ok-text="" cancel-text=""
@confirm="item.delEvent(record)" @cancel="item.cancelEvent(record)"> @confirm="item.delEvent(record)" @cancel="item.cancelEvent(record)">
<a href="#">删除</a> <a-button type="text" danger >{{ item.label || '删除' }}</a-button>
</a-popconfirm> </a-popconfirm>
<div style="display: inline-block" v-else> <div style="display: inline-block" v-else>
<a @click="item.event(record)"> {{ item.label }} </a> <a @click="item.event(record)"> {{ item.label }} </a>
@ -234,6 +203,11 @@
<a-image :width="column.image.width" :src="record[column.dataIndex]" /> <a-image :width="column.image.width" :src="record[column.dataIndex]" />
</template> </template>
<!-- 右对齐数字列千位分隔格式化显示 -->
<template v-else-if="column.align === 'right'">
{{ formatNumber(record[column.dataIndex]) }}
</template>
<!-- 原样输出 --> <!-- 原样输出 -->
<template v-else> <template v-else>
{{ record[column.dataIndex] }} {{ record[column.dataIndex] }}
@ -299,19 +273,16 @@
onMounted, onMounted,
reactive, reactive,
toRefs, toRefs,
toRef,
watch, watch,
ref, ref,
nextTick, nextTick,
computed computed
} from "vue"; } from "vue";
import { import {
AppstoreOutlined,
ExportOutlined,
SyncOutlined, SyncOutlined,
UserOutlined, UserOutlined,
ColumnHeightOutlined,
SearchOutlined, SearchOutlined,
CloudDownloadOutlined,
} from "@ant-design/icons-vue"; } from "@ant-design/icons-vue";
//table //table
const searchInput = ref(); const searchInput = ref();
@ -323,9 +294,6 @@
name: "pro-table", name: "pro-table",
currentRowI: 999, currentRowI: 999,
components: { components: {
ColumnHeightOutlined,
AppstoreOutlined,
ExportOutlined,
SyncOutlined, SyncOutlined,
UserOutlined, UserOutlined,
SearchOutlined, SearchOutlined,
@ -348,10 +316,29 @@
type: Array, type: Array,
required: true, required: true,
}, },
/// ///
toolbar: { toolbar: {
type: Array, type: Array,
}, },
/// columns index
autoIndex: {
type: Boolean,
default: false,
},
///
hasSearch: {
type: Boolean,
default: true,
},
///
showPrint: {
type: Boolean,
default: true,
},
showExport: {
type: Boolean,
default: true,
},
defaultToolbar: { defaultToolbar: {
type: Boolean, type: Boolean,
default: true, default: true,
@ -404,9 +391,9 @@
//excel //excel
exportExcelPagination: { exportExcelPagination: {
pageNum: 1, pageNum: 1,
pageSize: 1000 pageSize: 2000
}, // }, //
columns: props.columns, // columns: props.columns, // a-table-settings v-model:columns
filtrationColumnKeys: [], // filtrationColumnKeys: [], //
selectedRowKeys: [], // selectedRowKeys: [], //
size: "small", // size: "small", //
@ -417,17 +404,104 @@
}); });
/// ///
if (props.operate != false) { // autoIndex
let operateSize = props.operate.length * 70; const hasIndexCol = (cols) => (cols || []).some(col => col && (col.dataIndex === 'index' || col.key === 'index'))
state.columns.push({ if (props.autoIndex && !hasIndexCol(state.columns)) {
dataIndex: "operate", state.columns.unshift({
key: "operate", dataIndex: 'index',
title: "操作", key: 'index',
fixed: "right", title: '序号',
width: operateSize, width: 60,
}); fixed: 'left',
align: 'center',
customRender: ({ index }) => {
try {
if (state.pagination !== false) {
const current = Number(state.pagination.current || state.pagination.pageNum || 1)
const pageSize = Number(state.pagination.pageSize || 20)
return (current - 1) * pageSize + index + 1
}
} catch (e) {}
return index + 1
},
})
} }
if (props.operate != false) {
//
const estimateOperateWidth = () => {
const items = Array.isArray(props.operate) ? props.operate : []
// children
const powerList = (store.getters && store.getters.power) ? store.getters.power : []
const isVisible = (it) => {
if (!it) return false
if (!it.code) return true
return powerList.indexOf(it.code) !== -1
}
const visible = items.filter(it => isVisible(it))
// 使 canvas
const getTextWidth = (text) => {
try {
const canvas = document.createElement('canvas')
const ctx = canvas.getContext('2d')
if (!ctx) return 0
ctx.font = '14px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans"'
return Math.ceil(ctx.measureText(String(text || '')).width)
} catch (e) {
return (String(text || '').length) * 14
}
}
// + 16
const itemsWidth = visible.reduce((acc, it) => acc + getTextWidth(it.label || '') + 16, 0)
// 线 12px * (n-1)
const sepWidth = visible.length > 1 ? (visible.length - 1) * 12 : 0
//
const padding = 12
const total = padding + itemsWidth + sepWidth + padding
//
return Math.min(Math.max(total, 96), 260)
}
const operateCol = {
dataIndex: 'operate',
key: 'operate',
title: '操作',
fixed: 'right',
width: estimateOperateWidth(),
}
state.columns.push(operateCol)
// /
const recompute = () => {
const idx = state.columns.findIndex(c => c.dataIndex === 'operate')
if (idx !== -1) state.columns[idx].width = estimateOperateWidth()
}
// operate
watch(() => store.getters && store.getters.power, recompute)
watch(() => props.operate, recompute, { deep: true })
}
// props.showPrint / props.showExport
const builtinPrevToolbar = () => {
const items = [];
if (props.showPrint) {
items.push({ label: "打印", event: print, icon: 'PrinterOutlined' });
}
if (props.showExport) {
items.push({ label: "导出", event: ExportExcel, icon: 'CloudDownloadOutlined' });
}
return items;
};
// toolbar
const mergedToolbar = computed(() => {
const ext = Array.isArray(props.toolbar) ? props.toolbar : [];
return [...ext, ...builtinPrevToolbar()];
});
//
const proTableToolStyle = computed(() => (props.hasSearch ? {} : { paddingTop: '16px' }));
/** /**
* 从服务端获取下拉字典数据并对数据进行格式化 * 从服务端获取下拉字典数据并对数据进行格式化
* @param code 字典值 * @param code 字典值
@ -505,13 +579,17 @@
column.filtered = false; column.filtered = false;
if (column.dictionary) { if (column.dictionary) {
// //
state.filterColumnsIndex.push(column.index); state.filterColumnsIndex.push(column.dataIndex);
column.filters = dict; column.filters = dict;
column.filterSearch = true; column.filterSearch = true;
} }
// column.slots // +
column.slots = Object.assign({}, column.slots || {}, {
filterDropdown: 'filterDropdown',
filterIcon: 'filterIcon'
})
} }
// column.slots // showSearch / column.slots
}); });
/// ///
@ -529,6 +607,11 @@
state.columns = props.columns.filter((item) => value.includes(item.key)); state.columns = props.columns.filter((item) => value.includes(item.key));
state.filtrationColumnKeys = value; state.filtrationColumnKeys = value;
}; };
// a-table-settings v-model
const columnsModel = toRef(state, 'columns');
// visibleColumns display=false
// columnsModel a-table display
//table //table
const handleResizeColumn = function(w, col) { const handleResizeColumn = function(w, col) {
console.log("handleResizeColumn") console.log("handleResizeColumn")
@ -592,27 +675,32 @@
} }
}; };
/// /// UI
const handleReset = (clearFilters) => { const handleReset = (clearFilters, setSelectedKeys, dataIndex, confirm) => {
console.log("列搜索条件重置") console.log("列搜索条件重置")
state.columnSearchParams = {}; // UI
if (typeof setSelectedKeys === 'function') setSelectedKeys([])
//
if (dataIndex) {
const { [dataIndex]: _, ...rest } = state.columnSearchParams
state.columnSearchParams = rest
} else {
state.columnSearchParams = {}
}
// //
if (state.filterColumnsIndex.length > 0) { if (state.filterColumnsIndex.length > 0) {
state.filterColumnsIndex.forEach((columnIndex) => { state.filterColumnsIndex.forEach((columnIndex) => {
// //
const index = state.columns.findIndex(item => item === columnIndex); const index = state.columns.findIndex(item => item.dataIndex === columnIndex);
if (index != -1) { if (index != -1) {
state.columns[index].filtered = false; state.columns[index].filtered = false;
} }
}); });
state.filterColumnsIndex = [] state.filterColumnsIndex = []
} }
// state.columns.forEach((value, index) => { // antd
// if(value.filtered&&value.filtered==true){ if (typeof clearFilters === 'function') clearFilters()
// value.filtered = false; if (typeof confirm === 'function') confirm()
// }
// });
clearFilters();
fetchData(); fetchData();
}; };
@ -626,6 +714,19 @@
return str.replace(/([a-z])([A-Z])/g, '$1_$2').toLowerCase(); return str.replace(/([a-z])([A-Z])/g, '$1_$2').toLowerCase();
} }
//
const formatNumber = function(val) {
if (val === null || val === undefined || val === '') return ''
if (typeof val === 'string' && val.trim() === '-') return val
const raw = String(val).replace(/,/g, '')
if (!/^[-+]?\d*(\.\d+)?$/.test(raw)) return val
const negative = raw.startsWith('-')
const numStr = negative ? raw.slice(1) : raw
const [intPart, decPart] = numStr.split('.')
const intWithSep = intPart.replace(/\B(?=(\d{3})+(?!\d))/g, ',')
return (negative ? '-' : '') + intWithSep + (decPart ? '.' + decPart : '')
}
/// ///
const fetchData = async (pagination, filters, sorter) => { const fetchData = async (pagination, filters, sorter) => {
console.log("filters 列过滤条件", filters) console.log("filters 列过滤条件", filters)
@ -832,17 +933,24 @@
onSelectChange, onSelectChange,
/// ///
changeSize, changeSize,
/// /// /
print, print,
ExportExcel, ExportExcel,
///
mergedToolbar,
proTableToolStyle,
columnsModel,
slotsData, slotsData,
handleReset, handleReset,
handleSearch, handleSearch,
setSelectedKeysOnChange, setSelectedKeysOnChange,
changeFilteredStatus, changeFilteredStatus,
onShowSizeChange onShowSizeChange,
//
formatNumber
}; };
}, },

View File

@ -424,7 +424,4 @@ export default {
float: right; float: right;
margin-right: 15px; margin-right: 15px;
} }
.ant-drawer-body{
padding: 10px!important;
}
</style> </style>

View File

@ -40,6 +40,7 @@ export default {
/// ///
const columns = [ const columns = [
{ dataIndex: "index", key: "index", title: "序号", width: 60, fixed: 'left', align: 'center' },
{ dataIndex: "title", key: "title", title: "公告标题" }, { dataIndex: "title", key: "title", title: "公告标题" },
{ dataIndex: "content", key: "content", title: "公告内容" }, { dataIndex: "content", key: "content", title: "公告内容" },
{ dataIndex: "createName", key: "createName", title: "发布人" }, { dataIndex: "createName", key: "createName", title: "发布人" },
@ -106,7 +107,11 @@ export default {
/// ///
const pagination = { const pagination = {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 20,
showSizeChanger: true, //
pageSizeOptions: ["10", "20", "50", "100"], //
showTotal: total => `${total} 条记录`, //
showSizeChange: (current, pageSize) => (this.pageSize = pageSize) //
} }
/// - , fetch /// - , fetch

View File

@ -1,344 +1,349 @@
<template> <template>
<page-layout> <a-list-layout>
<a-row :gutter="[10, 10]">
<!-- 顶部区域 --> <!-- 查询参数 -->
<a-col :span="24"> <template #search>
<a-card> <pro-query :searchParam="searchParam" @on-search="search"></pro-query>
<!-- 查询参数 --> </template>
<pro-query :searchParam="searchParam" @on-search="search"></pro-query> <!-- 列表 -->
</a-card> <pro-table ref="tableRef" :fetch="fetch" :columns="columns" :toolbar="toolbar" :operate="operate"
</a-col> :param="state.param" :pagination="pagination"
<!-- 中心区域 --> :row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
<a-col :span="24"> <!-- 继承至 a-table 的默认插槽 -->
<a-card> </pro-table>
<!-- 列表 -->
<pro-table ref="tableRef" :fetch="fetch" :columns="columns" :toolbar="toolbar" :operate="operate"
:param="state.param" :pagination="pagination"
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
<!-- 继承至 a-table 的默认插槽 -->
</pro-table>
</a-card>
</a-col>
</a-row>
<save :visible="state.visibleSave" @close="closeSave"></save> <save :visible="state.visibleSave" @close="closeSave"></save>
<addConfig :visible="state.visibleAddConfig" @close="closeAddConfig"></addConfig> <addConfig :visible="state.visibleAddConfig" @close="closeAddConfig"></addConfig>
<edit :visible="state.visibleEdit" @close="closeEdit" :record="state.recordEdit"></edit> <edit :visible="state.visibleEdit" @close="closeEdit" :record="state.recordEdit"></edit>
<info :visible="state.visibleInfo" @close="closeInfo" :record="state.recordInfo"></info> <info :visible="state.visibleInfo" @close="closeInfo" :record="state.recordInfo"></info>
</page-layout> </a-list-layout>
</template> </template>
<script> <script>
import save from './modal/save.vue'; import save from './modal/save.vue';
import addConfig from './modal/addConfig.vue'; import addConfig from './modal/addConfig.vue';
import edit from './modal/edit.vue'; import edit from './modal/edit.vue';
import info from './modal/info.vue'; import info from './modal/info.vue';
import { import {
message, message,
Modal as modal Modal as modal
} from '@hwork/ant-design-vue'; } from '@hwork/ant-design-vue';
import { import {
ExclamationCircleOutlined ExclamationCircleOutlined
} from '@ant-design/icons-vue'; } from '@ant-design/icons-vue';
import { import {
page, page,
remove, remove,
removeBatch removeBatch
} from "@/api/module/config"; } from "@/api/module/config";
import { import {
reactive, reactive,
createVNode, createVNode,
ref ref
} from 'vue'; } from 'vue';
const removeKey = "remove"; const removeKey = "remove";
const removeBatchKey = "removeBatch"; const removeBatchKey = "removeBatch";
export default { export default {
components: { components: {
save, save,
addConfig, addConfig,
edit, edit,
info, info,
},
setup() {
const tableRef = ref()
const switchFormat = {
yes: true,
no: false
};
const columns = [{
dataIndex: "index",
key: "index",
title: "序号",
width: 60,
fixed: 'left',
align: 'center'
}, },
setup() { {
dataIndex: "parentCode",
const tableRef = ref() key: "parentCode",
title: "组名",
const switchFormat = { width: 180,
yes: true, },
no: false {
}; dataIndex: "code",
key: "code",
const columns = [{ title: "配置编号",
dataIndex: "parentCode", width: 180,
key: "parentCode", },
title: "组名", {
width: 180, dataIndex: "value",
}, key: "value",
{ title: "值",
dataIndex: "code", width: 200,
key: "code", },
title: "配置编号", {
width: 180, dataIndex: "name",
}, key: "name",
{ title: "配置描述",
dataIndex: "value", width: 300,
key: "value", },
title: "值", {
width: 200, dataIndex: "valueType",
}, key: "valueType",
{ title: "值类型",
dataIndex: "name", dictionary: {
key: "name", type: 'tag',
title: "配置描述", code: 'valueType'
width: 300, },
}, width: 100,
{ },
dataIndex: "valueType", {
key: "valueType", dataIndex: "collectionType",
title: "值类型", key: "collectionType",
dictionary: { title: "集合类型",
type: 'tag', dictionary: {
code: 'valueType' type: 'tag',
}, code: 'collectionType'
width: 100, },
}, width: 100,
{ },
dataIndex: "collectionType", {
key: "collectionType", dataIndex: "enable",
title: "集合类型", key: "enable",
dictionary: { title: "状态",
type: 'tag', switch: switchFormat,
code: 'collectionType' width: 100,
}, },
width: 100, {
}, dataIndex: "remark",
{ key: "remark",
dataIndex: "enable", title: "描述",
key: "enable", width: 100,
title: "状态", },
switch: switchFormat, {
width: 100, dataIndex: "createTime",
}, key: "createTime",
{ title: "创建时间",
dataIndex: "remark", width: 180,
key: "remark", },
title: "描述", {
width: 100, dataIndex: "updateTime",
}, key: "updateTime",
{ title: "修改时间",
dataIndex: "createTime", width: 180,
key: "createTime", },
title: "创建时间", ];
width: 180,
},
{
dataIndex: "updateTime",
key: "updateTime",
title: "修改时间",
width: 180,
},
];
///
const fetch = async (param) => {
var response = await page(param);
return {
total: response.data.total,
data: response.data.record,
};
};
///
const removeMethod = (record) => {
modal.confirm({
title: '您是否确定要删除此配置?',
icon: createVNode(ExclamationCircleOutlined),
okText: '确定',
cancelText: '取消',
onOk() {
message.loading({
content: "提交中...",
key: removeKey
});
remove({
"id": record.id
}).then((response) => {
if (response.success) {
message.success({
content: "删除成功",
key: removeKey,
duration: 1
}).then(() => {
tableRef.value.reload()
})
} else {
message.error({
content: "删除失败",
key: removeKey,
duration: 1
})
}
})
}
});
}
const removeBatchMethod = (ids) => {
modal.confirm({
title: '您是否确定要删除选择配置?',
icon: createVNode(ExclamationCircleOutlined),
okText: '确定',
cancelText: '取消',
onOk() {
message.loading({
content: "提交中...",
key: removeBatchKey
});
removeBatch({
"ids": ids
}).then((response) => {
if (response.success) {
message.success({
content: "删除成功",
key: removeBatchKey,
duration: 1
}).then(() => {
tableRef.value.reload()
})
} else {
message.error({
content: "删除失败",
key: removeBatchKey,
duration: 1
})
}
})
}
});
}
///
const toolbar = [{
label: "新增配置信息",
event: function() {
state.visibleAddConfig = true
}
},
{
label: "新增(原始备份)",
event: function() {
state.visibleSave = true
}
},
{
label: "删除",
event: function() {
removeBatchMethod(state.selectedRowKeys)
}
},
];
///
const operate = [{
label: "查看",
event: function(record) {
state.visibleInfo = true, state.recordInfo = record
}
},
{
label: "修改",
event: function(record) {
state.visibleEdit = true, state.recordEdit = record
}
},
{
label: "删除",
event: function(record) {
removeMethod(record)
}
},
];
///
const pagination = {
pageNum: 1,
pageSize: 20,
showSizeChanger: true, //
pageSizeOptions: ["10", "20", "50", "100"], //
showTotal: total => `${total} 条记录`, //
showSizeChange: (current, pageSize) => (this.pageSize = pageSize) //
};
/// - , fetch
const state = reactive({
selectedRowKeys: [],
param: {},
visibleSave: false,
visibleConfig: false,
visibleEdit: false,
visibleInfo: false,
recordInfo: {},
recordEdit: {},
})
const onSelectChange = selectedRowKeys => {
state.selectedRowKeys = selectedRowKeys;
};
///
const searchParam = [{
key: "name",
type: "input",
label: "名称"
},
{
key: "key",
type: "input",
label: "Key"
},
]
///
const search = function(value) {
state.param = value
}
const closeSave = function() {
state.visibleSave = false;
tableRef.value.reload()
}
const closeAddConfig = function() {
state.visibleAddConfig = false;
tableRef.value.reload()
}
const closeEdit = function() {
state.visibleEdit = false;
tableRef.value.reload()
}
const closeInfo = function() {
state.visibleInfo = false;
}
///
const fetch = async (param) => {
var response = await page(param);
return { return {
state, total: response.data.total,
fetch, data: response.data.record,
search,
toolbar,
columns,
operate,
pagination,
searchParam,
onSelectChange,
closeSave,
closeEdit,
closeInfo,
closeAddConfig,
tableRef
}; };
};
///
const removeMethod = (record) => {
modal.confirm({
title: '您是否确定要删除此配置?',
icon: createVNode(ExclamationCircleOutlined),
okText: '确定',
cancelText: '取消',
onOk() {
message.loading({
content: "提交中...",
key: removeKey
});
remove({
"id": record.id
}).then((response) => {
if (response.success) {
message.success({
content: "删除成功",
key: removeKey,
duration: 1
}).then(() => {
tableRef.value.reload()
})
} else {
message.error({
content: "删除失败",
key: removeKey,
duration: 1
})
}
})
}
});
}
const removeBatchMethod = (ids) => {
modal.confirm({
title: '您是否确定要删除选择配置?',
icon: createVNode(ExclamationCircleOutlined),
okText: '确定',
cancelText: '取消',
onOk() {
message.loading({
content: "提交中...",
key: removeBatchKey
});
removeBatch({
"ids": ids
}).then((response) => {
if (response.success) {
message.success({
content: "删除成功",
key: removeBatchKey,
duration: 1
}).then(() => {
tableRef.value.reload()
})
} else {
message.error({
content: "删除失败",
key: removeBatchKey,
duration: 1
})
}
})
}
});
}
///
const toolbar = [{
label: "新增配置信息",
icon: 'PlusOutlined',
event: function () {
state.visibleAddConfig = true
}
}, },
}; {
label: "新增(原始备份)",
icon: 'PlusOutlined',
event: function () {
state.visibleSave = true
}
},
{
label: "删除",
icon: 'DeleteOutlined',
danger: true,
event: function () {
removeBatchMethod(state.selectedRowKeys)
}
},
];
///
const operate = [{
label: "查看",
event: function (record) {
state.visibleInfo = true, state.recordInfo = record
}
},
{
label: "修改",
event: function (record) {
state.visibleEdit = true, state.recordEdit = record
}
},
{
label: "删除",
isDel: true,
event: function (record) {
removeMethod(record)
}
},
];
///
const pagination = {
pageNum: 1,
pageSize: 20,
showSizeChanger: true, //
pageSizeOptions: ["10", "20", "50", "100"], //
showTotal: total => `${total} 条记录`, //
showSizeChange: (current, pageSize) => (this.pageSize = pageSize) //
};
/// - , fetch
const state = reactive({
selectedRowKeys: [],
param: {},
visibleSave: false,
visibleConfig: false,
visibleEdit: false,
visibleInfo: false,
recordInfo: {},
recordEdit: {},
})
const onSelectChange = selectedRowKeys => {
state.selectedRowKeys = selectedRowKeys;
};
///
const searchParam = [{
key: "name",
type: "input",
label: "名称"
},
{
key: "key",
type: "input",
label: "Key"
},
]
///
const search = function (value) {
state.param = value
}
const closeSave = function () {
state.visibleSave = false;
tableRef.value.reload()
}
const closeAddConfig = function () {
state.visibleAddConfig = false;
tableRef.value.reload()
}
const closeEdit = function () {
state.visibleEdit = false;
tableRef.value.reload()
}
const closeInfo = function () {
state.visibleInfo = false;
}
return {
state,
fetch,
search,
toolbar,
columns,
operate,
pagination,
searchParam,
onSelectChange,
closeSave,
closeEdit,
closeInfo,
closeAddConfig,
tableRef
};
},
};
</script> </script>

View File

@ -151,7 +151,7 @@
</a-card> </a-card>
</a-col> </a-col>
<a-col span="24"> <a-col span="24">
<a-table :columns="columns" :data-source="datas" style="margin-top: 10px" /> <a-table :columns="columns" :data-source="datas" />
</a-col> </a-col>
</a-row> </a-row>
</a-card> </a-card>
@ -180,7 +180,7 @@
</a-card> </a-card>
</a-col> </a-col>
<a-col span="24"> <a-col span="24">
<a-table :columns="columns" :data-source="datas" style="margin-top: 10px" /> <a-table :columns="columns" :data-source="datas" />
</a-col> </a-col>
</a-row> </a-row>
</a-card> </a-card>

View File

@ -37,6 +37,7 @@ export default {
/// ///
const columns = [ const columns = [
{ dataIndex: "index", key: "index", title: "序号", width: 60, fixed: 'left', align: 'center' },
{ dataIndex: "name", key: "name", title: "名称" }, { dataIndex: "name", key: "name", title: "名称" },
{ dataIndex: "username", key: "username", title: "账户" }, { dataIndex: "username", key: "username", title: "账户" },
{ dataIndex: "password", key: "password", title: "密码" }, { dataIndex: "password", key: "password", title: "密码" },
@ -112,10 +113,14 @@ export default {
]; ];
/// ///
const pagination = { const pagination = {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 20,
} showSizeChanger: true, //
pageSizeOptions: ["10", "20", "50", "100"], //
showTotal: total => `${total} 条记录`, //
showSizeChange: (current, pageSize) => (this.pageSize = pageSize) //
}
/// - , fetch /// - , fetch
const state = reactive({ const state = reactive({

View File

@ -83,14 +83,14 @@ export default {
/// ///
const toolbar = [ const toolbar = [
{ label: "新增", event: function () { state.visibleSave = true } }, { label: "新增", icon: 'PlusOutlined', event: function () { state.visibleSave = true } },
]; ];
/// ///
const operate = [ const operate = [
{ label: "查看", event: function (record) { state.visibleInfo = true, state.recordInfo = record } }, { label: "查看", event: function (record) { state.visibleInfo = true, state.recordInfo = record } },
{ label: "修改", event: function (record) { state.visibleEdit = true, state.recordEdit = record } }, { label: "修改", event: function (record) { state.visibleEdit = true, state.recordEdit = record } },
{ label: "删除", event: function (record) { removeMethod(record) } }, { label: "删除", isDel: true, event: function (record) { removeMethod(record) } },
]; ];
const pagination = false; const pagination = false;

View File

@ -1,266 +1,283 @@
<template> <template>
<div>
<page-header title="数 据 字 典" describe="用 户 Online 列 表,用 于 系 统 在 线 用 户 监 控."></page-header> <a-list-layout>
<page-layout> <template #search>
<a-row :gutter="[10, 10]"> <a-alert message="数据字典用户Online列表用于系统在线用户监控" type="info" style="margin-top: 1px;" />
<a-col :span="12"> </template>
<a-card> <pro-table rowKey="id" ref="tableRef" :fetch="fetch" :columns="columns" :toolbar="toolbar" :operate="operate"
<!-- 列表 --> :param="state.param" :pagination="pagination"
<pro-table rowKey="id" ref="tableRef" :fetch="fetch" :columns="columns" :toolbar="toolbar" :row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
:operate="operate" :param="state.param" :pagination="pagination" </pro-table>
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }"> <!-- 字典数据抽屉容器统一用抽屉承载内部组件负责渲染内容 -->
</pro-table> <a-drawer
</a-card> :visible="state.visibleData"
</a-col> :width="720"
<a-col :span="12"> title="字典数据"
<a-card> destroyOnClose
<dictData :visible="state.visibleData" :record="state.recordData"></dictData> @close="state.visibleData = false"
</a-card> >
</a-col> <dictData :visible="true" :record="state.recordData" @close="state.visibleData = false" />
</a-row> </a-drawer>
</page-layout> </a-list-layout>
<save :visible="state.visibleSave" @close="closeSave"></save> <save :visible="state.visibleSave" @close="closeSave"></save>
<edit :visible="state.visibleEdit" @close="closeEdit" :record="state.recordEdit"></edit> <edit :visible="state.visibleEdit" @close="closeEdit" :record="state.recordEdit"></edit>
</div>
</template> </template>
<script> <script>
import save from './modal/save.vue'; import save from './modal/save.vue';
import edit from './modal/edit.vue'; import edit from './modal/edit.vue';
import data from './modal/data.vue'; import data from './modal/data.vue';
import { import {
message, message,
Modal as modal Modal as modal
} from '@hwork/ant-design-vue'; } from '@hwork/ant-design-vue';
import { import {
ExclamationCircleOutlined ExclamationCircleOutlined
} from '@ant-design/icons-vue'; } from '@ant-design/icons-vue';
import { import {
page, page,
change, change,
remove, remove,
removeBatch removeBatch
} from "@/api/module/dict"; } from "@/api/module/dict";
import { import {
reactive, reactive,
createVNode, createVNode,
ref ref
} from 'vue'; } from 'vue';
const removeKey = "remove"; const removeKey = "remove";
const removeBatchKey = "removeBatch"; const removeBatchKey = "removeBatch";
export default { export default {
components: { components: {
save, save,
edit, edit,
dictData: data, dictData: data,
}, },
setup() { setup() {
const tableRef = ref() const tableRef = ref()
const switchFormat = { const switchFormat = {
yes: true, yes: true,
no: false, no: false,
event: function(value, record) { event: function (value, record) {
// record.enable = !record.enable; // record.enable = !record.enable;
record.enable = value; record.enable = value;
change({ change({
"id": record.id, "id": record.id,
"enable": record.enable "enable": record.enable
}) })
tableRef.value.reload(); tableRef.value.reload();
return record; return record;
// return value; // return value;
}
} }
}
const columns = [ const columns = [
{ {
dataIndex: "code", dataIndex: "index",
key: "code", key: "index",
title: "标识", title: "序号",
width:100 width: 60,
}, fixed: 'left',
{ align: 'center'
dataIndex: "enable", },
key: "enable", {
title: "状态", dataIndex: "code",
width:80, key: "code",
switch: switchFormat title: "标识",
}, width: 150
{ },
dataIndex: "name", {
key: "name", dataIndex: "enable",
title: "名称", key: "enable",
} title: "状态",
]; width: 100,
switch: switchFormat
/// [] },
const fetch = async (param) => { {
var response = await page(param); dataIndex: "name",
return { key: "name",
total: response.data.total, title: "名称",
data: response.data.record,
};
};
///
const removeMethod = (record) => {
modal.confirm({
title: '您是否确定要删除此字典?',
icon: createVNode(ExclamationCircleOutlined),
okText: '确定',
cancelText: '取消',
onOk() {
message.loading({
content: "提交中...",
key: removeKey
});
remove({
"id": record.id
}).then((response) => {
if (response.success) {
message.success({
content: "删除成功",
key: removeKey,
duration: 1
}).then(() => {
tableRef.value.reload()
})
} else {
message.error({
content: "删除失败",
key: removeKey,
duration: 1
})
}
})
}
});
}
///
const removeBatchMethod = (ids) => {
modal.confirm({
title: '您是否确定要删除选择字典?',
icon: createVNode(ExclamationCircleOutlined),
okText: '确定',
cancelText: '取消',
onOk() {
message.loading({
content: "提交中...",
key: removeBatchKey
});
removeBatch({
"ids": ids
}).then((response) => {
if (response.success) {
message.success({
content: "删除成功",
key: removeBatchKey,
duration: 1
}).then(() => {
tableRef.value.reload()
})
} else {
message.error({
content: "删除失败",
key: removeBatchKey,
duration: 1
})
}
})
}
});
}
///
const toolbar = [{
label: "新增",
event: function() {
state.visibleSave = true
}
},
{
label: "删除",
event: function() {
removeBatchMethod(state.selectedRowKeys)
}
},
{
label: "强制更新缓存",
event: function() {
removeBatchMethod(state.selectedRowKeys)
}
},
];
///
const operate = [{
label: "查看",
event: function(record) {
state.visibleData = true, state.recordData = record
}
},
{
label: "修改",
event: function(record) {
state.visibleEdit = true, state.recordEdit = record
},
},
{
label: "删除",
event: function(record) {
removeMethod(record)
}
},
];
const pagination = {
pageNum: 1,
pageSize: 10
};
const state = reactive({
selectedRowKeys: [],
param: {
name: "",
code: ""
},
visibleEdit: false,
visibleSave: false,
visibleData: false,
recordData: {},
recordEdit: {},
});
const onSelectChange = selectedRowKeys => {
state.selectedRowKeys = selectedRowKeys;
};
const closeSave = function() {
state.visibleSave = false
tableRef.value.reload()
}
const closeEdit = function() {
state.visibleEdit = false
tableRef.value.reload()
} }
];
/// []
const fetch = async (param) => {
var response = await page(param);
return { return {
state, total: response.data.total,
fetch, data: response.data.record,
toolbar,
columns,
operate,
closeSave,
closeEdit,
pagination,
onSelectChange,
tableRef
}; };
};
///
const removeMethod = (record) => {
modal.confirm({
title: '您是否确定要删除此字典?',
icon: createVNode(ExclamationCircleOutlined),
okText: '确定',
cancelText: '取消',
onOk() {
message.loading({
content: "提交中...",
key: removeKey
});
remove({
"id": record.id
}).then((response) => {
if (response.success) {
message.success({
content: "删除成功",
key: removeKey,
duration: 1
}).then(() => {
tableRef.value.reload()
})
} else {
message.error({
content: "删除失败",
key: removeKey,
duration: 1
})
}
})
}
});
}
///
const removeBatchMethod = (ids) => {
modal.confirm({
title: '您是否确定要删除选择字典?',
icon: createVNode(ExclamationCircleOutlined),
okText: '确定',
cancelText: '取消',
onOk() {
message.loading({
content: "提交中...",
key: removeBatchKey
});
removeBatch({
"ids": ids
}).then((response) => {
if (response.success) {
message.success({
content: "删除成功",
key: removeBatchKey,
duration: 1
}).then(() => {
tableRef.value.reload()
})
} else {
message.error({
content: "删除失败",
key: removeBatchKey,
duration: 1
})
}
})
}
});
}
///
const toolbar = [{
label: "新增",
icon: 'PlusOutlined',
event: function () {
state.visibleSave = true
}
}, },
}; {
label: "删除",
icon: 'DeleteOutlined',
danger: true,
event: function () {
removeBatchMethod(state.selectedRowKeys)
}
},
{
label: "强制更新缓存",
icon: 'ReloadOutlined',
event: function () {
removeBatchMethod(state.selectedRowKeys)
}
},
];
///
const operate = [{
label: "查看",
event: function (record) {
state.visibleData = true, state.recordData = record
}
},
{
label: "修改",
event: function (record) {
state.visibleEdit = true, state.recordEdit = record
},
},
{
label: "删除",
isDel: true,
event: function (record) {
removeMethod(record)
}
},
];
const pagination = {
pageNum: 1,
pageSize: 20,
showSizeChanger: true, //
pageSizeOptions: ["10", "20", "50", "100"], //
showTotal: total => `${total} 条记录`, //
showSizeChange: (current, pageSize) => (this.pageSize = pageSize) //
};
const state = reactive({
selectedRowKeys: [],
param: {
name: "",
code: ""
},
visibleEdit: false,
visibleSave: false,
visibleData: false,
recordData: {},
recordEdit: {},
});
const onSelectChange = selectedRowKeys => {
state.selectedRowKeys = selectedRowKeys;
};
const closeSave = function () {
state.visibleSave = false
tableRef.value.reload()
}
const closeEdit = function () {
state.visibleEdit = false
tableRef.value.reload()
}
return {
state,
fetch,
toolbar,
columns,
operate,
closeSave,
closeEdit,
pagination,
onSelectChange,
tableRef
};
},
};
</script> </script>

View File

@ -1,5 +1,5 @@
<template> <template>
<div> <div class="drawer-table">
<pro-table v-if="visible" ref="tableChilrenRef" rowKey="id" :fetch="fetch" :columns="columns" :toolbar="toolbar" <pro-table v-if="visible" ref="tableChilrenRef" rowKey="id" :fetch="fetch" :columns="columns" :toolbar="toolbar"
:operate="operate" :param="state.param" :pagination="pagination" :operate="operate" :param="state.param" :pagination="pagination"
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }"> :row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
@ -73,6 +73,14 @@
} }
const columns = [{ const columns = [{
dataIndex: "index",
key: "index",
title: "序号",
width: 60,
fixed: 'left',
align: 'center'
},
{
dataIndex: "label", dataIndex: "label",
key: "label", key: "label",
title: "中文标签", title: "中文标签",
@ -180,12 +188,15 @@
/// ///
const toolbar = [{ const toolbar = [{
label: "新增", label: "新增",
icon: "PlusOutlined",
event: function() { event: function() {
state.visibleSave = true, state.recordSave = props.record state.visibleSave = true, state.recordSave = props.record
} }
}, },
{ {
label: "删除", label: "删除",
icon: "DeleteOutlined",
danger: true,
event: function() { event: function() {
removeBatchMethod(state.selectedRowKeys) removeBatchMethod(state.selectedRowKeys)
} }
@ -201,6 +212,7 @@
}, },
{ {
label: "删除", label: "删除",
isDel: true,
event: function(record) { event: function(record) {
removeMethod(record) removeMethod(record)
} }
@ -209,7 +221,7 @@
const pagination = { const pagination = {
pageNum: 1, pageNum: 1,
pageSize: 10 pageSize: 20
}; };
const state = reactive({ const state = reactive({
@ -255,3 +267,36 @@
}, },
}; };
</script> </script>
<style scoped>
.drawer-table {
height: 100%;
display: flex;
flex-direction: column;
}
/* 让 pro-table 自适应填满抽屉高度y:'flex' 将根据容器高度计算 */
.drawer-table :deep(#pro-table) {
flex: 1;
display: flex;
flex-direction: column;
min-height: 0;
}
.drawer-table :deep(#pro-table .pro-table-tool) {
/* 工具栏保持自然高度 */
flex: none;
}
.drawer-table :deep(#pro-table .ant-table-wrapper),
.drawer-table :deep(#pro-table .ant-spin-nested-loading),
.drawer-table :deep(#pro-table .ant-spin-container),
.drawer-table :deep(#pro-table .ant-table),
.drawer-table :deep(#pro-table .ant-table-container) {
flex: 1;
min-height: 0;
display: flex;
flex-direction: column;
}
.drawer-table :deep(#pro-table .ant-table-body) {
/* 当 y:'flex' 时,内部会使用 flex 高度,这里保证最小高度与滚动行为 */
flex: 1;
min-height: 0;
}
</style>

View File

@ -64,6 +64,14 @@
}]; }];
/// ///
const columns = [{ const columns = [{
dataIndex: "index",
key: "index",
title: "序号",
width: 60,
fixed: 'left',
align: 'center'
},
{
dataIndex: "content", dataIndex: "content",
key: "content", key: "content",
title: "消息内容" title: "消息内容"

View File

@ -81,6 +81,14 @@
/// ///
const columns = [{ const columns = [{
dataIndex: "index",
key: "index",
title: "序号",
width: 60,
fixed: 'left',
align: 'center'
},
{
dataIndex: "name", dataIndex: "name",
key: "name", key: "name",
title: "名称" title: "名称"
@ -179,12 +187,15 @@
/// ///
const toolbar = [{ const toolbar = [{
label: "新增", label: "新增",
icon: 'PlusOutlined',
event: function() { event: function() {
state.visibleSave = true state.visibleSave = true
} }
}, },
{ {
label: "删除", label: "删除",
icon: 'DeleteOutlined',
danger: true,
event: function() { event: function() {
removeBatchMethod(state.selectedRowKeys) removeBatchMethod(state.selectedRowKeys)
} }

View File

@ -41,9 +41,10 @@ export default {
/// ///
const columns = [ const columns = [
{ dataIndex: "index", key: "index", title: "序号", width: 60, fixed: 'left', align: 'center' },
{ dataIndex: "jobName", key: "jobName", title: "任务" }, { dataIndex: "jobName", key: "jobName", title: "任务" },
{ dataIndex: "beanName", key: "beanName", title: "目标" }, { dataIndex: "beanName", key: "beanName", title: "目标" },
{ dataIndex: "time", key: "time", title: "耗时"}, { dataIndex: "time", key: "time", title: "耗时(ms)",align: 'right',width: 120 },
{ dataIndex: "createTime", key: "createTime", title: "运行时间" }, { dataIndex: "createTime", key: "createTime", title: "运行时间" },
{ dataIndex: "state", key: "state", title: "状态", conver: converFormat }, { dataIndex: "state", key: "state", title: "状态", conver: converFormat },
]; ];
@ -63,14 +64,18 @@ export default {
/// ///
const toolbar = [ const toolbar = [
{ label: "备份", event: function () { }}, { label: "备份", icon:'SnippetsOutlined', event: function () { }},
]; ];
/// ///
const pagination = { const pagination = {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 20,
} showSizeChanger: true, //
pageSizeOptions: ["10", "20", "50", "100"], //
showTotal: total => `${total} 条记录`, //
showSizeChange: (current, pageSize) => (this.pageSize = pageSize) //
}
/// - , fetch /// - , fetch
const state = reactive({ const state = reactive({

View File

@ -1,31 +1,19 @@
<template> <template>
<a-list-layout <a-list-layout ref="pageRef">
ref="pageRef"
>
<template #search> <template #search>
<!-- 查询参数 --> <!-- 查询参数 -->
<pro-query <pro-query :searchParam="searchParam" @on-search="search"></pro-query>
:searchParam="searchParam"
@on-search ="search"
></pro-query>
</template> </template>
<!-- 列表 --> <!-- 列表 -->
<pro-table <pro-table :fetch="fetch" :columns="columns" :toolbar="toolbar" :param="state.param" :pagination="pagination"
:fetch="fetch" :operate="operate" :row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
:columns="columns" <!-- 继承至 a-table 的默认插槽 -->
:toolbar="toolbar" </pro-table>
:param="state.param" </a-list-layout>
:pagination="pagination"
:operate="operate"
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }"
>
<!-- 继承至 a-table 的默认插槽 -->
</pro-table>
</a-list-layout>
</template> </template>
<script> <script>
import { message , Modal as modal} from '@hwork/ant-design-vue'; import { message, Modal as modal } from '@hwork/ant-design-vue';
import { ExclamationCircleOutlined } from '@ant-design/icons-vue'; import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
import { page, clean } from "@/api/module/log"; import { page, clean } from "@/api/module/log";
import { reactive, createVNode } from 'vue'; import { reactive, createVNode } from 'vue';
@ -36,28 +24,29 @@ export default {
setup() { setup() {
/// ///
const converFormat = [{label:"成功", value:true},{label:"失败", value:false}]; const converFormat = [{ label: "成功", value: true }, { label: "失败", value: false }];
/// ///
const columns = [ const columns = [
{ dataIndex: "title", key: "title", title: "标题" ,width:120,showSearch: true}, { dataIndex: "index", key: "index", title: "序号", width: 60, fixed: 'left', align: 'center' },
{ dataIndex: "describe", key: "describe", title: "描述" ,width:120,showSearch: true}, { dataIndex: "title", key: "title", title: "标题", width: 120, showSearch: true },
{ dataIndex: "action", key: "action", title: "动作",width:100}, { dataIndex: "describe", key: "describe", title: "描述", width: 120, showSearch: true },
{ dataIndex: "type", key: "type", title: "方式",width:120}, { dataIndex: "action", key: "action", title: "动作", width: 100 },
{ dataIndex: "browser", key: "browser", title: "浏览器" ,width:120,ellipsis: true}, { dataIndex: "type", key: "type", title: "方式", width: 120 },
{ dataIndex: "system", key: "system", title: "系统" ,width:120,ellipsis: true}, { dataIndex: "browser", key: "browser", title: "浏览器", width: 120, ellipsis: true },
{ dataIndex: "address", key: "address", title: "操作地" ,width:120,showSearch: true,ellipsis: true}, { dataIndex: "system", key: "system", title: "系统", width: 120, ellipsis: true },
{ dataIndex: "createBy", key: "createBy", title: "创建人" ,width:120,ellipsis: true,showSearch: true}, { dataIndex: "address", key: "address", title: "操作地", width: 120, showSearch: true, ellipsis: true },
{ dataIndex: "createUsername", key: "createUsername", title: "创建人" ,width:120,ellipsis: true,showSearch: true}, { dataIndex: "createBy", key: "createBy", title: "创建人", width: 120, ellipsis: true, showSearch: true },
{ dataIndex: "createNickname", key: "createNickname", title: "创建人昵称" ,width:120,ellipsis: true}, { dataIndex: "createUsername", key: "createUsername", title: "创建人", width: 120, ellipsis: true, showSearch: true },
{ dataIndex: "createTime", key: "createTime", title: "操作时间" ,width:180,ellipsis: true}, { dataIndex: "createNickname", key: "createNickname", title: "创建人昵称", width: 120, ellipsis: true },
{ dataIndex: "state", key: "state", title: "状态", conver: converFormat ,width:120,ellipsis: true}, { dataIndex: "createTime", key: "createTime", title: "操作时间", width: 180, ellipsis: true },
{ dataIndex: "params", key: "params", title: "参数",showSearch: true ,width:300,ellipsis: true}, { dataIndex: "state", key: "state", title: "状态", conver: converFormat, width: 120, ellipsis: true },
{ dataIndex: "result", key: "result", title: "返回结果", showSearch: true ,width:300,ellipsis: true}, { dataIndex: "params", key: "params", title: "参数", showSearch: true, width: 300, ellipsis: true },
{ dataIndex: "result", key: "result", title: "返回结果", showSearch: true, width: 300, ellipsis: true },
]; ];
const operate = [ const operate = [
{ label: "查看", event: function (record) { alert("查看详情:" + JSON.stringify(record))}}, { label: "查看", event: function (record) { alert("查看详情:" + JSON.stringify(record)) } },
]; ];
/// [] /// []
@ -78,11 +67,11 @@ export default {
cancelText: '取消', cancelText: '取消',
onOk() { onOk() {
message.loading({ content: "提交中...", key: cleanKey }); message.loading({ content: "提交中...", key: cleanKey });
clean({"isAuth":true}).then((response) => { clean({ "isAuth": true }).then((response) => {
if(response.success){ if (response.success) {
message.success({content: "清空成功", key: cleanKey, duration: 1}) message.success({ content: "清空成功", key: cleanKey, duration: 1 })
}else{ } else {
message.error({content: "清空失败", key: cleanKey, duration: 1}) message.error({ content: "清空失败", key: cleanKey, duration: 1 })
} }
}) })
} }
@ -91,14 +80,18 @@ export default {
/// ///
const toolbar = [ const toolbar = [
{ label: "备份", event: function () { }}, { label: "备份", icon: 'SnippetsOutlined', event: function () { } },
{ label: "清空", event: function () { cleanMethod(); }}, { label: "清空", icon: 'ClearOutlined', danger: true, event: function () { cleanMethod(); } },
]; ];
/// ///
const pagination = { const pagination = {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 20,
showSizeChanger: true, //
pageSizeOptions: ["10", "20", "50", "100"], //
showTotal: total => `${total} 条记录`, //
showSizeChange: (current, pageSize) => (this.pageSize = pageSize) //
} }
/// - , fetch /// - , fetch
@ -109,17 +102,18 @@ export default {
/// ///
const searchParam = [ const searchParam = [
{ key: "title", type: "input", label: "标题"}, { key: "title", type: "input", label: "标题" },
{ key: "state", type: "select", label: "状态", value: "", {
options: [ key: "state", type: "select", label: "状态", value: "",
{ text: "全部", value: ""}, options: [
{ text: "成功", value: true}, { text: "全部", value: "" },
{ text: "失败", value: false} { text: "成功", value: true },
] { text: "失败", value: false }
} ]
}
] ]
/// ///
const search = function(value) { const search = function (value) {
state.param.title = value.title state.param.title = value.title
state.param.state = value.state state.param.state = value.state
} }

View File

@ -31,6 +31,7 @@ export default {
/// ///
const columns = [ const columns = [
{ dataIndex: "index", key: "index", title: "序号", width: 60, fixed: 'left', align: 'center' },
{ dataIndex: "title", key: "title", title: "标题", width: 120, showSearch: true }, { dataIndex: "title", key: "title", title: "标题", width: 120, showSearch: true },
{ dataIndex: "describe", key: "describe", title: "描述", width: 120, showSearch: true }, { dataIndex: "describe", key: "describe", title: "描述", width: 120, showSearch: true },
{ dataIndex: "action", key: "action", title: "动作", width: 100 }, { dataIndex: "action", key: "action", title: "动作", width: 100 },
@ -84,15 +85,19 @@ export default {
/// ///
const toolbar = [ const toolbar = [
{ label: "备份", event: function () { exportExcel(); } }, { label: "备份",icon:'SnippetsOutlined', event: function () { exportExcel(); } },
{ label: "清空", event: function () { cleanMethod(); } }, { label: "清空",icon:'ClearOutlined',danger: true, event: function () { cleanMethod(); } },
]; ];
/// ///
const pagination = { const pagination = {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 20,
} showSizeChanger: true, //
pageSizeOptions: ["10", "20", "50", "100"], //
showTotal: total => `${total} 条记录`, //
showSizeChange: (current, pageSize) => (this.pageSize = pageSize) //
}
/// - , fetch /// - , fetch
const state = reactive({ const state = reactive({

View File

@ -56,6 +56,7 @@
/// ///
const columns = [ const columns = [
{ dataIndex: "index", key: "index", title: "序号", width: 60, fixed: 'left', align: 'center' },
{ dataIndex: "name", key: "name", title: "文件名称" }, { dataIndex: "name", key: "name", title: "文件名称" },
{ dataIndex: "location", key: "code", title: "存储位置", conver: converFormat}, { dataIndex: "location", key: "code", title: "存储位置", conver: converFormat},
{ dataIndex: "bucket", key: "bucket", title: "文件仓库" }, { dataIndex: "bucket", key: "bucket", title: "文件仓库" },

View File

@ -40,6 +40,7 @@ export default {
/// ///
const columns = [ const columns = [
{ dataIndex: "index", key: "index", title: "序号", width: 60, fixed: 'left', align: 'center' },
{ dataIndex: "name", key: "name", title: "名称" }, { dataIndex: "name", key: "name", title: "名称" },
{ dataIndex: "code", key: "code", title: "标识" }, { dataIndex: "code", key: "code", title: "标识" },
{ dataIndex: "remark", key: "remark", title: "备注" }, { dataIndex: "remark", key: "remark", title: "备注" },
@ -101,22 +102,26 @@ export default {
/// ///
const toolbar = [ const toolbar = [
{ label: "新增", event: function () { state.visibleSave = true } }, { label: "新增", icon: 'PlusOutlined', event: function () { state.visibleSave = true } },
{ label: "删除", event: function () { removeBatchMethod(state.selectedRowKeys) } }, { label: "删除", icon: 'DeleteOutlined', danger: true,event: function () { removeBatchMethod(state.selectedRowKeys) } },
]; ];
/// ///
const operate = [ const operate = [
{ label: "查看", event: function (record) { state.visibleInfo = true, state.recordInfo = record } }, { label: "查看", event: function (record) { state.visibleInfo = true, state.recordInfo = record } },
{ label: "修改", event: function (record) { state.visibleEdit = true, state.recordEdit = record } }, { label: "修改", event: function (record) { state.visibleEdit = true, state.recordEdit = record } },
{ label: "删除", event: function (record) { removeMethod(record) } }, { label: "删除", isDel: true, event: function (record) { removeMethod(record) } },
]; ];
/// ///
const pagination = { const pagination = {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 20,
} showSizeChanger: true, //
pageSizeOptions: ["10", "20", "50", "100"], //
showTotal: total => `${total} 条记录`, //
showSizeChange: (current, pageSize) => (this.pageSize = pageSize) //
}
/// - , fetch /// - , fetch
const state = reactive({ const state = reactive({

View File

@ -1,286 +1,282 @@
<template> <template>
<page-layout> <a-list-layout>
<a-row :gutter="[10, 10]">
<!-- 顶部区域 --> <!-- 查询参数 -->
<a-col :span="24"> <template #search>
<a-card> <pro-query :searchParam="searchParam" @on-search="search"></pro-query>
<!-- 查询参数 -->
<pro-query :searchParam="searchParam" @on-search="search"></pro-query> </template>
</a-card>
</a-col> <!-- 列表 -->
<!-- 中心区域 --> <pro-table ref="tableRef" rowKey="id" :fetch="fetch" :columns="columns" :toolbar="toolbar" :operate="operate"
<a-col :span="24"> :param="state.param" :pagination="pagination"
<a-card> :row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
<!-- 列表 --> <!-- 继承至 a-table 的默认插槽 -->
<pro-table ref="tableRef" rowKey="id" :fetch="fetch" :columns="columns" :toolbar="toolbar" :operate="operate" </pro-table>
:param="state.param" :pagination="pagination"
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
<!-- 继承至 a-table 的默认插槽 -->
</pro-table>
</a-card>
</a-col>
</a-row>
<save :visible="state.visibleSave" @close="closeSave"></save> <save :visible="state.visibleSave" @close="closeSave"></save>
<edit :visible="state.visibleEdit" @close="closeEdit" :record="state.recordEdit"></edit> <edit :visible="state.visibleEdit" @close="closeEdit" :record="state.recordEdit"></edit>
<info :visible="state.visibleInfo" @close="closeInfo" :record="state.recordInfo"></info> <info :visible="state.visibleInfo" @close="closeInfo" :record="state.recordInfo"></info>
</page-layout> </a-list-layout>
</template> </template>
<script> <script>
import save from './modal/save.vue'; import save from './modal/save.vue';
import edit from './modal/edit.vue'; import edit from './modal/edit.vue';
import info from './modal/info.vue'; import info from './modal/info.vue';
import { import {
message, message,
Modal as modal Modal as modal
} from '@hwork/ant-design-vue'; } from '@hwork/ant-design-vue';
import { import {
ExclamationCircleOutlined ExclamationCircleOutlined
} from '@ant-design/icons-vue'; } from '@ant-design/icons-vue';
import { import {
tree, tree,
remove remove
} from "@/api/module/power"; } from "@/api/module/power";
import { import {
reactive, reactive,
createVNode, createVNode,
ref ref
} from 'vue'; } from 'vue';
const removeKey = "remove"; const removeKey = "remove";
const removeBatchKey = "removeBatch"; const removeBatchKey = "removeBatch";
export default { export default {
components: { components: {
save, save,
edit, edit,
info, info,
}, },
setup() { setup() {
const tableRef = ref(); const tableRef = ref();
const switchFormat = { const switchFormat = {
yes: true, yes: true,
no: false, no: false,
event: function(value, record) { event: function (value, record) {
record.enable = !record.enable; record.enable = !record.enable;
return value; return value;
}
} }
}
/// ///
const removeMethod = (record) => { const removeMethod = (record) => {
message.loading({ message.loading({
content: "提交中...", content: "提交中...",
key: removeKey key: removeKey
}); });
remove({ remove({
"id": record.id "id": record.id
}).then((response) => { }).then((response) => {
if (response.success) { if (response.success) {
message.success({ message.success({
content: "删除成功", content: "删除成功",
key: removeKey, key: removeKey,
duration: 1 duration: 1
}).then(() => { }).then(() => {
tableRef.value.reload() tableRef.value.reload()
}) })
} else { } else {
message.error({ message.error({
content: "删除失败", content: "删除失败",
key: removeKey, key: removeKey,
duration: 1 duration: 1
}) })
}
})
}
const converFormat = [{
label: '目录',
value: '0'
},
{
label: '菜单',
value: '1'
},
{
label: '按钮',
value: '2'
} }
]
///
const columns = [{
dataIndex: "title",
key: "title",
title: "权限名"
},
{
dataIndex: "component",
key: "component",
title: "组件"
},
{
dataIndex: "type",
key: "type",
title: "类型",
conver: converFormat
},
{
dataIndex: "path",
key: "path",
title: "路径"
},
{
dataIndex: "i18n",
key: "i18n",
title: "国际化"
},
{
dataIndex: "enable",
key: "enable",
title: "状态",
switch: switchFormat
},
{
dataIndex: "sort",
key: "sort",
title: "排序"
},
];
/// []
const fetch = async (param) => {
var response = await tree(param);
return {
data: response.data,
};
};
///
const toolbar = [{
label: "新增",
code: "sys:power:save",
event: function() {
state.visibleSave = true
}
}];
///
const operate = [{
label: "查看",
code: "sys:power:info",
event: function(record) {
state.visibleInfo = true, state.recordInfo = record
}
},
{
label: "修改",
code: "sys:power:edit",
event: function(record) {
state.visibleEdit = true, state.recordEdit = record
}
},
{
label: "删除",
isDel: true,
code: "sys:power:remove",
delEvent: function(record) {
removeMethod(record)
}
},
];
///
const pagination = false;
/// - , fetch
const state = reactive({
selectedRowKeys: [],
param: {},
visibleSave: false,
visibleEdit: false,
visibleInfo: false,
recordEdit: {},
recordInfo: {},
}) })
}
/// const converFormat = [{
const searchParam = [{ label: '目录',
key: "name", value: '0'
type: "input",
label: "名称"
},
{
key: "code",
type: "input",
label: "描述"
},
{
key: "state",
type: "select",
label: "状态",
value: "0",
hidden: true,
options: [{
text: "全部",
value: "0"
},
{
text: "开启",
value: "1"
},
{
text: "关闭",
value: "2"
}
]
}
]
///
const search = function(value) {
state.param = value
tableRef.value.reload()
}
const onSelectChange = selectedRowKeys => {
state.selectedRowKeys = selectedRowKeys;
};
const closeSave = function() {
state.visibleSave = false;
tableRef.value.reload();
}
const closeEdit = function() {
state.visibleEdit = false;
tableRef.value.reload();
}
const closeInfo = function() {
state.visibleInfo = false;
}
return {
state,
fetch,
search,
toolbar,
columns,
operate,
pagination,
searchParam,
onSelectChange,
closeSave,
closeEdit,
closeInfo,
tableRef
};
}, },
}; {
label: '菜单',
value: '1'
},
{
label: '按钮',
value: '2'
}
]
///
const columns = [
{
dataIndex: "title",
key: "title",
title: "权限名"
},
{
dataIndex: "component",
key: "component",
title: "组件"
},
{
dataIndex: "type",
key: "type",
title: "类型",
conver: converFormat
},
{
dataIndex: "path",
key: "path",
title: "路径"
},
{
dataIndex: "i18n",
key: "i18n",
title: "国际化"
},
{
dataIndex: "enable",
key: "enable",
title: "状态",
switch: switchFormat
},
{
dataIndex: "sort",
key: "sort",
title: "排序"
},
];
/// []
const fetch = async (param) => {
var response = await tree(param);
return {
data: response.data,
};
};
///
const toolbar = [{
label: "新增",
code: "sys:power:save",
icon: "PlusOutlined",
event: function () {
state.visibleSave = true
}
}];
///
const operate = [{
label: "查看",
code: "sys:power:info",
event: function (record) {
state.visibleInfo = true, state.recordInfo = record
}
},
{
label: "修改",
code: "sys:power:edit",
event: function (record) {
state.visibleEdit = true, state.recordEdit = record
}
},
{
label: "删除",
isDel: true,
code: "sys:power:remove",
delEvent: function (record) {
removeMethod(record)
}
},
];
///
const pagination = false;
/// - , fetch
const state = reactive({
selectedRowKeys: [],
param: {},
visibleSave: false,
visibleEdit: false,
visibleInfo: false,
recordEdit: {},
recordInfo: {},
})
///
const searchParam = [{
key: "name",
type: "input",
label: "名称"
},
{
key: "code",
type: "input",
label: "描述"
},
{
key: "state",
type: "select",
label: "状态",
value: "0",
hidden: true,
options: [{
text: "全部",
value: "0"
},
{
text: "开启",
value: "1"
},
{
text: "关闭",
value: "2"
}
]
}
]
///
const search = function (value) {
state.param = value
tableRef.value.reload()
}
const onSelectChange = selectedRowKeys => {
state.selectedRowKeys = selectedRowKeys;
};
const closeSave = function () {
state.visibleSave = false;
tableRef.value.reload();
}
const closeEdit = function () {
state.visibleEdit = false;
tableRef.value.reload();
}
const closeInfo = function () {
state.visibleInfo = false;
}
return {
state,
fetch,
search,
toolbar,
columns,
operate,
pagination,
searchParam,
onSelectChange,
closeSave,
closeEdit,
closeInfo,
tableRef
};
},
};
</script> </script>

View File

@ -1,29 +1,24 @@
<template> <template>
<page-layout> <a-list-layout
<a-row :gutter="[10, 10]"> ref="pageRef">
<!-- 顶部区域 -->
<a-col :span="24">
<a-card>
<!-- 查询参数 --> <!-- 查询参数 -->
<template #search>
<pro-query :searchParam="searchParam" @on-search="search"></pro-query> <pro-query :searchParam="searchParam" @on-search="search"></pro-query>
</a-card>
</a-col> </template>
<!-- 中心区域 -->
<a-col :span="24">
<a-card>
<!-- 列表 --> <!-- 列表 -->
<pro-table ref="tableRef" :fetch="fetch" :columns="columns" :toolbar="toolbar" :operate="operate" <pro-table ref="tableRef" :fetch="fetch" :columns="columns" :toolbar="toolbar" :operate="operate"
:param="state.param" :pagination="pagination" :param="state.param" :pagination="pagination"
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }"> :row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
</pro-table> </pro-table>
</a-card>
</a-col>
</a-row>
<save :visible="state.visibleSave" @close="closeSave"></save> <save :visible="state.visibleSave" @close="closeSave"></save>
<edit :visible="state.visibleEdit" @close="closeEdit" :record="state.recordEdit"></edit> <edit :visible="state.visibleEdit" @close="closeEdit" :record="state.recordEdit"></edit>
<give :visible="state.visibleGive" @close="closeGive" :record="state.recordGive"></give> <give :visible="state.visibleGive" @close="closeGive" :record="state.recordGive"></give>
<info :visible="state.visibleInfo" @close="closeInfo" :record="state.recordInfo"></info> <info :visible="state.visibleInfo" @close="closeInfo" :record="state.recordInfo"></info>
</page-layout> </a-list-layout>
</template> </template>
<script> <script>
import save from './modal/save.vue'; import save from './modal/save.vue';
@ -81,6 +76,14 @@
} }
const columns = [{ const columns = [{
dataIndex: "index",
key: "index",
title: "序号",
width: 60,
fixed: 'left',
align: 'center'
},
{
dataIndex: "name", dataIndex: "name",
key: "name", key: "name",
title: "名称" title: "名称"
@ -190,12 +193,15 @@
/// ///
const toolbar = [{ const toolbar = [{
label: "新增", label: "新增",
icon: 'PlusOutlined',
event: function() { event: function() {
state.visibleSave = true state.visibleSave = true
} }
}, },
{ {
label: "删除", label: "删除",
icon: 'DeleteOutlined',
danger: true,
event: function() { event: function() {
removeBatchMethod(state.selectedRowKeys) removeBatchMethod(state.selectedRowKeys)
} }
@ -223,6 +229,7 @@
}, },
{ {
label: "删除", label: "删除",
isDel: true,
event: function(record) { event: function(record) {
removeMethod(record) removeMethod(record)
} }

View File

@ -217,7 +217,7 @@ export default {
const columns = [ const columns = [
{ title: "磁盘", dataIndex: "typeName", key: "typeName", width: "200px"}, { title: "磁盘", dataIndex: "typeName", key: "typeName", width: "200px"},
{ title: "使用率", dataIndex: "usage", key: "usage", slots: { customRender: "usage" }}, { title: "使用率", dataIndex: "usage", key: "usage", slots: { customRender: "usage" },width: "120px"},
{ title: "路径", dataIndex: "dirName", key: "dirName", align: "center"}, { title: "路径", dataIndex: "dirName", key: "dirName", align: "center"},
{ title: "使用", dataIndex: "used", key: "used", align: "center"}, { title: "使用", dataIndex: "used", key: "used", align: "center"},
{ title: "剩余", dataIndex: "free", key: "free", align: "center"}, { title: "剩余", dataIndex: "free", key: "free", align: "center"},

View File

@ -121,7 +121,7 @@
</div> </div>
</a-card-grid> </a-card-grid>
</a-card> </a-card>
<a-card title="动态" style="margin-top: 10px"> <a-card title="动态" >
<a-list item-layout="horizontal" :data-source="data"> <a-list item-layout="horizontal" :data-source="data">
<template #renderItem="{ item }"> <template #renderItem="{ item }">
<a-list-item> <a-list-item>

View File

@ -24,7 +24,7 @@
</a-col> </a-col>
--> -->
<a-col span="24"> <a-col span="24">
<a-table :columns="columns" :data-source="dataSource" style="margin-top: 10px" /> <a-table :columns="columns" :data-source="dataSource" />
</a-col> </a-col>
</a-row> </a-row>
</a-card> </a-card>
@ -80,6 +80,14 @@
// //
const columns = [{ const columns = [{
dataIndex: "index",
key: "index",
title: "序号",
width: 60,
fixed: 'left',
align: 'center'
},
{
title: "日期", title: "日期",
dataIndex: "dayTime", dataIndex: "dayTime",
key: "dayTime", key: "dayTime",

View File

@ -24,7 +24,7 @@
</a-col> </a-col>
--> -->
<a-col span="24"> <a-col span="24">
<a-table :columns="columns" :data-source="dataSource" style="margin-top: 10px" /> <a-table :columns="columns" :data-source="dataSource" />
</a-col> </a-col>
</a-row> </a-row>
</a-card> </a-card>
@ -80,6 +80,14 @@
// //
const columns = [{ const columns = [{
dataIndex: "index",
key: "index",
title: "序号",
width: 60,
fixed: 'left',
align: 'center'
},
{
title: "日期", title: "日期",
dataIndex: "dayTime", dataIndex: "dayTime",
key: "dayTime", key: "dayTime",

View File

@ -42,6 +42,7 @@ export default {
const tableRef = ref() const tableRef = ref()
const columns = [ const columns = [
{ dataIndex: "index", key: "index", title: "序号", width: 60, fixed: 'left', align: 'center' },
{ dataIndex: "name", key: "name", title: "名称" }, { dataIndex: "name", key: "name", title: "名称" },
{ dataIndex: "describe", key: "describe", title: "描述" }, { dataIndex: "describe", key: "describe", title: "描述" },
{ dataIndex: "createTime", key: "createTime", title: "创建时间" }, { dataIndex: "createTime", key: "createTime", title: "创建时间" },
@ -93,8 +94,8 @@ export default {
/// ///
const toolbar = [ const toolbar = [
{ label: "新增", event: function () { state.visibleSave = true } }, { label: "新增", icon: 'PlusOutlined', event: function () { state.visibleSave = true } },
{ label: "删除", event: function () { removeBatchMethod(state.selectedRowKeys) } }, { label: "删除", icon: 'DeleteOutlined', danger: true,event: function () { removeBatchMethod(state.selectedRowKeys) } },
]; ];
/// ///
@ -106,10 +107,14 @@ export default {
]; ];
/// ///
const pagination = { const pagination = {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 20,
} showSizeChanger: true, //
pageSizeOptions: ["10", "20", "50", "100"], //
showTotal: total => `${total} 条记录`, //
showSizeChange: (current, pageSize) => (this.pageSize = pageSize) //
}
/// - , fetch /// - , fetch
const state = reactive({ const state = reactive({

View File

@ -111,8 +111,8 @@ export default {
/// ///
const toolbar = [ const toolbar = [
{ label: "新增", event: function () { state.visibleSave = true } }, { label: "新增",icon: 'PlusOutlined', event: function () { state.visibleSave = true } },
{ label: "删除", event: function () { removeBatchMethod(state.selectedRowKeys) } } { label: "删除", icon: 'DeleteOutlined', danger: true,event: function () { removeBatchMethod(state.selectedRowKeys) } }
]; ];
/// ///
@ -120,7 +120,7 @@ export default {
{ label: "查看", event: function (record) { state.visibleInfo = true, state.recordInfo = record } }, { label: "查看", event: function (record) { state.visibleInfo = true, state.recordInfo = record } },
{ label: "修改", event: function (record) { state.visibleEdit = true, state.recordEdit = record } }, { label: "修改", event: function (record) { state.visibleEdit = true, state.recordEdit = record } },
{ label: "分配", event: function (record) { state.visibleGive = true, state.recordGive = record } }, { label: "分配", event: function (record) { state.visibleGive = true, state.recordGive = record } },
{ label: "删除", event: function (record) { removeMethod(record) } }, { label: "删除", isDel: true, event: function (record) { removeMethod(record) } },
{ label: '重置', event: function (record) { resetPasswordMethod(record) } } { label: '重置', event: function (record) { resetPasswordMethod(record) } }
]; ];
@ -140,11 +140,12 @@ export default {
/// ///
const columns = [ const columns = [
{ dataIndex: "index", key: "index", title: "序号", width: 60, fixed: 'left', align: 'center' },
{ dataIndex: "deptName", key: "deptName", title: "部门" }, { dataIndex: "deptName", key: "deptName", title: "部门" },
{ dataIndex: "avatar", key: "avatar", title: "头像", avatar: avatarFormat }, { dataIndex: "avatar", key: "avatar", title: "头像", avatar: avatarFormat },
{ dataIndex: "nickname", key: "nickname", title: "名称" }, { dataIndex: "nickname", key: "nickname", title: "名称" },
{ dataIndex: "username", key: "username", title: "账号" }, { dataIndex: "username", key: "username", title: "账号" },
{ dataIndex: "gender", key: "gender", title: "性别", conver: converFormat }, { dataIndex: "gender", key: "gender", title: "性别", conver: converFormat,width: 80 },
{ dataIndex: "enable", key: "enable", title: "状态", switch: switchFormat }, { dataIndex: "enable", key: "enable", title: "状态", switch: switchFormat },
{ dataIndex: "email", key: "email", title: "邮箱" }, { dataIndex: "email", key: "email", title: "邮箱" },
{ dataIndex: "phone", key: "phone", title: "电话" }, { dataIndex: "phone", key: "phone", title: "电话" },
@ -152,7 +153,7 @@ export default {
]; ];
/// ///
const pagination = { pageNum: 1, pageSize: 10 } const pagination = { pageNum: 1, pageSize: 20 }
/// ///
const state = reactive({ const state = reactive({

View File

@ -46,6 +46,7 @@ export default defineComponent({
}; };
const columns = [ const columns = [
{ dataIndex: "index", key: "index", title: "序号", width: 60, fixed: 'left', align: 'center' },
{ dataIndex: "name", key: "name", title: "名称" }, { dataIndex: "name", key: "name", title: "名称" },
{ dataIndex: "remark", key: "remark", title: "描述" } { dataIndex: "remark", key: "remark", title: "描述" }
]; ];

View File

@ -53,6 +53,14 @@
/// ///
const columns = [{ const columns = [{
dataIndex: "index",
key: "index",
title: "序号",
width: 60,
fixed: 'left',
align: 'center'
},
{
dataIndex: "customerCode", dataIndex: "customerCode",
key: "customerCode", key: "customerCode",
title: "编号", title: "编号",

View File

@ -54,6 +54,14 @@
/// ///
const columns = [{ const columns = [{
dataIndex: "index",
key: "index",
title: "序号",
width: 60,
fixed: 'left',
align: 'center'
},
{
dataIndex: "deliver", dataIndex: "deliver",
key: "deliver", key: "deliver",
title: "搬运类型", title: "搬运类型",
@ -247,6 +255,7 @@
const toolbar = [{ const toolbar = [{
label: "新增", label: "新增",
code: 'wms:deliverType:add', code: 'wms:deliverType:add',
icon: 'PlusOutlined',
event: function() { event: function() {
state.visibleSave = true state.visibleSave = true
} }
@ -254,6 +263,8 @@
{ {
label: "删除", label: "删除",
code: 'wms:deliverType:remove', code: 'wms:deliverType:remove',
icon: 'DeleteOutlined',
danger: true,
event: function() { event: function() {
removeBatchMethod(state.selectedRowKeys) removeBatchMethod(state.selectedRowKeys)
}, },

View File

@ -3,7 +3,7 @@
<template #search> <template #search>
<pro-query :searchParam="searchParam" @on-search="search"></pro-query> <pro-query :searchParam="searchParam" @on-search="search"></pro-query>
</template> </template>
<pro-table style="margin-top: 10px" rowKey="id" ref="tableRef" :fetch="fetch" :columns="columns" :toolbar="toolbar" <pro-table rowKey="id" ref="tableRef" :fetch="fetch" :columns="columns" :toolbar="toolbar"
:operate="operate" :param="state.param" :pagination="pagination" :operate="operate" :param="state.param" :pagination="pagination"
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }"> :row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
</pro-table> </pro-table>
@ -43,10 +43,18 @@ export default {
const tableRef = ref() const tableRef = ref()
const columns = [{ const columns = [{
dataIndex: "index",
key: "index",
title: "序号",
width: 60,
fixed: 'left',
align: 'center'
},
{
dataIndex: "requestCode", dataIndex: "requestCode",
key: "requestCode", key: "requestCode",
title: "请求编号", title: "请求编号",
width: 150, width: 200,
showSearch: true, showSearch: true,
}, },
{ {
@ -64,7 +72,7 @@ export default {
dataIndex: "paramType", dataIndex: "paramType",
key: "paramType", key: "paramType",
title: "请求类型", title: "请求类型",
width: 100, width: 150,
showSearch: true, showSearch: true,
}, },
{ {
@ -306,6 +314,7 @@ export default {
const toolbar = [{ const toolbar = [{
label: "删除", label: "删除",
code: 'wms:request:delete', code: 'wms:request:delete',
icon: 'DeleteOutlined',
event: function () { event: function () {
removeBatchMethod(state.selectedRowKeys) removeBatchMethod(state.selectedRowKeys)
}, },
@ -316,6 +325,7 @@ export default {
const operate = [{ const operate = [{
label: "删除", label: "删除",
code: 'wms:request:delete', code: 'wms:request:delete',
isDel: true,
event: function (record) { event: function (record) {
removeMethod(record) removeMethod(record)
} }

View File

@ -67,11 +67,20 @@
} }
} }
const columns = [{ const columns = [
{
dataIndex: "index",
key: "index",
title: "序号",
width: 60,
fixed: 'left',
align: 'center'
},
{
dataIndex: "skuCode", dataIndex: "skuCode",
key: "skuCode", key: "skuCode",
title: "物料编号", title: "物料编号",
width: 120, width: 150,
// defaultSortOrder: 'ascend', // defaultSortOrder: 'ascend',
// sorter: true, // sorter: true,
showSearch: true showSearch: true
@ -80,7 +89,7 @@
dataIndex: "skuName", dataIndex: "skuName",
key: "skuName", key: "skuName",
title: "物料名称", title: "物料名称",
width: 140, width: 180,
showSearch: true showSearch: true
}, },
// { // {
@ -130,21 +139,21 @@
dataIndex: "categoryCode", dataIndex: "categoryCode",
key: "categoryCode", key: "categoryCode",
title: "种类编号", title: "种类编号",
width: 100, width: 120,
showSearch: true showSearch: true
}, },
{ {
dataIndex: "categoryName", dataIndex: "categoryName",
key: "categoryName", key: "categoryName",
title: "种类名称", title: "种类名称",
width: 100, width: 120,
showSearch: true showSearch: true
}, },
{ {
dataIndex: "baseUnit", dataIndex: "baseUnit",
key: "baseUnit", key: "baseUnit",
title: "库存单位", title: "库存单位",
width: 100, width: 120,
showSearch: true showSearch: true
}, },
/* { /* {
@ -177,6 +186,7 @@
title: "满盘数量", title: "满盘数量",
type: "number", type: "number",
width: 120, width: 120,
align: "right",
showSearch: true showSearch: true
// defaultSortOrder: 'ascend', // defaultSortOrder: 'ascend',
// sorter: (a, b) => a.fullQty - b.fullQty, // sorter: (a, b) => a.fullQty - b.fullQty,
@ -301,9 +311,11 @@
} }
/// ///
const toolbar = [{ const toolbar = [
{
label: "新增", label: "新增",
code: 'wms:sku:add', code: 'wms:sku:add',
icon: 'PlusOutlined',
event: function() { event: function() {
state.visibleSave = true state.visibleSave = true
} }
@ -311,10 +323,11 @@
{ {
label: "删除", label: "删除",
code: 'wms:sku:remove', code: 'wms:sku:remove',
icon: 'DeleteOutlined',
danger: true,
event: function() { event: function() {
removeBatchMethod(state.selectedRowKeys) removeBatchMethod(state.selectedRowKeys)
}, }
type: 'danger'
}, },
]; ];

View File

@ -49,7 +49,16 @@ export default {
const tableRef = ref(); const tableRef = ref();
/// ///
const columns = [{ const columns = [
{
dataIndex: "index",
key: "index",
title: "序号",
width: 60,
fixed: 'left',
align: 'center'
},
{
dataIndex: "categoryCode", dataIndex: "categoryCode",
key: "categoryCode", key: "categoryCode",
title: "种类编号", title: "种类编号",
@ -69,7 +78,7 @@ export default {
dataIndex: "categoryDesc", dataIndex: "categoryDesc",
key: "categoryDesc", key: "categoryDesc",
title: "种类描述", title: "种类描述",
width: 100, width: 120,
showSearch: true showSearch: true
}, },
{ {
@ -211,6 +220,7 @@ export default {
const toolbar = [{ const toolbar = [{
label: "新增", label: "新增",
code: 'wms:skuCategory:add', code: 'wms:skuCategory:add',
icon: 'PlusOutlined',
event: function () { event: function () {
state.visibleSave = true state.visibleSave = true
} }
@ -218,10 +228,11 @@ export default {
{ {
label: "删除", label: "删除",
code: 'wms:skuCategory:remove', code: 'wms:skuCategory:remove',
icon: 'DeleteOutlined',
danger: true,
event: function () { event: function () {
removeBatchMethod(state.selectedRowKeys) removeBatchMethod(state.selectedRowKeys)
}, },
type: 'danger'
}, },
]; ];
@ -238,6 +249,7 @@ export default {
{ {
label: "删除", label: "删除",
code: 'wms:skuCategory:delete', code: 'wms:skuCategory:delete',
isDel: true,
event: function (record) { event: function (record) {
removeMethod(record) removeMethod(record)
} }

View File

@ -23,7 +23,7 @@
</a-card> </a-card>
<a-card> <a-card>
<!-- <pro-query :searchParam="searchParam" @on-search="search"></pro-query> --> <!-- <pro-query :searchParam="searchParam" @on-search="search"></pro-query> -->
<pro-table style="margin-top: 10px" visible="visible" ref="tableRef" rowKey="id" :fetch="fetch" <pro-table visible="visible" ref="tableRef" rowKey="id" :fetch="fetch"
:columns="columns" :operate="operate" :toolbar="toolbar" :param="state.param" :pagination="pagination" :columns="columns" :operate="operate" :toolbar="toolbar" :param="state.param" :pagination="pagination"
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }"> :row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
@ -153,6 +153,14 @@
const columns = [{ const columns = [{
dataIndex: "index",
key: "index",
title: "序号",
width: 60,
fixed: 'left',
align: 'center'
},
{
dataIndex: "skuCode", dataIndex: "skuCode",
key: "skuCode", key: "skuCode",
title: "物料编号", title: "物料编号",

View File

@ -6,7 +6,7 @@
<a-col :span="24"> <a-col :span="24">
<a-card> <a-card>
<pro-query :searchParam="searchParam" @on-search="search"></pro-query> <pro-query :searchParam="searchParam" @on-search="search"></pro-query>
<pro-table style="margin-top: 10px" visible="visible" ref="tableRef" rowKey="id" :fetch="fetch" <pro-table visible="visible" ref="tableRef" rowKey="id" :fetch="fetch"
:columns="columns" :toolbar="toolbar" :param="state.param" :pagination="pagination" :columns="columns" :toolbar="toolbar" :param="state.param" :pagination="pagination"
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }"> :row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
</pro-table> </pro-table>
@ -76,6 +76,14 @@
}); });
const columns = [{ const columns = [{
dataIndex: "index",
key: "index",
title: "序号",
width: 60,
fixed: 'left',
align: 'center'
},
{
dataIndex: "palletCode", dataIndex: "palletCode",
key: "palletCode", key: "palletCode",
title: "托盘号", title: "托盘号",

View File

@ -7,7 +7,7 @@
<a-col :span="24"> <a-col :span="24">
<a-card> <a-card>
<pro-query :searchParam="searchParam" @on-search="search"></pro-query> <pro-query :searchParam="searchParam" @on-search="search"></pro-query>
<pro-table style="margin-top: 10px" visible="visible" ref="tableRef" rowKey="id" :fetch="fetch" <pro-table visible="visible" ref="tableRef" rowKey="id" :fetch="fetch"
:columns="columns" :toolbar="toolbar" :operate="operate" :param="state.param" :pagination="pagination" :columns="columns" :toolbar="toolbar" :operate="operate" :param="state.param" :pagination="pagination"
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }"> :row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
</pro-table> </pro-table>
@ -90,6 +90,14 @@
const columns = [{ const columns = [{
dataIndex: "index",
key: "index",
title: "序号",
width: 60,
fixed: 'left',
align: 'center'
},
{
dataIndex: "invoiceCode", dataIndex: "invoiceCode",
key: "invoiceCode", key: "invoiceCode",
title: "盘点单据号", title: "盘点单据号",

View File

@ -59,6 +59,14 @@
const tableRef = ref() const tableRef = ref()
const columns = [{ const columns = [{
dataIndex: "index",
key: "index",
title: "序号",
width: 60,
fixed: 'left',
align: 'center'
},
{
dataIndex: "invoiceCode", dataIndex: "invoiceCode",
key: "invoiceCode", key: "invoiceCode",
title: "单据号", title: "单据号",

View File

@ -113,6 +113,14 @@
const columns = [{ const columns = [{
dataIndex: "index",
key: "index",
title: "序号",
width: 60,
fixed: 'left',
align: 'center'
},
{
dataIndex: "invoiceCode", dataIndex: "invoiceCode",
key: "invoiceCode", key: "invoiceCode",
title: "单据号", title: "单据号",

View File

@ -62,7 +62,7 @@
</a-card> </a-card>
<a-card> <a-card>
<!-- <pro-query :searchParam="searchParam" @on-search="search"></pro-query> --> <!-- <pro-query :searchParam="searchParam" @on-search="search"></pro-query> -->
<pro-table style="margin-top: 10px" visible="visible" ref="tableRef" rowKey="id" :fetch="fetch" <pro-table visible="visible" ref="tableRef" rowKey="id" :fetch="fetch"
:columns="columns" :operate="operate" :toolbar="toolbar" :param="state.param" :pagination="pagination" :columns="columns" :operate="operate" :toolbar="toolbar" :param="state.param" :pagination="pagination"
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }"> :row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
<template v-for="col in ['planQty', 'batch', 'master','customer', 'producer', 'qualityStatus']" <template v-for="col in ['planQty', 'batch', 'master','customer', 'producer', 'qualityStatus']"
@ -270,6 +270,14 @@
}) })
const columns = [{ const columns = [{
dataIndex: "index",
key: "index",
title: "序号",
width: 60,
fixed: 'left',
align: 'center'
},
{
dataIndex: "skuCode", dataIndex: "skuCode",
key: "skuCode", key: "skuCode",
type: "select", type: "select",

View File

@ -6,7 +6,7 @@
<a-col :span="24"> <a-col :span="24">
<a-card> <a-card>
<pro-query :searchParam="searchParam" @on-search="search"></pro-query> <pro-query :searchParam="searchParam" @on-search="search"></pro-query>
<pro-table style="margin-top: 10px" visible="visible" ref="tableRef" rowKey="id" :fetch="fetch" <pro-table visible="visible" ref="tableRef" rowKey="id" :fetch="fetch"
:columns="columns" :toolbar="toolbar" :param="state.param" :pagination="pagination" :columns="columns" :toolbar="toolbar" :param="state.param" :pagination="pagination"
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }"> :row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
</pro-table> </pro-table>
@ -73,6 +73,14 @@
watch(props, (props) => {}); watch(props, (props) => {});
const columns = [{ const columns = [{
dataIndex: "index",
key: "index",
title: "序号",
width: 60,
fixed: 'left',
align: 'center'
},
{
dataIndex: "skuCode", dataIndex: "skuCode",
key: "skuCode", key: "skuCode",
title: "物料编号", title: "物料编号",

View File

@ -58,6 +58,14 @@
const tableRef = ref() const tableRef = ref()
const columns = [{ const columns = [{
dataIndex: "index",
key: "index",
title: "序号",
width: 60,
fixed: 'left',
align: 'center'
},
{
dataIndex: "invoiceCode", dataIndex: "invoiceCode",
key: "invoiceCode", key: "invoiceCode",
title: "单据号", title: "单据号",

View File

@ -72,6 +72,14 @@
}) })
const columns = [{ const columns = [{
dataIndex: "index",
key: "index",
title: "序号",
width: 60,
fixed: 'left',
align: 'center'
},
{
dataIndex: "invoiceCode", dataIndex: "invoiceCode",
key: "invoiceCode", key: "invoiceCode",
title: "单据号", title: "单据号",

View File

@ -74,7 +74,7 @@
</a-card> </a-card>
<a-card> <a-card>
<!-- <pro-query :searchParam="searchParam" @on-search="search"></pro-query> --> <!-- <pro-query :searchParam="searchParam" @on-search="search"></pro-query> -->
<pro-table style="margin-top: 10px" visible="visible" ref="tableRef" rowKey="id" :fetch="fetch" <pro-table visible="visible" ref="tableRef" rowKey="id" :fetch="fetch"
:columns="columns" :operate="operate" :toolbar="toolbar" :param="state.param" :pagination="pagination" :columns="columns" :operate="operate" :toolbar="toolbar" :param="state.param" :pagination="pagination"
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }"> :row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
<template v-for="col in ['planQty', 'batch', 'master','customer', 'producer', 'qualityStatus']" <template v-for="col in ['planQty', 'batch', 'master','customer', 'producer', 'qualityStatus']"
@ -283,6 +283,14 @@
}) })
const columns = [{ const columns = [{
dataIndex: "index",
key: "index",
title: "序号",
width: 60,
fixed: 'left',
align: 'center'
},
{
dataIndex: "skuCode", dataIndex: "skuCode",
key: "skuCode", key: "skuCode",
type: "select", type: "select",

View File

@ -6,7 +6,7 @@
<a-col :span="24"> <a-col :span="24">
<a-card> <a-card>
<pro-query :searchParam="searchParam" @on-search="search"></pro-query> <pro-query :searchParam="searchParam" @on-search="search"></pro-query>
<pro-table style="margin-top: 10px" visible="visible" ref="tableRef" rowKey="id" :fetch="fetch" <pro-table visible="visible" ref="tableRef" rowKey="id" :fetch="fetch"
:columns="columns" :toolbar="toolbar" :param="state.param" :pagination="pagination" :columns="columns" :toolbar="toolbar" :param="state.param" :pagination="pagination"
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }"> :row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
</pro-table> </pro-table>
@ -72,6 +72,14 @@
watch(props, (props) => {}); watch(props, (props) => {});
const columns = [{ const columns = [{
dataIndex: "index",
key: "index",
title: "序号",
width: 60,
fixed: 'left',
align: 'center'
},
{
dataIndex: "skuCode", dataIndex: "skuCode",
key: "skuCode", key: "skuCode",
title: "物料编号", title: "物料编号",

View File

@ -67,6 +67,14 @@
const tableRef = ref() const tableRef = ref()
const columns = [{ const columns = [{
dataIndex: "index",
key: "index",
title: "序号",
width: 60,
fixed: 'left',
align: 'center'
},
{
dataIndex: "invoiceCode", dataIndex: "invoiceCode",
key: "invoiceCode", key: "invoiceCode",
title: "单据号", title: "单据号",

View File

@ -82,6 +82,14 @@
const cancel = (e) => {}; const cancel = (e) => {};
const columns = [{ const columns = [{
dataIndex: "index",
key: "index",
title: "序号",
width: 60,
fixed: 'left',
align: 'center'
},
{
dataIndex: "invoiceCode", dataIndex: "invoiceCode",
key: "invoiceCode", key: "invoiceCode",
title: "单据号", title: "单据号",

View File

@ -7,7 +7,7 @@
<a-col :span="24"> <a-col :span="24">
<a-card> <a-card>
<pro-query :searchParam="searchParam" @on-search="search"></pro-query> <pro-query :searchParam="searchParam" @on-search="search"></pro-query>
<pro-table style="margin-top: 10px" visible="visible" ref="tableRef" rowKey="id" :fetch="fetch" <pro-table visible="visible" ref="tableRef" rowKey="id" :fetch="fetch"
:columns="columns" :toolbar="toolbar" :operate="operate" :param="state.param" :pagination="pagination" :columns="columns" :toolbar="toolbar" :operate="operate" :param="state.param" :pagination="pagination"
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }"> :row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
</pro-table> </pro-table>
@ -90,6 +90,14 @@
const columns = [{ const columns = [{
dataIndex: "index",
key: "index",
title: "序号",
width: 60,
fixed: 'left',
align: 'center'
},
{
dataIndex: "itemCode", dataIndex: "itemCode",
key: "itemCode", key: "itemCode",
title: "明细号", title: "明细号",

View File

@ -31,7 +31,7 @@
</div> </div>
<a-row :gutter="[0, 0]"> <a-row :gutter="[0, 0]">
<a-col style="width: 100%;"> <a-col style="width: 100%;">
<pro-table style="margin-top: 10px" ref="tableChilrenRef" rowKey="id" :fetch="fetch" :columns="columns" <pro-table ref="tableChilrenRef" rowKey="id" :fetch="fetch" :columns="columns"
:operate="operate" :param="state.param" :pagination="pagination"> :operate="operate" :param="state.param" :pagination="pagination">
</pro-table> </pro-table>
</a-col> </a-col>
@ -112,6 +112,14 @@
}; };
const columns = [{ const columns = [{
dataIndex: "index",
key: "index",
title: "序号",
width: 60,
fixed: 'left',
align: 'center'
},
{
dataIndex: "palletCode", dataIndex: "palletCode",
key: "palletCode", key: "palletCode",
title: "托盘号", title: "托盘号",

View File

@ -59,6 +59,14 @@
/// ///
const columns = ref( const columns = ref(
[{ [{
dataIndex: "index",
key: "index",
title: "序号",
width: 60,
fixed: 'left',
align: 'center'
},
{
dataIndex: "houseCode", dataIndex: "houseCode",
key: "houseCode", key: "houseCode",
title: "仓库号", title: "仓库号",
@ -98,7 +106,7 @@
dataIndex: "ext1", dataIndex: "ext1",
key: "ext1", key: "ext1",
title: "MES要货令", title: "MES要货令",
width: 120, width: 170,
showSearch: true, showSearch: true,
sorter: true, sorter: true,
ellipsis: true ellipsis: true
@ -107,7 +115,7 @@
dataIndex: "ext2", dataIndex: "ext2",
key: "ext2", key: "ext2",
title: "AGV任务编号", title: "AGV任务编号",
width: 120, width: 170,
showSearch: true, showSearch: true,
sorter: true, sorter: true,
}, },
@ -217,14 +225,14 @@
dataIndex: "targetLocParent", dataIndex: "targetLocParent",
key: "targetLocParent", key: "targetLocParent",
title: "目标位置父节点", title: "目标位置父节点",
width: 150, width: 180,
showSearch: true, showSearch: true,
}, },
{ {
dataIndex: "targetLocWcs", dataIndex: "targetLocWcs",
key: "targetLocWcs", key: "targetLocWcs",
title: "WCS目标地址", title: "WCS目标地址",
width: 150, width: 170,
}, },
{ {
dataIndex: "invoiceCode", dataIndex: "invoiceCode",
@ -515,6 +523,7 @@
const toolbar = [{ const toolbar = [{
label: "新增", label: "新增",
code: "wms:task:add", code: "wms:task:add",
icon: 'PlusOutlined',
event: function() { event: function() {
state.visibleSave = true state.visibleSave = true
} }
@ -530,6 +539,7 @@
{ {
label: "下发", label: "下发",
code: "wms:task:taskSend", code: "wms:task:taskSend",
icon: 'SendOutlined',
event: function() { event: function() {
taskSendMethod(state.selectedRowKeys[0]) taskSendMethod(state.selectedRowKeys[0])
} }
@ -537,6 +547,7 @@
{ {
label: "完成", label: "完成",
code: "wms:task:taskOver", code: "wms:task:taskOver",
icon: 'CheckOutlined',
event: function() { event: function() {
taskOverMethod(state.selectedRowKeys[0]) taskOverMethod(state.selectedRowKeys[0])
} }
@ -544,6 +555,8 @@
{ {
label: "取消", label: "取消",
code: "wms:task:taskCancel", code: "wms:task:taskCancel",
icon: 'StopOutlined',
danger: true,
event: function() { event: function() {
taskCancelMethod(state.selectedRowKeys[0]) taskCancelMethod(state.selectedRowKeys[0])
} }

View File

@ -57,6 +57,14 @@
/// ///
const columns = ref( const columns = ref(
[{ [{
dataIndex: "index",
key: "index",
title: "序号",
width: 60,
fixed: 'left',
align: 'center'
},
{
dataIndex: "houseCode", dataIndex: "houseCode",
key: "houseCode", key: "houseCode",
title: "仓库号", title: "仓库号",

View File

@ -15,23 +15,23 @@
<a-col :span="24" style="height: 100%;"> <a-col :span="24" style="height: 100%;">
<a-card style="width: 100%;"> <a-card style="width: 100%;">
<!-- 托盘库存视图记录列表 --> <!-- 托盘库存视图记录列表 -->
<!-- <pro-table style="margin-top: 10px" rowKey="id" ref="tableRef" :fetch="fetch" :columns="pageParam.columns" <!-- <pro-table rowKey="id" ref="tableRef" :fetch="fetch" :columns="pageParam.columns"
:toolbar="toolbar" :operate="operate" :param="state.param" :pagination="pagination" :toolbar="toolbar" :operate="operate" :param="state.param" :pagination="pagination"
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }"> :row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
</pro-table> --> </pro-table> -->
<a-table :columns="pageParam.columns" :data-source="datas" :pagination="pagination" <a-table :columns="pageParam.columns" :data-source="datas" :pagination="pagination"
style="margin-top: 10px" /> />
</a-card> </a-card>
</a-col> </a-col>
<a-col :span="24" style="height: 100%;"> <a-col :span="24" style="height: 100%;">
<a-card style="width: 100%;"> <a-card style="width: 100%;">
<!-- 托盘库存视图记录列表 --> <!-- 托盘库存视图记录列表 -->
<!-- <pro-table style="margin-top: 10px" rowKey="id" ref="tableRef" :fetch="fetch" :columns="pageParam.columns" <!-- <pro-table rowKey="id" ref="tableRef" :fetch="fetch" :columns="pageParam.columns"
:toolbar="toolbar" :operate="operate" :param="state.param" :pagination="pagination" :toolbar="toolbar" :operate="operate" :param="state.param" :pagination="pagination"
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }"> :row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
</pro-table> --> </pro-table> -->
<!-- <a-table :columns="pageParam.columns" :data-source="datas" style="margin-top: 10px" /> --> <!-- <a-table :columns="pageParam.columns" :data-source="datas" /> -->
</a-card> </a-card>
</a-col> </a-col>

View File

@ -15,22 +15,22 @@
<a-col :span="24" style="height: 100%;"> <a-col :span="24" style="height: 100%;">
<a-card style="width: 100%;"> <a-card style="width: 100%;">
<!-- 托盘库存视图记录列表 --> <!-- 托盘库存视图记录列表 -->
<pro-table style="margin-top: 10px" rowKey="id" ref="tableRef" :fetch="fetch" :columns="pageParam.columns" <pro-table rowKey="id" ref="tableRef" :fetch="fetch" :columns="pageParam.columns"
:toolbar="toolbar" :operate="operate" :param="state.param" :pagination="pagination" :toolbar="toolbar" :operate="operate" :param="state.param" :pagination="pagination"
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }"> :row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
</pro-table> </pro-table>
<a-table :columns="pageParam.columns" :data-source="datas" style="margin-top: 10px" /> <a-table :columns="pageParam.columns" :data-source="datas" />
</a-card> </a-card>
</a-col> </a-col>
<a-col :span="24" style="height: 100%;"> <a-col :span="24" style="height: 100%;">
<a-card style="width: 100%;"> <a-card style="width: 100%;">
<!-- 托盘库存视图记录列表 --> <!-- 托盘库存视图记录列表 -->
<!-- <pro-table style="margin-top: 10px" rowKey="id" ref="tableRef" :fetch="fetch" :columns="pageParam.columns" <!-- <pro-table rowKey="id" ref="tableRef" :fetch="fetch" :columns="pageParam.columns"
:toolbar="toolbar" :operate="operate" :param="state.param" :pagination="pagination" :toolbar="toolbar" :operate="operate" :param="state.param" :pagination="pagination"
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }"> :row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
</pro-table> --> </pro-table> -->
<!-- <a-table :columns="pageParam.columns" :data-source="datas" style="margin-top: 10px" /> --> <!-- <a-table :columns="pageParam.columns" :data-source="datas" /> -->
</a-card> </a-card>
</a-col> </a-col>

View File

@ -6,7 +6,7 @@
<a-card style="width: 100%;"> <a-card style="width: 100%;">
<!-- <pro-query :searchParam="searchParam" @on-search="search"></pro-query> --> <!-- <pro-query :searchParam="searchParam" @on-search="search"></pro-query> -->
<!-- 库存统计列表 --> <!-- 库存统计列表 -->
<pro-table style="margin-top: 10px" rowKey="id" ref="tableRef" :fetch="fetch" :columns="columns" <pro-table rowKey="id" ref="tableRef" :fetch="fetch" :columns="columns"
:toolbar="toolbar" :param="state.param" :pagination="pagination"> :toolbar="toolbar" :param="state.param" :pagination="pagination">
</pro-table> </pro-table>
</a-card> </a-card>
@ -40,6 +40,14 @@
const tableRef = ref() const tableRef = ref()
const columns = [{ const columns = [{
dataIndex: "index",
key: "index",
title: "序号",
width: 60,
fixed: 'left',
align: 'center'
},
{
dataIndex: "sku_code", dataIndex: "sku_code",
key: "sku_code", key: "sku_code",
title: "物料编号", title: "物料编号",
@ -71,7 +79,7 @@
const pagination = { const pagination = {
params: { params: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 20,
}, },
reportCode: "InventoryInfo", reportCode: "InventoryInfo",
// showSizeChanger: true, // // showSizeChanger: true, //

View File

@ -58,6 +58,14 @@
}) })
const columns = [{ const columns = [{
dataIndex: "index",
key: "index",
title: "序号",
width: 60,
fixed: 'left',
align: 'center'
},
{
dataIndex: "palletCode", dataIndex: "palletCode",
key: "palletCode", key: "palletCode",
title: "托盘号", title: "托盘号",

View File

@ -1,402 +1,402 @@
<template> <template>
<div> <a-list-layout ref="pageRef">
<page-layout> <!-- 托盘库存视图记录列表 -->
<a-row :gutter="[0,2]"> <pro-table ref="tableRef" :fetch="fetch" :columns="columns" :toolbar="toolbar" :operate="operate"
<a-col :span="24" style="height: 100%;"> :param="state.param" :pagination="pagination" :hasSearch="false"
<a-card style="width: 100%;"> :row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
<!-- 托盘库存视图记录列表 --> </pro-table>
<pro-table style="margin-top: 10px" rowKey="id" ref="tableRef" :fetch="fetch" :columns="columns" </a-list-layout>
:toolbar="toolbar" :operate="operate" :param="state.param" :pagination="pagination"
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
</pro-table>
</a-card>
</a-col>
</a-row>
</page-layout>
</div>
</template> </template>
<script> <script>
import { import {
message, message,
Modal as modal Modal as modal
} from '@hwork/ant-design-vue'; } from '@hwork/ant-design-vue';
import { import {
ExclamationCircleOutlined page,
} from '@ant-design/icons-vue'; remove,
import { removeBatch
page, } from "@/api/wms/inventoryView";
remove, import {
removeBatch reactive,
} from "@/api/wms/inventoryView"; createVNode,
import { ref,
reactive, } from 'vue';
createVNode, const removeKey = "remove";
ref, const removeBatchKey = "removeBatch";
} from 'vue';
const removeKey = "remove";
const removeBatchKey = "removeBatch";
export default { export default {
components: {}, components: {},
setup() { setup() {
const tableRef = ref() const tableRef = ref()
const columns = [{ const columns = [{
dataIndex: "houseCode", dataIndex: "index",
key: "houseCode", key: "index",
title: "仓库号", title: "序号",
width: 90, width: 60,
showSearch: true, fixed: 'left',
}, align: 'center'
// { }, {
// dataIndex: "storageType", dataIndex: "houseCode",
// key: "storageType", key: "houseCode",
// title: "", title: "仓库号",
// width: 200, width: 120,
// }, showSearch: true,
{ },
dataIndex: "palletCode", // {
key: "palletCode", // dataIndex: "storageType",
title: "托盘编号", // key: "storageType",
width: 120, // title: "",
showSearch: true, // width: 200,
}, // },
// { {
// dataIndex: "palletType", dataIndex: "palletCode",
// key: "palletType", key: "palletCode",
// title: "", title: "托盘编号",
// width: 120, width: 120,
// showSearch: true, showSearch: true,
// }, },
{ // {
dataIndex: "skuCode", // dataIndex: "palletType",
key: "skuCode", // key: "palletType",
title: "物料编号", // title: "",
width: 120, // width: 120,
showSearch: true, // showSearch: true,
}, // },
{ {
dataIndex: "skuName", dataIndex: "skuCode",
key: "skuName", key: "skuCode",
title: "物料描述", title: "物料编号",
width: 200, width: 150,
showSearch: true, showSearch: true,
}, },
{ {
dataIndex: "skuType", dataIndex: "skuName",
key: "skuType", key: "skuName",
title: "物料类型", title: "物料描述",
width: 120, width: 200,
showSearch: true, showSearch: true,
}, },
{ {
dataIndex: "batch", dataIndex: "skuType",
key: "batch", key: "skuType",
title: "批次", title: "物料类型",
width: 100, width: 120,
showSearch: true, showSearch: true,
}, },
// { {
// dataIndex: "serial", dataIndex: "batch",
// key: "serial", key: "batch",
// title: "", title: "批次",
// width: 120, width: 100,
// }, showSearch: true,
// { },
// dataIndex: "master", // {
// key: "master", // dataIndex: "serial",
// title: "", // key: "serial",
// width: 100, // title: "",
// showSearch: true, // width: 120,
// }, // },
// { // {
// dataIndex: "producer", // dataIndex: "master",
// key: "producer", // key: "master",
// title: "", // title: "",
// width: 100, // width: 100,
// showSearch: true, // showSearch: true,
// }, // },
{ // {
dataIndex: "customer", // dataIndex: "producer",
key: "customer", // key: "producer",
title: "客户", // title: "",
width: 100, // width: 100,
showSearch: true, // showSearch: true,
}, // },
// { {
// dataIndex: "produceDate", dataIndex: "customer",
// key: "produceDate", key: "customer",
// title: "", title: "客户",
// width: 180, width: 100,
// }, showSearch: true,
// { },
// dataIndex: "overdue", // {
// key: "overdue", // dataIndex: "produceDate",
// title: "", // key: "produceDate",
// width: 180, // title: "",
// }, // width: 180,
{ // },
dataIndex: "skuQty", // {
key: "skuQty", // dataIndex: "overdue",
title: "物料数量", // key: "overdue",
width: 120, // title: "",
showSearch: true, // width: 180,
}, // },
{ {
dataIndex: "baseUnit", dataIndex: "skuQty",
key: "baseUnit", key: "skuQty",
title: "物流单位", title: "物料数量",
width: 120, align: "right",
showSearch: true, width: 120,
}, showSearch: true,
// { },
// dataIndex: "convertQty", {
// key: "convertQty", dataIndex: "baseUnit",
// title: "", key: "baseUnit",
// width: 120, title: "物流单位",
// showSearch: true, width: 120,
// }, showSearch: true,
// { },
// dataIndex: "primaryUnit", // {
// key: "primaryUnit", // dataIndex: "convertQty",
// title: "", // key: "convertQty",
// width: 120, // title: "",
// showSearch: true, // width: 120,
// }, // showSearch: true,
// { // },
// dataIndex: "spInv", // {
// key: "spInv", // dataIndex: "primaryUnit",
// title: "", // key: "primaryUnit",
// width: 100, // title: "",
// dictionary: { // width: 120,
// type: 'tag', // showSearch: true,
// code: 'spInv' // },
// }, // {
// }, // dataIndex: "spInv",
// { // key: "spInv",
// dataIndex: "invType", // title: "",
// key: "invType", // width: 100,
// title: "", // dictionary: {
// width: 120, // type: 'tag',
// }, // code: 'spInv'
// { // },
// dataIndex: "qualityStatus", // },
// key: "qualityStatus", // {
// title: "", // dataIndex: "invType",
// width: 100, // key: "invType",
// dictionary: { // title: "",
// type: 'tag', // width: 120,
// code: 'qualityStatus' // },
// }, // {
// }, // dataIndex: "qualityStatus",
{ // key: "qualityStatus",
dataIndex: "weight", // title: "",
key: "weight", // width: 100,
title: "重量", // dictionary: {
width: 100, // type: 'tag',
}, // code: 'qualityStatus'
{ // },
dataIndex: "weightUnit", // },
key: "weightUnit", {
title: "重量单位", dataIndex: "weight",
width: 120, key: "weight",
}, title: "重量",
{ width: 100,
dataIndex: "sourceLoc", },
key: "sourceLoc", {
title: "源位置", dataIndex: "weightUnit",
width: 120, key: "weightUnit",
}, title: "重量单位",
{ width: 120,
dataIndex: "targetLoc", },
key: "targetLoc", {
title: "目标位置", dataIndex: "sourceLoc",
width: 120, key: "sourceLoc",
}, title: "源位置",
{ width: 120,
dataIndex: "finishDate", },
key: "finishDate", {
title: "完成时间", dataIndex: "targetLoc",
width: 180, key: "targetLoc",
}, title: "目标位置",
// { width: 120,
// dataIndex: "note", },
// key: "note", {
// title: "" dataIndex: "finishDate",
// }, key: "finishDate",
{ title: "完成时间",
dataIndex: "createBy", width: 180,
key: "createBy", },
title: "录入人", // {
width: 120, // dataIndex: "note",
}, // key: "note",
{ // title: ""
dataIndex: "createTime", // },
key: "createTime", {
title: "录入时间", dataIndex: "createBy",
width: 200, key: "createBy",
}, title: "录入人",
{ width: 120,
dataIndex: "updateBy", },
key: "updateBy", {
title: "修改人", dataIndex: "createTime",
width: 120, key: "createTime",
}, title: "录入时间",
{ width: 200,
dataIndex: "updateTime", },
key: "updateTime", {
title: "修改时间", dataIndex: "updateBy",
width: 200, key: "updateBy",
}, title: "修改人",
{ width: 120,
dataIndex: "remark", },
key: "remark", {
title: "备注", dataIndex: "updateTime",
width: 300, key: "updateTime",
}, title: "修改时间",
]; width: 200,
},
{
dataIndex: "remark",
key: "remark",
title: "备注",
width: 300,
},
];
/// [] /// []
const fetch = async (param) => { const fetch = async (param) => {
var response = await page(param); var response = await page(param);
console.log("response", response) console.log("response", response)
return {
total: response.data.total,
data: response.data.record,
};
};
//
const removeMethod = (record) => {
modal.confirm({
title: '您是否确定要删除?',
icon: createVNode(ExclamationCircleOutlined),
okText: '确定',
cancelText: '取消',
onOk() {
message.loading({
content: "提交中...",
key: removeKey
});
remove({
"id": record.id
}).then((response) => {
if (response.success) {
message.success({
content: "删除成功",
key: removeKey,
duration: 1
}).then(() => {
tableRef.value.reload()
})
} else {
message.error({
content: response.msg,
key: removeKey,
duration: 1
})
}
})
}
});
}
//
const removeBatchMethod = (ids) => {
modal.confirm({
title: '您是否确定要删除?',
icon: createVNode(ExclamationCircleOutlined),
okText: '确定',
cancelText: '取消',
onOk() {
message.loading({
content: "提交中...",
key: removeBatchKey
});
removeBatch({
"ids": ids
}).then((response) => {
if (response.success) {
message.success({
content: "删除成功",
key: removeBatchKey,
duration: 1
}).then(() => {
tableRef.value.reload()
})
} else {
message.error({
content: "删除失败",
key: removeBatchKey,
duration: 1
})
}
})
}
});
}
///
const toolbar = [{
label: "删除",
code: remove,
event: function() {
removeBatchMethod(state.selectedRowKeys)
},
type: 'danger'
}, ];
///
const operate = [{
label: "删除",
code: "wms:palletLog:remove",
event: function(record) {
removeMethod(record)
}
}, ];
const pagination = {
pageNum: 1,
pageSize: 20,
showSizeChanger: true, //
pageSizeOptions: ["10", "20", "50", "100"], //
showTotal: total => `${total} 条记录`, //
showSizeChange: (current, pageSize) => (this.pageSize = pageSize) //
};
const state = reactive({
selectedRowKeys: [],
param: {},
});
const search = function(value) {
console.log("主表查询" + JSON.stringify(value))
console.log(value)
state.param = value
tableRef.value.reload()
}
const onSelectChange = selectedRowKeys => {
state.selectedRowKeys = selectedRowKeys;
};
return { return {
state, total: response.data.total,
fetch, data: response.data.record,
search,
toolbar,
columns,
operate,
pagination,
onSelectChange,
tableRef,
}; };
};
//
const removeMethod = (record) => {
modal.confirm({
title: '您是否确定要删除?',
icon: createVNode(ExclamationCircleOutlined),
okText: '确定',
cancelText: '取消',
onOk() {
message.loading({
content: "提交中...",
key: removeKey
});
remove({
"id": record.id
}).then((response) => {
if (response.success) {
message.success({
content: "删除成功",
key: removeKey,
duration: 1
}).then(() => {
tableRef.value.reload()
})
} else {
message.error({
content: response.msg,
key: removeKey,
duration: 1
})
}
})
}
});
}
//
const removeBatchMethod = (ids) => {
modal.confirm({
title: '您是否确定要删除?',
icon: createVNode(ExclamationCircleOutlined),
okText: '确定',
cancelText: '取消',
onOk() {
message.loading({
content: "提交中...",
key: removeBatchKey
});
removeBatch({
"ids": ids
}).then((response) => {
if (response.success) {
message.success({
content: "删除成功",
key: removeBatchKey,
duration: 1
}).then(() => {
tableRef.value.reload()
})
} else {
message.error({
content: "删除失败",
key: removeBatchKey,
duration: 1
})
}
})
}
});
}
///
const toolbar = [{
label: "删除",
code: remove,
event: function () {
removeBatchMethod(state.selectedRowKeys)
},
type: 'danger'
},];
///
const operate = [{
label: "删除",
code: "wms:palletLog:remove",
inventoryViewisDel: true,
isDel: true,
event: function (record) {
removeMethod(record)
}
},];
const pagination = {
pageNum: 1,
pageSize: 20,
showSizeChanger: true, //
pageSizeOptions: ["10", "20", "50", "100"], //
showTotal: total => `${total} 条记录`, //
showSizeChange: (current, pageSize) => (this.pageSize = pageSize) //
};
const state = reactive({
selectedRowKeys: [],
param: {},
});
const search = function (value) {
console.log("主表查询" + JSON.stringify(value))
console.log(value)
state.param = value
tableRef.value.reload()
} }
const onSelectChange = selectedRowKeys => {
state.selectedRowKeys = selectedRowKeys;
};
return {
state,
fetch,
search,
toolbar,
columns,
operate,
pagination,
onSelectChange,
tableRef,
};
} }
// } }
// }
</script> </script>

View File

@ -1,390 +1,401 @@
<template> <template>
<div> <a-list-layout ref="pageRef">
<page-layout> <!-- 列表 -->
<a-row :gutter="[0,2]"> <pro-table rowKey="id" ref="tableRef" :fetch="fetch" :columns="columns" :toolbar="toolbar" :operate="operate"
<a-col :span="24" style="height: 100%;"> :param="state.param" :pagination="pagination" :hasSearch="false"
<a-card style="width: 100%;"> :row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
<!-- 列表 --> </pro-table>
<pro-table rowKey="id" ref="tableRef" :fetch="fetch" :columns="columns" :toolbar="toolbar" <!-- 托盘明细改为抽屉承载统一交互与高度管理 -->
:operate="operate" :param="state.param" :pagination="pagination" <a-drawer
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }"> :visible="state.visiblePalletDetail"
</pro-table> :width="720"
</a-card> title="托盘明细"
</a-col> destroyOnClose
<a-col :span="24" style="height: 70%;"> @close="state.visiblePalletDetail = false"
<a-card style="width: 100%;"> >
<viewPalletDetail :visible="state.visiblePalletDetail" :record="state.recordPalletDetail" <viewPalletDetail
:projectReload="projectReload"> :visible="true"
</viewPalletDetail> :record="state.recordPalletDetail"
</a-card> :projectReload="projectReload"
</a-col> @close="state.visiblePalletDetail = false"
</a-row> />
</page-layout> </a-drawer>
</a-list-layout>
<save :visible="state.visibleSave" @close="closeSave"></save> <save :visible="state.visibleSave" @close="closeSave"></save>
<checkOut :visible="state.visibleCheck" :palletInfo="state.checkOutPalletInfo" @close="closeCheck"></checkOut> <checkOut :visible="state.visibleCheck" :palletInfo="state.checkOutPalletInfo" @close="closeCheck"></checkOut>
<edit :visible="state.visibleEdit" @close="closeEdit" :record="state.recordEdit"></edit> <edit :visible="state.visibleEdit" @close="closeEdit" :record="state.recordEdit"></edit>
<child @fatherMethod="fatherMethod"></child> <child @fatherMethod="fatherMethod"></child>
</div>
</template> </template>
<script> <script>
import save from './modal/save.vue'; import save from './modal/save.vue';
import edit from './modal/edit.vue'; import edit from './modal/edit.vue';
import checkOut from './modal/checkOut.vue'; import checkOut from './modal/checkOut.vue';
import palletDetail from './modal/palletDetail.vue'; import palletDetail from './modal/palletDetail.vue';
import { import {
message, message,
Modal as modal Modal as modal
} from '@hwork/ant-design-vue'; } from '@hwork/ant-design-vue';
import { import {
ExclamationCircleOutlined ExclamationCircleOutlined
} from '@ant-design/icons-vue'; } from '@ant-design/icons-vue';
import { import {
page, page,
remove, remove,
removeBatch removeBatch
} from "@/api/wms/pallet"; } from "@/api/wms/pallet";
import { import {
reactive, reactive,
createVNode, createVNode,
ref, ref,
} from 'vue'; } from 'vue';
const removeKey = "remove"; const removeKey = "remove";
const removeBatchKey = "removeBatch"; const removeBatchKey = "removeBatch";
const showCheckOutModelKey = "showCheckOutModel"; const showCheckOutModelKey = "showCheckOutModel";
export default { export default {
components: { components: {
save, save,
edit, edit,
checkOut, checkOut,
viewPalletDetail: palletDetail, viewPalletDetail: palletDetail,
},
setup() {
const tableRef = ref()
const switchFormat = {
yes: true,
no: false,
event: function (value, record) {
record.enable = !record.enable;
return value;
}
}
const columns = [{
dataIndex: "index",
key: "index",
title: "序号",
width: 60,
fixed: 'left',
align: 'center'
}, },
setup() { {
dataIndex: "palletCode",
const tableRef = ref() key: "palletCode",
title: "托盘号",
const switchFormat = { width: 120,
yes: true, showSearch: true,
no: false, },
event: function(value, record) { {
record.enable = !record.enable; dataIndex: "palletType",
return value; key: "palletType",
} title: "托盘类型",
} width: 120,
},
const columns = [{ {
dataIndex: "palletCode", dataIndex: "sizeType",
key: "palletCode", key: "sizeType",
title: "托盘号", title: "托盘大小",
width: 120, width: 120,
showSearch: true, },
}, {
{ dataIndex: "fullFlag",
dataIndex: "palletType", key: "fullFlag",
key: "palletType", title: "满盘标志",
title: "托盘类型", width: 120,
width: 120, dictionary: {
}, type: 'tag',
{ code: 'FullFlag'
dataIndex: "sizeType",
key: "sizeType",
title: "托盘大小",
width: 120,
},
{
dataIndex: "fullFlag",
key: "fullFlag",
title: "满盘标志",
width: 120,
dictionary: {
type: 'tag',
code: 'FullFlag'
}
},
{
dataIndex: "locCode",
key: "locCode",
title: "托盘位置",
width: 150,
showSearch: true,
},
{
dataIndex: "status",
key: "status",
title: "托盘状态",
width: 100,
},
{
dataIndex: "jobFlag",
key: "jobFlag",
title: "任务标志",
width: 100
},
{
dataIndex: "createBy",
key: "createBy",
title: "录入人",
width: 100,
},
{
dataIndex: "createTime",
key: "createTime",
title: "录入时间",
width: 180,
},
{
dataIndex: "updateBy",
key: "updateBy",
title: "修改人",
width: 100,
},
{
dataIndex: "updateTime",
key: "updateTime",
title: "修改时间",
width: 180,
},
{
dataIndex: "remark",
key: "remark",
title: "备注",
width: 200,
},
];
/// []
const fetch = async (param) => {
var response = await page(param);
console.log("response", response)
return {
total: response.data.total,
data: response.data.record,
};
};
//
const removeMethod = (record) => {
modal.confirm({
title: '您是否确定要删除?',
icon: createVNode(ExclamationCircleOutlined),
okText: '确定',
cancelText: '取消',
onOk() {
message.loading({
content: "提交中...",
key: removeKey
});
remove({
"id": record.id
}).then((response) => {
if (response.success) {
message.success({
content: "删除成功",
key: removeKey,
duration: 1
}).then(() => {
tableRef.value.reload()
})
} else {
message.error({
content: response.msg,
key: removeKey,
duration: 1
})
}
})
}
});
}
//
const removeBatchMethod = (ids) => {
modal.confirm({
title: '您是否确定要删除?',
icon: createVNode(ExclamationCircleOutlined),
okText: '确定',
cancelText: '取消',
onOk() {
message.loading({
content: "提交中...",
key: removeBatchKey
});
removeBatch({
"ids": ids
}).then((response) => {
if (response.success) {
message.success({
content: "删除成功",
key: removeBatchKey,
duration: 1
}).then(() => {
tableRef.value.reload()
})
} else {
message.error({
content: "删除失败",
key: removeBatchKey,
duration: 1
})
}
})
}
});
}
//
const showPickOutModel = () => {
//
if (state.selectedRowKeys.length == 0) {
message.error({
content: "请想选择需要抽检出库的托盘",
key: showCheckOutModelKey,
duration: 2
})
return;
}
if (state.selectedRowKeys.length > 1) {
message.error({
content: "一次操作只能抽检出一个托盘",
key: showCheckOutModelKey,
duration: 2
})
return;
}
state.checkOutPalletInfo = state.selectedRows[0]
if (state.checkOutPalletInfo.locCode.length < 9) {
message.error({
content: "托盘所在位置为【"+state.checkOutPalletInfo.locCode+"】禁止抽检出库,只有货位上的托盘允许",
key: showCheckOutModelKey,
duration: 2
})
return;
}
if (state.checkOutPalletInfo.jobFlag.length > 0) {
message.error({
content: "托盘存在未完成的任务【"+state.checkOutPalletInfo.jobFlag+"】请检查",
key: showCheckOutModelKey,
duration: 2
})
return;
}
state.visibleCheck = true
}
///
const toolbar = [
// {
// label: "",
// code: "wms:pallet:add",
// event: function() {
// state.visibleSave = true
// }
// },
// {
// label: "",
// code: "wms:pallet:removeBatch",
// event: function() {
// removeBatchMethod(state.selectedRowKeys)
// },
// type: 'danger'
// },
// {
// label: "",
// code: "wms:pallet:checkOut",
// event: function() {
// showPickOutModel()
// },
// type: 'danger'
// },
];
///
const operate = [{
label: "查看明细",
event: function(record) {
state.visiblePalletDetail = true, state.recordPalletDetail = record
}
},
{
label: "删除",
code: "wms:pallet:remove",
event: function(record) {
removeMethod(record)
}
},
];
const pagination = {
pageNum: 1,
pageSize: 20,
showSizeChanger: true, //
pageSizeOptions: ["10", "20", "50", "100"], //
showTotal: total => `${total} 条记录`, //
showSizeChange: (current, pageSize) => (this.pageSize = pageSize) //
}
const state = reactive({
selectedRowKeys: [],
selectedRows: [],
param: {},
visibleEdit: false,
visibleSave: false,
visibleCheck: false,
visiblePalletDetail: false,
recordPalletDetail: {},
recordEdit: {},
checkOutPalletInfo: {}, //
});
const search = function(value) {
console.log("主表查询" + JSON.stringify(value))
console.log(value)
state.param = value
tableRef.value.reload()
}
const onSelectChange = (selectedRowKeys, selectedRows) => {
state.selectedRowKeys = selectedRowKeys;
state.selectedRows = selectedRows;
};
const closeSave = function() {
state.visibleSave = false
tableRef.value.reload()
}
const closeEdit = function() {
state.visibleEdit = false
tableRef.value.reload()
}
const closeCheck = function() {
state.visibleCheck = false
tableRef.value.reload()
} }
},
{
dataIndex: "locCode",
key: "locCode",
title: "托盘位置",
width: 150,
showSearch: true,
},
{
dataIndex: "status",
key: "status",
title: "托盘状态",
width: 100,
},
{
dataIndex: "jobFlag",
key: "jobFlag",
title: "任务标志",
width: 100
},
{
dataIndex: "createBy",
key: "createBy",
title: "录入人",
width: 100,
},
{
dataIndex: "createTime",
key: "createTime",
title: "录入时间",
width: 180,
},
{
dataIndex: "updateBy",
key: "updateBy",
title: "修改人",
width: 100,
},
{
dataIndex: "updateTime",
key: "updateTime",
title: "修改时间",
width: 180,
},
{
dataIndex: "remark",
key: "remark",
title: "备注",
width: 200,
},
];
/// []
const fetch = async (param) => {
var response = await page(param);
console.log("response", response)
return { return {
state, total: response.data.total,
fetch, data: response.data.record,
search,
toolbar,
columns,
operate,
closeSave,
closeEdit,
closeCheck,
pagination,
onSelectChange,
tableRef,
}; };
};
//
const removeMethod = (record) => {
modal.confirm({
title: '您是否确定要删除?',
icon: createVNode(ExclamationCircleOutlined),
okText: '确定',
cancelText: '取消',
onOk() {
message.loading({
content: "提交中...",
key: removeKey
});
remove({
"id": record.id
}).then((response) => {
if (response.success) {
message.success({
content: "删除成功",
key: removeKey,
duration: 1
}).then(() => {
tableRef.value.reload()
})
} else {
message.error({
content: response.msg,
key: removeKey,
duration: 1
})
}
})
}
});
}
//
const removeBatchMethod = (ids) => {
modal.confirm({
title: '您是否确定要删除?',
icon: createVNode(ExclamationCircleOutlined),
okText: '确定',
cancelText: '取消',
onOk() {
message.loading({
content: "提交中...",
key: removeBatchKey
});
removeBatch({
"ids": ids
}).then((response) => {
if (response.success) {
message.success({
content: "删除成功",
key: removeBatchKey,
duration: 1
}).then(() => {
tableRef.value.reload()
})
} else {
message.error({
content: "删除失败",
key: removeBatchKey,
duration: 1
})
}
})
}
});
}
//
const showPickOutModel = () => {
//
if (state.selectedRowKeys.length == 0) {
message.error({
content: "请想选择需要抽检出库的托盘",
key: showCheckOutModelKey,
duration: 2
})
return;
}
if (state.selectedRowKeys.length > 1) {
message.error({
content: "一次操作只能抽检出一个托盘",
key: showCheckOutModelKey,
duration: 2
})
return;
}
state.checkOutPalletInfo = state.selectedRows[0]
if (state.checkOutPalletInfo.locCode.length < 9) {
message.error({
content: "托盘所在位置为【" + state.checkOutPalletInfo.locCode + "】禁止抽检出库,只有货位上的托盘允许",
key: showCheckOutModelKey,
duration: 2
})
return;
}
if (state.checkOutPalletInfo.jobFlag.length > 0) {
message.error({
content: "托盘存在未完成的任务【" + state.checkOutPalletInfo.jobFlag + "】请检查",
key: showCheckOutModelKey,
duration: 2
})
return;
}
state.visibleCheck = true
}
///
const toolbar = [
// {
// label: "",
// code: "wms:pallet:add",
// event: function() {
// state.visibleSave = true
// }
// },
// {
// label: "",
// code: "wms:pallet:removeBatch",
// event: function() {
// removeBatchMethod(state.selectedRowKeys)
// },
// type: 'danger'
// },
// {
// label: "",
// code: "wms:pallet:checkOut",
// event: function() {
// showPickOutModel()
// },
// type: 'danger'
// },
];
///
const operate = [{
label: "查看明细",
event: function (record) {
state.visiblePalletDetail = true, state.recordPalletDetail = record
}
},
{
label: "删除",
code: "wms:pallet:remove",
isDel: true,
event: function (record) {
removeMethod(record)
}
},
];
const pagination = {
pageNum: 1,
pageSize: 20,
showSizeChanger: true, //
pageSizeOptions: ["10", "20", "50", "100"], //
showTotal: total => `${total} 条记录`, //
showSizeChange: (current, pageSize) => (this.pageSize = pageSize) //
}
const state = reactive({
selectedRowKeys: [],
selectedRows: [],
param: {},
visibleEdit: false,
visibleSave: false,
visibleCheck: false,
visiblePalletDetail: false,
recordPalletDetail: {},
recordEdit: {},
checkOutPalletInfo: {}, //
});
const search = function (value) {
console.log("主表查询" + JSON.stringify(value))
console.log(value)
state.param = value
tableRef.value.reload()
} }
const onSelectChange = (selectedRowKeys, selectedRows) => {
state.selectedRowKeys = selectedRowKeys;
state.selectedRows = selectedRows;
};
const closeSave = function () {
state.visibleSave = false
tableRef.value.reload()
}
const closeEdit = function () {
state.visibleEdit = false
tableRef.value.reload()
}
const closeCheck = function () {
state.visibleCheck = false
tableRef.value.reload()
}
return {
state,
fetch,
search,
toolbar,
columns,
operate,
closeSave,
closeEdit,
closeCheck,
pagination,
onSelectChange,
tableRef,
};
} }
}
</script> </script>

View File

@ -1,15 +1,9 @@
<template> <template>
<div> <div class="drawer-table">
<page-layout>
<a-row :gutter="[0,2]">
<a-col style="width: 100%;">
<pro-table v-if="visible" ref="tableChilrenRef" rowKey="id" :fetch="fetch" <pro-table v-if="visible" ref="tableChilrenRef" rowKey="id" :fetch="fetch"
:columns="columns" :toolbar="toolbar" :operate="operate" :param="state.param" :pagination="pagination" :columns="columns" :toolbar="toolbar" :operate="operate" :param="state.param" :pagination="pagination"
:row-selection="{ selectedRowKeys:state.selectedRowKeys, onChange: onSelectChange }"> :row-selection="{ selectedRowKeys:state.selectedRowKeys, onChange: onSelectChange }">
</pro-table> </pro-table>
</a-col>
</a-row>
</page-layout>
<saveDetail :visible="state.visibleSave" @close="closeSave" :record="state.recordSave"></saveDetail> <saveDetail :visible="state.visibleSave" @close="closeSave" :record="state.recordSave"></saveDetail>
<editDetail :visible="state.visibleEdit" @close="closeEdit" :record="state.recordEdit"></editDetail> <editDetail :visible="state.visibleEdit" @close="closeEdit" :record="state.recordEdit"></editDetail>
</div> </div>
@ -64,6 +58,14 @@
}) })
const columns = [{ const columns = [{
dataIndex: "index",
key: "index",
title: "序号",
width: 60,
fixed: 'left',
align: 'center'
},
{
dataIndex: "palletCode", dataIndex: "palletCode",
key: "palletCode", key: "palletCode",
title: "托盘号", title: "托盘号",
@ -431,3 +433,36 @@
}, },
}; };
</script> </script>
<style scoped>
.drawer-table {
height: 100%;
display: flex;
flex-direction: column;
}
/* 让 pro-table 自适应填满抽屉高度y:'flex' 将根据容器高度计算 */
.drawer-table :deep(#pro-table) {
flex: 1;
display: flex;
flex-direction: column;
min-height: 0;
}
.drawer-table :deep(#pro-table .pro-table-tool) {
/* 工具栏保持自然高度 */
flex: none;
}
.drawer-table :deep(#pro-table .ant-table-wrapper),
.drawer-table :deep(#pro-table .ant-spin-nested-loading),
.drawer-table :deep(#pro-table .ant-spin-container),
.drawer-table :deep(#pro-table .ant-table),
.drawer-table :deep(#pro-table .ant-table-container) {
flex: 1;
min-height: 0;
display: flex;
flex-direction: column;
}
.drawer-table :deep(#pro-table .ant-table-body) {
/* 当 y:'flex' 时,内部会使用 flex 高度,这里保证最小高度与滚动行为 */
flex: 1;
min-height: 0;
}
</style>

View File

@ -4,7 +4,7 @@
<pro-query :searchParam="searchParam" @on-search="search"></pro-query> <pro-query :searchParam="searchParam" @on-search="search"></pro-query>
</template> </template>
<!-- 托盘出入库记录列表 --> <!-- 托盘出入库记录列表 -->
<pro-table style="margin-top: 10px" rowKey="id" ref="tableRef" :fetch="fetch" :columns="columns" :toolbar="toolbar" <pro-table rowKey="id" ref="tableRef" :fetch="fetch" :columns="columns" :toolbar="toolbar"
:operate="operate" :param="state.param" :pagination="pagination"> :operate="operate" :param="state.param" :pagination="pagination">
</pro-table> </pro-table>
</a-list-layout> </a-list-layout>
@ -37,7 +37,15 @@ export default {
const tableRef = ref() const tableRef = ref()
const columns = [{ const columns = [
{
dataIndex: "index",
key: "index",
title: "序号",
width: 60,
fixed: 'left',
align: 'center'
},{
dataIndex: "palletCode", dataIndex: "palletCode",
key: "palletCode", key: "palletCode",
title: "托盘号", title: "托盘号",
@ -55,14 +63,14 @@ export default {
dataIndex: "taskCode", dataIndex: "taskCode",
key: "taskCode", key: "taskCode",
title: "任务号", title: "任务号",
width: 90, width: 120,
showSearch: true, showSearch: true,
}, },
{ {
dataIndex: "directFlag", dataIndex: "directFlag",
key: "directFlag", key: "directFlag",
title: "方向标志", title: "方向标志",
width: 80, width: 100,
dictionary: { dictionary: {
type: 'tag', type: 'tag',
code: 'DirectFlag' code: 'DirectFlag'
@ -72,13 +80,13 @@ export default {
dataIndex: "skuType", dataIndex: "skuType",
key: "skuType", key: "skuType",
title: "物料类型", title: "物料类型",
width: 80, width: 100,
}, },
{ {
dataIndex: "skuCode", dataIndex: "skuCode",
key: "skuCode", key: "skuCode",
title: "物料编号", title: "物料编号",
width: 120, width: 160,
showSearch: true, showSearch: true,
}, },
{ {
@ -140,14 +148,15 @@ export default {
dataIndex: "skuQty", dataIndex: "skuQty",
key: "skuQty", key: "skuQty",
title: "物料数量", title: "物料数量",
width: 100, align: 'right',
width: 120,
showSearch: true, showSearch: true,
}, },
{ {
dataIndex: "baseUnit", dataIndex: "baseUnit",
key: "baseUnit", key: "baseUnit",
title: "物流单位", title: "物流单位",
width: 100, width: 120,
showSearch: true, showSearch: true,
}, },
// { // {
@ -208,7 +217,7 @@ export default {
dataIndex: "sourceLoc", dataIndex: "sourceLoc",
key: "sourceLoc", key: "sourceLoc",
title: "源位置", title: "源位置",
width: 120, width: 150,
showSearch: true, showSearch: true,
}, },
{ {
@ -258,7 +267,7 @@ export default {
dataIndex: "remark", dataIndex: "remark",
key: "remark", key: "remark",
title: "备注", title: "备注",
width: 300, width: 250,
}, },
]; ];

View File

@ -50,6 +50,14 @@
/// ///
const columns = [{ const columns = [{
dataIndex: "index",
key: "index",
title: "序号",
width: 60,
fixed: 'left',
align: 'center'
},
{
dataIndex: "skuCode", dataIndex: "skuCode",
key: "skuCode", key: "skuCode",
title: "物料编号", title: "物料编号",

View File

@ -64,6 +64,14 @@
/// ///
const columns = [{ const columns = [{
dataIndex: "index",
key: "index",
title: "序号",
width: 60,
fixed: 'left',
align: 'center'
},
{
dataIndex: "item", dataIndex: "item",
key: "item", key: "item",
title: "列表项", title: "列表项",
@ -340,13 +348,13 @@
if (item === 'list') { if (item === 'list') {
search({ search({
pageNum: 1, pageNum: 1,
pageSize: 10 pageSize: 20
}) })
} else { } else {
search({ //fetchsearch search({ //fetchsearch
item: item, item: item,
pageNum: 1, pageNum: 1,
pageSize: 10 pageSize: 20
}) })
} }
} }

File diff suppressed because it is too large Load Diff

View File

@ -66,6 +66,14 @@
/// ///
const columns = [{ const columns = [{
dataIndex: "index",
key: "index",
title: "序号",
width: 60,
fixed: 'left',
align: 'center'
},
{
dataIndex: "equipCode", dataIndex: "equipCode",
key: "equipCode", key: "equipCode",
title: "设备号", title: "设备号",
@ -79,7 +87,7 @@
key: "sourceLoc", key: "sourceLoc",
title: "起始地址", title: "起始地址",
showSearch: true, showSearch: true,
width: 100, width: 140,
sorter: { sorter: {
multiple: 1, multiple: 1,
}, },
@ -89,7 +97,7 @@
key: "targetLoc", key: "targetLoc",
title: "目标地址", title: "目标地址",
showSearch: true, showSearch: true,
width: 100, width: 120,
}, },
{ {
dataIndex: "equipType", dataIndex: "equipType",
@ -131,7 +139,8 @@
dataIndex: "taskLimit", dataIndex: "taskLimit",
key: "taskLimit", key: "taskLimit",
title: "任务数限制", title: "任务数限制",
width: 120 width: 120,
align: 'right'
}, },
{ {
dataIndex: "equipStatus", dataIndex: "equipStatus",
@ -254,6 +263,7 @@
const toolbar = [{ const toolbar = [{
label: "新增", label: "新增",
code: 'wms:locExit:add', code: 'wms:locExit:add',
icon: 'PlusOutlined',
event: function() { event: function() {
state.visibleSave = true state.visibleSave = true
} }
@ -261,10 +271,11 @@
{ {
label: "删除", label: "删除",
code: 'wms:locExit:remove', code: 'wms:locExit:remove',
icon: 'DeleteOutlined',
danger: true,
event: function() { event: function() {
removeBatchMethod(state.selectedRowKeys) removeBatchMethod(state.selectedRowKeys)
}, },
type: 'danger'
}, },
]; ];

View File

@ -66,6 +66,14 @@
/// ///
const columns = [{ const columns = [{
dataIndex: "index",
key: "index",
title: "序号",
width: 60,
fixed: 'left',
align: 'center'
},
{
dataIndex: "treeCode", dataIndex: "treeCode",
key: "treeCode", key: "treeCode",
title: "父节点", title: "父节点",
@ -457,7 +465,7 @@
search({ //fetchsearch search({ //fetchsearch
treeCode: treeCode, treeCode: treeCode,
pageNum: 1, pageNum: 1,
pageSize: 10 pageSize: 20
}) })
} }

View File

@ -40,6 +40,14 @@
/// ///
const columns = [{ const columns = [{
dataIndex: "index",
key: "index",
title: "序号",
width: 60,
fixed: 'left',
align: 'center'
},
{
dataIndex: "outboundNo", dataIndex: "outboundNo",
key: "outboundNo", key: "outboundNo",
title: "需求编号", title: "需求编号",

View File

@ -50,6 +50,14 @@
/// ///
const columns = [{ const columns = [{
dataIndex: "index",
key: "index",
title: "序号",
width: 60,
fixed: 'left',
align: 'center'
},
{
dataIndex: "skuCode", dataIndex: "skuCode",
key: "skuCode", key: "skuCode",
title: "物料编号", title: "物料编号",

View File

@ -50,6 +50,14 @@
/// ///
const columns = [{ const columns = [{
dataIndex: "index",
key: "index",
title: "序号",
width: 60,
fixed: 'left',
align: 'center'
},
{
dataIndex: "seqCode", dataIndex: "seqCode",
key: "seqCode", key: "seqCode",
title: "值编号", title: "值编号",
@ -67,6 +75,7 @@
dataIndex: "minValue", dataIndex: "minValue",
key: "minValue", key: "minValue",
title: "起始值", title: "起始值",
align: 'right',
width: 150, width: 150,
showSearch:true showSearch:true
}, },
@ -74,6 +83,7 @@
dataIndex: "incValue", dataIndex: "incValue",
key: "incValue", key: "incValue",
title: "自增值", title: "自增值",
align: 'right',
width: 150, width: 150,
showSearch:true showSearch:true
}, },
@ -81,12 +91,14 @@
dataIndex: "maxValue", dataIndex: "maxValue",
key: "maxValue", key: "maxValue",
title: "最大值", title: "最大值",
align: 'right',
width: 150, width: 150,
showSearch:true showSearch:true
}, },
{ {
dataIndex: "currValue", dataIndex: "currValue",
key: "currValue", key: "currValue",
align: 'right',
title: "当前值", title: "当前值",
width: 150, width: 150,
showSearch:true showSearch:true
@ -229,6 +241,7 @@
const toolbar = [{ const toolbar = [{
label: "新增", label: "新增",
code: 'wms:seqNum:add', code: 'wms:seqNum:add',
icon: 'PlusOutlined',
event: function() { event: function() {
state.visibleSave = true state.visibleSave = true
} }
@ -239,7 +252,8 @@
event: function() { event: function() {
removeBatchMethod(state.selectedRowKeys) removeBatchMethod(state.selectedRowKeys)
}, },
type: 'danger' icon: 'DeleteOutlined',
danger: true,
}, },
]; ];

View File

@ -50,6 +50,14 @@
/// ///
const columns = [{ const columns = [{
dataIndex: "index",
key: "index",
title: "序号",
width: 60,
fixed: 'left',
align: 'center'
},
{
dataIndex: "snCode", dataIndex: "snCode",
key: "snCode", key: "snCode",
title: "物料条码", title: "物料条码",

View File

@ -50,6 +50,14 @@
/// ///
const columns = [{ const columns = [{
dataIndex: "index",
key: "index",
title: "序号",
width: 60,
fixed: 'left',
align: 'center'
},
{
dataIndex: "snCode", dataIndex: "snCode",
key: "snCode", key: "snCode",
title: "物料条码", title: "物料条码",

View File

@ -50,6 +50,14 @@
/// ///
const columns = [{ const columns = [{
dataIndex: "index",
key: "index",
title: "序号",
width: 60,
fixed: 'left',
align: 'center'
},
{
dataIndex: "snCode", dataIndex: "snCode",
key: "snCode", key: "snCode",
title: "物料条码", title: "物料条码",

View File

@ -37,6 +37,14 @@
const tableRef = ref(); const tableRef = ref();
/// ///
const columns = [{ const columns = [{
dataIndex: "index",
key: "index",
title: "序号",
width: 60,
fixed: 'left',
align: 'center'
},
{
dataIndex: "skuType", dataIndex: "skuType",
key: "skuType", key: "skuType",
title: "物料类别", title: "物料类别",
@ -55,6 +63,8 @@
}, },
{ {
dataIndex: "skuQty", dataIndex: "skuQty",
width: 120,
align: 'right',
key: "skuQty", key: "skuQty",
title: "物料库存", title: "物料库存",
} }

View File

@ -25,7 +25,6 @@
ref ref
} from 'vue'; } from 'vue';
export default { export default {
components: { components: {
save, save,
@ -36,16 +35,24 @@
const tableRef = ref(); const tableRef = ref();
/// ///
const columns = [{ const columns = [{
dataIndex: "index",
key: "index",
title: "序号",
width: 60,
fixed: 'left',
align: 'center'
},
{
dataIndex: "date", dataIndex: "date",
key: "date", key: "date",
title: "日期", title: "日期",
width: 60 width: 120
}, },
{ {
dataIndex: "skuCode", dataIndex: "skuCode",
key: "skuCode", key: "skuCode",
title: "物料编号", title: "物料编号",
width: 80 width: 150
}, },
{ {
dataIndex: "skuName", dataIndex: "skuName",
@ -56,32 +63,36 @@
{ {
dataIndex: "totalSkuNeedQty", dataIndex: "totalSkuNeedQty",
key: "totalSkuNeedQty", key: "totalSkuNeedQty",
align: 'right',
title: "总需求数量", title: "总需求数量",
width: 80 width: 120
}, },
{ {
dataIndex: "mesLocCode", dataIndex: "mesLocCode",
key: "mesLocCode", key: "mesLocCode",
title: "接收工位", title: "接收工位",
width: 80 width: 150
}, },
{ {
dataIndex: "totalSkuJoinQty", dataIndex: "totalSkuJoinQty",
key: "totalSkuJoinQty", key: "totalSkuJoinQty",
align: 'right',
title: "总交接数量", title: "总交接数量",
width: 80 width: 120
}, },
{ {
dataIndex: "totalSkuInTransitQty", dataIndex: "totalSkuInTransitQty",
key: "totalSkuInTransitQty", key: "totalSkuInTransitQty",
align: 'right',
title: "在途数量", title: "在途数量",
width: 80 width: 120
}, },
{ {
dataIndex: "totalSkuShortageQty", dataIndex: "totalSkuShortageQty",
key: "totalSkuShortageQty", key: "totalSkuShortageQty",
title: "交接短缺数量", title: "交接短缺数量",
width: 80 align: 'right',
width: 150
} }
]; ];

View File

@ -70,6 +70,14 @@
/// ///
const columns = [{ const columns = [{
dataIndex: "index",
key: "index",
title: "序号",
width: 60,
fixed: 'left',
align: 'center'
},
{
dataIndex: "trackCode", dataIndex: "trackCode",
key: "trackCode", key: "trackCode",
title: "通道号", title: "通道号",