feat:【antd】【erp 系统】stock/record 重构代码风格
This commit is contained in:
@@ -6,6 +6,7 @@ import { getDictOptions } from '@vben/hooks';
|
||||
|
||||
import { getProductSimpleList } from '#/api/erp/product/product';
|
||||
import { getWarehouseSimpleList } from '#/api/erp/stock/warehouse';
|
||||
import { getRangePickerDefaultProps } from '#/utils';
|
||||
|
||||
/** 搜索表单 */
|
||||
export function useGridFormSchema(): VbenFormSchema[] {
|
||||
@@ -21,7 +22,6 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
api: getProductSimpleList,
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
filterOption: false,
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -35,7 +35,6 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
api: getWarehouseSimpleList,
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
filterOption: false,
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -62,10 +61,8 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
label: '创建时间',
|
||||
component: 'RangePicker',
|
||||
componentProps: {
|
||||
placeholder: ['开始日期', '结束日期'],
|
||||
showTime: true,
|
||||
format: 'YYYY-MM-DD HH:mm:ss',
|
||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||
...getRangePickerDefaultProps(),
|
||||
allowClear: true,
|
||||
},
|
||||
},
|
||||
];
|
||||
@@ -113,31 +110,19 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
|
||||
field: 'createTime',
|
||||
title: '出入库日期',
|
||||
width: 180,
|
||||
cellRender: {
|
||||
name: 'CellDateTime',
|
||||
},
|
||||
formatter: 'formatDateTime',
|
||||
},
|
||||
{
|
||||
field: 'count',
|
||||
title: '出入库数量',
|
||||
width: 120,
|
||||
cellRender: {
|
||||
name: 'CellAmount',
|
||||
props: {
|
||||
digits: 2,
|
||||
},
|
||||
},
|
||||
formatter: 'formatAmount3',
|
||||
},
|
||||
{
|
||||
field: 'totalCount',
|
||||
title: '库存量',
|
||||
width: 100,
|
||||
cellRender: {
|
||||
name: 'CellAmount',
|
||||
props: {
|
||||
digits: 2,
|
||||
},
|
||||
},
|
||||
formatter: 'formatAmount3',
|
||||
},
|
||||
{
|
||||
field: 'creatorName',
|
||||
|
||||
@@ -41,6 +41,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
||||
},
|
||||
rowConfig: {
|
||||
keyField: 'id',
|
||||
isHover: true,
|
||||
},
|
||||
toolbarConfig: {
|
||||
refresh: true,
|
||||
|
||||
Reference in New Issue
Block a user