@@ -305,11 +305,19 @@ export default {
if(data.btn==='确认'){
this.operationType = 3
this.paymentDetail(data)// 取得详情
- this.operationType = operationType //列表操作状态
+ this.operationType = this.operationType //列表操作状态
this.isFgJl = data.isFgJl //是否是法规部经理
this.$store.commit("isFgJlData", { isFgJl: data.isFgJl });
this.$store.commit("loansData", { loans: this.loans });
+
+ this.letterValue = {
+ businessId: data.businessId,//业务id
+ id:data.id,//rowID
+ auditStatus:data.auditStatus,//审批状态
+ handleStatus:data.operationStatus,//操作状态
+ roleId:data.roleId,//角色id
+ }
this.$store.commit("letterData", { operationType: this.operationType, letterValue: this.letterValue });
}
sessionStorage.removeItem('decideJump')
@@ -544,7 +552,7 @@ export default {
let imgFile = this.imgListT.map(e =>e.url).join()
let params = {
auditOpinion: this.letterValue.auditOpinion,
- businessId: this.letterValue.businessId,
+ businessId: this.letterValue.businessId||this.$store.state.guarantee.businessId,
status: type,
imgFile: imgFile
}
diff --git a/src/components/common/Sidebar.vue b/src/components/common/Sidebar.vue
index 093ea14..98469b0 100644
--- a/src/components/common/Sidebar.vue
+++ b/src/components/common/Sidebar.vue
@@ -117,7 +117,7 @@ export default {
watch:{
$route(to,from){
this.notice()
- this.handleSelect(this.activeIndex)// 触发高亮的值
+ if(to!=this.activeIndex) this.handleSelect(this.activeIndex)// 触发高亮的值
},
pop(now,before){
// this
@@ -135,7 +135,6 @@ export default {
// if( this.$store.state.login.headerImg){
// this.headerImg = this.$store.state.login.headerImg
// }
- // 通过 Event Bus 进行组件间通信,来折叠侧边栏
bus.$on('collapse', msg => {
this.collapse = msg;
bus.$emit('collapse-content', msg);
@@ -151,7 +150,11 @@ export default {
this.activeIndex = index
sessionStorage.setItem('sideBar',index)
if(val!=='start') sessionStorage.removeItem('fromCopyTo') // 删除抄送的值,没有把流程拆成路由没法在beforeeach判断
-
+ if(index=='workbench'){// 删除工作台的记录
+ console.log('触发删除')
+ this.$store.commit("leftSidebarData", { leftStatus: '0' });
+ this.$store.commit("loanStatusData", { loanStatus: 1 });// 切换页面状态
+ }
},
goto(path) {
this.$router.push('/' + path);
diff --git a/src/components/common/businessApplyDepartment.vue b/src/components/common/businessApplyDepartment.vue
index 950c245..3d3e0cd 100644
--- a/src/components/common/businessApplyDepartment.vue
+++ b/src/components/common/businessApplyDepartment.vue
@@ -1738,7 +1738,7 @@ methods:{
})
}else{
// this.$message('丢失customerId!')
- this.$message('请先输入企业编号或名称后,再进行关联人操作!')
+ if(this.businessApply.isExistRelated==1) return this.$message('请先输入企业编号或名称后,再进行关联人操作!')
}
},
// 关联人checkbox
diff --git a/src/components/common/complianceDepartment.vue b/src/components/common/complianceDepartment.vue
index 474d5c0..4821792 100644
--- a/src/components/common/complianceDepartment.vue
+++ b/src/components/common/complianceDepartment.vue
@@ -1041,13 +1041,17 @@ mounted(){
// 判断是否由待处理哪里跳转过来的,每次触发后删除
if(sessionStorage.getItem('decideJump')){
let data = JSON.parse(sessionStorage.getItem('decideJump'))
+
+
+
+ console.log(data,'取得item的值')
data.iid = data.detailId
data.status = data.approveStatus
data.handleStatus = data.operatingStatus
// 判断操作
if(data.btn==='指派'){
data.row = {}
- data.row.iid = data.id
+ data.row.iid = data.iid
data.row.businessId = data.businessId
data.row.companyId = data.companyId
this.gotoSurvey(data,'compliance')
@@ -1208,6 +1212,7 @@ methods:{
return this.$message.error('请先选取角色!')
}
obj.userId = this.assetDesignateC
+ console.log(obj,'当前的obj')
complianceAssign(obj).then(res=>{
if(res.success){
this.$message.success('操作成功')
@@ -1505,7 +1510,7 @@ methods:{
this.linkManLoading = false
})
}else{
- this.$message('请先输入企业编号或名称后,再进行关联人操作!')
+ if(this.businessApply.isExistRelated==1) return this.$message('请先输入企业编号或名称后,再进行关联人操作!')
}
},
// 关联人checkbox
diff --git a/src/components/common/flowPathMoudle.vue b/src/components/common/flowPathMoudle.vue
index fe974c3..25a199e 100644
--- a/src/components/common/flowPathMoudle.vue
+++ b/src/components/common/flowPathMoudle.vue
@@ -477,6 +477,13 @@ export default {
decide(item){
if(item.operatingStatus===1){// 二次验证是否为处理
sessionStorage.setItem('decideJump',JSON.stringify(item))
+ console.log(item.taskNode,'当前的task',item)
+ /* 后三个步骤处理不同,非得从列表取得数据导致的问题,处理逻辑异常 */
+ // if(item.taskNode=='担保函'||item.taskNode=='财务确认'||item.taskNode=='放款通知'){
+ // console.log(item.businessId,'zhi')
+ // console.log(this.$store.state.guarantee.letterValue,'this.$store.state.guarantee.businessId')
+ this.$store.commit("businessId",item.businessId);
+ // }
this.jumpToFrom(item.taskNode)
// switch (item.taskNode) {
// // 拥有十套不同的按钮判断逻辑,按钮根据取得的状态进行判断操作
@@ -1041,11 +1048,9 @@ export default {
break;
case '财务确认':
nodeCode = 9
- // 最后三部都记录对应的消息应用
break;
case '放款通知':
nodeCode = 10
- // 最后三部都记录对应的消息应用
break;
default:
break;
diff --git a/src/components/common/messageDepartment.vue b/src/components/common/messageDepartment.vue
index 891750e..f67fbc6 100644
--- a/src/components/common/messageDepartment.vue
+++ b/src/components/common/messageDepartment.vue
@@ -1484,7 +1484,7 @@ methods:{
this.linkManLoading = false
})
}else{
- this.$message('请先输入企业编号或名称后,再进行关联人操作!')
+ if(this.businessApply.isExistRelated==1) return this.$message('请先输入企业编号或名称后,再进行关联人操作!')
}
},
// 关联人checkbox
diff --git a/src/components/common/processTemp.vue b/src/components/common/processTemp.vue
index 20e1385..4f9d786 100644
--- a/src/components/common/processTemp.vue
+++ b/src/components/common/processTemp.vue
@@ -116,15 +116,18 @@ export default {
};
},
mounted(){
+ console.log(this.$store.state.guarantee.businessId,'this.$store.state.guarantee.businessId')
+
this.getAuditProcess()
this.getAuditProcess2()
this.queryCopySendUser()// 抄送人
},
methods: {
async getAuditProcess(){
+
let params = {
// 从vuex取值
- businessId: this.$store.state.guarantee.letterValue.businessId,
+ businessId: this.$store.state.guarantee.letterValue.businessId||this.$store.state.guarantee.businessId,
processId: this.$store.state.guarantee.topSidebarVal
}
let res = await auditProcessList(params)
@@ -132,7 +135,7 @@ export default {
},
async getAuditProcess2(){
let params = {
- businessId: this.$store.state.guarantee.letterValue.businessId,
+ businessId: this.$store.state.guarantee.letterValue.businessId||this.$store.state.guarantee.businessId,
processId: ''
}
let res = await auditProcessList(params)
diff --git a/src/components/common/propertyDepartment.vue b/src/components/common/propertyDepartment.vue
index 903705b..ccc0a53 100644
--- a/src/components/common/propertyDepartment.vue
+++ b/src/components/common/propertyDepartment.vue
@@ -1099,7 +1099,7 @@ methods:{
this.linkManLoading = false
})
}else{
- this.$message('请先输入企业编号或名称后,再进行关联人操作!')
+ if(this.businessApply.isExistRelated==1) return this.$message('请先输入企业编号或名称后,再进行关联人操作!')
}
},
// 关联人checkbox
diff --git a/src/components/page/Workbench.vue b/src/components/page/Workbench.vue
index e1757db..9ae131e 100644
--- a/src/components/page/Workbench.vue
+++ b/src/components/page/Workbench.vue
@@ -5,7 +5,14 @@
基础应用
+
+
@@ -32,7 +39,7 @@ export default {
data(){
return{
url:false,
-
+ test:10.22,
}
},
watch:{
@@ -54,6 +61,94 @@ export default {
if(this.$route.fullPath!=='/workbench')this.url = true
},
methods:{
+ fMoney4(money) {
+ if(!money) return ''
+ console.clear()
+ //汉字的数字
+ let cnNums = new Array('零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖');
+ let cnIntRadice = new Array('', '拾', '佰', '仟'); //基本单位
+ let cnIntUnits = new Array('', '万', '亿', '兆'); //对应整数部分扩展单位
+ let cnDecUnits = new Array('仟', '佰', '拾', '元', '角' , '分'); //对应小数部分单位
+ let cnInteger = '元'; //整数金额时后面跟的字符
+ let cnIntLast = '万'; //整数无小数点的单位
+ let zero = "零"
+ let int; //金额整数部分
+ let dot; //金额小数部分
+ let chineseStr = ''; //输出的中文金额字符串
+ let parts; //分离金额后用的数组,预定义
+ if (money == '') {
+ return '';
+ }
+ //转换为字符串,获取小数点后的值与整数分离
+ money = money.toString();
+ console.log(money,money.indexOf('.'),'判断小数点')
+ if (money.indexOf('.') == -1) {// 取得小树点后面的值
+ int = money;
+ dot = '';
+ } else {
+ parts = money.split('.'); //整数小数分离
+ int = parts[0];
+ dot = parts[1].substr(0, 6); //最多六位小数,计算到 角,分
+ }
+ console.log(parseInt(int, 10),'parseInt(int, 10)')
+ //十进制转换,处理整数部分单位
+ if (parseInt(int, 10) > 0) {
+ console.log('进入十进制转换')
+ let zeroCount = 0;
+ let IntLen = int.length;
+ for (let i = 0; i < IntLen; i++) {
+ //循环整数部分,给每个位赋值,且判断是否整除4,添加额外赋值
+ let n = int.substr(i, 1);
+ let p = IntLen - i - 1; // 长度 -i -1 取得
+ let q = p / 4;
+ let m = p % 4;
+ console.log(n,p,q,m,"q,m")
+ if (n == '0') {
+ zeroCount++;
+ } else {
+ if (zeroCount > 0) {
+ chineseStr += cnNums[0];
+ }
+ //归零
+ zeroCount = 0;
+ chineseStr += cnNums[parseInt(n)] + cnIntRadice[m];
+ }
+ //
+ if (m == 0 && zeroCount < 4) {
+ chineseStr += cnIntUnits[q];
+ }
+ }
+ chineseStr += cnIntLast;
+ }
+ //小数部分
+ console.log(dot,'dot')
+ if (dot != '') {
+ console.log('进入小数处理部分')
+ let decLen = dot.length;// 循环小数后面的位数
+ for (let i = 0; i < decLen; i++) {
+ let n = dot.substr(i, 1);
+ if (n != '0') {
+ chineseStr += cnNums[Number(n)] + cnDecUnits[i];
+ }
+ console.log(i,'i',n,'n',dot)
+ /*
+ 如果 indexof 第一个非0数字,后面带有连续的0,或者间隔的0
+ */
+ if(i==3 && n=='0' ){ // 如果i处于千百十的时候,加个元
+ chineseStr += cnInteger
+ }
+ }
+ }
+ // if (chineseStr == '') {// 为0时,
+ // chineseStr += cnNums[0] + cnIntLast + cnInteger;
+ // }
+ // else if (dot == '') {//小数点为空值时
+
+ // chineseStr += cnInteger; // 加上元
+ // }
+ return chineseStr;
+ },
+
// 跳转方法,传一个字符串地址
goto(path) {
this.$router.push('/' + path);
diff --git a/src/components/page/afterLoan/afterInsurance.vue b/src/components/page/afterLoan/afterInsurance.vue
index e0cb652..dc54b36 100644
--- a/src/components/page/afterLoan/afterInsurance.vue
+++ b/src/components/page/afterLoan/afterInsurance.vue
@@ -150,7 +150,9 @@
-
+
+ {{ChinaCost(guaranteeForm.guaranteeAmount)}}
+
@@ -184,13 +186,13 @@
-
+
+ {{ChinaCost(comp.compensationAmount)}}
+
-
-
+
-
+
+ {{ChinaCost(comp.compensatoryBalance)}}
+
@@ -224,7 +227,7 @@
-
+
自定义
@@ -237,14 +240,16 @@
-
-
+
+
-
+
@@ -468,7 +474,15 @@
-
+
+
+
+
+ {{scope.row.repaymentNotes}}
+
+
+
+
查看
@@ -488,7 +502,7 @@
模板下载模板下载
import { mapState } from 'vuex';
-import { allBankName, insuranceList, insuranceDetail, repaymentEntry, repaymentList, repaymentStatistics, excelHis, delRepayment, repaymentDetail, excelInsurance, updateInsurance, updateRepayment, designateEmpTrees, getAllClient ,saveInsurance,companyInfoBySth,liquidateList,liquidateEdit,liquidateDel,deleteInsurance, editInsurance, compensationSituation,importInsurance , exportFailure} from '../../../utils/api';
-import core from '../../../utils/core';// fMoney3
-// 使用轻量级的、仅限数字的函数实现
-// import { create, all } from 'mathjs/number'
+import { allBankName, insuranceList, insuranceDetail, repaymentEntry, repaymentList, repaymentStatistics, excelHis, delRepayment, repaymentDetail, excelInsurance, updateInsurance, updateRepayment, designateEmpTrees, getAllClient ,saveInsurance,companyInfoBySth,liquidateList,liquidateEdit,liquidateDel,deleteInsurance, editInsurance, compensationSituation,importInsurance , exportFailure, modifyReimbursement} from '../../../utils/api';
+import core from '../../../utils/core'
+// 使用轻量级的、仅限数字的函数实现 import { create, all } from 'mathjs/number'
// const math = create(all)
let math = require('mathjs');
export default {
@@ -656,12 +669,12 @@ export default {
value1:'',
area:[// 区域
- {name:'萨尔图区',id:0},
- {name:'高新区',id:1},
- {name:'龙凤区',id:2},
- {name:'让胡同路区',id:3},
- {name:'大同区',id:4},
- {name:'肇县区',id:5},
+ {name:'萨尔图区',id:'0'},
+ {name:'高新区',id:'1'},
+ {name:'龙凤区',id:'2'},
+ {name:'让胡同路区',id:'3'},
+ {name:'大同区',id:'4'},
+ {name:'肇县区',id:'5'},
],
circumstance:[// 经营情况
{name:'停产',value:'停产'},
@@ -740,11 +753,15 @@ export default {
btns:{},
ids:[],
interest:'',// 代偿后的利息
+ selectObj:{
+ personLiable:'',
+ personLiableId:''
+ },
};
},
computed:{
computedCompensatoryBalance(){// 代偿余额计算
- /* TODO 未完成状态判断 */
+ /* 转为后端计算 */
// if(this.status){} // 如果是处于录入状态才减去count
// console.log(this.repaymentForm,'this.repaymentForm')
// if(!this.repaymentForm.currentRepayment)this.repaymentForm.currentRepayment = 0
@@ -825,13 +842,16 @@ export default {
}
}
},
+ fromOne(){// 判断来自保后
+ return this.$store.state.loan.fromOne
+ },
// 计算本次还款的清偿方式总额
reimbursement(){
return this.repaymentForm.repaymentCash||0+this.repaymentForm.repaymentAssetsAmount||0+this.repaymentForm.repaymentOtherAmount||0
}
},
watch: {
- "$store.state.loan.loanStatus":function(val){
+ "$store.state.loan.loanStatus":async function(val){
if(val!=2){
this.comp.compensatoryBalance = 0
this.cash = 0
@@ -846,14 +866,22 @@ export default {
this.$forceUpdate();
this.getData()
this.loanbackStatus = ''
+ this.repaymentForm = {
+ currentRepayment:0,
+ interest: 0,
+ otherExpenses:0,
+ overdueDays: 0
+ }
}
- if(val == 2){
- console.log(this.souce,'判断是否系统流转--0')
- /* TODO 未完成 */
- // if(this.source === 0&&this.status==="oldLoans"){// 判断系统流转是否进行过编辑
-
- // }
+ if(val == 2){// 进入录入页面
+
console.log(this.RepaymentId,this.id,'RepaymentId,进入2页面')
+ // 进入详情,默认调一次取得代偿时间后的金额接口
+ if(this.comp.compensationAmount&&this.comp.compensatoryTime){
+ this.compensatoryTimeChange(this.comp.compensatoryTime)
+ }
+ // 此处存疑,未知为何如此赋值
+ console.log(this.hisId,'hisid,loanid,repayid',this.$store.state.loan.id,this.$store.state.loan.RepaymentId)
this.id = this.$store.state.loan.id || this.$store.state.loan.RepaymentId
this.RepaymentId = this.$store.state.loan.RepaymentId
this.loanbackStatus = this.$store.state.loan.loanbackStatus
@@ -864,12 +892,29 @@ export default {
otherExpenses: '',
overdueDays: 0
}
+ console.log(this.loanbackStatus,'什么状态')
// 处于编辑状态,额外添加一个编辑中的状态判断
if(this.status!=='newLoans'||this.discernEdit) this.getDetail()
if(this.loanbackStatus == '查看' || this.loanbackStatus == '编辑'){
- console.log(this.loanbackStatus,'什么状态')
- this.getRepaymentDetail()
+ await this.getRepaymentDetail()
}
+ console.log(this.souce,'判断是否系统流转--0')
+ /* TODO 未测试该判断 */
+ if(this.source === 0&&this.status==="oldLoans"&&!this.guaranteeForm.loanStartTime){// 判断系统流转,且是否进行过编辑,判断贷款时间以及当前的编辑状态
+ return this.$confirm('业务数据需补充完善,请先在编辑处完善必填项后再进行还款录入。','提示', {
+ confirmButtonText: '确定',
+ showCancelButton:false,
+ type: 'warning'
+ }).then(()=>{
+ // 手动切换状态进入到编辑业务状态(问题:进入的判断需要从新走一遍)
+ // this.edit('',this.row)
+ this.loanStatus = 1 // 切页面到保后页面
+ this.$store.commit("loanStatusData", { loanStatus: 1 });
+ }).catch(()=>{
+ this.loanStatus = 1 // 切页面到保后页面
+ this.$store.commit("loanStatusData", { loanStatus: 1 });
+
+ })}
}
if(val == 3){
this.hisidId = this.$store.state.loan.hisidId
@@ -881,6 +926,7 @@ export default {
},
principal:function(val){// 处理组织架构选人是否清空
+ this.$forceUpdate();
this.designateEmpTrees()
this.clearNodeArr = true
this.$nextTick(()=>{
@@ -895,11 +941,25 @@ export default {
this.starEndDate = []
this.guaranteeForm = {}
this.mainbank = ''
+ this.elsebank = ''
+ }
+ },
+ organization(val){
+ if(val){// 掉接口
+ this.liquidateList()
+ }else{
+ this.organizationArrs = []
}
}
},
- created(){
- console.log(math.format(math.chain(math.bignumber(0.1)).add(math.bignumber(0.2)).done()),'计算数据')
+ async created(){
+ let a = [1,2,3,4],b = [1,2,3,4,5,6]
+ let c = a.concat(b).filter((cur, i, arr) => {
+ return arr.indexOf(cur) === arr.lastIndexOf(cur);
+ });
+ console.log(c,'比不同',a,b)
+
+
console.log(this.loanbackStatus,'this.loanbackStatus')
this.liquidateList()
if(this.bankSelect.length===0){// 请求银行数据
@@ -931,8 +991,21 @@ export default {
console.log(this.status,'处于什么状态')
if(this.status!=='newLoans'||this.discernEdit) this.getDetail()
if(this.loanbackStatus == '查看' || this.loanbackStatus == '编辑'){
- this.getRepaymentDetail()
+ await this.getRepaymentDetail()
}
+ if(this.source === 0&&this.status==="oldLoans"&&!this.guaranteeForm.loanStartTime){// 判断系统流转,且是否进行过编辑,判断贷款时间以及当前的编辑状态
+ return this.$confirm('业务数据需补充完善,请先在编辑处完善必填项后再进行还款录入。','提示', {
+ type: 'warning'
+ }).then(()=>{
+ // 手动切换状态进入到编辑业务状态(问题:进入的判断需要从新走一遍)
+ // this.edit('',this.row)
+ this.loanStatus = 1 // 切页面到保后页面
+ this.$store.commit("loanStatusData", { loanStatus: 1 });
+ }).catch(()=>{
+ this.loanStatus = 1 // 切页面到保后页面
+ this.$store.commit("loanStatusData", { loanStatus: 1 });
+
+ })}
}
if(this.loanStatus == 3){
@@ -991,6 +1064,7 @@ export default {
// if(this.insMultipleSelection.length != ''){
let exportIds = this.insMultipleSelection.map(e => e.id).join()
let url = `${excelInsurance}?ids=${exportIds}`
+ console.log(url,'导出的URL')
window.location.href = url
// }else{
// this.$message.error('请先选择担保列表数据 !');
@@ -1001,13 +1075,14 @@ export default {
edit(row,val){
this.$store.commit('disabledAll',false)// 取消禁用全部,
if(!row){// 没有row传值,进入新建业务界面--录入无关
- console.log('进入新建业务')
+ console.log('进入新建业务',val)
this.loanStatus = 2
this.$store.commit("loanbackStatusData", { loanbackStatus: '' });// 判断按钮状态
this.$store.commit("loanStatusData", { loanStatus: 2 });
this.$store.commit('setNewOrOld','newLoans')
this.$store.commit('entering',false)
this.$store.commit('wanderEdit',true)
+ if(val) this.$store.commit("source",val.source);// 存来源,用于判断是否编辑过系统流转的业务
if(val){// --编辑业务阶段
this.$store.commit('setNewOrOld','oldLoansEdit')// 进入业务编辑
// 编辑手动添加的业务
@@ -1024,32 +1099,37 @@ export default {
this.loanbackStatus = '录入' // 新增判断,用于后退
this.$store.commit("loanbackStatusData", { loanbackStatus: '录入' });
+ this.$store.commit('fromOne',false)// 从保后进入还款录入,用于后退判断
}else{
console.log('进入录入界面')
// 进入还款录入,添加个额外判断进入编辑界面
this.$store.commit('wanderEdit',true)
this.$store.commit('entering',false) // 不可编辑-业务编辑区域
this.$store.commit('discernEdit',true)// 区分是否可编辑业务
- this.$store.commit('setNewOrOld','oldLoans')// 区分进入还款或者新建
+ this.$store.commit('setNewOrOld','oldLoans')// 进入还款录入标识
this.loanStatus = 2
this.$store.commit("loanStatusData", { loanStatus: 2 });// 切换页面状态
this.id = row.id
this.$store.commit("idData", { id: row.id });// 存业务id用于刷新复现
- this.$store.commit("source",this.row.source);// 存来源,用于判断是否编辑过系统流转的业务
+ this.$store.commit("source",row.source);// 存来源,用于判断是否编辑过系统流转的业务
this.RepaymentId = ''
this.$store.commit("RepaymentIdData", { RepaymentId: '' });// 查还款记录详情用
this.loanbackStatus = '录入'
this.$store.commit("loanbackStatusData", { loanbackStatus: '录入' });// 判断按钮状态
+ this.$store.commit('fromOne',true)// 从保后进入还款录入,用于后退判断
}
},
- //记录
+ //新增保后记录
history(row){
this.loanStatus = 3
this.$store.commit("loanStatusData", { loanStatus: 3 });
this.hisId = row.id
this.$store.commit("hisidIdData", { hisidId: row.id, guaranteeAmount: row.guaranteeAmount });
+ this.id = row.id
+ this.$store.commit("idData", { id: row.id });// 这是loan.id用于记录业务id的 */
this.hispaymentStatus = row.paymentStatus
this.$store.commit("hispaymentStatusData", { hispaymentStatus: row.paymentStatus });
+ this.$store.commit('fromOne',false)// 从保后进入还款录入,用于后退判断
},
//办理结项
conclusion(row){
@@ -1071,7 +1151,7 @@ export default {
async getDetail(){
this.guaranteeLoading = true
try {
- let res = await insuranceDetail({
+ let res = await insuranceDetail({// 调业务详情
id: this.id
});
this.guaranteeLoading = false
@@ -1102,13 +1182,14 @@ export default {
// 清收
this.liquidate = {
personLiable:reimbursement.personLiable,
+ personLiableId:reimbursement.personLiableId,
collectionGroupId:reimbursement.collectionGroupId,
- area:+reimbursement.area,
+ area:reimbursement.area,
operation:reimbursement.operation,
litigation:reimbursement.litigation,
mortgage:reimbursement.mortgage,
- }
-
+ }
+ this.qszId = reimbursement.id
} catch (error) {
this.guaranteeLoading = false
}
@@ -1196,6 +1277,7 @@ export default {
if(that.RepaymentId == ''){// 新增录入
console.log('新增录入')
that.repaymentForm.insuranceId = that.id
+ that.$store.commit('hisId',that.id)
console.log(that.id,'id')
that.repaymentForm.totalRepayment = that.totalRepayment
that.repaymentForm.overdueDays = that.overdueDays
@@ -1237,7 +1319,16 @@ export default {
}
}
console.log('正在执行录入')
+ if(this.repaymentForm.repaymentCash!==0&&!this.repaymentForm.repaymentCash&&this.repaymentForm.repaymentAssetsAmount!==0&&!this.repaymentForm.repaymentAssetsAmount&&this.repaymentForm.repaymentOtherAmount!==0&&!this.repaymentForm.repaymentOtherAmount){
+ return this.$message.error('至少输入一种清偿方式!')
+ }
+ if(this.comp.compensationAmount||this.comp.compensatoryTime){// 判断代偿金额和时间
+ if(!(this.comp.compensationAmount&&this.comp.compensatoryTime)){
+ return this.$message.warning('若有代偿金额,请同时输入代偿金额和选择代偿时间!')
+ }
+ }
Promise.all([form1,form3,form2]).then(()=>{
+
if(!this.totalSame()){
return this.$confirm('清偿方式的金额之和与本次还款总额不符,可能会导致数据统计错误,是否继续?', '提示', {
type: 'warning'
@@ -1258,9 +1349,8 @@ export default {
},
//取消录入
cancel(){
-
-
- if(this.status=="newLoans"||this.status=="oldLoansEdit"){
+ // 判断处于哪个状态中,后退到对应页面
+ if(this.status=="newLoans"||this.status=="oldLoansEdit"||this.fromOne){
this.loanStatus = 1
this.$store.commit("loanStatusData", { loanStatus: 1 });
}else{
@@ -1293,6 +1383,7 @@ export default {
},
// 还款记录列表
async repaymentList(){
+ console.log(this.hisidId,'当前传的id值')
let res = await repaymentList({
page: this.hisPage,
size: this.pageNumber,
@@ -1370,12 +1461,14 @@ export default {
},
// 还款记录:查看/编辑
goRepaymentDetail(row,type){
+ console.log(row,type,'点击查看业务,')
this.loanStatus = 2
- this.$store.commit("loanStatusData", { loanStatus: 2 });
+ this.$store.commit("loanStatusData", { loanStatus: 2 });// 跳查看
this.RepaymentId = row.id
- this.$store.commit("RepaymentIdData", { RepaymentId: row.id });
+ this.$store.commit("RepaymentIdData", { RepaymentId: row.id });// 业务ID
this.id = row.insuranceId
- this.$store.commit("idData", { id: row.insuranceId });
+ this.$store.commit("idData", { id: row.insuranceId });// 这是loan.id用于记录业务id的 */
+ console.log(this.id,'rowid',row,'新增还款记录错误')
this.loanbackStatus = type
@@ -1393,7 +1486,7 @@ export default {
},
// 取得录入页面数据详情
async getRepaymentDetail(){
- console.log(this.RepaymentId,'调用详情接口')
+ console.log(this.RepaymentId,'调用详情接口使用的id')
let res = await repaymentDetail({
id: this.RepaymentId
});
@@ -1448,12 +1541,16 @@ export default {
})
},
principalNode(val){// 组织架构选择人员
- this.$set(this.liquidate,'personLiable',val[0].name)
- this.liquidate.personLiableId = val[0].id
-
+ this.selectObj = {
+ personLiable:val[0].name,
+ personLiableId:val[0].id
+ }
},
principalSeleted(){// 选择清收负责人
this.principal = false
+ this.$set(this.liquidate,'personLiable',this.selectObj.personLiable)
+ this.liquidate.personLiableId = this.selectObj.personLiableId
+ this.modifyReimbursement()
},
searchClientChange(val,state){// 实时搜索客户详细信息
companyInfoBySth({name:val}).then(res=>{
@@ -1542,7 +1639,6 @@ export default {
})
},
saveInsurance(){// 新增保后业务 或编辑业务
- /* TODO 需要处理没有还款信息的编辑 */
let has = false
// 担保信息
const form1 = new Promise((resolve,reject)=>{
@@ -1575,6 +1671,7 @@ export default {
// 如果处于编辑业务状态 或者是还款录入状态
if(this.discernEdit) obj.insuranceId = this.id
Object.assign(obj,this.comp,this.liquidate)
+ this.guaranteeForm.paymentStatus = 1
let param = {
alInsuranceList:this.guaranteeForm,// 担保信息
alReimbursement:obj// 代偿清收相关
@@ -1588,6 +1685,7 @@ export default {
})
}else{// 处于新增状态下
// param.source = 1
+
saveInsurance(param).then(res=>{
// 新增业务,返回上一页
if(this.status==='newLoans'){
@@ -1635,7 +1733,7 @@ export default {
},
deleteInsurance(row){// 删除保后业务--仅新建可删
- this.$confirm('此操作无法还原,确定要删除该业务?', '提示', {
+ this.$confirm('确认删除?删除后与该业务相关的保后信息将会一并删除且不可恢复', '提示', {
type: 'error'
}).then(() => {
deleteInsurance(row.id).then(res=>{
@@ -1647,10 +1745,7 @@ export default {
compensationSituation({data:val,insuranceId:this.id}).then(res=>{
this.cash = res.data.amount
console.log('取得当前的cash',this.cash)
- /* TODO 利息,其他,本次还款*/
- // 利息
- // this.interest = res.data.xx
-
+
})
},
uploadSuccess(response, file, fileList) { // 上传成功
@@ -1680,7 +1775,98 @@ export default {
}else{
return true
}
- }
+ },
+ modifyReimbursement(){// 查清收组
+ console.log('触发查询原本')
+ console.log(this.liquidate.personLiableId,this.liquidate.collectionGroupId,this.qszId,'三个值')
+ if(this.liquidate.personLiableId&&this.liquidate.collectionGroupId&&this.qszId){
+ console.log('进入接口')
+ let params = {
+ id:this.qszId,// reimbursement的id
+ collectionGroupId:this.liquidate.collectionGroupId,// 组id
+ personLiableId:this.liquidate.personLiableId,// 人id
+ }
+ modifyReimbursement(params).then(res=>{
+ console.log(res,'chashou123')
+ if(res.message!="成功"){
+ return this.$message.warning(res.message)
+ }
+ })
+ }
+ },
+ ChinaCost(numberValue){
+ var numberValue=new String(Math.round(numberValue*100)); // 数字金额
+ var chineseValue=""; // 转换后的汉字金额
+ var String1 = "零壹贰叁肆伍陆柒捌玖"; // 汉字数字
+ var String2 = "万仟佰拾亿仟佰拾万仟佰拾元角分"; // 对应单位
+ var len = numberValue.length; // numberValue 的字符串长度
+ var Ch1; // 数字的汉语读法
+ var Ch2; // 数字位的汉字读法
+ var nZero=0; // 用来计算连续的零值的个数
+ var String3; // 指定位置的数值
+ if(len>15){
+ alert("超出计算范围");
+ return "";
+ }
+ if (numberValue==0){
+ chineseValue = "零元整";
+ return chineseValue;
+ }
+
+ String2 = String2.substr(String2.length-len, len); // 取出对应位数的STRING2的值
+ for(var i=0; i= 3 ){
+ Ch1 = "";
+ Ch2 = "";
+ nZero = nZero + 1;
+ }
+ else{
+ Ch1 = "";
+ Ch2 = String2.substr(i, 1);
+ nZero = nZero + 1;
+ }
+ if( i == (len - 11) || i == (len - 3)){ // 如果该位是亿位或元位,则必须写上
+ Ch2 = String2.substr(i, 1);
+ }
+ }
+ chineseValue = chineseValue + Ch1 + Ch2;
+ }
+
+ if ( String3 == 0 ){ // 最后一位(分)为0时,加上“整”
+ chineseValue = chineseValue + "整";
+ }
+
+ return chineseValue;
+ },
@@ -1745,4 +1931,13 @@ export default {
/deep/ .el-upload-list{
display: none;
}
+.item{
+ max-width:300px;
+
+}
+.btn-custom-cancel{
+ display: none;
+ background: transparent;
+ color: turquoise;
+}
\ No newline at end of file
diff --git a/src/components/page/afterLoan/afterLoan.vue b/src/components/page/afterLoan/afterLoan.vue
index 48e73fe..c6d1e05 100644
--- a/src/components/page/afterLoan/afterLoan.vue
+++ b/src/components/page/afterLoan/afterLoan.vue
@@ -115,6 +115,8 @@ export default {
this.$router.push('/' + path);
},
backTo(){// 后退
+ console.log(this.showValue,'当前后退的判断值')
+ console.log(this.schedule,typeof(this.schedule),'当前后退的判断值')
switch (this.showValue) {
case '0':// 保后
switch (this.loanStatusHome) {
@@ -186,7 +188,7 @@ export default {
case '1':
this.goto('workbench')
break;
- default:
+ default: this.goto('workbench')
break;
}
break;
@@ -222,6 +224,10 @@ export default {
this.$store.commit("leftSidebarData", { leftStatus: this.showValue });
}
},
+ destroyed() {
+ this.$store.commit("leftSidebarData", { leftStatus: '0' });
+ this.$store.commit("loanStatusData", { loanStatus: 1 });// 切换页面状态
+ },
};
diff --git a/src/components/page/afterLoan/complete.vue b/src/components/page/afterLoan/complete.vue
index a516431..824f089 100644
--- a/src/components/page/afterLoan/complete.vue
+++ b/src/components/page/afterLoan/complete.vue
@@ -46,7 +46,7 @@
%
已清收总额
-
+
@@ -89,7 +89,7 @@
v-model="searchStr.queryCondition"
placeholder="工号/清收负责人"
clearable
- >
+ >