This commit is contained in:
77
2024-05-05 23:01:12 +08:00
commit d92e402784
344 changed files with 29674 additions and 0 deletions

View File

@@ -0,0 +1,101 @@
<template>
<div class="app-container">
<el-tabs v-model="activeName" type="card">
<el-tab-pane label="借款协议" name="loansAgreement">
<el-button type="primary" size="mini" v-if="!loansAgreement" @click="showEdit('loansAgreement')">编辑</el-button>
<el-button :loading="buttonLoading" v-if="loansAgreement" type="primary" size="mini" @click="submitForm2('loansAgreement')">保存</el-button>
<div v-if="!loansAgreement" v-html="form.loansAgreement" style="width: 98%" />
<!-- <editor v-if="privacyAgreement" v-model="form.privacyAgreement" :min-height="192"></editor>-->
<wang-edit v-if="loansAgreement" v-model="form.loansAgreement" :min-height="800" />
</el-tab-pane>
<el-tab-pane label="服务协议" name="serviceAgreement">
<el-button type="primary" size="mini" v-if="!serviceAgreement" @click="showEdit('serviceAgreement')">编辑</el-button>
<el-button :loading="buttonLoading" v-if="serviceAgreement" type="primary" size="mini" @click="submitForm2('serviceAgreement')">保存</el-button>
<div v-if="!serviceAgreement" v-html="form.serviceAgreement" style="width: 98%" />
<editor v-if="serviceAgreement" v-model="form.serviceAgreement" :min-height="192"></editor>
</el-tab-pane>
<el-tab-pane label="授权协议" name="authAgreement">
<el-button type="primary" size="mini" v-if="!authAgreement" @click="showEdit('authAgreement')">编辑</el-button>
<el-button :loading="buttonLoading" v-if="authAgreement" type="primary" size="mini" @click="submitForm2('authAgreement')">保存</el-button>
<div v-if="!authAgreement" v-html="form.authAgreement" style="width: 98%" />
<editor v-if="authAgreement" v-model="form.authAgreement" :min-height="192"></editor>
</el-tab-pane>
<el-tab-pane label="法律责任" name="lawAgreement">
<el-button type="primary" size="mini" v-if="!lawAgreement" @click="showEdit('lawAgreement')">编辑</el-button>
<el-button :loading="buttonLoading" v-if="lawAgreement" type="primary" size="mini" @click="submitForm2('lawAgreement')">保存</el-button>
<div v-if="!lawAgreement" v-html="form.lawAgreement" style="width: 98%" />
<editor v-if="lawAgreement" v-model="form.lawAgreement" :min-height="192"></editor>
</el-tab-pane>
<el-tab-pane label="合同模板" name="contractTemplate">
<el-button type="primary" size="mini" v-if="!contractTemplate" @click="showEdit('contractTemplate')">编辑</el-button>
<el-button :loading="buttonLoading" v-if="contractTemplate" type="primary" size="mini" @click="submitForm2('contractTemplate')">保存</el-button>
<div v-if="!contractTemplate" v-html="form.contractTemplate" style="width: 98%" />
<editor v-if="contractTemplate" v-model="form.contractTemplate" :min-height="192"></editor>
</el-tab-pane>
</el-tabs>
</div>
</template>
<script>
import { getAgreementSetting, updateAgreementSetting } from '@/api/dk/AgreementSetting'
import Editor from '@/components/Editor'
import WangEdit from '@/components/WangEdit'
export default {
name: "AgreementSetting",
components: {
Editor,WangEdit
},
data() {
return {
//按钮loading
buttonLoading: false,
form: {
id: undefined,
loansAgreement:undefined,
serviceAgreement:undefined,
authAgreement:undefined,
lawAgreement:undefined,
contractTemplate: undefined,
},
activeName:'loansAgreement',
// 表单校验
rules: {
},
formDisable:true,
loansAgreement:false,
serviceAgreement:false,
authAgreement:false,
lawAgreement:false,
contractTemplate: false,
};
},
created() {
this.init();
},
methods: {
init(){
getAgreementSetting().then(response => {
this.form = response.data;
})
},
showEdit(key){
this[key] = true;
},
submitForm2(key){
const params = {
id: this.form.id,
[key]: this.form[key],
};
this.buttonLoading = true;
updateAgreementSetting(params).then(response => {
this.buttonLoading = false;
this[key] = false;
this.msgSuccess("修改成功");
}).catch(() => {
this.buttonLoading = false;
});
}
}
};
</script>

View File

