|
@@ -5,14 +5,11 @@
|
|
<el-form-item label="借款编号" prop="no">
|
|
<el-form-item label="借款编号" prop="no">
|
|
<el-input v-model="searchForm.no" placeholder="请输入借款编号" clearable></el-input>
|
|
<el-input v-model="searchForm.no" placeholder="请输入借款编号" clearable></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="借款原因" prop="reason">
|
|
|
|
- <el-input v-model="searchForm.reason" placeholder="请输入借款原因" clearable></el-input>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item v-if="showHideItem" label="借款人" prop="createById">
|
|
|
|
|
|
+ <el-form-item label="借款人" prop="createById">
|
|
<UserSelectSignatory style="width: 100%" ref="userSelect2" :limit="1"
|
|
<UserSelectSignatory style="width: 100%" ref="userSelect2" :limit="1"
|
|
:readonly="true" :modelValue="searchForm.createById"
|
|
:readonly="true" :modelValue="searchForm.createById"
|
|
@update:modelValue='(value) => {searchForm.createById = value}'></UserSelectSignatory> </el-form-item>
|
|
@update:modelValue='(value) => {searchForm.createById = value}'></UserSelectSignatory> </el-form-item>
|
|
- <el-form-item v-if="showHideItem" prop="officeId" label="借款人部门">
|
|
|
|
|
|
+ <el-form-item prop="officeId" label="借款人部门">
|
|
<SelectTree
|
|
<SelectTree
|
|
ref="officeTree"
|
|
ref="officeTree"
|
|
:props="{
|
|
:props="{
|
|
@@ -27,6 +24,14 @@
|
|
:accordion="true"
|
|
:accordion="true"
|
|
@getValue="(value) => {searchForm.officeId=value}"/>
|
|
@getValue="(value) => {searchForm.officeId=value}"/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
+ <el-form-item v-if="showHideItem" label="借款金额" prop="borrowAmounts">
|
|
|
|
+ <InputNumber :disabled="false" :precision="num"
|
|
|
|
+ :value="searchForm.borrowAmounts"
|
|
|
|
+ @changefrom="(val) => {searchForm.borrowAmounts[0] = val}"
|
|
|
|
+ @changeto="(val) => {searchForm.borrowAmounts[1] = val}"
|
|
|
|
+ >
|
|
|
|
+ </InputNumber>
|
|
|
|
+ </el-form-item>
|
|
<el-form-item v-if="showHideItem" label="借款时间" prop="createDates">
|
|
<el-form-item v-if="showHideItem" label="借款时间" prop="createDates">
|
|
<el-date-picker
|
|
<el-date-picker
|
|
placement="bottom-start"
|
|
placement="bottom-start"
|
|
@@ -39,15 +44,13 @@
|
|
end-placeholder="结束日期">
|
|
end-placeholder="结束日期">
|
|
</el-date-picker>
|
|
</el-date-picker>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item v-if="showHideItem" label="借款金额" prop="borrowAmounts">
|
|
|
|
- <InputNumber :disabled="false" :precision="num"
|
|
|
|
- :value="searchForm.borrowAmounts"
|
|
|
|
- @changefrom="(val) => {searchForm.borrowAmounts[0] = val}"
|
|
|
|
- @changeto="(val) => {searchForm.borrowAmounts[1] = val}"
|
|
|
|
- >
|
|
|
|
- </InputNumber>
|
|
|
|
|
|
+ <el-form-item v-if="showHideItem" label="借款原因" prop="reason">
|
|
|
|
+ <el-input v-model="searchForm.reason" placeholder="请输入借款原因" clearable></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
<el-form-item>
|
|
<el-form-item>
|
|
<el-button type="default" @click="showHide" :icon="showHideIcon">{{showHideName}}</el-button>
|
|
<el-button type="default" @click="showHide" :icon="showHideIcon">{{showHideName}}</el-button>
|
|
<el-button type="primary" @click="refreshList()" icon="el-icon-search">查询</el-button>
|
|
<el-button type="primary" @click="refreshList()" icon="el-icon-search">查询</el-button>
|
|
@@ -55,7 +58,7 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
<div class="jp-table top" style="">
|
|
<div class="jp-table top" style="">
|
|
- <vxe-toolbar :refresh="{query: refreshList}" custom>
|
|
|
|
|
|
+ <vxe-toolbar ref="toolbarRef" :refresh="{query: refreshList}" export custom>
|
|
<template #buttons>
|
|
<template #buttons>
|
|
<el-button v-if="hasPermission('borrow:add')" :disabled="isAdmin" type="primary" icon="el-icon-plus" @click="add()">新建</el-button>
|
|
<el-button v-if="hasPermission('borrow:add')" :disabled="isAdmin" type="primary" icon="el-icon-plus" @click="add()">新建</el-button>
|
|
</template>
|
|
</template>
|
|
@@ -77,11 +80,19 @@
|
|
resizable
|
|
resizable
|
|
height="auto"
|
|
height="auto"
|
|
:loading="loading"
|
|
:loading="loading"
|
|
- ref="clientTable"
|
|
|
|
|
|
+ ref="borrowTable"
|
|
show-header-overflow
|
|
show-header-overflow
|
|
show-overflow
|
|
show-overflow
|
|
highlight-hover-row
|
|
highlight-hover-row
|
|
:menu-config="{}"
|
|
:menu-config="{}"
|
|
|
|
+ :export-config="{
|
|
|
|
+ remote: true,
|
|
|
|
+ filename: `嘉溢借款申请数据${moment(new Date()).format('YYYY-MM-DD')}`,
|
|
|
|
+ sheetName: `嘉溢借款申请数据${moment(new Date()).format('YYYY-MM-DD')}`,
|
|
|
|
+ exportMethod: exportMethod,
|
|
|
|
+ types: ['xls'],
|
|
|
|
+ modes: ['current', 'selected', 'all']
|
|
|
|
+ }"
|
|
@sort-change="sortChangeHandle"
|
|
@sort-change="sortChangeHandle"
|
|
:sort-config="{remote:true}"
|
|
:sort-config="{remote:true}"
|
|
:data="dataList"
|
|
:data="dataList"
|
|
@@ -92,13 +103,13 @@
|
|
<el-link type="primary" :underline="false" @click="view(scope.row)">{{scope.row.no}}</el-link>
|
|
<el-link type="primary" :underline="false" @click="view(scope.row)">{{scope.row.no}}</el-link>
|
|
</template>
|
|
</template>
|
|
</vxe-column>
|
|
</vxe-column>
|
|
- <vxe-column min-width="160" align="center" title="借款用途" field="reason"></vxe-column>
|
|
|
|
- <vxe-column min-width="160" align="center" title="借款人" field="createName"></vxe-column>
|
|
|
|
- <vxe-column min-width="160" align="center" title="借款人部门" field="officeName"></vxe-column>
|
|
|
|
- <vxe-column min-width="160" align="center" title="借款时间" field="createTime"></vxe-column>
|
|
|
|
<vxe-column min-width="160" align="center" title="借款金额" field="moneyLower"></vxe-column>
|
|
<vxe-column min-width="160" align="center" title="借款金额" field="moneyLower"></vxe-column>
|
|
<vxe-column min-width="160" align="center" title="对冲金额" field="refundLower"></vxe-column>
|
|
<vxe-column min-width="160" align="center" title="对冲金额" field="refundLower"></vxe-column>
|
|
<vxe-column min-width="160" align="center" title="剩余借款金额" field="finalMoney"></vxe-column>
|
|
<vxe-column min-width="160" align="center" title="剩余借款金额" field="finalMoney"></vxe-column>
|
|
|
|
+ <vxe-column min-width="160" align="center" title="借款人" field="createName"></vxe-column>
|
|
|
|
+ <vxe-column min-width="160" align="center" title="借款人部门" field="officeName"></vxe-column>
|
|
|
|
+ <vxe-column min-width="160" align="center" title="借款用途" field="reason"></vxe-column>
|
|
|
|
+ <vxe-column min-width="160" align="center" title="借款时间" field="createTime"></vxe-column>
|
|
<vxe-column min-width="150px" align="center" title="借款状态" field="status" fixed="right">
|
|
<vxe-column min-width="150px" align="center" title="借款状态" field="status" fixed="right">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
<el-button @click="detail(scope.row)" :type="$dictUtils.getDictLabel('program_project_list_info_status_info', scope.row.status, '')" effect="dark" >{{$dictUtils.getDictLabel("program_project_list_info_status", scope.row.status, '未登记')}} </el-button>
|
|
<el-button @click="detail(scope.row)" :type="$dictUtils.getDictLabel('program_project_list_info_status_info', scope.row.status, '')" effect="dark" >{{$dictUtils.getDictLabel("program_project_list_info_status", scope.row.status, '未登记')}} </el-button>
|
|
@@ -112,19 +123,20 @@
|
|
<vxe-column title="操作" width="150px" fixed="right" align="center">
|
|
<vxe-column title="操作" width="150px" fixed="right" align="center">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
<div v-if="isAdmin">
|
|
<div v-if="isAdmin">
|
|
- <el-button text type="primary" size="small" v-if="scope.row.status==='0' || scope.row.status==='5'" @click="del(scope.row.id)">删除</el-button>
|
|
|
|
<el-button size="small" text type="primary" @click="adminEdit(scope.row)">修改</el-button>
|
|
<el-button size="small" text type="primary" @click="adminEdit(scope.row)">修改</el-button>
|
|
|
|
+ <el-button text type="primary" size="small" v-if="scope.row.status==='0' || scope.row.status==='5'" @click="del(scope.row.id)">删除</el-button>
|
|
</div>
|
|
</div>
|
|
<div v-else>
|
|
<div v-else>
|
|
- <el-button text type="primary" size="small" v-if="scope.row.status==='0' || scope.row.status==='1'|| scope.row.status==='3'" @click="del(scope.row.id)">删除</el-button>
|
|
|
|
<el-button v-if="(scope.row.status === '0'||scope.row.status === '1'|| scope.row.status === '3')" size="small" text type="primary" @click="edit(scope.row)">修改</el-button>
|
|
<el-button v-if="(scope.row.status === '0'||scope.row.status === '1'|| scope.row.status === '3')" size="small" text type="primary" @click="edit(scope.row)">修改</el-button>
|
|
|
|
+ <el-button text type="primary" size="small" v-if="scope.row.status==='0' || scope.row.status==='1'|| scope.row.status==='3'" @click="del(scope.row.id)">删除</el-button>
|
|
<!-- 当前申请人撤回-->
|
|
<!-- 当前申请人撤回-->
|
|
<el-button v-if="scope.row.createById === $store.state.user.id && scope.row.status==='2'" text type="primary" size="small" @click="reback(scope.row)">撤回</el-button>
|
|
<el-button v-if="scope.row.createById === $store.state.user.id && scope.row.status==='2'" text type="primary" size="small" @click="reback(scope.row)">撤回</el-button>
|
|
|
|
|
|
<el-button v-if="scope.row.status==='2' && checkIsAudit(scope.row)" text type="primary" size="small" @click="examine(scope.row)">审核</el-button>
|
|
<el-button v-if="scope.row.status==='2' && checkIsAudit(scope.row)" text type="primary" size="small" @click="examine(scope.row)">审核</el-button>
|
|
<el-button v-if="scope.row.status === '4'&&scope.row.createById === $store.state.user.id" text type="primary" size="small" @click="adjust(scope.row)">驳回调整</el-button>
|
|
<el-button v-if="scope.row.status === '4'&&scope.row.createById === $store.state.user.id" text type="primary" size="small" @click="adjust(scope.row)">驳回调整</el-button>
|
|
- <el-button v-if="scope.row.status === '5'&&scope.row.createById === $store.state.user.id" text type="primary" size="small" @click="account(scope.row)">还款申请</el-button>
|
|
|
|
|
|
+ <el-button v-if="scope.row.status === '5'&&scope.row.createById === $store.state.user.id &&(commonJS.isEmpty(scope.row.refundStatus) ||scope.row.refundStatus === '0' || scope.row.refundStatus === '1' || scope.row.refundStatus === '5' || scope.row.refundStatus=== '3')" text type="primary" size="small" @click="addRefund(scope.row)">还款申请</el-button>
|
|
<el-button v-if="scope.row.createById === $store.state.user.id && scope.row.refundStatus==='2'" text type="primary" size="small" @click="rebackAccount(scope.row)">还款撤回</el-button>
|
|
<el-button v-if="scope.row.createById === $store.state.user.id && scope.row.refundStatus==='2'" text type="primary" size="small" @click="rebackAccount(scope.row)">还款撤回</el-button>
|
|
|
|
+<!-- <el-button v-if="scope.row.createById === $store.state.user.id && scope.row.refundStatus==='3'" text type="primary" size="small" @click="rebackRequest(scope.row)">取消还款</el-button>-->
|
|
|
|
|
|
<el-button v-if="scope.row.refundStatus==='2' && checkIsAudit(scope.row)" text type="primary" size="small" @click="examineAccount(scope.row)">还款审核</el-button>
|
|
<el-button v-if="scope.row.refundStatus==='2' && checkIsAudit(scope.row)" text type="primary" size="small" @click="examineAccount(scope.row)">还款审核</el-button>
|
|
<el-button v-if="scope.row.refundStatus === '4'&&scope.row.createById === $store.state.user.id" text type="primary" size="small" @click="adjustAccount(scope.row)">还款驳回调整</el-button>
|
|
<el-button v-if="scope.row.refundStatus === '4'&&scope.row.createById === $store.state.user.id" text type="primary" size="small" @click="adjustAccount(scope.row)">还款驳回调整</el-button>
|
|
@@ -220,6 +232,12 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
mounted () {
|
|
mounted () {
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
+ // 将表格和工具栏进行关联
|
|
|
|
+ const $table = this.$refs.borrowTable;
|
|
|
|
+ const $toolbar = this.$refs.toolbarRef;
|
|
|
|
+ $table.connect($toolbar);
|
|
|
|
+ });
|
|
this.refreshList()
|
|
this.refreshList()
|
|
},
|
|
},
|
|
activated () {
|
|
activated () {
|
|
@@ -469,6 +487,24 @@
|
|
}
|
|
}
|
|
return false
|
|
return false
|
|
},
|
|
},
|
|
|
|
+
|
|
|
|
+ async addRefund(row){
|
|
|
|
+ if (this.commonJS.isEmpty(row.refundId)){
|
|
|
|
+ this.loading = true
|
|
|
|
+ let resp = await this.borrowService.createRefundData({id:row.id})
|
|
|
|
+ if (resp) {
|
|
|
|
+ this.loading = false
|
|
|
|
+ row.refundId = resp.refundId
|
|
|
|
+ this.account(row)
|
|
|
|
+ } else {
|
|
|
|
+ this.loading = false
|
|
|
|
+ this.$message.error('无法还款,联系管理员解决')
|
|
|
|
+ }
|
|
|
|
+ }else {
|
|
|
|
+ this.account (row)
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+
|
|
//发起借款归还
|
|
//发起借款归还
|
|
account (row) {
|
|
account (row) {
|
|
let tabTitle = `发起流程【嘉溢-借款归还】`
|
|
let tabTitle = `发起流程【嘉溢-借款归还】`
|
|
@@ -497,6 +533,7 @@
|
|
businessTable: 'jy_refund',
|
|
businessTable: 'jy_refund',
|
|
isShow: false,
|
|
isShow: false,
|
|
status: status,
|
|
status: status,
|
|
|
|
+ refundId:row.refundId,
|
|
routePath: '/jy/borrowMoney/BorrowMoneyList'
|
|
routePath: '/jy/borrowMoney/BorrowMoneyList'
|
|
}
|
|
}
|
|
})
|
|
})
|
|
@@ -505,7 +542,7 @@
|
|
// 查看修改流程结果
|
|
// 查看修改流程结果
|
|
detailAccount (row) {
|
|
detailAccount (row) {
|
|
if (row.refundStatus !== '0' && row.refundStatus !== '1') {
|
|
if (row.refundStatus !== '0' && row.refundStatus !== '1') {
|
|
- this.borrowService.queryById(row.refundId).then((da)=>{
|
|
|
|
|
|
+ this.borrowService.findByRefundId(row.refundId).then((da)=>{
|
|
// eslint-disable-next-line eqeqeq
|
|
// eslint-disable-next-line eqeqeq
|
|
taskService.getTaskDef({
|
|
taskService.getTaskDef({
|
|
procInsId: row.procInsIdRefund,
|
|
procInsId: row.procInsIdRefund,
|
|
@@ -521,7 +558,8 @@
|
|
formTitle: '借款归还' + '流程详情',
|
|
formTitle: '借款归还' + '流程详情',
|
|
businessId: row.refundId,
|
|
businessId: row.refundId,
|
|
status: 'reback',
|
|
status: 'reback',
|
|
- method: 'view'
|
|
|
|
|
|
+ method: 'view',
|
|
|
|
+ refundId:row.refundId
|
|
}
|
|
}
|
|
})
|
|
})
|
|
})
|
|
})
|
|
@@ -596,6 +634,32 @@
|
|
this.$refs.borrowDia.init('edit',row.refundId);
|
|
this.$refs.borrowDia.init('edit',row.refundId);
|
|
},
|
|
},
|
|
|
|
|
|
|
|
+ // 自定义服务端导出
|
|
|
|
+ exportMethod ({ options }) {
|
|
|
|
+ // 传给服务端的参数
|
|
|
|
+ const params = {
|
|
|
|
+ 'current': this.tablePage.currentPage,
|
|
|
|
+ 'size': this.tablePage.pageSize,
|
|
|
|
+ 'orders': this.tablePage.orders,
|
|
|
|
+ ...this.searchForm,
|
|
|
|
+ filename: options.filename,
|
|
|
|
+ sheetName: options.sheetName,
|
|
|
|
+ isHeader: options.isHeader,
|
|
|
|
+ original: options.original,
|
|
|
|
+ mode: options.mode,
|
|
|
|
+ selectIds: options.mode === 'selected' ? options.map(item => item.id) : [],
|
|
|
|
+ exportFields: options.columns.map(column => column.property)
|
|
|
|
+ }
|
|
|
|
+ return this.borrowService.exportFile(params).then((res) => {
|
|
|
|
+ // 将二进制流文件写入excel表,以下为重要步骤
|
|
|
|
+ this.$utils.downloadExcel(res, options.filename+ ".xls")
|
|
|
|
+ }).catch(function (err) {
|
|
|
|
+ if (err.response) {
|
|
|
|
+ console.log(err.response)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
|