Commit ff7ac9c6 authored by feifei's avatar feifei

客服后台代扣

parent d7dde4b2
...@@ -148,7 +148,7 @@ ...@@ -148,7 +148,7 @@
loanList(){ loanList(){
console.log("角色" + this.$permissionUtils.rolePermission('admin')); //console.log("角色" + this.$permissionUtils.rolePermission('admin'));
/** 加载数据 */ /** 加载数据 */
this.$$post('/customer/selectClientInfo', this.buildParam()).then(res => { this.$$post('/customer/selectClientInfo', this.buildParam()).then(res => {
if (res.data.code != 200) { if (res.data.code != 200) {
......
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
<!--<el-table-column prop="memo" label="备注"></el-table-column>--> <!--<el-table-column prop="memo" label="备注"></el-table-column>-->
<el-table-column label="查看详情"> <el-table-column label="查看详情">
<template scope="scope"> <template scope="scope">
<el-button type="text" size="small" @click="addLoanDetail(scope.row)">详情</el-button> <el-button type="text" size="small" @click="addLoanDetail(scope.row.loanNo)">详情</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -174,8 +174,8 @@ ...@@ -174,8 +174,8 @@
<div class="grid-content bg-purple">账单已还款:{{ this.loanVo.alrAmt }}</div> <div class="grid-content bg-purple">账单已还款:{{ this.loanVo.alrAmt }}</div>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<!-- <el-button type="primary" size="small" @click="advanceLoanAmt()" v-if="this.loanModel.status=='BACKING'">提前结清</el-button> --> <el-button type="primary" size="small" @click="advanceLoanAmt()" v-if="isNeedAudit">线下结清</el-button>
<el-button type="primary" size="small" @click="advanceLoanAmt()" v-if="isNeedAudit">提前结清</el-button> <el-button type="primary" size="small" @click="protocolSettleAll()" v-if="$permissionUtils.rolePermission('customBoss')">代扣结清</el-button>
</el-col> </el-col>
</el-row> </el-row>
</strong> </strong>
...@@ -197,10 +197,15 @@ ...@@ -197,10 +197,15 @@
<el-table-column label="操作"> <el-table-column label="操作">
<template scope="scope"> <template scope="scope">
<el-button type="text" size="small" v-if=" scope.row.status=='SETTLED' " disabled <el-button type="text" size="small" v-if=" scope.row.status !='SETTLED' && scope.row.backedSign == 'YES' && $permissionUtils.rolePermission('customBoss') "
@click="protocolOne(scope.row)">代扣
</el-button>
<el-button type="text" size="small" v-else disabled @click="protocolOne(scope.row)">代扣</el-button>
<el-button type="text" size="small" v-if=" scope.row.status != 'SETTLED' && scope.row.backedSign == 'YES' "
@click="offineTransfer(scope.row)">线下转账 @click="offineTransfer(scope.row)">线下转账
</el-button> </el-button>
<el-button type="text" size="small" v-else @click="offineTransfer(scope.row)">线下转账</el-button> <el-button type="text" size="small" v-else disabled @click="offineTransfer(scope.row)">线下转账</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -227,6 +232,17 @@ ...@@ -227,6 +232,17 @@
<el-table-column prop="creator" label="创建人"></el-table-column> <el-table-column prop="creator" label="创建人"></el-table-column>
<el-table-column prop="memo" label="备注"></el-table-column> <el-table-column prop="memo" label="备注"></el-table-column>
</el-table> </el-table>
<div class="page">
<el-pagination
@current-change="handleCurrentChange"
@size-change="handleSizeChange"
:current-page.sync="page.current"
:page-sizes="[10, 20, 50, 100]"
:page-size="page.size"
layout="total, sizes, prev, pager, next, jumper"
:total="page.total">
</el-pagination>
</div>
</el-collapse-item> </el-collapse-item>
...@@ -298,9 +314,28 @@ ...@@ -298,9 +314,28 @@
<advanceLoanAmt <advanceLoanAmt
v-if="ui.advanceLoanAmt.visible" v-if="ui.advanceLoanAmt.visible"
:loanNo="ui.advanceLoanAmt.loanNo" :loanNo="ui.advanceLoanAmt.loanNo"
:dialogVisible.sync="ui.advanceLoanAmt.visible" :dialogVisible.sync="ui.advanceLoanAmt.visible">
>
</advanceLoanAmt> </advanceLoanAmt>
<!--代扣提前结清-->
<protocolSettled
v-if="ui.protocolSettled.visible"
:loanNo="ui.protocolSettled.loanNo"
:clientNo="ui.protocolSettled.clientNo"
:bizType="ui.protocolSettled.bizType"
:dialogVisible.sync="ui.protocolSettled.visible">
</protocolSettled>
<protocolSettledOne
v-if="ui.protocolSettledOne.visible"
:loanNo="ui.protocolSettledOne.loanNo"
:periodNo="ui.protocolSettledOne.periodNo"
:remainAmt="ui.protocolSettledOne.remainAmt"
:planAmt="ui.protocolSettledOne.planAmt"
:bizType="ui.protocolSettledOne.bizType"
:clientNo="ui.protocolSettledOne.clientNo"
:dialogVisible.sync="ui.protocolSettledOne.visible">
</protocolSettledOne>
<!--修改窗口--> <!--修改窗口-->
<updateQueDialog <updateQueDialog
v-if="ui.updateQueDialog.visible" v-if="ui.updateQueDialog.visible"
...@@ -364,9 +399,11 @@ ...@@ -364,9 +399,11 @@
import * as moment from "moment"; import * as moment from "moment";
import addQuestion from "../byh/AddQuestion"; import addQuestion from "../byh/AddQuestion";
import advanceLoanAmt from "./AdvanceLoanAmt"; import advanceLoanAmt from "./AdvanceLoanAmt";
import protocolSettled from "./ProtocolSettled";
import updateQueDialog from "../byh/UpdateQueDialog"; import updateQueDialog from "../byh/UpdateQueDialog";
import readDetail from "../byh/readDetail"; import readDetail from "../byh/readDetail";
import offineTransfer from "../byh/offineTransfer"; import offineTransfer from "../byh/offineTransfer";
import protocolSettledOne from "../byh/ProtocolSettledOne";
import ownerBankBind from "../byh/OwnerBankBind"; import ownerBankBind from "../byh/OwnerBankBind";
export default { export default {
...@@ -374,6 +411,8 @@ ...@@ -374,6 +411,8 @@
components: { components: {
addQuestion, addQuestion,
advanceLoanAmt, advanceLoanAmt,
protocolSettled,
protocolSettledOne,
updateQueDialog, updateQueDialog,
readDetail, readDetail,
offineTransfer, offineTransfer,
...@@ -506,7 +545,25 @@ ...@@ -506,7 +545,25 @@
advanceLoanAmt: { advanceLoanAmt: {
visible: false, visible: false,
loanNo: '', loanNo: '',
bizType: '',
clientNo: '',
}, },
protocolSettled: {
visible: false,
loanNo: '',
bizType: '',
clientNo: '',
},
protocolSettledOne: {
visible: false,
loanNo: '',
bizType: '',
clientNo: '',
periodNo: '',
remainAmt: '',
planAmt: '',
},
loanNos:'',
}, },
} }
}, },
...@@ -524,7 +581,9 @@ ...@@ -524,7 +581,9 @@
}, },
created() { created() {
this.backedData(this.$route.query.phoneNo, this.$route.query.clientNo,this.$route.query.clientProductName) this.backedData(this.$route.query.phoneNo, this.$route.query.clientNo,this.$route.query.clientProductName);
this.addLoanDetail(this.$route.query.loanNo);
}, },
methods: { methods: {
// 反馈弹窗 // 反馈弹窗
...@@ -573,6 +632,35 @@ ...@@ -573,6 +632,35 @@
loanNo: loanNo, loanNo: loanNo,
}; };
}, },
//代扣提前结清
protocolSettleAll(){
var loanNo = this.advanceLoanAmt.loanNo;
var bizType = this.advanceLoanAmt.bizType;
var clientNo = this.advanceLoanAmt.clientNo;
this.ui.protocolSettled = {
visible: true,
loanNo: loanNo,
bizType: bizType,
clientNo: clientNo,
};
},
//代扣当期
protocolOne(record){
var loanNo = this.advanceLoanAmt.loanNo;
var bizType = this.advanceLoanAmt.bizType;
var clientNo = this.advanceLoanAmt.clientNo;
this.ui.protocolSettledOne = {
visible: true,
loanNo: loanNo,
bizType: bizType,
clientNo: clientNo,
periodNo: record.planIndex,
remainAmt: record.remainAmt,
planAmt: record.planAmt,
};
},
//返回上一页 //返回上一页
goBack() { goBack() {
this.$router.push({ this.$router.push({
...@@ -676,7 +764,7 @@ ...@@ -676,7 +764,7 @@
//根据借款信息查借款所有信息 //根据借款信息查借款所有信息
addLoanDetail(record){ addLoanDetail(record){
var loanNo = record.loanNo var loanNo = record;
this.$$get('/detail/customer/' + loanNo).then(res => { this.$$get('/detail/customer/' + loanNo).then(res => {
if (res.data.code != 200) { if (res.data.code != 200) {
// this.isShow = false; // this.isShow = false;
...@@ -692,6 +780,9 @@ ...@@ -692,6 +780,9 @@
}else { }else {
this.loanApplyList = res.data.result.planVo ? res.data.result.planVo : ''; this.loanApplyList = res.data.result.planVo ? res.data.result.planVo : '';
this.advanceLoanAmt.loanNo = res.data.result.applyVo.loanNo; this.advanceLoanAmt.loanNo = res.data.result.applyVo.loanNo;
this.advanceLoanAmt.bizType = res.data.result.applyVo.bizType;
this.advanceLoanAmt.clientNo = res.data.result.applyVo.clientNo;
this.loanNos = res.data.result.applyVo.loanNo;
} }
//借款信息 //借款信息
if(res.data.result.loanVo == null){ if(res.data.result.loanVo == null){
...@@ -702,19 +793,38 @@ ...@@ -702,19 +793,38 @@
//借款信息放款信息 //借款信息放款信息
this.loanModel = res.data.result.applyVo ? res.data.result.applyVo : ''; this.loanModel = res.data.result.applyVo ? res.data.result.applyVo : '';
//还款信息 //还款信息
if(res.data.result.backedVo == null){ this.loanBackedData(res.data.result.applyVo.loanNo);
/*if(res.data.result.backedVo == null){
this.loanBackedList = []; this.loanBackedList = [];
}else { }else {
this.loanBackedList = res.data.result.backedVo ? res.data.result.backedVo : ''; this.loanBackedList = res.data.result.backedVo ? res.data.result.backedVo : '';
}*/
} }
}).catch(error => {
this.$Message.error(error || '网络异常,请稍后。。。');
});
},
loanBackedData(record) {
this.$$post('/back/detailPageList',{bizNo:record,size:this.page.size,current: this.page.current} ).then(res => {
if (res.data.code != 200) {
// this.isShow = false;
this.$message.error(res.data.message);
return
} else {
if (res.data.result == null) {
this.loanBackedList = [];
}else {
this.loanBackedList = res.data.result.data ? res.data.result.data : '';
this.page.total = res.data.result.total;
}
} }
}).catch(error => { }).catch(error => {
this.$Message.error(error || '网络异常,请稍后。。。'); this.$Message.error(error || '网络异常,请稍后。。。');
}); });
}, },
// 绑卡记录 // 绑卡记录
...@@ -865,7 +975,7 @@ ...@@ -865,7 +975,7 @@
}, },
// 银行信息拼接 // 银行信息拼接
cardBankFormat: function (row, column) { cardBankFormat: function (row, column) {
return row.cardBankAccount + "(" + row.cardBankCodeStr + ")"; return row.cardBankAccount + "(" + row.cardBankName + ")";
}, },
// 还款结果 // 还款结果
resultBankFormat: function (row, column) { resultBankFormat: function (row, column) {
...@@ -896,6 +1006,17 @@ ...@@ -896,6 +1006,17 @@
return this.$enumUtils.toMsg('FeedStatus', status); return this.$enumUtils.toMsg('FeedStatus', status);
}, },
/** 处理分页操作*/
handleCurrentChange () {
this.loanBackedList = this.loanBackedData(this.loanNos);
},
handleSizeChange(row){
this.page.size=row
this.page.current=1;
this.loanBackedData(this.loanNos);
},
//结果状态 //结果状态
resultFormat: function (row, column) { resultFormat: function (row, column) {
var result = row['result']; var result = row['result'];
......
<template>
<el-dialog class="client-data-dialog" title="创建代扣提前结清" width="40%" :visible.sync="visible" :before-close="handleClose">
<div style="margin-left:50px">
<el-row :gutter="20" >
<el-col :span="8">
<div class="grid-content bg-purple">本金:{{ this.ruleForm.principleAmt }}</div>
</el-col>
<el-col :span="8">
<div class="grid-content bg-purple">起息日:{{ this.ruleForm.startDate | dateFilter}}</div>
</el-col>
</el-row>
<br/>
<el-row :gutter="20" :center="true">
<el-col :span="8">
<div class="grid-content bg-purple">占用天数:{{ this.ruleForm.userDay }}</div>
</el-col>
<el-col :span="8">
<div class="grid-content bg-purple">占用期数:{{ this.ruleForm.userMonth }}</div>
</el-col>
</el-row>
<br/>
<el-row :gutter="20" >
<el-col :span="6">
<div class="grid-content bg-purple">总费用:{{ this.ruleForm.allAmt }}</div>
</el-col>
<el-col :span="6">
<div class="grid-content bg-purple">利息:{{ this.ruleForm.interestAmt }}</div>
</el-col>
<el-col :span="6">
<div class="grid-content bg-purple">服务费:{{ this.ruleForm.serviceAmt }}</div>
</el-col>
<el-col :span="6">
<div class="grid-content bg-purple">违约金:{{ this.ruleForm.breakAmt }}</div>
</el-col>
</el-row>
<br/>
<el-row :gutter="20" >
<el-col :span="16">
<div class="grid-content bg-purple">总计应还:{{ this.ruleForm.settleAmt }}</div>
</el-col>
</el-row>
</div>
<br/>
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="140px" class="demo-ruleForm">
<el-form-item label="扣款金额" prop="backedAmt">
<el-col :span="20"><el-input v-model="ruleForm.settleAmt" placeholder="扣款金额" disabled></el-input></el-col>
</el-form-item>
<el-form-item label="选择银行卡" prop="bankAccount">
<el-select clearable v-model="ruleForm.bankAccount" >
<el-option v-for="item in this.cardList" :key="item.value"
:label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
</el-form>
<div slot="footer">
<el-button @click="handleClose">取 消</el-button>
<el-button type="primary" @click="backedProtocol('ruleForm')">确 定</el-button>
</div>
</el-dialog>
</template>
<script>
import * as moment from "moment";
export default {
name: "ProtocolSettled",
props: {
dialogVisible: {
type: Boolean,
required: true
},
loanNo: {
type: String
},
bizType: {
type: String
},
clientNo: {
type: String
},
},
data() {
return {
ui: {
submitLoading: false
},
visible: this.$props.dialogVisible,
cardList: [],
ruleForm: {
allAmt: '',
bizType: '',
backedAmt: '',
loanNo: '',
breakAmt: '',
clientNo: '',
derateAmt: '',
interestAmt: '',
loanAmt: '',
overdueAmt: '',
principleAmt:'',
serviceAmt:'',
settleAmt: '',
startDate: '',
userDay:'',
userMonth:'',
memo:'',
attach:'',
bankAccount:'',
bankOwner:'',
},
bizTypeStr: '',
rules: {
backedAmt: [
{ required: true,message: "扣款金额不能为空", trigger: 'blur' }
],
bankAccount: [
{ required: true,message: '支付银行卡不能为空', trigger: 'blur' }
],
},
loginName:'',
}
},
filters: {
dateFilter: function (row) {
var date = row
if ( typeof(date)==undefined || typeof(date)==null) {
return ''
}
return moment(date).format("YYYY-MM-DD")
},
},
created() {
this.ruleForm = {
loanNo: this.loanNo,
bizType: this.bizType,
clientNo: this.clientNo,
};
this.bizTypeStr = this.bizType;
// 查询当前的基础数据
this.$$get('/back/countSettle?loanNo='+this.loanNo).then(res => {
if (res.data.code !=200 ) {
this.$message.error(res.data.message);
return
} else {
this.ruleForm = res.data.result;
}
}).catch(error => {
this.$Message.error(error || '网络异常,请稍后。。。');
});
//获取银行卡列表
this.$$post(`/back/bankCardList`,{
clientNo: this.clientNo,
bizType: this.bizType
}).then(res => {
this.cardList = res.data.result;
}).catch(error => {
this.$Message.error(error || '网络异常,请稍后。。。');
});
},
mounted() {
this.loginName = localStorage.getItem("loginName");
},
methods: {
/** 提交点击 */
backedProtocol() {
this.$refs['ruleForm'].validate((valid) => {
if (!valid) {
return false
}
this.$$post(`/back/createBackedSettle`, this.buildParam()).then(res => {
if (res.data.code != 200) {
this.$message.error(res.data.message);
return
}
this.$message({message: '操作成功', type: 'success'});
this.handleClose();
setTimeout(() => {
window.location.reload();
}, 1000);
}).catch(err => {
alert("error!")
})
})
},
//参数
buildParam() {
var return_hash = {
loanNo: this.ruleForm.loanNo ,
bizType: this.bizTypeStr,
backAmt: this.ruleForm.settleAmt,
creator: localStorage.getItem("userName"),
bankAccount: this.ruleForm.bankAccount,
rePayType: 'BYALL',
};
return return_hash;
},
/** 关闭处理 */
handleClose() {
this.visible = false;
setTimeout(() => {
this.$emit('update:dialogVisible', false)
}, 300);
},
}
}
</script>
<style scoped>
</style>
<template>
<el-dialog class="client-data-dialog" title="创建当期代扣" width="40%" :visible.sync="visible" :before-close="handleClose">
<div style="margin-left:50px">
<el-row :gutter="20">
<el-col :span="8">
<div class="grid-content bg-purple">期数:第{{ this.ruleForm.periodNo }}</div>
</el-col>
<el-col :span="8">
<div class="grid-content bg-purple">计划还款金额:{{ this.ruleForm.planAmt }}</div>
</el-col>
</el-row>
<br/>
</div>
<br/>
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="140px" class="demo-ruleForm">
<el-form-item label="扣款金额" prop="backedAmt">
<el-col :span="20">
<el-input v-model="ruleForm.remainAmt" placeholder="请输入转账金额" disabled></el-input>
</el-col>
</el-form-item>
<el-form-item label="选择银行卡" prop="bankAccount">
<el-select clearable v-model="ruleForm.bankAccount" >
<el-option v-for="item in this.cardList" :key="item.value"
:label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
</el-form>
<div slot="footer">
<el-button @click="handleClose">取 消</el-button>
<el-button type="primary" @click="protocolOne('ruleForm')">确 定</el-button>
</div>
</el-dialog>
</template>
<script>
export default {
name: "ProtocolSettledOne",
props: {
dialogVisible: {
type: Boolean,
required: true
},
loanNo: {
type: String
},
bizType: {
type: String
},
clientNo: {
type: String
},
periodNo: {
type: Number
},
remainAmt: {
type: Number
},
planAmt: {
type: Number
},
},
data() {
return {
ui: {
submitLoading: false
},
visible: this.$props.dialogVisible,
ruleForm: {
periodNo: '',
orderNo: '',
loanNo: '',
creator: '',
remainAmt: '',
planFu: '',
planAmt: '',
planBen: '',
planXi: '',
attach: '',
planNo: '',
bankAccount: '',
bankOwner: '',
backedAmt: '',
memo: '',
},
rules: {
bankAccount: [{required: true, message: '支付银行卡不能为空', trigger: 'blur'}],
backAmt: [{ required: true,message: "扣款金额不能为空", trigger: 'blur' }],
},
loginName: '',
cardList:[],
}
},
created() {
this.ruleForm = {
loanNo: this.loanNo,
bizType: this.bizType,
clientNo: this.clientNo,
periodNo: this.periodNo,
remainAmt: this.remainAmt,
planAmt: this.planAmt,
};
//获取银行卡列表
this.$$post(`/back/bankCardList`,{
clientNo: this.clientNo,
bizType: this.bizType
}).then(res => {
this.cardList = res.data.result;
}).catch(error => {
this.$Message.error(error || '网络异常,请稍后。。。');
});
},
mounted() {
this.loginName = localStorage.getItem("userName");
},
methods: {
/** 提交点击 */
protocolOne() {
this.$refs['ruleForm'].validate((valid) => {
if (!valid) {
return false
}
this.$$post(`/back/createBackedSettle`, this.buildParam()).then(res => {
if (res.data.code != 200) {
this.$message.error(res.data.message);
return
}
this.$message({message: '操作成功', type: 'success'});
this.handleClose();
setTimeout(() => {
window.location.reload();
}, 1000);
}).catch(err => {
alert("error!")
})
})
},
//参数
buildParam() {
var return_hash = {
loanNo: this.ruleForm.loanNo,
bizType: this.ruleForm.bizType,
creator: localStorage.getItem("userName"),
bankAccount: this.ruleForm.bankAccount,
backAmt: this.ruleForm.remainAmt,
rePayType: 'BYONE',
};
return return_hash;
},
/** 关闭处理 */
handleClose() {
this.visible = false;
setTimeout(() => {
this.$emit('update:dialogVisible', false)
}, 300);
},
}
}
</script>
<style scoped>
</style>
...@@ -135,7 +135,6 @@ ...@@ -135,7 +135,6 @@
}, },
created() { created() {
console.log(this)
this.ruleForm = { this.ruleForm = {
orderNo: this.orderNo, orderNo: this.orderNo,
loanNo: this.loanNo, loanNo: this.loanNo,
......
...@@ -114,8 +114,6 @@ ...@@ -114,8 +114,6 @@
if (res.data.code != 200){ if (res.data.code != 200){
throw res.data.message; throw res.data.message;
} }
console.log(966555565656)
console.log(res.data.result)
// 加延时 // 加延时
setTimeout(() => { setTimeout(() => {
let userHaveArr = []; let userHaveArr = [];
......
{ {
"name": "versiony", "name": "versiony",
"version": "5.7.6" "version": "5.8.3"
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment