feat:出库记录
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run

This commit is contained in:
2025-08-04 17:27:37 +08:00
parent 28295b283e
commit 98d6dd0d9b
9 changed files with 391 additions and 296 deletions

View File

@@ -6,7 +6,7 @@ import { DictEnum } from '@vben/constants';
export const querySchema: FormSchemaGetter = () => [
export const querySchema: FormSchemaGetter = (assetTypeOptions) => [
{
component: 'Input',
fieldName: 'name',
@@ -14,6 +14,9 @@ export const querySchema: FormSchemaGetter = () => [
},
{
component: 'Select',
componentProps:{
options: assetTypeOptions
},
fieldName: 'model',
label: '资产类型',
},
@@ -32,54 +35,50 @@ export const querySchema: FormSchemaGetter = () => [
// export const columns: () => VxeGridProps['columns'] = () => [
export const columns: VxeGridProps['columns'] = [
{type: 'checkbox', width: 60},
{
title: '序号',
field: 'id',
slots: {
default: ({ rowIndex }) => {
return (rowIndex + 1).toString();
},
},
},
{
title: '资产名称',
field: 'name',
minWidth: 180,
},
{
title: '资产类型',
field: 'modelName',
width: 150,
},
{
title: '规格',
field: 'specs',
width: 100,
},
{
title: '价格',
field: 'price',
},
{
title: '库存',
field: 'stock',
width: 100,
},
{
title: '计量单位',
field: 'unit',
},
{
title: '仓库',
field: 'depotName',
},
{
title: '描述信息',
field: 'msg',
width: 100,
},
{
title: '供应商',
field: 'suppliersName',
width: 180,
},
{
title: '仓库',
field: 'depotName',
width: 180,
},
{
title: '库存',
field: 'stock',
width: 100,
},
{
title: '入库时间',
field: 'storageTime',
width: 150,
},
{
title: '固定资产',
@@ -89,10 +88,12 @@ export const columns: VxeGridProps['columns'] = [
return renderDict(row.type, DictEnum.WY_SF);
},
},
width: 80,
},
{
title: '创建时间',
field: 'createTime',
title: '描述信息',
field: 'msg',
width: 150,
},
{
field: 'action',
@@ -117,46 +118,56 @@ export const modalSchema: FormSchemaGetter = () => [
label: '资产名称',
fieldName: 'name',
component: 'Input',
rules:'required',
},
{
label: '类型',
fieldName: 'model',
component: 'Select',
rules:'selectRequired',
},
{
label: '规格',
fieldName: 'specs',
component: 'Textarea',
component: 'Input',
rules:'required',
},
{
label: '价格',
fieldName: 'price',
component: 'Input',
component: 'InputNumber',
componentProps:{
min:0,
precision:2,
},
rules:'required',
},
{
label: '库存',
fieldName: 'stock',
component: 'Input',
component: 'InputNumber',
componentProps:{
min:0,
},
rules:'required',
},
{
label: '计量单位',
fieldName: 'unit',
component: 'Input',
rules:'required',
},
{
label: '仓库',
fieldName: 'depotId',
component: 'Select',
rules:'required',
},
{
label: '描述信息',
fieldName: 'msg',
component: 'Textarea',
},
{
label: '供应商id',
label: '供应商',
fieldName: 'suppliersId',
component: 'Select',
rules:'required',
},
{
label: '入库时间',
@@ -167,13 +178,23 @@ export const modalSchema: FormSchemaGetter = () => [
format: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'YYYY-MM-DD HH:mm:ss',
},
rules:'required',
},
{
label: '固定资产类型',
label: '是否固定资产',
fieldName: 'type',
component: 'Select',
component: 'RadioGroup',
componentProps: {
buttonStyle: 'solid',
options: getDictOptions('wy_sf'),
},
defaultValue:'0',
rules:'required',
},
{
label: '描述信息',
fieldName: 'msg',
component: 'Textarea',
formItemClass:'col-span-2'
},
];