列表优化
parent
d92a44e67f
commit
b602266648
|
|
@ -341,7 +341,7 @@ html {
|
||||||
.fixedHeader.muiltTab {
|
.fixedHeader.muiltTab {
|
||||||
z-index: 600;
|
z-index: 600;
|
||||||
#content {
|
#content {
|
||||||
height: calc(~"(100% - 38px)");
|
height: calc(~"(100% - 42px)");
|
||||||
-ms-overflow-style: none;
|
-ms-overflow-style: none;
|
||||||
overflow: -moz-scrollbars-none;
|
overflow: -moz-scrollbars-none;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -16,8 +16,10 @@ export default defineComponent({
|
||||||
name: 'ATable',
|
name: 'ATable',
|
||||||
inheritAttrs: false,
|
inheritAttrs: false,
|
||||||
setup(_, { attrs, slots }) {
|
setup(_, { attrs, slots }) {
|
||||||
|
// 每次渲染时基于最新的 columns 重新打补丁,确保列显示/隐藏等变更能够生效
|
||||||
|
return () => {
|
||||||
const patchedColumns = patchColumns(attrs.columns);
|
const patchedColumns = patchColumns(attrs.columns);
|
||||||
return () => h(Table, { ...attrs, columns: patchedColumns }, slots);
|
return h(Table, { ...attrs, columns: patchedColumns }, slots);
|
||||||
|
};
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@
|
||||||
.pro-table-next {
|
.pro-table-next {
|
||||||
float: right;
|
float: right;
|
||||||
.ant-btn {
|
.ant-btn {
|
||||||
margin: 4px;
|
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,22 @@
|
||||||
<template>
|
<template>
|
||||||
<div id="pro-table">
|
<div id="pro-table">
|
||||||
<!-- 表格工具栏 -->
|
<!-- 表格工具栏 -->
|
||||||
<div class="pro-table-tool">
|
<div class="pro-table-tool" :style="proTableToolStyle">
|
||||||
<!-- 自定义工具栏 -->
|
<!-- 自定义工具栏 -->
|
||||||
<div class="pro-table-prev">
|
<div class="pro-table-prev" >
|
||||||
<template :key="index" v-for="(item, index) in toolbar">
|
<!-- 将工具栏改为合并后的 mergedToolbar,包含外部传入与内置的 打印/导出 按钮 -->
|
||||||
|
<template :key="index" v-for="(item, index) in mergedToolbar">
|
||||||
<!-- 更多按钮 -->
|
<!-- 更多按钮 -->
|
||||||
<pro-authority :value="item.code ? item.code : false" v-if="item.children && item.children.length > 0">
|
<pro-authority :value="item.code ? item.code : false" v-if="item.children && item.children.length > 0">
|
||||||
<a-dropdown>
|
<a-dropdown>
|
||||||
<a-button @click="item.event(selectedRowKeys)">{{ item.label }}</a-button>
|
<!-- 支持 danger 与 icon 插槽 -->
|
||||||
|
<a-button :danger="item.danger === true || item.type === 'danger'"
|
||||||
|
@click="item.event(selectedRowKeys)">
|
||||||
|
<template v-if="item.icon" #icon>
|
||||||
|
<component :is="item.icon" />
|
||||||
|
</template>
|
||||||
|
{{ item.label }}
|
||||||
|
</a-button>
|
||||||
<template #overlay>
|
<template #overlay>
|
||||||
<a-menu>
|
<a-menu>
|
||||||
<!-- 遍历子集 -->
|
<!-- 遍历子集 -->
|
||||||
|
|
@ -22,69 +30,26 @@
|
||||||
</a-dropdown>
|
</a-dropdown>
|
||||||
</pro-authority>
|
</pro-authority>
|
||||||
<pro-authority :value="item.code ? item.code : false" v-else>
|
<pro-authority :value="item.code ? item.code : false" v-else>
|
||||||
<a-button
|
<a-button size="small"
|
||||||
:type="item.type&&['primary','ghost','dashed','link','text','default'].includes(item.type) ? item.type : index == 0 ? 'primary' : 'default'"
|
:type="item.type&&['primary','ghost','dashed','link','text','default',].includes(item.type) ? item.type : 'default'"
|
||||||
|
:danger="item.danger === true || item.type === 'danger'"
|
||||||
@click="item.event(selectedRowKeys)" :style="item.style ?? ''">
|
@click="item.event(selectedRowKeys)" :style="item.style ?? ''">
|
||||||
|
<template v-if="item.icon" #icon>
|
||||||
|
<component :is="item.icon" />
|
||||||
|
</template>
|
||||||
{{ item.label }}
|
{{ item.label }}
|
||||||
</a-button>
|
</a-button>
|
||||||
</pro-authority>
|
</pro-authority>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
<!-- 默认工具栏 -->
|
<!-- 默认工具栏:使用 Antd a-table-settings 呈现(列设置 + 行高),并保留刷新按钮 -->
|
||||||
<div class="pro-table-next" v-if="defaultToolbar">
|
<div class="pro-table-next" v-if="defaultToolbar">
|
||||||
<!-- 刷新工具栏 -->
|
<a-table-settings v-model:columns="columnsModel" :sizeOptions="[]" size="small"/>
|
||||||
<a-button @click="reload">
|
<!-- <a-button @click="reload" style="margin-left: 8px">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<SyncOutlined />
|
<SyncOutlined />
|
||||||
</template>
|
</template>
|
||||||
</a-button>
|
</a-button> -->
|
||||||
<!-- 过滤工具栏 -->
|
|
||||||
<a-dropdown>
|
|
||||||
<a-button>
|
|
||||||
<template #icon>
|
|
||||||
<AppstoreOutlined />
|
|
||||||
</template>
|
|
||||||
</a-button>
|
|
||||||
<template #overlay>
|
|
||||||
<a-menu class="filtration">
|
|
||||||
<a-checkbox-group v-model:value="filtrationColumnKeys" @change="filtration">
|
|
||||||
<a-row>
|
|
||||||
<!-- 遍历字段 -->
|
|
||||||
<a-col :span="24" :key="index" v-for="(filtrationColumn, index) in filtrationColumns">
|
|
||||||
<a-checkbox :value="filtrationColumn.value">
|
|
||||||
{{ filtrationColumn.label }}
|
|
||||||
</a-checkbox>
|
|
||||||
</a-col>
|
|
||||||
</a-row>
|
|
||||||
</a-checkbox-group>
|
|
||||||
</a-menu>
|
|
||||||
</template>
|
|
||||||
</a-dropdown>
|
|
||||||
<!-- 过滤工具栏 -->
|
|
||||||
<a-dropdown>
|
|
||||||
<a-button><template #icon>
|
|
||||||
<ColumnHeightOutlined />
|
|
||||||
</template></a-button>
|
|
||||||
<template #overlay>
|
|
||||||
<a-menu :selectedKeys="[size]">
|
|
||||||
<a-menu-item @click="changeSize('default')" key="default">默认尺寸</a-menu-item>
|
|
||||||
<a-menu-item @click="changeSize('middle')" key="middle">中等尺寸</a-menu-item>
|
|
||||||
<a-menu-item @click="changeSize('small')" key="small">最小尺寸</a-menu-item>
|
|
||||||
</a-menu>
|
|
||||||
</template>
|
|
||||||
</a-dropdown>
|
|
||||||
<!--打印按钮-->
|
|
||||||
<a-button @click="print">
|
|
||||||
<template #icon>
|
|
||||||
<ExportOutlined />
|
|
||||||
</template>
|
|
||||||
</a-button>
|
|
||||||
<!--excel导出按钮-->
|
|
||||||
<a-button @click="ExportExcel">
|
|
||||||
<template #icon>
|
|
||||||
<CloudDownloadOutlined />
|
|
||||||
</template>
|
|
||||||
</a-button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!--数据导出栏-->
|
<!--数据导出栏-->
|
||||||
|
|
@ -94,14 +59,14 @@
|
||||||
:pagination="exportExcelPagination" style="display: none">
|
:pagination="exportExcelPagination" style="display: none">
|
||||||
</a-table>
|
</a-table>
|
||||||
<!-- 表格组件 -->
|
<!-- 表格组件 -->
|
||||||
<a-table id="table" :rowKey="rowKey" @change="fetch" :columns="columns" :loading="loading" :pagination="pagination"
|
<a-table id="table" :rowKey="rowKey" @change="fetch" :columns="columnsModel" :loading="loading" :pagination="pagination"
|
||||||
:dataSource="datasource" :row-selection="rowSelection"
|
:dataSource="datasource" :row-selection="rowSelection"
|
||||||
:row-height="100" :customRow="rowClick" :sortDirections="['descend', 'ascend', '']"
|
:row-height="100" :customRow="rowClick" :sortDirections="['descend', 'ascend', '']"
|
||||||
:rowClassName="setRowClassName" @resizeColumn="handleResizeColumn" bordered>
|
:rowClassName="setRowClassName" @resizeColumn="handleResizeColumn">
|
||||||
<!--列搜索组件封装-->
|
<!--列搜索组件封装-->
|
||||||
<template #filterDropdown="{ setSelectedKeys, selectedKeys, confirm, clearFilters, column }">
|
<template #filterDropdown="{ setSelectedKeys, selectedKeys, confirm, clearFilters, column }">
|
||||||
<div style="padding: 8px">
|
<div style="padding: 8px">
|
||||||
<a-input ref="searchInput" :placeholder="`Search ${column.dataIndex}`" :value="selectedKeys[0]"
|
<a-input ref="searchInput" :placeholder="'请输入'" :value="selectedKeys[0]"
|
||||||
style="width: 188px; margin-bottom: 8px; display: block"
|
style="width: 188px; margin-bottom: 8px; display: block"
|
||||||
@change="(e) => {
|
@change="(e) => {
|
||||||
setSelectedKeys(e.target.value ? [e.target.value] : []);
|
setSelectedKeys(e.target.value ? [e.target.value] : []);
|
||||||
|
|
@ -114,7 +79,7 @@
|
||||||
</template>
|
</template>
|
||||||
搜索
|
搜索
|
||||||
</a-button>
|
</a-button>
|
||||||
<a-button size="small" style="width: 90px" @click="handleReset(clearFilters)">重置</a-button>
|
<a-button size="small" style="width: 90px" @click="handleReset(clearFilters, setSelectedKeys, column.dataIndex, confirm)">重置</a-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<!--列过滤组件封装-->
|
<!--列过滤组件封装-->
|
||||||
|
|
@ -162,7 +127,11 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- 表格内容单元格插槽 -->
|
<!-- 表格内容单元格插槽 -->
|
||||||
<template #bodyCell="{ column, record }">
|
<template #bodyCell="{ column, record, index }">
|
||||||
|
<!-- 序号 列 -->
|
||||||
|
<template v-if="column.dataIndex === 'index'">
|
||||||
|
{{ index + 1 }}
|
||||||
|
</template>
|
||||||
<!-- 行操作 -->
|
<!-- 行操作 -->
|
||||||
<template v-if="column.dataIndex === 'operate'">
|
<template v-if="column.dataIndex === 'operate'">
|
||||||
<template :key="i" v-for="(item, i) in operate">
|
<template :key="i" v-for="(item, i) in operate">
|
||||||
|
|
@ -186,7 +155,7 @@
|
||||||
<pro-authority :value="item.code ? item.code : false" v-else>
|
<pro-authority :value="item.code ? item.code : false" v-else>
|
||||||
<a-popconfirm v-if="item.isDel" title="确认删除?" ok-text="确认" cancel-text="取消"
|
<a-popconfirm v-if="item.isDel" title="确认删除?" ok-text="确认" cancel-text="取消"
|
||||||
@confirm="item.delEvent(record)" @cancel="item.cancelEvent(record)">
|
@confirm="item.delEvent(record)" @cancel="item.cancelEvent(record)">
|
||||||
<a href="#">删除</a>
|
<a-button type="text" danger >{{ item.label || '删除' }}</a-button>
|
||||||
</a-popconfirm>
|
</a-popconfirm>
|
||||||
<div style="display: inline-block" v-else>
|
<div style="display: inline-block" v-else>
|
||||||
<a @click="item.event(record)"> {{ item.label }} </a>
|
<a @click="item.event(record)"> {{ item.label }} </a>
|
||||||
|
|
@ -234,6 +203,11 @@
|
||||||
<a-image :width="column.image.width" :src="record[column.dataIndex]" />
|
<a-image :width="column.image.width" :src="record[column.dataIndex]" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<!-- 右对齐数字列:千位分隔格式化显示 -->
|
||||||
|
<template v-else-if="column.align === 'right'">
|
||||||
|
{{ formatNumber(record[column.dataIndex]) }}
|
||||||
|
</template>
|
||||||
|
|
||||||
<!-- 原样输出 -->
|
<!-- 原样输出 -->
|
||||||
<template v-else>
|
<template v-else>
|
||||||
{{ record[column.dataIndex] }}
|
{{ record[column.dataIndex] }}
|
||||||
|
|
@ -299,19 +273,16 @@
|
||||||
onMounted,
|
onMounted,
|
||||||
reactive,
|
reactive,
|
||||||
toRefs,
|
toRefs,
|
||||||
|
toRef,
|
||||||
watch,
|
watch,
|
||||||
ref,
|
ref,
|
||||||
nextTick,
|
nextTick,
|
||||||
computed
|
computed
|
||||||
} from "vue";
|
} from "vue";
|
||||||
import {
|
import {
|
||||||
AppstoreOutlined,
|
|
||||||
ExportOutlined,
|
|
||||||
SyncOutlined,
|
SyncOutlined,
|
||||||
UserOutlined,
|
UserOutlined,
|
||||||
ColumnHeightOutlined,
|
|
||||||
SearchOutlined,
|
SearchOutlined,
|
||||||
CloudDownloadOutlined,
|
|
||||||
} from "@ant-design/icons-vue";
|
} from "@ant-design/icons-vue";
|
||||||
//table搜索列插槽
|
//table搜索列插槽
|
||||||
const searchInput = ref();
|
const searchInput = ref();
|
||||||
|
|
@ -323,9 +294,6 @@
|
||||||
name: "pro-table",
|
name: "pro-table",
|
||||||
currentRowI: 999,
|
currentRowI: 999,
|
||||||
components: {
|
components: {
|
||||||
ColumnHeightOutlined,
|
|
||||||
AppstoreOutlined,
|
|
||||||
ExportOutlined,
|
|
||||||
SyncOutlined,
|
SyncOutlined,
|
||||||
UserOutlined,
|
UserOutlined,
|
||||||
SearchOutlined,
|
SearchOutlined,
|
||||||
|
|
@ -348,10 +316,29 @@
|
||||||
type: Array,
|
type: Array,
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
/// 头工具栏
|
/// 头工具栏(外部传入)
|
||||||
toolbar: {
|
toolbar: {
|
||||||
type: Array,
|
type: Array,
|
||||||
},
|
},
|
||||||
|
/// 是否自动添加序号列(默认关闭:只有 columns 明确包含 index 才显示)
|
||||||
|
autoIndex: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
/// 是否存在查询条件(用于控制工具栏上边距)
|
||||||
|
hasSearch: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
|
/// 是否在左侧工具栏追加内置按钮(打印、导出)
|
||||||
|
showPrint: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
|
showExport: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
defaultToolbar: {
|
defaultToolbar: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true,
|
default: true,
|
||||||
|
|
@ -404,9 +391,9 @@
|
||||||
//excel导出表单所需的分页信息
|
//excel导出表单所需的分页信息
|
||||||
exportExcelPagination: {
|
exportExcelPagination: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 1000
|
pageSize: 2000
|
||||||
}, // 加载
|
}, // 加载
|
||||||
columns: props.columns, // 字段
|
columns: props.columns, // 字段(与 a-table-settings v-model:columns 双向绑定)
|
||||||
filtrationColumnKeys: [], // 过滤
|
filtrationColumnKeys: [], // 过滤
|
||||||
selectedRowKeys: [], // 选中项
|
selectedRowKeys: [], // 选中项
|
||||||
size: "small", // 表格大小
|
size: "small", // 表格大小
|
||||||
|
|
@ -417,16 +404,103 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
/// 默认操作
|
/// 默认操作
|
||||||
if (props.operate != false) {
|
// 序号列:如果外部未提供,且开启 autoIndex,则自动在最左侧追加
|
||||||
let operateSize = props.operate.length * 70;
|
const hasIndexCol = (cols) => (cols || []).some(col => col && (col.dataIndex === 'index' || col.key === 'index'))
|
||||||
state.columns.push({
|
if (props.autoIndex && !hasIndexCol(state.columns)) {
|
||||||
dataIndex: "operate",
|
state.columns.unshift({
|
||||||
key: "operate",
|
dataIndex: 'index',
|
||||||
title: "操作",
|
key: 'index',
|
||||||
fixed: "right",
|
title: '序号',
|
||||||
width: operateSize,
|
width: 60,
|
||||||
});
|
fixed: 'left',
|
||||||
|
align: 'center',
|
||||||
|
customRender: ({ index }) => {
|
||||||
|
try {
|
||||||
|
if (state.pagination !== false) {
|
||||||
|
const current = Number(state.pagination.current || state.pagination.pageNum || 1)
|
||||||
|
const pageSize = Number(state.pagination.pageSize || 20)
|
||||||
|
return (current - 1) * pageSize + index + 1
|
||||||
}
|
}
|
||||||
|
} catch (e) {}
|
||||||
|
return index + 1
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
if (props.operate != false) {
|
||||||
|
// 基于可见操作项估算更贴合的列宽(考虑权限过滤、文案长度、分隔符)
|
||||||
|
const estimateOperateWidth = () => {
|
||||||
|
const items = Array.isArray(props.operate) ? props.operate : []
|
||||||
|
// 过滤权限不可见的操作;有 children 的看父项本身
|
||||||
|
const powerList = (store.getters && store.getters.power) ? store.getters.power : []
|
||||||
|
const isVisible = (it) => {
|
||||||
|
if (!it) return false
|
||||||
|
if (!it.code) return true
|
||||||
|
return powerList.indexOf(it.code) !== -1
|
||||||
|
}
|
||||||
|
const visible = items.filter(it => isVisible(it))
|
||||||
|
|
||||||
|
// 文本测量:使用 canvas 估算宽度
|
||||||
|
const getTextWidth = (text) => {
|
||||||
|
try {
|
||||||
|
const canvas = document.createElement('canvas')
|
||||||
|
const ctx = canvas.getContext('2d')
|
||||||
|
if (!ctx) return 0
|
||||||
|
ctx.font = '14px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans"'
|
||||||
|
return Math.ceil(ctx.measureText(String(text || '')).width)
|
||||||
|
} catch (e) {
|
||||||
|
return (String(text || '').length) * 14
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 每个操作项:文本宽度 + 左右间距(约16)
|
||||||
|
const itemsWidth = visible.reduce((acc, it) => acc + getTextWidth(it.label || '') + 16, 0)
|
||||||
|
// 分隔符(竖线)与间距:约 12px * (n-1)
|
||||||
|
const sepWidth = visible.length > 1 ? (visible.length - 1) * 12 : 0
|
||||||
|
// 左右安全内边距
|
||||||
|
const padding = 12
|
||||||
|
const total = padding + itemsWidth + sepWidth + padding
|
||||||
|
// 兜底区间
|
||||||
|
return Math.min(Math.max(total, 96), 260)
|
||||||
|
}
|
||||||
|
|
||||||
|
const operateCol = {
|
||||||
|
dataIndex: 'operate',
|
||||||
|
key: 'operate',
|
||||||
|
title: '操作',
|
||||||
|
fixed: 'right',
|
||||||
|
width: estimateOperateWidth(),
|
||||||
|
}
|
||||||
|
state.columns.push(operateCol)
|
||||||
|
|
||||||
|
// 权限/操作项变化后,动态更新宽度
|
||||||
|
const recompute = () => {
|
||||||
|
const idx = state.columns.findIndex(c => c.dataIndex === 'operate')
|
||||||
|
if (idx !== -1) state.columns[idx].width = estimateOperateWidth()
|
||||||
|
}
|
||||||
|
// 监听权限与传入的 operate 变化
|
||||||
|
watch(() => store.getters && store.getters.power, recompute)
|
||||||
|
watch(() => props.operate, recompute, { deep: true })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 内置左侧工具栏按钮:打印、导出(可通过 props.showPrint / props.showExport 控制)
|
||||||
|
const builtinPrevToolbar = () => {
|
||||||
|
const items = [];
|
||||||
|
if (props.showPrint) {
|
||||||
|
items.push({ label: "打印", event: print, icon: 'PrinterOutlined' });
|
||||||
|
}
|
||||||
|
if (props.showExport) {
|
||||||
|
items.push({ label: "导出", event: ExportExcel, icon: 'CloudDownloadOutlined' });
|
||||||
|
}
|
||||||
|
return items;
|
||||||
|
};
|
||||||
|
|
||||||
|
// 合并外部 toolbar 和内置按钮
|
||||||
|
const mergedToolbar = computed(() => {
|
||||||
|
const ext = Array.isArray(props.toolbar) ? props.toolbar : [];
|
||||||
|
return [...ext, ...builtinPrevToolbar()];
|
||||||
|
});
|
||||||
|
// 无查询条件时,为外层工具栏增加上内边距
|
||||||
|
const proTableToolStyle = computed(() => (props.hasSearch ? {} : { paddingTop: '16px' }));
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 从服务端获取下拉字典数据,并对数据进行格式化
|
* 从服务端获取下拉字典数据,并对数据进行格式化
|
||||||
|
|
@ -505,13 +579,17 @@
|
||||||
column.filtered = false;
|
column.filtered = false;
|
||||||
if (column.dictionary) {
|
if (column.dictionary) {
|
||||||
//添加列过滤模板
|
//添加列过滤模板
|
||||||
state.filterColumnsIndex.push(column.index);
|
state.filterColumnsIndex.push(column.dataIndex);
|
||||||
column.filters = dict;
|
column.filters = dict;
|
||||||
column.filterSearch = true;
|
column.filterSearch = true;
|
||||||
}
|
}
|
||||||
// 不再需要设置 column.slots
|
// 绑定列级过滤插槽(显示放大镜图标 + 下拉内容)
|
||||||
|
column.slots = Object.assign({}, column.slots || {}, {
|
||||||
|
filterDropdown: 'filterDropdown',
|
||||||
|
filterIcon: 'filterIcon'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
// 不再需要设置 column.slots
|
// 兼容:若非 showSearch 但需要显示自定义过滤图标/下拉,可在外部传入 column.slots 自定义
|
||||||
});
|
});
|
||||||
|
|
||||||
/// 过滤字段
|
/// 过滤字段
|
||||||
|
|
@ -529,6 +607,11 @@
|
||||||
state.columns = props.columns.filter((item) => value.includes(item.key));
|
state.columns = props.columns.filter((item) => value.includes(item.key));
|
||||||
state.filtrationColumnKeys = value;
|
state.filtrationColumnKeys = value;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 与 a-table-settings 建立明确的 v-model 引用
|
||||||
|
const columnsModel = toRef(state, 'columns');
|
||||||
|
// 如果需要自定义控制,也可用 visibleColumns 过滤 display=false;
|
||||||
|
// 现在直接将 columnsModel 传给 a-table,交由组件库内部处理 display 过滤
|
||||||
//table 开启列可自由托动大小
|
//table 开启列可自由托动大小
|
||||||
const handleResizeColumn = function(w, col) {
|
const handleResizeColumn = function(w, col) {
|
||||||
console.log("handleResizeColumn")
|
console.log("handleResizeColumn")
|
||||||
|
|
@ -592,27 +675,32 @@
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/// 列搜索条件重置
|
/// 列搜索条件重置:清空 UI 与内部条件并刷新
|
||||||
const handleReset = (clearFilters) => {
|
const handleReset = (clearFilters, setSelectedKeys, dataIndex, confirm) => {
|
||||||
console.log("列搜索条件重置")
|
console.log("列搜索条件重置")
|
||||||
state.columnSearchParams = {};
|
// 清空该列的 UI 值
|
||||||
|
if (typeof setSelectedKeys === 'function') setSelectedKeys([])
|
||||||
|
// 清空内存中的查询条件
|
||||||
|
if (dataIndex) {
|
||||||
|
const { [dataIndex]: _, ...rest } = state.columnSearchParams
|
||||||
|
state.columnSearchParams = rest
|
||||||
|
} else {
|
||||||
|
state.columnSearchParams = {}
|
||||||
|
}
|
||||||
//重置列搜索的相关条件
|
//重置列搜索的相关条件
|
||||||
if (state.filterColumnsIndex.length > 0) {
|
if (state.filterColumnsIndex.length > 0) {
|
||||||
state.filterColumnsIndex.forEach((columnIndex) => {
|
state.filterColumnsIndex.forEach((columnIndex) => {
|
||||||
//找到指定下标的数据,修改选中状态
|
//找到指定下标的数据,修改选中状态
|
||||||
const index = state.columns.findIndex(item => item === columnIndex);
|
const index = state.columns.findIndex(item => item.dataIndex === columnIndex);
|
||||||
if (index != -1) {
|
if (index != -1) {
|
||||||
state.columns[index].filtered = false;
|
state.columns[index].filtered = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
state.filterColumnsIndex = []
|
state.filterColumnsIndex = []
|
||||||
}
|
}
|
||||||
// state.columns.forEach((value, index) => {
|
// 清理 antd 内部选中并同步到表格
|
||||||
// if(value.filtered&&value.filtered==true){
|
if (typeof clearFilters === 'function') clearFilters()
|
||||||
// value.filtered = false;
|
if (typeof confirm === 'function') confirm()
|
||||||
// }
|
|
||||||
// });
|
|
||||||
clearFilters();
|
|
||||||
fetchData();
|
fetchData();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -626,6 +714,19 @@
|
||||||
return str.replace(/([a-z])([A-Z])/g, '$1_$2').toLowerCase();
|
return str.replace(/([a-z])([A-Z])/g, '$1_$2').toLowerCase();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 数字格式化(千位分隔),保留原有小数位
|
||||||
|
const formatNumber = function(val) {
|
||||||
|
if (val === null || val === undefined || val === '') return ''
|
||||||
|
if (typeof val === 'string' && val.trim() === '-') return val
|
||||||
|
const raw = String(val).replace(/,/g, '')
|
||||||
|
if (!/^[-+]?\d*(\.\d+)?$/.test(raw)) return val
|
||||||
|
const negative = raw.startsWith('-')
|
||||||
|
const numStr = negative ? raw.slice(1) : raw
|
||||||
|
const [intPart, decPart] = numStr.split('.')
|
||||||
|
const intWithSep = intPart.replace(/\B(?=(\d{3})+(?!\d))/g, ',')
|
||||||
|
return (negative ? '-' : '') + intWithSep + (decPart ? '.' + decPart : '')
|
||||||
|
}
|
||||||
|
|
||||||
/// 数据请求
|
/// 数据请求
|
||||||
const fetchData = async (pagination, filters, sorter) => {
|
const fetchData = async (pagination, filters, sorter) => {
|
||||||
console.log("filters 列过滤条件", filters)
|
console.log("filters 列过滤条件", filters)
|
||||||
|
|
@ -832,17 +933,24 @@
|
||||||
onSelectChange,
|
onSelectChange,
|
||||||
/// 改变大小
|
/// 改变大小
|
||||||
changeSize,
|
changeSize,
|
||||||
/// 打印
|
/// 打印/导出
|
||||||
print,
|
print,
|
||||||
|
|
||||||
ExportExcel,
|
ExportExcel,
|
||||||
|
/// 合并后的工具栏
|
||||||
|
mergedToolbar,
|
||||||
|
proTableToolStyle,
|
||||||
|
|
||||||
|
columnsModel,
|
||||||
|
|
||||||
slotsData,
|
slotsData,
|
||||||
handleReset,
|
handleReset,
|
||||||
handleSearch,
|
handleSearch,
|
||||||
setSelectedKeysOnChange,
|
setSelectedKeysOnChange,
|
||||||
changeFilteredStatus,
|
changeFilteredStatus,
|
||||||
onShowSizeChange
|
onShowSizeChange,
|
||||||
|
|
||||||
|
// 工具函数
|
||||||
|
formatNumber
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -424,7 +424,4 @@ export default {
|
||||||
float: right;
|
float: right;
|
||||||
margin-right: 15px;
|
margin-right: 15px;
|
||||||
}
|
}
|
||||||
.ant-drawer-body{
|
|
||||||
padding: 10px!important;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|
@ -40,6 +40,7 @@ export default {
|
||||||
|
|
||||||
/// 列配置
|
/// 列配置
|
||||||
const columns = [
|
const columns = [
|
||||||
|
{ dataIndex: "index", key: "index", title: "序号", width: 60, fixed: 'left', align: 'center' },
|
||||||
{ dataIndex: "title", key: "title", title: "公告标题" },
|
{ dataIndex: "title", key: "title", title: "公告标题" },
|
||||||
{ dataIndex: "content", key: "content", title: "公告内容" },
|
{ dataIndex: "content", key: "content", title: "公告内容" },
|
||||||
{ dataIndex: "createName", key: "createName", title: "发布人" },
|
{ dataIndex: "createName", key: "createName", title: "发布人" },
|
||||||
|
|
@ -106,7 +107,11 @@ export default {
|
||||||
/// 分页参数
|
/// 分页参数
|
||||||
const pagination = {
|
const pagination = {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 20,
|
||||||
|
showSizeChanger: true, // 显示可改变每页条数
|
||||||
|
pageSizeOptions: ["10", "20", "50", "100"], // 每页条数选项设置
|
||||||
|
showTotal: total => `共 ${total} 条记录`, // 显示总条数
|
||||||
|
showSizeChange: (current, pageSize) => (this.pageSize = pageSize) // 改变每页条数时更新显示
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 外置参数 - 当参数改变时, 重新触发 fetch 函数
|
/// 外置参数 - 当参数改变时, 重新触发 fetch 函数
|
||||||
|
|
|
||||||
|
|
@ -1,59 +1,51 @@
|
||||||
<template>
|
<template>
|
||||||
<page-layout>
|
<a-list-layout>
|
||||||
<a-row :gutter="[10, 10]">
|
|
||||||
<!-- 顶部区域 -->
|
|
||||||
<a-col :span="24">
|
|
||||||
<a-card>
|
|
||||||
<!-- 查询参数 -->
|
<!-- 查询参数 -->
|
||||||
|
<template #search>
|
||||||
<pro-query :searchParam="searchParam" @on-search="search"></pro-query>
|
<pro-query :searchParam="searchParam" @on-search="search"></pro-query>
|
||||||
</a-card>
|
</template>
|
||||||
</a-col>
|
|
||||||
<!-- 中心区域 -->
|
|
||||||
<a-col :span="24">
|
|
||||||
<a-card>
|
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<pro-table ref="tableRef" :fetch="fetch" :columns="columns" :toolbar="toolbar" :operate="operate"
|
<pro-table ref="tableRef" :fetch="fetch" :columns="columns" :toolbar="toolbar" :operate="operate"
|
||||||
:param="state.param" :pagination="pagination"
|
:param="state.param" :pagination="pagination"
|
||||||
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
|
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
|
||||||
<!-- 继承至 a-table 的默认插槽 -->
|
<!-- 继承至 a-table 的默认插槽 -->
|
||||||
</pro-table>
|
</pro-table>
|
||||||
</a-card>
|
|
||||||
</a-col>
|
|
||||||
</a-row>
|
|
||||||
<save :visible="state.visibleSave" @close="closeSave"></save>
|
<save :visible="state.visibleSave" @close="closeSave"></save>
|
||||||
<addConfig :visible="state.visibleAddConfig" @close="closeAddConfig"></addConfig>
|
<addConfig :visible="state.visibleAddConfig" @close="closeAddConfig"></addConfig>
|
||||||
<edit :visible="state.visibleEdit" @close="closeEdit" :record="state.recordEdit"></edit>
|
<edit :visible="state.visibleEdit" @close="closeEdit" :record="state.recordEdit"></edit>
|
||||||
<info :visible="state.visibleInfo" @close="closeInfo" :record="state.recordInfo"></info>
|
<info :visible="state.visibleInfo" @close="closeInfo" :record="state.recordInfo"></info>
|
||||||
</page-layout>
|
</a-list-layout>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import save from './modal/save.vue';
|
import save from './modal/save.vue';
|
||||||
import addConfig from './modal/addConfig.vue';
|
import addConfig from './modal/addConfig.vue';
|
||||||
import edit from './modal/edit.vue';
|
import edit from './modal/edit.vue';
|
||||||
import info from './modal/info.vue';
|
import info from './modal/info.vue';
|
||||||
import {
|
import {
|
||||||
message,
|
message,
|
||||||
Modal as modal
|
Modal as modal
|
||||||
} from '@hwork/ant-design-vue';
|
} from '@hwork/ant-design-vue';
|
||||||
import {
|
import {
|
||||||
ExclamationCircleOutlined
|
ExclamationCircleOutlined
|
||||||
} from '@ant-design/icons-vue';
|
} from '@ant-design/icons-vue';
|
||||||
import {
|
import {
|
||||||
page,
|
page,
|
||||||
remove,
|
remove,
|
||||||
removeBatch
|
removeBatch
|
||||||
} from "@/api/module/config";
|
} from "@/api/module/config";
|
||||||
import {
|
import {
|
||||||
reactive,
|
reactive,
|
||||||
createVNode,
|
createVNode,
|
||||||
ref
|
ref
|
||||||
} from 'vue';
|
} from 'vue';
|
||||||
|
|
||||||
const removeKey = "remove";
|
const removeKey = "remove";
|
||||||
const removeBatchKey = "removeBatch";
|
const removeBatchKey = "removeBatch";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
save,
|
save,
|
||||||
addConfig,
|
addConfig,
|
||||||
|
|
@ -70,6 +62,14 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
const columns = [{
|
const columns = [{
|
||||||
|
dataIndex: "index",
|
||||||
|
key: "index",
|
||||||
|
title: "序号",
|
||||||
|
width: 60,
|
||||||
|
fixed: 'left',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
dataIndex: "parentCode",
|
dataIndex: "parentCode",
|
||||||
key: "parentCode",
|
key: "parentCode",
|
||||||
title: "组名",
|
title: "组名",
|
||||||
|
|
@ -221,19 +221,23 @@
|
||||||
/// 工具栏
|
/// 工具栏
|
||||||
const toolbar = [{
|
const toolbar = [{
|
||||||
label: "新增配置信息",
|
label: "新增配置信息",
|
||||||
event: function() {
|
icon: 'PlusOutlined',
|
||||||
|
event: function () {
|
||||||
state.visibleAddConfig = true
|
state.visibleAddConfig = true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "新增(原始备份)",
|
label: "新增(原始备份)",
|
||||||
event: function() {
|
icon: 'PlusOutlined',
|
||||||
|
event: function () {
|
||||||
state.visibleSave = true
|
state.visibleSave = true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "删除",
|
label: "删除",
|
||||||
event: function() {
|
icon: 'DeleteOutlined',
|
||||||
|
danger: true,
|
||||||
|
event: function () {
|
||||||
removeBatchMethod(state.selectedRowKeys)
|
removeBatchMethod(state.selectedRowKeys)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -242,19 +246,20 @@
|
||||||
/// 行操作
|
/// 行操作
|
||||||
const operate = [{
|
const operate = [{
|
||||||
label: "查看",
|
label: "查看",
|
||||||
event: function(record) {
|
event: function (record) {
|
||||||
state.visibleInfo = true, state.recordInfo = record
|
state.visibleInfo = true, state.recordInfo = record
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "修改",
|
label: "修改",
|
||||||
event: function(record) {
|
event: function (record) {
|
||||||
state.visibleEdit = true, state.recordEdit = record
|
state.visibleEdit = true, state.recordEdit = record
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "删除",
|
label: "删除",
|
||||||
event: function(record) {
|
isDel: true,
|
||||||
|
event: function (record) {
|
||||||
removeMethod(record)
|
removeMethod(record)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -300,25 +305,25 @@
|
||||||
]
|
]
|
||||||
|
|
||||||
/// 查询操作
|
/// 查询操作
|
||||||
const search = function(value) {
|
const search = function (value) {
|
||||||
state.param = value
|
state.param = value
|
||||||
}
|
}
|
||||||
|
|
||||||
const closeSave = function() {
|
const closeSave = function () {
|
||||||
state.visibleSave = false;
|
state.visibleSave = false;
|
||||||
tableRef.value.reload()
|
tableRef.value.reload()
|
||||||
}
|
}
|
||||||
const closeAddConfig = function() {
|
const closeAddConfig = function () {
|
||||||
state.visibleAddConfig = false;
|
state.visibleAddConfig = false;
|
||||||
tableRef.value.reload()
|
tableRef.value.reload()
|
||||||
}
|
}
|
||||||
|
|
||||||
const closeEdit = function() {
|
const closeEdit = function () {
|
||||||
state.visibleEdit = false;
|
state.visibleEdit = false;
|
||||||
tableRef.value.reload()
|
tableRef.value.reload()
|
||||||
}
|
}
|
||||||
|
|
||||||
const closeInfo = function() {
|
const closeInfo = function () {
|
||||||
state.visibleInfo = false;
|
state.visibleInfo = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -340,5 +345,5 @@
|
||||||
tableRef
|
tableRef
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -151,7 +151,7 @@
|
||||||
</a-card>
|
</a-card>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col span="24">
|
<a-col span="24">
|
||||||
<a-table :columns="columns" :data-source="datas" style="margin-top: 10px" />
|
<a-table :columns="columns" :data-source="datas" />
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
</a-card>
|
</a-card>
|
||||||
|
|
@ -180,7 +180,7 @@
|
||||||
</a-card>
|
</a-card>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col span="24">
|
<a-col span="24">
|
||||||
<a-table :columns="columns" :data-source="datas" style="margin-top: 10px" />
|
<a-table :columns="columns" :data-source="datas" />
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
</a-card>
|
</a-card>
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,7 @@ export default {
|
||||||
|
|
||||||
/// 列配置
|
/// 列配置
|
||||||
const columns = [
|
const columns = [
|
||||||
|
{ dataIndex: "index", key: "index", title: "序号", width: 60, fixed: 'left', align: 'center' },
|
||||||
{ dataIndex: "name", key: "name", title: "名称" },
|
{ dataIndex: "name", key: "name", title: "名称" },
|
||||||
{ dataIndex: "username", key: "username", title: "账户" },
|
{ dataIndex: "username", key: "username", title: "账户" },
|
||||||
{ dataIndex: "password", key: "password", title: "密码" },
|
{ dataIndex: "password", key: "password", title: "密码" },
|
||||||
|
|
@ -114,7 +115,11 @@ export default {
|
||||||
/// 分页参数
|
/// 分页参数
|
||||||
const pagination = {
|
const pagination = {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 20,
|
||||||
|
showSizeChanger: true, // 显示可改变每页条数
|
||||||
|
pageSizeOptions: ["10", "20", "50", "100"], // 每页条数选项设置
|
||||||
|
showTotal: total => `共 ${total} 条记录`, // 显示总条数
|
||||||
|
showSizeChange: (current, pageSize) => (this.pageSize = pageSize) // 改变每页条数时更新显示
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 外置参数 - 当参数改变时, 重新触发 fetch 函数
|
/// 外置参数 - 当参数改变时, 重新触发 fetch 函数
|
||||||
|
|
|
||||||
|
|
@ -83,14 +83,14 @@ export default {
|
||||||
|
|
||||||
/// 工具栏
|
/// 工具栏
|
||||||
const toolbar = [
|
const toolbar = [
|
||||||
{ label: "新增", event: function () { state.visibleSave = true } },
|
{ label: "新增", icon: 'PlusOutlined', event: function () { state.visibleSave = true } },
|
||||||
];
|
];
|
||||||
|
|
||||||
/// 行操作
|
/// 行操作
|
||||||
const operate = [
|
const operate = [
|
||||||
{ label: "查看", event: function (record) { state.visibleInfo = true, state.recordInfo = record } },
|
{ label: "查看", event: function (record) { state.visibleInfo = true, state.recordInfo = record } },
|
||||||
{ label: "修改", event: function (record) { state.visibleEdit = true, state.recordEdit = record } },
|
{ label: "修改", event: function (record) { state.visibleEdit = true, state.recordEdit = record } },
|
||||||
{ label: "删除", event: function (record) { removeMethod(record) } },
|
{ label: "删除", isDel: true, event: function (record) { removeMethod(record) } },
|
||||||
];
|
];
|
||||||
|
|
||||||
const pagination = false;
|
const pagination = false;
|
||||||
|
|
|
||||||
|
|
@ -1,55 +1,55 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
|
||||||
<page-header title="数 据 字 典" describe="用 户 Online 列 表,用 于 系 统 在 线 用 户 监 控."></page-header>
|
<a-list-layout>
|
||||||
<page-layout>
|
<template #search>
|
||||||
<a-row :gutter="[10, 10]">
|
<a-alert message="数据字典:用户Online列表,用于系统在线用户监控" type="info" style="margin-top: 1px;" />
|
||||||
<a-col :span="12">
|
</template>
|
||||||
<a-card>
|
<pro-table rowKey="id" ref="tableRef" :fetch="fetch" :columns="columns" :toolbar="toolbar" :operate="operate"
|
||||||
<!-- 列表 -->
|
:param="state.param" :pagination="pagination"
|
||||||
<pro-table rowKey="id" ref="tableRef" :fetch="fetch" :columns="columns" :toolbar="toolbar"
|
|
||||||
:operate="operate" :param="state.param" :pagination="pagination"
|
|
||||||
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
|
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
|
||||||
</pro-table>
|
</pro-table>
|
||||||
</a-card>
|
<!-- 字典数据抽屉容器:统一用抽屉承载,内部组件负责渲染内容 -->
|
||||||
</a-col>
|
<a-drawer
|
||||||
<a-col :span="12">
|
:visible="state.visibleData"
|
||||||
<a-card>
|
:width="720"
|
||||||
<dictData :visible="state.visibleData" :record="state.recordData"></dictData>
|
title="字典数据"
|
||||||
</a-card>
|
destroyOnClose
|
||||||
</a-col>
|
@close="state.visibleData = false"
|
||||||
</a-row>
|
>
|
||||||
</page-layout>
|
<dictData :visible="true" :record="state.recordData" @close="state.visibleData = false" />
|
||||||
|
</a-drawer>
|
||||||
|
</a-list-layout>
|
||||||
<save :visible="state.visibleSave" @close="closeSave"></save>
|
<save :visible="state.visibleSave" @close="closeSave"></save>
|
||||||
<edit :visible="state.visibleEdit" @close="closeEdit" :record="state.recordEdit"></edit>
|
<edit :visible="state.visibleEdit" @close="closeEdit" :record="state.recordEdit"></edit>
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import save from './modal/save.vue';
|
import save from './modal/save.vue';
|
||||||
import edit from './modal/edit.vue';
|
import edit from './modal/edit.vue';
|
||||||
import data from './modal/data.vue';
|
import data from './modal/data.vue';
|
||||||
import {
|
import {
|
||||||
message,
|
message,
|
||||||
Modal as modal
|
Modal as modal
|
||||||
} from '@hwork/ant-design-vue';
|
} from '@hwork/ant-design-vue';
|
||||||
import {
|
import {
|
||||||
ExclamationCircleOutlined
|
ExclamationCircleOutlined
|
||||||
} from '@ant-design/icons-vue';
|
} from '@ant-design/icons-vue';
|
||||||
import {
|
import {
|
||||||
page,
|
page,
|
||||||
change,
|
change,
|
||||||
remove,
|
remove,
|
||||||
removeBatch
|
removeBatch
|
||||||
} from "@/api/module/dict";
|
} from "@/api/module/dict";
|
||||||
import {
|
import {
|
||||||
reactive,
|
reactive,
|
||||||
createVNode,
|
createVNode,
|
||||||
ref
|
ref
|
||||||
} from 'vue';
|
} from 'vue';
|
||||||
|
|
||||||
const removeKey = "remove";
|
const removeKey = "remove";
|
||||||
const removeBatchKey = "removeBatch";
|
const removeBatchKey = "removeBatch";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
save,
|
save,
|
||||||
edit,
|
edit,
|
||||||
|
|
@ -62,7 +62,7 @@
|
||||||
const switchFormat = {
|
const switchFormat = {
|
||||||
yes: true,
|
yes: true,
|
||||||
no: false,
|
no: false,
|
||||||
event: function(value, record) {
|
event: function (value, record) {
|
||||||
// record.enable = !record.enable;
|
// record.enable = !record.enable;
|
||||||
record.enable = value;
|
record.enable = value;
|
||||||
change({
|
change({
|
||||||
|
|
@ -76,17 +76,25 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
|
{
|
||||||
|
dataIndex: "index",
|
||||||
|
key: "index",
|
||||||
|
title: "序号",
|
||||||
|
width: 60,
|
||||||
|
fixed: 'left',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
dataIndex: "code",
|
dataIndex: "code",
|
||||||
key: "code",
|
key: "code",
|
||||||
title: "标识",
|
title: "标识",
|
||||||
width:100
|
width: 150
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: "enable",
|
dataIndex: "enable",
|
||||||
key: "enable",
|
key: "enable",
|
||||||
title: "状态",
|
title: "状态",
|
||||||
width:80,
|
width: 100,
|
||||||
switch: switchFormat
|
switch: switchFormat
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -178,19 +186,23 @@
|
||||||
/// 工具栏
|
/// 工具栏
|
||||||
const toolbar = [{
|
const toolbar = [{
|
||||||
label: "新增",
|
label: "新增",
|
||||||
event: function() {
|
icon: 'PlusOutlined',
|
||||||
|
event: function () {
|
||||||
state.visibleSave = true
|
state.visibleSave = true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "删除",
|
label: "删除",
|
||||||
event: function() {
|
icon: 'DeleteOutlined',
|
||||||
|
danger: true,
|
||||||
|
event: function () {
|
||||||
removeBatchMethod(state.selectedRowKeys)
|
removeBatchMethod(state.selectedRowKeys)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "强制更新缓存",
|
label: "强制更新缓存",
|
||||||
event: function() {
|
icon: 'ReloadOutlined',
|
||||||
|
event: function () {
|
||||||
removeBatchMethod(state.selectedRowKeys)
|
removeBatchMethod(state.selectedRowKeys)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -199,19 +211,20 @@
|
||||||
/// 行操作
|
/// 行操作
|
||||||
const operate = [{
|
const operate = [{
|
||||||
label: "查看",
|
label: "查看",
|
||||||
event: function(record) {
|
event: function (record) {
|
||||||
state.visibleData = true, state.recordData = record
|
state.visibleData = true, state.recordData = record
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "修改",
|
label: "修改",
|
||||||
event: function(record) {
|
event: function (record) {
|
||||||
state.visibleEdit = true, state.recordEdit = record
|
state.visibleEdit = true, state.recordEdit = record
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "删除",
|
label: "删除",
|
||||||
event: function(record) {
|
isDel: true,
|
||||||
|
event: function (record) {
|
||||||
removeMethod(record)
|
removeMethod(record)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -219,7 +232,11 @@
|
||||||
|
|
||||||
const pagination = {
|
const pagination = {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10
|
pageSize: 20,
|
||||||
|
showSizeChanger: true, // 显示可改变每页条数
|
||||||
|
pageSizeOptions: ["10", "20", "50", "100"], // 每页条数选项设置
|
||||||
|
showTotal: total => `共 ${total} 条记录`, // 显示总条数
|
||||||
|
showSizeChange: (current, pageSize) => (this.pageSize = pageSize) // 改变每页条数时更新显示
|
||||||
};
|
};
|
||||||
|
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
|
|
@ -239,12 +256,12 @@
|
||||||
state.selectedRowKeys = selectedRowKeys;
|
state.selectedRowKeys = selectedRowKeys;
|
||||||
};
|
};
|
||||||
|
|
||||||
const closeSave = function() {
|
const closeSave = function () {
|
||||||
state.visibleSave = false
|
state.visibleSave = false
|
||||||
tableRef.value.reload()
|
tableRef.value.reload()
|
||||||
}
|
}
|
||||||
|
|
||||||
const closeEdit = function() {
|
const closeEdit = function () {
|
||||||
state.visibleEdit = false
|
state.visibleEdit = false
|
||||||
tableRef.value.reload()
|
tableRef.value.reload()
|
||||||
}
|
}
|
||||||
|
|
@ -262,5 +279,5 @@
|
||||||
tableRef
|
tableRef
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div class="drawer-table">
|
||||||
<pro-table v-if="visible" ref="tableChilrenRef" rowKey="id" :fetch="fetch" :columns="columns" :toolbar="toolbar"
|
<pro-table v-if="visible" ref="tableChilrenRef" rowKey="id" :fetch="fetch" :columns="columns" :toolbar="toolbar"
|
||||||
:operate="operate" :param="state.param" :pagination="pagination"
|
:operate="operate" :param="state.param" :pagination="pagination"
|
||||||
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
|
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
|
||||||
|
|
@ -73,6 +73,14 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
const columns = [{
|
const columns = [{
|
||||||
|
dataIndex: "index",
|
||||||
|
key: "index",
|
||||||
|
title: "序号",
|
||||||
|
width: 60,
|
||||||
|
fixed: 'left',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
dataIndex: "label",
|
dataIndex: "label",
|
||||||
key: "label",
|
key: "label",
|
||||||
title: "中文标签",
|
title: "中文标签",
|
||||||
|
|
@ -180,12 +188,15 @@
|
||||||
/// 工具栏
|
/// 工具栏
|
||||||
const toolbar = [{
|
const toolbar = [{
|
||||||
label: "新增",
|
label: "新增",
|
||||||
|
icon: "PlusOutlined",
|
||||||
event: function() {
|
event: function() {
|
||||||
state.visibleSave = true, state.recordSave = props.record
|
state.visibleSave = true, state.recordSave = props.record
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "删除",
|
label: "删除",
|
||||||
|
icon: "DeleteOutlined",
|
||||||
|
danger: true,
|
||||||
event: function() {
|
event: function() {
|
||||||
removeBatchMethod(state.selectedRowKeys)
|
removeBatchMethod(state.selectedRowKeys)
|
||||||
}
|
}
|
||||||
|
|
@ -201,6 +212,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "删除",
|
label: "删除",
|
||||||
|
isDel: true,
|
||||||
event: function(record) {
|
event: function(record) {
|
||||||
removeMethod(record)
|
removeMethod(record)
|
||||||
}
|
}
|
||||||
|
|
@ -209,7 +221,7 @@
|
||||||
|
|
||||||
const pagination = {
|
const pagination = {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10
|
pageSize: 20
|
||||||
};
|
};
|
||||||
|
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
|
|
@ -255,3 +267,36 @@
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
.drawer-table {
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
/* 让 pro-table 自适应填满抽屉高度;y:'flex' 将根据容器高度计算 */
|
||||||
|
.drawer-table :deep(#pro-table) {
|
||||||
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
min-height: 0;
|
||||||
|
}
|
||||||
|
.drawer-table :deep(#pro-table .pro-table-tool) {
|
||||||
|
/* 工具栏保持自然高度 */
|
||||||
|
flex: none;
|
||||||
|
}
|
||||||
|
.drawer-table :deep(#pro-table .ant-table-wrapper),
|
||||||
|
.drawer-table :deep(#pro-table .ant-spin-nested-loading),
|
||||||
|
.drawer-table :deep(#pro-table .ant-spin-container),
|
||||||
|
.drawer-table :deep(#pro-table .ant-table),
|
||||||
|
.drawer-table :deep(#pro-table .ant-table-container) {
|
||||||
|
flex: 1;
|
||||||
|
min-height: 0;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
.drawer-table :deep(#pro-table .ant-table-body) {
|
||||||
|
/* 当 y:'flex' 时,内部会使用 flex 高度,这里保证最小高度与滚动行为 */
|
||||||
|
flex: 1;
|
||||||
|
min-height: 0;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -64,6 +64,14 @@
|
||||||
}];
|
}];
|
||||||
/// 列配置
|
/// 列配置
|
||||||
const columns = [{
|
const columns = [{
|
||||||
|
dataIndex: "index",
|
||||||
|
key: "index",
|
||||||
|
title: "序号",
|
||||||
|
width: 60,
|
||||||
|
fixed: 'left',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
dataIndex: "content",
|
dataIndex: "content",
|
||||||
key: "content",
|
key: "content",
|
||||||
title: "消息内容"
|
title: "消息内容"
|
||||||
|
|
|
||||||
|
|
@ -81,6 +81,14 @@
|
||||||
|
|
||||||
/// 列配置
|
/// 列配置
|
||||||
const columns = [{
|
const columns = [{
|
||||||
|
dataIndex: "index",
|
||||||
|
key: "index",
|
||||||
|
title: "序号",
|
||||||
|
width: 60,
|
||||||
|
fixed: 'left',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
dataIndex: "name",
|
dataIndex: "name",
|
||||||
key: "name",
|
key: "name",
|
||||||
title: "名称"
|
title: "名称"
|
||||||
|
|
@ -179,12 +187,15 @@
|
||||||
/// 工具栏
|
/// 工具栏
|
||||||
const toolbar = [{
|
const toolbar = [{
|
||||||
label: "新增",
|
label: "新增",
|
||||||
|
icon: 'PlusOutlined',
|
||||||
event: function() {
|
event: function() {
|
||||||
state.visibleSave = true
|
state.visibleSave = true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "删除",
|
label: "删除",
|
||||||
|
icon: 'DeleteOutlined',
|
||||||
|
danger: true,
|
||||||
event: function() {
|
event: function() {
|
||||||
removeBatchMethod(state.selectedRowKeys)
|
removeBatchMethod(state.selectedRowKeys)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -41,9 +41,10 @@ export default {
|
||||||
|
|
||||||
/// 列配置
|
/// 列配置
|
||||||
const columns = [
|
const columns = [
|
||||||
|
{ dataIndex: "index", key: "index", title: "序号", width: 60, fixed: 'left', align: 'center' },
|
||||||
{ dataIndex: "jobName", key: "jobName", title: "任务" },
|
{ dataIndex: "jobName", key: "jobName", title: "任务" },
|
||||||
{ dataIndex: "beanName", key: "beanName", title: "目标" },
|
{ dataIndex: "beanName", key: "beanName", title: "目标" },
|
||||||
{ dataIndex: "time", key: "time", title: "耗时"},
|
{ dataIndex: "time", key: "time", title: "耗时(ms)",align: 'right',width: 120 },
|
||||||
{ dataIndex: "createTime", key: "createTime", title: "运行时间" },
|
{ dataIndex: "createTime", key: "createTime", title: "运行时间" },
|
||||||
{ dataIndex: "state", key: "state", title: "状态", conver: converFormat },
|
{ dataIndex: "state", key: "state", title: "状态", conver: converFormat },
|
||||||
];
|
];
|
||||||
|
|
@ -63,13 +64,17 @@ export default {
|
||||||
|
|
||||||
/// 工具栏
|
/// 工具栏
|
||||||
const toolbar = [
|
const toolbar = [
|
||||||
{ label: "备份", event: function () { }},
|
{ label: "备份", icon:'SnippetsOutlined', event: function () { }},
|
||||||
];
|
];
|
||||||
|
|
||||||
/// 分页参数
|
/// 分页参数
|
||||||
const pagination = {
|
const pagination = {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 20,
|
||||||
|
showSizeChanger: true, // 显示可改变每页条数
|
||||||
|
pageSizeOptions: ["10", "20", "50", "100"], // 每页条数选项设置
|
||||||
|
showTotal: total => `共 ${total} 条记录`, // 显示总条数
|
||||||
|
showSizeChange: (current, pageSize) => (this.pageSize = pageSize) // 改变每页条数时更新显示
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 外置参数 - 当参数改变时, 重新触发 fetch 函数
|
/// 外置参数 - 当参数改变时, 重新触发 fetch 函数
|
||||||
|
|
|
||||||
|
|
@ -1,31 +1,19 @@
|
||||||
<template>
|
<template>
|
||||||
<a-list-layout
|
<a-list-layout ref="pageRef">
|
||||||
ref="pageRef"
|
|
||||||
>
|
|
||||||
<template #search>
|
<template #search>
|
||||||
<!-- 查询参数 -->
|
<!-- 查询参数 -->
|
||||||
<pro-query
|
<pro-query :searchParam="searchParam" @on-search="search"></pro-query>
|
||||||
:searchParam="searchParam"
|
|
||||||
@on-search ="search"
|
|
||||||
></pro-query>
|
|
||||||
</template>
|
</template>
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<pro-table
|
<pro-table :fetch="fetch" :columns="columns" :toolbar="toolbar" :param="state.param" :pagination="pagination"
|
||||||
:fetch="fetch"
|
:operate="operate" :row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
|
||||||
:columns="columns"
|
|
||||||
:toolbar="toolbar"
|
|
||||||
:param="state.param"
|
|
||||||
:pagination="pagination"
|
|
||||||
:operate="operate"
|
|
||||||
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }"
|
|
||||||
>
|
|
||||||
<!-- 继承至 a-table 的默认插槽 -->
|
<!-- 继承至 a-table 的默认插槽 -->
|
||||||
</pro-table>
|
</pro-table>
|
||||||
</a-list-layout>
|
</a-list-layout>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { message , Modal as modal} from '@hwork/ant-design-vue';
|
import { message, Modal as modal } from '@hwork/ant-design-vue';
|
||||||
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
||||||
import { page, clean } from "@/api/module/log";
|
import { page, clean } from "@/api/module/log";
|
||||||
import { reactive, createVNode } from 'vue';
|
import { reactive, createVNode } from 'vue';
|
||||||
|
|
@ -36,28 +24,29 @@ export default {
|
||||||
setup() {
|
setup() {
|
||||||
|
|
||||||
/// 文本
|
/// 文本
|
||||||
const converFormat = [{label:"成功", value:true},{label:"失败", value:false}];
|
const converFormat = [{ label: "成功", value: true }, { label: "失败", value: false }];
|
||||||
|
|
||||||
/// 列配置
|
/// 列配置
|
||||||
const columns = [
|
const columns = [
|
||||||
{ dataIndex: "title", key: "title", title: "标题" ,width:120,showSearch: true},
|
{ dataIndex: "index", key: "index", title: "序号", width: 60, fixed: 'left', align: 'center' },
|
||||||
{ dataIndex: "describe", key: "describe", title: "描述" ,width:120,showSearch: true},
|
{ dataIndex: "title", key: "title", title: "标题", width: 120, showSearch: true },
|
||||||
{ dataIndex: "action", key: "action", title: "动作",width:100},
|
{ dataIndex: "describe", key: "describe", title: "描述", width: 120, showSearch: true },
|
||||||
{ dataIndex: "type", key: "type", title: "方式",width:120},
|
{ dataIndex: "action", key: "action", title: "动作", width: 100 },
|
||||||
{ dataIndex: "browser", key: "browser", title: "浏览器" ,width:120,ellipsis: true},
|
{ dataIndex: "type", key: "type", title: "方式", width: 120 },
|
||||||
{ dataIndex: "system", key: "system", title: "系统" ,width:120,ellipsis: true},
|
{ dataIndex: "browser", key: "browser", title: "浏览器", width: 120, ellipsis: true },
|
||||||
{ dataIndex: "address", key: "address", title: "操作地" ,width:120,showSearch: true,ellipsis: true},
|
{ dataIndex: "system", key: "system", title: "系统", width: 120, ellipsis: true },
|
||||||
{ dataIndex: "createBy", key: "createBy", title: "创建人" ,width:120,ellipsis: true,showSearch: true},
|
{ dataIndex: "address", key: "address", title: "操作地", width: 120, showSearch: true, ellipsis: true },
|
||||||
{ dataIndex: "createUsername", key: "createUsername", title: "创建人" ,width:120,ellipsis: true,showSearch: true},
|
{ dataIndex: "createBy", key: "createBy", title: "创建人", width: 120, ellipsis: true, showSearch: true },
|
||||||
{ dataIndex: "createNickname", key: "createNickname", title: "创建人昵称" ,width:120,ellipsis: true},
|
{ dataIndex: "createUsername", key: "createUsername", title: "创建人", width: 120, ellipsis: true, showSearch: true },
|
||||||
{ dataIndex: "createTime", key: "createTime", title: "操作时间" ,width:180,ellipsis: true},
|
{ dataIndex: "createNickname", key: "createNickname", title: "创建人昵称", width: 120, ellipsis: true },
|
||||||
{ dataIndex: "state", key: "state", title: "状态", conver: converFormat ,width:120,ellipsis: true},
|
{ dataIndex: "createTime", key: "createTime", title: "操作时间", width: 180, ellipsis: true },
|
||||||
{ dataIndex: "params", key: "params", title: "参数",showSearch: true ,width:300,ellipsis: true},
|
{ dataIndex: "state", key: "state", title: "状态", conver: converFormat, width: 120, ellipsis: true },
|
||||||
{ dataIndex: "result", key: "result", title: "返回结果", showSearch: true ,width:300,ellipsis: true},
|
{ dataIndex: "params", key: "params", title: "参数", showSearch: true, width: 300, ellipsis: true },
|
||||||
|
{ dataIndex: "result", key: "result", title: "返回结果", showSearch: true, width: 300, ellipsis: true },
|
||||||
];
|
];
|
||||||
|
|
||||||
const operate = [
|
const operate = [
|
||||||
{ label: "查看", event: function (record) { alert("查看详情:" + JSON.stringify(record))}},
|
{ label: "查看", event: function (record) { alert("查看详情:" + JSON.stringify(record)) } },
|
||||||
];
|
];
|
||||||
|
|
||||||
/// 数据来源 [模拟]
|
/// 数据来源 [模拟]
|
||||||
|
|
@ -78,11 +67,11 @@ export default {
|
||||||
cancelText: '取消',
|
cancelText: '取消',
|
||||||
onOk() {
|
onOk() {
|
||||||
message.loading({ content: "提交中...", key: cleanKey });
|
message.loading({ content: "提交中...", key: cleanKey });
|
||||||
clean({"isAuth":true}).then((response) => {
|
clean({ "isAuth": true }).then((response) => {
|
||||||
if(response.success){
|
if (response.success) {
|
||||||
message.success({content: "清空成功", key: cleanKey, duration: 1})
|
message.success({ content: "清空成功", key: cleanKey, duration: 1 })
|
||||||
}else{
|
} else {
|
||||||
message.error({content: "清空失败", key: cleanKey, duration: 1})
|
message.error({ content: "清空失败", key: cleanKey, duration: 1 })
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
@ -91,14 +80,18 @@ export default {
|
||||||
|
|
||||||
/// 工具栏
|
/// 工具栏
|
||||||
const toolbar = [
|
const toolbar = [
|
||||||
{ label: "备份", event: function () { }},
|
{ label: "备份", icon: 'SnippetsOutlined', event: function () { } },
|
||||||
{ label: "清空", event: function () { cleanMethod(); }},
|
{ label: "清空", icon: 'ClearOutlined', danger: true, event: function () { cleanMethod(); } },
|
||||||
];
|
];
|
||||||
|
|
||||||
/// 分页参数
|
/// 分页参数
|
||||||
const pagination = {
|
const pagination = {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 20,
|
||||||
|
showSizeChanger: true, // 显示可改变每页条数
|
||||||
|
pageSizeOptions: ["10", "20", "50", "100"], // 每页条数选项设置
|
||||||
|
showTotal: total => `共 ${total} 条记录`, // 显示总条数
|
||||||
|
showSizeChange: (current, pageSize) => (this.pageSize = pageSize) // 改变每页条数时更新显示
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 外置参数 - 当参数改变时, 重新触发 fetch 函数
|
/// 外置参数 - 当参数改变时, 重新触发 fetch 函数
|
||||||
|
|
@ -109,17 +102,18 @@ export default {
|
||||||
|
|
||||||
/// 查询参数
|
/// 查询参数
|
||||||
const searchParam = [
|
const searchParam = [
|
||||||
{ key: "title", type: "input", label: "标题"},
|
{ key: "title", type: "input", label: "标题" },
|
||||||
{ key: "state", type: "select", label: "状态", value: "",
|
{
|
||||||
|
key: "state", type: "select", label: "状态", value: "",
|
||||||
options: [
|
options: [
|
||||||
{ text: "全部", value: ""},
|
{ text: "全部", value: "" },
|
||||||
{ text: "成功", value: true},
|
{ text: "成功", value: true },
|
||||||
{ text: "失败", value: false}
|
{ text: "失败", value: false }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
/// 查询操作
|
/// 查询操作
|
||||||
const search = function(value) {
|
const search = function (value) {
|
||||||
state.param.title = value.title
|
state.param.title = value.title
|
||||||
state.param.state = value.state
|
state.param.state = value.state
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,7 @@ export default {
|
||||||
|
|
||||||
/// 列配置
|
/// 列配置
|
||||||
const columns = [
|
const columns = [
|
||||||
|
{ dataIndex: "index", key: "index", title: "序号", width: 60, fixed: 'left', align: 'center' },
|
||||||
{ dataIndex: "title", key: "title", title: "标题", width: 120, showSearch: true },
|
{ dataIndex: "title", key: "title", title: "标题", width: 120, showSearch: true },
|
||||||
{ dataIndex: "describe", key: "describe", title: "描述", width: 120, showSearch: true },
|
{ dataIndex: "describe", key: "describe", title: "描述", width: 120, showSearch: true },
|
||||||
{ dataIndex: "action", key: "action", title: "动作", width: 100 },
|
{ dataIndex: "action", key: "action", title: "动作", width: 100 },
|
||||||
|
|
@ -84,14 +85,18 @@ export default {
|
||||||
|
|
||||||
/// 工具栏
|
/// 工具栏
|
||||||
const toolbar = [
|
const toolbar = [
|
||||||
{ label: "备份", event: function () { exportExcel(); } },
|
{ label: "备份",icon:'SnippetsOutlined', event: function () { exportExcel(); } },
|
||||||
{ label: "清空", event: function () { cleanMethod(); } },
|
{ label: "清空",icon:'ClearOutlined',danger: true, event: function () { cleanMethod(); } },
|
||||||
];
|
];
|
||||||
|
|
||||||
/// 分页参数
|
/// 分页参数
|
||||||
const pagination = {
|
const pagination = {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 20,
|
||||||
|
showSizeChanger: true, // 显示可改变每页条数
|
||||||
|
pageSizeOptions: ["10", "20", "50", "100"], // 每页条数选项设置
|
||||||
|
showTotal: total => `共 ${total} 条记录`, // 显示总条数
|
||||||
|
showSizeChange: (current, pageSize) => (this.pageSize = pageSize) // 改变每页条数时更新显示
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 外置参数 - 当参数改变时, 重新触发 fetch 函数
|
/// 外置参数 - 当参数改变时, 重新触发 fetch 函数
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,7 @@
|
||||||
|
|
||||||
/// 列配置
|
/// 列配置
|
||||||
const columns = [
|
const columns = [
|
||||||
|
{ dataIndex: "index", key: "index", title: "序号", width: 60, fixed: 'left', align: 'center' },
|
||||||
{ dataIndex: "name", key: "name", title: "文件名称" },
|
{ dataIndex: "name", key: "name", title: "文件名称" },
|
||||||
{ dataIndex: "location", key: "code", title: "存储位置", conver: converFormat},
|
{ dataIndex: "location", key: "code", title: "存储位置", conver: converFormat},
|
||||||
{ dataIndex: "bucket", key: "bucket", title: "文件仓库" },
|
{ dataIndex: "bucket", key: "bucket", title: "文件仓库" },
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,7 @@ export default {
|
||||||
|
|
||||||
/// 列配置
|
/// 列配置
|
||||||
const columns = [
|
const columns = [
|
||||||
|
{ dataIndex: "index", key: "index", title: "序号", width: 60, fixed: 'left', align: 'center' },
|
||||||
{ dataIndex: "name", key: "name", title: "名称" },
|
{ dataIndex: "name", key: "name", title: "名称" },
|
||||||
{ dataIndex: "code", key: "code", title: "标识" },
|
{ dataIndex: "code", key: "code", title: "标识" },
|
||||||
{ dataIndex: "remark", key: "remark", title: "备注" },
|
{ dataIndex: "remark", key: "remark", title: "备注" },
|
||||||
|
|
@ -101,21 +102,25 @@ export default {
|
||||||
|
|
||||||
/// 工具栏
|
/// 工具栏
|
||||||
const toolbar = [
|
const toolbar = [
|
||||||
{ label: "新增", event: function () { state.visibleSave = true } },
|
{ label: "新增", icon: 'PlusOutlined', event: function () { state.visibleSave = true } },
|
||||||
{ label: "删除", event: function () { removeBatchMethod(state.selectedRowKeys) } },
|
{ label: "删除", icon: 'DeleteOutlined', danger: true,event: function () { removeBatchMethod(state.selectedRowKeys) } },
|
||||||
];
|
];
|
||||||
|
|
||||||
/// 行操作
|
/// 行操作
|
||||||
const operate = [
|
const operate = [
|
||||||
{ label: "查看", event: function (record) { state.visibleInfo = true, state.recordInfo = record } },
|
{ label: "查看", event: function (record) { state.visibleInfo = true, state.recordInfo = record } },
|
||||||
{ label: "修改", event: function (record) { state.visibleEdit = true, state.recordEdit = record } },
|
{ label: "修改", event: function (record) { state.visibleEdit = true, state.recordEdit = record } },
|
||||||
{ label: "删除", event: function (record) { removeMethod(record) } },
|
{ label: "删除", isDel: true, event: function (record) { removeMethod(record) } },
|
||||||
];
|
];
|
||||||
|
|
||||||
/// 分页参数
|
/// 分页参数
|
||||||
const pagination = {
|
const pagination = {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 20,
|
||||||
|
showSizeChanger: true, // 显示可改变每页条数
|
||||||
|
pageSizeOptions: ["10", "20", "50", "100"], // 每页条数选项设置
|
||||||
|
showTotal: total => `共 ${total} 条记录`, // 显示总条数
|
||||||
|
showSizeChange: (current, pageSize) => (this.pageSize = pageSize) // 改变每页条数时更新显示
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 外置参数 - 当参数改变时, 重新触发 fetch 函数
|
/// 外置参数 - 当参数改变时, 重新触发 fetch 函数
|
||||||
|
|
|
||||||
|
|
@ -1,56 +1,50 @@
|
||||||
<template>
|
<template>
|
||||||
<page-layout>
|
<a-list-layout>
|
||||||
<a-row :gutter="[10, 10]">
|
|
||||||
<!-- 顶部区域 -->
|
|
||||||
<a-col :span="24">
|
|
||||||
<a-card>
|
|
||||||
<!-- 查询参数 -->
|
<!-- 查询参数 -->
|
||||||
|
<template #search>
|
||||||
<pro-query :searchParam="searchParam" @on-search="search"></pro-query>
|
<pro-query :searchParam="searchParam" @on-search="search"></pro-query>
|
||||||
</a-card>
|
|
||||||
</a-col>
|
</template>
|
||||||
<!-- 中心区域 -->
|
|
||||||
<a-col :span="24">
|
|
||||||
<a-card>
|
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<pro-table ref="tableRef" rowKey="id" :fetch="fetch" :columns="columns" :toolbar="toolbar" :operate="operate"
|
<pro-table ref="tableRef" rowKey="id" :fetch="fetch" :columns="columns" :toolbar="toolbar" :operate="operate"
|
||||||
:param="state.param" :pagination="pagination"
|
:param="state.param" :pagination="pagination"
|
||||||
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
|
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
|
||||||
<!-- 继承至 a-table 的默认插槽 -->
|
<!-- 继承至 a-table 的默认插槽 -->
|
||||||
</pro-table>
|
</pro-table>
|
||||||
</a-card>
|
|
||||||
</a-col>
|
|
||||||
</a-row>
|
|
||||||
<save :visible="state.visibleSave" @close="closeSave"></save>
|
<save :visible="state.visibleSave" @close="closeSave"></save>
|
||||||
<edit :visible="state.visibleEdit" @close="closeEdit" :record="state.recordEdit"></edit>
|
<edit :visible="state.visibleEdit" @close="closeEdit" :record="state.recordEdit"></edit>
|
||||||
<info :visible="state.visibleInfo" @close="closeInfo" :record="state.recordInfo"></info>
|
<info :visible="state.visibleInfo" @close="closeInfo" :record="state.recordInfo"></info>
|
||||||
</page-layout>
|
</a-list-layout>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import save from './modal/save.vue';
|
import save from './modal/save.vue';
|
||||||
import edit from './modal/edit.vue';
|
import edit from './modal/edit.vue';
|
||||||
import info from './modal/info.vue';
|
import info from './modal/info.vue';
|
||||||
import {
|
import {
|
||||||
message,
|
message,
|
||||||
Modal as modal
|
Modal as modal
|
||||||
} from '@hwork/ant-design-vue';
|
} from '@hwork/ant-design-vue';
|
||||||
import {
|
import {
|
||||||
ExclamationCircleOutlined
|
ExclamationCircleOutlined
|
||||||
} from '@ant-design/icons-vue';
|
} from '@ant-design/icons-vue';
|
||||||
import {
|
import {
|
||||||
tree,
|
tree,
|
||||||
remove
|
remove
|
||||||
} from "@/api/module/power";
|
} from "@/api/module/power";
|
||||||
import {
|
import {
|
||||||
reactive,
|
reactive,
|
||||||
createVNode,
|
createVNode,
|
||||||
ref
|
ref
|
||||||
} from 'vue';
|
} from 'vue';
|
||||||
|
|
||||||
const removeKey = "remove";
|
const removeKey = "remove";
|
||||||
const removeBatchKey = "removeBatch";
|
const removeBatchKey = "removeBatch";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
save,
|
save,
|
||||||
edit,
|
edit,
|
||||||
|
|
@ -63,7 +57,7 @@
|
||||||
const switchFormat = {
|
const switchFormat = {
|
||||||
yes: true,
|
yes: true,
|
||||||
no: false,
|
no: false,
|
||||||
event: function(value, record) {
|
event: function (value, record) {
|
||||||
record.enable = !record.enable;
|
record.enable = !record.enable;
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
@ -111,7 +105,8 @@
|
||||||
]
|
]
|
||||||
|
|
||||||
/// 列配置
|
/// 列配置
|
||||||
const columns = [{
|
const columns = [
|
||||||
|
{
|
||||||
dataIndex: "title",
|
dataIndex: "title",
|
||||||
key: "title",
|
key: "title",
|
||||||
title: "权限名"
|
title: "权限名"
|
||||||
|
|
@ -162,7 +157,8 @@
|
||||||
const toolbar = [{
|
const toolbar = [{
|
||||||
label: "新增",
|
label: "新增",
|
||||||
code: "sys:power:save",
|
code: "sys:power:save",
|
||||||
event: function() {
|
icon: "PlusOutlined",
|
||||||
|
event: function () {
|
||||||
state.visibleSave = true
|
state.visibleSave = true
|
||||||
}
|
}
|
||||||
}];
|
}];
|
||||||
|
|
@ -171,14 +167,14 @@
|
||||||
const operate = [{
|
const operate = [{
|
||||||
label: "查看",
|
label: "查看",
|
||||||
code: "sys:power:info",
|
code: "sys:power:info",
|
||||||
event: function(record) {
|
event: function (record) {
|
||||||
state.visibleInfo = true, state.recordInfo = record
|
state.visibleInfo = true, state.recordInfo = record
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "修改",
|
label: "修改",
|
||||||
code: "sys:power:edit",
|
code: "sys:power:edit",
|
||||||
event: function(record) {
|
event: function (record) {
|
||||||
state.visibleEdit = true, state.recordEdit = record
|
state.visibleEdit = true, state.recordEdit = record
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -186,7 +182,7 @@
|
||||||
label: "删除",
|
label: "删除",
|
||||||
isDel: true,
|
isDel: true,
|
||||||
code: "sys:power:remove",
|
code: "sys:power:remove",
|
||||||
delEvent: function(record) {
|
delEvent: function (record) {
|
||||||
removeMethod(record)
|
removeMethod(record)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -241,7 +237,7 @@
|
||||||
]
|
]
|
||||||
|
|
||||||
/// 查询操作
|
/// 查询操作
|
||||||
const search = function(value) {
|
const search = function (value) {
|
||||||
state.param = value
|
state.param = value
|
||||||
tableRef.value.reload()
|
tableRef.value.reload()
|
||||||
}
|
}
|
||||||
|
|
@ -250,17 +246,17 @@
|
||||||
state.selectedRowKeys = selectedRowKeys;
|
state.selectedRowKeys = selectedRowKeys;
|
||||||
};
|
};
|
||||||
|
|
||||||
const closeSave = function() {
|
const closeSave = function () {
|
||||||
state.visibleSave = false;
|
state.visibleSave = false;
|
||||||
tableRef.value.reload();
|
tableRef.value.reload();
|
||||||
}
|
}
|
||||||
|
|
||||||
const closeEdit = function() {
|
const closeEdit = function () {
|
||||||
state.visibleEdit = false;
|
state.visibleEdit = false;
|
||||||
tableRef.value.reload();
|
tableRef.value.reload();
|
||||||
}
|
}
|
||||||
|
|
||||||
const closeInfo = function() {
|
const closeInfo = function () {
|
||||||
state.visibleInfo = false;
|
state.visibleInfo = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -282,5 +278,5 @@
|
||||||
tableRef
|
tableRef
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -1,29 +1,24 @@
|
||||||
<template>
|
<template>
|
||||||
<page-layout>
|
<a-list-layout
|
||||||
<a-row :gutter="[10, 10]">
|
ref="pageRef">
|
||||||
<!-- 顶部区域 -->
|
|
||||||
<a-col :span="24">
|
|
||||||
<a-card>
|
|
||||||
<!-- 查询参数 -->
|
<!-- 查询参数 -->
|
||||||
|
<template #search>
|
||||||
<pro-query :searchParam="searchParam" @on-search="search"></pro-query>
|
<pro-query :searchParam="searchParam" @on-search="search"></pro-query>
|
||||||
</a-card>
|
|
||||||
</a-col>
|
</template>
|
||||||
<!-- 中心区域 -->
|
|
||||||
<a-col :span="24">
|
|
||||||
<a-card>
|
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<pro-table ref="tableRef" :fetch="fetch" :columns="columns" :toolbar="toolbar" :operate="operate"
|
<pro-table ref="tableRef" :fetch="fetch" :columns="columns" :toolbar="toolbar" :operate="operate"
|
||||||
:param="state.param" :pagination="pagination"
|
:param="state.param" :pagination="pagination"
|
||||||
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
|
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
|
||||||
</pro-table>
|
</pro-table>
|
||||||
</a-card>
|
|
||||||
</a-col>
|
|
||||||
</a-row>
|
|
||||||
<save :visible="state.visibleSave" @close="closeSave"></save>
|
<save :visible="state.visibleSave" @close="closeSave"></save>
|
||||||
<edit :visible="state.visibleEdit" @close="closeEdit" :record="state.recordEdit"></edit>
|
<edit :visible="state.visibleEdit" @close="closeEdit" :record="state.recordEdit"></edit>
|
||||||
<give :visible="state.visibleGive" @close="closeGive" :record="state.recordGive"></give>
|
<give :visible="state.visibleGive" @close="closeGive" :record="state.recordGive"></give>
|
||||||
<info :visible="state.visibleInfo" @close="closeInfo" :record="state.recordInfo"></info>
|
<info :visible="state.visibleInfo" @close="closeInfo" :record="state.recordInfo"></info>
|
||||||
</page-layout>
|
</a-list-layout>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import save from './modal/save.vue';
|
import save from './modal/save.vue';
|
||||||
|
|
@ -81,6 +76,14 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
const columns = [{
|
const columns = [{
|
||||||
|
dataIndex: "index",
|
||||||
|
key: "index",
|
||||||
|
title: "序号",
|
||||||
|
width: 60,
|
||||||
|
fixed: 'left',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
dataIndex: "name",
|
dataIndex: "name",
|
||||||
key: "name",
|
key: "name",
|
||||||
title: "名称"
|
title: "名称"
|
||||||
|
|
@ -190,12 +193,15 @@
|
||||||
/// 工具栏
|
/// 工具栏
|
||||||
const toolbar = [{
|
const toolbar = [{
|
||||||
label: "新增",
|
label: "新增",
|
||||||
|
icon: 'PlusOutlined',
|
||||||
event: function() {
|
event: function() {
|
||||||
state.visibleSave = true
|
state.visibleSave = true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "删除",
|
label: "删除",
|
||||||
|
icon: 'DeleteOutlined',
|
||||||
|
danger: true,
|
||||||
event: function() {
|
event: function() {
|
||||||
removeBatchMethod(state.selectedRowKeys)
|
removeBatchMethod(state.selectedRowKeys)
|
||||||
}
|
}
|
||||||
|
|
@ -223,6 +229,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "删除",
|
label: "删除",
|
||||||
|
isDel: true,
|
||||||
event: function(record) {
|
event: function(record) {
|
||||||
removeMethod(record)
|
removeMethod(record)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -217,7 +217,7 @@ export default {
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
{ title: "磁盘", dataIndex: "typeName", key: "typeName", width: "200px"},
|
{ title: "磁盘", dataIndex: "typeName", key: "typeName", width: "200px"},
|
||||||
{ title: "使用率", dataIndex: "usage", key: "usage", slots: { customRender: "usage" }},
|
{ title: "使用率", dataIndex: "usage", key: "usage", slots: { customRender: "usage" },width: "120px"},
|
||||||
{ title: "路径", dataIndex: "dirName", key: "dirName", align: "center"},
|
{ title: "路径", dataIndex: "dirName", key: "dirName", align: "center"},
|
||||||
{ title: "使用", dataIndex: "used", key: "used", align: "center"},
|
{ title: "使用", dataIndex: "used", key: "used", align: "center"},
|
||||||
{ title: "剩余", dataIndex: "free", key: "free", align: "center"},
|
{ title: "剩余", dataIndex: "free", key: "free", align: "center"},
|
||||||
|
|
|
||||||
|
|
@ -121,7 +121,7 @@
|
||||||
</div>
|
</div>
|
||||||
</a-card-grid>
|
</a-card-grid>
|
||||||
</a-card>
|
</a-card>
|
||||||
<a-card title="动态" style="margin-top: 10px">
|
<a-card title="动态" >
|
||||||
<a-list item-layout="horizontal" :data-source="data">
|
<a-list item-layout="horizontal" :data-source="data">
|
||||||
<template #renderItem="{ item }">
|
<template #renderItem="{ item }">
|
||||||
<a-list-item>
|
<a-list-item>
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
</a-col>
|
</a-col>
|
||||||
-->
|
-->
|
||||||
<a-col span="24">
|
<a-col span="24">
|
||||||
<a-table :columns="columns" :data-source="dataSource" style="margin-top: 10px" />
|
<a-table :columns="columns" :data-source="dataSource" />
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
</a-card>
|
</a-card>
|
||||||
|
|
@ -80,6 +80,14 @@
|
||||||
//当前仓库的信息汇总
|
//当前仓库的信息汇总
|
||||||
|
|
||||||
const columns = [{
|
const columns = [{
|
||||||
|
dataIndex: "index",
|
||||||
|
key: "index",
|
||||||
|
title: "序号",
|
||||||
|
width: 60,
|
||||||
|
fixed: 'left',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
title: "日期",
|
title: "日期",
|
||||||
dataIndex: "dayTime",
|
dataIndex: "dayTime",
|
||||||
key: "dayTime",
|
key: "dayTime",
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
</a-col>
|
</a-col>
|
||||||
-->
|
-->
|
||||||
<a-col span="24">
|
<a-col span="24">
|
||||||
<a-table :columns="columns" :data-source="dataSource" style="margin-top: 10px" />
|
<a-table :columns="columns" :data-source="dataSource" />
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
</a-card>
|
</a-card>
|
||||||
|
|
@ -80,6 +80,14 @@
|
||||||
//当前仓库的信息汇总
|
//当前仓库的信息汇总
|
||||||
|
|
||||||
const columns = [{
|
const columns = [{
|
||||||
|
dataIndex: "index",
|
||||||
|
key: "index",
|
||||||
|
title: "序号",
|
||||||
|
width: 60,
|
||||||
|
fixed: 'left',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
title: "日期",
|
title: "日期",
|
||||||
dataIndex: "dayTime",
|
dataIndex: "dayTime",
|
||||||
key: "dayTime",
|
key: "dayTime",
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,7 @@ export default {
|
||||||
const tableRef = ref()
|
const tableRef = ref()
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
|
{ dataIndex: "index", key: "index", title: "序号", width: 60, fixed: 'left', align: 'center' },
|
||||||
{ dataIndex: "name", key: "name", title: "名称" },
|
{ dataIndex: "name", key: "name", title: "名称" },
|
||||||
{ dataIndex: "describe", key: "describe", title: "描述" },
|
{ dataIndex: "describe", key: "describe", title: "描述" },
|
||||||
{ dataIndex: "createTime", key: "createTime", title: "创建时间" },
|
{ dataIndex: "createTime", key: "createTime", title: "创建时间" },
|
||||||
|
|
@ -93,8 +94,8 @@ export default {
|
||||||
|
|
||||||
/// 工具栏
|
/// 工具栏
|
||||||
const toolbar = [
|
const toolbar = [
|
||||||
{ label: "新增", event: function () { state.visibleSave = true } },
|
{ label: "新增", icon: 'PlusOutlined', event: function () { state.visibleSave = true } },
|
||||||
{ label: "删除", event: function () { removeBatchMethod(state.selectedRowKeys) } },
|
{ label: "删除", icon: 'DeleteOutlined', danger: true,event: function () { removeBatchMethod(state.selectedRowKeys) } },
|
||||||
];
|
];
|
||||||
|
|
||||||
/// 行操作
|
/// 行操作
|
||||||
|
|
@ -108,7 +109,11 @@ export default {
|
||||||
/// 分页参数
|
/// 分页参数
|
||||||
const pagination = {
|
const pagination = {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 20,
|
||||||
|
showSizeChanger: true, // 显示可改变每页条数
|
||||||
|
pageSizeOptions: ["10", "20", "50", "100"], // 每页条数选项设置
|
||||||
|
showTotal: total => `共 ${total} 条记录`, // 显示总条数
|
||||||
|
showSizeChange: (current, pageSize) => (this.pageSize = pageSize) // 改变每页条数时更新显示
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 外置参数 - 当参数改变时, 重新触发 fetch 函数
|
/// 外置参数 - 当参数改变时, 重新触发 fetch 函数
|
||||||
|
|
|
||||||
|
|
@ -111,8 +111,8 @@ export default {
|
||||||
|
|
||||||
/// 工具栏
|
/// 工具栏
|
||||||
const toolbar = [
|
const toolbar = [
|
||||||
{ label: "新增", event: function () { state.visibleSave = true } },
|
{ label: "新增",icon: 'PlusOutlined', event: function () { state.visibleSave = true } },
|
||||||
{ label: "删除", event: function () { removeBatchMethod(state.selectedRowKeys) } }
|
{ label: "删除", icon: 'DeleteOutlined', danger: true,event: function () { removeBatchMethod(state.selectedRowKeys) } }
|
||||||
];
|
];
|
||||||
|
|
||||||
/// 行操作
|
/// 行操作
|
||||||
|
|
@ -120,7 +120,7 @@ export default {
|
||||||
{ label: "查看", event: function (record) { state.visibleInfo = true, state.recordInfo = record } },
|
{ label: "查看", event: function (record) { state.visibleInfo = true, state.recordInfo = record } },
|
||||||
{ label: "修改", event: function (record) { state.visibleEdit = true, state.recordEdit = record } },
|
{ label: "修改", event: function (record) { state.visibleEdit = true, state.recordEdit = record } },
|
||||||
{ label: "分配", event: function (record) { state.visibleGive = true, state.recordGive = record } },
|
{ label: "分配", event: function (record) { state.visibleGive = true, state.recordGive = record } },
|
||||||
{ label: "删除", event: function (record) { removeMethod(record) } },
|
{ label: "删除", isDel: true, event: function (record) { removeMethod(record) } },
|
||||||
{ label: '重置', event: function (record) { resetPasswordMethod(record) } }
|
{ label: '重置', event: function (record) { resetPasswordMethod(record) } }
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
@ -140,11 +140,12 @@ export default {
|
||||||
|
|
||||||
/// 配置
|
/// 配置
|
||||||
const columns = [
|
const columns = [
|
||||||
|
{ dataIndex: "index", key: "index", title: "序号", width: 60, fixed: 'left', align: 'center' },
|
||||||
{ dataIndex: "deptName", key: "deptName", title: "部门" },
|
{ dataIndex: "deptName", key: "deptName", title: "部门" },
|
||||||
{ dataIndex: "avatar", key: "avatar", title: "头像", avatar: avatarFormat },
|
{ dataIndex: "avatar", key: "avatar", title: "头像", avatar: avatarFormat },
|
||||||
{ dataIndex: "nickname", key: "nickname", title: "名称" },
|
{ dataIndex: "nickname", key: "nickname", title: "名称" },
|
||||||
{ dataIndex: "username", key: "username", title: "账号" },
|
{ dataIndex: "username", key: "username", title: "账号" },
|
||||||
{ dataIndex: "gender", key: "gender", title: "性别", conver: converFormat },
|
{ dataIndex: "gender", key: "gender", title: "性别", conver: converFormat,width: 80 },
|
||||||
{ dataIndex: "enable", key: "enable", title: "状态", switch: switchFormat },
|
{ dataIndex: "enable", key: "enable", title: "状态", switch: switchFormat },
|
||||||
{ dataIndex: "email", key: "email", title: "邮箱" },
|
{ dataIndex: "email", key: "email", title: "邮箱" },
|
||||||
{ dataIndex: "phone", key: "phone", title: "电话" },
|
{ dataIndex: "phone", key: "phone", title: "电话" },
|
||||||
|
|
@ -152,7 +153,7 @@ export default {
|
||||||
];
|
];
|
||||||
|
|
||||||
/// 分页参数
|
/// 分页参数
|
||||||
const pagination = { pageNum: 1, pageSize: 10 }
|
const pagination = { pageNum: 1, pageSize: 20 }
|
||||||
|
|
||||||
/// 外置参数
|
/// 外置参数
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,7 @@ export default defineComponent({
|
||||||
};
|
};
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
|
{ dataIndex: "index", key: "index", title: "序号", width: 60, fixed: 'left', align: 'center' },
|
||||||
{ dataIndex: "name", key: "name", title: "名称" },
|
{ dataIndex: "name", key: "name", title: "名称" },
|
||||||
{ dataIndex: "remark", key: "remark", title: "描述" }
|
{ dataIndex: "remark", key: "remark", title: "描述" }
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,14 @@
|
||||||
|
|
||||||
/// 列配置
|
/// 列配置
|
||||||
const columns = [{
|
const columns = [{
|
||||||
|
dataIndex: "index",
|
||||||
|
key: "index",
|
||||||
|
title: "序号",
|
||||||
|
width: 60,
|
||||||
|
fixed: 'left',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
dataIndex: "customerCode",
|
dataIndex: "customerCode",
|
||||||
key: "customerCode",
|
key: "customerCode",
|
||||||
title: "编号",
|
title: "编号",
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,14 @@
|
||||||
|
|
||||||
/// 列配置
|
/// 列配置
|
||||||
const columns = [{
|
const columns = [{
|
||||||
|
dataIndex: "index",
|
||||||
|
key: "index",
|
||||||
|
title: "序号",
|
||||||
|
width: 60,
|
||||||
|
fixed: 'left',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
dataIndex: "deliver",
|
dataIndex: "deliver",
|
||||||
key: "deliver",
|
key: "deliver",
|
||||||
title: "搬运类型",
|
title: "搬运类型",
|
||||||
|
|
@ -247,6 +255,7 @@
|
||||||
const toolbar = [{
|
const toolbar = [{
|
||||||
label: "新增",
|
label: "新增",
|
||||||
code: 'wms:deliverType:add',
|
code: 'wms:deliverType:add',
|
||||||
|
icon: 'PlusOutlined',
|
||||||
event: function() {
|
event: function() {
|
||||||
state.visibleSave = true
|
state.visibleSave = true
|
||||||
}
|
}
|
||||||
|
|
@ -254,6 +263,8 @@
|
||||||
{
|
{
|
||||||
label: "删除",
|
label: "删除",
|
||||||
code: 'wms:deliverType:remove',
|
code: 'wms:deliverType:remove',
|
||||||
|
icon: 'DeleteOutlined',
|
||||||
|
danger: true,
|
||||||
event: function() {
|
event: function() {
|
||||||
removeBatchMethod(state.selectedRowKeys)
|
removeBatchMethod(state.selectedRowKeys)
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
<template #search>
|
<template #search>
|
||||||
<pro-query :searchParam="searchParam" @on-search="search"></pro-query>
|
<pro-query :searchParam="searchParam" @on-search="search"></pro-query>
|
||||||
</template>
|
</template>
|
||||||
<pro-table style="margin-top: 10px" rowKey="id" ref="tableRef" :fetch="fetch" :columns="columns" :toolbar="toolbar"
|
<pro-table rowKey="id" ref="tableRef" :fetch="fetch" :columns="columns" :toolbar="toolbar"
|
||||||
:operate="operate" :param="state.param" :pagination="pagination"
|
:operate="operate" :param="state.param" :pagination="pagination"
|
||||||
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
|
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
|
||||||
</pro-table>
|
</pro-table>
|
||||||
|
|
@ -43,10 +43,18 @@ export default {
|
||||||
const tableRef = ref()
|
const tableRef = ref()
|
||||||
|
|
||||||
const columns = [{
|
const columns = [{
|
||||||
|
dataIndex: "index",
|
||||||
|
key: "index",
|
||||||
|
title: "序号",
|
||||||
|
width: 60,
|
||||||
|
fixed: 'left',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
dataIndex: "requestCode",
|
dataIndex: "requestCode",
|
||||||
key: "requestCode",
|
key: "requestCode",
|
||||||
title: "请求编号",
|
title: "请求编号",
|
||||||
width: 150,
|
width: 200,
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -64,7 +72,7 @@ export default {
|
||||||
dataIndex: "paramType",
|
dataIndex: "paramType",
|
||||||
key: "paramType",
|
key: "paramType",
|
||||||
title: "请求类型",
|
title: "请求类型",
|
||||||
width: 100,
|
width: 150,
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -306,6 +314,7 @@ export default {
|
||||||
const toolbar = [{
|
const toolbar = [{
|
||||||
label: "删除",
|
label: "删除",
|
||||||
code: 'wms:request:delete',
|
code: 'wms:request:delete',
|
||||||
|
icon: 'DeleteOutlined',
|
||||||
event: function () {
|
event: function () {
|
||||||
removeBatchMethod(state.selectedRowKeys)
|
removeBatchMethod(state.selectedRowKeys)
|
||||||
},
|
},
|
||||||
|
|
@ -316,6 +325,7 @@ export default {
|
||||||
const operate = [{
|
const operate = [{
|
||||||
label: "删除",
|
label: "删除",
|
||||||
code: 'wms:request:delete',
|
code: 'wms:request:delete',
|
||||||
|
isDel: true,
|
||||||
event: function (record) {
|
event: function (record) {
|
||||||
removeMethod(record)
|
removeMethod(record)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -67,11 +67,20 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const columns = [{
|
const columns = [
|
||||||
|
{
|
||||||
|
dataIndex: "index",
|
||||||
|
key: "index",
|
||||||
|
title: "序号",
|
||||||
|
width: 60,
|
||||||
|
fixed: 'left',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
dataIndex: "skuCode",
|
dataIndex: "skuCode",
|
||||||
key: "skuCode",
|
key: "skuCode",
|
||||||
title: "物料编号",
|
title: "物料编号",
|
||||||
width: 120,
|
width: 150,
|
||||||
// defaultSortOrder: 'ascend',
|
// defaultSortOrder: 'ascend',
|
||||||
// sorter: true,
|
// sorter: true,
|
||||||
showSearch: true
|
showSearch: true
|
||||||
|
|
@ -80,7 +89,7 @@
|
||||||
dataIndex: "skuName",
|
dataIndex: "skuName",
|
||||||
key: "skuName",
|
key: "skuName",
|
||||||
title: "物料名称",
|
title: "物料名称",
|
||||||
width: 140,
|
width: 180,
|
||||||
showSearch: true
|
showSearch: true
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
|
|
@ -130,21 +139,21 @@
|
||||||
dataIndex: "categoryCode",
|
dataIndex: "categoryCode",
|
||||||
key: "categoryCode",
|
key: "categoryCode",
|
||||||
title: "种类编号",
|
title: "种类编号",
|
||||||
width: 100,
|
width: 120,
|
||||||
showSearch: true
|
showSearch: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: "categoryName",
|
dataIndex: "categoryName",
|
||||||
key: "categoryName",
|
key: "categoryName",
|
||||||
title: "种类名称",
|
title: "种类名称",
|
||||||
width: 100,
|
width: 120,
|
||||||
showSearch: true
|
showSearch: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: "baseUnit",
|
dataIndex: "baseUnit",
|
||||||
key: "baseUnit",
|
key: "baseUnit",
|
||||||
title: "库存单位",
|
title: "库存单位",
|
||||||
width: 100,
|
width: 120,
|
||||||
showSearch: true
|
showSearch: true
|
||||||
},
|
},
|
||||||
/* {
|
/* {
|
||||||
|
|
@ -177,6 +186,7 @@
|
||||||
title: "满盘数量",
|
title: "满盘数量",
|
||||||
type: "number",
|
type: "number",
|
||||||
width: 120,
|
width: 120,
|
||||||
|
align: "right",
|
||||||
showSearch: true
|
showSearch: true
|
||||||
// defaultSortOrder: 'ascend',
|
// defaultSortOrder: 'ascend',
|
||||||
// sorter: (a, b) => a.fullQty - b.fullQty,
|
// sorter: (a, b) => a.fullQty - b.fullQty,
|
||||||
|
|
@ -301,9 +311,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 工具栏
|
/// 工具栏
|
||||||
const toolbar = [{
|
const toolbar = [
|
||||||
|
{
|
||||||
label: "新增",
|
label: "新增",
|
||||||
code: 'wms:sku:add',
|
code: 'wms:sku:add',
|
||||||
|
icon: 'PlusOutlined',
|
||||||
event: function() {
|
event: function() {
|
||||||
state.visibleSave = true
|
state.visibleSave = true
|
||||||
}
|
}
|
||||||
|
|
@ -311,10 +323,11 @@
|
||||||
{
|
{
|
||||||
label: "删除",
|
label: "删除",
|
||||||
code: 'wms:sku:remove',
|
code: 'wms:sku:remove',
|
||||||
|
icon: 'DeleteOutlined',
|
||||||
|
danger: true,
|
||||||
event: function() {
|
event: function() {
|
||||||
removeBatchMethod(state.selectedRowKeys)
|
removeBatchMethod(state.selectedRowKeys)
|
||||||
},
|
}
|
||||||
type: 'danger'
|
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,16 @@ export default {
|
||||||
const tableRef = ref();
|
const tableRef = ref();
|
||||||
|
|
||||||
/// 列配置
|
/// 列配置
|
||||||
const columns = [{
|
const columns = [
|
||||||
|
{
|
||||||
|
dataIndex: "index",
|
||||||
|
key: "index",
|
||||||
|
title: "序号",
|
||||||
|
width: 60,
|
||||||
|
fixed: 'left',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
dataIndex: "categoryCode",
|
dataIndex: "categoryCode",
|
||||||
key: "categoryCode",
|
key: "categoryCode",
|
||||||
title: "种类编号",
|
title: "种类编号",
|
||||||
|
|
@ -69,7 +78,7 @@ export default {
|
||||||
dataIndex: "categoryDesc",
|
dataIndex: "categoryDesc",
|
||||||
key: "categoryDesc",
|
key: "categoryDesc",
|
||||||
title: "种类描述",
|
title: "种类描述",
|
||||||
width: 100,
|
width: 120,
|
||||||
showSearch: true
|
showSearch: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -211,6 +220,7 @@ export default {
|
||||||
const toolbar = [{
|
const toolbar = [{
|
||||||
label: "新增",
|
label: "新增",
|
||||||
code: 'wms:skuCategory:add',
|
code: 'wms:skuCategory:add',
|
||||||
|
icon: 'PlusOutlined',
|
||||||
event: function () {
|
event: function () {
|
||||||
state.visibleSave = true
|
state.visibleSave = true
|
||||||
}
|
}
|
||||||
|
|
@ -218,10 +228,11 @@ export default {
|
||||||
{
|
{
|
||||||
label: "删除",
|
label: "删除",
|
||||||
code: 'wms:skuCategory:remove',
|
code: 'wms:skuCategory:remove',
|
||||||
|
icon: 'DeleteOutlined',
|
||||||
|
danger: true,
|
||||||
event: function () {
|
event: function () {
|
||||||
removeBatchMethod(state.selectedRowKeys)
|
removeBatchMethod(state.selectedRowKeys)
|
||||||
},
|
},
|
||||||
type: 'danger'
|
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
@ -238,6 +249,7 @@ export default {
|
||||||
{
|
{
|
||||||
label: "删除",
|
label: "删除",
|
||||||
code: 'wms:skuCategory:delete',
|
code: 'wms:skuCategory:delete',
|
||||||
|
isDel: true,
|
||||||
event: function (record) {
|
event: function (record) {
|
||||||
removeMethod(record)
|
removeMethod(record)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
</a-card>
|
</a-card>
|
||||||
<a-card>
|
<a-card>
|
||||||
<!-- <pro-query :searchParam="searchParam" @on-search="search"></pro-query> -->
|
<!-- <pro-query :searchParam="searchParam" @on-search="search"></pro-query> -->
|
||||||
<pro-table style="margin-top: 10px" visible="visible" ref="tableRef" rowKey="id" :fetch="fetch"
|
<pro-table visible="visible" ref="tableRef" rowKey="id" :fetch="fetch"
|
||||||
:columns="columns" :operate="operate" :toolbar="toolbar" :param="state.param" :pagination="pagination"
|
:columns="columns" :operate="operate" :toolbar="toolbar" :param="state.param" :pagination="pagination"
|
||||||
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
|
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
|
||||||
|
|
||||||
|
|
@ -153,6 +153,14 @@
|
||||||
|
|
||||||
|
|
||||||
const columns = [{
|
const columns = [{
|
||||||
|
dataIndex: "index",
|
||||||
|
key: "index",
|
||||||
|
title: "序号",
|
||||||
|
width: 60,
|
||||||
|
fixed: 'left',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
dataIndex: "skuCode",
|
dataIndex: "skuCode",
|
||||||
key: "skuCode",
|
key: "skuCode",
|
||||||
title: "物料编号",
|
title: "物料编号",
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
<a-col :span="24">
|
<a-col :span="24">
|
||||||
<a-card>
|
<a-card>
|
||||||
<pro-query :searchParam="searchParam" @on-search="search"></pro-query>
|
<pro-query :searchParam="searchParam" @on-search="search"></pro-query>
|
||||||
<pro-table style="margin-top: 10px" visible="visible" ref="tableRef" rowKey="id" :fetch="fetch"
|
<pro-table visible="visible" ref="tableRef" rowKey="id" :fetch="fetch"
|
||||||
:columns="columns" :toolbar="toolbar" :param="state.param" :pagination="pagination"
|
:columns="columns" :toolbar="toolbar" :param="state.param" :pagination="pagination"
|
||||||
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
|
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
|
||||||
</pro-table>
|
</pro-table>
|
||||||
|
|
@ -76,6 +76,14 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
const columns = [{
|
const columns = [{
|
||||||
|
dataIndex: "index",
|
||||||
|
key: "index",
|
||||||
|
title: "序号",
|
||||||
|
width: 60,
|
||||||
|
fixed: 'left',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
dataIndex: "palletCode",
|
dataIndex: "palletCode",
|
||||||
key: "palletCode",
|
key: "palletCode",
|
||||||
title: "托盘号",
|
title: "托盘号",
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
<a-col :span="24">
|
<a-col :span="24">
|
||||||
<a-card>
|
<a-card>
|
||||||
<pro-query :searchParam="searchParam" @on-search="search"></pro-query>
|
<pro-query :searchParam="searchParam" @on-search="search"></pro-query>
|
||||||
<pro-table style="margin-top: 10px" visible="visible" ref="tableRef" rowKey="id" :fetch="fetch"
|
<pro-table visible="visible" ref="tableRef" rowKey="id" :fetch="fetch"
|
||||||
:columns="columns" :toolbar="toolbar" :operate="operate" :param="state.param" :pagination="pagination"
|
:columns="columns" :toolbar="toolbar" :operate="operate" :param="state.param" :pagination="pagination"
|
||||||
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
|
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
|
||||||
</pro-table>
|
</pro-table>
|
||||||
|
|
@ -90,6 +90,14 @@
|
||||||
|
|
||||||
|
|
||||||
const columns = [{
|
const columns = [{
|
||||||
|
dataIndex: "index",
|
||||||
|
key: "index",
|
||||||
|
title: "序号",
|
||||||
|
width: 60,
|
||||||
|
fixed: 'left',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
dataIndex: "invoiceCode",
|
dataIndex: "invoiceCode",
|
||||||
key: "invoiceCode",
|
key: "invoiceCode",
|
||||||
title: "盘点单据号",
|
title: "盘点单据号",
|
||||||
|
|
|
||||||
|
|
@ -59,6 +59,14 @@
|
||||||
const tableRef = ref()
|
const tableRef = ref()
|
||||||
|
|
||||||
const columns = [{
|
const columns = [{
|
||||||
|
dataIndex: "index",
|
||||||
|
key: "index",
|
||||||
|
title: "序号",
|
||||||
|
width: 60,
|
||||||
|
fixed: 'left',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
dataIndex: "invoiceCode",
|
dataIndex: "invoiceCode",
|
||||||
key: "invoiceCode",
|
key: "invoiceCode",
|
||||||
title: "单据号",
|
title: "单据号",
|
||||||
|
|
|
||||||
|
|
@ -113,6 +113,14 @@
|
||||||
|
|
||||||
|
|
||||||
const columns = [{
|
const columns = [{
|
||||||
|
dataIndex: "index",
|
||||||
|
key: "index",
|
||||||
|
title: "序号",
|
||||||
|
width: 60,
|
||||||
|
fixed: 'left',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
dataIndex: "invoiceCode",
|
dataIndex: "invoiceCode",
|
||||||
key: "invoiceCode",
|
key: "invoiceCode",
|
||||||
title: "单据号",
|
title: "单据号",
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@
|
||||||
</a-card>
|
</a-card>
|
||||||
<a-card>
|
<a-card>
|
||||||
<!-- <pro-query :searchParam="searchParam" @on-search="search"></pro-query> -->
|
<!-- <pro-query :searchParam="searchParam" @on-search="search"></pro-query> -->
|
||||||
<pro-table style="margin-top: 10px" visible="visible" ref="tableRef" rowKey="id" :fetch="fetch"
|
<pro-table visible="visible" ref="tableRef" rowKey="id" :fetch="fetch"
|
||||||
:columns="columns" :operate="operate" :toolbar="toolbar" :param="state.param" :pagination="pagination"
|
:columns="columns" :operate="operate" :toolbar="toolbar" :param="state.param" :pagination="pagination"
|
||||||
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
|
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
|
||||||
<template v-for="col in ['planQty', 'batch', 'master','customer', 'producer', 'qualityStatus']"
|
<template v-for="col in ['planQty', 'batch', 'master','customer', 'producer', 'qualityStatus']"
|
||||||
|
|
@ -270,6 +270,14 @@
|
||||||
})
|
})
|
||||||
|
|
||||||
const columns = [{
|
const columns = [{
|
||||||
|
dataIndex: "index",
|
||||||
|
key: "index",
|
||||||
|
title: "序号",
|
||||||
|
width: 60,
|
||||||
|
fixed: 'left',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
dataIndex: "skuCode",
|
dataIndex: "skuCode",
|
||||||
key: "skuCode",
|
key: "skuCode",
|
||||||
type: "select",
|
type: "select",
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
<a-col :span="24">
|
<a-col :span="24">
|
||||||
<a-card>
|
<a-card>
|
||||||
<pro-query :searchParam="searchParam" @on-search="search"></pro-query>
|
<pro-query :searchParam="searchParam" @on-search="search"></pro-query>
|
||||||
<pro-table style="margin-top: 10px" visible="visible" ref="tableRef" rowKey="id" :fetch="fetch"
|
<pro-table visible="visible" ref="tableRef" rowKey="id" :fetch="fetch"
|
||||||
:columns="columns" :toolbar="toolbar" :param="state.param" :pagination="pagination"
|
:columns="columns" :toolbar="toolbar" :param="state.param" :pagination="pagination"
|
||||||
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
|
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
|
||||||
</pro-table>
|
</pro-table>
|
||||||
|
|
@ -73,6 +73,14 @@
|
||||||
watch(props, (props) => {});
|
watch(props, (props) => {});
|
||||||
|
|
||||||
const columns = [{
|
const columns = [{
|
||||||
|
dataIndex: "index",
|
||||||
|
key: "index",
|
||||||
|
title: "序号",
|
||||||
|
width: 60,
|
||||||
|
fixed: 'left',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
dataIndex: "skuCode",
|
dataIndex: "skuCode",
|
||||||
key: "skuCode",
|
key: "skuCode",
|
||||||
title: "物料编号",
|
title: "物料编号",
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,14 @@
|
||||||
const tableRef = ref()
|
const tableRef = ref()
|
||||||
|
|
||||||
const columns = [{
|
const columns = [{
|
||||||
|
dataIndex: "index",
|
||||||
|
key: "index",
|
||||||
|
title: "序号",
|
||||||
|
width: 60,
|
||||||
|
fixed: 'left',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
dataIndex: "invoiceCode",
|
dataIndex: "invoiceCode",
|
||||||
key: "invoiceCode",
|
key: "invoiceCode",
|
||||||
title: "单据号",
|
title: "单据号",
|
||||||
|
|
|
||||||
|
|
@ -72,6 +72,14 @@
|
||||||
})
|
})
|
||||||
|
|
||||||
const columns = [{
|
const columns = [{
|
||||||
|
dataIndex: "index",
|
||||||
|
key: "index",
|
||||||
|
title: "序号",
|
||||||
|
width: 60,
|
||||||
|
fixed: 'left',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
dataIndex: "invoiceCode",
|
dataIndex: "invoiceCode",
|
||||||
key: "invoiceCode",
|
key: "invoiceCode",
|
||||||
title: "单据号",
|
title: "单据号",
|
||||||
|
|
|
||||||
|
|
@ -74,7 +74,7 @@
|
||||||
</a-card>
|
</a-card>
|
||||||
<a-card>
|
<a-card>
|
||||||
<!-- <pro-query :searchParam="searchParam" @on-search="search"></pro-query> -->
|
<!-- <pro-query :searchParam="searchParam" @on-search="search"></pro-query> -->
|
||||||
<pro-table style="margin-top: 10px" visible="visible" ref="tableRef" rowKey="id" :fetch="fetch"
|
<pro-table visible="visible" ref="tableRef" rowKey="id" :fetch="fetch"
|
||||||
:columns="columns" :operate="operate" :toolbar="toolbar" :param="state.param" :pagination="pagination"
|
:columns="columns" :operate="operate" :toolbar="toolbar" :param="state.param" :pagination="pagination"
|
||||||
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
|
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
|
||||||
<template v-for="col in ['planQty', 'batch', 'master','customer', 'producer', 'qualityStatus']"
|
<template v-for="col in ['planQty', 'batch', 'master','customer', 'producer', 'qualityStatus']"
|
||||||
|
|
@ -283,6 +283,14 @@
|
||||||
})
|
})
|
||||||
|
|
||||||
const columns = [{
|
const columns = [{
|
||||||
|
dataIndex: "index",
|
||||||
|
key: "index",
|
||||||
|
title: "序号",
|
||||||
|
width: 60,
|
||||||
|
fixed: 'left',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
dataIndex: "skuCode",
|
dataIndex: "skuCode",
|
||||||
key: "skuCode",
|
key: "skuCode",
|
||||||
type: "select",
|
type: "select",
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
<a-col :span="24">
|
<a-col :span="24">
|
||||||
<a-card>
|
<a-card>
|
||||||
<pro-query :searchParam="searchParam" @on-search="search"></pro-query>
|
<pro-query :searchParam="searchParam" @on-search="search"></pro-query>
|
||||||
<pro-table style="margin-top: 10px" visible="visible" ref="tableRef" rowKey="id" :fetch="fetch"
|
<pro-table visible="visible" ref="tableRef" rowKey="id" :fetch="fetch"
|
||||||
:columns="columns" :toolbar="toolbar" :param="state.param" :pagination="pagination"
|
:columns="columns" :toolbar="toolbar" :param="state.param" :pagination="pagination"
|
||||||
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
|
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
|
||||||
</pro-table>
|
</pro-table>
|
||||||
|
|
@ -72,6 +72,14 @@
|
||||||
watch(props, (props) => {});
|
watch(props, (props) => {});
|
||||||
|
|
||||||
const columns = [{
|
const columns = [{
|
||||||
|
dataIndex: "index",
|
||||||
|
key: "index",
|
||||||
|
title: "序号",
|
||||||
|
width: 60,
|
||||||
|
fixed: 'left',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
dataIndex: "skuCode",
|
dataIndex: "skuCode",
|
||||||
key: "skuCode",
|
key: "skuCode",
|
||||||
title: "物料编号",
|
title: "物料编号",
|
||||||
|
|
|
||||||
|
|
@ -67,6 +67,14 @@
|
||||||
const tableRef = ref()
|
const tableRef = ref()
|
||||||
|
|
||||||
const columns = [{
|
const columns = [{
|
||||||
|
dataIndex: "index",
|
||||||
|
key: "index",
|
||||||
|
title: "序号",
|
||||||
|
width: 60,
|
||||||
|
fixed: 'left',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
dataIndex: "invoiceCode",
|
dataIndex: "invoiceCode",
|
||||||
key: "invoiceCode",
|
key: "invoiceCode",
|
||||||
title: "单据号",
|
title: "单据号",
|
||||||
|
|
|
||||||
|
|
@ -82,6 +82,14 @@
|
||||||
const cancel = (e) => {};
|
const cancel = (e) => {};
|
||||||
|
|
||||||
const columns = [{
|
const columns = [{
|
||||||
|
dataIndex: "index",
|
||||||
|
key: "index",
|
||||||
|
title: "序号",
|
||||||
|
width: 60,
|
||||||
|
fixed: 'left',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
dataIndex: "invoiceCode",
|
dataIndex: "invoiceCode",
|
||||||
key: "invoiceCode",
|
key: "invoiceCode",
|
||||||
title: "单据号",
|
title: "单据号",
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
<a-col :span="24">
|
<a-col :span="24">
|
||||||
<a-card>
|
<a-card>
|
||||||
<pro-query :searchParam="searchParam" @on-search="search"></pro-query>
|
<pro-query :searchParam="searchParam" @on-search="search"></pro-query>
|
||||||
<pro-table style="margin-top: 10px" visible="visible" ref="tableRef" rowKey="id" :fetch="fetch"
|
<pro-table visible="visible" ref="tableRef" rowKey="id" :fetch="fetch"
|
||||||
:columns="columns" :toolbar="toolbar" :operate="operate" :param="state.param" :pagination="pagination"
|
:columns="columns" :toolbar="toolbar" :operate="operate" :param="state.param" :pagination="pagination"
|
||||||
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
|
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
|
||||||
</pro-table>
|
</pro-table>
|
||||||
|
|
@ -90,6 +90,14 @@
|
||||||
|
|
||||||
|
|
||||||
const columns = [{
|
const columns = [{
|
||||||
|
dataIndex: "index",
|
||||||
|
key: "index",
|
||||||
|
title: "序号",
|
||||||
|
width: 60,
|
||||||
|
fixed: 'left',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
dataIndex: "itemCode",
|
dataIndex: "itemCode",
|
||||||
key: "itemCode",
|
key: "itemCode",
|
||||||
title: "明细号",
|
title: "明细号",
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@
|
||||||
</div>
|
</div>
|
||||||
<a-row :gutter="[0, 0]">
|
<a-row :gutter="[0, 0]">
|
||||||
<a-col style="width: 100%;">
|
<a-col style="width: 100%;">
|
||||||
<pro-table style="margin-top: 10px" ref="tableChilrenRef" rowKey="id" :fetch="fetch" :columns="columns"
|
<pro-table ref="tableChilrenRef" rowKey="id" :fetch="fetch" :columns="columns"
|
||||||
:operate="operate" :param="state.param" :pagination="pagination">
|
:operate="operate" :param="state.param" :pagination="pagination">
|
||||||
</pro-table>
|
</pro-table>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
|
@ -112,6 +112,14 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
const columns = [{
|
const columns = [{
|
||||||
|
dataIndex: "index",
|
||||||
|
key: "index",
|
||||||
|
title: "序号",
|
||||||
|
width: 60,
|
||||||
|
fixed: 'left',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
dataIndex: "palletCode",
|
dataIndex: "palletCode",
|
||||||
key: "palletCode",
|
key: "palletCode",
|
||||||
title: "托盘号",
|
title: "托盘号",
|
||||||
|
|
|
||||||
|
|
@ -59,6 +59,14 @@
|
||||||
/// 列配置
|
/// 列配置
|
||||||
const columns = ref(
|
const columns = ref(
|
||||||
[{
|
[{
|
||||||
|
dataIndex: "index",
|
||||||
|
key: "index",
|
||||||
|
title: "序号",
|
||||||
|
width: 60,
|
||||||
|
fixed: 'left',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
dataIndex: "houseCode",
|
dataIndex: "houseCode",
|
||||||
key: "houseCode",
|
key: "houseCode",
|
||||||
title: "仓库号",
|
title: "仓库号",
|
||||||
|
|
@ -98,7 +106,7 @@
|
||||||
dataIndex: "ext1",
|
dataIndex: "ext1",
|
||||||
key: "ext1",
|
key: "ext1",
|
||||||
title: "MES要货令",
|
title: "MES要货令",
|
||||||
width: 120,
|
width: 170,
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
ellipsis: true
|
ellipsis: true
|
||||||
|
|
@ -107,7 +115,7 @@
|
||||||
dataIndex: "ext2",
|
dataIndex: "ext2",
|
||||||
key: "ext2",
|
key: "ext2",
|
||||||
title: "AGV任务编号",
|
title: "AGV任务编号",
|
||||||
width: 120,
|
width: 170,
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
@ -217,14 +225,14 @@
|
||||||
dataIndex: "targetLocParent",
|
dataIndex: "targetLocParent",
|
||||||
key: "targetLocParent",
|
key: "targetLocParent",
|
||||||
title: "目标位置父节点",
|
title: "目标位置父节点",
|
||||||
width: 150,
|
width: 180,
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: "targetLocWcs",
|
dataIndex: "targetLocWcs",
|
||||||
key: "targetLocWcs",
|
key: "targetLocWcs",
|
||||||
title: "WCS目标地址",
|
title: "WCS目标地址",
|
||||||
width: 150,
|
width: 170,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: "invoiceCode",
|
dataIndex: "invoiceCode",
|
||||||
|
|
@ -515,6 +523,7 @@
|
||||||
const toolbar = [{
|
const toolbar = [{
|
||||||
label: "新增",
|
label: "新增",
|
||||||
code: "wms:task:add",
|
code: "wms:task:add",
|
||||||
|
icon: 'PlusOutlined',
|
||||||
event: function() {
|
event: function() {
|
||||||
state.visibleSave = true
|
state.visibleSave = true
|
||||||
}
|
}
|
||||||
|
|
@ -530,6 +539,7 @@
|
||||||
{
|
{
|
||||||
label: "下发",
|
label: "下发",
|
||||||
code: "wms:task:taskSend",
|
code: "wms:task:taskSend",
|
||||||
|
icon: 'SendOutlined',
|
||||||
event: function() {
|
event: function() {
|
||||||
taskSendMethod(state.selectedRowKeys[0])
|
taskSendMethod(state.selectedRowKeys[0])
|
||||||
}
|
}
|
||||||
|
|
@ -537,6 +547,7 @@
|
||||||
{
|
{
|
||||||
label: "完成",
|
label: "完成",
|
||||||
code: "wms:task:taskOver",
|
code: "wms:task:taskOver",
|
||||||
|
icon: 'CheckOutlined',
|
||||||
event: function() {
|
event: function() {
|
||||||
taskOverMethod(state.selectedRowKeys[0])
|
taskOverMethod(state.selectedRowKeys[0])
|
||||||
}
|
}
|
||||||
|
|
@ -544,6 +555,8 @@
|
||||||
{
|
{
|
||||||
label: "取消",
|
label: "取消",
|
||||||
code: "wms:task:taskCancel",
|
code: "wms:task:taskCancel",
|
||||||
|
icon: 'StopOutlined',
|
||||||
|
danger: true,
|
||||||
event: function() {
|
event: function() {
|
||||||
taskCancelMethod(state.selectedRowKeys[0])
|
taskCancelMethod(state.selectedRowKeys[0])
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -57,6 +57,14 @@
|
||||||
/// 列配置
|
/// 列配置
|
||||||
const columns = ref(
|
const columns = ref(
|
||||||
[{
|
[{
|
||||||
|
dataIndex: "index",
|
||||||
|
key: "index",
|
||||||
|
title: "序号",
|
||||||
|
width: 60,
|
||||||
|
fixed: 'left',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
dataIndex: "houseCode",
|
dataIndex: "houseCode",
|
||||||
key: "houseCode",
|
key: "houseCode",
|
||||||
title: "仓库号",
|
title: "仓库号",
|
||||||
|
|
|
||||||
|
|
@ -15,23 +15,23 @@
|
||||||
<a-col :span="24" style="height: 100%;">
|
<a-col :span="24" style="height: 100%;">
|
||||||
<a-card style="width: 100%;">
|
<a-card style="width: 100%;">
|
||||||
<!-- 托盘库存视图记录列表 -->
|
<!-- 托盘库存视图记录列表 -->
|
||||||
<!-- <pro-table style="margin-top: 10px" rowKey="id" ref="tableRef" :fetch="fetch" :columns="pageParam.columns"
|
<!-- <pro-table rowKey="id" ref="tableRef" :fetch="fetch" :columns="pageParam.columns"
|
||||||
:toolbar="toolbar" :operate="operate" :param="state.param" :pagination="pagination"
|
:toolbar="toolbar" :operate="operate" :param="state.param" :pagination="pagination"
|
||||||
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
|
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
|
||||||
</pro-table> -->
|
</pro-table> -->
|
||||||
<a-table :columns="pageParam.columns" :data-source="datas" :pagination="pagination"
|
<a-table :columns="pageParam.columns" :data-source="datas" :pagination="pagination"
|
||||||
style="margin-top: 10px" />
|
/>
|
||||||
|
|
||||||
</a-card>
|
</a-card>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="24" style="height: 100%;">
|
<a-col :span="24" style="height: 100%;">
|
||||||
<a-card style="width: 100%;">
|
<a-card style="width: 100%;">
|
||||||
<!-- 托盘库存视图记录列表 -->
|
<!-- 托盘库存视图记录列表 -->
|
||||||
<!-- <pro-table style="margin-top: 10px" rowKey="id" ref="tableRef" :fetch="fetch" :columns="pageParam.columns"
|
<!-- <pro-table rowKey="id" ref="tableRef" :fetch="fetch" :columns="pageParam.columns"
|
||||||
:toolbar="toolbar" :operate="operate" :param="state.param" :pagination="pagination"
|
:toolbar="toolbar" :operate="operate" :param="state.param" :pagination="pagination"
|
||||||
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
|
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
|
||||||
</pro-table> -->
|
</pro-table> -->
|
||||||
<!-- <a-table :columns="pageParam.columns" :data-source="datas" style="margin-top: 10px" /> -->
|
<!-- <a-table :columns="pageParam.columns" :data-source="datas" /> -->
|
||||||
|
|
||||||
</a-card>
|
</a-card>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
|
|
||||||
|
|
@ -15,22 +15,22 @@
|
||||||
<a-col :span="24" style="height: 100%;">
|
<a-col :span="24" style="height: 100%;">
|
||||||
<a-card style="width: 100%;">
|
<a-card style="width: 100%;">
|
||||||
<!-- 托盘库存视图记录列表 -->
|
<!-- 托盘库存视图记录列表 -->
|
||||||
<pro-table style="margin-top: 10px" rowKey="id" ref="tableRef" :fetch="fetch" :columns="pageParam.columns"
|
<pro-table rowKey="id" ref="tableRef" :fetch="fetch" :columns="pageParam.columns"
|
||||||
:toolbar="toolbar" :operate="operate" :param="state.param" :pagination="pagination"
|
:toolbar="toolbar" :operate="operate" :param="state.param" :pagination="pagination"
|
||||||
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
|
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
|
||||||
</pro-table>
|
</pro-table>
|
||||||
<a-table :columns="pageParam.columns" :data-source="datas" style="margin-top: 10px" />
|
<a-table :columns="pageParam.columns" :data-source="datas" />
|
||||||
|
|
||||||
</a-card>
|
</a-card>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="24" style="height: 100%;">
|
<a-col :span="24" style="height: 100%;">
|
||||||
<a-card style="width: 100%;">
|
<a-card style="width: 100%;">
|
||||||
<!-- 托盘库存视图记录列表 -->
|
<!-- 托盘库存视图记录列表 -->
|
||||||
<!-- <pro-table style="margin-top: 10px" rowKey="id" ref="tableRef" :fetch="fetch" :columns="pageParam.columns"
|
<!-- <pro-table rowKey="id" ref="tableRef" :fetch="fetch" :columns="pageParam.columns"
|
||||||
:toolbar="toolbar" :operate="operate" :param="state.param" :pagination="pagination"
|
:toolbar="toolbar" :operate="operate" :param="state.param" :pagination="pagination"
|
||||||
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
|
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
|
||||||
</pro-table> -->
|
</pro-table> -->
|
||||||
<!-- <a-table :columns="pageParam.columns" :data-source="datas" style="margin-top: 10px" /> -->
|
<!-- <a-table :columns="pageParam.columns" :data-source="datas" /> -->
|
||||||
|
|
||||||
</a-card>
|
</a-card>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
<a-card style="width: 100%;">
|
<a-card style="width: 100%;">
|
||||||
<!-- <pro-query :searchParam="searchParam" @on-search="search"></pro-query> -->
|
<!-- <pro-query :searchParam="searchParam" @on-search="search"></pro-query> -->
|
||||||
<!-- 库存统计列表 -->
|
<!-- 库存统计列表 -->
|
||||||
<pro-table style="margin-top: 10px" rowKey="id" ref="tableRef" :fetch="fetch" :columns="columns"
|
<pro-table rowKey="id" ref="tableRef" :fetch="fetch" :columns="columns"
|
||||||
:toolbar="toolbar" :param="state.param" :pagination="pagination">
|
:toolbar="toolbar" :param="state.param" :pagination="pagination">
|
||||||
</pro-table>
|
</pro-table>
|
||||||
</a-card>
|
</a-card>
|
||||||
|
|
@ -40,6 +40,14 @@
|
||||||
const tableRef = ref()
|
const tableRef = ref()
|
||||||
|
|
||||||
const columns = [{
|
const columns = [{
|
||||||
|
dataIndex: "index",
|
||||||
|
key: "index",
|
||||||
|
title: "序号",
|
||||||
|
width: 60,
|
||||||
|
fixed: 'left',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
dataIndex: "sku_code",
|
dataIndex: "sku_code",
|
||||||
key: "sku_code",
|
key: "sku_code",
|
||||||
title: "物料编号",
|
title: "物料编号",
|
||||||
|
|
@ -71,7 +79,7 @@
|
||||||
const pagination = {
|
const pagination = {
|
||||||
params: {
|
params: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 20,
|
||||||
},
|
},
|
||||||
reportCode: "InventoryInfo",
|
reportCode: "InventoryInfo",
|
||||||
// showSizeChanger: true, // 显示可改变每页条数
|
// showSizeChanger: true, // 显示可改变每页条数
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,14 @@
|
||||||
})
|
})
|
||||||
|
|
||||||
const columns = [{
|
const columns = [{
|
||||||
|
dataIndex: "index",
|
||||||
|
key: "index",
|
||||||
|
title: "序号",
|
||||||
|
width: 60,
|
||||||
|
fixed: 'left',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
dataIndex: "palletCode",
|
dataIndex: "palletCode",
|
||||||
key: "palletCode",
|
key: "palletCode",
|
||||||
title: "托盘号",
|
title: "托盘号",
|
||||||
|
|
|
||||||
|
|
@ -1,42 +1,32 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<a-list-layout ref="pageRef">
|
||||||
<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"
|
<pro-table ref="tableRef" :fetch="fetch" :columns="columns" :toolbar="toolbar" :operate="operate"
|
||||||
:toolbar="toolbar" :operate="operate" :param="state.param" :pagination="pagination"
|
:param="state.param" :pagination="pagination" :hasSearch="false"
|
||||||
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
|
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
|
||||||
</pro-table>
|
</pro-table>
|
||||||
</a-card>
|
</a-list-layout>
|
||||||
</a-col>
|
|
||||||
</a-row>
|
|
||||||
</page-layout>
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
message,
|
message,
|
||||||
Modal as modal
|
Modal as modal
|
||||||
} from '@hwork/ant-design-vue';
|
} from '@hwork/ant-design-vue';
|
||||||
import {
|
import {
|
||||||
ExclamationCircleOutlined
|
|
||||||
} from '@ant-design/icons-vue';
|
|
||||||
import {
|
|
||||||
page,
|
page,
|
||||||
remove,
|
remove,
|
||||||
removeBatch
|
removeBatch
|
||||||
} from "@/api/wms/inventoryView";
|
} from "@/api/wms/inventoryView";
|
||||||
import {
|
import {
|
||||||
reactive,
|
reactive,
|
||||||
createVNode,
|
createVNode,
|
||||||
ref,
|
ref,
|
||||||
} from 'vue';
|
} from 'vue';
|
||||||
const removeKey = "remove";
|
const removeKey = "remove";
|
||||||
const removeBatchKey = "removeBatch";
|
const removeBatchKey = "removeBatch";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {},
|
components: {},
|
||||||
|
|
||||||
setup() {
|
setup() {
|
||||||
|
|
@ -44,10 +34,17 @@
|
||||||
const tableRef = ref()
|
const tableRef = ref()
|
||||||
|
|
||||||
const columns = [{
|
const columns = [{
|
||||||
|
dataIndex: "index",
|
||||||
|
key: "index",
|
||||||
|
title: "序号",
|
||||||
|
width: 60,
|
||||||
|
fixed: 'left',
|
||||||
|
align: 'center'
|
||||||
|
}, {
|
||||||
dataIndex: "houseCode",
|
dataIndex: "houseCode",
|
||||||
key: "houseCode",
|
key: "houseCode",
|
||||||
title: "仓库号",
|
title: "仓库号",
|
||||||
width: 90,
|
width: 120,
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
|
|
@ -74,7 +71,7 @@
|
||||||
dataIndex: "skuCode",
|
dataIndex: "skuCode",
|
||||||
key: "skuCode",
|
key: "skuCode",
|
||||||
title: "物料编号",
|
title: "物料编号",
|
||||||
width: 120,
|
width: 150,
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -141,6 +138,7 @@
|
||||||
dataIndex: "skuQty",
|
dataIndex: "skuQty",
|
||||||
key: "skuQty",
|
key: "skuQty",
|
||||||
title: "物料数量",
|
title: "物料数量",
|
||||||
|
align: "right",
|
||||||
width: 120,
|
width: 120,
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
},
|
},
|
||||||
|
|
@ -343,20 +341,22 @@
|
||||||
const toolbar = [{
|
const toolbar = [{
|
||||||
label: "删除",
|
label: "删除",
|
||||||
code: remove,
|
code: remove,
|
||||||
event: function() {
|
event: function () {
|
||||||
removeBatchMethod(state.selectedRowKeys)
|
removeBatchMethod(state.selectedRowKeys)
|
||||||
},
|
},
|
||||||
type: 'danger'
|
type: 'danger'
|
||||||
}, ];
|
},];
|
||||||
|
|
||||||
/// 行操作
|
/// 行操作
|
||||||
const operate = [{
|
const operate = [{
|
||||||
label: "删除",
|
label: "删除",
|
||||||
code: "wms:palletLog:remove",
|
code: "wms:palletLog:remove",
|
||||||
event: function(record) {
|
inventoryViewisDel: true,
|
||||||
|
isDel: true,
|
||||||
|
event: function (record) {
|
||||||
removeMethod(record)
|
removeMethod(record)
|
||||||
}
|
}
|
||||||
}, ];
|
},];
|
||||||
|
|
||||||
const pagination = {
|
const pagination = {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
|
|
@ -372,7 +372,7 @@
|
||||||
param: {},
|
param: {},
|
||||||
});
|
});
|
||||||
|
|
||||||
const search = function(value) {
|
const search = function (value) {
|
||||||
console.log("主表查询" + JSON.stringify(value))
|
console.log("主表查询" + JSON.stringify(value))
|
||||||
console.log(value)
|
console.log(value)
|
||||||
state.param = value
|
state.param = value
|
||||||
|
|
@ -397,6 +397,6 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// }
|
// }
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -1,59 +1,61 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<a-list-layout ref="pageRef">
|
||||||
<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"
|
<pro-table rowKey="id" ref="tableRef" :fetch="fetch" :columns="columns" :toolbar="toolbar" :operate="operate"
|
||||||
:operate="operate" :param="state.param" :pagination="pagination"
|
:param="state.param" :pagination="pagination" :hasSearch="false"
|
||||||
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
|
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
|
||||||
</pro-table>
|
</pro-table>
|
||||||
</a-card>
|
<!-- 托盘明细:改为抽屉承载,统一交互与高度管理 -->
|
||||||
</a-col>
|
<a-drawer
|
||||||
<a-col :span="24" style="height: 70%;">
|
:visible="state.visiblePalletDetail"
|
||||||
<a-card style="width: 100%;">
|
:width="720"
|
||||||
<viewPalletDetail :visible="state.visiblePalletDetail" :record="state.recordPalletDetail"
|
title="托盘明细"
|
||||||
:projectReload="projectReload">
|
destroyOnClose
|
||||||
</viewPalletDetail>
|
@close="state.visiblePalletDetail = false"
|
||||||
</a-card>
|
>
|
||||||
</a-col>
|
<viewPalletDetail
|
||||||
</a-row>
|
:visible="true"
|
||||||
</page-layout>
|
:record="state.recordPalletDetail"
|
||||||
|
:projectReload="projectReload"
|
||||||
|
@close="state.visiblePalletDetail = false"
|
||||||
|
/>
|
||||||
|
</a-drawer>
|
||||||
|
|
||||||
|
|
||||||
|
</a-list-layout>
|
||||||
<save :visible="state.visibleSave" @close="closeSave"></save>
|
<save :visible="state.visibleSave" @close="closeSave"></save>
|
||||||
<checkOut :visible="state.visibleCheck" :palletInfo="state.checkOutPalletInfo" @close="closeCheck"></checkOut>
|
<checkOut :visible="state.visibleCheck" :palletInfo="state.checkOutPalletInfo" @close="closeCheck"></checkOut>
|
||||||
<edit :visible="state.visibleEdit" @close="closeEdit" :record="state.recordEdit"></edit>
|
<edit :visible="state.visibleEdit" @close="closeEdit" :record="state.recordEdit"></edit>
|
||||||
<child @fatherMethod="fatherMethod"></child>
|
<child @fatherMethod="fatherMethod"></child>
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import save from './modal/save.vue';
|
import save from './modal/save.vue';
|
||||||
import edit from './modal/edit.vue';
|
import edit from './modal/edit.vue';
|
||||||
import checkOut from './modal/checkOut.vue';
|
import checkOut from './modal/checkOut.vue';
|
||||||
import palletDetail from './modal/palletDetail.vue';
|
import palletDetail from './modal/palletDetail.vue';
|
||||||
import {
|
import {
|
||||||
message,
|
message,
|
||||||
Modal as modal
|
Modal as modal
|
||||||
} from '@hwork/ant-design-vue';
|
} from '@hwork/ant-design-vue';
|
||||||
import {
|
import {
|
||||||
ExclamationCircleOutlined
|
ExclamationCircleOutlined
|
||||||
} from '@ant-design/icons-vue';
|
} from '@ant-design/icons-vue';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
page,
|
page,
|
||||||
remove,
|
remove,
|
||||||
removeBatch
|
removeBatch
|
||||||
} from "@/api/wms/pallet";
|
} from "@/api/wms/pallet";
|
||||||
import {
|
import {
|
||||||
reactive,
|
reactive,
|
||||||
createVNode,
|
createVNode,
|
||||||
ref,
|
ref,
|
||||||
} from 'vue';
|
} from 'vue';
|
||||||
const removeKey = "remove";
|
const removeKey = "remove";
|
||||||
const removeBatchKey = "removeBatch";
|
const removeBatchKey = "removeBatch";
|
||||||
const showCheckOutModelKey = "showCheckOutModel";
|
const showCheckOutModelKey = "showCheckOutModel";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
save,
|
save,
|
||||||
edit,
|
edit,
|
||||||
|
|
@ -68,13 +70,21 @@
|
||||||
const switchFormat = {
|
const switchFormat = {
|
||||||
yes: true,
|
yes: true,
|
||||||
no: false,
|
no: false,
|
||||||
event: function(value, record) {
|
event: function (value, record) {
|
||||||
record.enable = !record.enable;
|
record.enable = !record.enable;
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const columns = [{
|
const columns = [{
|
||||||
|
dataIndex: "index",
|
||||||
|
key: "index",
|
||||||
|
title: "序号",
|
||||||
|
width: 60,
|
||||||
|
fixed: 'left',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
dataIndex: "palletCode",
|
dataIndex: "palletCode",
|
||||||
key: "palletCode",
|
key: "palletCode",
|
||||||
title: "托盘号",
|
title: "托盘号",
|
||||||
|
|
@ -257,7 +267,7 @@
|
||||||
state.checkOutPalletInfo = state.selectedRows[0]
|
state.checkOutPalletInfo = state.selectedRows[0]
|
||||||
if (state.checkOutPalletInfo.locCode.length < 9) {
|
if (state.checkOutPalletInfo.locCode.length < 9) {
|
||||||
message.error({
|
message.error({
|
||||||
content: "托盘所在位置为【"+state.checkOutPalletInfo.locCode+"】禁止抽检出库,只有货位上的托盘允许",
|
content: "托盘所在位置为【" + state.checkOutPalletInfo.locCode + "】禁止抽检出库,只有货位上的托盘允许",
|
||||||
key: showCheckOutModelKey,
|
key: showCheckOutModelKey,
|
||||||
duration: 2
|
duration: 2
|
||||||
})
|
})
|
||||||
|
|
@ -265,7 +275,7 @@
|
||||||
}
|
}
|
||||||
if (state.checkOutPalletInfo.jobFlag.length > 0) {
|
if (state.checkOutPalletInfo.jobFlag.length > 0) {
|
||||||
message.error({
|
message.error({
|
||||||
content: "托盘存在未完成的任务【"+state.checkOutPalletInfo.jobFlag+"】请检查",
|
content: "托盘存在未完成的任务【" + state.checkOutPalletInfo.jobFlag + "】请检查",
|
||||||
key: showCheckOutModelKey,
|
key: showCheckOutModelKey,
|
||||||
duration: 2
|
duration: 2
|
||||||
})
|
})
|
||||||
|
|
@ -306,14 +316,15 @@
|
||||||
/// 行操作
|
/// 行操作
|
||||||
const operate = [{
|
const operate = [{
|
||||||
label: "查看明细",
|
label: "查看明细",
|
||||||
event: function(record) {
|
event: function (record) {
|
||||||
state.visiblePalletDetail = true, state.recordPalletDetail = record
|
state.visiblePalletDetail = true, state.recordPalletDetail = record
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "删除",
|
label: "删除",
|
||||||
code: "wms:pallet:remove",
|
code: "wms:pallet:remove",
|
||||||
event: function(record) {
|
isDel: true,
|
||||||
|
event: function (record) {
|
||||||
removeMethod(record)
|
removeMethod(record)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -341,7 +352,7 @@
|
||||||
checkOutPalletInfo: {}, //需要抽检出库的托盘信息
|
checkOutPalletInfo: {}, //需要抽检出库的托盘信息
|
||||||
});
|
});
|
||||||
|
|
||||||
const search = function(value) {
|
const search = function (value) {
|
||||||
console.log("主表查询" + JSON.stringify(value))
|
console.log("主表查询" + JSON.stringify(value))
|
||||||
console.log(value)
|
console.log(value)
|
||||||
state.param = value
|
state.param = value
|
||||||
|
|
@ -354,17 +365,17 @@
|
||||||
state.selectedRows = selectedRows;
|
state.selectedRows = selectedRows;
|
||||||
};
|
};
|
||||||
|
|
||||||
const closeSave = function() {
|
const closeSave = function () {
|
||||||
state.visibleSave = false
|
state.visibleSave = false
|
||||||
tableRef.value.reload()
|
tableRef.value.reload()
|
||||||
}
|
}
|
||||||
|
|
||||||
const closeEdit = function() {
|
const closeEdit = function () {
|
||||||
state.visibleEdit = false
|
state.visibleEdit = false
|
||||||
tableRef.value.reload()
|
tableRef.value.reload()
|
||||||
}
|
}
|
||||||
|
|
||||||
const closeCheck = function() {
|
const closeCheck = function () {
|
||||||
state.visibleCheck = false
|
state.visibleCheck = false
|
||||||
tableRef.value.reload()
|
tableRef.value.reload()
|
||||||
}
|
}
|
||||||
|
|
@ -386,5 +397,5 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,9 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div class="drawer-table">
|
||||||
<page-layout>
|
|
||||||
<a-row :gutter="[0,2]">
|
|
||||||
<a-col style="width: 100%;">
|
|
||||||
<pro-table v-if="visible" ref="tableChilrenRef" rowKey="id" :fetch="fetch"
|
<pro-table v-if="visible" ref="tableChilrenRef" rowKey="id" :fetch="fetch"
|
||||||
:columns="columns" :toolbar="toolbar" :operate="operate" :param="state.param" :pagination="pagination"
|
:columns="columns" :toolbar="toolbar" :operate="operate" :param="state.param" :pagination="pagination"
|
||||||
:row-selection="{ selectedRowKeys:state.selectedRowKeys, onChange: onSelectChange }">
|
:row-selection="{ selectedRowKeys:state.selectedRowKeys, onChange: onSelectChange }">
|
||||||
</pro-table>
|
</pro-table>
|
||||||
</a-col>
|
|
||||||
</a-row>
|
|
||||||
</page-layout>
|
|
||||||
<saveDetail :visible="state.visibleSave" @close="closeSave" :record="state.recordSave"></saveDetail>
|
<saveDetail :visible="state.visibleSave" @close="closeSave" :record="state.recordSave"></saveDetail>
|
||||||
<editDetail :visible="state.visibleEdit" @close="closeEdit" :record="state.recordEdit"></editDetail>
|
<editDetail :visible="state.visibleEdit" @close="closeEdit" :record="state.recordEdit"></editDetail>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -64,6 +58,14 @@
|
||||||
})
|
})
|
||||||
|
|
||||||
const columns = [{
|
const columns = [{
|
||||||
|
dataIndex: "index",
|
||||||
|
key: "index",
|
||||||
|
title: "序号",
|
||||||
|
width: 60,
|
||||||
|
fixed: 'left',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
dataIndex: "palletCode",
|
dataIndex: "palletCode",
|
||||||
key: "palletCode",
|
key: "palletCode",
|
||||||
title: "托盘号",
|
title: "托盘号",
|
||||||
|
|
@ -431,3 +433,36 @@
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
.drawer-table {
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
/* 让 pro-table 自适应填满抽屉高度;y:'flex' 将根据容器高度计算 */
|
||||||
|
.drawer-table :deep(#pro-table) {
|
||||||
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
min-height: 0;
|
||||||
|
}
|
||||||
|
.drawer-table :deep(#pro-table .pro-table-tool) {
|
||||||
|
/* 工具栏保持自然高度 */
|
||||||
|
flex: none;
|
||||||
|
}
|
||||||
|
.drawer-table :deep(#pro-table .ant-table-wrapper),
|
||||||
|
.drawer-table :deep(#pro-table .ant-spin-nested-loading),
|
||||||
|
.drawer-table :deep(#pro-table .ant-spin-container),
|
||||||
|
.drawer-table :deep(#pro-table .ant-table),
|
||||||
|
.drawer-table :deep(#pro-table .ant-table-container) {
|
||||||
|
flex: 1;
|
||||||
|
min-height: 0;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
.drawer-table :deep(#pro-table .ant-table-body) {
|
||||||
|
/* 当 y:'flex' 时,内部会使用 flex 高度,这里保证最小高度与滚动行为 */
|
||||||
|
flex: 1;
|
||||||
|
min-height: 0;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
<pro-query :searchParam="searchParam" @on-search="search"></pro-query>
|
<pro-query :searchParam="searchParam" @on-search="search"></pro-query>
|
||||||
</template>
|
</template>
|
||||||
<!-- 托盘出入库记录列表 -->
|
<!-- 托盘出入库记录列表 -->
|
||||||
<pro-table style="margin-top: 10px" rowKey="id" ref="tableRef" :fetch="fetch" :columns="columns" :toolbar="toolbar"
|
<pro-table rowKey="id" ref="tableRef" :fetch="fetch" :columns="columns" :toolbar="toolbar"
|
||||||
:operate="operate" :param="state.param" :pagination="pagination">
|
:operate="operate" :param="state.param" :pagination="pagination">
|
||||||
</pro-table>
|
</pro-table>
|
||||||
</a-list-layout>
|
</a-list-layout>
|
||||||
|
|
@ -37,7 +37,15 @@ export default {
|
||||||
|
|
||||||
const tableRef = ref()
|
const tableRef = ref()
|
||||||
|
|
||||||
const columns = [{
|
const columns = [
|
||||||
|
{
|
||||||
|
dataIndex: "index",
|
||||||
|
key: "index",
|
||||||
|
title: "序号",
|
||||||
|
width: 60,
|
||||||
|
fixed: 'left',
|
||||||
|
align: 'center'
|
||||||
|
},{
|
||||||
dataIndex: "palletCode",
|
dataIndex: "palletCode",
|
||||||
key: "palletCode",
|
key: "palletCode",
|
||||||
title: "托盘号",
|
title: "托盘号",
|
||||||
|
|
@ -55,14 +63,14 @@ export default {
|
||||||
dataIndex: "taskCode",
|
dataIndex: "taskCode",
|
||||||
key: "taskCode",
|
key: "taskCode",
|
||||||
title: "任务号",
|
title: "任务号",
|
||||||
width: 90,
|
width: 120,
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: "directFlag",
|
dataIndex: "directFlag",
|
||||||
key: "directFlag",
|
key: "directFlag",
|
||||||
title: "方向标志",
|
title: "方向标志",
|
||||||
width: 80,
|
width: 100,
|
||||||
dictionary: {
|
dictionary: {
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
code: 'DirectFlag'
|
code: 'DirectFlag'
|
||||||
|
|
@ -72,13 +80,13 @@ export default {
|
||||||
dataIndex: "skuType",
|
dataIndex: "skuType",
|
||||||
key: "skuType",
|
key: "skuType",
|
||||||
title: "物料类型",
|
title: "物料类型",
|
||||||
width: 80,
|
width: 100,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: "skuCode",
|
dataIndex: "skuCode",
|
||||||
key: "skuCode",
|
key: "skuCode",
|
||||||
title: "物料编号",
|
title: "物料编号",
|
||||||
width: 120,
|
width: 160,
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -140,14 +148,15 @@ export default {
|
||||||
dataIndex: "skuQty",
|
dataIndex: "skuQty",
|
||||||
key: "skuQty",
|
key: "skuQty",
|
||||||
title: "物料数量",
|
title: "物料数量",
|
||||||
width: 100,
|
align: 'right',
|
||||||
|
width: 120,
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: "baseUnit",
|
dataIndex: "baseUnit",
|
||||||
key: "baseUnit",
|
key: "baseUnit",
|
||||||
title: "物流单位",
|
title: "物流单位",
|
||||||
width: 100,
|
width: 120,
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
|
|
@ -208,7 +217,7 @@ export default {
|
||||||
dataIndex: "sourceLoc",
|
dataIndex: "sourceLoc",
|
||||||
key: "sourceLoc",
|
key: "sourceLoc",
|
||||||
title: "源位置",
|
title: "源位置",
|
||||||
width: 120,
|
width: 150,
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -258,7 +267,7 @@ export default {
|
||||||
dataIndex: "remark",
|
dataIndex: "remark",
|
||||||
key: "remark",
|
key: "remark",
|
||||||
title: "备注",
|
title: "备注",
|
||||||
width: 300,
|
width: 250,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,14 @@
|
||||||
|
|
||||||
/// 列配置
|
/// 列配置
|
||||||
const columns = [{
|
const columns = [{
|
||||||
|
dataIndex: "index",
|
||||||
|
key: "index",
|
||||||
|
title: "序号",
|
||||||
|
width: 60,
|
||||||
|
fixed: 'left',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
dataIndex: "skuCode",
|
dataIndex: "skuCode",
|
||||||
key: "skuCode",
|
key: "skuCode",
|
||||||
title: "物料编号",
|
title: "物料编号",
|
||||||
|
|
|
||||||
|
|
@ -64,6 +64,14 @@
|
||||||
|
|
||||||
/// 列配置
|
/// 列配置
|
||||||
const columns = [{
|
const columns = [{
|
||||||
|
dataIndex: "index",
|
||||||
|
key: "index",
|
||||||
|
title: "序号",
|
||||||
|
width: 60,
|
||||||
|
fixed: 'left',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
dataIndex: "item",
|
dataIndex: "item",
|
||||||
key: "item",
|
key: "item",
|
||||||
title: "列表项",
|
title: "列表项",
|
||||||
|
|
@ -340,13 +348,13 @@
|
||||||
if (item === 'list') {
|
if (item === 'list') {
|
||||||
search({
|
search({
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10
|
pageSize: 20
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
search({ //fetch改为search
|
search({ //fetch改为search
|
||||||
item: item,
|
item: item,
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10
|
pageSize: 20
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,65 +1,58 @@
|
||||||
<template>
|
<template>
|
||||||
<page-layout>
|
<a-list-layout>
|
||||||
<a-row :gutter="[5, 10]">
|
|
||||||
<!-- 货位树 -->
|
<a-tree showLine :tree-data="state.treeData" v-model:expandedKeys="expandedKeys" v-model:selectedKeys="selectedKeys"
|
||||||
<a-col :span="5">
|
:replace-fields="replaceFields" @select="onSelect">
|
||||||
<a-card>
|
|
||||||
<a-tree showLine :tree-data="state.treeData" v-model:expandedKeys="expandedKeys"
|
|
||||||
v-model:selectedKeys="selectedKeys" :replace-fields="replaceFields" @select="onSelect">
|
|
||||||
</a-tree>
|
</a-tree>
|
||||||
</a-card>
|
|
||||||
</a-col>
|
|
||||||
<!-- 货位列表 -->
|
|
||||||
<a-col :span="19">
|
|
||||||
<a-card>
|
|
||||||
<!-- 查询表单 -->
|
<!-- 查询表单 -->
|
||||||
|
<template #search>
|
||||||
<pro-query :searchParam="searchParam" @on-search="search" ref='queryModalRef'></pro-query>
|
<pro-query :searchParam="searchParam" @on-search="search" ref='queryModalRef'></pro-query>
|
||||||
|
</template>
|
||||||
<pro-table style="margin-top: 10px;" ref="tableRef" :fetch="fetch" :columns="columns" :toolbar="toolbar"
|
<pro-table style="margin-top: 10px;" ref="tableRef" :fetch="fetch" :columns="columns" :toolbar="toolbar"
|
||||||
:operate="operate" :param="state.param" :pagination="pagination"
|
:operate="operate" :param="state.param" :pagination="pagination"
|
||||||
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
|
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
|
||||||
</pro-table>
|
</pro-table>
|
||||||
</a-card>
|
|
||||||
</a-col>
|
|
||||||
</a-row>
|
|
||||||
<save :visible="state.visibleSave" @close="closeSave"></save>
|
<save :visible="state.visibleSave" @close="closeSave"></save>
|
||||||
<edit :visible="state.visibleEdit" @close="closeEdit" :record="state.recordEdit"></edit>
|
<edit :visible="state.visibleEdit" @close="closeEdit" :record="state.recordEdit"></edit>
|
||||||
<changeLocStatus :visible="state.visibleChangeStatus" @close="closeChangeStatus" :record="state.selectedRowKeys">
|
<changeLocStatus :visible="state.visibleChangeStatus" @close="closeChangeStatus" :record="state.selectedRowKeys">
|
||||||
</changeLocStatus>
|
</changeLocStatus>
|
||||||
<changeLocStoreStatus :visible="state.visibleChangeStoreStatus" @close="closeChangeStoreStatus"
|
<changeLocStoreStatus :visible="state.visibleChangeStoreStatus" @close="closeChangeStoreStatus"
|
||||||
:record="state.selectedRowKeys"></changeLocStoreStatus>
|
:record="state.selectedRowKeys"></changeLocStoreStatus>
|
||||||
</page-layout>
|
</a-list-layout>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import save from './modal/save.vue';
|
import save from './modal/save.vue';
|
||||||
import edit from './modal/edit.vue';
|
import edit from './modal/edit.vue';
|
||||||
import changeLocStatus from './modal/locStatusManage.vue';
|
import changeLocStatus from './modal/locStatusManage.vue';
|
||||||
import changeLocStoreStatus from './modal/locStoreStatusManage.vue';
|
import changeLocStoreStatus from './modal/locStoreStatusManage.vue';
|
||||||
import {
|
import {
|
||||||
message,
|
message,
|
||||||
Modal as modal
|
Modal as modal
|
||||||
} from '@hwork/ant-design-vue';
|
} from '@hwork/ant-design-vue';
|
||||||
import {
|
import {
|
||||||
ExclamationCircleOutlined,
|
ExclamationCircleOutlined,
|
||||||
CarryOutOutlined
|
CarryOutOutlined
|
||||||
} from '@ant-design/icons-vue';
|
} from '@ant-design/icons-vue';
|
||||||
import {
|
import {
|
||||||
page,
|
page,
|
||||||
remove,
|
remove,
|
||||||
removeBatch,
|
removeBatch,
|
||||||
wmsLocDict
|
wmsLocDict
|
||||||
} from "@/api/wms/loc";
|
} from "@/api/wms/loc";
|
||||||
import {
|
import {
|
||||||
reactive,
|
reactive,
|
||||||
createVNode,
|
createVNode,
|
||||||
watch,
|
watch,
|
||||||
ref
|
ref
|
||||||
} from 'vue';
|
} from 'vue';
|
||||||
|
|
||||||
const removeKey = "remove";
|
const removeKey = "remove";
|
||||||
const removeBatchKey = "removeBatch";
|
const removeBatchKey = "removeBatch";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
save,
|
save,
|
||||||
edit,
|
edit,
|
||||||
|
|
@ -73,6 +66,14 @@
|
||||||
|
|
||||||
/// 列配置
|
/// 列配置
|
||||||
const columns = [{
|
const columns = [{
|
||||||
|
dataIndex: "index",
|
||||||
|
key: "index",
|
||||||
|
title: "序号",
|
||||||
|
width: 60,
|
||||||
|
fixed: 'left',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
dataIndex: "locCode",
|
dataIndex: "locCode",
|
||||||
key: "locCode",
|
key: "locCode",
|
||||||
title: "位置编号",
|
title: "位置编号",
|
||||||
|
|
@ -116,7 +117,7 @@
|
||||||
key: "locWcs",
|
key: "locWcs",
|
||||||
title: "WCS位置编号",
|
title: "WCS位置编号",
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
width: 140
|
width: 160
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: "ext1",
|
dataIndex: "ext1",
|
||||||
|
|
@ -200,7 +201,7 @@
|
||||||
key: "channelType",
|
key: "channelType",
|
||||||
title: "通道类型",
|
title: "通道类型",
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
width: 100,
|
width: 120,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: "locStatus",
|
dataIndex: "locStatus",
|
||||||
|
|
@ -345,22 +346,25 @@
|
||||||
const toolbar = [{
|
const toolbar = [{
|
||||||
label: "新增",
|
label: "新增",
|
||||||
code: 'wms:loc:add',
|
code: 'wms:loc:add',
|
||||||
event: function() {
|
icon: 'PlusOutlined',
|
||||||
|
event: function () {
|
||||||
state.visibleSave = true
|
state.visibleSave = true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "删除",
|
label: "删除",
|
||||||
code: 'wms:loc:delete',
|
code: 'wms:loc:delete',
|
||||||
event: function() {
|
event: function () {
|
||||||
removeBatchMethod(state.selectedRowKeys)
|
removeBatchMethod(state.selectedRowKeys)
|
||||||
},
|
},
|
||||||
type: 'danger'
|
icon: 'DeleteOutlined',
|
||||||
|
danger: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "批量更改位置状态",
|
label: "批量更改位置状态",
|
||||||
code: 'wms:loc:change',
|
code: 'wms:loc:change',
|
||||||
event: function(record) {
|
icon: 'EditOutlined',
|
||||||
|
event: function (record) {
|
||||||
state.visibleChangeStatus = true, record = state.selectedRowKeys
|
state.visibleChangeStatus = true, record = state.selectedRowKeys
|
||||||
console.log("record", record)
|
console.log("record", record)
|
||||||
}
|
}
|
||||||
|
|
@ -368,7 +372,8 @@
|
||||||
{
|
{
|
||||||
label: "批量修更改存储状态",
|
label: "批量修更改存储状态",
|
||||||
code: 'wms:loc:modify',
|
code: 'wms:loc:modify',
|
||||||
event: function(record) {
|
icon: 'EditOutlined',
|
||||||
|
event: function (record) {
|
||||||
state.visibleChangeStoreStatus = true, record = state.selectedRowKeys
|
state.visibleChangeStoreStatus = true, record = state.selectedRowKeys
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -378,7 +383,7 @@
|
||||||
const operate = [{
|
const operate = [{
|
||||||
label: "修改",
|
label: "修改",
|
||||||
code: 'wms:loc:edit',
|
code: 'wms:loc:edit',
|
||||||
event: function(record) {
|
event: function (record) {
|
||||||
state.visibleEdit = true, state.recordEdit = record
|
state.visibleEdit = true, state.recordEdit = record
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -386,7 +391,7 @@
|
||||||
label: "删除",
|
label: "删除",
|
||||||
code: 'wms:loc:delete',
|
code: 'wms:loc:delete',
|
||||||
isDel: true,
|
isDel: true,
|
||||||
delEvent: function(record) {
|
delEvent: function (record) {
|
||||||
removeMethod(record)
|
removeMethod(record)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -488,10 +493,10 @@
|
||||||
getWmsLocDict();
|
getWmsLocDict();
|
||||||
|
|
||||||
//触发表单查询事件
|
//触发表单查询事件
|
||||||
const onSelect = function(value) {
|
const onSelect = function (value) {
|
||||||
console.log("onSelect queryModalRef", queryModalRef.value)
|
console.log("onSelect queryModalRef", queryModalRef.value)
|
||||||
console.log("onSelect queryModalRef", queryModalRef.value.formState)
|
console.log("onSelect queryModalRef", queryModalRef.value.formState)
|
||||||
queryModalRef.value.setValue("locCode","123");
|
queryModalRef.value.setValue("locCode", "123");
|
||||||
// console.log("onSelect", selectedKeys)
|
// console.log("onSelect", selectedKeys)
|
||||||
console.log("节点触击事件", value)
|
console.log("节点触击事件", value)
|
||||||
// console.log("onSelect", selectedKeys.value)
|
// console.log("onSelect", selectedKeys.value)
|
||||||
|
|
@ -507,7 +512,7 @@
|
||||||
parentCode: parentCode,
|
parentCode: parentCode,
|
||||||
row: row,
|
row: row,
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10
|
pageSize: 20
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
let layer = selectedCode[2];
|
let layer = selectedCode[2];
|
||||||
|
|
@ -516,31 +521,31 @@
|
||||||
parentCode: parentCode,
|
parentCode: parentCode,
|
||||||
layer: layer,
|
layer: layer,
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10
|
pageSize: 20
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const search = function(value) {
|
const search = function (value) {
|
||||||
state.param = value
|
state.param = value
|
||||||
}
|
}
|
||||||
|
|
||||||
const closeSave = function() {
|
const closeSave = function () {
|
||||||
tableRef.value.reload();
|
tableRef.value.reload();
|
||||||
state.visibleSave = false
|
state.visibleSave = false
|
||||||
}
|
}
|
||||||
|
|
||||||
const closeEdit = function() {
|
const closeEdit = function () {
|
||||||
tableRef.value.reload();
|
tableRef.value.reload();
|
||||||
state.visibleEdit = false
|
state.visibleEdit = false
|
||||||
}
|
}
|
||||||
|
|
||||||
const closeChangeStatus = function() {
|
const closeChangeStatus = function () {
|
||||||
tableRef.value.reload();
|
tableRef.value.reload();
|
||||||
state.visibleChangeStatus = false
|
state.visibleChangeStatus = false
|
||||||
}
|
}
|
||||||
|
|
||||||
const closeChangeStoreStatus = function() {
|
const closeChangeStoreStatus = function () {
|
||||||
tableRef.value.reload();
|
tableRef.value.reload();
|
||||||
state.visibleChangeStoreStatus = false
|
state.visibleChangeStoreStatus = false
|
||||||
}
|
}
|
||||||
|
|
@ -578,5 +583,5 @@
|
||||||
queryModalRef
|
queryModalRef
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -66,6 +66,14 @@
|
||||||
|
|
||||||
/// 列配置
|
/// 列配置
|
||||||
const columns = [{
|
const columns = [{
|
||||||
|
dataIndex: "index",
|
||||||
|
key: "index",
|
||||||
|
title: "序号",
|
||||||
|
width: 60,
|
||||||
|
fixed: 'left',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
dataIndex: "equipCode",
|
dataIndex: "equipCode",
|
||||||
key: "equipCode",
|
key: "equipCode",
|
||||||
title: "设备号",
|
title: "设备号",
|
||||||
|
|
@ -79,7 +87,7 @@
|
||||||
key: "sourceLoc",
|
key: "sourceLoc",
|
||||||
title: "起始地址",
|
title: "起始地址",
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
width: 100,
|
width: 140,
|
||||||
sorter: {
|
sorter: {
|
||||||
multiple: 1,
|
multiple: 1,
|
||||||
},
|
},
|
||||||
|
|
@ -89,7 +97,7 @@
|
||||||
key: "targetLoc",
|
key: "targetLoc",
|
||||||
title: "目标地址",
|
title: "目标地址",
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
width: 100,
|
width: 120,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: "equipType",
|
dataIndex: "equipType",
|
||||||
|
|
@ -131,7 +139,8 @@
|
||||||
dataIndex: "taskLimit",
|
dataIndex: "taskLimit",
|
||||||
key: "taskLimit",
|
key: "taskLimit",
|
||||||
title: "任务数限制",
|
title: "任务数限制",
|
||||||
width: 120
|
width: 120,
|
||||||
|
align: 'right'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: "equipStatus",
|
dataIndex: "equipStatus",
|
||||||
|
|
@ -254,6 +263,7 @@
|
||||||
const toolbar = [{
|
const toolbar = [{
|
||||||
label: "新增",
|
label: "新增",
|
||||||
code: 'wms:locExit:add',
|
code: 'wms:locExit:add',
|
||||||
|
icon: 'PlusOutlined',
|
||||||
event: function() {
|
event: function() {
|
||||||
state.visibleSave = true
|
state.visibleSave = true
|
||||||
}
|
}
|
||||||
|
|
@ -261,10 +271,11 @@
|
||||||
{
|
{
|
||||||
label: "删除",
|
label: "删除",
|
||||||
code: 'wms:locExit:remove',
|
code: 'wms:locExit:remove',
|
||||||
|
icon: 'DeleteOutlined',
|
||||||
|
danger: true,
|
||||||
event: function() {
|
event: function() {
|
||||||
removeBatchMethod(state.selectedRowKeys)
|
removeBatchMethod(state.selectedRowKeys)
|
||||||
},
|
},
|
||||||
type: 'danger'
|
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -66,6 +66,14 @@
|
||||||
|
|
||||||
/// 列配置
|
/// 列配置
|
||||||
const columns = [{
|
const columns = [{
|
||||||
|
dataIndex: "index",
|
||||||
|
key: "index",
|
||||||
|
title: "序号",
|
||||||
|
width: 60,
|
||||||
|
fixed: 'left',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
dataIndex: "treeCode",
|
dataIndex: "treeCode",
|
||||||
key: "treeCode",
|
key: "treeCode",
|
||||||
title: "父节点",
|
title: "父节点",
|
||||||
|
|
@ -457,7 +465,7 @@
|
||||||
search({ //fetch改为search
|
search({ //fetch改为search
|
||||||
treeCode: treeCode,
|
treeCode: treeCode,
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10
|
pageSize: 20
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,14 @@
|
||||||
|
|
||||||
/// 列配置
|
/// 列配置
|
||||||
const columns = [{
|
const columns = [{
|
||||||
|
dataIndex: "index",
|
||||||
|
key: "index",
|
||||||
|
title: "序号",
|
||||||
|
width: 60,
|
||||||
|
fixed: 'left',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
dataIndex: "outboundNo",
|
dataIndex: "outboundNo",
|
||||||
key: "outboundNo",
|
key: "outboundNo",
|
||||||
title: "需求编号",
|
title: "需求编号",
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,14 @@
|
||||||
|
|
||||||
/// 列配置
|
/// 列配置
|
||||||
const columns = [{
|
const columns = [{
|
||||||
|
dataIndex: "index",
|
||||||
|
key: "index",
|
||||||
|
title: "序号",
|
||||||
|
width: 60,
|
||||||
|
fixed: 'left',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
dataIndex: "skuCode",
|
dataIndex: "skuCode",
|
||||||
key: "skuCode",
|
key: "skuCode",
|
||||||
title: "物料编号",
|
title: "物料编号",
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,14 @@
|
||||||
|
|
||||||
/// 列配置
|
/// 列配置
|
||||||
const columns = [{
|
const columns = [{
|
||||||
|
dataIndex: "index",
|
||||||
|
key: "index",
|
||||||
|
title: "序号",
|
||||||
|
width: 60,
|
||||||
|
fixed: 'left',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
dataIndex: "seqCode",
|
dataIndex: "seqCode",
|
||||||
key: "seqCode",
|
key: "seqCode",
|
||||||
title: "值编号",
|
title: "值编号",
|
||||||
|
|
@ -67,6 +75,7 @@
|
||||||
dataIndex: "minValue",
|
dataIndex: "minValue",
|
||||||
key: "minValue",
|
key: "minValue",
|
||||||
title: "起始值",
|
title: "起始值",
|
||||||
|
align: 'right',
|
||||||
width: 150,
|
width: 150,
|
||||||
showSearch:true
|
showSearch:true
|
||||||
},
|
},
|
||||||
|
|
@ -74,6 +83,7 @@
|
||||||
dataIndex: "incValue",
|
dataIndex: "incValue",
|
||||||
key: "incValue",
|
key: "incValue",
|
||||||
title: "自增值",
|
title: "自增值",
|
||||||
|
align: 'right',
|
||||||
width: 150,
|
width: 150,
|
||||||
showSearch:true
|
showSearch:true
|
||||||
},
|
},
|
||||||
|
|
@ -81,12 +91,14 @@
|
||||||
dataIndex: "maxValue",
|
dataIndex: "maxValue",
|
||||||
key: "maxValue",
|
key: "maxValue",
|
||||||
title: "最大值",
|
title: "最大值",
|
||||||
|
align: 'right',
|
||||||
width: 150,
|
width: 150,
|
||||||
showSearch:true
|
showSearch:true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: "currValue",
|
dataIndex: "currValue",
|
||||||
key: "currValue",
|
key: "currValue",
|
||||||
|
align: 'right',
|
||||||
title: "当前值",
|
title: "当前值",
|
||||||
width: 150,
|
width: 150,
|
||||||
showSearch:true
|
showSearch:true
|
||||||
|
|
@ -229,6 +241,7 @@
|
||||||
const toolbar = [{
|
const toolbar = [{
|
||||||
label: "新增",
|
label: "新增",
|
||||||
code: 'wms:seqNum:add',
|
code: 'wms:seqNum:add',
|
||||||
|
icon: 'PlusOutlined',
|
||||||
event: function() {
|
event: function() {
|
||||||
state.visibleSave = true
|
state.visibleSave = true
|
||||||
}
|
}
|
||||||
|
|
@ -239,7 +252,8 @@
|
||||||
event: function() {
|
event: function() {
|
||||||
removeBatchMethod(state.selectedRowKeys)
|
removeBatchMethod(state.selectedRowKeys)
|
||||||
},
|
},
|
||||||
type: 'danger'
|
icon: 'DeleteOutlined',
|
||||||
|
danger: true,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,14 @@
|
||||||
|
|
||||||
/// 列配置
|
/// 列配置
|
||||||
const columns = [{
|
const columns = [{
|
||||||
|
dataIndex: "index",
|
||||||
|
key: "index",
|
||||||
|
title: "序号",
|
||||||
|
width: 60,
|
||||||
|
fixed: 'left',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
dataIndex: "snCode",
|
dataIndex: "snCode",
|
||||||
key: "snCode",
|
key: "snCode",
|
||||||
title: "物料条码",
|
title: "物料条码",
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,14 @@
|
||||||
|
|
||||||
/// 列配置
|
/// 列配置
|
||||||
const columns = [{
|
const columns = [{
|
||||||
|
dataIndex: "index",
|
||||||
|
key: "index",
|
||||||
|
title: "序号",
|
||||||
|
width: 60,
|
||||||
|
fixed: 'left',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
dataIndex: "snCode",
|
dataIndex: "snCode",
|
||||||
key: "snCode",
|
key: "snCode",
|
||||||
title: "物料条码",
|
title: "物料条码",
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,14 @@
|
||||||
|
|
||||||
/// 列配置
|
/// 列配置
|
||||||
const columns = [{
|
const columns = [{
|
||||||
|
dataIndex: "index",
|
||||||
|
key: "index",
|
||||||
|
title: "序号",
|
||||||
|
width: 60,
|
||||||
|
fixed: 'left',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
dataIndex: "snCode",
|
dataIndex: "snCode",
|
||||||
key: "snCode",
|
key: "snCode",
|
||||||
title: "物料条码",
|
title: "物料条码",
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,14 @@
|
||||||
const tableRef = ref();
|
const tableRef = ref();
|
||||||
/// 列配置
|
/// 列配置
|
||||||
const columns = [{
|
const columns = [{
|
||||||
|
dataIndex: "index",
|
||||||
|
key: "index",
|
||||||
|
title: "序号",
|
||||||
|
width: 60,
|
||||||
|
fixed: 'left',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
dataIndex: "skuType",
|
dataIndex: "skuType",
|
||||||
key: "skuType",
|
key: "skuType",
|
||||||
title: "物料类别",
|
title: "物料类别",
|
||||||
|
|
@ -55,6 +63,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: "skuQty",
|
dataIndex: "skuQty",
|
||||||
|
width: 120,
|
||||||
|
align: 'right',
|
||||||
key: "skuQty",
|
key: "skuQty",
|
||||||
title: "物料库存",
|
title: "物料库存",
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,6 @@
|
||||||
ref
|
ref
|
||||||
} from 'vue';
|
} from 'vue';
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
save,
|
save,
|
||||||
|
|
@ -36,16 +35,24 @@
|
||||||
const tableRef = ref();
|
const tableRef = ref();
|
||||||
/// 列配置
|
/// 列配置
|
||||||
const columns = [{
|
const columns = [{
|
||||||
|
dataIndex: "index",
|
||||||
|
key: "index",
|
||||||
|
title: "序号",
|
||||||
|
width: 60,
|
||||||
|
fixed: 'left',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
dataIndex: "date",
|
dataIndex: "date",
|
||||||
key: "date",
|
key: "date",
|
||||||
title: "日期",
|
title: "日期",
|
||||||
width: 60
|
width: 120
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: "skuCode",
|
dataIndex: "skuCode",
|
||||||
key: "skuCode",
|
key: "skuCode",
|
||||||
title: "物料编号",
|
title: "物料编号",
|
||||||
width: 80
|
width: 150
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: "skuName",
|
dataIndex: "skuName",
|
||||||
|
|
@ -56,32 +63,36 @@
|
||||||
{
|
{
|
||||||
dataIndex: "totalSkuNeedQty",
|
dataIndex: "totalSkuNeedQty",
|
||||||
key: "totalSkuNeedQty",
|
key: "totalSkuNeedQty",
|
||||||
|
align: 'right',
|
||||||
title: "总需求数量",
|
title: "总需求数量",
|
||||||
width: 80
|
width: 120
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: "mesLocCode",
|
dataIndex: "mesLocCode",
|
||||||
key: "mesLocCode",
|
key: "mesLocCode",
|
||||||
title: "接收工位",
|
title: "接收工位",
|
||||||
width: 80
|
width: 150
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: "totalSkuJoinQty",
|
dataIndex: "totalSkuJoinQty",
|
||||||
key: "totalSkuJoinQty",
|
key: "totalSkuJoinQty",
|
||||||
|
align: 'right',
|
||||||
title: "总交接数量",
|
title: "总交接数量",
|
||||||
width: 80
|
width: 120
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: "totalSkuInTransitQty",
|
dataIndex: "totalSkuInTransitQty",
|
||||||
key: "totalSkuInTransitQty",
|
key: "totalSkuInTransitQty",
|
||||||
|
align: 'right',
|
||||||
title: "在途数量",
|
title: "在途数量",
|
||||||
width: 80
|
width: 120
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: "totalSkuShortageQty",
|
dataIndex: "totalSkuShortageQty",
|
||||||
key: "totalSkuShortageQty",
|
key: "totalSkuShortageQty",
|
||||||
title: "交接短缺数量",
|
title: "交接短缺数量",
|
||||||
width: 80
|
align: 'right',
|
||||||
|
width: 150
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -70,6 +70,14 @@
|
||||||
|
|
||||||
/// 列配置
|
/// 列配置
|
||||||
const columns = [{
|
const columns = [{
|
||||||
|
dataIndex: "index",
|
||||||
|
key: "index",
|
||||||
|
title: "序号",
|
||||||
|
width: 60,
|
||||||
|
fixed: 'left',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
dataIndex: "trackCode",
|
dataIndex: "trackCode",
|
||||||
key: "trackCode",
|
key: "trackCode",
|
||||||
title: "通道号",
|
title: "通道号",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue