diff --git a/src/views/agvTask/HikAgv.data.ts b/src/views/agvTask/HikAgv.data.ts new file mode 100644 index 0000000..38bb1b2 --- /dev/null +++ b/src/views/agvTask/HikAgv.data.ts @@ -0,0 +1,76 @@ +import { BasicColumn } from '/@/components/Table'; +import { render } from '@/utils/common/renderUtils'; +//列表数据 +export const columns: BasicColumn[] = [ + { + title: '任务ID', + align: 'center', + width: '170px', + dataIndex: 'id', + }, + { + title: '容器', + align: 'center', + width: '120px', + dataIndex: 'carrierCode', + }, + { + title: '业务类型', + align: 'center', + width: '120px', + dataIndex: 'type_dictText', + }, + { + title: '任务状态', + align: 'center', + width: '120px', + dataIndex: 'status_dictText', + customRender: ({ text }) => { + //入库状态:已创建、已审核、收货中、收货完成、已关闭、已取消。 + const statusColorMap = { + 已创建: 'orange', + 执行中: 'cyan', + 已到达: 'blue', + 已完成: 'green', + 已取消: 'red', + }; + const color = statusColorMap[text] || 'red'; + return render.renderTag(text, color); + }, + }, + { + title: '起点', + align: 'center', + width: '120px', + dataIndex: 'startCode', + }, + { + title: '终点', + align: 'center', + width: '120px', + dataIndex: 'endCode', + }, + { + title: '优先级', + align: 'center', + width: '60px', + dataIndex: 'priority', + }, + { + title: '供应商', + align: 'center', + width: '80px', + dataIndex: 'agvVendor_dictText', + }, + { + title: '返回报文', + align: 'center', + dataIndex: 'resMessage', + }, + { + title: '创建时间', + align: 'center', + dataIndex: 'createTime', + sorter: true, + }, +]; diff --git a/src/views/agvTask/AgvTaskList.vue b/src/views/agvTask/HikAgvList.vue similarity index 75% rename from src/views/agvTask/AgvTaskList.vue rename to src/views/agvTask/HikAgvList.vue index 57c1b17..7f209f3 100644 --- a/src/views/agvTask/AgvTaskList.vue +++ b/src/views/agvTask/HikAgvList.vue @@ -3,17 +3,25 @@
- - +
- + - + - diff --git a/src/views/agvTask/components/AgvTaskForm.vue b/src/views/agvTask/components/HikAgvForm.vue similarity index 98% rename from src/views/agvTask/components/AgvTaskForm.vue rename to src/views/agvTask/components/HikAgvForm.vue index 75594a0..5eb2d89 100644 --- a/src/views/agvTask/components/AgvTaskForm.vue +++ b/src/views/agvTask/components/HikAgvForm.vue @@ -89,7 +89,7 @@ id: '', carrierCode: '', carrierType: 'TRAY', - taskType: 'PF-LMR-COMMON', + taskType: '', type: '', status: 'CREATED', priority: 99, @@ -105,7 +105,6 @@ //表单验证 const validatorRules = reactive({ carrierCode: [{ required: true, message: '请选择容器!'},], - taskType: [{ required: true, message: '请输入任务类型!'},], type: [{ required: true, message: '请选择业务类型!'},], priority: [{ required: true, message: '请输入优先级!'},], startCode: [{ required: true, message: '请选择起点!'},], diff --git a/src/views/agvTask/components/HikAgvModal.vue b/src/views/agvTask/components/HikAgvModal.vue new file mode 100644 index 0000000..be87238 --- /dev/null +++ b/src/views/agvTask/components/HikAgvModal.vue @@ -0,0 +1,92 @@ + + + + + + diff --git a/src/views/agvTask/components/TesAgvForm.vue b/src/views/agvTask/components/TesAgvForm.vue new file mode 100644 index 0000000..9fa212d --- /dev/null +++ b/src/views/agvTask/components/TesAgvForm.vue @@ -0,0 +1,212 @@ + + + + + diff --git a/src/views/agvTask/components/TesAgvModal.vue b/src/views/agvTask/components/TesAgvModal.vue new file mode 100644 index 0000000..c7dd636 --- /dev/null +++ b/src/views/agvTask/components/TesAgvModal.vue @@ -0,0 +1,92 @@ + + + + + + diff --git a/src/views/base/point/PointList.vue b/src/views/base/point/PointList.vue index f4cb154..d7626e9 100644 --- a/src/views/base/point/PointList.vue +++ b/src/views/base/point/PointList.vue @@ -7,7 +7,7 @@ - + @@ -93,8 +93,7 @@ import { JInputTypeEnum } from '@/enums/cpteEnum'; import JInput from '../../../components/Form/src/jeecg/components/JInput.vue'; import SwitchStatus from '/@/views/base/SwitchStatus.vue'; - import JSearchSelect from '../../../components/Form/src/jeecg/components/JSearchSelect.vue'; - import { JDictSelectTag } from '@/components/Form'; + import { JDictSelectTag,JSearchSelect } from '@/components/Form'; const fieldPickers = reactive({}); diff --git a/src/views/base/point/components/PointForm.vue b/src/views/base/point/components/PointForm.vue index 6261c8a..29d6a3b 100644 --- a/src/views/base/point/components/PointForm.vue +++ b/src/views/base/point/components/PointForm.vue @@ -6,7 +6,12 @@ - + @@ -66,7 +71,7 @@ import { saveOrUpdate } from '../Point.api'; import { Form } from 'ant-design-vue'; import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue'; - import { JDictSelectTag } from '@/components/Form'; + import { JDictSelectTag, JSearchSelect } from '@/components/Form'; import JSwitch from '@/components/Form/src/jeecg/components/JSwitch.vue'; import { getTenantId } from '@/utils/auth'; diff --git a/src/views/base/stock/StockList.vue b/src/views/base/stock/StockList.vue index c59b41b..812a0a2 100644 --- a/src/views/base/stock/StockList.vue +++ b/src/views/base/stock/StockList.vue @@ -13,7 +13,12 @@ - + @@ -91,8 +96,7 @@ import { useUserStore } from '/@/store/modules/user'; import { useMessage } from '/@/hooks/web/useMessage'; import { getDateByPicker } from '/@/utils'; - import JSearchSelect from '../../../components/Form/src/jeecg/components/JSearchSelect.vue'; - import { JDictSelectTag } from '@/components/Form'; + import { JDictSelectTag, JSearchSelect } from '@/components/Form'; const fieldPickers = reactive({}); diff --git a/src/views/base/stock/components/StockForm.vue b/src/views/base/stock/components/StockForm.vue index d1836eb..d9ed8c2 100644 --- a/src/views/base/stock/components/StockForm.vue +++ b/src/views/base/stock/components/StockForm.vue @@ -27,7 +27,12 @@ - + @@ -55,7 +60,7 @@ import { Form } from 'ant-design-vue'; import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue'; import JSwitch from '@/components/Form/src/jeecg/components/JSwitch.vue'; - import JDictSelectTag from '../../../../components/Form/src/jeecg/components/JDictSelectTag.vue'; + import { JDictSelectTag, JSearchSelect } from '@/components/Form'; import { getTenantId } from '@/utils/auth'; const props = defineProps({ diff --git a/src/views/inventory/Inventory.api.ts b/src/views/inventory/Inventory.api.ts new file mode 100644 index 0000000..4716cfd --- /dev/null +++ b/src/views/inventory/Inventory.api.ts @@ -0,0 +1,72 @@ +import { defHttp } from '/@/utils/http/axios'; +import { useMessage } from "/@/hooks/web/useMessage"; + +const { createConfirm } = useMessage(); + +enum Api { + list = '/inventory/list', + save='/inventory/add', + edit='/inventory/edit', + deleteOne = '/inventory/delete', + deleteBatch = '/inventory/deleteBatch', + importExcel = '/inventory/importExcel', + exportXls = '/inventory/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/inventory/Inventory.data.ts b/src/views/inventory/Inventory.data.ts new file mode 100644 index 0000000..ffe435c --- /dev/null +++ b/src/views/inventory/Inventory.data.ts @@ -0,0 +1,64 @@ +import {BasicColumn} from '/@/components/Table'; +//列表数据 +export const columns: BasicColumn[] = [ + { + title: '容器', + align: "center", + dataIndex: 'stockId_dictText' + }, + { + title: '物料', + align: "center", + dataIndex: 'itemId_dictText' + }, + { + title: '库位', + align: "center", + dataIndex: 'pointId_dictText' + }, + { + title: '数量', + align: "center", + dataIndex: 'quantity' + }, + { + title: '占用数', + align: "center", + dataIndex: 'queuedQty' + }, + { + title: '库存状态', + align: "center", + dataIndex: 'status_dictText' + }, + { + title: '批次号', + align: "center", + dataIndex: 'propC1' + }, + { + title: '外部仓库', + align: "center", + dataIndex: 'whCode' + }, + { + title: '外部库存状态', + align: "center", + dataIndex: 'propC3' + }, + { + title: '生产日期', + align: "center", + dataIndex: 'propD1', + customRender:({text}) =>{ + text = !text ? "" : (text.length > 10 ? text.substr(0,10) : text); + return text; + }, + }, + { + title: '描述', + align: "center", + dataIndex: 'description' + } +]; + diff --git a/src/views/inventory/InventoryList.vue b/src/views/inventory/InventoryList.vue new file mode 100644 index 0000000..39aecb6 --- /dev/null +++ b/src/views/inventory/InventoryList.vue @@ -0,0 +1,288 @@ + + + + + diff --git a/src/views/inventory/V20251108_1__menu_insert_Inventory.sql b/src/views/inventory/V20251108_1__menu_insert_Inventory.sql new file mode 100644 index 0000000..b7464b3 --- /dev/null +++ b/src/views/inventory/V20251108_1__menu_insert_Inventory.sql @@ -0,0 +1,40 @@ +-- 注意:该页面对应的前台目录为views/inventory文件夹下 +-- 如果你想更改到其他目录,请修改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 ('176261038081301', NULL, '库存表', '/inventory/inventoryList', 'inventory/InventoryList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2025-11-08 21:59:40', 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 ('176261038081302', '176261038081301', '添加库存表', NULL, NULL, 0, NULL, NULL, 2, 'inventory:data_inventory:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-11-08 21:59:40', 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 ('176261038081303', '176261038081301', '编辑库存表', NULL, NULL, 0, NULL, NULL, 2, 'inventory:data_inventory:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-11-08 21:59:40', 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 ('176261038081304', '176261038081301', '删除库存表', NULL, NULL, 0, NULL, NULL, 2, 'inventory:data_inventory:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-11-08 21:59:40', 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 ('176261038081305', '176261038081301', '批量删除库存表', NULL, NULL, 0, NULL, NULL, 2, 'inventory:data_inventory:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-11-08 21:59:40', 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 ('176261038081306', '176261038081301', '导出excel_库存表', NULL, NULL, 0, NULL, NULL, 2, 'inventory:data_inventory:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-11-08 21:59:40', 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 ('176261038081307', '176261038081301', '导入excel_库存表', NULL, NULL, 0, NULL, NULL, 2, 'inventory:data_inventory:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-11-08 21:59:40', 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 ('176261038081308', 'f6817f48af4fb3af11b9e8bf182f618b', '176261038081301', NULL, '2025-11-08 21:59:40', '127.0.0.1'); +INSERT INTO sys_role_permission (id, role_id, permission_id, data_rule_ids, operate_date, operate_ip) VALUES ('176261038081309', 'f6817f48af4fb3af11b9e8bf182f618b', '176261038081302', NULL, '2025-11-08 21:59:40', '127.0.0.1'); +INSERT INTO sys_role_permission (id, role_id, permission_id, data_rule_ids, operate_date, operate_ip) VALUES ('176261038081310', 'f6817f48af4fb3af11b9e8bf182f618b', '176261038081303', NULL, '2025-11-08 21:59:40', '127.0.0.1'); +INSERT INTO sys_role_permission (id, role_id, permission_id, data_rule_ids, operate_date, operate_ip) VALUES ('176261038081311', 'f6817f48af4fb3af11b9e8bf182f618b', '176261038081304', NULL, '2025-11-08 21:59:40', '127.0.0.1'); +INSERT INTO sys_role_permission (id, role_id, permission_id, data_rule_ids, operate_date, operate_ip) VALUES ('176261038081312', 'f6817f48af4fb3af11b9e8bf182f618b', '176261038081305', NULL, '2025-11-08 21:59:40', '127.0.0.1'); +INSERT INTO sys_role_permission (id, role_id, permission_id, data_rule_ids, operate_date, operate_ip) VALUES ('176261038081313', 'f6817f48af4fb3af11b9e8bf182f618b', '176261038081306', NULL, '2025-11-08 21:59:40', '127.0.0.1'); +INSERT INTO sys_role_permission (id, role_id, permission_id, data_rule_ids, operate_date, operate_ip) VALUES ('176261038081314', 'f6817f48af4fb3af11b9e8bf182f618b', '176261038081307', NULL, '2025-11-08 21:59:40', '127.0.0.1'); \ No newline at end of file diff --git a/src/views/inventory/components/InventoryForm.vue b/src/views/inventory/components/InventoryForm.vue new file mode 100644 index 0000000..99a35c8 --- /dev/null +++ b/src/views/inventory/components/InventoryForm.vue @@ -0,0 +1,216 @@ + + + + + diff --git a/src/views/agvTask/components/AgvTaskModal.vue b/src/views/inventory/components/InventoryModal.vue similarity index 81% rename from src/views/agvTask/components/AgvTaskModal.vue rename to src/views/inventory/components/InventoryModal.vue index 36e02be..6d53ffa 100644 --- a/src/views/agvTask/components/AgvTaskModal.vue +++ b/src/views/inventory/components/InventoryModal.vue @@ -1,6 +1,6 @@