@@ -0,0 +1,312 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['dk:BorrowStatus:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['dk:BorrowStatus:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['dk:BorrowStatus:remove']"
>删除</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="BorrowStatusList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="状态编码" align="center" prop="id" min-width="20" />
<el-table-column label="是否打款" align="center" prop="usedRemit" min-width="20">
<template v-slot="scope">
<dict-tag-v2 :options="yesOrNoList" :value="scope.row.usedRemit"/>
</template>
</el-table-column>
<el-table-column label="允许提现" align="center" prop="withdrawFlag" min-width="20">
<template v-slot="scope">
<dict-tag-v2 :options="booleanList" :value="scope.row.withdrawFlag"/>
</template>
</el-table-column>
<el-table-column label="借款状态" align="center" prop="borrowName" min-width="20">
<template v-slot="scope">
<span :style={color:scope.row.borrowNameStyle}>{{scope.row.borrowName}}</span>
</template>
</el-table-column>
<el-table-column label="借款说明" align="center" prop="borrowRemark" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" min-width="20">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['dk:BorrowStatus:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['dk:BorrowStatus:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改借款状态对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="字体颜色" prop="borrowNameStyle">
<el-input v-model="form.borrowNameStyle" placeholder="请输入字体颜色" />
</el-form-item>
<el-form-item label="借款状态" prop="borrowName">
<el-input v-model="form.borrowName" placeholder="请输入借款状态" />
</el-form-item>
<el-form-item label="借款说明" prop="borrowRemark">
<el-input v-model="form.borrowRemark" type="textarea" placeholder="请输入内容" />
</el-form-item>
<el-form-item label="是否打款" prop="usedRemit">
<el-radio-group v-model="form.usedRemit" fill="green" size="mini">
<el-radio :label="1" border></el-radio>
<el-radio :label="0" border></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="允许提现" prop="withdrawFlag">
<el-radio-group v-model="form.withdrawFlag" fill="green" size="mini">
<el-radio :label="true" border></el-radio>
<el-radio :label="false" border></el-radio>
</el-radio-group>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import {
listBorrowStatus,
getBorrowStatus,
delBorrowStatus,
addBorrowStatus,
updateBorrowStatus,
exportBorrowStatus,
} from '@/api/dk/BorrowStatus'
import { booleanList, yesOrNoList } from '@/constant/statusMap'
export default {
name: "BorrowStatus",
components: {
},
data() {
return {
yesOrNoList,booleanList,
//按钮loading
buttonLoading: false,
// 遮罩层
loading: true,
// 导出遮罩层
exportLoading: false,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 借款状态表格数据
BorrowStatusList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
usedRemit: undefined,
borrowName: undefined,
borrowRemark: undefined,
},
// 表单参数
form: {},
// 表单校验
rules: {
usedRemit: [
{ required: true, message: "是否可以打款不能为空", trigger: "blur" }
],
borrowName: [
{ required: true, message: "借款状态不能为空", trigger: "blur" }
],
borrowRemark: [
{ required: true, message: "借款说明不能为空", trigger: "blur" }
],
}
};
},
created() {
this.getList();
},
methods: {
/** 查询借款状态列表 */
getList() {
this.loading = true;
listBorrowStatus(this.queryParams).then(response => {
this.BorrowStatusList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
id: undefined,
usedRemit: undefined,
borrowName: undefined,
borrowRemark: undefined,
borrowNameStyle: undefined,
withdrawFlag: undefined,
createTime: undefined,
updateTime: undefined
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加借款状态";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.loading = true;
this.reset();
const id = row.id || this.ids
getBorrowStatus(id).then(response => {
this.loading = false;
this.form = response.data;
this.open = true;
this.title = "修改借款状态";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
this.buttonLoading = true;
if (this.form.id != null) {
updateBorrowStatus(this.form).then(response => {
this.buttonLoading = false;
this.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addBorrowStatus(this.form).then(response => {
this.buttonLoading = false;
this.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$confirm('是否确认删除借款状态编号为"' + ids + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.loading = true;
return delBorrowStatus(ids);
}).then(() => {
this.loading = false;
this.getList();
this.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm('是否确认导出所有借款状态数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.exportLoading = true;
return exportBorrowStatus(queryParams);
}).then(response => {
this.download(response.msg);
this.exportLoading = false;
}).catch(() => {});
}
}
};
</script>

View File

@@ -0,0 +1,143 @@
<template>
<div class="app-container">
<el-form :model="form" :rules="rules" ref="form" label-width="150px">
<!-- <el-row>
<el-form-item label="站点标题" prop="homeTitle">
<el-input v-model="form.homeTitle" placeholder="请输入站点标题" />
</el-form-item>
</el-row>-->
<el-row>
<el-form-item label="banner图" prop="bannerOne">
<imageUpload v-model="form.bannerOne"/>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="聊天配置" prop="chatUrl">
<el-input v-model="form.chatUrl" placeholder="请输入聊天配置" />
</el-form-item>
</el-row>
<el-row>
<el-form-item label="默认语言" prop="defaultLocal">
<el-select v-model="form.defaultLocal" placeholder="请选择默认语言" size="small">
<el-option key="ch" label="简体中文" value="zh_CN" />
<el-option key="en" label="英语" value="en_US" />
<!-- <el-option key="in" label="印度语" value="gu_IN" />-->
</el-select>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="货币单位" prop="defaultCoinUnit">
<el-input v-model="form.defaultCoinUnit" placeholder="请输入货币单位" />
</el-form-item>
</el-row>
<el-row>
<el-form-item label="开启提现码功能" prop="openWithdrawCode">
<el-select v-model="form.openWithdrawCode" placeholder="开启提现码功能" size="small">
<el-option key="1" label="关闭" :value="false" />
<el-option key="2" label="开启" :value="true" />
</el-select>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="提现码" prop="withdrawCode">
<el-input v-model="form.withdrawCode" placeholder="请输入提现码" />
</el-form-item>
</el-row>
<el-row>
<el-form-item label="手机号码格式" prop="randomPhoneVersion">
<el-select v-model="form.randomPhoneVersion" placeholder="请选择手机号码格式" size="small">
<el-option key="ch" label="中国号码" value="china" />
<el-option key="en" label="印度号码" value="yindu" />
</el-select>
</el-form-item>
</el-row>
<!-- <el-row>
<el-form-item label="公章" prop="commonSeal">
<imageUpload v-model="form.bannerUrl"/>
</el-form-item>
</el-row>-->
<el-form-item>
<el-button :loading="buttonLoading" type="primary" size="mini" @click="submitForm">保存</el-button>
</el-form-item>
</el-form>
</div>
</template>
<script>
import {
getHomeSetting,
updateHomeSetting
} from '@/api/dk/HomeSetting'
import ImageUpload from '@/components/ImageUpload/index'
export default {
name: "HomeSetting",
components: {
ImageUpload
},
data() {
return {
//按钮loading
buttonLoading: false,
// 表单参数
form: {
homeTitle: undefined,
bannerOne: undefined,
commonSeal: undefined,
chatUrl: undefined,
defaultLocal: undefined,
defaultCoinUnit: undefined,
withdrawCode: undefined,
randomPhoneVersion: undefined,
openWithdrawCode: undefined,
},
// 表单校验
rules: {
},
formDisable:true,
};
},
created() {
this.init();
},
methods: {
init(){
this.refreshData(this.form.appType);
},
refreshData(){
getHomeSetting().then(response => {
this.form = response.data;
})
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
this.buttonLoading = true;
updateHomeSetting({
id:this.form.id,
homeTitle: this.form.homeTitle,
bannerOne:this.form.bannerOne,
commonSeal:this.form.commonSeal,
chatUrl: this.form.chatUrl,
defaultLocal: this.form.defaultLocal,
defaultCoinUnit: this.form.defaultCoinUnit,
withdrawCode: this.form.withdrawCode,
randomPhoneVersion: this.form.randomPhoneVersion,
openWithdrawCode: this.form.openWithdrawCode
}).then(response => {
this.formDisable = true;
this.buttonLoading = false;
this.msgSuccess("修改成功");
}).catch(() => {
this.formDisable = true;
this.buttonLoading = false;
});
}
});
}
}
};
</script>

View File

@@ -0,0 +1,106 @@
<template>
<div class="app-container">
<el-form :model="form" :rules="rules" ref="form" label-width="150px">
<el-row>
<el-form-item label="贷款最小金额(元)" prop="loansMinAccount">
<el-input :disabled="formDisable" v-model="form.loansMinAccount" placeholder="请输入贷款最小金额(元)" />
</el-form-item>
</el-row>
<el-row>
<el-form-item label="贷款最大金额(元)" prop="loansMaxAccount">
<el-input :disabled="formDisable" v-model="form.loansMaxAccount" placeholder="请输入贷款最大金额(元)" />
</el-form-item>
</el-row>
<el-row>
<el-form-item label="贷款初始金额(元)" prop="loansInitAccount">
<el-input :disabled="formDisable" v-model="form.loansInitAccount" placeholder="请输入贷款初始金额(元)" />
</el-form-item>
</el-row>
<el-row>
<el-form-item label="允许选择月份" prop="loansMonth">
<el-input :disabled="formDisable" v-model="form.loansMonth" placeholder="请输入允许选择月份" />
</el-form-item>
</el-row>
<el-row>
<el-form-item label="初始选择月份" prop="loansInitMonth">
<el-input :disabled="formDisable" v-model="form.loansInitMonth" placeholder="请输入初始选择月份" />
</el-form-item>
</el-row>
<el-row>
<el-form-item label="每月还款日" prop="dueDate">
<el-input :disabled="formDisable" v-model="form.dueDate" placeholder="请输入每月还款日" />
</el-form-item>
</el-row>
<el-row>
<el-form-item label="服务费率" prop="serviceRate">
<el-input :disabled="formDisable" type="textarea" v-model="form.serviceRate" placeholder="请输入服务费率"
:autosize="{ minRows: 4}"/>
</el-form-item>
</el-row>
<el-form-item>
<el-button :disabled="!formDisable" type="primary" size="mini" @click="formDisable = false">编辑</el-button>
<el-button :disabled="formDisable" :loading="buttonLoading" type="primary" size="mini" @click="submitForm">保存</el-button>
</el-form-item>
</el-form>
</div>
</template>
<script>
import { getLoansSetting, updateLoansSetting } from '@/api/dk/LoansSetting'
export default {
name: "LoansSetting",
components: {
},
data() {
return {
//按钮loading
buttonLoading: false,
// 表单参数
form: {
id: undefined,
loansMinAccount: undefined,
loansMaxAccount: undefined,
loansInitAccount: undefined,
loansMonth: undefined,
loansInitMonth: undefined,
dueDate: undefined,
serviceRate: undefined
},
// 表单校验
rules: {
},
formDisable:true,
};
},
created() {
this.init();
},
methods: {
init(){
this.refreshData(this.form.appType);
},
refreshData(){
getLoansSetting().then(response => {
this.form = response.data;
})
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
this.buttonLoading = true;
updateLoansSetting(this.form).then(response => {
this.formDisable = true;
this.buttonLoading = false;
this.msgSuccess("修改成功");
}).catch(() => {
this.formDisable = true;
this.buttonLoading = false;
});
}
});
}
}
};
</script>

View File

@@ -0,0 +1,60 @@
<template>
<div class="app-container">
<div v-html="contractInfo">
</div>
</div>
</template>
<script>
import { getContract } from '@/api/dk/borrow'
export default {
components: {},
data() {
return {
open: false,
title: '',
info: {
tradeNo: undefined,
},
contractInfo: undefined,
buttonLoading: false,
}
},
created() {
const borrowTradeNo = this.$route.params && this.$route.params.borrowTradeNo
this.init(borrowTradeNo)
this.hihi();
},
methods: {
init(tradeNo) {
this.info.tradeNo = tradeNo || undefined
this.open = true
this.$nextTick(() => {
getContract(tradeNo).then(response => {
this.contractInfo = response.data
this.open = true
this.title = '合同'
})
})
}
}
}
</script>
<style rel="stylesheet/scss" lang="scss">
.transAccountContract {
margin: auto;
width: 1360px;
height: 592px;
background-image: url("../../../assets/images/hd_bg1.png");
background-repeat: no-repeat;
background-size: cover;
}
.contentContract {
width: 100%;
padding-top: 268px !important;
padding-left: 155px;
*margin: 16px auto;
}
</style>

View File

@@ -0,0 +1,105 @@
<template>
<div class="app-container">
<div id="div_hd" class="transAccountContract">
<div class="contentContract">
<table border="1" width="1101px" height="108px" style="border-collapse:collapse;border-color:#c9d4da;">
<tbody>
<tr align="center">
<td bgcolor="#F5F6FA"><strong>保险名称</strong></td>
<td bgcolor="#F5F6FA"><strong>贷款概要</strong></td>
<td bgcolor="#F5F6FA"><strong>投保人</strong></td>
<td bgcolor="#F5F6FA"><strong>投保金额</strong></td>
<td bgcolor="#F5F6FA"><strong>保险期限</strong></td>
<td bgcolor="#F5F6FA"><strong>保单状态</strong></td>
<td bgcolor="#F5F6FA"><strong>保单类型</strong></td>
<td bgcolor="#F5F6FA"><strong>投保资料</strong></td>
</tr>
<tr>
<td align="center" bgcolor="#fff">金融网贷商业险</td>
<td align="center" bgcolor="#fff">C04750509921376<br>贷款金额{{info.totalLoanMoney}}元整</td>
<td align="center" bgcolor="#fff">{{ info.realName }}</td>
<td align="center" bgcolor="#fff"><input type="text" name="T1" size="15" style="border: 1px solid #FFFFFF" :value="info.totalLoanMoney+'元整'"></td>
<td align="center" bgcolor="#fff"><input type="text" name="T1" size="25" style="border: 1px solid #FFFFFF" :value="hihiStr"></td>
<td align="center" bgcolor="#fff"><input type="text" name="T1" size="6" style="border: 1px solid #FFFFFF" value="未生效"
></td>
<td align="center" bgcolor="#fff">电子保单</td>
<td align="center" bgcolor="#fff"><span style="color:#003399;">贷款合同 已上传<br>投保人资料 已上传</span>
</td>
</tr>
<tr>
<td colspan="8" align="left" bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span
style="color: #e81b1b;"
></span></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</template>
<script>
import { getBorrow } from '@/api/dk/borrow'
export default {
components: {},
data() {
return {
open: false,
title: '',
info: {
id: undefined,
borrowRemark: undefined
},
buttonLoading: false,
hihiStr: undefined,
}
},
created() {
const borrowId = this.$route.params && this.$route.params.borrowId
this.init(borrowId)
this.hihi();
},
methods: {
hihi(){
const date = new Date()
const startDate = date.getFullYear() + '/' + (date.getMonth() + 1) + '/' + date.getDate()
const endDate = (date.getFullYear() + 3) + '/' + (date.getMonth() + 1) + '/' + date.getDate()
this.hihiStr = startDate + "日至" + endDate + "日"
},
parseDate(dateStr) {
const date = new Date(dateStr)
return date.getFullYear() + '/' + (date.getMonth() + 1) + '/' + date.getDate()
},
init(id) {
this.info.id = id || undefined
this.open = true
this.$nextTick(() => {
getBorrow(id).then(response => {
this.info = response.data
this.open = true
this.title = '合同保单'
})
})
}
}
}
</script>
<style rel="stylesheet/scss" lang="scss">
.transAccountContract {
margin: auto;
width: 1360px;
height: 592px;
background-image: url("../../../assets/images/hd_bg1.png");
background-repeat: no-repeat;
background-size: cover;
}
.contentContract {
width: 100%;
padding-top: 268px !important;
padding-left: 155px;
*margin: 16px auto;
}
</style>

View File

@@ -0,0 +1,275 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="订单编号" prop="tradeNo">
<el-input
v-model="queryParams.tradeNo"
placeholder="请输入订单编号"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="真实姓名" prop="realName">
<el-input
v-model="queryParams.realName"
placeholder="请输入真实姓名"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="borrowList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="ID" align="center" prop="id" v-if="false"/>
<el-table-column label="订单编号" align="center" prop="tradeNo" />
<el-table-column label="客户信息" align="center" prop="customerPhone" min-width="100">
<template v-slot="scope">
<span style="font-weight: bold">姓名:</span><span>{{scope.row.realName}}</span> <br>
<span style="font-weight: bold">用户:</span><span>{{scope.row.customerLoginName}}</span><br>
</template>
</el-table-column>
<el-table-column label="贷款信息" align="center" prop="customerPhone" min-width="100">
<template v-slot="scope">
<span style="font-weight: bold">总贷款额:</span><span>{{scope.row.totalLoanMoney}}</span> <br>
<span style="font-weight: bold">还款月数:</span><span>{{scope.row.totalMonth}}</span><br>
<span style="font-weight: bold">每月还款额:</span><span>{{scope.row.avgRepayment}}</span><br>
<span style="font-weight: bold">月利率:</span><span>{{scope.row.loanMonthRate*100}}</span><br>
</template>
</el-table-column>
<el-table-column label="创建日期" align="center" prop="createTime" />
<el-table-column label="允许提现" align="center" prop="withdrawFlag">
<template v-slot="scope">
<dict-tag-v2 :options="booleanList" :value="scope.row.withdrawFlag"/>
</template>
</el-table-column>
<el-table-column label="是否打款" align="center" prop="remitFlag" >
<template v-slot="scope">
<dict-tag-v2 :options="yesOrNoList" :value="scope.row.remitFlag"/>
</template>
</el-table-column>
<el-table-column label="借款状态" align="center" prop="borrowName" >
<template v-slot="scope">
<span :style={color:scope.row.borrowNameStyle}>{{scope.row.borrowName}}</span>
</template>
</el-table-column>
<el-table-column label="借款说明" align="center" prop="borrowRemark" />
<el-table-column label="资料" align="center" prop="borrowName" >
<template v-slot="scope">
<el-button
size="mini"
type="text"
icon="el-icon-document"
@click="handleTransAccount(scope.row)"
>转账记录</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-document"
@click="handleUpdateTransRemark(scope.row)"
>修改转账备注</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-document"
@click="handleContract(scope.row)"
>合同保单</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-document"
@click="handleContractTemplate(scope.row)"
>合同</el-button>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" min-width="100">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleStatus(scope.row)"
v-hasPermi="['dk:borrow:edit']"
>修改状态</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-bank-card"
@click="handleBank(scope.row)"
v-hasPermi="['dk:borrow:edit']"
>修改银行</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-scissors"
@click="handleLoan(scope.row)"
v-hasPermi="['dk:borrow:edit']"
>修改贷款</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-document"
@click="handleCustomerInfo(scope.row)"
v-hasPermi="['dk:borrow:edit']"
>客户资料</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<update-bank-dialog v-if="updateBankVisible" ref="updateBank" @refreshDataList="getList" />
<update-loan-dialog v-if="updateLoanVisible" ref="updateLoan" @refreshDataList="getList" />
<update-status-dialog v-if="updateStatusVisible" ref="updateStatus" @refreshDataList="getList" />
<update-trans-remark-dialog v-if="updateTransRemarkVisible" ref="updateTransRemark" @refreshDataList="getList" />
<customer-info-dialog v-if="infoVisible" ref="info"/>
<trans-account-dialog v-if="transAccountVisible" ref="transAccount" />
</div>
</template>
<script>
import { getBorrow, listBorrow } from '@/api/dk/borrow'
import UpdateBankDialog from './update-bank'
import UpdateLoanDialog from './update-loan'
import UpdateStatusDialog from './update-status'
import CustomerInfoDialog from '../dkCustomer/info'
import TransAccountDialog from '@/views/dk/borrow/trans-account'
import UpdateTransRemarkDialog from '@/views/dk/borrow/update-trans-remark'
import { booleanList, yesOrNoList } from '@/constant/statusMap'
export default {
name: "Borrow",
components: {
UpdateBankDialog,UpdateLoanDialog,CustomerInfoDialog,UpdateStatusDialog,TransAccountDialog,UpdateTransRemarkDialog
},
data() {
return {
yesOrNoList,booleanList,
infoVisible: false,
updateBankVisible: false,
updateLoanVisible: false,
updateStatusVisible: false,
transAccountVisible: false,
updateTransRemarkVisible: false,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 借款计划表格数据
borrowList: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
tradeNo: undefined,
realName: undefined
}
};
},
created() {
this.getList();
},
methods: {
handleBank(row){
this.updateBankVisible = true
this.$nextTick(() => {
this.$refs.updateBank.init(row.id)
})
},
handleLoan(row){
this.updateLoanVisible = true
this.$nextTick(() => {
this.$refs.updateLoan.init(row.id)
})
},
handleStatus(row){
this.updateStatusVisible = true
this.$nextTick(() => {
this.$refs.updateStatus.init(row.id)
})
},
handleCustomerInfo(row){
this.infoVisible = true
this.$nextTick(() => {
this.$refs.info.init(row.customerId,row.id)
})
},
handleUpdateTransRemark(row){
this.updateTransRemarkVisible = true
this.$nextTick(() => {
this.$refs.updateTransRemark.init(row.id)
})
},
handleTransAccount(row){
this.$router.push({ path: '/dk/transAccount/' + row.id })
},
handleContract(row){
this.$router.push({ path: '/dk/contract/' + row.id })
},
handleContractTemplate(row){
this.$router.push({ path: '/dk/contractTemplate/' + row.tradeNo })
},
/** 查询借款计划列表 */
getList() {
this.loading = true;
listBorrow(this.queryParams).then(response => {
this.borrowList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 修改按钮操作 */
handleUpdate(row) {
this.loading = true;
this.reset();
const id = row.id || this.ids
getBorrow(id).then(response => {
this.loading = false;
this.form = response.data;
this.open = true;
this.title = "修改借款计划";
});
},
}
};
</script>

View File

@@ -0,0 +1,101 @@
<template>
<div class="app-container">
<div id="div_hd" class="transAccount">
<div class="content">
<div class="pp"><div class="tits">转账批次号</div><div class="co">273313929</div></div>
<div class="pp"><div class="tits">转出单位</div><div class="co">工银融e贷</div></div>
<div class="pp"><div class="tits">转出账户</div><div class="co">622203***********308</div></div>
<div class="pp"><div class="tits">转出账号地区</div><div class="co">北京</div></div>
<div class="pp"><div class="tits">收款人姓名</div><div class="co">{{ info.realName }}</div></div>
<div class="pp"><div class="tits">收款银行</div><div class="co">{{ info.bankType }}</div></div>
<div class="pp"><div class="tits">收款账户</div><div class="co">{{ info.backCardNum }}</div></div>
<div class="pp"><div class="tits">币种</div><div class="co">人民币元</div></div>
<div class="pp"><div class="tits">转账金额</div><div class="co">{{ info.totalLoanMoney }}</div></div>
<div class="pp"><div class="tits">转账时间</div><div class="co">{{ parseDate(info.createTime, '{y}/{m}/{d}') }}<p></p></div></div>
<div class="pp"><div class="tits">转账类型</div><div class="co">签约金融企业--网贷放款预约转账</div></div>
<div class="pp"><div class="tits">执行方式</div><div class="co">实时到账</div></div>
<div class="pp"><div class="tits">状态</div><div class="co"><span style="color:#006600;">转账失败</span></div></div>
<div class="pp"><div class="tits">银行备注</div><div class="co"></div>{{ info.transRemark }}</div>
<div class="pp"><div class="tits">处理结果</div><div class="co"><span style="color:#E53333;">未处理</span></div></div>
<div class="pp"><div class="tits">用户备注</div><div class="co"></div></div>
</div>
</div>
</div>
</template>
<script>
import { getBorrow } from '@/api/dk/borrow'
export default {
components: {
},
data () {
return {
open: false,
title: '',
info:{
id: undefined,
borrowRemark: undefined,
},
buttonLoading:false,
}
},
created() {
const borrowId = this.$route.params && this.$route.params.borrowId;
this.init(borrowId)
},
methods: {
parseDate(dateStr){
const date = new Date(dateStr);
console.log(date,"123")
return date.getFullYear() + "/" + (date.getMonth() + 1) + "/" + date.getDate();
},
init (id) {
this.info.id = id || undefined;
this.open = true;
this.$nextTick(() => {
getBorrow(id).then(response => {
this.info = response.data;
this.open = true;
this.title = "转账记录";
});
})
}
}
}
</script>
<style rel="stylesheet/scss" lang="scss">
.transAccount {
margin: auto;
width: 1170px;
height: 888px;
background-image: url("../../../assets/images/hd_bg.png");
background-repeat: no-repeat;
background-size: cover;
}
.pp {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
display: block;
float: left;
width: 100%;
font-size: 12px;
height: 30px;
line-height: 30px;
}
.content {
width: 100%;
padding-top: 300px !important;
*margin: 16px auto;
}
.tits {
float: left;
width: 585px;
text-align: right;
}
.co {
float: left;
}
</style>

View File

@@ -0,0 +1,125 @@
<template>
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="700px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-row>
<el-col :span="24">
<el-form-item label="订单编号" prop="tradeNo">
<el-input v-model="form.tradeNo" disabled />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="初始开户行" prop="firstBankType">
<el-input v-model="form.firstBankType" disabled />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="初始卡号" prop="firstBackCardNum">
<el-input v-model="form.firstBackCardNum" disabled />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="开户行" prop="bankType">
<el-input v-model="form.bankType" placeholder="请输入开户行" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="银行卡号" prop="backCardNum">
<el-input v-model="form.backCardNum" placeholder="请输入银行卡号" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="submitForm"> </el-button>
<el-button @click="open = false"> </el-button>
</div>
</el-dialog>
</template>
<script>
import ImageUpload from '@/components/ImageUpload/index'
import { getBorrow, updateBank, updateBorrow } from '@/api/dk/borrow'
import { bankType } from '@/api/dk/BorrowStatus'
export default {
components: {
ImageUpload,
},
data () {
return {
open: false,
title: '',
form:{
id: undefined,
tradeNo: undefined,
firstBankType: undefined,
firstBackCardNum: undefined,
bankType: undefined,
backCardNum: undefined,
},
bankTypeList:[],
rules:{
bankType: [
{ required: true, message: '不能为空', trigger: 'blur' },
],
backCardNum: [
{ required: true, message: '不能为空', trigger: 'blur' },
],
},
buttonLoading:false,
}
},
created() {
bankType().then(response => {
this.bankTypeList = response.data
})
},
methods: {
init (id) {
this.form.id = id || undefined;
this.open = true;
this.$nextTick(() => {
this.$refs['form'].resetFields();
getBorrow(id).then(response => {
this.form.id = response.data.id;
this.form.tradeNo = response.data.tradeNo;
this.form.firstBankType = response.data.firstBankType;
this.form.firstBackCardNum = response.data.firstBackCardNum;
this.form.bankType = response.data.bankType;
this.form.backCardNum = response.data.backCardNum;
this.open = true;
this.title = "修改银行信息";
});
})
},
// 表单提交
submitForm () {
this.$refs['form'].validate((valid) => {
if (valid) {
this.buttonLoading = true;
updateBank({
id: this.form.id,
bankType: this.form.bankType,
backCardNum: this.form.backCardNum,
}).then(data => {
this.msgSuccess("修改成功");
this.buttonLoading = false;
this.open = false
this.$emit('refreshDataList')
}).catch(() => {
this.buttonLoading = false;
});
}
})
},
}
}
</script>

View File

@@ -0,0 +1,115 @@
<template>
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="700px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-row>
<el-col :span="24">
<el-form-item label="订单编号" prop="tradeNo">
<el-input v-model="form.tradeNo" disabled />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="总贷款额" prop="totalLoanMoney">
<el-input v-model="form.totalLoanMoney" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="还款月数" prop="totalMonth">
<el-input v-model="form.totalMonth" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="月利率" prop="loanMonthRate">
<el-input v-model="form.loanMonthRate" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="submitForm"> </el-button>
<el-button @click="open = false"> </el-button>
</div>
</el-dialog>
</template>
<script>
import ImageUpload from '@/components/ImageUpload/index'
import { getBorrow, updateBorrowLoan } from '@/api/dk/borrow'
export default {
components: {
ImageUpload,
},
data () {
return {
open: false,
title: '',
form:{
id: undefined,
tradeNo: undefined,
totalLoanMoney: undefined,
totalMonth: undefined,
loanMonthRate: undefined,
},
rules:{
totalLoanMoney: [
{ required: true, message: '不能为空', trigger: 'blur' },
],
totalMonth: [
{ required: true, message: '不能为空', trigger: 'blur' },
],
loanMonthRate: [
{ required: true, message: '不能为空', trigger: 'blur' },
],
},
buttonLoading:false,
}
},
created() {
},
methods: {
init (id) {
this.form.id = id || undefined;
this.open = true;
this.$nextTick(() => {
this.$refs['form'].resetFields();
getBorrow(id).then(response => {
this.form.id = response.data.id;
this.form.tradeNo = response.data.tradeNo;
this.form.totalLoanMoney = response.data.totalLoanMoney;
this.form.totalMonth = response.data.totalMonth;
this.form.loanMonthRate = response.data.loanMonthRate*100;
this.open = true;
this.title = "修改贷款信息";
});
})
},
// 表单提交
submitForm () {
this.$refs['form'].validate((valid) => {
if (valid) {
this.buttonLoading = true;
updateBorrowLoan({
id: this.form.id,
totalLoanMoney: this.form.totalLoanMoney,
totalMonth: this.form.totalMonth,
loanMonthRate: this.form.loanMonthRate,
}).then(data => {
this.msgSuccess("修改成功");
this.buttonLoading = false;
this.open = false
this.$emit('refreshDataList')
}).catch(() => {
this.buttonLoading = false;
});
}
})
},
}
}
</script>

View File

@@ -0,0 +1,135 @@
<template>
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="700px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-row>
<el-col :span="24">
<el-button v-for="borrowStatus in borrowList" @click="borrowStatusChange(borrowStatus)">{{ borrowStatus.borrowName }}</el-button>
</el-col>
</el-row>
<el-row>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="文字颜色" prop="borrowNameStyle">
<el-input v-model="form.borrowNameStyle" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="借款状态" prop="borrowName">
<el-input v-model="form.borrowName" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="借款说明" prop="borrowRemark">
<el-input v-model="form.borrowRemark" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="submitForm"> </el-button>
<el-button @click="open = false"> </el-button>
</div>
</el-dialog>
</template>
<script>
import ImageUpload from '@/components/ImageUpload/index'
import { getBorrow, updateBorrow, updateBorrowStatus } from '@/api/dk/borrow'
import { all } from '@/api/dk/BorrowStatus'
export default {
components: {
ImageUpload,
},
data () {
return {
open: false,
title: '',
borrowList: [],
form:{
id: undefined,
usedRemit: undefined,
borrowNameStyle: undefined,
borrowName: undefined,
borrowRemark: undefined,
},
rules:{
borrowName: [
{ required: true, message: '不能为空', trigger: 'blur' },
],
borrowRemark: [
{ required: true, message: '不能为空', trigger: 'blur' },
],
},
buttonLoading:false,
}
},
created() {
all().then(response => {
this.borrowList = response.data;
});
},
methods: {
init (id) {
this.form.id = id || undefined;
this.open = true;
this.$nextTick(() => {
this.$refs['form'].resetFields();
getBorrow(id).then(response => {
this.form.id = response.data.id;
this.form.borrowNameStyle = response.data.borrowNameStyle;
this.form.borrowName = response.data.borrowName;
this.form.borrowRemark = response.data.borrowRemark;
this.form.borrowStatusId = response.data.borrowStatusId;
this.open = true;
this.title = "修改状态";
});
})
},
// 表单提交
submitForm () {
this.$refs['form'].validate((valid) => {
if (valid) {
this.buttonLoading = true;
updateBorrowStatus({
id: this.form.id,
borrowNameStyle: this.form.borrowNameStyle,
borrowName: this.form.borrowName,
borrowRemark: this.form.borrowRemark,
usedRemit: this.form.usedRemit,
borrowStatusId: this.form.borrowStatusId
}).then(data => {
this.msgSuccess("修改成功");
this.buttonLoading = false;
this.open = false
this.$emit('refreshDataList')
}).catch(() => {
this.buttonLoading = false;
});
}
})
},
borrowStatusChange(borrowStatus){
this.form.borrowNameStyle = borrowStatus.borrowNameStyle;
this.form.borrowName = borrowStatus.borrowName;
this.form.borrowRemark = borrowStatus.borrowRemark;
this.form.usedRemit = borrowStatus.usedRemit;
this.form.borrowStatusId = borrowStatus.id
}
}
}
</script>
<style>
.borrowStatusList {
color: red;
border-style:solid;
border-color:black;
display: inline-block;
white-space: nowrap;
}
</style>

View File

@@ -0,0 +1,75 @@
<template>
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="700px" append-to-body>
<el-form ref="form" :model="form" label-width="100px">
<el-row>
<el-col :span="24">
<el-form-item label="转账备注" prop="transRemark">
<el-input v-model="form.transRemark" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="submitForm"> </el-button>
<el-button @click="open = false"> </el-button>
</div>
</el-dialog>
</template>
<script>
import ImageUpload from '@/components/ImageUpload/index'
import { getBorrow, updateBorrow } from '@/api/dk/borrow'
export default {
components: {
ImageUpload,
},
data () {
return {
open: false,
title: '',
form:{
id: undefined,
transRemark: ' ',
},
buttonLoading: false,
}
},
created() {
},
methods: {
init (id) {
this.form.id = id || undefined;
this.open = true;
this.$nextTick(() => {
this.$refs['form'].resetFields();
getBorrow(id).then(response => {
this.form.id = response.data.id;
this.form.transRemark = response.data.transRemark;
this.open = true;
this.title = "修改转账备注信息";
});
})
},
// 表单提交
submitForm () {
this.$refs['form'].validate((valid) => {
if (valid) {
this.buttonLoading = true;
updateBorrow({
id: this.form.id,
transRemark: this.form.transRemark || " ",
}).then(data => {
this.msgSuccess("修改成功");
this.buttonLoading = false;
this.open = false
this.$emit('refreshDataList')
}).catch(() => {
this.buttonLoading = false;
});
}
})
},
}
}
</script>

View File

@@ -0,0 +1,295 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="手机" prop="phoneNumber">
<el-input
v-model="queryParams.phoneNumber"
placeholder="请输入手机"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="名称" prop="nickName">
<el-input
v-model="queryParams.nickName"
placeholder="请输入名称"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
:loading="exportLoading"
@click="handleExport"
v-hasPermi="['dk:dkCustomer:export']"
>导出
</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="dkCustomerList" @selection-change="handleSelectionChange">
<el-table-column label="手机" align="center" prop="phoneNumber"/>
<el-table-column label="用户名称" align="center" prop="nickName"/>
<el-table-column label="真实名称" align="center" prop="realName"/>
<el-table-column label="是否实名" align="center" prop="realNameAuth">
<template v-slot="scope">
<dict-tag-v2 :options="yesOrNoList" :value="scope.row.realNameAuth"/>
</template>
</el-table-column>
<el-table-column label="是否贷款" align="center" prop="loansFlag">
<template v-slot="scope">
<dict-tag-v2 :options="yesOrNoList" :value="scope.row.loansFlag"/>
</template>
</el-table-column>
<el-table-column label="是否提现" align="center" prop="withdrawFlag">
<template v-slot="scope">
<dict-tag-v2 :options="yesOrNoList" :value="scope.row.withdrawFlag"/>
</template>
</el-table-column>
<el-table-column label="余额" align="center" prop="account" />
<el-table-column label="贷款金额" align="center" prop="borrowAccount" />
<el-table-column label="允许提现" align="center" prop="allowWithdrawFlag">
<template v-slot="scope">
<el-switch
v-model="scope.row.allowWithdrawFlag"
:active-value="true"
:inactive-value="false"
@change="handleAllowWithdrawFlagChange(scope.row)"
></el-switch>
</template>
</el-table-column>
<el-table-column label="允许输入签名" align="center" prop="allowSignature">
<template v-slot="scope">
<el-switch
v-model="scope.row.allowSignature"
:active-value="true"
:inactive-value="false"
@change="handleAllowSignatureChange(scope.row)"
></el-switch>
</template>
</el-table-column>
<el-table-column label="状态" align="center" prop="status">
<template v-slot="scope">
<el-switch
v-model="scope.row.status"
:active-value="0"
:inactive-value="1"
@change="handleStatusChange(scope.row)"
></el-switch>
</template>
</el-table-column>
<el-table-column label="最后登陆IP" align="center" prop="lastLoginIp"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template v-slot="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdateAccount(scope.row)"
>修改余额
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-document"
@click="handleInfo(scope.row)"
>详情
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-key"
@click="handleUpdatePwd(scope.row)"
>重置密码
</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<info-dialog v-if="infoVisible" ref="info"/>
<update-amount-dialog v-if="updateAmountVisible" ref="updateAmount" @refreshDataList="getList" />
</div>
</template>
<script>
import {
listDkCustomer,
updateDkCustomer,
exportDkCustomer, resetCustomerPwd
} from '@/api/dk/dkCustomer'
import { yesOrNoList, stopStatusList } from '@/constant/statusMap'
import InfoDialog from './info'
import UpdateAmountDialog from './update-amount'
import { updateAllowSignature } from '@/api/dk/dkCustomerInfo'
export default {
name: 'DkCustomer',
components: {
InfoDialog,UpdateAmountDialog
},
data() {
return {
yesOrNoList, stopStatusList,
infoVisible: false,
updateAmountVisible: false,
// 遮罩层
loading: true,
// 导出遮罩层
exportLoading: false,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 客户表格数据
dkCustomerList: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
phoneNumber: undefined,
nickName: undefined
}
}
},
created() {
this.getList()
},
methods: {
handleInfo(row) {
this.infoVisible = true
this.$nextTick(() => {
this.$refs.info.init(row.id)
})
},
handleUpdateAccount(row) {
this.updateAmountVisible = true
this.$nextTick(() => {
this.$refs.updateAmount.init(row.id)
})
},
handleUpdatePwd(row) {
this.$prompt('请输入"' + row.nickName + '"的新密码', "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
closeOnClickModal: false,
inputPattern: /^.{5,20}$/,
inputErrorMessage: "用户密码长度必须介于 5 和 20 之间",
}).then(({ value }) => {
resetCustomerPwd(row.id, value).then(() => {
this.msgSuccess("修改成功,新密码是:" + value);
});
}).catch(() => {});
},
handleStatusChange(row) {
let text = row.status === 0 ? '恢复' : '封禁'
this.$confirm('确认要' + text + '[' + row.nickName + ']客户吗?', '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(function() {
return updateDkCustomer({ id: row.id, status: row.status })
}).then(() => {
this.msgSuccess(text + '成功')
}).catch(function() {
row.status = row.status === 0 ? 1 : 0
})
},
handleAllowWithdrawFlagChange(row){
let text = row.allowWithdrawFlag === false ? '封禁' : '恢复'
this.$confirm('确认要' + text + '[' + row.nickName + ']客户的提现功能吗?', '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(function() {
return updateDkCustomer({ id: row.id, allowWithdrawFlag: row.allowWithdrawFlag })
}).then(() => {
this.msgSuccess(text + '成功')
}).catch(function() {
row.allowWithdrawFlag = row.allowWithdrawFlag !== false
})
},
handleAllowSignatureChange(row){
let text = row.allowSignature === false ? '封禁' : '恢复'
this.$confirm('确认要' + text + '[' + row.nickName + ']客户的签名功能吗?', '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(function() {
return updateAllowSignature({ customerId: row.id, allowSignature: row.allowSignature })
}).then(() => {
this.msgSuccess(text + '成功')
}).catch(function() {
row.allowSignature = row.allowSignature !== false
})
},
/** 查询客户列表 */
getList() {
this.loading = true
listDkCustomer(this.queryParams).then(response => {
this.dkCustomerList = response.rows
this.total = response.total
this.loading = false
})
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1
this.getList()
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm('queryForm')
this.handleQuery()
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length !== 1
this.multiple = !selection.length
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams
this.$confirm('是否确认导出所有客户数据项?', '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.exportLoading = true
return exportDkCustomer(queryParams)
}).then(response => {
this.download(response.msg)
this.exportLoading = false
}).catch(() => {
})
}
}
}
</script>

