/** * 查询返现园区应付费用、杉英收益列表 */ import ApiModel from '@comprehensive/serve/core/ApiModel' // 表单信息 const formList = [ { type: 'select', label: '开发商名称', value: '', options: [], name: 'developerId', attrs: ['collapse-tags', 'filterable'] }, { type: 'input', label: '税源地名称', value: '', name: 'taxiSourceNameLike', }, { type: 'select', label: '项目名称', value: '', options: [], name: 'projectId', attrs: ['collapse-tags', 'filterable'] }, { type: 'select', label: '费用支付状态', value: '', name: 'sourcePayStatus', options: [ { label: '未支付', value: '0' }, { label: '已支付', value: '1' } ] }, { type: 'select', label: '业务模式', value: '', name: 'busModel', options: [ { label: '园区直营', value: '1' }, { label: '杉英直营', value: '2' } ] }, { type: 'dateRange', label: '交易时间', value: [], name: 'declaration', names: ['sourcePayTimeLeft', 'sourcePayTimeRight'] }, ] // 表格信息 const tableList = [ { prop: 'developerName', label: '开发商名称', width: '180px', }, { prop: 'projectname', label: '项目名称', width: '150px', }, { prop: 'taxsourceplace', label: '税源地名称', width: '150px' }, { prop: 'customername', label: '客户姓名', width: '100px' }, { prop: 'sourcePayTime', label: '交易时间', width: '100px' }, { prop: 'amount', label: '交易金额', width: '100px' }, { prop: 'taxiServiceAmt', label: '服务费金额', width: '100px' }, { prop: 'taxiServiceRate', label: '服务费比例', width: '100px' }, { prop: 'busModel', label: '业务模式', width: '100px' }, { prop: 'sourcePayStatusDesc', label: '费用支付状态', width: '110px' }, { prop: 'sourcePayTime', label: '费用支付时间', width: '120px' }, { prop: 'updatedate', label: '最近更新时间', width: '120px' }, { prop: "lastAction", label: "操作管理", width: "140px", type: "buttons", fixed: "right" } ] export default options => { // 接口地址,required const api = '/server/qryCommissionApplyAllList' return new ApiModel({ api, formList, tableList, request(params) { return this.post(params) }, computedItem(item) { // 表格部分字段特殊处理 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 // }, {}) // } }) }