| | |
| | | :pagination="pagination" |
| | | :columns="columns" |
| | | :data-source="agentlist" |
| | | rowKey="id"> |
| | | rowKey="id" |
| | | > |
| | | <span slot="id" slot-scope="text,record"> |
| | | <template> |
| | | <div> |
| | |
| | | </div> |
| | | </template> |
| | | </span> |
| | | <!-- <span slot="dkState" slot-scope="text,record"> |
| | | <span slot="dkState" slot-scope="text, record"> |
| | | <template> |
| | | <div> |
| | | <span v-if="record.dkState==1">123</span> |
| | | <span v-if="record.dkState == 0">申请中</span> |
| | | <span v-else-if="record.dkState == 1">审批通过</span> |
| | | <span v-else-if="record.dkState == 2">审核拒绝</span> |
| | | </div> |
| | | </template> |
| | | </span> --> |
| | | <!-- <template slot="action" slot-scope="text,record"> |
| | | </span> |
| | | <span slot="dkRefundState" slot-scope="text, record"> |
| | | <template> |
| | | <div> |
| | | <span v-if="record.dkState == 0 && record.dkState == 1">未还款</span> |
| | | <span v-else-if="record.dkState == 1 && record.dkState == 1">已还款</span> |
| | | </div> |
| | | </template> |
| | | </span> |
| | | <template slot="action" slot-scope="text, record"> |
| | | <!-- <a slot="action" href="javascript:;" @click="$refs.EditAgentinfodialog.getEditorder(record)">修改机构</a> |
| | | <a-divider type="vertical" /> |
| | | <a |
| | | slot="action" |
| | | href="javascript:;" |
| | | @click="$refs.EditAgentinfodialog.getEditorder(record)">修改机构</a> |
| | | <a-divider type="vertical" /> |
| | | <a slot="action" href="javascript:;" @click="getDelagent(record)">删除机构</a> |
| | | <a slot="action" href="javascript:;" @click="getDelagent(record)">删除机构</a> --> |
| | | |
| | | </template> --> |
| | | <template v-if="record.dkState == 0"> |
| | | <a href="javascript:;" @click="byOpen(record, 1)">通过</a> |
| | | <a-divider type="vertical" /> |
| | | <a href="javascript:;" @click="byOpen(record, 2)">拒绝</a> |
| | | </template> |
| | | </template> |
| | | </a-table> |
| | | </a-card> |
| | | <!-- <editCapitalAgentdialog ref="editCapitalAgentdialog" :getinit="geteditinit"></editCapitalAgentdialog> --> |
| | | <!-- <EditAgentinfodialog ref="EditAgentinfodialog" :getinit="geteditinit"></EditAgentinfodialog> --> |
| | | <!-- <addagentdialog ref="addagentdialog" :getinit="getinit"></addagentdialog> --> |
| | | |
| | | <a-modal |
| | | :title="optObj.state == 1 ? '通过审核' : '拒绝审核'" |
| | | :width="400" |
| | | :visible="byShow" |
| | | :confirmLoading="byloading" |
| | | @ok="by" |
| | | @cancel="canceBy" |
| | | > |
| | | <a-form :form="byFrom" ref="byFrom"> |
| | | <a-form-item label="申请金额" v-if="optObj.state == 1" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <span>{{ optObj.dkMoney }}</span> |
| | | </a-form-item> |
| | | <a-form-item label="贷款金额" v-if="optObj.state == 1" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-input placeholder="请输入" v-decorator="['spMoney', { rules: [{ required: true, message: '请输入' }] }]" /> |
| | | </a-form-item> |
| | | <a-form-item label="拒绝理由" v-if="optObj.state == 2" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-input placeholder="请输入" v-decorator="['message', { rules: [{ required: true, message: '请输入' }] }]" /> |
| | | </a-form-item> |
| | | </a-form> |
| | | </a-modal> |
| | | </page-header-wrapper> |
| | | </template> |
| | | <script> |
| | | |
| | | // import editCapitalAgentdialog from './agentcomponents/editCapitalAgentdialog' |
| | | import EditAgentinfodialog from './agentcomponents/EditAgentinfodialog' |
| | | import addagentdialog from './agentcomponents/addagentdialog' |
| | | import { onedklist } from '@/api/home' |
| | | import { onedklist, dksp } from '@/api/home' |
| | | import moment from 'moment' |
| | | export default { |
| | | // name: 'AgentList', |
| | |
| | | { |
| | | title: 'Id', |
| | | scopedSlots: { customRender: 'id' }, |
| | | align: 'center' |
| | | align: 'center', |
| | | }, |
| | | // { |
| | | // title: '机构名称', |
| | | // dataIndex: 'dkJgName', |
| | | // align: 'center' |
| | | // }, |
| | | { |
| | | title: '机构名称', |
| | | dataIndex: 'dkJgName', |
| | | align: 'center' |
| | | }, { |
| | | title: '贷款人Id', |
| | | dataIndex: 'dkUserId', |
| | | align: 'center' |
| | | align: 'center', |
| | | }, |
| | | // { |
| | | // title: '贷款人姓名', |
| | | // dataIndex: 'dkUserName', |
| | | // align: 'center', |
| | | // }, |
| | | { |
| | | title: '贷款人姓名', |
| | | title: '贷款人账户', |
| | | dataIndex: 'dkUserName', |
| | | align: 'center' |
| | | align: 'center', |
| | | }, |
| | | { |
| | | title: '联系电话', |
| | | dataIndex: 'dkPhone', |
| | | align: 'center' |
| | | align: 'center', |
| | | }, |
| | | { |
| | | title: '申请时间', |
| | |
| | | align: 'center', |
| | | customRender: (text, row, index) => { |
| | | return moment(text).format('YYYY-MM-DD HH:mm:ss') |
| | | } |
| | | }, { |
| | | }, |
| | | }, |
| | | { |
| | | title: '贷款金额', |
| | | dataIndex: 'dkMoney', |
| | | align: 'center', |
| | | scopedSlots: { customRender: 'dkMoney' } |
| | | } |
| | | // { |
| | | // title: '贷款状态', |
| | | // dataIndex: 'dkState', |
| | | // align: 'center', |
| | | // scopedSlots: { customRender: 'dkState' } |
| | | // }, |
| | | scopedSlots: { customRender: 'dkMoney' }, |
| | | }, |
| | | { |
| | | title: '贷款状态', |
| | | dataIndex: 'dkState', |
| | | align: 'center', |
| | | scopedSlots: { customRender: 'dkState' }, |
| | | }, |
| | | { |
| | | title: '还款状态', |
| | | dataIndex: 'dkRefundState', |
| | | align: 'center', |
| | | scopedSlots: { customRender: 'dkRefundState' }, |
| | | }, |
| | | // { |
| | | // title: '代理手机号', |
| | | // dataIndex: 'agentPhone', |
| | |
| | | // return moment(text).format('YYYY-MM-DD HH:mm:ss') |
| | | // } |
| | | // }, |
| | | // { |
| | | // title: '操作', |
| | | // key: 'action', |
| | | // align: 'center', |
| | | // scopedSlots: { customRender: 'action' } |
| | | // } |
| | | { |
| | | title: '操作', |
| | | key: 'action', |
| | | align: 'center', |
| | | scopedSlots: { customRender: 'action' }, |
| | | }, |
| | | ], |
| | | // 表头 |
| | | pagination: { |
| | |
| | | pageSizeOptions: ['10', '20', '50', '100'], // 每页中显示的数据 |
| | | onShowSizeChange: (current, pageSize) => this.onSizeChange(current, pageSize), // 改变每页数量时更新显示 |
| | | onChange: (page, pageSize) => this.onPageChange(page, pageSize), // 点击页码事件 |
| | | showTotal: total => `共有 ${total} 条数据` // 分页中显示总的数据 |
| | | showTotal: (total) => `共有 ${total} 条数据`, // 分页中显示总的数据 |
| | | }, |
| | | loading: false, |
| | | agentqueryParam: { |
| | | id: undefined, |
| | | phone: '', |
| | | realName: '', |
| | | pageNum: 1, |
| | | pageSize: 10 |
| | | pageSize: 10, |
| | | }, |
| | | labelCol: { |
| | | xs: { span: 8 }, |
| | | sm: { span: 8 }, |
| | | md: { span: 8 }, |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 14 }, |
| | | sm: { span: 14 }, |
| | | md: { span: 14 }, |
| | | }, |
| | | agentloading: false, |
| | | agentlist: [], |
| | | clickagentlist: [] |
| | | clickagentlist: [], |
| | | byShow: false, |
| | | byloading: false, |
| | | optObj: {}, // 选择的对象 |
| | | byFrom: this.$form.createForm(this), // 表单 |
| | | } |
| | | }, |
| | | created () { |
| | |
| | | content: '确认删除机构?此操作不可恢复', |
| | | onOk () { |
| | | var data = { |
| | | id: val.id |
| | | id: val.id, |
| | | } |
| | | dldkjg(data).then(res => { |
| | | dldkjg(data).then((res) => { |
| | | if (res.status == 0) { |
| | | that.$message.success({ content: '删除成功', duration: 2 }) |
| | | that.getinit() |
| | |
| | | }, |
| | | onCancel () { |
| | | console.log('Cancel') |
| | | } |
| | | }, |
| | | }) |
| | | }, |
| | | getinit () { |
| | | this.queryParam = { |
| | | this.agentqueryParam = { |
| | | id: undefined, |
| | | phone: '', |
| | | realName: '', |
| | | pageNum: 1, |
| | | pageSize: 10 |
| | | pageSize: 10, |
| | | } |
| | | this.pagination.current = 1 |
| | | this.getagentlist() |
| | |
| | | getagentlist () { |
| | | var that = this |
| | | this.loading = true |
| | | // dklist(this.agentqueryParam).then(res => { |
| | | onedklist().then(res => { |
| | | this.agentlist = res.data |
| | | // this.pagination.total = res.data.total |
| | | onedklist(this.agentqueryParam).then((res) => { |
| | | this.agentlist = res.data.list |
| | | this.pagination.total = res.data.total |
| | | setTimeout(() => { |
| | | that.loading = false |
| | | }, 500) |
| | |
| | | this.agentloading = true |
| | | var data = { |
| | | pageNum: 1, |
| | | pageSize: 100 |
| | | pageSize: 100, |
| | | } |
| | | nextagent(data).then(res => { |
| | | nextagent(data).then((res) => { |
| | | this.clickagentlist = res.data.list |
| | | setTimeout(() => { |
| | | that.agentloading = false |
| | |
| | | this.pagination.current = page |
| | | this.agentqueryParam.pageSize = pageSize |
| | | this.getagentlist() |
| | | }, |
| | | // 审核窗口打开 |
| | | byOpen(val, state) { |
| | | this.optObj = { ...val, state } |
| | | this.byShow = true |
| | | }, |
| | | // 关闭审核窗口 |
| | | canceBy() { |
| | | this.byShow = false |
| | | const form = this.$refs.byFrom.form |
| | | form.resetFields() |
| | | }, |
| | | // 审核通过||拒绝 |
| | | by() { |
| | | const form = this.$refs.byFrom.form |
| | | |
| | | form.validateFields((errors, values) => { |
| | | if (!errors) { |
| | | this.byloading = true |
| | | values.state = this.optObj.state |
| | | values.dkId = this.optObj.id |
| | | |
| | | dksp(values).then((res) => { |
| | | if (res.status == 0) { |
| | | this.byShow = false |
| | | this.$message.success(res.msg) |
| | | form.resetFields() |
| | | this.getagentlist() |
| | | } else { |
| | | this.$message.error(res.msg) |
| | | } |
| | | this.byloading = false |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | }, |
| | | } |
| | | </script> |