View File

@@ -0,0 +1,175 @@
<template>
<el-dialog title="客户信息" :close-on-click-modal="false" :visible.sync="open" width="1200px" append-to-body>
<el-collapse v-model="activeName" >
<el-collapse-item title="基本信息" name="base">
<el-descriptions class="margin-top" :column="3" size="medium" border>
<el-descriptions-item label="登陆号码">
{{info.phoneNumber}}
</el-descriptions-item>
<el-descriptions-item label="昵称">
{{info.nickName}}
</el-descriptions-item>
<el-descriptions-item label="是否实名">
{{info.realNameAuth}}
</el-descriptions-item>
<el-descriptions-item label="是否贷款">
{{info.loansFlag}}
</el-descriptions-item>
<el-descriptions-item label="是否提现">
{{info.withdrawFlag}}
</el-descriptions-item>
<el-descriptions-item label="余额">
{{info.account}}
</el-descriptions-item>
<el-descriptions-item label="可提现金额">
{{info.withdrawAccount}}
</el-descriptions-item>
<el-descriptions-item label="状态">
<dict-tag-v2 :options="stopStatusList" :value="info.status"/>
</el-descriptions-item>
<el-descriptions-item label="真实姓名">
{{customerInfo.realName}}
</el-descriptions-item>
<!-- <el-descriptions-item label="电话">
{{customerInfo.customerPhone}}
</el-descriptions-item>-->
<el-descriptions-item label="身份证号码">
{{customerInfo.cardNum}}
</el-descriptions-item>
<el-descriptions-item label="身份证正面">
<image-preview :src="customerInfo.cardFrontPicture" />
</el-descriptions-item>
<el-descriptions-item label="身份证背面">
<image-preview :src="customerInfo.cardBackPicture" />
</el-descriptions-item>
<el-descriptions-item label="手持身份证照片">
<image-preview :src="customerInfo.handCardPicture" />
</el-descriptions-item>
</el-descriptions>
</el-collapse-item>
<el-collapse-item title="资料信息" name="card">
<el-descriptions class="margin-top" :column="3" size="medium" border>
<el-descriptions-item label="单位名称">
{{customerInfo.companyName}}
</el-descriptions-item>
<el-descriptions-item label="职位">
{{customerInfo.companyTitle}}
</el-descriptions-item>
<el-descriptions-item label="单位电话">
{{customerInfo.companyPhone}}
</el-descriptions-item>
<el-descriptions-item label="工作年龄">
{{customerInfo.companyYear}}
</el-descriptions-item>
<el-descriptions-item label="月薪">
{{customerInfo.incomeWan}}
</el-descriptions-item>
<el-descriptions-item label="单位地址">
{{customerInfo.companyAddress}}
</el-descriptions-item>
<el-descriptions-item label="详细地址" :span="2">
{{customerInfo.companyAddressInfo}}
</el-descriptions-item>
<el-descriptions-item label="现居住地址">
{{customerInfo.customerAddress}}
</el-descriptions-item>
<el-descriptions-item label="详细地址" :span="2">
{{customerInfo.customerAddressInfo}}
</el-descriptions-item>
<el-descriptions-item label="亲属关系">
<dict-tag-v2 :options="kinsfolkRefList" :value="customerInfo.kinsfolkRef"/>
</el-descriptions-item>
<el-descriptions-item label="亲属姓名">
{{customerInfo.kinsfolkName}}
</el-descriptions-item>
<el-descriptions-item label="亲属电话">
{{customerInfo.kinsfolkPhone}}
</el-descriptions-item>
</el-descriptions>
</el-collapse-item>
<el-collapse-item title="收款银行卡" name="bank">
<el-descriptions class="margin-top" :column="3" size="medium" border>
<el-descriptions-item label="开户银行">
{{customerInfo.bankType}}
</el-descriptions-item>
<el-descriptions-item label="银行卡号" :span="2">
{{customerInfo.backCardNum}}
</el-descriptions-item>
</el-descriptions>
</el-collapse-item>
</el-collapse>
<div slot="footer" class="dialog-footer">
<el-button @click="open = false"> </el-button>
</div>
</el-dialog>
</template>
<script>
import { bankTypeList, kinsfolkRefList, stopStatusList, talentInfoTypeList } from '@/constant/statusMap'
import { getDkCustomer } from '@/api/dk/dkCustomer'
import { getInfoByCustomerId } from '@/api/dk/dkCustomerInfo'
import { getBorrow } from '@/api/dk/borrow'
export default {
name: "CustomerInfo",
data() {
return {
kinsfolkRefList,bankTypeList,talentInfoTypeList,stopStatusList,
activeName:['base','card','bank'],
open:false,
videoShowVisible: false,
previewVideo:'',
info:{},
customerInfo:{},
customerId: this.$route.query.id,
loading:false,
};
},
created() {
},
methods: {
init(customerId,borrowId){
this.open = true;
this.customerId = customerId;
getDkCustomer(this.customerId).then(response => {
this.info = response.data;
});
if(borrowId){
getBorrow(borrowId).then(response => {
this.customerInfo = response.data
})
}else{
getInfoByCustomerId({customerId: this.customerId}).then(response => {
this.customerInfo = response.data
})
}
},
formatV2(value,option){
let options = this[option];
for (let k in options) {
if (options[k].value === value) {
return options[k].label;
}
}
return '';
},
format(row, column, option) {
let options = this[option];
for (let k in options) {
if (options[k].value === row[column.property]) {
return options[k].label;
}
}
return '';
}
}
};
</script>
<style lang="scss" scoped>
.el-row {
margin-bottom: -15px;
display: flex;
flex-wrap: wrap
}
</style>

