You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
|
|
|
|
import { dateFormatter } from '@/utils/formatTime'
|
|
|
|
|
|
|
|
// 表单校验
|
|
|
|
export const SubjectAccountRules = reactive({
|
|
|
|
code: [required],
|
|
|
|
usageDescription: [required],
|
|
|
|
costecentreId: [required],
|
|
|
|
costecentreCode: [required],
|
|
|
|
costecentreType: [required],
|
|
|
|
projectId: [required],
|
|
|
|
projectCode: [required],
|
|
|
|
available: [required],
|
|
|
|
concurrencyStamp: [required],
|
|
|
|
})
|
|
|
|
|
|
|
|
export const SubjectAccount = useCrudSchemas(reactive<CrudSchema[]>([
|
|
|
|
{
|
|
|
|
label: 'id',
|
|
|
|
field: 'id',
|
|
|
|
sort: 'custom',
|
|
|
|
isForm: false,
|
|
|
|
isTable:false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '代码',
|
|
|
|
field: 'code',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '领用描述',
|
|
|
|
field: 'usageDescription',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '成本中心ID111',
|
|
|
|
field: 'costecentreId',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: false,
|
|
|
|
isTable:false,
|
|
|
|
disabled:true,
|
|
|
|
from:{
|
|
|
|
componentProps:{
|
|
|
|
disabled:true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '成本中心代码',
|
|
|
|
field: 'costecentreCode',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '成本中心类型',
|
|
|
|
field: 'costecentreType',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '项目ID',
|
|
|
|
field: 'projectId',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: false,
|
|
|
|
isTable:false,
|
|
|
|
disabled:true,
|
|
|
|
from:{
|
|
|
|
componentProps:{
|
|
|
|
disabled:true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '项目代码',
|
|
|
|
field: 'projectCode',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '科目',
|
|
|
|
field: 'address',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '是否可用',
|
|
|
|
field: 'available',
|
|
|
|
sort: 'custom',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '备注',
|
|
|
|
field: 'remark',
|
|
|
|
sort: 'custom',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '创建时间',
|
|
|
|
field: 'createTime',
|
|
|
|
sort: 'custom',
|
|
|
|
formatter: dateFormatter,
|
|
|
|
search: {
|
|
|
|
component: 'DatePicker',
|
|
|
|
componentProps: {
|
|
|
|
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
|
|
|
type: 'daterange',
|
|
|
|
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
isForm: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '操作',
|
|
|
|
field: 'action',
|
|
|
|
isForm: false,
|
|
|
|
table: {
|
|
|
|
width: 150,
|
|
|
|
fixed: 'right'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]))
|