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.

576 lines
10 KiB

import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const CustomerStatementMainRules = reactive({
customerCode: [required],
customerName: [required],
yearsMonth: [required],
})
export const CustomerStatementMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: 'id',
field: 'id',
isDetail:false,
sort: 'custom',
isTable: false,
isForm: false,
},
{
label: '单据号',
field: 'number',
sort: 'custom',
isSearch: true,
},
{
label: '客户编号',
field: 'customerCode',
sort: 'custom',
isSearch: true,
},
{
label: '客户名称',
field: 'customerName',
sort: 'custom',
isSearch: false,
},
{
label: '年月',
field: 'yearsMonth',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
detail: {
dateFormat: 'YYYY-MM'
},
table: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'YYYY-MM'
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'YYYY-MM'
}
},
},
{
label: '状态',
field: 'status',
sort: 'custom',
dictType: DICT_TYPE.CUSTOMER_STATEMENT_TYPE,
dictClass: 'string',
isSearch: true,
form: {
//value: '',//可以添加默认值 有无都可
component: 'Select',
},
},
{
label: '重新比对时间',
field: 'comparisonTime',
sort: 'custom',
isTable:false,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
},
{
label: '发布时间',
field: 'publishTime',
sort: 'custom',
isTable:false,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
},
{
label: '已分摊时间',
field: 'shareTime',
sort: 'custom',
isTable:false,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
},
{
label: '待开票时间',
field: 'beInvoicedTime',
sort: 'custom',
isTable:false,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
},
{
label: '开票中时间',
field: 'invoicedTime',
sort: 'custom',
isTable:false,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
},
{
label: '已开票时间',
field: 'issuedInvoicedTime',
sort: 'custom',
isTable:false,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
},
{
label: '已作废时间',
field: 'abrogateTime',
sort: 'custom',
isTable:false,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
formatter: dateFormatter,
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
},
{
label: '操作人',
field: 'creator',
sort: 'custom',
},
{
label: '版本号',
field: 'versionNumber',
sort: 'custom',
},
// {
// label: '备注',
// field: 'remark',
// sort: 'custom',
// },
// {
// label: '是否可用默认TRUE',
// field: 'available',
// sort: 'custom',
// },
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
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: '地点ID',
// field: 'siteId',
// sort: 'custom',
// },
// {
// label: '并发乐观锁',
// field: 'concurrencyStamp',
// sort: 'custom',
// },
{
label: '操作',
isDetail:false,
field: 'action',
isForm: false,
table: {
width: 300,
fixed: 'right'
}
}
]))
// 表单校验
export const CustomerStatementDetailRules = reactive({
releaseNumber: [required],
ingress: [required],
ingress2: [required],
itemCode: [required],
articleNumber: [required],
articleName: [required],
checkTime: [required],
uom: [required],
qty: [required],
price: [required],
amount: [required],
})
export const CustomerStatementDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '单据号',
field: 'number',
sort: 'custom',
isSearch: true,
isForm: false,
},
{
label: '开票种类',
field: 'invoiceType',
sort: 'custom',
form: {
component: 'SelectV2'
},
isForm: false,
},
{
label: '发行NO',
field: 'releaseNumber',
sort: 'custom',
isSearch: true,
isForm: false,
},
{
label: '受入',
field: 'ingress',
sort: 'custom',
isForm: false,
},
{
label: '受入2',
field: 'ingress2',
sort: 'custom',
isForm: false,
},
{
label: '品番',
field: 'itemCode',
sort: 'custom',
isSearch: true,
isForm: false,
},
{
label: '品番2',
field: 'articleNumber',
sort: 'custom',
isSearch: true,
isForm: false,
},
{
label: '品名',
field: 'articleName',
sort: 'custom',
isSearch: true,
isForm: false,
},
{
label: '验收年月日',
field: 'checkTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
isForm: 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: '单位',
field: 'uom',
sort: 'custom',
isForm: false,
},
{
label: '数量',
field: 'qty',
sort: 'custom',
isForm: false,
},
{
label: '单价',
field: 'price',
sort: 'custom',
isForm: false,
},
{
label: '金额',
field: 'amount',
sort: 'custom',
},
{
label: '操作',
field: 'action',
isForm: false,
isTable: false,
table: {
width: 150,
fixed: 'right'
}
}
]))
// 对账差异
export const CustomerStatementReconciliation = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '品番',
field: 'itemCode',
sort: 'custom',
isSearch: true,
isForm: false,
},
{
label: '背番',
field: 'articleName',
sort: 'custom',
isSearch: true,
isForm: false,
},
{
label: '出荷日期',
field: 'checkTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
isForm: 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: '验收日期',
field: 'uom',
sort: 'custom',
isForm: false,
},
{
label: '订单号',
field: 'qty',
sort: 'custom',
isForm: false,
},
{
label: '数量-INTEX',
field: 'price',
sort: 'custom',
isForm: false,
},
{
label: '数量-TFTM',
field: 'amount',
sort: 'custom',
},
{
label: '数量差异',
field: 'amount',
sort: 'custom',
},
{
label: '单价-INTEX',
field: 'amount',
sort: 'custom',
},
{
label: '单价-TFTM',
field: 'amount',
sort: 'custom',
},
{
label: '单价差异',
field: 'amount',
sort: 'custom',
},
{
label: '金额-INTEX',
field: 'amount',
sort: 'custom',
},
{
label: '金额-TFTM',
field: 'amount',
sort: 'custom',
},
{
label: '金额差异',
field: 'amount',
sort: 'custom',
},
{
label: '操作',
field: 'action',
isForm: false,
isTable: false,
table: {
width: 150,
fixed: 'right'
}
}
]))
// 模具分摊对账单
export const CustomerStatementShareReconciliation = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '厂家编号',
field: 'itemCode',
sort: 'custom',
isSearch: true,
isForm: false,
},
{
label: '厂家名称',
field: 'articleName',
sort: 'custom',
isSearch: true,
isForm: false,
},
{
label: '帐票号',
field: 'checkTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
isForm: 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: '品号',
field: 'uom',
sort: 'custom',
isForm: false,
},
{
label: '车型',
field: 'qty',
sort: 'custom',
isForm: false,
},
{
label: '数量',
field: 'price',
sort: 'custom',
isForm: false,
},
{
label: '模具分摊金额',
field: 'amount',
sort: 'custom',
},
{
label: '模具分摊单价',
field: 'amount',
sort: 'custom',
},
{
label: '调整金额',
field: 'amount',
sort: 'custom',
},
]))