View File

@@ -0,0 +1,113 @@
<template>
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="700px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-row>
<el-col :span="24">
<el-form-item label="客户名称" prop="nickName">
<el-input v-model="form.nickName" disabled />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="客户电话" prop="phoneNumber">
<el-input v-model="form.phoneNumber" disabled />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="金额变化" prop="account">
<el-input-number v-model="form.account" placeholder="请输入修改后的金额" />
</el-form-item>
</el-col>
</el-row>
<!-- <el-row>
<el-col :span="24">
<el-form-item label="原因" prop="operatorRemark">
<el-input
type="textarea"
:rows="2"
placeholder="请输入原因"
v-model="form.operatorRemark">
</el-input>
</el-form-item>
</el-col>
</el-row>-->
</el-form>
<div slot="footer" class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="submitForm"> </el-button>
<el-button @click="open = false"> </el-button>
</div>
</el-dialog>
</template>
<script>
import ImageUpload from '@/components/ImageUpload/index'
import { getDkCustomer, updateDkCustomer } from '@/api/dk/dkCustomer'
export default {
components: {
ImageUpload,
},
data () {
return {
open: false,
title: '',
form:{
account: undefined,
id: undefined,
nickName: undefined,
phoneNumber: undefined,
operatorRemark: undefined,
},
rules:{
account: [
{ required: true, message: '金额变化不能为空', trigger: 'blur' },
],
/* operatorRemark: [
{ required: true, message: '修改原因不能为空', trigger: 'blur' },
], */
},
buttonLoading:false,
}
},
created() {
},
methods: {
init (id) {
this.form.id = id || undefined;
this.open = true;
this.$nextTick(() => {
this.$refs['form'].resetFields();
getDkCustomer(id).then(response => {
this.form.id = response.data.id;
this.form.nickName = response.data.nickName;
this.form.phoneNumber = response.data.phoneNumber;
this.form.account = response.data.account;
this.open = true;
this.title = "修改商家余额";
});
})
},
// 表单提交
submitForm () {
this.$refs['form'].validate((valid) => {
if (valid) {
this.buttonLoading = true;
updateDkCustomer({
id: this.form.id,
account: this.form.account
}).then(data => {
this.msgSuccess("修改成功");
this.buttonLoading = false;
this.open = false
this.$emit('refreshDataList')
}).catch(() => {
this.buttonLoading = false;
});
}
})
},
}
}
</script>