列表优化
parent
d92a44e67f
commit
b602266648
|
|
@ -341,7 +341,7 @@ html {
|
|||
.fixedHeader.muiltTab {
|
||||
z-index: 600;
|
||||
#content {
|
||||
height: calc(~"(100% - 38px)");
|
||||
height: calc(~"(100% - 42px)");
|
||||
-ms-overflow-style: none;
|
||||
overflow: -moz-scrollbars-none;
|
||||
}
|
||||
|
|
@ -436,4 +436,4 @@ html {
|
|||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
|
|
@ -16,8 +16,10 @@ export default defineComponent({
|
|||
name: 'ATable',
|
||||
inheritAttrs: false,
|
||||
setup(_, { attrs, slots }) {
|
||||
const patchedColumns = patchColumns(attrs.columns);
|
||||
return () => h(Table, { ...attrs, columns: patchedColumns }, slots);
|
||||
// 每次渲染时基于最新的 columns 重新打补丁,确保列显示/隐藏等变更能够生效
|
||||
return () => {
|
||||
const patchedColumns = patchColumns(attrs.columns);
|
||||
return h(Table, { ...attrs, columns: patchedColumns }, slots);
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@
|
|||
.pro-table-next {
|
||||
float: right;
|
||||
.ant-btn {
|
||||
margin: 4px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,14 +1,22 @@
|
|||
<template>
|
||||
<div id="pro-table">
|
||||
<!-- 表格工具栏 -->
|
||||
<div class="pro-table-tool">
|
||||
<div class="pro-table-tool" :style="proTableToolStyle">
|
||||
<!-- 自定义工具栏 -->
|
||||
<div class="pro-table-prev">
|
||||
<template :key="index" v-for="(item, index) in toolbar">
|
||||
<div class="pro-table-prev" >
|
||||
<!-- 将工具栏改为合并后的 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">
|
||||
<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>
|
||||
<a-menu>
|
||||
<!-- 遍历子集 -->
|
||||
|
|
@ -22,69 +30,26 @@
|
|||
</a-dropdown>
|
||||
</pro-authority>
|
||||
<pro-authority :value="item.code ? item.code : false" v-else>
|
||||
<a-button
|
||||
:type="item.type&&['primary','ghost','dashed','link','text','default'].includes(item.type) ? item.type : index == 0 ? 'primary' : 'default'"
|
||||
<a-button size="small"
|
||||
: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 ?? ''">
|
||||
<template v-if="item.icon" #icon>
|
||||
<component :is="item.icon" />
|
||||
</template>
|
||||
{{ item.label }}
|
||||
</a-button>
|
||||
</pro-authority>
|
||||
</template>
|
||||
</div>
|
||||
<!-- 默认工具栏 -->
|
||||
<!-- 默认工具栏:使用 Antd a-table-settings 呈现(列设置 + 行高),并保留刷新按钮 -->
|
||||
<div class="pro-table-next" v-if="defaultToolbar">
|
||||
<!-- 刷新工具栏 -->
|
||||
<a-button @click="reload">
|
||||
<a-table-settings v-model:columns="columnsModel" :sizeOptions="[]" size="small"/>
|
||||
<!-- <a-button @click="reload" style="margin-left: 8px">
|
||||
<template #icon>
|
||||
<SyncOutlined />
|
||||
</template>
|
||||
</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>
|
||||
</a-button> -->
|
||||
</div>
|
||||
</div>
|
||||
<!--数据导出栏-->
|
||||
|
|
@ -94,14 +59,14 @@
|
|||
:pagination="exportExcelPagination" style="display: none">
|
||||
</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"
|
||||
:row-height="100" :customRow="rowClick" :sortDirections="['descend', 'ascend', '']"
|
||||
:rowClassName="setRowClassName" @resizeColumn="handleResizeColumn" bordered>
|
||||
:rowClassName="setRowClassName" @resizeColumn="handleResizeColumn">
|
||||
<!--列搜索组件封装-->
|
||||
<template #filterDropdown="{ setSelectedKeys, selectedKeys, confirm, clearFilters, column }">
|
||||
<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"
|
||||
@change="(e) => {
|
||||
setSelectedKeys(e.target.value ? [e.target.value] : []);
|
||||
|
|
@ -114,7 +79,7 @@
|
|||
</template>
|
||||
搜索
|
||||
</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>
|
||||
</template>
|
||||
<!--列过滤组件封装-->
|
||||
|
|
@ -162,7 +127,11 @@
|
|||
</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 :key="i" v-for="(item, i) in operate">
|
||||
|
|
@ -186,7 +155,7 @@
|
|||
<pro-authority :value="item.code ? item.code : false" v-else>
|
||||
<a-popconfirm v-if="item.isDel" title="确认删除?" ok-text="确认" cancel-text="取消"
|
||||
@confirm="item.delEvent(record)" @cancel="item.cancelEvent(record)">
|
||||
<a href="#">删除</a>
|
||||
<a-button type="text" danger >{{ item.label || '删除' }}</a-button>
|
||||
</a-popconfirm>
|
||||
<div style="display: inline-block" v-else>
|
||||
<a @click="item.event(record)"> {{ item.label }} </a>
|
||||
|
|
@ -234,6 +203,11 @@
|
|||
<a-image :width="column.image.width" :src="record[column.dataIndex]" />
|
||||
</template>
|
||||
|
||||
<!-- 右对齐数字列:千位分隔格式化显示 -->
|
||||
<template v-else-if="column.align === 'right'">
|
||||
{{ formatNumber(record[column.dataIndex]) }}
|
||||
</template>
|
||||
|
||||
<!-- 原样输出 -->
|
||||
<template v-else>
|
||||
{{ record[column.dataIndex] }}
|
||||
|
|
@ -299,19 +273,16 @@
|
|||
onMounted,
|
||||
reactive,
|
||||
toRefs,
|
||||
toRef,
|
||||
watch,
|
||||
ref,
|
||||
nextTick,
|
||||
computed
|
||||
} from "vue";
|
||||
import {
|
||||
AppstoreOutlined,
|
||||
ExportOutlined,
|
||||
SyncOutlined,
|
||||
UserOutlined,
|
||||
ColumnHeightOutlined,
|
||||
SearchOutlined,
|
||||
CloudDownloadOutlined,
|
||||
} from "@ant-design/icons-vue";
|
||||
//table搜索列插槽
|
||||
const searchInput = ref();
|
||||
|
|
@ -323,9 +294,6 @@
|
|||
name: "pro-table",
|
||||
currentRowI: 999,
|
||||
components: {
|
||||
ColumnHeightOutlined,
|
||||
AppstoreOutlined,
|
||||
ExportOutlined,
|
||||
SyncOutlined,
|
||||
UserOutlined,
|
||||
SearchOutlined,
|
||||
|
|
@ -348,10 +316,29 @@
|
|||
type: Array,
|
||||
required: true,
|
||||
},
|
||||
/// 头工具栏
|
||||
/// 头工具栏(外部传入)
|
||||
toolbar: {
|
||||
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: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
|
|
@ -404,9 +391,9 @@
|
|||
//excel导出表单所需的分页信息
|
||||
exportExcelPagination: {
|
||||
pageNum: 1,
|
||||
pageSize: 1000
|
||||
pageSize: 2000
|
||||
}, // 加载
|
||||
columns: props.columns, // 字段
|
||||
columns: props.columns, // 字段(与 a-table-settings v-model:columns 双向绑定)
|
||||
filtrationColumnKeys: [], // 过滤
|
||||
selectedRowKeys: [], // 选中项
|
||||
size: "small", // 表格大小
|
||||
|
|
@ -417,17 +404,104 @@
|
|||
});
|
||||
|
||||
/// 默认操作
|
||||
if (props.operate != false) {
|
||||
let operateSize = props.operate.length * 70;
|
||||
state.columns.push({
|
||||
dataIndex: "operate",
|
||||
key: "operate",
|
||||
title: "操作",
|
||||
fixed: "right",
|
||||
width: operateSize,
|
||||
});
|
||||
// 序号列:如果外部未提供,且开启 autoIndex,则自动在最左侧追加
|
||||
const hasIndexCol = (cols) => (cols || []).some(col => col && (col.dataIndex === 'index' || col.key === 'index'))
|
||||
if (props.autoIndex && !hasIndexCol(state.columns)) {
|
||||
state.columns.unshift({
|
||||
dataIndex: 'index',
|
||||
key: 'index',
|
||||
title: '序号',
|
||||
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 字典值
|
||||
|
|
@ -505,13 +579,17 @@
|
|||
column.filtered = false;
|
||||
if (column.dictionary) {
|
||||
//添加列过滤模板
|
||||
state.filterColumnsIndex.push(column.index);
|
||||
state.filterColumnsIndex.push(column.dataIndex);
|
||||
column.filters = dict;
|
||||
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.filtrationColumnKeys = value;
|
||||
};
|
||||
|
||||
// 与 a-table-settings 建立明确的 v-model 引用
|
||||
const columnsModel = toRef(state, 'columns');
|
||||
// 如果需要自定义控制,也可用 visibleColumns 过滤 display=false;
|
||||
// 现在直接将 columnsModel 传给 a-table,交由组件库内部处理 display 过滤
|
||||
//table 开启列可自由托动大小
|
||||
const handleResizeColumn = function(w, col) {
|
||||
console.log("handleResizeColumn")
|
||||
|
|
@ -592,27 +675,32 @@
|
|||
}
|
||||
};
|
||||
|
||||
/// 列搜索条件重置
|
||||
const handleReset = (clearFilters) => {
|
||||
/// 列搜索条件重置:清空 UI 与内部条件并刷新
|
||||
const handleReset = (clearFilters, setSelectedKeys, dataIndex, confirm) => {
|
||||
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) {
|
||||
state.filterColumnsIndex.forEach((columnIndex) => {
|
||||
//找到指定下标的数据,修改选中状态
|
||||
const index = state.columns.findIndex(item => item === columnIndex);
|
||||
const index = state.columns.findIndex(item => item.dataIndex === columnIndex);
|
||||
if (index != -1) {
|
||||
state.columns[index].filtered = false;
|
||||
}
|
||||
});
|
||||
state.filterColumnsIndex = []
|
||||
}
|
||||
// state.columns.forEach((value, index) => {
|
||||
// if(value.filtered&&value.filtered==true){
|
||||
// value.filtered = false;
|
||||
// }
|
||||
// });
|
||||
clearFilters();
|
||||
// 清理 antd 内部选中并同步到表格
|
||||
if (typeof clearFilters === 'function') clearFilters()
|
||||
if (typeof confirm === 'function') confirm()
|
||||
fetchData();
|
||||
};
|
||||
|
||||
|
|
@ -626,6 +714,19 @@
|
|||
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) => {
|
||||
console.log("filters 列过滤条件", filters)
|
||||
|
|
@ -832,17 +933,24 @@
|
|||
onSelectChange,
|
||||
/// 改变大小
|
||||
changeSize,
|
||||
/// 打印
|
||||
/// 打印/导出
|
||||
print,
|
||||
|
||||
ExportExcel,
|
||||
/// 合并后的工具栏
|
||||
mergedToolbar,
|
||||
proTableToolStyle,
|
||||
|
||||
columnsModel,
|
||||
|
||||
slotsData,
|
||||
handleReset,
|
||||
handleSearch,
|
||||
setSelectedKeysOnChange,
|
||||
changeFilteredStatus,
|
||||
onShowSizeChange
|
||||
onShowSizeChange,
|
||||
|
||||
// 工具函数
|
||||
formatNumber
|
||||
};
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -424,7 +424,4 @@ export default {
|
|||
float: right;
|
||||
margin-right: 15px;
|
||||
}
|
||||
.ant-drawer-body{
|
||||
padding: 10px!important;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -40,6 +40,7 @@ export default {
|
|||
|
||||
/// 列配置
|
||||
const columns = [
|
||||
{ dataIndex: "index", key: "index", title: "序号", width: 60, fixed: 'left', align: 'center' },
|
||||
{ dataIndex: "title", key: "title", title: "公告标题" },
|
||||
{ dataIndex: "content", key: "content", title: "公告内容" },
|
||||
{ dataIndex: "createName", key: "createName", title: "发布人" },
|
||||
|
|
@ -106,7 +107,11 @@ export default {
|
|||
/// 分页参数
|
||||
const pagination = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 20,
|
||||
showSizeChanger: true, // 显示可改变每页条数
|
||||
pageSizeOptions: ["10", "20", "50", "100"], // 每页条数选项设置
|
||||
showTotal: total => `共 ${total} 条记录`, // 显示总条数
|
||||
showSizeChange: (current, pageSize) => (this.pageSize = pageSize) // 改变每页条数时更新显示
|
||||
}
|
||||
|
||||
/// 外置参数 - 当参数改变时, 重新触发 fetch 函数
|
||||
|
|
|
|||
|
|
@ -1,344 +1,349 @@
|
|||
<template>
|
||||
<page-layout>
|
||||
<a-row :gutter="[10, 10]">
|
||||
<!-- 顶部区域 -->
|
||||
<a-col :span="24">
|
||||
<a-card>
|
||||
<!-- 查询参数 -->
|
||||
<pro-query :searchParam="searchParam" @on-search="search"></pro-query>
|
||||
</a-card>
|
||||
</a-col>
|
||||
<!-- 中心区域 -->
|
||||
<a-col :span="24">
|
||||
<a-card>
|
||||
<!-- 列表 -->
|
||||
<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>
|
||||
<a-list-layout>
|
||||
|
||||
<!-- 查询参数 -->
|
||||
<template #search>
|
||||
<pro-query :searchParam="searchParam" @on-search="search"></pro-query>
|
||||
</template>
|
||||
<!-- 列表 -->
|
||||
<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>
|
||||
|
||||
<save :visible="state.visibleSave" @close="closeSave"></save>
|
||||
<addConfig :visible="state.visibleAddConfig" @close="closeAddConfig"></addConfig>
|
||||
<edit :visible="state.visibleEdit" @close="closeEdit" :record="state.recordEdit"></edit>
|
||||
<info :visible="state.visibleInfo" @close="closeInfo" :record="state.recordInfo"></info>
|
||||
</page-layout>
|
||||
</a-list-layout>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import save from './modal/save.vue';
|
||||
import addConfig from './modal/addConfig.vue';
|
||||
import edit from './modal/edit.vue';
|
||||
import info from './modal/info.vue';
|
||||
import {
|
||||
message,
|
||||
Modal as modal
|
||||
} from '@hwork/ant-design-vue';
|
||||
import {
|
||||
ExclamationCircleOutlined
|
||||
} from '@ant-design/icons-vue';
|
||||
import {
|
||||
page,
|
||||
remove,
|
||||
removeBatch
|
||||
} from "@/api/module/config";
|
||||
import {
|
||||
reactive,
|
||||
createVNode,
|
||||
ref
|
||||
} from 'vue';
|
||||
import save from './modal/save.vue';
|
||||
import addConfig from './modal/addConfig.vue';
|
||||
import edit from './modal/edit.vue';
|
||||
import info from './modal/info.vue';
|
||||
import {
|
||||
message,
|
||||
Modal as modal
|
||||
} from '@hwork/ant-design-vue';
|
||||
import {
|
||||
ExclamationCircleOutlined
|
||||
} from '@ant-design/icons-vue';
|
||||
import {
|
||||
page,
|
||||
remove,
|
||||
removeBatch
|
||||
} from "@/api/module/config";
|
||||
import {
|
||||
reactive,
|
||||
createVNode,
|
||||
ref
|
||||
} from 'vue';
|
||||
|
||||
const removeKey = "remove";
|
||||
const removeBatchKey = "removeBatch";
|
||||
const removeKey = "remove";
|
||||
const removeBatchKey = "removeBatch";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
save,
|
||||
addConfig,
|
||||
edit,
|
||||
info,
|
||||
export default {
|
||||
components: {
|
||||
save,
|
||||
addConfig,
|
||||
edit,
|
||||
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() {
|
||||
|
||||
const tableRef = ref()
|
||||
|
||||
const switchFormat = {
|
||||
yes: true,
|
||||
no: false
|
||||
};
|
||||
|
||||
const columns = [{
|
||||
dataIndex: "parentCode",
|
||||
key: "parentCode",
|
||||
title: "组名",
|
||||
width: 180,
|
||||
},
|
||||
{
|
||||
dataIndex: "code",
|
||||
key: "code",
|
||||
title: "配置编号",
|
||||
width: 180,
|
||||
},
|
||||
{
|
||||
dataIndex: "value",
|
||||
key: "value",
|
||||
title: "值",
|
||||
width: 200,
|
||||
},
|
||||
{
|
||||
dataIndex: "name",
|
||||
key: "name",
|
||||
title: "配置描述",
|
||||
width: 300,
|
||||
},
|
||||
{
|
||||
dataIndex: "valueType",
|
||||
key: "valueType",
|
||||
title: "值类型",
|
||||
dictionary: {
|
||||
type: 'tag',
|
||||
code: 'valueType'
|
||||
},
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
dataIndex: "collectionType",
|
||||
key: "collectionType",
|
||||
title: "集合类型",
|
||||
dictionary: {
|
||||
type: 'tag',
|
||||
code: 'collectionType'
|
||||
},
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
dataIndex: "enable",
|
||||
key: "enable",
|
||||
title: "状态",
|
||||
switch: switchFormat,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
dataIndex: "remark",
|
||||
key: "remark",
|
||||
title: "描述",
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
dataIndex: "createTime",
|
||||
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;
|
||||
}
|
||||
{
|
||||
dataIndex: "parentCode",
|
||||
key: "parentCode",
|
||||
title: "组名",
|
||||
width: 180,
|
||||
},
|
||||
{
|
||||
dataIndex: "code",
|
||||
key: "code",
|
||||
title: "配置编号",
|
||||
width: 180,
|
||||
},
|
||||
{
|
||||
dataIndex: "value",
|
||||
key: "value",
|
||||
title: "值",
|
||||
width: 200,
|
||||
},
|
||||
{
|
||||
dataIndex: "name",
|
||||
key: "name",
|
||||
title: "配置描述",
|
||||
width: 300,
|
||||
},
|
||||
{
|
||||
dataIndex: "valueType",
|
||||
key: "valueType",
|
||||
title: "值类型",
|
||||
dictionary: {
|
||||
type: 'tag',
|
||||
code: 'valueType'
|
||||
},
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
dataIndex: "collectionType",
|
||||
key: "collectionType",
|
||||
title: "集合类型",
|
||||
dictionary: {
|
||||
type: 'tag',
|
||||
code: 'collectionType'
|
||||
},
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
dataIndex: "enable",
|
||||
key: "enable",
|
||||
title: "状态",
|
||||
switch: switchFormat,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
dataIndex: "remark",
|
||||
key: "remark",
|
||||
title: "描述",
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
dataIndex: "createTime",
|
||||
key: "createTime",
|
||||
title: "创建时间",
|
||||
width: 180,
|
||||
},
|
||||
{
|
||||
dataIndex: "updateTime",
|
||||
key: "updateTime",
|
||||
title: "修改时间",
|
||||
width: 180,
|
||||
},
|
||||
];
|
||||
|
||||
/// 查询配置
|
||||
const fetch = async (param) => {
|
||||
var response = await page(param);
|
||||
return {
|
||||
state,
|
||||
fetch,
|
||||
search,
|
||||
toolbar,
|
||||
columns,
|
||||
operate,
|
||||
pagination,
|
||||
searchParam,
|
||||
onSelectChange,
|
||||
closeSave,
|
||||
closeEdit,
|
||||
closeInfo,
|
||||
closeAddConfig,
|
||||
|
||||
tableRef
|
||||
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: "新增配置信息",
|
||||
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>
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@
|
|||
</a-card>
|
||||
</a-col>
|
||||
<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-row>
|
||||
</a-card>
|
||||
|
|
@ -180,7 +180,7 @@
|
|||
</a-card>
|
||||
</a-col>
|
||||
<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-row>
|
||||
</a-card>
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ export default {
|
|||
|
||||
/// 列配置
|
||||
const columns = [
|
||||
{ dataIndex: "index", key: "index", title: "序号", width: 60, fixed: 'left', align: 'center' },
|
||||
{ dataIndex: "name", key: "name", title: "名称" },
|
||||
{ dataIndex: "username", key: "username", title: "账户" },
|
||||
{ dataIndex: "password", key: "password", title: "密码" },
|
||||
|
|
@ -112,10 +113,14 @@ export default {
|
|||
];
|
||||
|
||||
/// 分页参数
|
||||
const pagination = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
}
|
||||
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({
|
||||
|
|
|
|||
|
|
@ -83,14 +83,14 @@ export default {
|
|||
|
||||
/// 工具栏
|
||||
const toolbar = [
|
||||
{ label: "新增", event: function () { state.visibleSave = true } },
|
||||
{ label: "新增", icon: 'PlusOutlined', event: function () { state.visibleSave = true } },
|
||||
];
|
||||
|
||||
/// 行操作
|
||||
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) } },
|
||||
{ label: "删除", isDel: true, event: function (record) { removeMethod(record) } },
|
||||
];
|
||||
|
||||
const pagination = false;
|
||||
|
|
|
|||
|
|
@ -1,266 +1,283 @@
|
|||
<template>
|
||||
<div>
|
||||
<page-header title="数 据 字 典" describe="用 户 Online 列 表,用 于 系 统 在 线 用 户 监 控."></page-header>
|
||||
<page-layout>
|
||||
<a-row :gutter="[10, 10]">
|
||||
<a-col :span="12">
|
||||
<a-card>
|
||||
<!-- 列表 -->
|
||||
<pro-table rowKey="id" ref="tableRef" :fetch="fetch" :columns="columns" :toolbar="toolbar"
|
||||
:operate="operate" :param="state.param" :pagination="pagination"
|
||||
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
|
||||
</pro-table>
|
||||
</a-card>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-card>
|
||||
<dictData :visible="state.visibleData" :record="state.recordData"></dictData>
|
||||
</a-card>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</page-layout>
|
||||
<save :visible="state.visibleSave" @close="closeSave"></save>
|
||||
<edit :visible="state.visibleEdit" @close="closeEdit" :record="state.recordEdit"></edit>
|
||||
</div>
|
||||
|
||||
<a-list-layout>
|
||||
<template #search>
|
||||
<a-alert message="数据字典:用户Online列表,用于系统在线用户监控" type="info" style="margin-top: 1px;" />
|
||||
</template>
|
||||
<pro-table rowKey="id" ref="tableRef" :fetch="fetch" :columns="columns" :toolbar="toolbar" :operate="operate"
|
||||
:param="state.param" :pagination="pagination"
|
||||
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
|
||||
</pro-table>
|
||||
<!-- 字典数据抽屉容器:统一用抽屉承载,内部组件负责渲染内容 -->
|
||||
<a-drawer
|
||||
:visible="state.visibleData"
|
||||
:width="720"
|
||||
title="字典数据"
|
||||
destroyOnClose
|
||||
@close="state.visibleData = false"
|
||||
>
|
||||
<dictData :visible="true" :record="state.recordData" @close="state.visibleData = false" />
|
||||
</a-drawer>
|
||||
</a-list-layout>
|
||||
<save :visible="state.visibleSave" @close="closeSave"></save>
|
||||
<edit :visible="state.visibleEdit" @close="closeEdit" :record="state.recordEdit"></edit>
|
||||
|
||||
</template>
|
||||
<script>
|
||||
import save from './modal/save.vue';
|
||||
import edit from './modal/edit.vue';
|
||||
import data from './modal/data.vue';
|
||||
import {
|
||||
message,
|
||||
Modal as modal
|
||||
} from '@hwork/ant-design-vue';
|
||||
import {
|
||||
ExclamationCircleOutlined
|
||||
} from '@ant-design/icons-vue';
|
||||
import {
|
||||
page,
|
||||
change,
|
||||
remove,
|
||||
removeBatch
|
||||
} from "@/api/module/dict";
|
||||
import {
|
||||
reactive,
|
||||
createVNode,
|
||||
ref
|
||||
} from 'vue';
|
||||
import save from './modal/save.vue';
|
||||
import edit from './modal/edit.vue';
|
||||
import data from './modal/data.vue';
|
||||
import {
|
||||
message,
|
||||
Modal as modal
|
||||
} from '@hwork/ant-design-vue';
|
||||
import {
|
||||
ExclamationCircleOutlined
|
||||
} from '@ant-design/icons-vue';
|
||||
import {
|
||||
page,
|
||||
change,
|
||||
remove,
|
||||
removeBatch
|
||||
} from "@/api/module/dict";
|
||||
import {
|
||||
reactive,
|
||||
createVNode,
|
||||
ref
|
||||
} from 'vue';
|
||||
|
||||
const removeKey = "remove";
|
||||
const removeBatchKey = "removeBatch";
|
||||
const removeKey = "remove";
|
||||
const removeBatchKey = "removeBatch";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
save,
|
||||
edit,
|
||||
dictData: data,
|
||||
},
|
||||
setup() {
|
||||
export default {
|
||||
components: {
|
||||
save,
|
||||
edit,
|
||||
dictData: data,
|
||||
},
|
||||
setup() {
|
||||
|
||||
const tableRef = ref()
|
||||
const tableRef = ref()
|
||||
|
||||
const switchFormat = {
|
||||
yes: true,
|
||||
no: false,
|
||||
event: function(value, record) {
|
||||
// record.enable = !record.enable;
|
||||
record.enable = value;
|
||||
change({
|
||||
"id": record.id,
|
||||
"enable": record.enable
|
||||
})
|
||||
tableRef.value.reload();
|
||||
return record;
|
||||
// return value;
|
||||
}
|
||||
const switchFormat = {
|
||||
yes: true,
|
||||
no: false,
|
||||
event: function (value, record) {
|
||||
// record.enable = !record.enable;
|
||||
record.enable = value;
|
||||
change({
|
||||
"id": record.id,
|
||||
"enable": record.enable
|
||||
})
|
||||
tableRef.value.reload();
|
||||
return record;
|
||||
// return value;
|
||||
}
|
||||
}
|
||||
|
||||
const columns = [
|
||||
{
|
||||
dataIndex: "code",
|
||||
key: "code",
|
||||
title: "标识",
|
||||
width:100
|
||||
},
|
||||
{
|
||||
dataIndex: "enable",
|
||||
key: "enable",
|
||||
title: "状态",
|
||||
width:80,
|
||||
switch: switchFormat
|
||||
},
|
||||
{
|
||||
dataIndex: "name",
|
||||
key: "name",
|
||||
title: "名称",
|
||||
}
|
||||
];
|
||||
|
||||
/// 数据来源 [模拟]
|
||||
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.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 columns = [
|
||||
{
|
||||
dataIndex: "index",
|
||||
key: "index",
|
||||
title: "序号",
|
||||
width: 60,
|
||||
fixed: 'left',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
dataIndex: "code",
|
||||
key: "code",
|
||||
title: "标识",
|
||||
width: 150
|
||||
},
|
||||
{
|
||||
dataIndex: "enable",
|
||||
key: "enable",
|
||||
title: "状态",
|
||||
width: 100,
|
||||
switch: switchFormat
|
||||
},
|
||||
{
|
||||
dataIndex: "name",
|
||||
key: "name",
|
||||
title: "名称",
|
||||
}
|
||||
];
|
||||
|
||||
/// 数据来源 [模拟]
|
||||
const fetch = async (param) => {
|
||||
var response = await page(param);
|
||||
return {
|
||||
state,
|
||||
fetch,
|
||||
toolbar,
|
||||
columns,
|
||||
operate,
|
||||
closeSave,
|
||||
closeEdit,
|
||||
pagination,
|
||||
onSelectChange,
|
||||
tableRef
|
||||
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: "新增",
|
||||
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>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div>
|
||||
<div class="drawer-table">
|
||||
<pro-table v-if="visible" ref="tableChilrenRef" rowKey="id" :fetch="fetch" :columns="columns" :toolbar="toolbar"
|
||||
:operate="operate" :param="state.param" :pagination="pagination"
|
||||
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
|
||||
|
|
@ -73,6 +73,14 @@
|
|||
}
|
||||
|
||||
const columns = [{
|
||||
dataIndex: "index",
|
||||
key: "index",
|
||||
title: "序号",
|
||||
width: 60,
|
||||
fixed: 'left',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
dataIndex: "label",
|
||||
key: "label",
|
||||
title: "中文标签",
|
||||
|
|
@ -180,12 +188,15 @@
|
|||
/// 工具栏
|
||||
const toolbar = [{
|
||||
label: "新增",
|
||||
icon: "PlusOutlined",
|
||||
event: function() {
|
||||
state.visibleSave = true, state.recordSave = props.record
|
||||
}
|
||||
},
|
||||
{
|
||||
label: "删除",
|
||||
icon: "DeleteOutlined",
|
||||
danger: true,
|
||||
event: function() {
|
||||
removeBatchMethod(state.selectedRowKeys)
|
||||
}
|
||||
|
|
@ -201,6 +212,7 @@
|
|||
},
|
||||
{
|
||||
label: "删除",
|
||||
isDel: true,
|
||||
event: function(record) {
|
||||
removeMethod(record)
|
||||
}
|
||||
|
|
@ -209,7 +221,7 @@
|
|||
|
||||
const pagination = {
|
||||
pageNum: 1,
|
||||
pageSize: 10
|
||||
pageSize: 20
|
||||
};
|
||||
|
||||
const state = reactive({
|
||||
|
|
@ -255,3 +267,36 @@
|
|||
},
|
||||
};
|
||||
</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>
|
||||
|
|
|
|||
|
|
@ -64,6 +64,14 @@
|
|||
}];
|
||||
/// 列配置
|
||||
const columns = [{
|
||||
dataIndex: "index",
|
||||
key: "index",
|
||||
title: "序号",
|
||||
width: 60,
|
||||
fixed: 'left',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
dataIndex: "content",
|
||||
key: "content",
|
||||
title: "消息内容"
|
||||
|
|
|
|||
|
|
@ -81,6 +81,14 @@
|
|||
|
||||
/// 列配置
|
||||
const columns = [{
|
||||
dataIndex: "index",
|
||||
key: "index",
|
||||
title: "序号",
|
||||
width: 60,
|
||||
fixed: 'left',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
dataIndex: "name",
|
||||
key: "name",
|
||||
title: "名称"
|
||||
|
|
@ -179,12 +187,15 @@
|
|||
/// 工具栏
|
||||
const toolbar = [{
|
||||
label: "新增",
|
||||
icon: 'PlusOutlined',
|
||||
event: function() {
|
||||
state.visibleSave = true
|
||||
}
|
||||
},
|
||||
{
|
||||
label: "删除",
|
||||
icon: 'DeleteOutlined',
|
||||
danger: true,
|
||||
event: function() {
|
||||
removeBatchMethod(state.selectedRowKeys)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,9 +41,10 @@ export default {
|
|||
|
||||
/// 列配置
|
||||
const columns = [
|
||||
{ dataIndex: "index", key: "index", title: "序号", width: 60, fixed: 'left', align: 'center' },
|
||||
{ dataIndex: "jobName", key: "jobName", 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: "state", key: "state", title: "状态", conver: converFormat },
|
||||
];
|
||||
|
|
@ -63,14 +64,18 @@ export default {
|
|||
|
||||
/// 工具栏
|
||||
const toolbar = [
|
||||
{ label: "备份", event: function () { }},
|
||||
{ label: "备份", icon:'SnippetsOutlined', event: function () { }},
|
||||
];
|
||||
|
||||
/// 分页参数
|
||||
const pagination = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
}
|
||||
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({
|
||||
|
|
|
|||
|
|
@ -1,31 +1,19 @@
|
|||
<template>
|
||||
<a-list-layout
|
||||
ref="pageRef"
|
||||
>
|
||||
<a-list-layout ref="pageRef">
|
||||
<template #search>
|
||||
<!-- 查询参数 -->
|
||||
<pro-query
|
||||
:searchParam="searchParam"
|
||||
@on-search ="search"
|
||||
></pro-query>
|
||||
<!-- 查询参数 -->
|
||||
<pro-query :searchParam="searchParam" @on-search="search"></pro-query>
|
||||
</template>
|
||||
<!-- 列表 -->
|
||||
<pro-table
|
||||
:fetch="fetch"
|
||||
:columns="columns"
|
||||
:toolbar="toolbar"
|
||||
:param="state.param"
|
||||
:pagination="pagination"
|
||||
:operate="operate"
|
||||
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }"
|
||||
>
|
||||
<!-- 继承至 a-table 的默认插槽 -->
|
||||
</pro-table>
|
||||
</a-list-layout>
|
||||
<!-- 列表 -->
|
||||
<pro-table :fetch="fetch" :columns="columns" :toolbar="toolbar" :param="state.param" :pagination="pagination"
|
||||
:operate="operate" :row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
|
||||
<!-- 继承至 a-table 的默认插槽 -->
|
||||
</pro-table>
|
||||
</a-list-layout>
|
||||
</template>
|
||||
|
||||
<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 { page, clean } from "@/api/module/log";
|
||||
import { reactive, createVNode } from 'vue';
|
||||
|
|
@ -36,28 +24,29 @@ export default {
|
|||
setup() {
|
||||
|
||||
/// 文本
|
||||
const converFormat = [{label:"成功", value:true},{label:"失败", value:false}];
|
||||
const converFormat = [{ label: "成功", value: true }, { label: "失败", value: false }];
|
||||
|
||||
/// 列配置
|
||||
const columns = [
|
||||
{ dataIndex: "title", key: "title", title: "标题" ,width:120,showSearch: true},
|
||||
{ dataIndex: "describe", key: "describe", title: "描述" ,width:120,showSearch: true},
|
||||
{ dataIndex: "action", key: "action", title: "动作",width:100},
|
||||
{ dataIndex: "type", key: "type", title: "方式",width:120},
|
||||
{ dataIndex: "browser", key: "browser", title: "浏览器" ,width:120,ellipsis: true},
|
||||
{ dataIndex: "system", key: "system", title: "系统" ,width:120,ellipsis: true},
|
||||
{ dataIndex: "address", key: "address", title: "操作地" ,width:120,showSearch: true,ellipsis: true},
|
||||
{ dataIndex: "createBy", key: "createBy", title: "创建人" ,width:120,ellipsis: true,showSearch: true},
|
||||
{ dataIndex: "createUsername", key: "createUsername", title: "创建人" ,width:120,ellipsis: true,showSearch: true},
|
||||
{ dataIndex: "createNickname", key: "createNickname", title: "创建人昵称" ,width:120,ellipsis: true},
|
||||
{ dataIndex: "createTime", key: "createTime", title: "操作时间" ,width:180,ellipsis: true},
|
||||
{ dataIndex: "state", key: "state", title: "状态", conver: converFormat ,width:120,ellipsis: true},
|
||||
{ dataIndex: "params", key: "params", title: "参数",showSearch: true ,width:300,ellipsis: true},
|
||||
{ dataIndex: "result", key: "result", title: "返回结果", showSearch: true ,width:300,ellipsis: true},
|
||||
{ dataIndex: "index", key: "index", title: "序号", width: 60, fixed: 'left', align: 'center' },
|
||||
{ dataIndex: "title", key: "title", title: "标题", width: 120, showSearch: true },
|
||||
{ dataIndex: "describe", key: "describe", title: "描述", width: 120, showSearch: true },
|
||||
{ dataIndex: "action", key: "action", title: "动作", width: 100 },
|
||||
{ dataIndex: "type", key: "type", title: "方式", width: 120 },
|
||||
{ dataIndex: "browser", key: "browser", title: "浏览器", width: 120, ellipsis: true },
|
||||
{ dataIndex: "system", key: "system", title: "系统", width: 120, ellipsis: true },
|
||||
{ dataIndex: "address", key: "address", title: "操作地", width: 120, showSearch: true, ellipsis: true },
|
||||
{ dataIndex: "createBy", key: "createBy", title: "创建人", width: 120, ellipsis: true, showSearch: true },
|
||||
{ dataIndex: "createUsername", key: "createUsername", title: "创建人", width: 120, ellipsis: true, showSearch: true },
|
||||
{ dataIndex: "createNickname", key: "createNickname", title: "创建人昵称", width: 120, ellipsis: true },
|
||||
{ dataIndex: "createTime", key: "createTime", title: "操作时间", width: 180, ellipsis: true },
|
||||
{ dataIndex: "state", key: "state", title: "状态", conver: converFormat, width: 120, 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 = [
|
||||
{ label: "查看", event: function (record) { alert("查看详情:" + JSON.stringify(record))}},
|
||||
{ label: "查看", event: function (record) { alert("查看详情:" + JSON.stringify(record)) } },
|
||||
];
|
||||
|
||||
/// 数据来源 [模拟]
|
||||
|
|
@ -78,11 +67,11 @@ export default {
|
|||
cancelText: '取消',
|
||||
onOk() {
|
||||
message.loading({ content: "提交中...", key: cleanKey });
|
||||
clean({"isAuth":true}).then((response) => {
|
||||
if(response.success){
|
||||
message.success({content: "清空成功", key: cleanKey, duration: 1})
|
||||
}else{
|
||||
message.error({content: "清空失败", key: cleanKey, duration: 1})
|
||||
clean({ "isAuth": true }).then((response) => {
|
||||
if (response.success) {
|
||||
message.success({ content: "清空成功", key: cleanKey, duration: 1 })
|
||||
} else {
|
||||
message.error({ content: "清空失败", key: cleanKey, duration: 1 })
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
@ -91,14 +80,18 @@ export default {
|
|||
|
||||
/// 工具栏
|
||||
const toolbar = [
|
||||
{ label: "备份", event: function () { }},
|
||||
{ label: "清空", event: function () { cleanMethod(); }},
|
||||
{ label: "备份", icon: 'SnippetsOutlined', event: function () { } },
|
||||
{ label: "清空", icon: 'ClearOutlined', danger: true, event: function () { cleanMethod(); } },
|
||||
];
|
||||
|
||||
/// 分页参数
|
||||
const pagination = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 20,
|
||||
showSizeChanger: true, // 显示可改变每页条数
|
||||
pageSizeOptions: ["10", "20", "50", "100"], // 每页条数选项设置
|
||||
showTotal: total => `共 ${total} 条记录`, // 显示总条数
|
||||
showSizeChange: (current, pageSize) => (this.pageSize = pageSize) // 改变每页条数时更新显示
|
||||
}
|
||||
|
||||
/// 外置参数 - 当参数改变时, 重新触发 fetch 函数
|
||||
|
|
@ -109,17 +102,18 @@ export default {
|
|||
|
||||
/// 查询参数
|
||||
const searchParam = [
|
||||
{ key: "title", type: "input", label: "标题"},
|
||||
{ key: "state", type: "select", label: "状态", value: "",
|
||||
options: [
|
||||
{ text: "全部", value: ""},
|
||||
{ text: "成功", value: true},
|
||||
{ text: "失败", value: false}
|
||||
]
|
||||
}
|
||||
{ key: "title", type: "input", label: "标题" },
|
||||
{
|
||||
key: "state", type: "select", label: "状态", value: "",
|
||||
options: [
|
||||
{ text: "全部", value: "" },
|
||||
{ text: "成功", value: true },
|
||||
{ text: "失败", value: false }
|
||||
]
|
||||
}
|
||||
]
|
||||
/// 查询操作
|
||||
const search = function(value) {
|
||||
const search = function (value) {
|
||||
state.param.title = value.title
|
||||
state.param.state = value.state
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ export default {
|
|||
|
||||
/// 列配置
|
||||
const columns = [
|
||||
{ dataIndex: "index", key: "index", title: "序号", width: 60, fixed: 'left', align: 'center' },
|
||||
{ dataIndex: "title", key: "title", title: "标题", width: 120, showSearch: true },
|
||||
{ dataIndex: "describe", key: "describe", title: "描述", width: 120, showSearch: true },
|
||||
{ dataIndex: "action", key: "action", title: "动作", width: 100 },
|
||||
|
|
@ -84,15 +85,19 @@ export default {
|
|||
|
||||
/// 工具栏
|
||||
const toolbar = [
|
||||
{ label: "备份", event: function () { exportExcel(); } },
|
||||
{ label: "清空", event: function () { cleanMethod(); } },
|
||||
{ label: "备份",icon:'SnippetsOutlined', event: function () { exportExcel(); } },
|
||||
{ label: "清空",icon:'ClearOutlined',danger: true, event: function () { cleanMethod(); } },
|
||||
];
|
||||
|
||||
/// 分页参数
|
||||
const pagination = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
}
|
||||
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({
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@
|
|||
|
||||
/// 列配置
|
||||
const columns = [
|
||||
{ dataIndex: "index", key: "index", title: "序号", width: 60, fixed: 'left', align: 'center' },
|
||||
{ dataIndex: "name", key: "name", title: "文件名称" },
|
||||
{ dataIndex: "location", key: "code", title: "存储位置", conver: converFormat},
|
||||
{ dataIndex: "bucket", key: "bucket", title: "文件仓库" },
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ export default {
|
|||
|
||||
/// 列配置
|
||||
const columns = [
|
||||
{ dataIndex: "index", key: "index", title: "序号", width: 60, fixed: 'left', align: 'center' },
|
||||
{ dataIndex: "name", key: "name", title: "名称" },
|
||||
{ dataIndex: "code", key: "code", title: "标识" },
|
||||
{ dataIndex: "remark", key: "remark", title: "备注" },
|
||||
|
|
@ -101,22 +102,26 @@ export default {
|
|||
|
||||
/// 工具栏
|
||||
const toolbar = [
|
||||
{ label: "新增", event: function () { state.visibleSave = true } },
|
||||
{ label: "删除", event: function () { removeBatchMethod(state.selectedRowKeys) } },
|
||||
{ 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: "删除", event: function (record) { removeMethod(record) } },
|
||||
{ label: "删除", isDel: true, event: function (record) { removeMethod(record) } },
|
||||
];
|
||||
|
||||
/// 分页参数
|
||||
const pagination = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
}
|
||||
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({
|
||||
|
|
|
|||
|
|
@ -1,286 +1,282 @@
|
|||
<template>
|
||||
<page-layout>
|
||||
<a-row :gutter="[10, 10]">
|
||||
<!-- 顶部区域 -->
|
||||
<a-col :span="24">
|
||||
<a-card>
|
||||
<!-- 查询参数 -->
|
||||
<pro-query :searchParam="searchParam" @on-search="search"></pro-query>
|
||||
</a-card>
|
||||
</a-col>
|
||||
<!-- 中心区域 -->
|
||||
<a-col :span="24">
|
||||
<a-card>
|
||||
<!-- 列表 -->
|
||||
<pro-table ref="tableRef" rowKey="id" :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>
|
||||
<a-list-layout>
|
||||
|
||||
<!-- 查询参数 -->
|
||||
<template #search>
|
||||
<pro-query :searchParam="searchParam" @on-search="search"></pro-query>
|
||||
|
||||
</template>
|
||||
|
||||
<!-- 列表 -->
|
||||
<pro-table ref="tableRef" rowKey="id" :fetch="fetch" :columns="columns" :toolbar="toolbar" :operate="operate"
|
||||
:param="state.param" :pagination="pagination"
|
||||
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
|
||||
<!-- 继承至 a-table 的默认插槽 -->
|
||||
</pro-table>
|
||||
|
||||
<save :visible="state.visibleSave" @close="closeSave"></save>
|
||||
<edit :visible="state.visibleEdit" @close="closeEdit" :record="state.recordEdit"></edit>
|
||||
<info :visible="state.visibleInfo" @close="closeInfo" :record="state.recordInfo"></info>
|
||||
</page-layout>
|
||||
</a-list-layout>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import save from './modal/save.vue';
|
||||
import edit from './modal/edit.vue';
|
||||
import info from './modal/info.vue';
|
||||
import {
|
||||
message,
|
||||
Modal as modal
|
||||
} from '@hwork/ant-design-vue';
|
||||
import {
|
||||
ExclamationCircleOutlined
|
||||
} from '@ant-design/icons-vue';
|
||||
import {
|
||||
tree,
|
||||
remove
|
||||
} from "@/api/module/power";
|
||||
import {
|
||||
reactive,
|
||||
createVNode,
|
||||
ref
|
||||
} from 'vue';
|
||||
import save from './modal/save.vue';
|
||||
import edit from './modal/edit.vue';
|
||||
import info from './modal/info.vue';
|
||||
import {
|
||||
message,
|
||||
Modal as modal
|
||||
} from '@hwork/ant-design-vue';
|
||||
import {
|
||||
ExclamationCircleOutlined
|
||||
} from '@ant-design/icons-vue';
|
||||
import {
|
||||
tree,
|
||||
remove
|
||||
} from "@/api/module/power";
|
||||
import {
|
||||
reactive,
|
||||
createVNode,
|
||||
ref
|
||||
} from 'vue';
|
||||
|
||||
const removeKey = "remove";
|
||||
const removeBatchKey = "removeBatch";
|
||||
const removeKey = "remove";
|
||||
const removeBatchKey = "removeBatch";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
save,
|
||||
edit,
|
||||
info,
|
||||
},
|
||||
setup() {
|
||||
export default {
|
||||
components: {
|
||||
save,
|
||||
edit,
|
||||
info,
|
||||
},
|
||||
setup() {
|
||||
|
||||
const tableRef = ref();
|
||||
const tableRef = ref();
|
||||
|
||||
const switchFormat = {
|
||||
yes: true,
|
||||
no: false,
|
||||
event: function(value, record) {
|
||||
record.enable = !record.enable;
|
||||
return value;
|
||||
}
|
||||
const switchFormat = {
|
||||
yes: true,
|
||||
no: false,
|
||||
event: function (value, record) {
|
||||
record.enable = !record.enable;
|
||||
return value;
|
||||
}
|
||||
}
|
||||
|
||||
/// 删除配置
|
||||
const removeMethod = (record) => {
|
||||
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 converFormat = [{
|
||||
label: '目录',
|
||||
value: '0'
|
||||
},
|
||||
{
|
||||
label: '菜单',
|
||||
value: '1'
|
||||
},
|
||||
{
|
||||
label: '按钮',
|
||||
value: '2'
|
||||
/// 删除配置
|
||||
const removeMethod = (record) => {
|
||||
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 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 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
|
||||
};
|
||||
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",
|
||||
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>
|
||||
|
|
|
|||
|
|
@ -1,29 +1,24 @@
|
|||
<template>
|
||||
<page-layout>
|
||||
<a-row :gutter="[10, 10]">
|
||||
<!-- 顶部区域 -->
|
||||
<a-col :span="24">
|
||||
<a-card>
|
||||
<a-list-layout
|
||||
ref="pageRef">
|
||||
|
||||
|
||||
<!-- 查询参数 -->
|
||||
<template #search>
|
||||
<pro-query :searchParam="searchParam" @on-search="search"></pro-query>
|
||||
</a-card>
|
||||
</a-col>
|
||||
<!-- 中心区域 -->
|
||||
<a-col :span="24">
|
||||
<a-card>
|
||||
|
||||
</template>
|
||||
<!-- 列表 -->
|
||||
<pro-table ref="tableRef" :fetch="fetch" :columns="columns" :toolbar="toolbar" :operate="operate"
|
||||
:param="state.param" :pagination="pagination"
|
||||
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
|
||||
</pro-table>
|
||||
</a-card>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
<save :visible="state.visibleSave" @close="closeSave"></save>
|
||||
<edit :visible="state.visibleEdit" @close="closeEdit" :record="state.recordEdit"></edit>
|
||||
<give :visible="state.visibleGive" @close="closeGive" :record="state.recordGive"></give>
|
||||
<info :visible="state.visibleInfo" @close="closeInfo" :record="state.recordInfo"></info>
|
||||
</page-layout>
|
||||
</a-list-layout>
|
||||
</template>
|
||||
<script>
|
||||
import save from './modal/save.vue';
|
||||
|
|
@ -81,6 +76,14 @@
|
|||
}
|
||||
|
||||
const columns = [{
|
||||
dataIndex: "index",
|
||||
key: "index",
|
||||
title: "序号",
|
||||
width: 60,
|
||||
fixed: 'left',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
dataIndex: "name",
|
||||
key: "name",
|
||||
title: "名称"
|
||||
|
|
@ -190,12 +193,15 @@
|
|||
/// 工具栏
|
||||
const toolbar = [{
|
||||
label: "新增",
|
||||
icon: 'PlusOutlined',
|
||||
event: function() {
|
||||
state.visibleSave = true
|
||||
}
|
||||
},
|
||||
{
|
||||
label: "删除",
|
||||
icon: 'DeleteOutlined',
|
||||
danger: true,
|
||||
event: function() {
|
||||
removeBatchMethod(state.selectedRowKeys)
|
||||
}
|
||||
|
|
@ -223,6 +229,7 @@
|
|||
},
|
||||
{
|
||||
label: "删除",
|
||||
isDel: true,
|
||||
event: function(record) {
|
||||
removeMethod(record)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -217,7 +217,7 @@ export default {
|
|||
|
||||
const columns = [
|
||||
{ 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: "used", key: "used", align: "center"},
|
||||
{ title: "剩余", dataIndex: "free", key: "free", align: "center"},
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@
|
|||
</div>
|
||||
</a-card-grid>
|
||||
</a-card>
|
||||
<a-card title="动态" style="margin-top: 10px">
|
||||
<a-card title="动态" >
|
||||
<a-list item-layout="horizontal" :data-source="data">
|
||||
<template #renderItem="{ item }">
|
||||
<a-list-item>
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
</a-col>
|
||||
-->
|
||||
<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-row>
|
||||
</a-card>
|
||||
|
|
@ -80,6 +80,14 @@
|
|||
//当前仓库的信息汇总
|
||||
|
||||
const columns = [{
|
||||
dataIndex: "index",
|
||||
key: "index",
|
||||
title: "序号",
|
||||
width: 60,
|
||||
fixed: 'left',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: "日期",
|
||||
dataIndex: "dayTime",
|
||||
key: "dayTime",
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
</a-col>
|
||||
-->
|
||||
<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-row>
|
||||
</a-card>
|
||||
|
|
@ -80,6 +80,14 @@
|
|||
//当前仓库的信息汇总
|
||||
|
||||
const columns = [{
|
||||
dataIndex: "index",
|
||||
key: "index",
|
||||
title: "序号",
|
||||
width: 60,
|
||||
fixed: 'left',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: "日期",
|
||||
dataIndex: "dayTime",
|
||||
key: "dayTime",
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ export default {
|
|||
const tableRef = ref()
|
||||
|
||||
const columns = [
|
||||
{ dataIndex: "index", key: "index", title: "序号", width: 60, fixed: 'left', align: 'center' },
|
||||
{ dataIndex: "name", key: "name", title: "名称" },
|
||||
{ dataIndex: "describe", key: "describe", title: "描述" },
|
||||
{ dataIndex: "createTime", key: "createTime", title: "创建时间" },
|
||||
|
|
@ -93,8 +94,8 @@ export default {
|
|||
|
||||
/// 工具栏
|
||||
const toolbar = [
|
||||
{ label: "新增", event: function () { state.visibleSave = true } },
|
||||
{ label: "删除", event: function () { removeBatchMethod(state.selectedRowKeys) } },
|
||||
{ label: "新增", icon: 'PlusOutlined', event: function () { state.visibleSave = true } },
|
||||
{ label: "删除", icon: 'DeleteOutlined', danger: true,event: function () { removeBatchMethod(state.selectedRowKeys) } },
|
||||
];
|
||||
|
||||
/// 行操作
|
||||
|
|
@ -106,10 +107,14 @@ export default {
|
|||
];
|
||||
|
||||
/// 分页参数
|
||||
const pagination = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
}
|
||||
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({
|
||||
|
|
|
|||
|
|
@ -111,8 +111,8 @@ export default {
|
|||
|
||||
/// 工具栏
|
||||
const toolbar = [
|
||||
{ label: "新增", event: function () { state.visibleSave = true } },
|
||||
{ label: "删除", event: function () { removeBatchMethod(state.selectedRowKeys) } }
|
||||
{ label: "新增",icon: 'PlusOutlined', event: function () { state.visibleSave = true } },
|
||||
{ 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.visibleEdit = true, state.recordEdit = 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) } }
|
||||
];
|
||||
|
||||
|
|
@ -140,11 +140,12 @@ export default {
|
|||
|
||||
/// 配置
|
||||
const columns = [
|
||||
{ dataIndex: "index", key: "index", title: "序号", width: 60, fixed: 'left', align: 'center' },
|
||||
{ dataIndex: "deptName", key: "deptName", title: "部门" },
|
||||
{ dataIndex: "avatar", key: "avatar", title: "头像", avatar: avatarFormat },
|
||||
{ dataIndex: "nickname", key: "nickname", 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: "email", key: "email", 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({
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ export default defineComponent({
|
|||
};
|
||||
|
||||
const columns = [
|
||||
{ dataIndex: "index", key: "index", title: "序号", width: 60, fixed: 'left', align: 'center' },
|
||||
{ dataIndex: "name", key: "name", title: "名称" },
|
||||
{ dataIndex: "remark", key: "remark", title: "描述" }
|
||||
];
|
||||
|
|
|
|||
|
|
@ -53,6 +53,14 @@
|
|||
|
||||
/// 列配置
|
||||
const columns = [{
|
||||
dataIndex: "index",
|
||||
key: "index",
|
||||
title: "序号",
|
||||
width: 60,
|
||||
fixed: 'left',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
dataIndex: "customerCode",
|
||||
key: "customerCode",
|
||||
title: "编号",
|
||||
|
|
|
|||
|
|
@ -54,6 +54,14 @@
|
|||
|
||||
/// 列配置
|
||||
const columns = [{
|
||||
dataIndex: "index",
|
||||
key: "index",
|
||||
title: "序号",
|
||||
width: 60,
|
||||
fixed: 'left',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
dataIndex: "deliver",
|
||||
key: "deliver",
|
||||
title: "搬运类型",
|
||||
|
|
@ -247,6 +255,7 @@
|
|||
const toolbar = [{
|
||||
label: "新增",
|
||||
code: 'wms:deliverType:add',
|
||||
icon: 'PlusOutlined',
|
||||
event: function() {
|
||||
state.visibleSave = true
|
||||
}
|
||||
|
|
@ -254,6 +263,8 @@
|
|||
{
|
||||
label: "删除",
|
||||
code: 'wms:deliverType:remove',
|
||||
icon: 'DeleteOutlined',
|
||||
danger: true,
|
||||
event: function() {
|
||||
removeBatchMethod(state.selectedRowKeys)
|
||||
},
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<template #search>
|
||||
<pro-query :searchParam="searchParam" @on-search="search"></pro-query>
|
||||
</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"
|
||||
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
|
||||
</pro-table>
|
||||
|
|
@ -43,10 +43,18 @@ export default {
|
|||
const tableRef = ref()
|
||||
|
||||
const columns = [{
|
||||
dataIndex: "index",
|
||||
key: "index",
|
||||
title: "序号",
|
||||
width: 60,
|
||||
fixed: 'left',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
dataIndex: "requestCode",
|
||||
key: "requestCode",
|
||||
title: "请求编号",
|
||||
width: 150,
|
||||
width: 200,
|
||||
showSearch: true,
|
||||
},
|
||||
{
|
||||
|
|
@ -64,7 +72,7 @@ export default {
|
|||
dataIndex: "paramType",
|
||||
key: "paramType",
|
||||
title: "请求类型",
|
||||
width: 100,
|
||||
width: 150,
|
||||
showSearch: true,
|
||||
},
|
||||
{
|
||||
|
|
@ -306,6 +314,7 @@ export default {
|
|||
const toolbar = [{
|
||||
label: "删除",
|
||||
code: 'wms:request:delete',
|
||||
icon: 'DeleteOutlined',
|
||||
event: function () {
|
||||
removeBatchMethod(state.selectedRowKeys)
|
||||
},
|
||||
|
|
@ -316,6 +325,7 @@ export default {
|
|||
const operate = [{
|
||||
label: "删除",
|
||||
code: 'wms:request:delete',
|
||||
isDel: true,
|
||||
event: function (record) {
|
||||
removeMethod(record)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,11 +67,20 @@
|
|||
}
|
||||
}
|
||||
|
||||
const columns = [{
|
||||
const columns = [
|
||||
{
|
||||
dataIndex: "index",
|
||||
key: "index",
|
||||
title: "序号",
|
||||
width: 60,
|
||||
fixed: 'left',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
dataIndex: "skuCode",
|
||||
key: "skuCode",
|
||||
title: "物料编号",
|
||||
width: 120,
|
||||
width: 150,
|
||||
// defaultSortOrder: 'ascend',
|
||||
// sorter: true,
|
||||
showSearch: true
|
||||
|
|
@ -80,7 +89,7 @@
|
|||
dataIndex: "skuName",
|
||||
key: "skuName",
|
||||
title: "物料名称",
|
||||
width: 140,
|
||||
width: 180,
|
||||
showSearch: true
|
||||
},
|
||||
// {
|
||||
|
|
@ -130,21 +139,21 @@
|
|||
dataIndex: "categoryCode",
|
||||
key: "categoryCode",
|
||||
title: "种类编号",
|
||||
width: 100,
|
||||
width: 120,
|
||||
showSearch: true
|
||||
},
|
||||
{
|
||||
dataIndex: "categoryName",
|
||||
key: "categoryName",
|
||||
title: "种类名称",
|
||||
width: 100,
|
||||
width: 120,
|
||||
showSearch: true
|
||||
},
|
||||
{
|
||||
dataIndex: "baseUnit",
|
||||
key: "baseUnit",
|
||||
title: "库存单位",
|
||||
width: 100,
|
||||
width: 120,
|
||||
showSearch: true
|
||||
},
|
||||
/* {
|
||||
|
|
@ -177,6 +186,7 @@
|
|||
title: "满盘数量",
|
||||
type: "number",
|
||||
width: 120,
|
||||
align: "right",
|
||||
showSearch: true
|
||||
// defaultSortOrder: 'ascend',
|
||||
// sorter: (a, b) => a.fullQty - b.fullQty,
|
||||
|
|
@ -301,9 +311,11 @@
|
|||
}
|
||||
|
||||
/// 工具栏
|
||||
const toolbar = [{
|
||||
const toolbar = [
|
||||
{
|
||||
label: "新增",
|
||||
code: 'wms:sku:add',
|
||||
icon: 'PlusOutlined',
|
||||
event: function() {
|
||||
state.visibleSave = true
|
||||
}
|
||||
|
|
@ -311,10 +323,11 @@
|
|||
{
|
||||
label: "删除",
|
||||
code: 'wms:sku:remove',
|
||||
icon: 'DeleteOutlined',
|
||||
danger: true,
|
||||
event: function() {
|
||||
removeBatchMethod(state.selectedRowKeys)
|
||||
},
|
||||
type: 'danger'
|
||||
}
|
||||
},
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -49,7 +49,16 @@ export default {
|
|||
const tableRef = ref();
|
||||
|
||||
/// 列配置
|
||||
const columns = [{
|
||||
const columns = [
|
||||
{
|
||||
dataIndex: "index",
|
||||
key: "index",
|
||||
title: "序号",
|
||||
width: 60,
|
||||
fixed: 'left',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
dataIndex: "categoryCode",
|
||||
key: "categoryCode",
|
||||
title: "种类编号",
|
||||
|
|
@ -69,7 +78,7 @@ export default {
|
|||
dataIndex: "categoryDesc",
|
||||
key: "categoryDesc",
|
||||
title: "种类描述",
|
||||
width: 100,
|
||||
width: 120,
|
||||
showSearch: true
|
||||
},
|
||||
{
|
||||
|
|
@ -211,6 +220,7 @@ export default {
|
|||
const toolbar = [{
|
||||
label: "新增",
|
||||
code: 'wms:skuCategory:add',
|
||||
icon: 'PlusOutlined',
|
||||
event: function () {
|
||||
state.visibleSave = true
|
||||
}
|
||||
|
|
@ -218,10 +228,11 @@ export default {
|
|||
{
|
||||
label: "删除",
|
||||
code: 'wms:skuCategory:remove',
|
||||
icon: 'DeleteOutlined',
|
||||
danger: true,
|
||||
event: function () {
|
||||
removeBatchMethod(state.selectedRowKeys)
|
||||
},
|
||||
type: 'danger'
|
||||
},
|
||||
];
|
||||
|
||||
|
|
@ -238,6 +249,7 @@ export default {
|
|||
{
|
||||
label: "删除",
|
||||
code: 'wms:skuCategory:delete',
|
||||
isDel: true,
|
||||
event: function (record) {
|
||||
removeMethod(record)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
</a-card>
|
||||
<a-card>
|
||||
<!-- <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"
|
||||
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
|
||||
|
||||
|
|
@ -153,6 +153,14 @@
|
|||
|
||||
|
||||
const columns = [{
|
||||
dataIndex: "index",
|
||||
key: "index",
|
||||
title: "序号",
|
||||
width: 60,
|
||||
fixed: 'left',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
dataIndex: "skuCode",
|
||||
key: "skuCode",
|
||||
title: "物料编号",
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
<a-col :span="24">
|
||||
<a-card>
|
||||
<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"
|
||||
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
|
||||
</pro-table>
|
||||
|
|
@ -76,6 +76,14 @@
|
|||
});
|
||||
|
||||
const columns = [{
|
||||
dataIndex: "index",
|
||||
key: "index",
|
||||
title: "序号",
|
||||
width: 60,
|
||||
fixed: 'left',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
dataIndex: "palletCode",
|
||||
key: "palletCode",
|
||||
title: "托盘号",
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
<a-col :span="24">
|
||||
<a-card>
|
||||
<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"
|
||||
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
|
||||
</pro-table>
|
||||
|
|
@ -90,6 +90,14 @@
|
|||
|
||||
|
||||
const columns = [{
|
||||
dataIndex: "index",
|
||||
key: "index",
|
||||
title: "序号",
|
||||
width: 60,
|
||||
fixed: 'left',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
dataIndex: "invoiceCode",
|
||||
key: "invoiceCode",
|
||||
title: "盘点单据号",
|
||||
|
|
|
|||
|
|
@ -59,6 +59,14 @@
|
|||
const tableRef = ref()
|
||||
|
||||
const columns = [{
|
||||
dataIndex: "index",
|
||||
key: "index",
|
||||
title: "序号",
|
||||
width: 60,
|
||||
fixed: 'left',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
dataIndex: "invoiceCode",
|
||||
key: "invoiceCode",
|
||||
title: "单据号",
|
||||
|
|
|
|||
|
|
@ -113,6 +113,14 @@
|
|||
|
||||
|
||||
const columns = [{
|
||||
dataIndex: "index",
|
||||
key: "index",
|
||||
title: "序号",
|
||||
width: 60,
|
||||
fixed: 'left',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
dataIndex: "invoiceCode",
|
||||
key: "invoiceCode",
|
||||
title: "单据号",
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@
|
|||
</a-card>
|
||||
<a-card>
|
||||
<!-- <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"
|
||||
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
|
||||
<template v-for="col in ['planQty', 'batch', 'master','customer', 'producer', 'qualityStatus']"
|
||||
|
|
@ -270,6 +270,14 @@
|
|||
})
|
||||
|
||||
const columns = [{
|
||||
dataIndex: "index",
|
||||
key: "index",
|
||||
title: "序号",
|
||||
width: 60,
|
||||
fixed: 'left',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
dataIndex: "skuCode",
|
||||
key: "skuCode",
|
||||
type: "select",
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
<a-col :span="24">
|
||||
<a-card>
|
||||
<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"
|
||||
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
|
||||
</pro-table>
|
||||
|
|
@ -73,6 +73,14 @@
|
|||
watch(props, (props) => {});
|
||||
|
||||
const columns = [{
|
||||
dataIndex: "index",
|
||||
key: "index",
|
||||
title: "序号",
|
||||
width: 60,
|
||||
fixed: 'left',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
dataIndex: "skuCode",
|
||||
key: "skuCode",
|
||||
title: "物料编号",
|
||||
|
|
|
|||
|
|
@ -58,6 +58,14 @@
|
|||
const tableRef = ref()
|
||||
|
||||
const columns = [{
|
||||
dataIndex: "index",
|
||||
key: "index",
|
||||
title: "序号",
|
||||
width: 60,
|
||||
fixed: 'left',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
dataIndex: "invoiceCode",
|
||||
key: "invoiceCode",
|
||||
title: "单据号",
|
||||
|
|
|
|||
|
|
@ -72,6 +72,14 @@
|
|||
})
|
||||
|
||||
const columns = [{
|
||||
dataIndex: "index",
|
||||
key: "index",
|
||||
title: "序号",
|
||||
width: 60,
|
||||
fixed: 'left',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
dataIndex: "invoiceCode",
|
||||
key: "invoiceCode",
|
||||
title: "单据号",
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@
|
|||
</a-card>
|
||||
<a-card>
|
||||
<!-- <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"
|
||||
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
|
||||
<template v-for="col in ['planQty', 'batch', 'master','customer', 'producer', 'qualityStatus']"
|
||||
|
|
@ -283,6 +283,14 @@
|
|||
})
|
||||
|
||||
const columns = [{
|
||||
dataIndex: "index",
|
||||
key: "index",
|
||||
title: "序号",
|
||||
width: 60,
|
||||
fixed: 'left',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
dataIndex: "skuCode",
|
||||
key: "skuCode",
|
||||
type: "select",
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
<a-col :span="24">
|
||||
<a-card>
|
||||
<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"
|
||||
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
|
||||
</pro-table>
|
||||
|
|
@ -72,6 +72,14 @@
|
|||
watch(props, (props) => {});
|
||||
|
||||
const columns = [{
|
||||
dataIndex: "index",
|
||||
key: "index",
|
||||
title: "序号",
|
||||
width: 60,
|
||||
fixed: 'left',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
dataIndex: "skuCode",
|
||||
key: "skuCode",
|
||||
title: "物料编号",
|
||||
|
|
|
|||
|
|
@ -67,6 +67,14 @@
|
|||
const tableRef = ref()
|
||||
|
||||
const columns = [{
|
||||
dataIndex: "index",
|
||||
key: "index",
|
||||
title: "序号",
|
||||
width: 60,
|
||||
fixed: 'left',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
dataIndex: "invoiceCode",
|
||||
key: "invoiceCode",
|
||||
title: "单据号",
|
||||
|
|
|
|||
|
|
@ -82,6 +82,14 @@
|
|||
const cancel = (e) => {};
|
||||
|
||||
const columns = [{
|
||||
dataIndex: "index",
|
||||
key: "index",
|
||||
title: "序号",
|
||||
width: 60,
|
||||
fixed: 'left',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
dataIndex: "invoiceCode",
|
||||
key: "invoiceCode",
|
||||
title: "单据号",
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
<a-col :span="24">
|
||||
<a-card>
|
||||
<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"
|
||||
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
|
||||
</pro-table>
|
||||
|
|
@ -90,6 +90,14 @@
|
|||
|
||||
|
||||
const columns = [{
|
||||
dataIndex: "index",
|
||||
key: "index",
|
||||
title: "序号",
|
||||
width: 60,
|
||||
fixed: 'left',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
dataIndex: "itemCode",
|
||||
key: "itemCode",
|
||||
title: "明细号",
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
</div>
|
||||
<a-row :gutter="[0, 0]">
|
||||
<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">
|
||||
</pro-table>
|
||||
</a-col>
|
||||
|
|
@ -112,6 +112,14 @@
|
|||
};
|
||||
|
||||
const columns = [{
|
||||
dataIndex: "index",
|
||||
key: "index",
|
||||
title: "序号",
|
||||
width: 60,
|
||||
fixed: 'left',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
dataIndex: "palletCode",
|
||||
key: "palletCode",
|
||||
title: "托盘号",
|
||||
|
|
|
|||
|
|
@ -59,6 +59,14 @@
|
|||
/// 列配置
|
||||
const columns = ref(
|
||||
[{
|
||||
dataIndex: "index",
|
||||
key: "index",
|
||||
title: "序号",
|
||||
width: 60,
|
||||
fixed: 'left',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
dataIndex: "houseCode",
|
||||
key: "houseCode",
|
||||
title: "仓库号",
|
||||
|
|
@ -98,7 +106,7 @@
|
|||
dataIndex: "ext1",
|
||||
key: "ext1",
|
||||
title: "MES要货令",
|
||||
width: 120,
|
||||
width: 170,
|
||||
showSearch: true,
|
||||
sorter: true,
|
||||
ellipsis: true
|
||||
|
|
@ -107,7 +115,7 @@
|
|||
dataIndex: "ext2",
|
||||
key: "ext2",
|
||||
title: "AGV任务编号",
|
||||
width: 120,
|
||||
width: 170,
|
||||
showSearch: true,
|
||||
sorter: true,
|
||||
},
|
||||
|
|
@ -217,14 +225,14 @@
|
|||
dataIndex: "targetLocParent",
|
||||
key: "targetLocParent",
|
||||
title: "目标位置父节点",
|
||||
width: 150,
|
||||
width: 180,
|
||||
showSearch: true,
|
||||
},
|
||||
{
|
||||
dataIndex: "targetLocWcs",
|
||||
key: "targetLocWcs",
|
||||
title: "WCS目标地址",
|
||||
width: 150,
|
||||
width: 170,
|
||||
},
|
||||
{
|
||||
dataIndex: "invoiceCode",
|
||||
|
|
@ -515,6 +523,7 @@
|
|||
const toolbar = [{
|
||||
label: "新增",
|
||||
code: "wms:task:add",
|
||||
icon: 'PlusOutlined',
|
||||
event: function() {
|
||||
state.visibleSave = true
|
||||
}
|
||||
|
|
@ -530,6 +539,7 @@
|
|||
{
|
||||
label: "下发",
|
||||
code: "wms:task:taskSend",
|
||||
icon: 'SendOutlined',
|
||||
event: function() {
|
||||
taskSendMethod(state.selectedRowKeys[0])
|
||||
}
|
||||
|
|
@ -537,6 +547,7 @@
|
|||
{
|
||||
label: "完成",
|
||||
code: "wms:task:taskOver",
|
||||
icon: 'CheckOutlined',
|
||||
event: function() {
|
||||
taskOverMethod(state.selectedRowKeys[0])
|
||||
}
|
||||
|
|
@ -544,6 +555,8 @@
|
|||
{
|
||||
label: "取消",
|
||||
code: "wms:task:taskCancel",
|
||||
icon: 'StopOutlined',
|
||||
danger: true,
|
||||
event: function() {
|
||||
taskCancelMethod(state.selectedRowKeys[0])
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,6 +57,14 @@
|
|||
/// 列配置
|
||||
const columns = ref(
|
||||
[{
|
||||
dataIndex: "index",
|
||||
key: "index",
|
||||
title: "序号",
|
||||
width: 60,
|
||||
fixed: 'left',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
dataIndex: "houseCode",
|
||||
key: "houseCode",
|
||||
title: "仓库号",
|
||||
|
|
|
|||
|
|
@ -15,23 +15,23 @@
|
|||
<a-col :span="24" style="height: 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"
|
||||
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
|
||||
</pro-table> -->
|
||||
<a-table :columns="pageParam.columns" :data-source="datas" :pagination="pagination"
|
||||
style="margin-top: 10px" />
|
||||
/>
|
||||
|
||||
</a-card>
|
||||
</a-col>
|
||||
<a-col :span="24" style="height: 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"
|
||||
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
|
||||
</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-col>
|
||||
|
|
|
|||
|
|
@ -15,22 +15,22 @@
|
|||
<a-col :span="24" style="height: 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"
|
||||
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
|
||||
</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-col>
|
||||
<a-col :span="24" style="height: 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"
|
||||
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
|
||||
</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-col>
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
<a-card style="width: 100%;">
|
||||
<!-- <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">
|
||||
</pro-table>
|
||||
</a-card>
|
||||
|
|
@ -40,6 +40,14 @@
|
|||
const tableRef = ref()
|
||||
|
||||
const columns = [{
|
||||
dataIndex: "index",
|
||||
key: "index",
|
||||
title: "序号",
|
||||
width: 60,
|
||||
fixed: 'left',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
dataIndex: "sku_code",
|
||||
key: "sku_code",
|
||||
title: "物料编号",
|
||||
|
|
@ -71,7 +79,7 @@
|
|||
const pagination = {
|
||||
params: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 20,
|
||||
},
|
||||
reportCode: "InventoryInfo",
|
||||
// showSizeChanger: true, // 显示可改变每页条数
|
||||
|
|
|
|||
|
|
@ -58,6 +58,14 @@
|
|||
})
|
||||
|
||||
const columns = [{
|
||||
dataIndex: "index",
|
||||
key: "index",
|
||||
title: "序号",
|
||||
width: 60,
|
||||
fixed: 'left',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
dataIndex: "palletCode",
|
||||
key: "palletCode",
|
||||
title: "托盘号",
|
||||
|
|
|
|||
|
|
@ -1,402 +1,402 @@
|
|||
<template>
|
||||
<div>
|
||||
<page-layout>
|
||||
<a-row :gutter="[0,2]">
|
||||
<a-col :span="24" style="height: 100%;">
|
||||
<a-card style="width: 100%;">
|
||||
<!-- 托盘库存视图记录列表 -->
|
||||
<pro-table style="margin-top: 10px" rowKey="id" ref="tableRef" :fetch="fetch" :columns="columns"
|
||||
: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>
|
||||
<a-list-layout ref="pageRef">
|
||||
<!-- 托盘库存视图记录列表 -->
|
||||
<pro-table ref="tableRef" :fetch="fetch" :columns="columns" :toolbar="toolbar" :operate="operate"
|
||||
:param="state.param" :pagination="pagination" :hasSearch="false"
|
||||
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
|
||||
</pro-table>
|
||||
</a-list-layout>
|
||||
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
message,
|
||||
Modal as modal
|
||||
} from '@hwork/ant-design-vue';
|
||||
import {
|
||||
ExclamationCircleOutlined
|
||||
} from '@ant-design/icons-vue';
|
||||
import {
|
||||
page,
|
||||
remove,
|
||||
removeBatch
|
||||
} from "@/api/wms/inventoryView";
|
||||
import {
|
||||
reactive,
|
||||
createVNode,
|
||||
ref,
|
||||
} from 'vue';
|
||||
const removeKey = "remove";
|
||||
const removeBatchKey = "removeBatch";
|
||||
import {
|
||||
message,
|
||||
Modal as modal
|
||||
} from '@hwork/ant-design-vue';
|
||||
import {
|
||||
page,
|
||||
remove,
|
||||
removeBatch
|
||||
} from "@/api/wms/inventoryView";
|
||||
import {
|
||||
reactive,
|
||||
createVNode,
|
||||
ref,
|
||||
} from 'vue';
|
||||
const removeKey = "remove";
|
||||
const removeBatchKey = "removeBatch";
|
||||
|
||||
export default {
|
||||
components: {},
|
||||
export default {
|
||||
components: {},
|
||||
|
||||
setup() {
|
||||
setup() {
|
||||
|
||||
const tableRef = ref()
|
||||
const tableRef = ref()
|
||||
|
||||
const columns = [{
|
||||
dataIndex: "houseCode",
|
||||
key: "houseCode",
|
||||
title: "仓库号",
|
||||
width: 90,
|
||||
showSearch: true,
|
||||
},
|
||||
// {
|
||||
// dataIndex: "storageType",
|
||||
// key: "storageType",
|
||||
// title: "存储类型",
|
||||
// width: 200,
|
||||
// },
|
||||
{
|
||||
dataIndex: "palletCode",
|
||||
key: "palletCode",
|
||||
title: "托盘编号",
|
||||
width: 120,
|
||||
showSearch: true,
|
||||
},
|
||||
// {
|
||||
// dataIndex: "palletType",
|
||||
// key: "palletType",
|
||||
// title: "托盘类型",
|
||||
// width: 120,
|
||||
// showSearch: true,
|
||||
// },
|
||||
{
|
||||
dataIndex: "skuCode",
|
||||
key: "skuCode",
|
||||
title: "物料编号",
|
||||
width: 120,
|
||||
showSearch: true,
|
||||
},
|
||||
{
|
||||
dataIndex: "skuName",
|
||||
key: "skuName",
|
||||
title: "物料描述",
|
||||
width: 200,
|
||||
showSearch: true,
|
||||
},
|
||||
{
|
||||
dataIndex: "skuType",
|
||||
key: "skuType",
|
||||
title: "物料类型",
|
||||
width: 120,
|
||||
showSearch: true,
|
||||
},
|
||||
{
|
||||
dataIndex: "batch",
|
||||
key: "batch",
|
||||
title: "批次",
|
||||
width: 100,
|
||||
showSearch: true,
|
||||
},
|
||||
// {
|
||||
// dataIndex: "serial",
|
||||
// key: "serial",
|
||||
// title: "序列号",
|
||||
// width: 120,
|
||||
// },
|
||||
// {
|
||||
// dataIndex: "master",
|
||||
// key: "master",
|
||||
// title: "货主",
|
||||
// width: 100,
|
||||
// showSearch: true,
|
||||
// },
|
||||
// {
|
||||
// dataIndex: "producer",
|
||||
// key: "producer",
|
||||
// title: "厂家",
|
||||
// width: 100,
|
||||
// showSearch: true,
|
||||
// },
|
||||
{
|
||||
dataIndex: "customer",
|
||||
key: "customer",
|
||||
title: "客户",
|
||||
width: 100,
|
||||
showSearch: true,
|
||||
},
|
||||
// {
|
||||
// dataIndex: "produceDate",
|
||||
// key: "produceDate",
|
||||
// title: "生产日期",
|
||||
// width: 180,
|
||||
// },
|
||||
// {
|
||||
// dataIndex: "overdue",
|
||||
// key: "overdue",
|
||||
// title: "过期日期",
|
||||
// width: 180,
|
||||
// },
|
||||
{
|
||||
dataIndex: "skuQty",
|
||||
key: "skuQty",
|
||||
title: "物料数量",
|
||||
width: 120,
|
||||
showSearch: true,
|
||||
},
|
||||
{
|
||||
dataIndex: "baseUnit",
|
||||
key: "baseUnit",
|
||||
title: "物流单位",
|
||||
width: 120,
|
||||
showSearch: true,
|
||||
},
|
||||
// {
|
||||
// dataIndex: "convertQty",
|
||||
// key: "convertQty",
|
||||
// title: "换算数量",
|
||||
// width: 120,
|
||||
// showSearch: true,
|
||||
// },
|
||||
// {
|
||||
// dataIndex: "primaryUnit",
|
||||
// key: "primaryUnit",
|
||||
// title: "换算单位",
|
||||
// width: 120,
|
||||
// showSearch: true,
|
||||
// },
|
||||
// {
|
||||
// dataIndex: "spInv",
|
||||
// key: "spInv",
|
||||
// title: "特殊库存",
|
||||
// width: 100,
|
||||
// dictionary: {
|
||||
// type: 'tag',
|
||||
// code: 'spInv'
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// dataIndex: "invType",
|
||||
// key: "invType",
|
||||
// title: "库存类型",
|
||||
// width: 120,
|
||||
// },
|
||||
// {
|
||||
// dataIndex: "qualityStatus",
|
||||
// key: "qualityStatus",
|
||||
// title: "质量状态",
|
||||
// width: 100,
|
||||
// dictionary: {
|
||||
// type: 'tag',
|
||||
// code: 'qualityStatus'
|
||||
// },
|
||||
// },
|
||||
{
|
||||
dataIndex: "weight",
|
||||
key: "weight",
|
||||
title: "重量",
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
dataIndex: "weightUnit",
|
||||
key: "weightUnit",
|
||||
title: "重量单位",
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
dataIndex: "sourceLoc",
|
||||
key: "sourceLoc",
|
||||
title: "源位置",
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
dataIndex: "targetLoc",
|
||||
key: "targetLoc",
|
||||
title: "目标位置",
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
dataIndex: "finishDate",
|
||||
key: "finishDate",
|
||||
title: "完成时间",
|
||||
width: 180,
|
||||
},
|
||||
// {
|
||||
// dataIndex: "note",
|
||||
// key: "note",
|
||||
// title: "备注"
|
||||
// },
|
||||
{
|
||||
dataIndex: "createBy",
|
||||
key: "createBy",
|
||||
title: "录入人",
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
dataIndex: "createTime",
|
||||
key: "createTime",
|
||||
title: "录入时间",
|
||||
width: 200,
|
||||
},
|
||||
{
|
||||
dataIndex: "updateBy",
|
||||
key: "updateBy",
|
||||
title: "修改人",
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
dataIndex: "updateTime",
|
||||
key: "updateTime",
|
||||
title: "修改时间",
|
||||
width: 200,
|
||||
},
|
||||
{
|
||||
dataIndex: "remark",
|
||||
key: "remark",
|
||||
title: "备注",
|
||||
width: 300,
|
||||
},
|
||||
];
|
||||
const columns = [{
|
||||
dataIndex: "index",
|
||||
key: "index",
|
||||
title: "序号",
|
||||
width: 60,
|
||||
fixed: 'left',
|
||||
align: 'center'
|
||||
}, {
|
||||
dataIndex: "houseCode",
|
||||
key: "houseCode",
|
||||
title: "仓库号",
|
||||
width: 120,
|
||||
showSearch: true,
|
||||
},
|
||||
// {
|
||||
// dataIndex: "storageType",
|
||||
// key: "storageType",
|
||||
// title: "存储类型",
|
||||
// width: 200,
|
||||
// },
|
||||
{
|
||||
dataIndex: "palletCode",
|
||||
key: "palletCode",
|
||||
title: "托盘编号",
|
||||
width: 120,
|
||||
showSearch: true,
|
||||
},
|
||||
// {
|
||||
// dataIndex: "palletType",
|
||||
// key: "palletType",
|
||||
// title: "托盘类型",
|
||||
// width: 120,
|
||||
// showSearch: true,
|
||||
// },
|
||||
{
|
||||
dataIndex: "skuCode",
|
||||
key: "skuCode",
|
||||
title: "物料编号",
|
||||
width: 150,
|
||||
showSearch: true,
|
||||
},
|
||||
{
|
||||
dataIndex: "skuName",
|
||||
key: "skuName",
|
||||
title: "物料描述",
|
||||
width: 200,
|
||||
showSearch: true,
|
||||
},
|
||||
{
|
||||
dataIndex: "skuType",
|
||||
key: "skuType",
|
||||
title: "物料类型",
|
||||
width: 120,
|
||||
showSearch: true,
|
||||
},
|
||||
{
|
||||
dataIndex: "batch",
|
||||
key: "batch",
|
||||
title: "批次",
|
||||
width: 100,
|
||||
showSearch: true,
|
||||
},
|
||||
// {
|
||||
// dataIndex: "serial",
|
||||
// key: "serial",
|
||||
// title: "序列号",
|
||||
// width: 120,
|
||||
// },
|
||||
// {
|
||||
// dataIndex: "master",
|
||||
// key: "master",
|
||||
// title: "货主",
|
||||
// width: 100,
|
||||
// showSearch: true,
|
||||
// },
|
||||
// {
|
||||
// dataIndex: "producer",
|
||||
// key: "producer",
|
||||
// title: "厂家",
|
||||
// width: 100,
|
||||
// showSearch: true,
|
||||
// },
|
||||
{
|
||||
dataIndex: "customer",
|
||||
key: "customer",
|
||||
title: "客户",
|
||||
width: 100,
|
||||
showSearch: true,
|
||||
},
|
||||
// {
|
||||
// dataIndex: "produceDate",
|
||||
// key: "produceDate",
|
||||
// title: "生产日期",
|
||||
// width: 180,
|
||||
// },
|
||||
// {
|
||||
// dataIndex: "overdue",
|
||||
// key: "overdue",
|
||||
// title: "过期日期",
|
||||
// width: 180,
|
||||
// },
|
||||
{
|
||||
dataIndex: "skuQty",
|
||||
key: "skuQty",
|
||||
title: "物料数量",
|
||||
align: "right",
|
||||
width: 120,
|
||||
showSearch: true,
|
||||
},
|
||||
{
|
||||
dataIndex: "baseUnit",
|
||||
key: "baseUnit",
|
||||
title: "物流单位",
|
||||
width: 120,
|
||||
showSearch: true,
|
||||
},
|
||||
// {
|
||||
// dataIndex: "convertQty",
|
||||
// key: "convertQty",
|
||||
// title: "换算数量",
|
||||
// width: 120,
|
||||
// showSearch: true,
|
||||
// },
|
||||
// {
|
||||
// dataIndex: "primaryUnit",
|
||||
// key: "primaryUnit",
|
||||
// title: "换算单位",
|
||||
// width: 120,
|
||||
// showSearch: true,
|
||||
// },
|
||||
// {
|
||||
// dataIndex: "spInv",
|
||||
// key: "spInv",
|
||||
// title: "特殊库存",
|
||||
// width: 100,
|
||||
// dictionary: {
|
||||
// type: 'tag',
|
||||
// code: 'spInv'
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// dataIndex: "invType",
|
||||
// key: "invType",
|
||||
// title: "库存类型",
|
||||
// width: 120,
|
||||
// },
|
||||
// {
|
||||
// dataIndex: "qualityStatus",
|
||||
// key: "qualityStatus",
|
||||
// title: "质量状态",
|
||||
// width: 100,
|
||||
// dictionary: {
|
||||
// type: 'tag',
|
||||
// code: 'qualityStatus'
|
||||
// },
|
||||
// },
|
||||
{
|
||||
dataIndex: "weight",
|
||||
key: "weight",
|
||||
title: "重量",
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
dataIndex: "weightUnit",
|
||||
key: "weightUnit",
|
||||
title: "重量单位",
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
dataIndex: "sourceLoc",
|
||||
key: "sourceLoc",
|
||||
title: "源位置",
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
dataIndex: "targetLoc",
|
||||
key: "targetLoc",
|
||||
title: "目标位置",
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
dataIndex: "finishDate",
|
||||
key: "finishDate",
|
||||
title: "完成时间",
|
||||
width: 180,
|
||||
},
|
||||
// {
|
||||
// dataIndex: "note",
|
||||
// key: "note",
|
||||
// title: "备注"
|
||||
// },
|
||||
{
|
||||
dataIndex: "createBy",
|
||||
key: "createBy",
|
||||
title: "录入人",
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
dataIndex: "createTime",
|
||||
key: "createTime",
|
||||
title: "录入时间",
|
||||
width: 200,
|
||||
},
|
||||
{
|
||||
dataIndex: "updateBy",
|
||||
key: "updateBy",
|
||||
title: "修改人",
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
dataIndex: "updateTime",
|
||||
key: "updateTime",
|
||||
title: "修改时间",
|
||||
width: 200,
|
||||
},
|
||||
{
|
||||
dataIndex: "remark",
|
||||
key: "remark",
|
||||
title: "备注",
|
||||
width: 300,
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
/// 数据来源 [模拟]
|
||||
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 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;
|
||||
};
|
||||
|
||||
/// 数据来源 [模拟]
|
||||
const fetch = async (param) => {
|
||||
var response = await page(param);
|
||||
console.log("response", response)
|
||||
return {
|
||||
state,
|
||||
fetch,
|
||||
search,
|
||||
toolbar,
|
||||
columns,
|
||||
operate,
|
||||
pagination,
|
||||
onSelectChange,
|
||||
tableRef,
|
||||
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",
|
||||
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>
|
||||
|
|
|
|||
|
|
@ -1,390 +1,401 @@
|
|||
<template>
|
||||
<div>
|
||||
<page-layout>
|
||||
<a-row :gutter="[0,2]">
|
||||
<a-col :span="24" style="height: 100%;">
|
||||
<a-card style="width: 100%;">
|
||||
<!-- 列表 -->
|
||||
<pro-table rowKey="id" ref="tableRef" :fetch="fetch" :columns="columns" :toolbar="toolbar"
|
||||
:operate="operate" :param="state.param" :pagination="pagination"
|
||||
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
|
||||
</pro-table>
|
||||
</a-card>
|
||||
</a-col>
|
||||
<a-col :span="24" style="height: 70%;">
|
||||
<a-card style="width: 100%;">
|
||||
<viewPalletDetail :visible="state.visiblePalletDetail" :record="state.recordPalletDetail"
|
||||
:projectReload="projectReload">
|
||||
</viewPalletDetail>
|
||||
</a-card>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</page-layout>
|
||||
<a-list-layout ref="pageRef">
|
||||
<!-- 列表 -->
|
||||
<pro-table rowKey="id" ref="tableRef" :fetch="fetch" :columns="columns" :toolbar="toolbar" :operate="operate"
|
||||
:param="state.param" :pagination="pagination" :hasSearch="false"
|
||||
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
|
||||
</pro-table>
|
||||
<!-- 托盘明细:改为抽屉承载,统一交互与高度管理 -->
|
||||
<a-drawer
|
||||
:visible="state.visiblePalletDetail"
|
||||
:width="720"
|
||||
title="托盘明细"
|
||||
destroyOnClose
|
||||
@close="state.visiblePalletDetail = false"
|
||||
>
|
||||
<viewPalletDetail
|
||||
:visible="true"
|
||||
:record="state.recordPalletDetail"
|
||||
:projectReload="projectReload"
|
||||
@close="state.visiblePalletDetail = false"
|
||||
/>
|
||||
</a-drawer>
|
||||
|
||||
|
||||
</a-list-layout>
|
||||
<save :visible="state.visibleSave" @close="closeSave"></save>
|
||||
<checkOut :visible="state.visibleCheck" :palletInfo="state.checkOutPalletInfo" @close="closeCheck"></checkOut>
|
||||
<edit :visible="state.visibleEdit" @close="closeEdit" :record="state.recordEdit"></edit>
|
||||
<child @fatherMethod="fatherMethod"></child>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import save from './modal/save.vue';
|
||||
import edit from './modal/edit.vue';
|
||||
import checkOut from './modal/checkOut.vue';
|
||||
import palletDetail from './modal/palletDetail.vue';
|
||||
import {
|
||||
message,
|
||||
Modal as modal
|
||||
} from '@hwork/ant-design-vue';
|
||||
import {
|
||||
ExclamationCircleOutlined
|
||||
} from '@ant-design/icons-vue';
|
||||
import save from './modal/save.vue';
|
||||
import edit from './modal/edit.vue';
|
||||
import checkOut from './modal/checkOut.vue';
|
||||
import palletDetail from './modal/palletDetail.vue';
|
||||
import {
|
||||
message,
|
||||
Modal as modal
|
||||
} from '@hwork/ant-design-vue';
|
||||
import {
|
||||
ExclamationCircleOutlined
|
||||
} from '@ant-design/icons-vue';
|
||||
|
||||
import {
|
||||
page,
|
||||
remove,
|
||||
removeBatch
|
||||
} from "@/api/wms/pallet";
|
||||
import {
|
||||
reactive,
|
||||
createVNode,
|
||||
ref,
|
||||
} from 'vue';
|
||||
const removeKey = "remove";
|
||||
const removeBatchKey = "removeBatch";
|
||||
const showCheckOutModelKey = "showCheckOutModel";
|
||||
import {
|
||||
page,
|
||||
remove,
|
||||
removeBatch
|
||||
} from "@/api/wms/pallet";
|
||||
import {
|
||||
reactive,
|
||||
createVNode,
|
||||
ref,
|
||||
} from 'vue';
|
||||
const removeKey = "remove";
|
||||
const removeBatchKey = "removeBatch";
|
||||
const showCheckOutModelKey = "showCheckOutModel";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
save,
|
||||
edit,
|
||||
checkOut,
|
||||
viewPalletDetail: palletDetail,
|
||||
export default {
|
||||
components: {
|
||||
save,
|
||||
edit,
|
||||
checkOut,
|
||||
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() {
|
||||
|
||||
const tableRef = ref()
|
||||
|
||||
const switchFormat = {
|
||||
yes: true,
|
||||
no: false,
|
||||
event: function(value, record) {
|
||||
record.enable = !record.enable;
|
||||
return value;
|
||||
}
|
||||
}
|
||||
|
||||
const columns = [{
|
||||
dataIndex: "palletCode",
|
||||
key: "palletCode",
|
||||
title: "托盘号",
|
||||
width: 120,
|
||||
showSearch: true,
|
||||
},
|
||||
{
|
||||
dataIndex: "palletType",
|
||||
key: "palletType",
|
||||
title: "托盘类型",
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
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: "palletCode",
|
||||
key: "palletCode",
|
||||
title: "托盘号",
|
||||
width: 120,
|
||||
showSearch: true,
|
||||
},
|
||||
{
|
||||
dataIndex: "palletType",
|
||||
key: "palletType",
|
||||
title: "托盘类型",
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
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 {
|
||||
state,
|
||||
fetch,
|
||||
search,
|
||||
toolbar,
|
||||
columns,
|
||||
operate,
|
||||
closeSave,
|
||||
closeEdit,
|
||||
closeCheck,
|
||||
pagination,
|
||||
onSelectChange,
|
||||
tableRef,
|
||||
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",
|
||||
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>
|
||||
|
|
|
|||
|
|
@ -1,15 +1,9 @@
|
|||
<template>
|
||||
<div>
|
||||
<page-layout>
|
||||
<a-row :gutter="[0,2]">
|
||||
<a-col style="width: 100%;">
|
||||
<div class="drawer-table">
|
||||
<pro-table v-if="visible" ref="tableChilrenRef" rowKey="id" :fetch="fetch"
|
||||
:columns="columns" :toolbar="toolbar" :operate="operate" :param="state.param" :pagination="pagination"
|
||||
:row-selection="{ selectedRowKeys:state.selectedRowKeys, onChange: onSelectChange }">
|
||||
</pro-table>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</page-layout>
|
||||
<saveDetail :visible="state.visibleSave" @close="closeSave" :record="state.recordSave"></saveDetail>
|
||||
<editDetail :visible="state.visibleEdit" @close="closeEdit" :record="state.recordEdit"></editDetail>
|
||||
</div>
|
||||
|
|
@ -64,6 +58,14 @@
|
|||
})
|
||||
|
||||
const columns = [{
|
||||
dataIndex: "index",
|
||||
key: "index",
|
||||
title: "序号",
|
||||
width: 60,
|
||||
fixed: 'left',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
dataIndex: "palletCode",
|
||||
key: "palletCode",
|
||||
title: "托盘号",
|
||||
|
|
@ -431,3 +433,36 @@
|
|||
},
|
||||
};
|
||||
</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>
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
<pro-query :searchParam="searchParam" @on-search="search"></pro-query>
|
||||
</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">
|
||||
</pro-table>
|
||||
</a-list-layout>
|
||||
|
|
@ -37,7 +37,15 @@ export default {
|
|||
|
||||
const tableRef = ref()
|
||||
|
||||
const columns = [{
|
||||
const columns = [
|
||||
{
|
||||
dataIndex: "index",
|
||||
key: "index",
|
||||
title: "序号",
|
||||
width: 60,
|
||||
fixed: 'left',
|
||||
align: 'center'
|
||||
},{
|
||||
dataIndex: "palletCode",
|
||||
key: "palletCode",
|
||||
title: "托盘号",
|
||||
|
|
@ -55,14 +63,14 @@ export default {
|
|||
dataIndex: "taskCode",
|
||||
key: "taskCode",
|
||||
title: "任务号",
|
||||
width: 90,
|
||||
width: 120,
|
||||
showSearch: true,
|
||||
},
|
||||
{
|
||||
dataIndex: "directFlag",
|
||||
key: "directFlag",
|
||||
title: "方向标志",
|
||||
width: 80,
|
||||
width: 100,
|
||||
dictionary: {
|
||||
type: 'tag',
|
||||
code: 'DirectFlag'
|
||||
|
|
@ -72,13 +80,13 @@ export default {
|
|||
dataIndex: "skuType",
|
||||
key: "skuType",
|
||||
title: "物料类型",
|
||||
width: 80,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
dataIndex: "skuCode",
|
||||
key: "skuCode",
|
||||
title: "物料编号",
|
||||
width: 120,
|
||||
width: 160,
|
||||
showSearch: true,
|
||||
},
|
||||
{
|
||||
|
|
@ -140,14 +148,15 @@ export default {
|
|||
dataIndex: "skuQty",
|
||||
key: "skuQty",
|
||||
title: "物料数量",
|
||||
width: 100,
|
||||
align: 'right',
|
||||
width: 120,
|
||||
showSearch: true,
|
||||
},
|
||||
{
|
||||
dataIndex: "baseUnit",
|
||||
key: "baseUnit",
|
||||
title: "物流单位",
|
||||
width: 100,
|
||||
width: 120,
|
||||
showSearch: true,
|
||||
},
|
||||
// {
|
||||
|
|
@ -208,7 +217,7 @@ export default {
|
|||
dataIndex: "sourceLoc",
|
||||
key: "sourceLoc",
|
||||
title: "源位置",
|
||||
width: 120,
|
||||
width: 150,
|
||||
showSearch: true,
|
||||
},
|
||||
{
|
||||
|
|
@ -258,7 +267,7 @@ export default {
|
|||
dataIndex: "remark",
|
||||
key: "remark",
|
||||
title: "备注",
|
||||
width: 300,
|
||||
width: 250,
|
||||
},
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -50,6 +50,14 @@
|
|||
|
||||
/// 列配置
|
||||
const columns = [{
|
||||
dataIndex: "index",
|
||||
key: "index",
|
||||
title: "序号",
|
||||
width: 60,
|
||||
fixed: 'left',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
dataIndex: "skuCode",
|
||||
key: "skuCode",
|
||||
title: "物料编号",
|
||||
|
|
|
|||
|
|
@ -64,6 +64,14 @@
|
|||
|
||||
/// 列配置
|
||||
const columns = [{
|
||||
dataIndex: "index",
|
||||
key: "index",
|
||||
title: "序号",
|
||||
width: 60,
|
||||
fixed: 'left',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
dataIndex: "item",
|
||||
key: "item",
|
||||
title: "列表项",
|
||||
|
|
@ -340,13 +348,13 @@
|
|||
if (item === 'list') {
|
||||
search({
|
||||
pageNum: 1,
|
||||
pageSize: 10
|
||||
pageSize: 20
|
||||
})
|
||||
} else {
|
||||
search({ //fetch改为search
|
||||
item: item,
|
||||
pageNum: 1,
|
||||
pageSize: 10
|
||||
pageSize: 20
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -66,6 +66,14 @@
|
|||
|
||||
/// 列配置
|
||||
const columns = [{
|
||||
dataIndex: "index",
|
||||
key: "index",
|
||||
title: "序号",
|
||||
width: 60,
|
||||
fixed: 'left',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
dataIndex: "equipCode",
|
||||
key: "equipCode",
|
||||
title: "设备号",
|
||||
|
|
@ -79,7 +87,7 @@
|
|||
key: "sourceLoc",
|
||||
title: "起始地址",
|
||||
showSearch: true,
|
||||
width: 100,
|
||||
width: 140,
|
||||
sorter: {
|
||||
multiple: 1,
|
||||
},
|
||||
|
|
@ -89,7 +97,7 @@
|
|||
key: "targetLoc",
|
||||
title: "目标地址",
|
||||
showSearch: true,
|
||||
width: 100,
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
dataIndex: "equipType",
|
||||
|
|
@ -131,7 +139,8 @@
|
|||
dataIndex: "taskLimit",
|
||||
key: "taskLimit",
|
||||
title: "任务数限制",
|
||||
width: 120
|
||||
width: 120,
|
||||
align: 'right'
|
||||
},
|
||||
{
|
||||
dataIndex: "equipStatus",
|
||||
|
|
@ -254,6 +263,7 @@
|
|||
const toolbar = [{
|
||||
label: "新增",
|
||||
code: 'wms:locExit:add',
|
||||
icon: 'PlusOutlined',
|
||||
event: function() {
|
||||
state.visibleSave = true
|
||||
}
|
||||
|
|
@ -261,10 +271,11 @@
|
|||
{
|
||||
label: "删除",
|
||||
code: 'wms:locExit:remove',
|
||||
icon: 'DeleteOutlined',
|
||||
danger: true,
|
||||
event: function() {
|
||||
removeBatchMethod(state.selectedRowKeys)
|
||||
},
|
||||
type: 'danger'
|
||||
},
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -66,6 +66,14 @@
|
|||
|
||||
/// 列配置
|
||||
const columns = [{
|
||||
dataIndex: "index",
|
||||
key: "index",
|
||||
title: "序号",
|
||||
width: 60,
|
||||
fixed: 'left',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
dataIndex: "treeCode",
|
||||
key: "treeCode",
|
||||
title: "父节点",
|
||||
|
|
@ -457,7 +465,7 @@
|
|||
search({ //fetch改为search
|
||||
treeCode: treeCode,
|
||||
pageNum: 1,
|
||||
pageSize: 10
|
||||
pageSize: 20
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -40,6 +40,14 @@
|
|||
|
||||
/// 列配置
|
||||
const columns = [{
|
||||
dataIndex: "index",
|
||||
key: "index",
|
||||
title: "序号",
|
||||
width: 60,
|
||||
fixed: 'left',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
dataIndex: "outboundNo",
|
||||
key: "outboundNo",
|
||||
title: "需求编号",
|
||||
|
|
|
|||
|
|
@ -50,6 +50,14 @@
|
|||
|
||||
/// 列配置
|
||||
const columns = [{
|
||||
dataIndex: "index",
|
||||
key: "index",
|
||||
title: "序号",
|
||||
width: 60,
|
||||
fixed: 'left',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
dataIndex: "skuCode",
|
||||
key: "skuCode",
|
||||
title: "物料编号",
|
||||
|
|
|
|||
|
|
@ -50,6 +50,14 @@
|
|||
|
||||
/// 列配置
|
||||
const columns = [{
|
||||
dataIndex: "index",
|
||||
key: "index",
|
||||
title: "序号",
|
||||
width: 60,
|
||||
fixed: 'left',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
dataIndex: "seqCode",
|
||||
key: "seqCode",
|
||||
title: "值编号",
|
||||
|
|
@ -67,6 +75,7 @@
|
|||
dataIndex: "minValue",
|
||||
key: "minValue",
|
||||
title: "起始值",
|
||||
align: 'right',
|
||||
width: 150,
|
||||
showSearch:true
|
||||
},
|
||||
|
|
@ -74,6 +83,7 @@
|
|||
dataIndex: "incValue",
|
||||
key: "incValue",
|
||||
title: "自增值",
|
||||
align: 'right',
|
||||
width: 150,
|
||||
showSearch:true
|
||||
},
|
||||
|
|
@ -81,12 +91,14 @@
|
|||
dataIndex: "maxValue",
|
||||
key: "maxValue",
|
||||
title: "最大值",
|
||||
align: 'right',
|
||||
width: 150,
|
||||
showSearch:true
|
||||
},
|
||||
{
|
||||
dataIndex: "currValue",
|
||||
key: "currValue",
|
||||
align: 'right',
|
||||
title: "当前值",
|
||||
width: 150,
|
||||
showSearch:true
|
||||
|
|
@ -229,6 +241,7 @@
|
|||
const toolbar = [{
|
||||
label: "新增",
|
||||
code: 'wms:seqNum:add',
|
||||
icon: 'PlusOutlined',
|
||||
event: function() {
|
||||
state.visibleSave = true
|
||||
}
|
||||
|
|
@ -239,7 +252,8 @@
|
|||
event: function() {
|
||||
removeBatchMethod(state.selectedRowKeys)
|
||||
},
|
||||
type: 'danger'
|
||||
icon: 'DeleteOutlined',
|
||||
danger: true,
|
||||
},
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -50,6 +50,14 @@
|
|||
|
||||
/// 列配置
|
||||
const columns = [{
|
||||
dataIndex: "index",
|
||||
key: "index",
|
||||
title: "序号",
|
||||
width: 60,
|
||||
fixed: 'left',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
dataIndex: "snCode",
|
||||
key: "snCode",
|
||||
title: "物料条码",
|
||||
|
|
|
|||
|
|
@ -50,6 +50,14 @@
|
|||
|
||||
/// 列配置
|
||||
const columns = [{
|
||||
dataIndex: "index",
|
||||
key: "index",
|
||||
title: "序号",
|
||||
width: 60,
|
||||
fixed: 'left',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
dataIndex: "snCode",
|
||||
key: "snCode",
|
||||
title: "物料条码",
|
||||
|
|
|
|||
|
|
@ -50,6 +50,14 @@
|
|||
|
||||
/// 列配置
|
||||
const columns = [{
|
||||
dataIndex: "index",
|
||||
key: "index",
|
||||
title: "序号",
|
||||
width: 60,
|
||||
fixed: 'left',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
dataIndex: "snCode",
|
||||
key: "snCode",
|
||||
title: "物料条码",
|
||||
|
|
|
|||
|
|
@ -37,6 +37,14 @@
|
|||
const tableRef = ref();
|
||||
/// 列配置
|
||||
const columns = [{
|
||||
dataIndex: "index",
|
||||
key: "index",
|
||||
title: "序号",
|
||||
width: 60,
|
||||
fixed: 'left',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
dataIndex: "skuType",
|
||||
key: "skuType",
|
||||
title: "物料类别",
|
||||
|
|
@ -55,6 +63,8 @@
|
|||
},
|
||||
{
|
||||
dataIndex: "skuQty",
|
||||
width: 120,
|
||||
align: 'right',
|
||||
key: "skuQty",
|
||||
title: "物料库存",
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@
|
|||
ref
|
||||
} from 'vue';
|
||||
|
||||
|
||||
export default {
|
||||
components: {
|
||||
save,
|
||||
|
|
@ -36,16 +35,24 @@
|
|||
const tableRef = ref();
|
||||
/// 列配置
|
||||
const columns = [{
|
||||
dataIndex: "index",
|
||||
key: "index",
|
||||
title: "序号",
|
||||
width: 60,
|
||||
fixed: 'left',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
dataIndex: "date",
|
||||
key: "date",
|
||||
title: "日期",
|
||||
width: 60
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
dataIndex: "skuCode",
|
||||
key: "skuCode",
|
||||
title: "物料编号",
|
||||
width: 80
|
||||
width: 150
|
||||
},
|
||||
{
|
||||
dataIndex: "skuName",
|
||||
|
|
@ -56,32 +63,36 @@
|
|||
{
|
||||
dataIndex: "totalSkuNeedQty",
|
||||
key: "totalSkuNeedQty",
|
||||
align: 'right',
|
||||
title: "总需求数量",
|
||||
width: 80
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
dataIndex: "mesLocCode",
|
||||
key: "mesLocCode",
|
||||
title: "接收工位",
|
||||
width: 80
|
||||
width: 150
|
||||
},
|
||||
{
|
||||
dataIndex: "totalSkuJoinQty",
|
||||
key: "totalSkuJoinQty",
|
||||
align: 'right',
|
||||
title: "总交接数量",
|
||||
width: 80
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
dataIndex: "totalSkuInTransitQty",
|
||||
key: "totalSkuInTransitQty",
|
||||
align: 'right',
|
||||
title: "在途数量",
|
||||
width: 80
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
dataIndex: "totalSkuShortageQty",
|
||||
key: "totalSkuShortageQty",
|
||||
title: "交接短缺数量",
|
||||
width: 80
|
||||
align: 'right',
|
||||
width: 150
|
||||
}
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -70,6 +70,14 @@
|
|||
|
||||
/// 列配置
|
||||
const columns = [{
|
||||
dataIndex: "index",
|
||||
key: "index",
|
||||
title: "序号",
|
||||
width: 60,
|
||||
fixed: 'left',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
dataIndex: "trackCode",
|
||||
key: "trackCode",
|
||||
title: "通道号",
|
||||
|
|
|
|||
Loading…
Reference in New Issue