/* * @Author: lixiong * @Date: 2019-08-21 14:35:07 * @Last Modified by: lixiong * @Last Modified time: 2019-12-11 17:11:47 */ /** * 借据信息详情 */ import ApiModel from '@/utils/core/apiModel' // 表格信息 const formList = [ { label: '贷款申请编号', type: 'input', attrs: ['readonly'], name: 'applySerialno' }, { label: '借据编号', type: 'input', attrs: ['readonly'], name: 'loanSerialno' }, { label: '客户名称', type: 'input', attrs: ['readonly'], name: 'customerName' }, { label: '业务状态', type: 'input', attrs: ['readonly'], name: 'businessStatusDesc' }, { label: '贷款状态', type: 'input', attrs: ['readonly'], name: 'loanStatusDesc' }, { label: '产品名称', type: 'input', attrs: ['readonly'], name: 'productName' }, { label: '产品维度名称', type: 'input', attrs: ['readonly'], name: 'dimensionsName' }, { label: '贷款发放日期', type: 'input', attrs: ['readonly'], name: 'putoutDate' }, { label: '贷款金额', type: 'input', attrs: ['readonly'], name: 'businessSum', isMoney: true }, { label: '逾期天数', type: 'input', attrs: ['readonly'], name: 'overDueDays' }, { label: '还款方式', type: 'input', attrs: ['readonly'], name: 'termIdDesc' }, { label: '贷款期限', type: 'input', attrs: ['readonly'], name: 'loanTerm' }, { label: '剩余期限', type: 'input', attrs: ['readonly'], name: 'residueTerm' } ] const firstForm = [ { label: '正常/逾期本金余额', type: 'input', attrs: ['readonly'], name: 'umPayPrinciPalAmtSum', isMoney: true }, { label: '正常/逾期利息余额', type: 'input', attrs: ['readonly'], name: 'umPayInterestAmtSum', isMoney: true }, { label: '正常/逾期手续费余额', type: 'input', attrs: ['readonly'], name: 'umPayInterestAmtA1Sum', isMoney: true }, { label: '正常/逾期担保费余额', type: 'input', attrs: ['readonly'], name: 'umPayInterestAmtA3Sum', isMoney: true }, { label: '正常/逾期平台服务费余额', type: 'input', attrs: ['readonly'], name: 'umPayInterestAmtA2Sum', isMoney: true }, { label: '正常/逾期提前还款违约金余额', type: 'input', attrs: ['readonly'], name: 'umPayInterestAmtA5Sum', isMoney: true }, { label: '正常/逾期展期费余额', type: 'input', attrs: ['readonly'], name: 'umPayInterestAmtA6Sum', isMoney: true }, { label: '正常/逾期还款计划变更费余额', type: 'input', attrs: ['readonly'], name: 'umPayInterestAmtA8Sum', isMoney: true }, { label: '逾期罚息余额', type: 'input', attrs: ['readonly'], name: 'umPayInterestAmtA4Sum', isMoney: true }, { label: '正常/逾期总余额', type: 'input', attrs: ['readonly'], name: 'balance', isMoney: true } ] const otherForm = [ { label: '本金余额', type: 'input', attrs: ['readonly'], name: 'umPayPrinciPalAmtSum', isMoney: true }, { label: '利息余额', type: 'input', attrs: ['readonly'], name: 'umPayInterestAmtSum', isMoney: true }, { label: '手续费余额', type: 'input', attrs: ['readonly'], name: 'umPayInterestAmtA1Sum', isMoney: true }, { label: '担保费余额', type: 'input', attrs: ['readonly'], name: 'umPayInterestAmtA3Sum', isMoney: true }, { label: '平台服务费余额', type: 'input', attrs: ['readonly'], name: 'umPayInterestAmtA2Sum', isMoney: true }, { label: '提前还款违约金余额', type: 'input', attrs: ['readonly'], name: 'umPayInterestAmtA5Sum', isMoney: true }, { label: '展期费余额', type: 'input', attrs: ['readonly'], name: 'umPayInterestAmtA6Sum', isMoney: true }, { label: '还款计划变更费余额', type: 'input', attrs: ['readonly'], name: 'umPayInterestAmtA8Sum', isMoney: true }, { label: '逾期罚息余额', type: 'input', attrs: ['readonly'], name: 'umPayInterestAmtA4Sum', isMoney: true }, { label: '剩余应还总金额', type: 'input', attrs: ['readonly'], name: 'balance', isMoney: true } ] export default (options = {}) => { // 接口地址: required const api = 'server/queryAcctLoanInfo' const { transCode } = options let tempForm = transCode === '2001' ? [...formList, ...firstForm] : [...formList, ...otherForm] if (transCode === '3006') { tempForm = tempForm.map(item => item.name === 'balance' ? { ...item, label: '变更前应还总余额' } : { ...item } ) } return new ApiModel({ api, formList: tempForm, request(params) { return this.post(params) } }) }