diff --git a/src/views/base/area/Area.api.ts b/src/views/base/area/Area.api.ts new file mode 100644 index 0000000..d01bcf8 --- /dev/null +++ b/src/views/base/area/Area.api.ts @@ -0,0 +1,72 @@ +import { defHttp } from '/@/utils/http/axios'; +import { useMessage } from "/@/hooks/web/useMessage"; + +const { createConfirm } = useMessage(); + +enum Api { + list = '/base/area/list', + save='/base/area/add', + edit='/base/area/edit', + deleteOne = '/base/area/delete', + deleteBatch = '/base/area/deleteBatch', + importExcel = '/base/area/importExcel', + exportXls = '/base/area/exportXls', +} + +/** + * 导出api + * @param params + */ +export const getExportUrl = Api.exportXls; + +/** + * 导入api + */ +export const getImportUrl = Api.importExcel; + +/** + * 列表接口 + * @param params + */ +export const list = (params) => defHttp.get({ url: Api.list, params }); + +/** + * 删除单个 + * @param params + * @param handleSuccess + */ +export const deleteOne = (params,handleSuccess) => { + return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); +} + +/** + * 批量删除 + * @param params + * @param handleSuccess + */ +export const batchDelete = (params, handleSuccess) => { + createConfirm({ + iconType: 'warning', + title: '确认删除', + content: '是否删除选中数据', + okText: '确认', + cancelText: '取消', + onOk: () => { + return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); + } + }); +} + +/** + * 保存或者更新 + * @param params + * @param isUpdate + */ +export const saveOrUpdate = (params, isUpdate) => { + let url = isUpdate ? Api.edit : Api.save; + return defHttp.post({ url: url, params }, { isTransformResponse: false }); +} diff --git a/src/views/base/area/Area.data.ts b/src/views/base/area/Area.data.ts new file mode 100644 index 0000000..da7b9a9 --- /dev/null +++ b/src/views/base/area/Area.data.ts @@ -0,0 +1,36 @@ +import {BasicColumn} from '/@/components/Table'; +import {FormSchema} from '/@/components/Table'; +import { rules} from '/@/utils/helper/validator'; +import { render } from '/@/utils/common/renderUtils'; +import { getWeekMonthQuarterYear } from '/@/utils'; +//列表数据 +export const columns: BasicColumn[] = [ + { + title: '库区编码', + align: "center", + dataIndex: 'areaCode' + }, + { + title: '库区名称', + align: "center", + dataIndex: 'areaName' + }, + { + title: '描述', + align: "center", + dataIndex: 'description', + }, + { + title: '创建日期', + align: "center", + dataIndex: 'createTime' + }, +]; + +// 高级查询数据 +export const superQuerySchema = { + areaCode: {title: '库区编码',order: 0,view: 'text', type: 'string',}, + areaName: {title: '库区名称',order: 1,view: 'text', type: 'string',}, + description: {title: '描述',order: 2,view: 'umeditor', type: 'string',}, + createTime: {title: '创建日期',order: 4,view: 'datetime', type: 'string',}, +}; diff --git a/src/views/base/area/AreaList.vue b/src/views/base/area/AreaList.vue new file mode 100644 index 0000000..fee6955 --- /dev/null +++ b/src/views/base/area/AreaList.vue @@ -0,0 +1,286 @@ + + + + + diff --git a/src/views/base/area/V20251027_1__menu_insert_Area.sql b/src/views/base/area/V20251027_1__menu_insert_Area.sql new file mode 100644 index 0000000..6d002bf --- /dev/null +++ b/src/views/base/area/V20251027_1__menu_insert_Area.sql @@ -0,0 +1,40 @@ +-- 注意:该页面对应的前台目录为views/base文件夹下 +-- 如果你想更改到其他目录,请修改sql中component字段对应的值 + + +-- 主菜单 +INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external) +VALUES ('176157470842601', NULL, '库区', '/base/areaList', 'base/AreaList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2025-10-27 22:18:28', NULL, NULL, 0); + +-- 新增 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('176157470842602', '176157470842601', '添加库区', NULL, NULL, 0, NULL, NULL, 2, 'base:base_area:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-10-27 22:18:28', NULL, NULL, 0, 0, '1', 0); + +-- 编辑 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('176157470842603', '176157470842601', '编辑库区', NULL, NULL, 0, NULL, NULL, 2, 'base:base_area:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-10-27 22:18:28', NULL, NULL, 0, 0, '1', 0); + +-- 删除 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('176157470842604', '176157470842601', '删除库区', NULL, NULL, 0, NULL, NULL, 2, 'base:base_area:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-10-27 22:18:28', NULL, NULL, 0, 0, '1', 0); + +-- 批量删除 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('176157470842605', '176157470842601', '批量删除库区', NULL, NULL, 0, NULL, NULL, 2, 'base:base_area:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-10-27 22:18:28', NULL, NULL, 0, 0, '1', 0); + +-- 导出excel +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('176157470842606', '176157470842601', '导出excel_库区', NULL, NULL, 0, NULL, NULL, 2, 'base:base_area:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-10-27 22:18:28', NULL, NULL, 0, 0, '1', 0); + +-- 导入excel +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('176157470842607', '176157470842601', '导入excel_库区', NULL, NULL, 0, NULL, NULL, 2, 'base:base_area:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-10-27 22:18:28', NULL, NULL, 0, 0, '1', 0); + +-- 角色授权(以 admin 角色为例,role_id 可替换) +INSERT INTO sys_role_permission (id, role_id, permission_id, data_rule_ids, operate_date, operate_ip) VALUES ('176157470842708', 'f6817f48af4fb3af11b9e8bf182f618b', '176157470842601', NULL, '2025-10-27 22:18:28', '127.0.0.1'); +INSERT INTO sys_role_permission (id, role_id, permission_id, data_rule_ids, operate_date, operate_ip) VALUES ('176157470842709', 'f6817f48af4fb3af11b9e8bf182f618b', '176157470842602', NULL, '2025-10-27 22:18:28', '127.0.0.1'); +INSERT INTO sys_role_permission (id, role_id, permission_id, data_rule_ids, operate_date, operate_ip) VALUES ('176157470842710', 'f6817f48af4fb3af11b9e8bf182f618b', '176157470842603', NULL, '2025-10-27 22:18:28', '127.0.0.1'); +INSERT INTO sys_role_permission (id, role_id, permission_id, data_rule_ids, operate_date, operate_ip) VALUES ('176157470842711', 'f6817f48af4fb3af11b9e8bf182f618b', '176157470842604', NULL, '2025-10-27 22:18:28', '127.0.0.1'); +INSERT INTO sys_role_permission (id, role_id, permission_id, data_rule_ids, operate_date, operate_ip) VALUES ('176157470842712', 'f6817f48af4fb3af11b9e8bf182f618b', '176157470842605', NULL, '2025-10-27 22:18:28', '127.0.0.1'); +INSERT INTO sys_role_permission (id, role_id, permission_id, data_rule_ids, operate_date, operate_ip) VALUES ('176157470842713', 'f6817f48af4fb3af11b9e8bf182f618b', '176157470842606', NULL, '2025-10-27 22:18:28', '127.0.0.1'); +INSERT INTO sys_role_permission (id, role_id, permission_id, data_rule_ids, operate_date, operate_ip) VALUES ('176157470842714', 'f6817f48af4fb3af11b9e8bf182f618b', '176157470842607', NULL, '2025-10-27 22:18:28', '127.0.0.1'); \ No newline at end of file diff --git a/src/views/base/area/components/AreaForm.vue b/src/views/base/area/components/AreaForm.vue new file mode 100644 index 0000000..06fd6a4 --- /dev/null +++ b/src/views/base/area/components/AreaForm.vue @@ -0,0 +1,174 @@ + + + + + diff --git a/src/views/base/area/components/AreaModal.vue b/src/views/base/area/components/AreaModal.vue new file mode 100644 index 0000000..2ee555e --- /dev/null +++ b/src/views/base/area/components/AreaModal.vue @@ -0,0 +1,81 @@ + + + + + + diff --git a/src/views/base/item/Item.api.ts b/src/views/base/item/Item.api.ts new file mode 100644 index 0000000..eb8660e --- /dev/null +++ b/src/views/base/item/Item.api.ts @@ -0,0 +1,72 @@ +import { defHttp } from '/@/utils/http/axios'; +import { useMessage } from "/@/hooks/web/useMessage"; + +const { createConfirm } = useMessage(); + +enum Api { + list = '/base/item/list', + save='/base/item/add', + edit='/base/item/edit', + deleteOne = '/base/item/delete', + deleteBatch = '/base/item/deleteBatch', + importExcel = '/base/item/importExcel', + exportXls = '/base/item/exportXls', +} + +/** + * 导出api + * @param params + */ +export const getExportUrl = Api.exportXls; + +/** + * 导入api + */ +export const getImportUrl = Api.importExcel; + +/** + * 列表接口 + * @param params + */ +export const list = (params) => defHttp.get({ url: Api.list, params }); + +/** + * 删除单个 + * @param params + * @param handleSuccess + */ +export const deleteOne = (params,handleSuccess) => { + return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); +} + +/** + * 批量删除 + * @param params + * @param handleSuccess + */ +export const batchDelete = (params, handleSuccess) => { + createConfirm({ + iconType: 'warning', + title: '确认删除', + content: '是否删除选中数据', + okText: '确认', + cancelText: '取消', + onOk: () => { + return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); + } + }); +} + +/** + * 保存或者更新 + * @param params + * @param isUpdate + */ +export const saveOrUpdate = (params, isUpdate) => { + let url = isUpdate ? Api.edit : Api.save; + return defHttp.post({ url: url, params }, { isTransformResponse: false }); +} diff --git a/src/views/base/item/Item.data.ts b/src/views/base/item/Item.data.ts new file mode 100644 index 0000000..4973f8b --- /dev/null +++ b/src/views/base/item/Item.data.ts @@ -0,0 +1,30 @@ +import {BasicColumn} from '/@/components/Table'; +import {FormSchema} from '/@/components/Table'; +import { rules} from '/@/utils/helper/validator'; +import { render } from '/@/utils/common/renderUtils'; +import { getWeekMonthQuarterYear } from '/@/utils'; +//列表数据 +export const columns: BasicColumn[] = [ + { + title: '物料编码', + align: "center", + dataIndex: 'itemCode' + }, + { + title: '物料名称', + align: "center", + dataIndex: 'itemName' + }, + { + title: '租户ID', + align: "center", + dataIndex: 'tenantId' + }, +]; + +// 高级查询数据 +export const superQuerySchema = { + itemCode: {title: '物料编码',order: 0,view: 'text', type: 'string',}, + itemName: {title: '物料名称',order: 1,view: 'text', type: 'string',}, + tenantId: {title: '租户ID',order: 2,view: 'number', type: 'number',}, +}; diff --git a/src/views/base/item/ItemList.vue b/src/views/base/item/ItemList.vue new file mode 100644 index 0000000..4ecc052 --- /dev/null +++ b/src/views/base/item/ItemList.vue @@ -0,0 +1,249 @@ + + + + + diff --git a/src/views/base/item/V20251027_1__menu_insert_Item.sql b/src/views/base/item/V20251027_1__menu_insert_Item.sql new file mode 100644 index 0000000..e206aff --- /dev/null +++ b/src/views/base/item/V20251027_1__menu_insert_Item.sql @@ -0,0 +1,40 @@ +-- 注意:该页面对应的前台目录为views/base文件夹下 +-- 如果你想更改到其他目录,请修改sql中component字段对应的值 + + +-- 主菜单 +INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external) +VALUES ('176157180887601', NULL, '物料', '/base/itemList', 'base/ItemList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2025-10-27 21:30:08', NULL, NULL, 0); + +-- 新增 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('176157180887602', '176157180887601', '添加物料', NULL, NULL, 0, NULL, NULL, 2, 'base:base_item:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-10-27 21:30:08', NULL, NULL, 0, 0, '1', 0); + +-- 编辑 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('176157180887603', '176157180887601', '编辑物料', NULL, NULL, 0, NULL, NULL, 2, 'base:base_item:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-10-27 21:30:08', NULL, NULL, 0, 0, '1', 0); + +-- 删除 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('176157180887604', '176157180887601', '删除物料', NULL, NULL, 0, NULL, NULL, 2, 'base:base_item:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-10-27 21:30:08', NULL, NULL, 0, 0, '1', 0); + +-- 批量删除 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('176157180887605', '176157180887601', '批量删除物料', NULL, NULL, 0, NULL, NULL, 2, 'base:base_item:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-10-27 21:30:08', NULL, NULL, 0, 0, '1', 0); + +-- 导出excel +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('176157180887606', '176157180887601', '导出excel_物料', NULL, NULL, 0, NULL, NULL, 2, 'base:base_item:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-10-27 21:30:08', NULL, NULL, 0, 0, '1', 0); + +-- 导入excel +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('176157180887607', '176157180887601', '导入excel_物料', NULL, NULL, 0, NULL, NULL, 2, 'base:base_item:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-10-27 21:30:08', NULL, NULL, 0, 0, '1', 0); + +-- 角色授权(以 admin 角色为例,role_id 可替换) +INSERT INTO sys_role_permission (id, role_id, permission_id, data_rule_ids, operate_date, operate_ip) VALUES ('176157180887608', 'f6817f48af4fb3af11b9e8bf182f618b', '176157180887601', NULL, '2025-10-27 21:30:08', '127.0.0.1'); +INSERT INTO sys_role_permission (id, role_id, permission_id, data_rule_ids, operate_date, operate_ip) VALUES ('176157180887609', 'f6817f48af4fb3af11b9e8bf182f618b', '176157180887602', NULL, '2025-10-27 21:30:08', '127.0.0.1'); +INSERT INTO sys_role_permission (id, role_id, permission_id, data_rule_ids, operate_date, operate_ip) VALUES ('176157180887610', 'f6817f48af4fb3af11b9e8bf182f618b', '176157180887603', NULL, '2025-10-27 21:30:08', '127.0.0.1'); +INSERT INTO sys_role_permission (id, role_id, permission_id, data_rule_ids, operate_date, operate_ip) VALUES ('176157180887611', 'f6817f48af4fb3af11b9e8bf182f618b', '176157180887604', NULL, '2025-10-27 21:30:08', '127.0.0.1'); +INSERT INTO sys_role_permission (id, role_id, permission_id, data_rule_ids, operate_date, operate_ip) VALUES ('176157180887612', 'f6817f48af4fb3af11b9e8bf182f618b', '176157180887605', NULL, '2025-10-27 21:30:08', '127.0.0.1'); +INSERT INTO sys_role_permission (id, role_id, permission_id, data_rule_ids, operate_date, operate_ip) VALUES ('176157180887613', 'f6817f48af4fb3af11b9e8bf182f618b', '176157180887606', NULL, '2025-10-27 21:30:08', '127.0.0.1'); +INSERT INTO sys_role_permission (id, role_id, permission_id, data_rule_ids, operate_date, operate_ip) VALUES ('176157180887614', 'f6817f48af4fb3af11b9e8bf182f618b', '176157180887607', NULL, '2025-10-27 21:30:08', '127.0.0.1'); \ No newline at end of file diff --git a/src/views/base/item/components/ItemForm.vue b/src/views/base/item/components/ItemForm.vue new file mode 100644 index 0000000..c5f20a8 --- /dev/null +++ b/src/views/base/item/components/ItemForm.vue @@ -0,0 +1,162 @@ + + + + + diff --git a/src/views/base/item/components/ItemModal.vue b/src/views/base/item/components/ItemModal.vue new file mode 100644 index 0000000..79abb6f --- /dev/null +++ b/src/views/base/item/components/ItemModal.vue @@ -0,0 +1,81 @@ + + + + + + diff --git a/src/views/base/point/Point.api.ts b/src/views/base/point/Point.api.ts new file mode 100644 index 0000000..144fe02 --- /dev/null +++ b/src/views/base/point/Point.api.ts @@ -0,0 +1,72 @@ +import { defHttp } from '/@/utils/http/axios'; +import { useMessage } from "/@/hooks/web/useMessage"; + +const { createConfirm } = useMessage(); + +enum Api { + list = '/base/point/list', + save='/base/point/add', + edit='/base/point/edit', + deleteOne = '/base/point/delete', + deleteBatch = '/base/point/deleteBatch', + importExcel = '/base/point/importExcel', + exportXls = '/base/point/exportXls', +} + +/** + * 导出api + * @param params + */ +export const getExportUrl = Api.exportXls; + +/** + * 导入api + */ +export const getImportUrl = Api.importExcel; + +/** + * 列表接口 + * @param params + */ +export const list = (params) => defHttp.get({ url: Api.list, params }); + +/** + * 删除单个 + * @param params + * @param handleSuccess + */ +export const deleteOne = (params,handleSuccess) => { + return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); +} + +/** + * 批量删除 + * @param params + * @param handleSuccess + */ +export const batchDelete = (params, handleSuccess) => { + createConfirm({ + iconType: 'warning', + title: '确认删除', + content: '是否删除选中数据', + okText: '确认', + cancelText: '取消', + onOk: () => { + return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); + } + }); +} + +/** + * 保存或者更新 + * @param params + * @param isUpdate + */ +export const saveOrUpdate = (params, isUpdate) => { + let url = isUpdate ? Api.edit : Api.save; + return defHttp.post({ url: url, params }, { isTransformResponse: false }); +} diff --git a/src/views/base/point/Point.data.ts b/src/views/base/point/Point.data.ts new file mode 100644 index 0000000..2195fa3 --- /dev/null +++ b/src/views/base/point/Point.data.ts @@ -0,0 +1,54 @@ +import {BasicColumn} from '/@/components/Table'; +import {FormSchema} from '/@/components/Table'; +import { rules} from '/@/utils/helper/validator'; +import { render } from '/@/utils/common/renderUtils'; +import { getWeekMonthQuarterYear } from '/@/utils'; +//列表数据 +export const columns: BasicColumn[] = [ + { + title: '库位编码', + align: "center", + dataIndex: 'pointCode' + }, + { + title: '排', + align: "center", + dataIndex: 'row' + }, + { + title: '列', + align: "center", + dataIndex: 'col' + }, + { + title: '层', + align: "center", + dataIndex: 'layer' + }, + { + title: '描述', + align: "center", + dataIndex: 'description' + }, + { + title: '库区ID', + align: "center", + dataIndex: 'areaId' + }, + { + title: '创建日期', + align: "center", + dataIndex: 'createTime' + }, +]; + +// 高级查询数据 +export const superQuerySchema = { + pointCode: {title: '库位编码',order: 0,view: 'text', type: 'string',}, + row: {title: '排',order: 1,view: 'text', type: 'string',}, + col: {title: '列',order: 2,view: 'text', type: 'string',}, + layer: {title: '层',order: 3,view: 'text', type: 'string',}, + description: {title: '描述',order: 4,view: 'textarea', type: 'string',}, + areaId: {title: '库区ID',order: 6,view: 'number', type: 'number',}, + createTime: {title: '创建日期',order: 7,view: 'datetime', type: 'string',}, +}; diff --git a/src/views/base/point/PointList.vue b/src/views/base/point/PointList.vue new file mode 100644 index 0000000..2a5fc18 --- /dev/null +++ b/src/views/base/point/PointList.vue @@ -0,0 +1,281 @@ + + + + + diff --git a/src/views/base/point/V20251028_1__menu_insert_Point.sql b/src/views/base/point/V20251028_1__menu_insert_Point.sql new file mode 100644 index 0000000..5f9f4b0 --- /dev/null +++ b/src/views/base/point/V20251028_1__menu_insert_Point.sql @@ -0,0 +1,40 @@ +-- 注意:该页面对应的前台目录为views/base文件夹下 +-- 如果你想更改到其他目录,请修改sql中component字段对应的值 + + +-- 主菜单 +INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external) +VALUES ('176164598530101', NULL, '库位', '/base/pointList', 'base/PointList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2025-10-28 18:06:25', NULL, NULL, 0); + +-- 新增 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('176164598530102', '176164598530101', '添加库位', NULL, NULL, 0, NULL, NULL, 2, 'base:base_point:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-10-28 18:06:25', NULL, NULL, 0, 0, '1', 0); + +-- 编辑 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('176164598530103', '176164598530101', '编辑库位', NULL, NULL, 0, NULL, NULL, 2, 'base:base_point:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-10-28 18:06:25', NULL, NULL, 0, 0, '1', 0); + +-- 删除 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('176164598530104', '176164598530101', '删除库位', NULL, NULL, 0, NULL, NULL, 2, 'base:base_point:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-10-28 18:06:25', NULL, NULL, 0, 0, '1', 0); + +-- 批量删除 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('176164598530105', '176164598530101', '批量删除库位', NULL, NULL, 0, NULL, NULL, 2, 'base:base_point:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-10-28 18:06:25', NULL, NULL, 0, 0, '1', 0); + +-- 导出excel +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('176164598530106', '176164598530101', '导出excel_库位', NULL, NULL, 0, NULL, NULL, 2, 'base:base_point:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-10-28 18:06:25', NULL, NULL, 0, 0, '1', 0); + +-- 导入excel +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('176164598530107', '176164598530101', '导入excel_库位', NULL, NULL, 0, NULL, NULL, 2, 'base:base_point:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-10-28 18:06:25', NULL, NULL, 0, 0, '1', 0); + +-- 角色授权(以 admin 角色为例,role_id 可替换) +INSERT INTO sys_role_permission (id, role_id, permission_id, data_rule_ids, operate_date, operate_ip) VALUES ('176164598530208', 'f6817f48af4fb3af11b9e8bf182f618b', '176164598530101', NULL, '2025-10-28 18:06:25', '127.0.0.1'); +INSERT INTO sys_role_permission (id, role_id, permission_id, data_rule_ids, operate_date, operate_ip) VALUES ('176164598530209', 'f6817f48af4fb3af11b9e8bf182f618b', '176164598530102', NULL, '2025-10-28 18:06:25', '127.0.0.1'); +INSERT INTO sys_role_permission (id, role_id, permission_id, data_rule_ids, operate_date, operate_ip) VALUES ('176164598530210', 'f6817f48af4fb3af11b9e8bf182f618b', '176164598530103', NULL, '2025-10-28 18:06:25', '127.0.0.1'); +INSERT INTO sys_role_permission (id, role_id, permission_id, data_rule_ids, operate_date, operate_ip) VALUES ('176164598530211', 'f6817f48af4fb3af11b9e8bf182f618b', '176164598530104', NULL, '2025-10-28 18:06:25', '127.0.0.1'); +INSERT INTO sys_role_permission (id, role_id, permission_id, data_rule_ids, operate_date, operate_ip) VALUES ('176164598530212', 'f6817f48af4fb3af11b9e8bf182f618b', '176164598530105', NULL, '2025-10-28 18:06:25', '127.0.0.1'); +INSERT INTO sys_role_permission (id, role_id, permission_id, data_rule_ids, operate_date, operate_ip) VALUES ('176164598530213', 'f6817f48af4fb3af11b9e8bf182f618b', '176164598530106', NULL, '2025-10-28 18:06:25', '127.0.0.1'); +INSERT INTO sys_role_permission (id, role_id, permission_id, data_rule_ids, operate_date, operate_ip) VALUES ('176164598530214', 'f6817f48af4fb3af11b9e8bf182f618b', '176164598530107', NULL, '2025-10-28 18:06:25', '127.0.0.1'); \ No newline at end of file diff --git a/src/views/base/point/components/PointForm.vue b/src/views/base/point/components/PointForm.vue new file mode 100644 index 0000000..8acf945 --- /dev/null +++ b/src/views/base/point/components/PointForm.vue @@ -0,0 +1,191 @@ + + + + + diff --git a/src/views/base/point/components/PointModal.vue b/src/views/base/point/components/PointModal.vue new file mode 100644 index 0000000..62226ae --- /dev/null +++ b/src/views/base/point/components/PointModal.vue @@ -0,0 +1,81 @@ + + + + + + diff --git a/src/views/base/stock/Stock.api.ts b/src/views/base/stock/Stock.api.ts new file mode 100644 index 0000000..12d2ab7 --- /dev/null +++ b/src/views/base/stock/Stock.api.ts @@ -0,0 +1,72 @@ +import { defHttp } from '/@/utils/http/axios'; +import { useMessage } from "/@/hooks/web/useMessage"; + +const { createConfirm } = useMessage(); + +enum Api { + list = '/base/stock/list', + save='/base/stock/add', + edit='/base/stock/edit', + deleteOne = '/base/stock/delete', + deleteBatch = '/base/stock/deleteBatch', + importExcel = '/base/stock/importExcel', + exportXls = '/base/stock/exportXls', +} + +/** + * 导出api + * @param params + */ +export const getExportUrl = Api.exportXls; + +/** + * 导入api + */ +export const getImportUrl = Api.importExcel; + +/** + * 列表接口 + * @param params + */ +export const list = (params) => defHttp.get({ url: Api.list, params }); + +/** + * 删除单个 + * @param params + * @param handleSuccess + */ +export const deleteOne = (params,handleSuccess) => { + return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); +} + +/** + * 批量删除 + * @param params + * @param handleSuccess + */ +export const batchDelete = (params, handleSuccess) => { + createConfirm({ + iconType: 'warning', + title: '确认删除', + content: '是否删除选中数据', + okText: '确认', + cancelText: '取消', + onOk: () => { + return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); + } + }); +} + +/** + * 保存或者更新 + * @param params + * @param isUpdate + */ +export const saveOrUpdate = (params, isUpdate) => { + let url = isUpdate ? Api.edit : Api.save; + return defHttp.post({ url: url, params }, { isTransformResponse: false }); +} diff --git a/src/views/base/stock/Stock.data.ts b/src/views/base/stock/Stock.data.ts new file mode 100644 index 0000000..e17a6fd --- /dev/null +++ b/src/views/base/stock/Stock.data.ts @@ -0,0 +1,30 @@ +import {BasicColumn} from '/@/components/Table'; +import {FormSchema} from '/@/components/Table'; +import { rules} from '/@/utils/helper/validator'; +import { render } from '/@/utils/common/renderUtils'; +import { getWeekMonthQuarterYear } from '/@/utils'; +//列表数据 +export const columns: BasicColumn[] = [ + { + title: '容器编码', + align: "center", + dataIndex: 'stockCode' + }, + { + title: '描述', + align: "center", + dataIndex: 'description' + }, + { + title: '创建日期', + align: "center", + dataIndex: 'createTime' + }, +]; + +// 高级查询数据 +export const superQuerySchema = { + stockCode: {title: '容器编码',order: 0,view: 'text', type: 'string',}, + description: {title: '描述',order: 1,view: 'text', type: 'string',}, + createTime: {title: '创建日期',order: 3,view: 'datetime', type: 'string',}, +}; diff --git a/src/views/base/stock/StockList.vue b/src/views/base/stock/StockList.vue new file mode 100644 index 0000000..6a5a2d9 --- /dev/null +++ b/src/views/base/stock/StockList.vue @@ -0,0 +1,273 @@ + + + + + diff --git a/src/views/base/stock/V20251028_1__menu_insert_Stock.sql b/src/views/base/stock/V20251028_1__menu_insert_Stock.sql new file mode 100644 index 0000000..3f9863a --- /dev/null +++ b/src/views/base/stock/V20251028_1__menu_insert_Stock.sql @@ -0,0 +1,40 @@ +-- 注意:该页面对应的前台目录为views/base文件夹下 +-- 如果你想更改到其他目录,请修改sql中component字段对应的值 + + +-- 主菜单 +INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external) +VALUES ('176162353750701', NULL, '容器', '/base/stockList', 'base/StockList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2025-10-28 11:52:17', NULL, NULL, 0); + +-- 新增 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('176162353750702', '176162353750701', '添加容器', NULL, NULL, 0, NULL, NULL, 2, 'base:base_stock:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-10-28 11:52:17', NULL, NULL, 0, 0, '1', 0); + +-- 编辑 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('176162353750703', '176162353750701', '编辑容器', NULL, NULL, 0, NULL, NULL, 2, 'base:base_stock:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-10-28 11:52:17', NULL, NULL, 0, 0, '1', 0); + +-- 删除 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('176162353750704', '176162353750701', '删除容器', NULL, NULL, 0, NULL, NULL, 2, 'base:base_stock:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-10-28 11:52:17', NULL, NULL, 0, 0, '1', 0); + +-- 批量删除 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('176162353750705', '176162353750701', '批量删除容器', NULL, NULL, 0, NULL, NULL, 2, 'base:base_stock:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-10-28 11:52:17', NULL, NULL, 0, 0, '1', 0); + +-- 导出excel +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('176162353750706', '176162353750701', '导出excel_容器', NULL, NULL, 0, NULL, NULL, 2, 'base:base_stock:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-10-28 11:52:17', NULL, NULL, 0, 0, '1', 0); + +-- 导入excel +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('176162353750707', '176162353750701', '导入excel_容器', NULL, NULL, 0, NULL, NULL, 2, 'base:base_stock:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-10-28 11:52:17', NULL, NULL, 0, 0, '1', 0); + +-- 角色授权(以 admin 角色为例,role_id 可替换) +INSERT INTO sys_role_permission (id, role_id, permission_id, data_rule_ids, operate_date, operate_ip) VALUES ('176162353750808', 'f6817f48af4fb3af11b9e8bf182f618b', '176162353750701', NULL, '2025-10-28 11:52:17', '127.0.0.1'); +INSERT INTO sys_role_permission (id, role_id, permission_id, data_rule_ids, operate_date, operate_ip) VALUES ('176162353750809', 'f6817f48af4fb3af11b9e8bf182f618b', '176162353750702', NULL, '2025-10-28 11:52:17', '127.0.0.1'); +INSERT INTO sys_role_permission (id, role_id, permission_id, data_rule_ids, operate_date, operate_ip) VALUES ('176162353750810', 'f6817f48af4fb3af11b9e8bf182f618b', '176162353750703', NULL, '2025-10-28 11:52:17', '127.0.0.1'); +INSERT INTO sys_role_permission (id, role_id, permission_id, data_rule_ids, operate_date, operate_ip) VALUES ('176162353750811', 'f6817f48af4fb3af11b9e8bf182f618b', '176162353750704', NULL, '2025-10-28 11:52:17', '127.0.0.1'); +INSERT INTO sys_role_permission (id, role_id, permission_id, data_rule_ids, operate_date, operate_ip) VALUES ('176162353750812', 'f6817f48af4fb3af11b9e8bf182f618b', '176162353750705', NULL, '2025-10-28 11:52:17', '127.0.0.1'); +INSERT INTO sys_role_permission (id, role_id, permission_id, data_rule_ids, operate_date, operate_ip) VALUES ('176162353750813', 'f6817f48af4fb3af11b9e8bf182f618b', '176162353750706', NULL, '2025-10-28 11:52:17', '127.0.0.1'); +INSERT INTO sys_role_permission (id, role_id, permission_id, data_rule_ids, operate_date, operate_ip) VALUES ('176162353750814', 'f6817f48af4fb3af11b9e8bf182f618b', '176162353750707', NULL, '2025-10-28 11:52:17', '127.0.0.1'); \ No newline at end of file diff --git a/src/views/base/stock/components/StockForm.vue b/src/views/base/stock/components/StockForm.vue new file mode 100644 index 0000000..59ae119 --- /dev/null +++ b/src/views/base/stock/components/StockForm.vue @@ -0,0 +1,165 @@ + + + + + diff --git a/src/views/base/stock/components/StockModal.vue b/src/views/base/stock/components/StockModal.vue new file mode 100644 index 0000000..350caf5 --- /dev/null +++ b/src/views/base/stock/components/StockModal.vue @@ -0,0 +1,81 @@ + + + + + +