import { enumToProTableEnumValue } from '@/utils'; import { PAYEE_OPTIONS } from '../Order/constant'; export type InvoiceItem = { id: number; //id invoiceStatus: string; //发票类型:专票/普票 invoiceNumber: string; //发票号码 status: string; //状态 purchaser: string; //购买方 payee: string; //收款单位 contacts: string; //联系人 sale: string; //销售 money: number; //金额 invoicingTime: string; //开票日期 collectionTime: string; //收款时间 notes: string; //备注 }; export const INVOICE_STATUS = { UNVERIFIED: '未核销', VERIFIED: '已核销', ABNORMAL: '异常', PARTIAL_VERIFICATION: '部分核销', }; export const INVOICE_COLUMNS = [ { dataIndex: 'invoiceId', title: 'id', valueType: 'text', hideInTable: true, hideInSearch: true, width: 100, }, { dataIndex: 'invoiceNumber', title: '发票号码', valueType: 'text', width: 100, }, { dataIndex: 'invoiceStatus', title: '发票类型', valueType: 'select', width: 100, valueEnum: enumToProTableEnumValue({ SPECIALLY_INVOICED: '专票', COMMON_INVOICED: '普票', }), }, { title: '状态', dataIndex: 'status', valueType: 'text', width: 100, valueEnum: enumToProTableEnumValue({ UNVERIFIED: '未核销', VERIFIED: '已核销', PARTIAL_VERIFICATION: '部分核销', }), }, { title: '购买方', dataIndex: 'purchaser', valueType: 'text', width: 180, }, { title: '收款单位', dataIndex: 'payee', valueType: 'text', width: 180, valueEnum: enumToProTableEnumValue(PAYEE_OPTIONS), }, { title: '联系人', dataIndex: 'contacts', valueType: 'text', width: 100, }, { title: '销售', dataIndex: 'sale', valueType: 'text', width: 100, }, { title: '金额', dataIndex: 'money', valueType: 'money', width: 100, }, { title: '开票日期', dataIndex: 'invoicingTime', valueType: 'dateRange', width: 150, search: { transform: (value) => { if (value) { return { invoicingBeginTime: value[0], invoicingEndTime: value[1], }; } }, }, }, { title: '收款时间', dataIndex: 'collectionTime', valueType: 'dateRange', width: 200, search: { transform: (value) => { if (value) { return { collectionBeginTime: value[0], collectionEndTime: value[1], }; } }, }, }, { title: '备注', dataIndex: 'notes', valueType: 'text', width: 250, }, ]; export const BANK_STATEMENT_COLUMNS = [ { dataIndex: 'id', title: '编号', valueType: 'text', width: 160, copyable: true, // hideInTable: true, // hideInSearch: true, editable: false, }, { dataIndex: 'status', title: '状态', valueType: 'select', width: 100, editable: false, valueEnum: enumToProTableEnumValue({ ABNORMAL: '异常', VERIFIED: '已核销', }), }, { dataIndex: 'serialNumber', title: '流水号', valueType: 'text', width: 100, }, { dataIndex: 'merchantOrderNumber', title: '商户订单号', valueType: 'text', width: 100, }, { dataIndex: 'bankOrderNumber', title: '银行订单号', valueType: 'text', width: 100, }, { dataIndex: 'thirdPartyOrderNumber', title: '第三方订单号', valueType: 'text', width: 100, }, { dataIndex: 'accountNumber', title: '账号', valueType: 'text', width: 180, }, { dataIndex: 'accountName', title: '帐号名称', valueType: 'text', width: 260, }, { dataIndex: 'currency', title: '币种', valueType: 'text', width: 100, }, { dataIndex: 'transactionDate', title: '交易日', valueType: 'dateRange', width: 100, search: { transform: (value) => { if (value) { return { beginTransactionDate: value[0], endTransactionDate: value[1], }; } }, }, }, { dataIndex: 'transactionTime', title: '交易时间', valueType: 'text', hideInSearch: true, width: 100, }, { dataIndex: 'transactionType', title: '交易类型', valueType: 'text', width: 100, }, { dataIndex: 'transactionBankBranch', title: '交易行所', valueType: 'text', width: 100, }, { dataIndex: 'valueDate', title: '起息日', valueType: 'dateRange', width: 100, search: { transform: (value) => { if (value) { return { beginValueDate: value[0], endValueDate: value[1], }; } }, }, }, { dataIndex: 'loanAmount', title: '贷方金额', valueType: 'money', width: 100, }, { dataIndex: 'borrowedAmount', title: '借方金额', valueType: 'money', width: 100, }, { dataIndex: 'transactionAmount', title: '交易金额', valueType: 'money', width: 100, }, { dataIndex: 'balance', title: '余额', valueType: 'money', width: 100, }, { dataIndex: 'actualPaymentAmount', title: '实付金额', valueType: 'money', width: 100, }, { dataIndex: 'collectionChannel', title: '收款渠道', valueType: 'text', width: 100, }, { dataIndex: 'paymentType', title: '支付类型', valueType: 'text', width: 100, }, { dataIndex: 'summary', title: '摘要', valueType: 'text', width: 300, }, { dataIndex: 'cashier', title: '收银员', valueType: 'text', width: 100, }, { dataIndex: 'payeePayerUnit', title: '收(付)方单位', valueType: 'text', width: 260, }, { dataIndex: 'payeePayerName', title: '收(付)方名称', valueType: 'text', width: 260, }, { dataIndex: 'payeePayerAccountNumber', title: '收(付)方账号', valueType: 'text', width: 260, }, { dataIndex: 'payeePayerBankBranchCode', title: '收(付)方开户行行号', valueType: 'text', width: 260, }, { dataIndex: 'payeePayerBankName', title: '收(付)方开户行名', valueType: 'text', width: 260, }, { dataIndex: 'payeePayerBankAddress', title: '收(付)方开户行地址', valueType: 'text', width: 260, }, { dataIndex: 'extendedSummary', title: '扩展摘要', valueType: 'text', width: 100, }, { dataIndex: 'transactionAnalysisCode', title: '交易分析码', valueType: 'text', width: 100, }, { dataIndex: 'remarkNote', title: '附言', valueType: 'text', width: 100, }, ];