/* * @Author: lixiong * @Date: 2019-08-21 14:35:07 * @Last Modified by: zheng * @Last Modified time: 2021-06-09 09:52:31 */ /** * 贷款申请查询 */ import ApiModel from '@comprehensive/serve/core/ApiModel' // 表单信息 const formList = [ { type: 'input', // input, select, date, rangeDate label: '申请编号', value: '', name: 'serialNo' }, { type: 'input', label: '客户名称', value: '', name: 'customerName' }, { type: 'input', label: '客户手机号', value: '', name: 'customerPhone', rules: [{ maxLength: 11 }] }, { type: 'select', label: '当前流程阶段', value: [], options: [], name: 'phaseNo', attrs: ['multiple', 'collapse-tags', 'filterable'] }, { type: 'select', label: '产品名称', value: [], options: [], name: 'productid', attrs: ['multiple', 'collapse-tags', 'filterable'] }, { type: 'select', label: '产品维度', value: [], options: [], name: 'productDimension', attrs: ['multiple', 'collapse-tags', 'filterable'] }, { type: 'select', label: '业务城市', value: [], options: [], name: 'businessCity', attrs: ['multiple', 'collapse-tags', 'filterable'] }, /* { type: 'input', label: '客户编号', value: '', name: 'customerId' }, */ { type: 'input', label: '共借人姓名', value: '', name: 'coBorrowerName' }, { type: 'input', label: '项目名称', value: '', name: 'projectname' }, { type: 'input', label: '放款资金单元', value: '', name: 'fundunitName' }, { type: 'dateRange', label: '报单日期', value: [], name: 'declaration', names: ['beginDate', 'endDate'] }, { type: 'dateRange', label: '计划放款日期', value: [], name: 'planLendDate', names: ['beginPlanLendDate', 'endPlanLendDate'] }, { type: 'dateRange', label: '实际放款日期', value: [], name: 'actualPutOutDate', names: ['beginActualPutOutDate', 'endActualPutOutDate'] }, { type: 'input', label: '推荐人', value: '', name: 'refereeName' }, { type: 'input', label: '报单人', value: '', name: 'operateName' } /* { type: 'select', filterable: true, label: '贴息标志', value: '', options: [ { label: '请选择', value: '' }, { label: '贴息', value: '1' }, { label: '不贴息', value: '0' } ], name: 'discountFlag' }, */ /* { type: 'select', filterable: true, label: '贴息类型', value: '', options: [], name: 'discountType' }, */ /* { type: 'select', label: '手续费收取方式', value: [], options: [], name: 'poundageCharge', attrs: ['multiple', 'collapse-tags'] }, */ /* { type: 'select', filterable: true, label: '贷款发放商家标志', value: '', options: [], name: 'isIssuePartners' } */ ] // 表格信息 const tableList = [ { prop: 'serialNo', label: '申请编号', width: '160px', fixed: true, type: 'link' // link, button, buttons }, { prop: 'productName', label: '产品名称', width: '100px' }, { prop: 'productdimensionname', label: '产品维度', width: '180px' }, { prop: 'occurTypeDesc', label: '业务类型', width: '100px' }, { prop: 'phaseName', label: '当前流程阶段', width: '160px' }, { prop: 'businessCityDesc', label: '业务城市', width: '95px' }, { prop: 'customerID', label: '客户编号', width: '185px' }, { prop: 'customerName', label: '客户名称', width: '150px' }, { prop: 'phone', label: '客户手机号', width: '120px' }, { prop: 'coborrowers', label: '共借人姓名清单', width: '130px' }, { prop: 'hopebusinesssum', label: '申请金额(元)', isMoney: true, width: '130px' }, { prop: 'amountloan', label: '授信/放款金额(元)', isMoney: true, width: '140px' }, { prop: 'businessTerm', label: '贷款期限', width: '85px' }, { prop: 'repaymentTypeDesc', label: '还款方式', width: '120px' }, { prop: 'projectname', label: '项目名称', width: '120px' }, { prop: 'fundunitname', label: '放款资金单元', width: '120px' }, { prop: 'signedcityDesc', label: '面签城市', width: '95px' }, { prop: 'inputdate', label: '报单日期', width: '100px' }, { prop: 'inputtime', label: '报单时间', width: '100px' }, { prop: 'planlenddate', label: '预计放款日', width: '110px' }, { prop: 'actualputoutdate', label: '实际放款日期', width: '110px' }, { prop: 'refereename', label: '推荐人', width: '95px' }, { prop: 'refereeorgname', label: '推荐人直属机构', width: '240px' }, { prop: 'refereefirstinternallevelname', label: '推荐人所属一级内部机构', width: '180px' }, { prop: 'operateusername', label: '报单人', width: '95px' }, { prop: 'operateorgname', label: '报单人直属机构', width: '240px' }, { prop: 'operatefirstinternallevelname', label: '报单人所属一级内部机构', width: '180px' }, { prop: 'guarantors', label: '担保人姓名清单', width: '130px' }, { prop: 'obligorname', label: '债务人', width: '95px' }, { prop: 'discountFlagDesc', label: '贴息标志', width: '85px' }, { prop: 'discounttypeDesc', label: '贴息类型', width: '100px' }, { prop: 'discountwayDesc', label: '贴息付款方式', width: '120px' }, { prop: 'rate', label: '利率(%)', width: '130px' }, { prop: 'poundagerate', label: '手续费费率(%)', width: '120px' }, { prop: 'poundagechargeDesc', label: '手续费收取方式', width: '130px' }, { prop: 'loanstoreflagDesc', label: '贷款发放商家标志', width: '140px' } ] export default options => { // 接口地址,required const api = 'server/qryApplyList' return new ApiModel({ api, formList, tableList, request(params) { return this.post(params) }, computedItem(item) { // 表格部分字段特殊处理 let { termUnit, businessTermMonth, businessTermDay, amountloan, businessSum } = item let businessTerm = '' if (termUnit === 'M' && businessTermMonth) { businessTerm = `${businessTermMonth}月` } if (termUnit === 'D' && businessTermDay) { businessTerm = `${businessTermDay}天` } amountloan = amountloan === '' || amountloan === '0' ? businessSum : amountloan return { ...item, businessTerm, amountloan } }, computedValue(val, name, list) { // 表单部分字段特殊处理(这里为:多选项按接口要求转换为拼接字符串) const { formList } = this if (typeof list === 'undefined') { list = [...formList] } if ( formList.some( ({ attrs = [], name: findName }) => attrs.includes('multiple') && findName === name ) ) { return Array.isArray(val) ? val.join(',') : val } return val } // computedValues(values = {}) { // const { formList } = this // return Object.keys(values).reduce((pre, curr) => { // // let { name, value } = curr // let value = values[curr] // const findItem = formList.find( // item => // item.name === curr && // (Array.isArray(item.attrs) && item.attrs.includes('multiple')) // ) // if (findItem && Array.isArray(value)) { // value = value.join(',') // } // pre[curr] = value // return pre // }, {}) // } }) }