From 73c401477c1f240bfed3ccf93ea0ea3cac0256e6 Mon Sep 17 00:00:00 2001
From: liyongde <1419499670@qq.com>
Date: Wed, 22 Jul 2026 13:24:30 +0800
Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E8=BD=BD=E5=85=B7=E4=BF=A1?=
=?UTF-8?q?=E6=81=AF=E8=A1=A81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/main/resources/application-dev.yaml | 4 +-
.../src/api/wms/groupplate/index.ts | 2 +-
.../src/api/wms/storagevehicleinfo/index.ts | 2 +-
.../src/views/wms/groupplate/index.vue | 372 +++++++++---------
.../src/views/wms/groupplate/modules/form.vue | 6 +-
.../src/views/wms/storagevehicleinfo/data.ts | 85 ++--
.../views/wms/storagevehicleinfo/index.vue | 372 +++++++++---------
.../wms/storagevehicleinfo/modules/form.vue | 6 +-
.../src/views/wms/warehousestrategy/data.ts | 2 +-
.../packages/constants/src/dict-enum.ts | 2 +
10 files changed, 436 insertions(+), 417 deletions(-)
diff --git a/nl-server/src/main/resources/application-dev.yaml b/nl-server/src/main/resources/application-dev.yaml
index d852c77d..4d76d57a 100644
--- a/nl-server/src/main/resources/application-dev.yaml
+++ b/nl-server/src/main/resources/application-dev.yaml
@@ -47,12 +47,12 @@ spring:
primary: master
datasource:
master:
- url: jdbc:mysql://127.0.0.1:3306/huachuang_lms_dev?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
+ url: jdbc:mysql://192.168.10.41:3306/huachuang_lms_dev?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
username: root
password: root
slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
lazy: true # 开启懒加载,保证启动速度
- url: jdbc:mysql://127.0.0.1:3306/huachuang_lms_dev?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
+ url: jdbc:mysql://192.168.10.41:3306/huachuang_lms_dev?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
username: root
password: root
diff --git a/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/api/wms/groupplate/index.ts b/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/api/wms/groupplate/index.ts
index 9efd9a02..bf258969 100644
--- a/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/api/wms/groupplate/index.ts
+++ b/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/api/wms/groupplate/index.ts
@@ -5,7 +5,7 @@ import { requestClient } from '#/api/request';
export namespace WmsGroupPlateApi {
/** 组盘记录信息 */
export interface GroupPlate {
- groupId: string;
+ groupId?: number;
vehicleCode: string; // 载具编码
status?: string; // 状态
materialId: string; // 物料id
diff --git a/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/api/wms/storagevehicleinfo/index.ts b/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/api/wms/storagevehicleinfo/index.ts
index dbf9f062..4ca45508 100644
--- a/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/api/wms/storagevehicleinfo/index.ts
+++ b/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/api/wms/storagevehicleinfo/index.ts
@@ -5,7 +5,7 @@ import { requestClient } from '#/api/request';
export namespace WmsStorageVehicleInfoApi {
/** 载具信息信息 */
export interface StorageVehicleInfo {
- storageVehicleId?: string;
+ storageVehicleId?: number;
storageVehicleCode?: string; // 载具编码
storageVehicleName: string; // 载具名称
oneCode: string; // 一维码
diff --git a/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/wms/groupplate/index.vue b/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/wms/groupplate/index.vue
index f9f194be..ffb22cfa 100644
--- a/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/wms/groupplate/index.vue
+++ b/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/wms/groupplate/index.vue
@@ -1,186 +1,186 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/wms/groupplate/modules/form.vue b/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/wms/groupplate/modules/form.vue
index 652f767d..b580376d 100644
--- a/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/wms/groupplate/modules/form.vue
+++ b/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/wms/groupplate/modules/form.vue
@@ -115,7 +115,7 @@ const [Modal, modalApi] = useVbenModal({
// 提交表单
const data = (await formApi.getValues()) as WmsGroupPlateApi.GroupPlate;
try {
- await (formData.value?.id ? updateGroupPlate(data) : createGroupPlate(data));
+ await (formData.value?.groupId ? updateGroupPlate(data) : createGroupPlate(data));
// 关闭并提示
await modalApi.close();
emit('success');
@@ -131,12 +131,12 @@ const [Modal, modalApi] = useVbenModal({
}
// 加载数据
const data = modalApi.getData();
- if (!data || !data.id) {
+ if (!data || !data.groupId) {
return;
}
modalApi.lock();
try {
- formData.value = await getGroupPlate(data.id);
+ formData.value = await getGroupPlate(data.groupId);
// 设置到 values
await formApi.setValues(formData.value);
} finally {
diff --git a/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/wms/storagevehicleinfo/data.ts b/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/wms/storagevehicleinfo/data.ts
index f7493ae3..8af8fd65 100644
--- a/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/wms/storagevehicleinfo/data.ts
+++ b/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/wms/storagevehicleinfo/data.ts
@@ -3,6 +3,8 @@ import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import type { WmsStorageVehicleInfoApi } from '#/api/wms/storagevehicleinfo';
import { getRangePickerDefaultProps } from '#/utils';
+import {getDictOptions} from "@vben/hooks";
+import {DICT_TYPE} from "@vben/constants";
/** 新增/修改的表单 */
export function useFormSchema(): VbenFormSchema[] {
@@ -54,10 +56,11 @@ export function useFormSchema(): VbenFormSchema[] {
rules: 'required',
component: 'RadioGroup',
componentProps: {
- options: [],
+ options: getDictOptions(DICT_TYPE.COMMON_TRUE_FALSE, 'boolean'),
buttonStyle: 'solid',
optionType: 'button',
},
+ defaultValue: true,
},
{
fieldName: 'storageVehicleType',
@@ -65,39 +68,47 @@ export function useFormSchema(): VbenFormSchema[] {
rules: 'required',
component: 'Select',
componentProps: {
- options: [],
+ options: getDictOptions(DICT_TYPE.WMS_VEHICLE_TYPE),
placeholder: '请选择载具类型',
},
},
{
fieldName: 'vehicleWidth',
label: '载具宽度',
- component: 'Input',
+ component: 'InputNumber',
componentProps: {
+ class: '!w-full',
+ min: 0,
placeholder: '请输入载具宽度',
},
},
{
fieldName: 'vehicleLong',
label: '载具长度',
- component: 'Input',
+ component: 'InputNumber',
componentProps: {
+ class: '!w-full',
+ min: 0,
placeholder: '请输入载具长度',
},
},
{
fieldName: 'vehicleHeight',
label: '载具高度',
- component: 'Input',
+ component: 'InputNumber',
componentProps: {
+ class: '!w-full',
+ min: 0,
placeholder: '请输入载具高度',
},
},
{
fieldName: 'weigth',
label: '托盘重量',
- component: 'Input',
+ component: 'InputNumber',
componentProps: {
+ class: '!w-full',
+ min: 0,
placeholder: '请输入托盘重量',
},
},
@@ -107,23 +118,25 @@ export function useFormSchema(): VbenFormSchema[] {
rules: 'required',
component: 'Select',
componentProps: {
- options: [],
+ options: getDictOptions(DICT_TYPE.WMS_OVER_STRUCT_TYPE),
placeholder: '请选择载具是否超仓位',
},
+ defaultValue: '00'
},
{
fieldName: 'occupyStructQty',
label: '占仓位数',
rules: 'required',
- component: 'Input',
+ component: 'InputNumber',
componentProps: {
+ class: '!w-full',
+ min: 0,
placeholder: '请输入占仓位数',
},
},
{
fieldName: 'boxNo',
label: '木箱号',
- rules: 'required',
component: 'Input',
componentProps: {
placeholder: '请输入木箱号',
@@ -153,24 +166,6 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请输入载具名称',
},
},
- {
- fieldName: 'oneCode',
- label: '一维码',
- component: 'Input',
- componentProps: {
- allowClear: true,
- placeholder: '请输入一维码',
- },
- },
- {
- fieldName: 'twoCode',
- label: '二维码',
- component: 'Input',
- componentProps: {
- allowClear: true,
- placeholder: '请输入二维码',
- },
- },
{
fieldName: 'isUsed',
label: '是否启用',
@@ -187,15 +182,17 @@ export function useGridFormSchema(): VbenFormSchema[] {
component: 'Select',
componentProps: {
allowClear: true,
- options: [],
+ options: getDictOptions(DICT_TYPE.WMS_VEHICLE_TYPE),
placeholder: '请选择载具类型',
},
},
{
fieldName: 'vehicleWidth',
label: '载具宽度',
- component: 'Input',
+ component: 'InputNumber',
componentProps: {
+ class: '!w-full',
+ min: 0,
allowClear: true,
placeholder: '请输入载具宽度',
},
@@ -203,8 +200,10 @@ export function useGridFormSchema(): VbenFormSchema[] {
{
fieldName: 'vehicleLong',
label: '载具长度',
- component: 'Input',
+ component: 'InputNumber',
componentProps: {
+ class: '!w-full',
+ min: 0,
allowClear: true,
placeholder: '请输入载具长度',
},
@@ -212,8 +211,10 @@ export function useGridFormSchema(): VbenFormSchema[] {
{
fieldName: 'vehicleHeight',
label: '载具高度',
- component: 'Input',
+ component: 'InputNumber',
componentProps: {
+ class: '!w-full',
+ min: 0,
allowClear: true,
placeholder: '请输入载具高度',
},
@@ -221,8 +222,10 @@ export function useGridFormSchema(): VbenFormSchema[] {
{
fieldName: 'weigth',
label: '托盘重量',
- component: 'Input',
+ component: 'InputNumber',
componentProps: {
+ class: '!w-full',
+ min: 0,
allowClear: true,
placeholder: '请输入托盘重量',
},
@@ -233,15 +236,17 @@ export function useGridFormSchema(): VbenFormSchema[] {
component: 'Select',
componentProps: {
allowClear: true,
- options: [],
+ options: getDictOptions(DICT_TYPE.WMS_OVER_STRUCT_TYPE, 'boolean'),
placeholder: '请选择载具是否超仓位',
},
},
{
fieldName: 'occupyStructQty',
label: '占仓位数',
- component: 'Input',
+ component: 'InputNumber',
componentProps: {
+ class: '!w-full',
+ min: 0,
allowClear: true,
placeholder: '请输入占仓位数',
},
@@ -295,11 +300,19 @@ export function useGridColumns(): VxeTableGridOptions
-import type { VxeTableGridOptions } from '#/adapter/vxe-table';
-import type { WmsStorageVehicleInfoApi } from '#/api/wms/storagevehicleinfo';
-
-import { ref } from 'vue';
-
-import { confirm, Page, useVbenModal } from '@vben/common-ui';
-import { downloadFileFromBlobPart, isEmpty } from '@vben/utils';
-
-import { message } from 'antdv-next';
-
-import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
-import {
- deleteStorageVehicleInfo,
- deleteStorageVehicleInfoList,
- exportStorageVehicleInfo,
- getStorageVehicleInfoPage,
-} from '#/api/wms/storagevehicleinfo';
-import { $t } from '#/locales';
-
-import { useGridColumns, useGridFormSchema } from './data';
-import Form from './modules/form.vue';
-
-const [FormModal, formModalApi] = useVbenModal({
- connectedComponent: Form,
- destroyOnClose: true,
-});
-
-/** 刷新表格 */
-function handleRefresh() {
- gridApi.query();
-}
-
-/** 创建载具信息 */
-function handleCreate() {
- formModalApi.setData(null).open();
-}
-
-/** 编辑载具信息 */
-function handleEdit(row: WmsStorageVehicleInfoApi.StorageVehicleInfo) {
- formModalApi.setData(row).open();
-}
-
-/** 删除载具信息 */
-async function handleDelete(row: WmsStorageVehicleInfoApi.StorageVehicleInfo) {
- const hideLoading = message.loading({
- content: $t('ui.actionMessage.deleting', [row.id]),
- duration: 0,
- });
- try {
- await deleteStorageVehicleInfo(row.id!);
- message.success($t('ui.actionMessage.deleteSuccess', [row.id]));
- handleRefresh();
- } finally {
- hideLoading();
- }
-}
-
-/** 批量删除载具信息 */
-async function handleDeleteBatch() {
- await confirm($t('ui.actionMessage.deleteBatchConfirm'));
- const hideLoading = message.loading({
- content: $t('ui.actionMessage.deletingBatch'),
- duration: 0,
- });
- try {
- await deleteStorageVehicleInfoList(checkedIds.value);
- checkedIds.value = [];
- message.success($t('ui.actionMessage.deleteSuccess'));
- handleRefresh();
- } finally {
- hideLoading();
- }
-}
-
-const checkedIds = ref([]);
-function handleRowCheckboxChange({
- records,
-}: {
- records: WmsStorageVehicleInfoApi.StorageVehicleInfo[];
-}) {
- checkedIds.value = records.map((item) => item.id!);
-}
-
-/** 导出表格 */
-async function handleExport() {
- const data = await exportStorageVehicleInfo(await gridApi.formApi.getValues());
- downloadFileFromBlobPart({ fileName: '载具信息.xls', source: data });
-}
-
-
-const [Grid, gridApi] = useVbenVxeGrid({
- formOptions: {
- schema: useGridFormSchema(),
- },
- gridOptions: {
- columns: useGridColumns(),
- height: 'auto',
- keepSource: true,
- proxyConfig: {
- ajax: {
- query: async ({ page }, formValues) => {
- return await getStorageVehicleInfoPage({
- pageNo: page.currentPage,
- pageSize: page.pageSize,
- ...formValues,
- });
- },
- },
- },
- rowConfig: {
- keyField: 'id',
- isHover: true,
- },
- toolbarConfig: {
- refresh: true,
- search: true,
- },
- } as VxeTableGridOptions,
- gridEvents: {
- checkboxAll: handleRowCheckboxChange,
- checkboxChange: handleRowCheckboxChange,
- },
-});
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/wms/storagevehicleinfo/modules/form.vue b/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/wms/storagevehicleinfo/modules/form.vue
index e165c5a4..610bf122 100644
--- a/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/wms/storagevehicleinfo/modules/form.vue
+++ b/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/wms/storagevehicleinfo/modules/form.vue
@@ -44,7 +44,7 @@ const [Modal, modalApi] = useVbenModal({
// 提交表单
const data = (await formApi.getValues()) as WmsStorageVehicleInfoApi.StorageVehicleInfo;
try {
- await (formData.value?.id ? updateStorageVehicleInfo(data) : createStorageVehicleInfo(data));
+ await (formData.value?.storageVehicleId ? updateStorageVehicleInfo(data) : createStorageVehicleInfo(data));
// 关闭并提示
await modalApi.close();
emit('success');
@@ -60,12 +60,12 @@ const [Modal, modalApi] = useVbenModal({
}
// 加载数据
const data = modalApi.getData();
- if (!data || !data.id) {
+ if (!data || !data.storageVehicleId) {
return;
}
modalApi.lock();
try {
- formData.value = await getStorageVehicleInfo(data.id);
+ formData.value = await getStorageVehicleInfo(data.storageVehicleId);
// 设置到 values
await formApi.setValues(formData.value);
} finally {
diff --git a/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/wms/warehousestrategy/data.ts b/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/wms/warehousestrategy/data.ts
index cafef695..d8ec9549 100644
--- a/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/wms/warehousestrategy/data.ts
+++ b/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/apps/web-antdv-next/src/views/wms/warehousestrategy/data.ts
@@ -21,7 +21,7 @@ function getClassTypeLabel(classType?: string): string {
if (!classTypeLabelMap[classType]) {
const dictOptions = getDictOptions(DICT_TYPE.WMS_STRATEGY_CLASS_TYPE);
for (const opt of dictOptions) {
- classTypeLabelMap[opt.value] = opt.label;
+ classTypeLabelMap[String(opt.value)] = opt.label;
}
}
return classTypeLabelMap[classType] || classType;
diff --git a/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/packages/constants/src/dict-enum.ts b/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/packages/constants/src/dict-enum.ts
index d5e726d7..14f2124e 100644
--- a/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/packages/constants/src/dict-enum.ts
+++ b/nl-ui/nl-ui-admin-vben/yudao-ui-admin-vben/packages/constants/src/dict-enum.ts
@@ -285,6 +285,8 @@ const WMS_DICT = {
WMS_LOCK_TYPE: 'wms_lock_type', // WMS 锁定类型
WMS_STRATEGY_CLASS_TYPE: 'wms_strategy_class_type', // WMS 处理类类型
WMS_GROUP_PLATE_STATUS: 'wms_group_plate_status', // 组盘记录
+ WMS_VEHICLE_TYPE: 'wms_vehicle_type', // 载具类型
+ WMS_OVER_STRUCT_TYPE: 'wms_over_struct_type', // 是否超限
} as const;
/** ========== TASK - 任务管理模块 ========== */