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.

125 lines
2.4 KiB

import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const CustomerSaleInvoiceMainRules = reactive({
beforeTaxAmount: [required],
taxRate: [required],
taxAmount: [required],
adTaxAmount: [required],
})
export const CustomerSaleInvoiceMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '单据号',
field: 'number',
sort: 'custom',
isSearch: true,
} ,{
label: '状态',
field: 'status',
sort: 'custom',
isSearch: true,
// 0:新增1:已发布2已作废
},
{
label: '客户对账单单据号',
field: 'customerStatementNumber',
sort: 'custom',
isSearch: true,
},
{
label: '客户代码',
field: 'customer',
sort: 'custom',
isSearch: true,
},
{
label: '客户名称',
field: 'customerName',
sort: 'custom',
},
{
label: '未税金额',
field: 'beforeTaxAmount',
sort: 'custom',
},
{
label: '税率',
field: 'taxRate',
sort: 'custom',
},
{
label: '税额',
field: 'taxAmount',
sort: 'custom',
},
{
label: '价税合计金额',
field: 'adTaxAmount',
sort: 'custom',
},
{
label: '金税票号',
field: 'goldenTaxInvoiceNumber',
sort: 'custom',
},
{
label: '开票日期',
field: 'invoiceTime',
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')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
},
{
label: '备注',
field: 'remark',
sort: 'custom',
},
{
label: '是否可用默认TRUE',
field: 'available',
sort: 'custom',
isTable:false
},
{
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'
}
}
]))