Files
admin-vben5/apps/web-antd/src/views/property/assetManage/log/data.ts
dev_ljl 01a71ea4c3
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run
feat:工单池选择工单类型
2025-08-06 14:33:02 +08:00

216 lines
3.9 KiB
TypeScript

import type { FormSchemaGetter } from '#/adapter/form';
import type { VxeGridProps } from '#/adapter/vxe-table';
import {getDictOptions} from "#/utils/dict";
import {renderDict} from "#/utils/render";
export const querySchema: FormSchemaGetter = () => [
// {
// component: 'Input',
// fieldName: 'depotId',
// label: '仓库id',
// },
// {
// component: 'Input',
// fieldName: 'assetId',
// label: '资产id',
// },
{
component: 'Select',
componentProps: {
options:getDictOptions('wy_cklzlx')
},
fieldName: 'type',
label: '流转类型',
},
// {
// component: 'DatePicker',
// componentProps: {
// showTime: true,
// format: 'YYYY-MM-DD HH:mm:ss',
// valueFormat: 'YYYY-MM-DD HH:mm:ss',
// },
// fieldName: 'time',
// label: '流转时间',
// },
// {
// component: 'Input',
// fieldName: 'userId',
// label: '操作人id',
// },
// {
// component: 'Input',
// fieldName: 'state',
// label: '状态',
// },
// {
// component: 'Input',
// fieldName: 'price',
// label: '价格',
// },
// {
// component: 'Input',
// fieldName: 'priceSum',
// label: '总价',
// },
// {
// component: 'Input',
// fieldName: 'number',
// label: '数量',
// },
// {
// component: 'Input',
// fieldName: 'supplierId',
// label: '供应商id',
// },
];
// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新
// export const columns: () => VxeGridProps['columns'] = () => [
export const columns: VxeGridProps['columns'] = [
{ type: 'checkbox', width: 60 },
{
title: '仓库',
field: 'depotName',
minWidth:150,
},
{
title: '资产',
field: 'assetName',
width:180,
},
{
title: '流转类型',
field: 'type',
width:120,
slots:{
default:({row})=>{
return renderDict(row.type,'wy_cklzlx')
}
}
},
{
title: '数量',
field: 'number',
width:120,
},
{
title: '流转时间',
field: 'time',
width:150,
},
{
title: '操作人',
field: 'userName',
width:150,
},
{
title: '备注',
field: 'remark',
width:180,
},
// {
// title: '状态',
// field: 'state',
// width:150,
// },
// {
// title: '价格',
// field: 'price',
// },
// {
// title: '总价',
// field: 'priceSum',
// },
// {
// title: '供应商id',
// field: 'supplierId',
// },
// {
// title: '创建时间',
// field: 'createTime',
// },
// {
// field: 'action',
// fixed: 'right',
// slots: { default: 'action' },
// title: '操作',
// width: 180,
// },
];
export const modalSchema: FormSchemaGetter = () => [
{
label: '主键',
fieldName: 'id',
component: 'Input',
dependencies: {
show: () => false,
triggerFields: [''],
},
},
{
label: '仓库id',
fieldName: 'depotId',
component: 'Input',
},
{
label: '资产id',
fieldName: 'assetId',
component: 'Input',
},
{
label: '流转类型',
fieldName: 'type',
component: 'Select',
componentProps: {
},
},
{
label: '流转时间',
fieldName: 'time',
component: 'DatePicker',
componentProps: {
showTime: true,
format: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'YYYY-MM-DD HH:mm:ss',
},
},
{
label: '操作人id',
fieldName: 'userId',
component: 'Input',
},
{
label: '状态',
fieldName: 'state',
component: 'Input',
},
{
label: '备注',
fieldName: 'remark',
component: 'Textarea',
},
{
label: '价格',
fieldName: 'price',
component: 'Input',
},
{
label: '总价',
fieldName: 'priceSum',
component: 'Input',
},
{
label: '数量',
fieldName: 'number',
component: 'Input',
},
{
label: '供应商id',
fieldName: 'supplierId',
component: 'Input',
},
];