/** * 财务凭证明细核对 */ import ApiModel from '@/utils/core/apiModel'; // 表单信息 const formList = [ { type: 'select', label: '核对类型', value: '', name: 'checkType', descName: 'checkTypeName', options: [], attrs: ['filterable', 'clearable', 'collapse-tags'], rules: [{ required: true }] }, { type: 'dateRange', label: '交易日期', value: '', name: 'beginAndEndDate', names: ['beginDate', 'endDate'], rules: [{ required: true }] } ]; // 支付通道回款表单信息 const payFormList = [ { type: 'select', label: '支付公司名称', value: '', name: 'institution', options: [], attrs: ['filterable', 'clearable', 'collapse-tags'], rules: [{ required: true }] }, { type: 'input', label: '商户号', value: '', name: 'identifier', attrs: ['readonly'], rules: [{ required: true }] } ]; const netRutBankFormList = [ { type: 'select', label: '出账渠道', value: '', name: 'accountingChannel', descName: 'institution', options: [], attrs: ['filterable', 'clearable', 'collapse-tags'] } ]; // 客户线下转账&开发商贴息转账表单信息 const cusDevFormList = [ { type: 'select', label: '收款账户账号', value: '', name: 'identifier', attrs: ['filterable', 'clearable', 'collapse-tags'], rules: [{ required: true }] }, { type: 'input', label: '收款账户户名', value: '', name: 'institution', attrs: ['readonly'] } ]; // 放款表单信息 const loanFormList = [ { type: 'select', // label: '放款账户账号', label: '放款账户户名', value: '', // name: 'identifier', name: 'institution', attrs: ['filterable', 'clearable', 'collapse-tags'], rules: [{ required: true }] }, { type: 'input', // label: '放款账户户名', label: '放款账户账号', value: '', // name: 'institution', name: 'identifier', attrs: ['readonly'] } ]; // 返回结果基本列表 const resFormList = [ { type: 'input', label: '财务分录金额', value: '', name: 'coreMoney', attrs: ['readonly'], isMoney: true }, { type: 'input', label: '财务差额', value: '', name: 'financialBalance', attrs: ['readonly'], isMoney: true }, { type: 'input', label: '核对结果', value: '', name: 'statusName', attrs: ['readonly'] } ]; // 支付通道回款 const resPayFormList = [ { type: 'input', label: '清算款总金额', value: '', name: 'checkMoney', attrs: ['readonly'], isMoney: true }, { type: 'input', label: '清算款笔数', value: '', name: 'checkNumber', attrs: ['readonly'] } ]; // 客户线下转账&开发商贴息转账 const resCusDisFormList = [ { type: 'input', label: '流水收款金额', value: '', name: 'checkMoney', attrs: ['readonly'], isMoney: true }, { type: 'input', label: '流水收款笔数', value: '', name: 'checkNumber', attrs: ['readonly'] }, { type: 'input', label: '流水剩余金额', value: '', name: 'surplusAmount', attrs: ['readonly'], isMoney: true }, { type: 'input', label: '流水退款金额', value: '', name: 'fallBackAmount', attrs: ['readonly'], isMoney: true } ]; // 客户转账认领&开发商转账认领 const resCusClaimFormList = [ { type: 'input', label: '认领金额', value: '', name: 'checkMoney', attrs: ['readonly'], isMoney: true }, { type: 'input', label: '认领笔数', value: '', name: 'checkNumber', attrs: ['readonly'] } ]; // 放款 const resLoanFormList = [ { type: 'input', label: '放款金额', value: '', name: 'checkMoney', attrs: ['readonly'], isMoney: true }, { type: 'input', label: '放款笔数', value: '', name: 'checkNumber', attrs: ['readonly'] } ]; // 转账认领撤销 const resCancelFormList = [ { type: 'input', label: '撤销金额', value: '', name: 'checkMoney', attrs: ['readonly'], isMoney: true }, { type: 'input', label: '撤销笔数', value: '', name: 'checkNumber', attrs: ['readonly'] } ]; // 财务网银退款&通道代付退款 const resNetPassFormList = [ { type: 'input', label: '退款金额', value: '', name: 'checkMoney', attrs: ['readonly'], isMoney: true }, { type: 'input', label: '退款笔数', value: '', name: 'checkNumber', attrs: ['readonly'] } ]; // 贷款撤销 const resRevokeFormList = [ { type: 'input', label: '撤销归还金额', value: '', name: 'checkMoney', attrs: ['readonly'], isMoney: true }, { type: 'input', label: '本金损失金额', value: '', name: 'checkLossMoney', // descName:'checkLossMoney', attrs: ['readonly'], isMoney: true }, { type: 'input', label: '财务分录本金损失金额', value: '', name: 'coreLossMoney', // descName: 'coreLossMoney', attrs: ['readonly'], isMoney: true }, { type: 'input', label: '财务本金损失差额', value: '', name: 'lossBalanceMoney', attrs: ['readonly'], isMoney: true } ]; // 营业外收入 const resIncomeFormList = [ { type: 'input', label: '收入金额', value: '', name: 'checkMoney', attrs: ['readonly'], isMoney: true }, { type: 'input', label: '收入笔数', value: '', name: 'checkNumber', attrs: ['readonly'] } ]; export default (options = {}) => { // 接口地址,required const api = 'voucherDetail/voucherDetailCheck'; const { command, serialNo = false } = options; // console.log(command, serialNo); let tempForm = null; if (serialNo) { if (command === 'FK') { tempForm = [...resFormList, ...resLoanFormList]; } else if (command === 'TD') { tempForm = [...resFormList, ...resPayFormList]; } else if (command === 'KHZK' || command === 'KFSZK') { tempForm = [...resFormList, ...resCusDisFormList]; } else if (command === 'KHRL' || command === 'KFSRL') { tempForm = [...resFormList, ...resCusClaimFormList]; } else if (command === 'RLCX') { tempForm = [...resFormList, ...resCancelFormList]; } else if (command === 'WYTK' || command === 'TDTK') { tempForm = [...resFormList, ...resNetPassFormList]; } else if (command === 'DKCX') { tempForm = [...resFormList, ...resRevokeFormList]; } else if (command === 'YYWSR') { tempForm = [...resFormList, ...resIncomeFormList]; } else { tempForm = resFormList; } } else { if (command === 'TD') { tempForm = [...formList, ...payFormList]; } else if (command === 'WYTK' || command === 'TDTK') { tempForm = [...formList, ...netRutBankFormList]; } else if (command === 'KHZK' || command === 'KFSZK') { tempForm = [...formList, ...cusDevFormList]; } else if (command === 'FK') { tempForm = [...formList, ...loanFormList]; } else { tempForm = formList; } } return new ApiModel({ api, formList: tempForm, request(params) { return this.post(params); } }); };