import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter } from '@/utils/formatTime' // 表单校验 export const SupplierApbalanceMainRules = reactive({ ttCompany: [required], ttSupplier: [required], ttGltype: [required], ttCustorsupp: [required], ttSupplierType: [required], ttGenerateTime: [required], concurrencyStamp: [required], }) export const SupplierApbalanceMain = useCrudSchemas(reactive([ { label: 'ID', field: 'id', sort: 'custom', isForm: false, }, { label: '状态', field: 'replyStatus', sort: 'custom', isSearch: true, dictType: DICT_TYPE.REPLY_STATUS, dictClass: 'string', }, { label: '公司代码', field: 'ttCompany', sort: 'custom', isSearch: true, }, { label: '供应商代码', field: 'ttSupplier', sort: 'custom', isSearch: true, }, { label: '年', field: 'year', sort: 'custom', isSearch: true, }, { label: '月', field: 'month', sort: 'custom', isSearch: true, }, { label: '日', field: 'day', sort: 'custom', isSearch: true, }, // { // label: '账户类型', // field: 'ttGltype', // sort: 'custom', // isSearch: true, // // dictType: DICT_TYPE.TT_GLTYPE, // // dictClass: 'string', // }, { label: '类型固定值', field: 'ttCustorsupp', sort: 'custom', isSearch: false, isTable: false, isForm:false, isDetail:false, }, { label: '供应商类型', field: 'ttSupplierType', sort: 'custom', isSearch: false, isTable: false, isForm:false, isDetail:false, form: { component: 'SelectV2' }, }, { label: '名称1', field: 'ttName1', sort: 'custom', isSearch: false, isTable: false, isForm:false, isDetail:false, }, { label: '名称2', field: 'ttName2', sort: 'custom', isSearch: false, isTable: false, isForm:false, isDetail:false, }, { label: '名称3', field: 'ttName3', sort: 'custom', isSearch: false, isTable: false, isForm:false, isDetail:false, }, { label: '供应商名称', field: 'ttSupplierName', sort: 'custom', isSearch: false, }, // { // label: '生成时间', // field: 'ttGenerateTime', // sort: 'custom', // formatter: dateFormatter, // isSearch: true, // 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')] // } // }, // detail: { // dateFormat: 'YYYY-MM-DD HH:mm:ss' // }, // form: { // component: 'DatePicker', // componentProps: { // type: 'datetime', // valueFormat: 'x' // } // }, // }, { label: '应付挂账金额', field: 'ttAccountAp', sort: 'custom', isSearch: false, }, { label: '其他应付金额', field: 'ttAccountOthap', sort: 'custom', isSearch: false, }, { label: '预付金额', field: 'ttAccountPrepay', sort: 'custom', isSearch: false, }, { label: '付款周期', field: 'ttCreditTerm', sort: 'custom', isSearch: false, isTable: false, isForm:false, isDetail:false, }, { label: '创建时间', field: 'createTime', sort: 'custom', formatter: dateFormatter, isSearch: false, isTable: true, isForm:false, isDetail:false, 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')] } }, }, { label: '创建人', field: 'creator', sort: 'custom', isSearch: false, isTable: true, isForm:false, isDetail:false, }, { label: '部门id', field: 'departmentCode', sort: 'custom', isSearch: false, isTable: false, isForm:false, isDetail:false, }, { label: '备注', field: 'remark', sort: 'custom', isSearch: false, }, { label: '地点ID', field: 'siteId', sort: 'custom', isSearch: false, isTable: false, isForm:false, isDetail:false, }, { label: '是否可用默认TRUE', field: 'available', sort: 'custom', isSearch: false, isTable: false, isForm:false, isDetail:false, }, { label: '删除时间', field: 'deletionTime', sort: 'custom', formatter: dateFormatter, isSearch: false, isTable: false, isForm:false, isDetail:false, 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')] } }, form: { component: 'DatePicker', componentProps: { type: 'datetime', valueFormat: 'x' } }, }, { label: '删除人id', field: 'deleterId', sort: 'custom', isSearch: false, isTable: false, isForm:false, isDetail:false, }, { label: '并发乐观锁', field: 'concurrencyStamp', sort: 'custom', isSearch: false, isTable: false, isForm:false, isDetail:false, form: { component: 'InputNumber', value: 0 }, }, { label: '操作', field: 'action', isForm: false, isDetail:false, table: { width: 150, fixed: 'right' } } ]))