Commit 6da24062 authored by 刘雅文's avatar 刘雅文

新增需求

parent c8bc8563
......@@ -174,6 +174,7 @@ export default {
}
},
async created() {
// console.log(this.$route.query,'上一页');
const {
clientNo,
clientProductName,
......
<template>
<div style="width: 600px">
<block-header title="创建百灵美选结清减免单" />
<el-form
size="small"
label-suffix=":"
:model="ruleForm"
:rules="rules"
ref="ruleForm"
label-width="120px"
class="demo-ruleForm"
>
<el-form-item label="借款编号" prop="loanNo">
<el-col :span="20">
<el-input
v-model="ruleForm.loanNo"
placeholder="请正确填写借款编号"
></el-input>
</el-col>
<el-button type="primary" @click="settlement">结清试算</el-button>
</el-form-item>
<el-form-item v-if="settleData.serviceAmt">
<div class="tableBox">
<div class="boxItem">
<p class="Itemleft">应还本金</p>
<p>{{ settleData.principleAmt }}</p>
</div>
<div class="boxItem">
<p class="Itemleft">应还利息</p>
<p>{{ settleData.interestAmt }}</p>
</div>
<div class="boxItem">
<p class="Itemleft">应还服务费</p>
<p>{{ settleData.serviceAmt }}</p>
</div>
<div class="boxItem">
<p class="Itemleft">应还融担费</p>
<p>{{ settleData.burdenAmt }}</p>
</div>
<div class="boxItem">
<p class="Itemleft">应还违约金</p>
<p>{{ settleData.breakAmt }}</p>
</div>
<div class="boxItem">
<p class="Itemleft">应还款总额</p>
<p>{{ settleData.settleAmt }}</p>
</div>
<div class="boxItem">
<p class="Itemleft">退款金额</p>
<p>{{ settleData.refundAmt }}</p>
</div>
</div>
</el-form-item>
<el-form-item label="减免金额" prop="derateAmt">
<el-col :span="20">
<el-input
type="number"
v-model="ruleForm.derateAmt"
placeholder="请输入减免金额"
@blur="submitAmt"
></el-input>
</el-col>
</el-form-item>
<el-form-item v-if="derateData.derateBreak">
<div class="tableBox">
<div class="boxItem">
<p class="Itemleft">减免违约金</p>
<p>{{ derateData.derateBreak }}</p>
</div>
<div class="boxItem">
<p class="Itemleft">减免服务费</p>
<p>{{ derateData.derateFu }}</p>
</div>
<div class="boxItem">
<p class="Itemleft">减免融担费</p>
<p>{{ derateData.derateBurden }}</p>
</div>
<div class="boxItem">
<p class="Itemleft">减免利息</p>
<p>{{ derateData.derateXi }}</p>
</div>
<div class="boxItem">
<p class="Itemleft">减免本金</p>
<p>{{ derateData.derateBen }}</p>
</div>
</div>
</el-form-item>
<el-form-item label="描述信息" prop="applyDesc">
<el-col :span="20">
<el-input
v-model="ruleForm.applyDesc"
placeholder="请输入减免描述信息"
></el-input>
</el-col>
</el-form-item>
<el-form-item>
<el-button size="small" type="primary" @click="createDerate('ruleForm')"
>确 定</el-button
>
</el-form-item>
</el-form>
</div>
</template>
<script>
export default {
name: "DerateCreate",
props: {},
data() {
return {
ruleForm: {
loanNo: "",
derateAmt: "",
applyUser: "",
applyDesc: "",
},
rules: {
loanNo: [
{ required: true, message: "请正确填写借款编号", trigger: "blur" },
],
derateAmt: [
{ required: true, message: "请输入减免金额", trigger: "blur" },
],
applyDesc: [
{ required: true, message: "请输入减免描述信息", trigger: "blur" },
],
},
loginName: "",
settleData: {},
derateData: {},
};
},
mounted() {
this.loginName = localStorage.getItem("loginName");
},
methods: {
//结清试算
settlement() {
this.$$get(`/back/countSettle`, {
loanNo: this.ruleForm.loanNo,
})
.then((res) => {
if (res.data.code != 200) {
this.$message.error(res.data.message);
return;
}
this.$message({ message: "提交成功!", type: "success" });
console.log(res.data.result, "结果");
this.settleData = res.data.result;
// setTimeout(() => {
// window.location.reload();
// }, 1500);
})
.catch((err) => {
this.$message.error("试算失败!!!");
});
},
//减免金额
submitAmt() {
console.log(this.ruleForm.derateAmt, "000000");
this.$$post(`/loan/amountSettle`, {
loanNo: this.ruleForm.loanNo,
derateAmt: this.ruleForm.derateAmt,
})
.then((res) => {
if (res.data.code != 200) {
this.$message.error(res.data.message);
return;
}
this.$message({ message: "提交成功!", type: "success" });
console.log(res.data.result, "试算结果");
this.derateData = res.data.result;
})
.catch((err) => {
this.$message.error("试算失败!!!");
});
},
/** 提交点击 */
createDerate() {
const {derateBen,derateBreak,derateBurden,derateFu,derateXi}=this.derateData
this.$refs["ruleForm"].validate((valid) => {
if (!valid) {
return false;
}
this.$confirm("操作将创建减免单, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.$$post(`/loan/createLrdDerate`, {
loanNo: this.ruleForm.loanNo,
derateAmt: this.ruleForm.derateAmt,
applyDesc: this.ruleForm.applyDesc,
applyUser: this.loginName,
derateBen,
derateBreak,
derateBurden,derateFu,derateXi
})
.then((res) => {
if (res.data.code != 200) {
this.$message.error(res.data.message);
return;
}
this.$message({ message: "提交成功!", type: "success" });
setTimeout(() => {
window.location.reload();
}, 1500);
})
.catch((err) => {
this.$message.error("提交减免单失败!!!");
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消提交",
});
});
});
},
},
};
</script>
<style scoped>
.tableBox {
width: 400px;
border: 1px solid #eee;
/* padding: 20px; */
}
.tableBox .boxItem {
border-bottom: 1px solid #eee;
display: flex;
}
.tableBox .boxItem:last-child {
border: none;
}
.tableBox .boxItem p {
padding: 5px 10px;
}
.tableBox .Itemleft {
border-right: 1px solid #eee;
width: 45%;
}
</style>
......@@ -95,7 +95,7 @@ export default {
async created() {
const params = this.params;
// console.log(params,'手机号');
this.form.cell = params.clientCell;
this.form.cell = params.phoneNo;
this.form.productName = params.clientProductName;
await this.init();
},
......
......@@ -20,6 +20,7 @@ import {
ServiceProblem,
ClientManagerment,
DerateCreate,
CreateLrdDerate,
CreateRefund
} from './routes'
......@@ -140,6 +141,15 @@ export default new Router({
component: DerateCreate,
meta: { title: '减免单管理', filter: true }
},
{
path: '/byh/CreateLrdDerate',
name: 'CreateLrdDerate',
component: CreateLrdDerate,
meta: {
title: '创建百灵美选减免单',
filter: true
}
},
{
path: '/byh/RiskLevelList',
name: 'RiskLevelList',
......
......@@ -27,6 +27,7 @@ export const ByhLoanBackedDetails = resolve => require(['../components/byh/ByhLo
export const ByhLoanSnapList = resolve => require(['../components/byh/ByhLoanSnapList.vue'], resolve)
export const Controlswitch = resolve => require(['../components/byh/Controlswitch.vue'], resolve)
export const DerateCreate = resolve => require(['../components/byh/DerateCreate.vue'], resolve)
export const CreateLrdDerate = resolve => require(['../components/byh/CreateLrdDerate.vue'], resolve)
//创建退款单
export const CreateRefund = resolve => require(['../components/byh/CreateRefund.vue'], resolve)
......@@ -55,6 +56,7 @@ export default {
ClientManagerment,
Controlswitch,
DerateCreate,
CreateLrdDerate,
// 创建退款单
CreateRefund
}
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