localhost_oa_front/src/views/meterials-inventory/in-out/formSchemas.ts

116 lines
2.7 KiB
TypeScript

import type { FormSchema } from '@/components/core/schema-form/';
import { ContractStatusEnum } from '@/enums/contractEnum';
import { formatStatus } from './columns';
export const contractSchemas = (
contractTypes: API.DictItemEntity[],
): FormSchema<API.ContractEntity>[] => [
// {
// field: 'contractNumber',
// component: 'Input',
// label: '合同编号',
// rules: [{ required: true, type: 'string' }],
// colProps: {
// span: 12,
// },
// },
// {
// field: 'title',
// component: 'Input',
// label: '合同标题',
// rules: [{ required: true, type: 'string' }],
// colProps: {
// span: 12,
// },
// },
// {
// field: 'partyA',
// component: 'Input',
// label: '甲方',
// rules: [{ required: true, type: 'string' }],
// colProps: {
// span: 12,
// },
// },
// {
// field: 'partyB',
// component: 'Input',
// label: '乙方',
// rules: [{ required: true, type: 'string' }],
// colProps: {
// span: 12,
// },
// },
// {
// field: 'signingDate',
// label: '签订时间',
// component: 'DatePicker',
// // defaultValue: new Date(),
// colProps: { span: 12 },
// componentProps: {},
// },
// {
// field: 'deliveryDeadline',
// label: '交付期限',
// component: 'DatePicker',
// // defaultValue: new Date(),
// colProps: { span: 12 },
// },
// {
// field: 'type',
// label: '合同类型',
// component: 'Select',
// required: true,
// colProps: {
// span: 12,
// },
// componentProps: {
// options: contractTypes.map(({ label, id }) => ({ value: id, label })),
// },
// },
// {
// field: 'status',
// label: '审核结果',
// component: 'Select',
// required:true,
// defaultValue: 0,
// colProps: {
// span: 12,
// },
// componentProps: {
// allowClear: false,
// options: Object.values(ContractStatusEnum)
// .filter((value) => typeof value === 'number')
// .map((item) => formatStatus(item as ContractStatusEnum)),
// },
// },
// {
// field: 'remark',
// component: 'InputTextArea',
// label: '备注',
// },
// {
// field: 'menuIds',
// component: 'Tree',
// label: '菜单权限',
// componentProps: {
// checkable: true,
// vModelKey: 'checkedKeys',
// fieldNames: {
// title: 'name',
// key: 'id',
// },
// style: {
// height: '350px',
// paddingTop: '5px',
// overflow: 'auto',
// borderRadius: '6px',
// border: '1px solid #dcdfe6',
// resize: 'vertical',
// },
// },
// },
];