feat:新增出库单新增功能

This commit is contained in:
zhouz
2026-07-23 13:28:17 +08:00
parent 25cbaf9078
commit 05c3d92abf
15 changed files with 335 additions and 308 deletions

View File

@@ -3,6 +3,16 @@ import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import type { WmsIostorInvApi } from '#/api/wms/iostorinv';
import { getRangePickerDefaultProps } from '#/utils';
import { getBsrealStorAttrSimpleList } from '#/api/wms/bsrealstorattr';
import {getDictOptions} from "@vben/hooks";
import {DICT_TYPE} from "@vben/constants";
// ========== 启用的仓库下拉 ==========
async function loadWarehouseList() {
const data = await getBsrealStorAttrSimpleList();
return data || [];
}
/** 新增/修改的表单 */
export function useFormSchema(): VbenFormSchema[] {
@@ -260,7 +270,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
component: 'Select',
componentProps: {
allowClear: true,
options: [],
options: getDictOptions(DICT_TYPE.WMS_OUT_BILL_TYPE),
placeholder: '请选择单据类型',
},
},
@@ -275,11 +285,14 @@ export function useGridFormSchema(): VbenFormSchema[] {
},
{
fieldName: 'storId',
label: '仓库标识',
component: 'Input',
label: '仓库',
component: 'ApiSelect',
componentProps: {
api: loadWarehouseList,
labelField: 'storName',
valueField: 'storId',
placeholder: '请选择仓库',
allowClear: true,
placeholder: '请输入仓库标识',
},
},
{
@@ -288,7 +301,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
component: 'Select',
componentProps: {
allowClear: true,
options: [],
options: getDictOptions(DICT_TYPE.WMS_IO_BILL_STATUS),
placeholder: '请选择单据状态',
},
},
@@ -303,11 +316,12 @@ export function useGridFormSchema(): VbenFormSchema[] {
},
{
fieldName: 'isUpload',
label: '是否回传',
component: 'Input',
label: '是否回传',
component: 'Select',
componentProps: {
allowClear: true,
placeholder: '请输入是否已回传',
options: getDictOptions(DICT_TYPE.COMMON_TRUE_FALSE, 'boolean'),
placeholder: '请选择是否回传',
},
}
];
@@ -331,11 +345,11 @@ export function useGridColumns(): VxeTableGridOptions<WmsIostorInvApi.IostorInv>
field: 'bizDate',
title: '业务日期',
minWidth: 120,
formatter: 'formatDateTime',
formatter: 'formatDate',
},
{
field: 'storId',
title: '仓库标识',
field: 'storName',
title: '仓库',
minWidth: 120,
},
{
@@ -372,6 +386,10 @@ export function useGridColumns(): VxeTableGridOptions<WmsIostorInvApi.IostorInv>
field: 'billStatus',
title: '单据状态',
minWidth: 120,
cellRender: {
name: 'CellDict',
props: { type: DICT_TYPE.WMS_IO_BILL_STATUS },
},
},
{
field: 'remark',
@@ -382,6 +400,10 @@ export function useGridColumns(): VxeTableGridOptions<WmsIostorInvApi.IostorInv>
field: 'createMode',
title: '生成方式',
minWidth: 120,
cellRender: {
name: 'CellDict',
props: { type: DICT_TYPE.WMS_CREATE_TYPE },
},
},
{
field: 'createTime',
@@ -444,4 +466,3 @@ export function useGridColumns(): VxeTableGridOptions<WmsIostorInvApi.IostorInv>
},
];
}

View File

@@ -287,6 +287,9 @@ const WMS_DICT = {
WMS_GROUP_PLATE_STATUS: 'wms_group_plate_status', // 组盘记录
WMS_VEHICLE_TYPE: 'wms_vehicle_type', // 载具类型
WMS_OVER_STRUCT_TYPE: 'wms_over_struct_type', // 是否超限
WMS_OUT_BILL_TYPE: 'wms_out_bill_type', // 出库单据类型
WMS_IO_BILL_STATUS: 'wms_io_bill_status', // 出入库单据状态
WMS_CREATE_TYPE: 'wms_create_type', // 生成方式
} as const;
/** ========== TASK - 任务管理模块 ========== */