/* * @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: 'customername' }, { type: 'select', label: '状态', value: '', options: [ { label: '待发放', value: '0' }, { label: '发放成功', value: '3' }, { label: '发放失败', value: '4' }, { label: '已失效', value: '5' } ], name: 'status', attrs: ['collapse-tags', 'filterable', 'clearable'] }, { type: 'dateRange', label: '申请日期', value: [], name: 'declaration', names: ['applydateLeft', 'applydateRight'] }, { type: 'input', label: '手机号码', value: '', name: 'phone' }, { type: 'select', label: '业务城市', value: '', options: [], name: 'businesscity', attrs: ['collapse-tags', 'filterable', 'clearable'] }, { type: 'input', label: '项目', value: '', name: 'projectname', rules: [{ maxLength: 11 }] }, { type: 'input', label: '身份识别码', value: '', name: 'groupno', rules: [{ maxLength: 11 }] }, { type: 'dateRange', label: '到账日期', value: [], name: 'planLendDate', names: ['arrivaltimeLeft', 'arrivaltimeRight'] } ] // 表格信息 const tableList = [ { prop: 'groupno', label: '身份识别码', width: '120px', }, { prop: 'customername', label: '姓名', width: '80px' }, { prop: 'certid', label: '身份证号', width: '180px' }, { prop: 'putoutcardno', label: '银行卡账户', width: '180px' }, { prop: 'amount', label: '金额', isMoney: true, width: '100px' }, { prop: 'phone', label: '手机号', width: '120px' }, { prop: 'putoutbankname', label: '收款银行', width: '185px' }, { prop: 'businesscityname', label: '业务城市', width: '100px' }, { prop: 'projectname', label: '项目', width: '160px' }, { prop: 'applydate', label: '申请日期', width: '110px' }, { prop: 'refereeusername', label: '推荐人', width: '100px' }, { prop: 'statusDesc', label: '状态', width: '90px' }, { prop: 'methodDesc', label: '发放方式', width: '90px' }, { prop: 'taxsourceplace', label: '税源地', width: '140px' }, // { // prop: 'entname', // label: '企业名称', // width: '200px' // }, // { // prop: 'platprojectname', // label: '平台项目名称', // width: '200px' // }, { prop: 'actualacctno', label: '实际收款账户', width: '200px' }, { prop: 'arrivaltime', label: '到账时间', width: '160px' }, { prop: 'taskname', label: '备注', width: '160px' }, { prop: "lastAction", label: "操作管理", width: "160px", type: "buttons", fixed: "right" } ] export default options => { // 接口地址,required const api = 'server/qryCommissionApplyList' 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 } }, 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 // }, {}) // } }) }