修复bug,未完成

master
e 3 years ago
parent ec66896d26
commit c6226c908b
  1. 71
      package-lock.json
  2. 1
      package.json
  3. 8
      src/assets/css/main.css
  4. 1
      src/components/common/BindPhone.vue
  5. 2
      src/components/common/applyDesign.vue
  6. 1
      src/components/common/back.vue
  7. 1
      src/components/common/background-list.vue
  8. 1
      src/components/common/businessApplyDepartment.vue
  9. 2
      src/components/common/cancel_btn.vue
  10. 2
      src/components/common/close.vue
  11. 2
      src/components/common/complianceDesign.vue
  12. 80
      src/components/common/directives.js
  13. 40
      src/components/common/left-sidebar.vue
  14. 7
      src/components/page/Workbench-Guarantee.vue
  15. 416
      src/components/page/afterLoan/afterInsurance.vue
  16. 28
      src/components/page/afterLoan/afterLoan.vue
  17. 10
      src/components/page/afterLoan/collection.vue
  18. 122
      src/components/page/afterLoan/complete.vue
  19. 25
      src/components/page/afterLoan/progress.vue
  20. 12
      src/main.js
  21. 12
      src/router/index.js
  22. 2
      src/router/permission.js
  23. 2
      src/router/resetRouter.js
  24. 36
      src/store/modules/guarantee.js
  25. 6
      src/store/modules/loan.js
  26. 2
      src/util/buttonRole.js
  27. 1
      src/util/wxLogin.js
  28. 8
      src/utils/api.js
  29. 31
      src/utils/core.js
  30. 3
      src/utils/http.js

71
package-lock.json generated

@ -3412,6 +3412,11 @@
"integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=",
"dev": true "dev": true
}, },
"complex.js": {
"version": "2.0.15",
"resolved": "https://registry.nlark.com/complex.js/download/complex.js-2.0.15.tgz",
"integrity": "sha1-et1oSLTB0SqpJi99+SXr56UadAY="
},
"component-classes": { "component-classes": {
"version": "1.2.6", "version": "1.2.6",
"resolved": "https://registry.npm.taobao.org/component-classes/download/component-classes-1.2.6.tgz", "resolved": "https://registry.npm.taobao.org/component-classes/download/component-classes-1.2.6.tgz",
@ -4448,6 +4453,11 @@
"integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=",
"dev": true "dev": true
}, },
"decimal.js": {
"version": "10.3.1",
"resolved": "https://registry.nlark.com/decimal.js/download/decimal.js-10.3.1.tgz",
"integrity": "sha1-2MOkRKnGd0umDKatcmHDqU/V54M="
},
"decode-uri-component": { "decode-uri-component": {
"version": "0.2.0", "version": "0.2.0",
"resolved": "https://registry.npm.taobao.org/decode-uri-component/download/decode-uri-component-0.2.0.tgz", "resolved": "https://registry.npm.taobao.org/decode-uri-component/download/decode-uri-component-0.2.0.tgz",
@ -5134,6 +5144,11 @@
"integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=",
"dev": true "dev": true
}, },
"escape-latex": {
"version": "1.2.0",
"resolved": "https://registry.nlark.com/escape-latex/download/escape-latex-1.2.0.tgz",
"integrity": "sha1-B8A4GM99rCUMzlF/T9obAB7yvKE="
},
"escape-string-regexp": { "escape-string-regexp": {
"version": "1.0.5", "version": "1.0.5",
"resolved": "https://registry.npm.taobao.org/escape-string-regexp/download/escape-string-regexp-1.0.5.tgz", "resolved": "https://registry.npm.taobao.org/escape-string-regexp/download/escape-string-regexp-1.0.5.tgz",
@ -5680,6 +5695,11 @@
"integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=", "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=",
"dev": true "dev": true
}, },
"fraction.js": {
"version": "4.1.1",
"resolved": "https://registry.nlark.com/fraction.js/download/fraction.js-4.1.1.tgz",
"integrity": "sha1-rE5SBHPa5nAS1hiquR7aCby0AP8="
},
"fragment-cache": { "fragment-cache": {
"version": "0.2.1", "version": "0.2.1",
"resolved": "https://registry.npm.taobao.org/fragment-cache/download/fragment-cache-0.2.1.tgz", "resolved": "https://registry.npm.taobao.org/fragment-cache/download/fragment-cache-0.2.1.tgz",
@ -6958,6 +6978,11 @@
"integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=",
"dev": true "dev": true
}, },
"javascript-natural-sort": {
"version": "0.7.1",
"resolved": "https://registry.npm.taobao.org/javascript-natural-sort/download/javascript-natural-sort-0.7.1.tgz",
"integrity": "sha1-+eIwPUUH9tdDVac2ZNFED7Wg71k="
},
"javascript-stringify": { "javascript-stringify": {
"version": "1.6.0", "version": "1.6.0",
"resolved": "https://registry.npm.taobao.org/javascript-stringify/download/javascript-stringify-1.6.0.tgz", "resolved": "https://registry.npm.taobao.org/javascript-stringify/download/javascript-stringify-1.6.0.tgz",
@ -7464,6 +7489,37 @@
"object-visit": "^1.0.0" "object-visit": "^1.0.0"
} }
}, },
"mathjs": {
"version": "9.4.4",
"resolved": "https://registry.nlark.com/mathjs/download/mathjs-9.4.4.tgz",
"integrity": "sha1-KazWdWPB5yCRAhMGKCTD+vYbyFg=",
"requires": {
"@babel/runtime": "^7.14.6",
"complex.js": "^2.0.15",
"decimal.js": "^10.3.1",
"escape-latex": "^1.2.0",
"fraction.js": "^4.1.1",
"javascript-natural-sort": "^0.7.1",
"seedrandom": "^3.0.5",
"tiny-emitter": "^2.1.0",
"typed-function": "^2.0.0"
},
"dependencies": {
"@babel/runtime": {
"version": "7.15.4",
"resolved": "https://registry.nlark.com/@babel/runtime/download/@babel/runtime-7.15.4.tgz?cache=0&sync_timestamp=1630618785994&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40babel%2Fruntime%2Fdownload%2F%40babel%2Fruntime-7.15.4.tgz",
"integrity": "sha1-/RfRa/34eObdAtGXU6OfqKjZyEo=",
"requires": {
"regenerator-runtime": "^0.13.4"
}
},
"regenerator-runtime": {
"version": "0.13.9",
"resolved": "https://registry.nlark.com/regenerator-runtime/download/regenerator-runtime-0.13.9.tgz?cache=0&sync_timestamp=1626993001371&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fregenerator-runtime%2Fdownload%2Fregenerator-runtime-0.13.9.tgz",
"integrity": "sha1-iSV0Kpj/2QgUmI11Zq0wyjsmO1I="
}
}
},
"mavon-editor": { "mavon-editor": {
"version": "2.9.0", "version": "2.9.0",
"resolved": "https://registry.npm.taobao.org/mavon-editor/download/mavon-editor-2.9.0.tgz", "resolved": "https://registry.npm.taobao.org/mavon-editor/download/mavon-editor-2.9.0.tgz",
@ -12317,6 +12373,11 @@
} }
} }
}, },
"seedrandom": {
"version": "3.0.5",
"resolved": "https://registry.npm.taobao.org/seedrandom/download/seedrandom-3.0.5.tgz",
"integrity": "sha1-VO3IXJUiJSWwx6b2s1Q9jgs6oKc="
},
"select-hose": { "select-hose": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npm.taobao.org/select-hose/download/select-hose-2.0.0.tgz", "resolved": "https://registry.npm.taobao.org/select-hose/download/select-hose-2.0.0.tgz",
@ -13564,6 +13625,11 @@
"integrity": "sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q=", "integrity": "sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q=",
"dev": true "dev": true
}, },
"tiny-emitter": {
"version": "2.1.0",
"resolved": "https://registry.nlark.com/tiny-emitter/download/tiny-emitter-2.1.0.tgz",
"integrity": "sha1-HRpW7fxRxD6GPLtTgqcjMONVVCM="
},
"tinycolor2": { "tinycolor2": {
"version": "1.4.2", "version": "1.4.2",
"resolved": "https://registry.npm.taobao.org/tinycolor2/download/tinycolor2-1.4.2.tgz", "resolved": "https://registry.npm.taobao.org/tinycolor2/download/tinycolor2-1.4.2.tgz",
@ -13721,6 +13787,11 @@
"mime-types": "~2.1.24" "mime-types": "~2.1.24"
} }
}, },
"typed-function": {
"version": "2.0.0",
"resolved": "https://registry.npm.taobao.org/typed-function/download/typed-function-2.0.0.tgz",
"integrity": "sha1-Fas4JYRROKixETvYnmDNakNXOeg="
},
"typedarray": { "typedarray": {
"version": "0.0.6", "version": "0.0.6",
"resolved": "https://registry.npm.taobao.org/typedarray/download/typedarray-0.0.6.tgz", "resolved": "https://registry.npm.taobao.org/typedarray/download/typedarray-0.0.6.tgz",

@ -15,6 +15,7 @@
"default-passive-events": "^2.0.0", "default-passive-events": "^2.0.0",
"echarts": "^4.8.0", "echarts": "^4.8.0",
"element-ui": "^2.13.0", "element-ui": "^2.13.0",
"mathjs": "^9.4.4",
"mavon-editor": "^2.6.17", "mavon-editor": "^2.6.17",
"moment": "^2.21.0", "moment": "^2.21.0",
"postcss-px2rem": "^0.3.0", "postcss-px2rem": "^0.3.0",

@ -136,6 +136,14 @@ img{
padding: 0 30px!important; padding: 0 30px!important;
border-color: #ccc; border-color: #ccc;
} }
/* 保后-清收完成统计输入框样式 */
#app .static .el-input__inner{
border-radius: 0!important;
border: 0;
/* padding: 0 30px!important; */
border-color: #ccc;
}
#app .el-input__icon{ #app .el-input__icon{
line-height: 36px; line-height: 36px;
} }

@ -1,4 +1,5 @@
<template> <template>
<!-- 绑定手机 -->
<div> <div>
<div class="Login_view bindphone_view"> <div class="Login_view bindphone_view">
<div class="flex-between login_title"> <div class="flex-between login_title">

@ -1,5 +1,5 @@
//
<template> <template>
<!-- 业务申请的设计表单文件带Design的都属于表单设计文件 -->
<div class="container_bg"> <div class="container_bg">
<div class="border-b flex-between ht50 self"> <div class="border-b flex-between ht50 self">
<div></div> <div></div>

@ -1,4 +1,5 @@
<template> <template>
<!-- < 返回 -->
<div class="flex-center cursor"> <div class="flex-center cursor">
<svg class="icon text-color" aria-hidden="true"> <svg class="icon text-color" aria-hidden="true">
<use xlink:href="#icon-fanhui"></use> <use xlink:href="#icon-fanhui"></use>

@ -1,4 +1,5 @@
<template> <template>
<!-- 组件列表 -->
<div class="pdlr20 wrap self"> <div class="pdlr20 wrap self">
<el-table :row-key="rowkey" ref="multipleTable" :data="tableData" stripe tooltip-effect="dark" style="width: 100%" @selection-change="getCheck" header-align="center"> <el-table :row-key="rowkey" ref="multipleTable" :data="tableData" stripe tooltip-effect="dark" style="width: 100%" @selection-change="getCheck" header-align="center">
<el-table-column v-if="check" type="selection" width="40" class="flex-center"></el-table-column> <el-table-column v-if="check" type="selection" width="40" class="flex-center"></el-table-column>

@ -1,4 +1,5 @@
<template> <template>
<!-- 担保业务-业务申请 -->
<div> <div>
<div v-show="loans" class="mgt20 bgw shadow radius10 list-box mgb20"> <div v-show="loans" class="mgt20 bgw shadow radius10 list-box mgb20">
<div class="flex-between search-box"> <div class="flex-between search-box">

@ -1,4 +1,4 @@
// // --
//<Cancel_btn></Cancel_btn> //<Cancel_btn></Cancel_btn>
<template> <template>
<el-button round class="cancel">取消</el-button> <el-button round class="cancel">取消</el-button>

@ -1,4 +1,4 @@
// X // X--
<template> <template>
<button> <button>
<img src="../../assets/img/close.png" alt=""> <img src="../../assets/img/close.png" alt="">

@ -1,5 +1,5 @@
//
<template> <template>
<!-- 合规调查的设计表单 -->
<div class="container_bg"> <div class="container_bg">
<div class="border-b flex-between ht50 self"> <div class="border-b flex-between ht50 self">
<div></div> <div></div>

@ -1,80 +0,0 @@
import Vue from 'vue';
// v-dialogDrag: 弹窗拖拽属性
Vue.directive('dialogDrag', {
bind(el, binding, vnode, oldVnode) {
const dialogHeaderEl = el.querySelector('.el-dialog__header');
const dragDom = el.querySelector('.el-dialog');
dialogHeaderEl.style.cssText += ';cursor:move;'
dragDom.style.cssText += ';top:0px;'
// 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null);
const sty = (() => {
if (window.document.currentStyle) {
return (dom, attr) => dom.currentStyle[attr];
} else {
return (dom, attr) => getComputedStyle(dom, false)[attr];
}
})()
dialogHeaderEl.onmousedown = (e) => {
// 鼠标按下,计算当前元素距离可视区的距离
const disX = e.clientX - dialogHeaderEl.offsetLeft;
const disY = e.clientY - dialogHeaderEl.offsetTop;
const screenWidth = document.body.clientWidth; // body当前宽度
const screenHeight = document.documentElement.clientHeight; // 可见区域高度(应为body高度,可某些环境下无法获取)
const dragDomWidth = dragDom.offsetWidth; // 对话框宽度
const dragDomheight = dragDom.offsetHeight; // 对话框高度
const minDragDomLeft = dragDom.offsetLeft;
const maxDragDomLeft = screenWidth - dragDom.offsetLeft - dragDomWidth;
const minDragDomTop = dragDom.offsetTop;
const maxDragDomTop = screenHeight - dragDom.offsetTop - dragDomheight;
// 获取到的值带px 正则匹配替换
let styL = sty(dragDom, 'left');
let styT = sty(dragDom, 'top');
// 注意在ie中 第一次获取到的值为组件自带50% 移动之后赋值为px
if (styL.includes('%')) {
styL = +document.body.clientWidth * (+styL.replace(/\%/g, '') / 100);
styT = +document.body.clientHeight * (+styT.replace(/\%/g, '') / 100);
} else {
styL = +styL.replace(/\px/g, '');
styT = +styT.replace(/\px/g, '');
};
document.onmousemove = function (e) {
// 通过事件委托,计算移动的距离
let left = e.clientX - disX;
let top = e.clientY - disY;
// 边界处理
if (-(left) > minDragDomLeft) {
left = -(minDragDomLeft);
} else if (left > maxDragDomLeft) {
left = maxDragDomLeft;
}
if (-(top) > minDragDomTop) {
top = -(minDragDomTop);
} else if (top > maxDragDomTop) {
top = maxDragDomTop;
}
// 移动当前元素
dragDom.style.cssText += `;left:${left + styL}px;top:${top + styT}px;`;
};
document.onmouseup = function (e) {
document.onmousemove = null;
document.onmouseup = null;
};
}
}
})

@ -2,12 +2,13 @@
<!-- 侧边栏组件传一个title数组父级定义positionrelative达到高度100% --> <!-- 侧边栏组件传一个title数组父级定义positionrelative达到高度100% -->
<!-- 取参数进行切换组件定义getSidebarVal接受参数 --> <!-- 取参数进行切换组件定义getSidebarVal接受参数 -->
<div class="left-sidebar not-zoom shadow"> <div class="left-sidebar not-zoom shadow">
<el-menu mode="vertical" :default-active="pitchOn" class="wd100 bd0" :default-openeds="['0']" > <el-menu mode="vertical" @open="open" :default-active="path" class="wd100 bd0" :default-openeds="['0']" >
<el-menu-item <el-menu-item
v-if="title.length>0" v-if="title.length>0"
v-for="item in title" v-for="item in title"
:key="item.index" :key="item.index"
:index="item.index" :index="item.index"
text-color="#fff"
background-color="#F3F3F3" background-color="#F3F3F3"
@click="setIndex(item.index)" @click="setIndex(item.index)"
> >
@ -21,7 +22,9 @@
v-for="(i,ind) in menus.body[item]" v-for="(i,ind) in menus.body[item]"
:key="ind" :key="ind"
:index="i.index" :index="i.index"
background-color="#F3F3F3" background-color="#545c64"
active-text-color="#ffd04b"
text-color="#fff"
@click="setIndex(i.index)" @click="setIndex(i.index)"
> >
<span slot="title" class="fz-14">&nbsp;&nbsp;{{ i.name }}</span> <span slot="title" class="fz-14">&nbsp;&nbsp;{{ i.name }}</span>
@ -50,9 +53,22 @@ export default {
pitchOn:String,// pitchOn:String,//
}, },
data() { data() {
return {}; return {
path:'',
};
},
watch:{
pitchOn(val,old){
console.log(val)
this.path = old
if(val){
this.path = val
}
}
}, },
created(){ created(){
console.log(this.pitchOn,'p')
this.path = this.pitchOn
}, },
methods:{ methods:{
@ -60,14 +76,12 @@ export default {
setIndex(index) { setIndex(index) {
this.$emit('getSidebarVal',index) this.$emit('getSidebarVal',index)
}, },
/* open(){
console.log('展开',this.menus.body)
head:['',''], // for (let key,value in this.menus.body) {
body:{ // console.log(this.menus.body[key][0],'old',key)
head[0]:[], // }
} }
*/
} }
}; };
</script> </script>
@ -90,6 +104,7 @@ export default {
border-right: 10px solid transparent; border-right: 10px solid transparent;
height: 40px; height: 40px;
line-height: 40px; line-height: 40px;
font-weight: 500;
margin: 20px 0; margin: 20px 0;
} }
/deep/ .el-menu-item.is-active { /deep/ .el-menu-item.is-active {
@ -100,10 +115,13 @@ export default {
} }
/deep/ .el-submenu .el-menu-item{ /deep/ .el-submenu .el-menu-item{
min-width: 0; min-width: 0;
font-size: 14px; font-size: 8px;
font-weight: normal;
} }
/deep/ .el-submenu__title{ /deep/ .el-submenu__title{
font-size: 16px; font-size: 16px;
font-weight: 500;
} }
/deep/ .el-submenu__icon-arrow{ /deep/ .el-submenu__icon-arrow{
right: 10px; right: 10px;

@ -326,7 +326,12 @@ export default {
this.removeSession(); this.removeSession();
next(); next();
}, },
destroyed(){} beforeDestroy() {
this.topSidebarVal = '1'
this.$store.commit('messageData',{messageData:{modelId:'1'}})
},
destroyed(){
}
}; };
</script> </script>
<style lang='scss' scoped> <style lang='scss' scoped>

@ -42,8 +42,8 @@
<el-table-column prop="guaranteeAmount" label="担保额度(元)" align="center"></el-table-column> <el-table-column prop="guaranteeAmount" label="担保额度(元)" align="center"></el-table-column>
<el-table-column prop="guaranteeTime" label="担保期限" align="center"></el-table-column> <el-table-column prop="guaranteeTime" label="担保期限" align="center"></el-table-column>
<el-table-column prop="applyTime" label="申请日期" align="center"></el-table-column> <el-table-column prop="applyTime" label="申请日期" align="center"></el-table-column>
<el-table-column prop="repaymentAmount" label="还款额(元)" align="center"></el-table-column> <el-table-column prop="repaymentAmount" label="还款额(元)" align="center"></el-table-column>
<el-table-column prop="remainAmount" label="剩余额(元)" align="center"></el-table-column> <el-table-column prop="remainAmount" label="剩余额(元)" align="center"></el-table-column>
<el-table-column prop="repaymentTime" label="还款期数" align="center"></el-table-column> <el-table-column prop="repaymentTime" label="还款期数" align="center"></el-table-column>
<!-- <el-table-column prop="department" label="所属部门" align="center"></el-table-column> --> <!-- <el-table-column prop="department" label="所属部门" align="center"></el-table-column> -->
<el-table-column prop="paymentStatus" label="还款状态" align="center"></el-table-column> <el-table-column prop="paymentStatus" label="还款状态" align="center"></el-table-column>
@ -84,23 +84,23 @@
<el-input disabled v-model="guaranteeForm.legalName" placeholder="自动读取"></el-input> <el-input disabled v-model="guaranteeForm.legalName" placeholder="自动读取"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="贷款银行:" prop="bank"> <el-form-item label="贷款银行:" prop="bank">
<div class="df"> <div class="df" style="font-size:16px">
<el-input class="dn" type="text" v-model="guaranteeForm.bank"></el-input> <el-input class="dn" type="text" v-model="guaranteeForm.bank"></el-input>
<el-autocomplete <el-autocomplete
class="dib" class="dib"
:disabled="!wanderEdit" :disabled="!wanderEdit||status=='newRecord'"
@input="bankgroup($event,'main')" @input="bankgroup($event,'main')"
v-model="mainbank" v-model="mainbank"
placeholder="输入银行名称" placeholder="输入银行名称"
:fetch-suggestions="querySearchAsync" :fetch-suggestions="querySearchAsync"
></el-autocomplete> ></el-autocomplete>
<p class="mgl10">-</p> <p class="mgl10">-</p>
<el-input :disabled="!wanderEdit" @change="bankgroup($event,'else')" v-model="elsebank" class="wd45 mgl10 dib" placeholder="分行名称" clearable></el-input> <el-input style="font-size:.875rem" :disabled="!wanderEdit||status=='newRecord'" @change="bankgroup($event,'else')" v-model="elsebank" class="wd45 mgl10 dib" placeholder="分行名称" clearable></el-input>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="贷款起止日期:" prop="loanStartTime"> <el-form-item label="贷款起止日期:" prop="loanStartTime">
<el-date-picker <el-date-picker
:disabled="wanderEdit" :disabled="wanderEdit&&status=='oldLoansEdit'||status=='newRecord'"
v-model="starEndDate" v-model="starEndDate"
@change="starEndTimeFn" @change="starEndTimeFn"
type="daterange" type="daterange"
@ -111,7 +111,7 @@
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="业务类别:" prop="businessType"> <el-form-item label="业务类别:" prop="businessType">
<el-select :disabled="!wanderEdit" v-model="guaranteeForm.businessType" placeholder="请选择"> <el-select :disabled="!wanderEdit||status=='newRecord'" v-model="guaranteeForm.businessType" placeholder="请选择">
<el-option label="融资担保" value="融资担保"></el-option> <el-option label="融资担保" value="融资担保"></el-option>
<el-option label="担保" value="担保"></el-option> <el-option label="担保" value="担保"></el-option>
<el-option label="借贷" value="借贷"></el-option> <el-option label="借贷" value="借贷"></el-option>
@ -126,7 +126,7 @@
<el-col :span="12" > <el-col :span="12" >
<el-form-item label="客户名称:" prop="customerName"> <el-form-item label="客户名称:" prop="customerName">
<el-select <el-select
:disabled="!wanderEdit" :disabled="!wanderEdit||status=='newRecord'"
v-model="guaranteeForm.customerName" v-model="guaranteeForm.customerName"
@change="searchClientChange($event,'name')" @change="searchClientChange($event,'name')"
filterable filterable
@ -149,17 +149,22 @@
</el-form-item> </el-form-item>
<el-form-item label="担保额度/贷款金额(元):" prop="guaranteeAmount"> <el-form-item label="担保额度/贷款金额(元):" prop="guaranteeAmount">
<el-input :disabled="!wanderEdit" v-model="guaranteeForm.guaranteeAmount" placeholder="请输入担保额度"></el-input> <div class="cashChinese">
<el-input oninput="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" :disabled="!wanderEdit||status=='newRecord'" v-model="guaranteeForm.guaranteeAmount" placeholder="请输入担保额度"></el-input>
</div>
</el-form-item> </el-form-item>
<el-form-item label="担保期限:" prop="guaranteeTime"> <el-form-item label="担保期限:" prop="guaranteeTime">
<div class="df"> <div class="df">
<el-input :disabled="!wanderEdit" v-model="guaranteeForm.guaranteeTime" placeholder="输入期限" style="width:94%;margin-right:5px"></el-input><p style="white-space: nowrap;">个月</p> <!-- <el-input onkeyup="value=this.value.replace(/\D+/g,'')" v-model="guaranteeForm.guaranteeTime" placeholder="输入期限" style="width:94%;margin-right:5px"></el-input><p style="white-space: nowrap;">个月</p> -->
<el-select :disabled="!wanderEdit||status=='newRecord'" class="wd100" v-model="guaranteeForm.guaranteeTime" :placeholder="'选择期限'" >
<el-option v-for="item in timeLimit" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="贷款用途:" prop="amountWide"> <el-form-item label="贷款用途:" prop="amountWide">
<el-select :disabled="!wanderEdit" v-model="guaranteeForm.amountWide" placeholder="请选择"> <el-select :disabled="!wanderEdit||status=='newRecord'" v-model="guaranteeForm.amountWide" placeholder="请选择">
<el-option v-for="(item, index) in loansUse" :key="index" :label="item.label" :value="item.value"></el-option> <el-option v-for="(item, index) in loansUse" :key="index" :label="item.label" :value="item.value"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -179,11 +184,11 @@
<el-form label-width="160px" ref="comp" :disabled="disabledAll" :model="comp" :rules="compRule"> <el-form label-width="160px" ref="comp" :disabled="disabledAll" :model="comp" :rules="compRule">
<el-col :span="12" > <el-col :span="12" >
<el-form-item label="代偿金额(元):"> <el-form-item label="代偿金额(元):">
<el-input :disabled="!wanderEdit" oninput="value=value.replace(/[^\d.]/g,'')" v-model="comp.compensationAmount" placeholder="请输入"></el-input> <el-input oninput="value=value.replace(/[^\d.]/g,'')" v-model="comp.compensationAmount" placeholder="请输入"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="代偿时间 :"> <el-form-item label="代偿时间 :">
<el-date-picker <el-date-picker
:disabled="!wanderEdit"
v-model="comp.compensatoryTime" v-model="comp.compensatoryTime"
@change="compensatoryTimeChange" @change="compensatoryTimeChange"
type="date" type="date"
@ -194,9 +199,9 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<!-- 代偿金额 - 代偿日后续 还款的金额每一笔还款都在这里减去 --> <!-- 代偿金额 - 代偿日后 还款的金额 - 每一次的利息总额每一笔还款都在这里减去 -->
<!-- TODO 此处的代偿未计算完善后端缺字段 -->
<el-form-item label="代偿余额(元):"> <el-form-item label="代偿余额(元):">
<!-- <el-input disabled v-model="comp.compensatoryBalance" placeholder="请输入"></el-input> -->
<el-input disabled v-model="computedCompensatoryBalance" placeholder="请输入"></el-input> <el-input disabled v-model="computedCompensatoryBalance" placeholder="请输入"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -215,18 +220,18 @@
<el-col :span="24" style="margin-right: 120px;"> <el-col :span="24" style="margin-right: 120px;">
<div class="df"> <div class="df">
<el-form-item label="清收负责人:" style="width:30%" prop="personLiable"> <el-form-item label="清收负责人:" style="width:30%" prop="personLiable">
<el-input :disabled="!entering&&status!=='newLoans'" @focus="principal=true" v-model="liquidate.personLiable" placeholder="请选择"></el-input> <el-input :disabled="!entering&&status!=='newLoans'||status=='newRecord'" @focus="principal=true" v-model="liquidate.personLiable" placeholder="请选择"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="所属清收组:" style="width:35%" prop="collectionGroupId"> <el-form-item label="所属清收组:" style="width:35%" prop="collectionGroupId">
<div class="df"> <div class="df">
<el-select :disabled="!entering&&status!=='newLoans'" v-model="liquidate.collectionGroupId" placeholder="请选择"> <el-select :disabled="!entering&&status!=='newLoans'||status=='newRecord'" v-model="liquidate.collectionGroupId" placeholder="请选择">
<el-option v-for="(item, index) in organizationArrs" :key="index" :label="item.groupName" :value="item.id"></el-option> <el-option v-for="(item, index) in organizationArrs" :key="index" :label="item.groupName" :value="item.id"></el-option>
</el-select> </el-select>
<el-button @click="organization=true" type="text" class="mgl10">自定义</el-button> <el-button @click="organization=true" type="text" class="mgl10">自定义</el-button>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="所在区域:" style="width:30%" prop="area"> <el-form-item label="所在区域:" style="width:30%" prop="area">
<el-select :disabled="!entering&&status!=='newLoans'" v-model="liquidate.area" placeholder="请选择"> <el-select :disabled="!entering&&status!=='newLoans'||status=='newRecord'" v-model="liquidate.area" placeholder="请选择">
<el-option v-for="(item, index) in area" :key="index" :label="item.name" :value="item.id"></el-option> <el-option v-for="(item, index) in area" :key="index" :label="item.name" :value="item.id"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -262,13 +267,14 @@
</el-card> </el-card>
</el-col> </el-col>
<!-- 还款信息在新建的时候不予展示 --> <!-- 还款信息在 新建业务 + 编辑业务 的时候不予展示 -->
<el-col :span="24" v-if="status!=='newLoans'"> <!-- TODO 编辑业务后出现消失的情况 -->
<el-col :span="24" v-if="status!=='newLoans'&&status!='oldLoansEdit'">
<el-card shadow="hover" class="mgb20 mat20"> <el-card shadow="hover" class="mgb20 mat20">
<div> <div>
<div class="mgb20 left-border fz-16"><p class="c-black mgl10">还款信息</p></div> <div class="mgb20 left-border fz-16"><p class="c-black mgl10">还款信息</p></div>
<div> <div>
<el-form :model="repaymentForm" :rules="rules" ref="repaymentForm" label-width="160px" :disabled="this.loanbackStatus == '查看'"> <el-form :model="repaymentForm" :rules="rules" ref="repaymentForm" label-width="160px" :disabled="loanbackStatus == '查看'">
<el-col :span="12" > <el-col :span="12" >
<el-form-item label="应还款日" prop="repaymentDate" class="date" > <el-form-item label="应还款日" prop="repaymentDate" class="date" >
<el-date-picker v-model="repaymentForm.repaymentDate" placeholder="请选择应还款日" <el-date-picker v-model="repaymentForm.repaymentDate" placeholder="请选择应还款日"
@ -280,7 +286,7 @@
</el-form-item> </el-form-item>
<el-form-item label="本次还款(元)" prop="currentRepayment" > <el-form-item label="本次还款(元)" prop="currentRepayment" >
<el-input v-model="repaymentForm.currentRepayment" placeholder="请输入本次还款金额" type="text" maxlength="10" oninput="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')"></el-input> <el-input v-model="repaymentForm.currentRepayment" placeholder="请输入本次还款的本金金额" type="text" maxlength="10" oninput="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="其他费用(元)"> <el-form-item label="其他费用(元)">
@ -324,13 +330,13 @@
<div class="df" style="margin-top:23px"> <div class="df" style="margin-top:23px">
<span style="margin-right:20px">2资产</span> <span style="margin-right:20px">2资产</span>
<el-input style="width:40%;min-width:250px;" v-model="repaymentForm.repaymentAssetsName" placeholder="请输入资产名称"></el-input> <el-input style="width:40%;min-width:250px;" v-model="repaymentForm.repaymentAssetsName" placeholder="请输入资产名称"></el-input>
<el-input style="width:20%;min-width:250px;margin-left:20px" oninput="value=value.replace(/[^\d.]/g,'')" v-model="repaymentForm.repaymentAssetsAmount" placeholder="请输入金额"></el-input> <el-input style="width:20%;min-width:250px;margin-left:20px" :disabled="!repaymentForm.repaymentAssetsName" oninput="value=value.replace(/[^\d.]/g,'')" v-model="repaymentForm.repaymentAssetsAmount" placeholder="请输入金额"></el-input>
<span style="margin-left:15px"></span> <span style="margin-left:15px"></span>
</div> </div>
<div class="df" style="margin-top:23px"> <div class="df" style="margin-top:23px">
<span style="margin-right:20px">3其他</span> <span style="margin-right:20px">3其他</span>
<el-input style="width:40%;min-width:250px;" v-model="repaymentForm.repaymentOtherName" placeholder="请输入其他方式"></el-input> <el-input style="width:40%;min-width:250px;" v-model="repaymentForm.repaymentOtherName" placeholder="请输入其他方式"></el-input>
<el-input style="width:20%;min-width:250px;margin-left:20px" oninput="value=value.replace(/[^\d.]/g,'')" v-model="repaymentForm.repaymentOtherAmount" placeholder="请输入金额"></el-input> <el-input style="width:20%;min-width:250px;margin-left:20px" :disabled="!repaymentForm.repaymentOtherName" oninput="value=value.replace(/[^\d.]/g,'')" v-model="repaymentForm.repaymentOtherAmount" placeholder="请输入金额"></el-input>
<span style="margin-left:15px"></span> <span style="margin-left:15px"></span>
</div> </div>
</el-form-item> </el-form-item>
@ -345,7 +351,7 @@
</el-card> </el-card>
</el-col> </el-col>
</el-row> </el-row>
<div class="mab20 flex-start-around" v-if="this.loanbackStatus != '查看'"> <div class="mab20 flex-start-around" v-if="loanbackStatus!='查看'">
<el-button v-preventReClick type="primary" round class="mag" @click="saveAdd('repaymentForm')">提交</el-button> <el-button v-preventReClick type="primary" round class="mag" @click="saveAdd('repaymentForm')">提交</el-button>
<el-button type="primary" plain round class="mag" @click="cancel">取消</el-button> <el-button type="primary" plain round class="mag" @click="cancel">取消</el-button>
</div> </div>
@ -357,10 +363,10 @@
<el-col :span="24"> <el-col :span="24">
<el-card shadow="hover" class="mgb20 mat20"> <el-card shadow="hover" class="mgb20 mat20">
<div> <div>
<div class="mgb20 left-border fz-16"><p class="c-black mgl10">还款信息</p></div> <div style="height:35px" class="mgb20 left-border fz-16 flex-align-center"><p class="c-black mgl10">还款信息&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="font-size:14px">企业名称{{StatisticsData.company}}</span></p></div>
<div> <div>
<el-form label-width="100px" class="flex-start-around"> <el-form label-width="120px" class="flex-start-around">
<el-col :span="8"> <el-col :span="6">
<el-form-item label="已还款期数:"> <el-form-item label="已还款期数:">
<span>{{StatisticsData.repaymentSum}}</span> <span>{{StatisticsData.repaymentSum}}</span>
</el-form-item> </el-form-item>
@ -370,7 +376,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="6">
<el-form-item label="逾期期数:"> <el-form-item label="逾期期数:">
<span>{{StatisticsData.overdueSum}}</span> <span>{{StatisticsData.overdueSum}}</span>
</el-form-item> </el-form-item>
@ -380,8 +386,8 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="6">
<el-form-item label="逾期利息(元):"> <el-form-item label="已缴逾期利息(元):">
<span>{{StatisticsData.overdueInterest}}</span> <span>{{StatisticsData.overdueInterest}}</span>
</el-form-item> </el-form-item>
@ -389,6 +395,15 @@
<span>{{StatisticsData.remainSum}}</span> <span>{{StatisticsData.remainSum}}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6">
<el-form-item label="代偿金额(元):">
<span>{{StatisticsData.compensationAmount}}</span>
</el-form-item>
<el-form-item label="代偿余额(元):">
<span>{{StatisticsData.compensatoryBalance}}</span>
</el-form-item>
</el-col>
</el-form> </el-form>
</div> </div>
</div> </div>
@ -506,12 +521,17 @@
<cancel_btn @click.native="principal=false"></cancel_btn> <cancel_btn @click.native="principal=false"></cancel_btn>
</div> </div>
</el-dialog> </el-dialog>
<!-- 清收组 --> <!-- 清收组 -->
<el-dialog title="清收组" width="40%" :visible.sync="organization"> <el-dialog title="清收组" width="40%" :visible.sync="organization">
<div class="organization"> <div class="organization">
<div class="organization-row">
<div class="left">序号</div>
<div class="center" style="border:0">名称</div>
<div class="handle">操作</div>
</div>
<div v-for="(item, index) in organizationArrs" :key="index" class="organization-row"> <div v-for="(item, index) in organizationArrs" :key="index" class="organization-row">
<div class="left">{{index+1}}</div> <div class="left">{{index+1}}</div>
<!-- @blur="blurOrganization($event,item)" -->
<input v-focus class="center" style="border:0" @blur="item.groupName=$event.target.value" v-if="!item.edit" :value="item.groupName"></el-input> <input v-focus class="center" style="border:0" @blur="item.groupName=$event.target.value" v-if="!item.edit" :value="item.groupName"></el-input>
<input class="center" disabled style="border:0" v-if="item.edit" :value="item.groupName"></el-input> <input class="center" disabled style="border:0" v-if="item.edit" :value="item.groupName"></el-input>
<div class="handle df"> <div class="handle df">
@ -520,17 +540,23 @@
<el-button type="text" @click="delOrganization(item,index)">删除</el-button> <el-button type="text" @click="delOrganization(item,index)">删除</el-button>
</div> </div>
</div> </div>
</div>
<el-button class="addBtn" type="primary" icon="el-icon-plus" circle @click="addOrganizationArrs"></el-button> <el-button class="addBtn" type="primary" icon="el-icon-plus" circle @click="addOrganizationArrs"></el-button>
</div>
<div class="fj-center wd100 ">
<el-button round type="" @click="organization=false">返回</el-button>
</div>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { mapState } from 'vuex'; 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 { 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'; import core from '../../../utils/core';// fMoney3
// 使
// import { create, all } from 'mathjs/number'
// const math = create(all)
let math = require('mathjs');
export default { export default {
data() { data() {
return { return {
@ -549,9 +575,9 @@ import core from '../../../utils/core';
id: '', id: '',
repaymentForm: { repaymentForm: {
currentRepayment: '', currentRepayment:0,
interest: '', interest: 0,
otherExpenses: '', otherExpenses:0,
overdueDays: 0 overdueDays: 0
}, },
upLoadPop:false,// upLoadPop:false,//
@ -562,11 +588,11 @@ import core from '../../../utils/core';
], ],
currentRepayment: [ currentRepayment: [
{ required: true, message: '请输入本次还款金额', trigger: 'blur' }, { required: true, message: '请输入本次还款金额', trigger: 'blur' },
{ pattern: /^(([1-9][0-9]*)|(([0]\.\d{1,2}|[1-9][0-9]*\.\d{1,2})))$/, message: '请输入正确金额格式,可保留两位小数' } { pattern: /^(([0-9][0-9]*)|(([0]\.\d{1,2}|[0-9][0-9]*\.\d{1,2})))$/, message: '请输入正确金额格式,可保留两位小数' }
], ],
interest: [ interest: [
{ required: true, message: '请输入利息', trigger: 'blur' }, { required: true, message: '请输入利息', trigger: 'blur' },
{ pattern: /^(([1-9][0-9]*)|(([0]\.\d{1,2}|[1-9][0-9]*\.\d{1,2})))$/, message: '请输入正确金额格式,可保留两位小数' } { pattern: /^(([0-9][0-9]*)|(([0]\.\d{1,2}|[0-9][0-9]*\.\d{1,2})))$/, message: '请输入正确金额格式,可保留两位小数' }
] ]
}, },
logTypeList: [{ logTypeList: [{
@ -658,13 +684,22 @@ import core from '../../../utils/core';
guaranteeForm: {// guaranteeForm: {//
}, },
//
timeLimit:[
{ value: '1个月', label: '1个月' },
{ value: '3个月', label: '3个月' },
{ value: '6个月', label: '6个月' },
{ value: '9个月', label: '9个月' },
{ value: '12个月', label: '12个月' },
{ value: '24个月', label: '24个月' },
],
guaranteeRule:{ guaranteeRule:{
bank: [{ required: true, message: '请选择贷款银行', trigger: 'change' }], bank: [{ required: true, message: '请选择贷款银行', trigger: 'change' }],
loanStartTime:[{ required: true, message: '请选择贷款起止日期', trigger: 'change' }], loanStartTime:[{ required: true, message: '请选择贷款起止日期', trigger: 'change' }],
businessType:[{ required: true, message: '请选择业务类别', trigger: 'change' }], businessType:[{ required: true, message: '请选择业务类别', trigger: 'change' }],
customerName:[{ required: true, message: '请输入系统已有客户名称', trigger: 'change' }], customerName:[{ required: true, message: '请输入系统已有客户名称', trigger: 'change' }],
guaranteeAmount: [{ required: true, message: '请输入担保额度/贷款金额', trigger: 'blur' },], guaranteeAmount: [{ required: true, message: '请输入担保额度/贷款金额', trigger: 'blur' },],
guaranteeTime: [{ required: true, message: '请输入期限', trigger: 'blur' },], guaranteeTime: [{ required: true, message: '请输入期限', trigger: 'change' },],
amountWide:[{ required: true, message: '请选择贷款用途', trigger: 'change' }], amountWide:[{ required: true, message: '请选择贷款用途', trigger: 'change' }],
@ -704,14 +739,30 @@ import core from '../../../utils/core';
cash:0,// cash:0,//
btns:{}, btns:{},
ids:[], ids:[],
interest:'',//
}; };
}, },
computed:{ computed:{
computedCompensatoryBalance(){ computedCompensatoryBalance:function(){//
this.comp.compensatoryBalance = this.comp.compensationAmount||0 - this.cash /* TODO 未完成状态判断 */
return this.comp.compensationAmount||0 - this.cash // if(this.status){} // count
console.log(this.repaymentForm,'this.repaymentForm')
if(!this.repaymentForm.currentRepayment)this.repaymentForm.currentRepayment = 0
if(!this.repaymentForm.otherExpenses)this.repaymentForm.otherExpenses = 0
if(!this.repaymentForm.interest)this.repaymentForm.interest = 0
let a = this.repaymentForm.currentRepayment , b = this.repaymentForm.otherExpenses , c = this.repaymentForm.interest
let count = math.format(math.chain(math.bignumber(a)).add(math.bignumber(b)).add(math.bignumber(c)).done())
console.log(count,'当前的计算')
// = -
this.comp.compensatoryBalance = (this.comp.compensationAmount - this.cash - count)||0
// =
return (this.comp.compensationAmount?this.comp.compensationAmount - this.cash - count:0)||0
},
source(){//
return this.$store.state.loan.source
}, },
bankSelect:function(){ bankSelect:function(){
return this.$store.state.guarantee.bankData return this.$store.state.guarantee.bankData
}, },
@ -730,21 +781,11 @@ import core from '../../../utils/core';
disabledAll(){ disabledAll(){
return this.$store.state.loan.disabledAll return this.$store.state.loan.disabledAll
}, },
totalRepayment(){ totalRepayment(){//
if(isNaN(parseFloat(this.repaymentForm.otherExpenses)) || this.repaymentForm.otherExpenses == ''){ // + + -
// NaN // currentRepayment interest otherExpenses deductionAmount
if (isNaN(parseFloat(this.repaymentForm.currentRepayment) + parseFloat(this.repaymentForm.interest))) { let data = this.repaymentForm
return '' return ((data.currentRepayment||0)*100 + (data.interest||0)*100 + (data.otherExpenses||0)*100 - (data.deductionAmount||0)*100)/100
} else {
return (parseFloat(this.repaymentForm.currentRepayment)*100 + parseFloat(this.repaymentForm.interest)*100)/100
}
}else{
if (isNaN(parseFloat(this.repaymentForm.currentRepayment) + parseFloat(this.repaymentForm.interest) + parseFloat(this.repaymentForm.otherExpenses))) {
return ''
} else {
return (parseFloat(this.repaymentForm.currentRepayment)*100 + parseFloat(this.repaymentForm.interest)*100 + parseFloat(this.repaymentForm.otherExpenses)*100)/100
}
}
}, },
overdueDays(){ overdueDays(){
if(this.repaymentForm.repaymentDate && !this.repaymentForm.actualRepaymentDate){ if(this.repaymentForm.repaymentDate && !this.repaymentForm.actualRepaymentDate){
@ -780,10 +821,18 @@ import core from '../../../utils/core';
return 0 return 0
} }
} }
},
//
reimbursement(){
return this.repaymentForm.repaymentCash||0+this.repaymentForm.repaymentAssetsAmount||0+this.repaymentForm.repaymentOtherAmount||0
} }
}, },
watch: { watch: {
"$store.state.loan.loanStatus":function(val){ "$store.state.loan.loanStatus":function(val){
if(val!=2){
this.comp.compensatoryBalance = 0
this.cash = 0
}
this.loanStatus = val this.loanStatus = val
if(val == 1){ if(val == 1){
this.insuranceData = [] this.insuranceData = []
@ -793,9 +842,15 @@ import core from '../../../utils/core';
this.$store.commit('discernEdit',false) this.$store.commit('discernEdit',false)
this.$forceUpdate(); this.$forceUpdate();
this.getData() this.getData()
this.loanbackStatus = ''
} }
if(val == 2){ if(val == 2){
this.id = this.$store.state.loan.id console.log(this.souce,'判断是否系统流转--0')
if(this.source === 0&&this.status==="oldLoans"){//
}
console.log(this.RepaymentId,this.id,'RepaymentId,进入2页面')
this.id = this.$store.state.loan.id || this.$store.state.loan.RepaymentId
this.RepaymentId = this.$store.state.loan.RepaymentId this.RepaymentId = this.$store.state.loan.RepaymentId
this.loanbackStatus = this.$store.state.loan.loanbackStatus this.loanbackStatus = this.$store.state.loan.loanbackStatus
this.guaranteeForm = {} this.guaranteeForm = {}
@ -808,6 +863,7 @@ import core from '../../../utils/core';
// //
if(this.status!=='newLoans'||this.discernEdit) this.getDetail() if(this.status!=='newLoans'||this.discernEdit) this.getDetail()
if(this.loanbackStatus == '查看' || this.loanbackStatus == '编辑'){ if(this.loanbackStatus == '查看' || this.loanbackStatus == '编辑'){
console.log(this.loanbackStatus,'什么状态')
this.getRepaymentDetail() this.getRepaymentDetail()
} }
} }
@ -818,6 +874,7 @@ import core from '../../../utils/core';
this.repaymentList() this.repaymentList()
} }
this.$store.commit("loanStatusData", { loanStatus: this.loanStatus }); this.$store.commit("loanStatusData", { loanStatus: this.loanStatus });
}, },
principal:function(val){// principal:function(val){//
this.designateEmpTrees() this.designateEmpTrees()
@ -826,13 +883,22 @@ import core from '../../../utils/core';
this.clearNodeArr = false this.clearNodeArr = false
}) })
}, },
status:function (params) { // status:function (params) {
// },
loanStatus(val){
if(val==1){
this.starEndDate = []
this.guaranteeForm = {}
this.mainbank = ''
}
} }
}, },
created(){ created(){
console.log(math.format(math.chain(math.bignumber(0.1)).add(math.bignumber(0.2)).done()),'计算数据')
console.log(this.loanbackStatus,'this.loanbackStatus')
this.liquidateList() this.liquidateList()
if(this.bankSelect.length===0){ if(this.bankSelect.length===0){//
allBankName().then(res=>{ allBankName().then(res=>{
let arr = res.data.map(item=>{ let arr = res.data.map(item=>{
return {value:item.bankName} return {value:item.bankName}
@ -840,11 +906,12 @@ import core from '../../../utils/core';
this.$store.commit('getBanks',arr) this.$store.commit('getBanks',arr)
}) })
} }
//
this.loanStatus = this.$store.state.loan.loanStatus this.loanStatus = this.$store.state.loan.loanStatus
if(this.loanStatus == 1){ if(this.loanStatus == 1){
this.getData() this.getData()
} }
//
if(this.loanStatus == 2){ if(this.loanStatus == 2){
this.id = this.$store.state.loan.id this.id = this.$store.state.loan.id
this.RepaymentId = this.$store.state.loan.RepaymentId this.RepaymentId = this.$store.state.loan.RepaymentId
@ -857,6 +924,7 @@ import core from '../../../utils/core';
overdueDays: 0 overdueDays: 0
} }
// //
console.log(this.status,'处于什么状态')
if(this.status!=='newLoans'||this.discernEdit) this.getDetail() if(this.status!=='newLoans'||this.discernEdit) this.getDetail()
if(this.loanbackStatus == '查看' || this.loanbackStatus == '编辑'){ if(this.loanbackStatus == '查看' || this.loanbackStatus == '编辑'){
this.getRepaymentDetail() this.getRepaymentDetail()
@ -871,6 +939,9 @@ import core from '../../../utils/core';
} }
}, },
methods:{ methods:{
init(val){
this.$math.bignumber(val)
},
// //
async getData() { async getData() {
this.dataLoading = true this.dataLoading = true
@ -921,32 +992,37 @@ import core from '../../../utils/core';
// this.$message.error(' '); // this.$message.error(' ');
// } // }
}, },
/* TODO 如果处于流转且没有编辑过的情况下,加个提示 */
/// ///
edit(row,val){ edit(row,val){
this.$store.commit('disabledAll',false)// this.$store.commit('disabledAll',false)//
if(!row){// if(!row){// row--
console.log('进入新建业务')
this.loanStatus = 2 this.loanStatus = 2
this.$store.commit("loanbackStatusData", { loanbackStatus: '' });//
this.$store.commit("loanStatusData", { loanStatus: 2 }); this.$store.commit("loanStatusData", { loanStatus: 2 });
this.$store.commit('setNewOrOld','newLoans') this.$store.commit('setNewOrOld','newLoans')
this.$store.commit('entering',false) this.$store.commit('entering',false)
this.$store.commit('wanderEdit',true) this.$store.commit('wanderEdit',true)
if(val){// --
if(val){// this.$store.commit('setNewOrOld','oldLoansEdit')//
this.$store.commit('setNewOrOld','oldLoans')//
// //
this.$store.commit('entering',true) this.$store.commit('entering',true)
this.id = val.id this.id = val.id
this.$store.commit("idData", { id: val.id });// id this.$store.commit("idData", { id: val.id });// id
if(val.source==0){// if(val.source==0){// --
this.$store.commit('wanderEdit',false) this.$store.commit('wanderEdit',false)
// console.log(this.status,'status')
}else{ }else{
this.$store.commit('wanderEdit',true) this.$store.commit('wanderEdit',true)
} }
} }
val?this.$store.commit('discernEdit',true):this.$store.commit('discernEdit',false) val?this.$store.commit('discernEdit',true):this.$store.commit('discernEdit',false)
}else{// ,
this.loanbackStatus = '录入' // 退
this.$store.commit("loanbackStatusData", { loanbackStatus: '录入' });
}else{
console.log('进入录入界面')
// ,
this.$store.commit('wanderEdit',true) this.$store.commit('wanderEdit',true)
this.$store.commit('entering',false) // - this.$store.commit('entering',false) // -
this.$store.commit('discernEdit',true)// this.$store.commit('discernEdit',true)//
@ -955,7 +1031,7 @@ import core from '../../../utils/core';
this.$store.commit("loanStatusData", { loanStatus: 2 });// this.$store.commit("loanStatusData", { loanStatus: 2 });//
this.id = row.id this.id = row.id
this.$store.commit("idData", { id: row.id });// id this.$store.commit("idData", { id: row.id });// id
this.$store.commit("source",this.row.source);//
this.RepaymentId = '' this.RepaymentId = ''
this.$store.commit("RepaymentIdData", { RepaymentId: '' });// this.$store.commit("RepaymentIdData", { RepaymentId: '' });//
this.loanbackStatus = '录入' this.loanbackStatus = '录入'
@ -1015,6 +1091,10 @@ import core from '../../../utils/core';
compensatoryTime:reimbursement.compensatoryTime, compensatoryTime:reimbursement.compensatoryTime,
compensatoryBalance:reimbursement.compensatoryBalance, compensatoryBalance:reimbursement.compensatoryBalance,
} }
if(this.comp.compensatoryTime){//
this.compensatoryTimeChange(this.comp.compensatoryTime)
}
// //
this.liquidate = { this.liquidate = {
personLiable:reimbursement.personLiable, personLiable:reimbursement.personLiable,
@ -1049,53 +1129,140 @@ import core from '../../../utils/core';
this.repaymentForm.overdueDays = 0 this.repaymentForm.overdueDays = 0
} }
}, },
//
/* TODO
* else 系统流转编辑有问题
* else 还款记录添加代偿金额和代偿余额
* else 代偿余额还需要减掉总利息
*
*/
isReimbursement(){
if(this.reimbursement&&this.reimbursement!==this.repaymentForm.currentRepayment){
return false
}else return true
},
// //
saveAdd(repaymentForm){ saveAdd(repaymentForm){
// if(!this.isReimbursement()){
// return this.$message.warning('')
// }
console.log(this.status,'newL为新增业务')
// //
if(this.status==='newLoans'){ if(this.status==='newLoans'||this.status=="oldLoansEdit"){
console.log('进入新增业务')
this.saveInsurance() this.saveInsurance()
}else{// / }else{
let form2 = new Promise((resolve,reject)=>{ console.log('进入录入环节')
this.$refs[repaymentForm].validate((valid) => { // /
//
const form1 = new Promise((resolve,reject)=>{
this.$refs['refGuaranteeForm'].validate((valid) => {
if (valid) { if (valid) {
resolve() resolve()
}else{ }else{
this.$message.error('请输入必填信息!') has = true
reject()
// return this.$message.error('')
} }
}) })
}) })
Promise.all([this.saveInsurance(),form2]).then(()=>{ console.log(this.$refs["repaymentForm"],'值')
if(this.RepaymentId == ''){ //
this.repaymentForm.insuranceId = this.id const form3 = new Promise((resolve,reject)=>{
this.repaymentForm.totalRepayment = this.totalRepayment this.$refs['liquidate'].validate((valid) => {
this.repaymentForm.overdueDays = this.overdueDays if (valid) {
repaymentEntry(this.repaymentForm).then(res=>{ resolve()
this.$message.success("录入成功!"); }else{
this.loanStatus = 1 reject()
this.$store.commit("loanStatusData", { loanStatus: 1 }); // if(!has) return this.$message.error('')
}).catch(err=>{ }
})
}) })
let form2 = new Promise((resolve,reject)=>{
this.$refs["repaymentForm"].validate((valid) => {
if (valid) {
resolve()
}else{ }else{
this.repaymentForm.totalRepayment = this.totalRepayment reject()
this.repaymentForm.overdueDays = this.overdueDays }
updateRepayment(this.repaymentForm).then(res=>{ })
this.$message.success("编辑成功!"); })
this.loanStatus = 3 let that = this
this.$store.commit("loanStatusData", { loanStatus: 3 }); function fn (){
if(that.RepaymentId == ''){//
console.log('新增录入')
that.repaymentForm.insuranceId = that.id
console.log(that.id,'id')
that.repaymentForm.totalRepayment = that.totalRepayment
that.repaymentForm.overdueDays = that.overdueDays
let obj ={}
//
if(that.discernEdit) obj.insuranceId = that.id
Object.assign(obj,that.comp,that.liquidate)
let param = {
alInsuranceList:that.guaranteeForm,//
alReimbursement:obj//
}
Promise.all([repaymentEntry(that.repaymentForm),editInsurance(param)]).then((res1,res2)=>{
that.$message.success("录入成功!");
that.loanStatus = 3
that.$store.commit("loanStatusData", { loanStatus: 3 });
})
}else{//
let obj ={}
//
if(that.discernEdit) obj.insuranceId = that.id
Object.assign(obj,that.comp,that.liquidate)
let param = {
alInsuranceList:that.guaranteeForm,//
alReimbursement:obj//
}
that.repaymentForm.totalRepayment = that.totalRepayment
that.repaymentForm.overdueDays = that.overdueDays
Promise.all([updateRepayment(that.repaymentForm),editInsurance(param)]).then((res1,res2)=>{
that.$message.success("编辑成功!");
that.loanStatus = 3
that.$store.commit("loanStatusData", { loanStatus: 3 });
})
// updateRepayment(that.repaymentForm).then(res=>{
// that.$message.success("");
// that.loanStatus = 3
// that.$store.commit("loanStatusData", { loanStatus: 3 });
// }).catch(err=>{
// })
}
}
console.log('正在执行录入')
Promise.all([form1,form3,form2]).then(()=>{
if(!this.totalSame()){
return this.$confirm('清偿方式的金额之和与本次还款总额不符,可能会导致数据统计错误,是否继续?', '提示', {
type: 'warning'
}).then(()=>{
fn()
}).catch(err=>{ }).catch(err=>{
console.log('此处报错')
return '我是错误信息'
}) })
} else{
fn()
} }
}).catch(err=>{ }).catch(err=>{
console.log(err,'err')
this.$message.error('请输入必填信息!') this.$message.error('请输入必填信息!')
}) })
} }
}, },
// //
cancel(){ cancel(){
if(this.status=="newLoans"||this.status=="oldLoansEdit"){
this.loanStatus = 1 this.loanStatus = 1
this.$store.commit("loanStatusData", { loanStatus: 1 }); this.$store.commit("loanStatusData", { loanStatus: 1 });
}else{
this.loanStatus = 3
this.$store.commit("loanStatusData", { loanStatus: 3 });
}
}, },
// //
clickEndTime(){ clickEndTime(){
@ -1180,15 +1347,21 @@ import core from '../../../utils/core';
this.$message.error('请先选择还款记录列表数据 !'); this.$message.error('请先选择还款记录列表数据 !');
} }
}, },
// //
addRepayment(){ addRepayment(){
this.loanStatus = 2 this.loanStatus = 2 //
this.$store.commit("loanStatusData", { loanStatus: 2 }); this.$store.commit("loanStatusData", { loanStatus: 2 });
console.log(this.$store.state.loan.hisidId)
//
this.RepaymentId = '' this.RepaymentId = ''
this.$store.commit("RepaymentIdData", { RepaymentId: '' }); this.$store.commit("RepaymentIdData", { RepaymentId: this.RepaymentId });
this.loanbackStatus = '新增'
this.loanbackStatus = '新增' // 退
this.$store.commit("loanbackStatusData", { loanbackStatus: '新增' }); this.$store.commit("loanbackStatusData", { loanbackStatus: '新增' });
this.$store.commit('setNewOrOld','newRecord')
this.$store.commit('setNewOrOld','newRecord') //
console.log(this.status,'是否是新增数据')
this.$store.commit('disabledAll',false) this.$store.commit('disabledAll',false)
}, },
// / // /
@ -1200,6 +1373,10 @@ import core from '../../../utils/core';
this.id = row.insuranceId this.id = row.insuranceId
this.$store.commit("idData", { id: row.insuranceId }); this.$store.commit("idData", { id: row.insuranceId });
this.loanbackStatus = type this.loanbackStatus = type
this.$store.commit('setNewOrOld','oldLoans')//
// //
type==='编辑'?this.$store.commit('discernEdit',false):this.$store.commit('discernEdit',false) type==='编辑'?this.$store.commit('discernEdit',false):this.$store.commit('discernEdit',false)
if (type==='查看') { if (type==='查看') {
@ -1210,7 +1387,9 @@ import core from '../../../utils/core';
this.$store.commit("loanbackStatusData", { loanbackStatus: type }); this.$store.commit("loanbackStatusData", { loanbackStatus: type });
}, },
//
async getRepaymentDetail(){ async getRepaymentDetail(){
console.log(this.RepaymentId,'调用详情接口')
let res = await repaymentDetail({ let res = await repaymentDetail({
id: this.RepaymentId id: this.RepaymentId
}); });
@ -1358,25 +1537,28 @@ import core from '../../../utils/core';
this.liquidateList() this.liquidateList()
}) })
}, },
saveInsurance(){// saveInsurance(){//
/* TODO 需要处理没有还款信息的编辑 */
let has = false let has = false
//
const form1 = new Promise((resolve,reject)=>{ const form1 = new Promise((resolve,reject)=>{
this.$refs['refGuaranteeForm'].validate((valid) => { this.$refs['refGuaranteeForm'].validate((valid) => {
if (valid) { if (valid) {
resolve() resolve()
}else{ }else{
has = true has = true
return this.$message.error('请输入必填信息!') // return this.$message.error('')
} }
}) })
}) })
//
const form3 = new Promise((resolve,reject)=>{ const form3 = new Promise((resolve,reject)=>{
this.$refs['liquidate'].validate((valid) => { this.$refs['liquidate'].validate((valid) => {
if (valid) { if (valid) {
resolve() resolve()
}else{ }else{
if(!has) return this.$message.error('请输入必填信息!') // if(!has) return this.$message.error('')
} }
}) })
}) })
@ -1393,7 +1575,7 @@ import core from '../../../utils/core';
alInsuranceList:this.guaranteeForm,// alInsuranceList:this.guaranteeForm,//
alReimbursement:obj// alReimbursement:obj//
} }
if(this.discernEdit){// if(this.discernEdit){// --
editInsurance(param).then(res=>{ editInsurance(param).then(res=>{
if(this.entering){ if(this.entering){
this.$message.success('编辑业务成功!') this.$message.success('编辑业务成功!')
@ -1401,7 +1583,7 @@ import core from '../../../utils/core';
} }
}) })
}else{// }else{//
param.source = 1 // param.source = 1
saveInsurance(param).then(res=>{ saveInsurance(param).then(res=>{
// //
if(this.status==='newLoans'){ if(this.status==='newLoans'){
@ -1422,6 +1604,7 @@ import core from '../../../utils/core';
alInsuranceList:this.guaranteeForm,// alInsuranceList:this.guaranteeForm,//
alReimbursement:obj// alReimbursement:obj//
} }
console.log(param,'编辑传值')
if(this.discernEdit){// if(this.discernEdit){//
editInsurance(param).then(res=>{ editInsurance(param).then(res=>{
if(this.entering){ if(this.entering){
@ -1443,7 +1626,7 @@ import core from '../../../utils/core';
} }
}).catch(()=>{ }).catch(()=>{
// alert('') // alert('')
return false return this.$message.error('请输入必填信息!')
}) })
}, },
deleteInsurance(row){// -- deleteInsurance(row){// --
@ -1459,6 +1642,11 @@ import core from '../../../utils/core';
compensatoryTimeChange(val){// compensatoryTimeChange(val){//
compensationSituation({data:val,insuranceId:this.id}).then(res=>{ compensationSituation({data:val,insuranceId:this.id}).then(res=>{
this.cash = res.data.amount this.cash = res.data.amount
console.log('取得当前的cash',this.cash)
/* TODO 利息,其他,本次还款*/
//
// this.interest = res.data.xx
}) })
}, },
uploadSuccess(response, file, fileList) { // uploadSuccess(response, file, fileList) { //
@ -1479,6 +1667,16 @@ import core from '../../../utils/core';
// } // }
// this.uploadList.push({ name: file.name, url: response.message.fileUrl }); // this.uploadList.push({ name: file.name, url: response.message.fileUrl });
}, },
//
totalSame(){
//
let count = (+this.repaymentForm.repaymentCash||0) + (+this.repaymentForm.repaymentAssetsAmount||0) + (+this.repaymentForm.repaymentOtherAmount||0)
if(this.totalRepayment!=count){
return false
}else{
return true
}
}
@ -1522,6 +1720,8 @@ import core from '../../../utils/core';
.handle{ .handle{
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center;
width: 25%; width: 25%;
background: #00b9ff54; background: #00b9ff54;
} }
@ -1530,7 +1730,7 @@ import core from '../../../utils/core';
.addBtn{ .addBtn{
position: relative; position: relative;
left: 50%; left: 50%;
top: 10px; top: 0;
transform:translate(-50%,0); transform:translate(-50%,0);
} }
.download_tips { .download_tips {

@ -16,7 +16,7 @@
<afterInsurance v-if="showValue == '0'" ref="afterInsuranceRef"></afterInsurance> <afterInsurance v-if="showValue == '0'" ref="afterInsuranceRef"></afterInsurance>
<!-- 催收管理 --> <!-- 催收管理 -->
<collection v-if="showValue == '1'" ref="systemLogRef"></collection> <collection v-if="showValue == '1'" ref="systemLogRef"></collection>
<!-- 清收完成统计 --> <!-- 清收年度统计 -->
<liquidateComplete v-if="showValue ==='2'" ref="complete"></liquidateComplete> <liquidateComplete v-if="showValue ==='2'" ref="complete"></liquidateComplete>
<!-- 请收进度查询 --> <!-- 请收进度查询 -->
<liquidateProgress v-if="showValue==='3'"></liquidateProgress> <liquidateProgress v-if="showValue==='3'"></liquidateProgress>
@ -85,11 +85,11 @@ export default {
// } // }
// } // }
// console.log(this.$router.currentRoute,'') // console.log(this.$router.currentRoute,'')
if(meta.includes('清收完成统计')||meta.includes('清收进度查询')){ if(meta.includes('清收年度统计')||meta.includes('清收进度查询')){
this.menus.head.push('数据统计与查询') this.menus.head.push('数据统计与查询')
this.menus.body['数据统计与查询'] = [] this.menus.body['数据统计与查询'] = []
if(meta.includes('清收完成统计')){ if(meta.includes('清收年度统计')||meta.includes('清收完成统计')){
this.menus.body['数据统计与查询'].push({ name: '清收完成统计', index: '2' }) this.menus.body['数据统计与查询'].push({ name: '清收年度统计', index: '2' })
} }
if(meta.includes('清收进度查询')){ if(meta.includes('清收进度查询')){
this.menus.body['数据统计与查询'].push({ name: '清收进度查询', index: '3' }) this.menus.body['数据统计与查询'].push({ name: '清收进度查询', index: '3' })
@ -105,15 +105,18 @@ export default {
computed: { computed: {
liquidate(){ liquidate(){
return this.$store.state.loan.liquidate return this.$store.state.loan.liquidate
},
schedule(){
return this.$store.state.loan.schedule
} }
}, },
methods:{ methods:{
goto(path) { goto(path) {
this.$router.push('/' + path); this.$router.push('/' + path);
}, },
backTo(){ backTo(){// 退
switch (this.showValue) { switch (this.showValue) {
case '0': case '0'://
switch (this.loanStatusHome) { switch (this.loanStatusHome) {
case 1: case 1:
this.goto('workbench') this.goto('workbench')
@ -136,7 +139,7 @@ export default {
} }
break; break;
case '1': case '1'://
switch (this.logStatusHome) { switch (this.logStatusHome) {
case 1: case 1:
this.goto('workbench') this.goto('workbench')
@ -166,7 +169,7 @@ export default {
break; break;
} }
break; break;
case '2': case '2'://
switch (this.liquidate) { switch (this.liquidate) {
case '1': case '1':
this.goto('workbench') this.goto('workbench')
@ -178,18 +181,23 @@ export default {
break; break;
} }
break; break;
case '3': case '3'://
switch (this.schedule) {
case '1':
this.goto('workbench')
break; break;
default: default:
break; break;
} }
break;
}
if(this.showValue == '0'){ if(this.showValue == '0'){
}else if(this.showValue == '1'){ }else if(this.showValue == '1'){
} }
}, },
// //
getIndex(index) { getIndex(index) {

@ -942,7 +942,12 @@
endTime: this.collectionHisEndTime endTime: this.collectionHisEndTime
}); });
res.data.list.map(e =>{ res.data.list.map(e =>{
e.collectionMethod = e.collectionMethod == '1' ? '电话催收' : '上门/外访' let obj ={
"1":'电话催收',
"2":'上门/外访',
"3":"其他"
}
e.collectionMethod = obj[e.collectionMethod]||'未知状态'
}) })
this.collectionHisData = res.data.list this.collectionHisData = res.data.list
this.collectionHisTotals = res.data.totalCount this.collectionHisTotals = res.data.totalCount
@ -1000,7 +1005,8 @@
visitor:data.visitor, visitor:data.visitor,
situationDescription:data.situationDescription, situationDescription:data.situationDescription,
collectionFeedback: res.data.collectionFeedback, collectionFeedback: res.data.collectionFeedback,
enclosureFiles: res.data.enclosureFiles enclosureFiles: res.data.enclosureFiles,
other:res.data.other
} }
this.uploadList = [] this.uploadList = []
if(res.data.enclosureFiles.length>0&&res.data.enclosureFiles[0]){ if(res.data.enclosureFiles.length>0&&res.data.enclosureFiles[0]){

@ -1,9 +1,9 @@
// //
<template> <template>
<div> <div>
<!-- 清收工作完成统计 --> <!-- 清收工作完成统计 -->
<div v-if="liquidate === '1'"> <div v-if="liquidate === '1'">
<div class="mgt20 left-border fz-16"><p class="c-black mgl10">清收工作完成情况统计</p></div> <div class="mgt20 left-border fz-16"><p class="c-black mgl10">清收工作年度情况统计</p></div>
<div class="mgt20 pdb20"> <div class="mgt20 pdb20">
<div class="mgtb20"> <div class="mgtb20">
<div class="flex-center"> <div class="flex-center">
@ -22,7 +22,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" v-if="$router.currentRoute.meta.btn.includes('人员选择')" @click="createList(scope.row)">人员选择</el-button> <el-button type="text" v-if="$router.currentRoute.meta.btn.includes('人员选择')" @click="createList(scope.row)">人员选择</el-button>
<el-button type="text" v-if="$router.currentRoute.meta.btn.includes('统计查看')" @click="[(liquidate = '2'), edit(scope.row, 'watch')]">查看</el-button> <el-button type="text" v-if="$router.currentRoute.meta.btn.includes('统计查看')" @click="[(liquidate = '2'), edit(scope.row, 'watch')]">查看</el-button>
<el-button type="text" v-if="$router.currentRoute.meta.btn.includes('统计编辑')" @click="edit(scope.row)">编辑</el-button> <el-button type="text" v-if="$router.currentRoute.meta.btn.includes('统计编辑')" @click="edit(scope.row)">管理</el-button>
<el-button type="text" v-if="$router.currentRoute.meta.btn.includes('统计删除')" @click="del(scope.row)">删除</el-button> <el-button type="text" v-if="$router.currentRoute.meta.btn.includes('统计删除')" @click="del(scope.row)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -46,7 +46,7 @@
<el-option v-for="item in proportion" :key="item.id" :label="item.label" :value="item.id"></el-option> <el-option v-for="item in proportion" :key="item.id" :label="item.label" :value="item.id"></el-option>
</el-select> </el-select>
<el-input <el-input
placeholder="请输入整数" placeholder="请输入金额(元)"
class="wd20 mglr10" class="wd20 mglr10"
style="min-width: 200px" style="min-width: 200px"
:disabled="!searchStr.proportionSymbol" :disabled="!searchStr.proportionSymbol"
@ -58,7 +58,7 @@
<el-select v-model="searchStr.allAoumntSymbol" placeholder="请选择" clearable @change="search"> <el-select v-model="searchStr.allAoumntSymbol" placeholder="请选择" clearable @change="search">
<el-option v-for="item in proportion" :key="item.id" :label="item.label" :value="item.id"></el-option> <el-option v-for="item in proportion" :key="item.id" :label="item.label" :value="item.id"></el-option>
</el-select> </el-select>
<el-input :disabled="!searchStr.allAoumntSymbol" class="wd20 mglr10" placeholder="清收总额" style="min-width: 200px" v-model="searchStr.allAoumnt" clearable></el-input> <el-input :disabled="!searchStr.allAoumntSymbol" class="wd20 mglr10" placeholder="请输入金额(元)" style="min-width: 200px" v-model="searchStr.allAoumnt" clearable></el-input>
</div> </div>
<div class="flex-center"> <div class="flex-center">
<el-button v-preventReClick type="primary" size="small" round @click="clearOption">清空选项</el-button> <el-button v-preventReClick type="primary" size="small" round @click="clearOption">清空选项</el-button>
@ -75,7 +75,7 @@
<div class="flex-between"> <div class="flex-between">
<div class="flex-center"> <div class="flex-center">
<el-button class="mgl20" v-if="$router.currentRoute.meta.btn.includes('统计导出')" v-preventReClick type="primary" size="small" round @click="statisticsSelection">导出列表</el-button> <el-button class="mgl20" v-if="$router.currentRoute.meta.btn.includes('统计导出列表')" v-preventReClick type="primary" size="small" round @click="statisticsSelection">导出列表</el-button>
<el-radio-group v-model="radio" class="mgl30" @change="radioChange"> <el-radio-group v-model="radio" class="mgl30" @change="radioChange">
<el-radio-button class="ht40" label="依据公司排名"></el-radio-button> <el-radio-button class="ht40" label="依据公司排名"></el-radio-button>
<el-radio-button class="ht40" label="依据小组排名"></el-radio-button> <el-radio-button class="ht40" label="依据小组排名"></el-radio-button>
@ -87,7 +87,7 @@
class="ht40 mgl10 mgr10" class="ht40 mgl10 mgr10"
@keyup.enter.native="annualStatisticsList('search')" @keyup.enter.native="annualStatisticsList('search')"
v-model="searchStr.queryCondition" v-model="searchStr.queryCondition"
placeholder="工号/清收负责人/清收企业" placeholder="工号/清收负责人"
clearable clearable
></el-input> ></el-input>
</div> </div>
@ -119,23 +119,23 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="cash" label="清收现金(元)" align="center" width="150px"> <el-table-column prop="cash" label="清收现金(元)" align="center" width="150px">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="multi-box" v-for="(item, index) in scope.row.cash" :key="index"> <div class="multi-box" v-for="(item, index) in scope.row.cash" :key="index">
{{ item.cash }} {{ item.cash }}
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="asset" label="清收资产(元)" align="center" width="150px"> <el-table-column prop="asset" label="清收资产(元)" align="center" width="150px">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="multi-box" v-for="(item, index) in scope.row.assets" :key="index"> <div class="multi-box" v-for="(item, index) in scope.row.assets" :key="index">
{{ item.asset }} {{ item.assets }}
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="collectionTime" label="回款时间" align="center" width="200px"> <el-table-column prop="collectionTime" label="回款时间" align="center" width="200px">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="backTime" v-for="(item, index) in scope.row.collectionTime" :key="index"> <div class="backTime static multi-box" v-for="(item, index) in scope.row.collectionTime" :key="index">
<el-date-picker <el-date-picker
style="width:180px" style="width:180px"
v-model="item.collectionTime" v-model="item.collectionTime"
@ -158,7 +158,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<div class="ratio" v-show="scope.row.edit"> <div class="ratio" v-show="scope.row.edit">
<div class="top">{{scope.row.totalAmount}}</div> <div class="top">{{scope.row.totalAmount}}</div>
<el-input :disabled="!scope.row.edit" v-model="scope.row.proportion"></el-input> <el-input :disabled="!scope.row.edit" placeholder="输入年度金额指标" v-model="scope.row.proportion"></el-input>
</div> </div>
<div v-if="!scope.row.edit"> <div v-if="!scope.row.edit">
{{scope.row.percent}}% {{scope.row.percent}}%
@ -167,7 +167,7 @@
</el-table-column> </el-table-column>
<el-table-column prop="remark" label="备注" align="center" width="200px"> <el-table-column prop="remark" label="备注" align="center" width="200px">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="backTime" v-for="(item, index) in scope.row.description" :key="index"> <div class="backTime static multi-box" v-for="(item, index) in scope.row.description" :key="index">
<el-input :disabled="!scope.row.edit" v-model="item.description"></el-input> <el-input :disabled="!scope.row.edit" v-model="item.description"></el-input>
</div> </div>
</template> </template>
@ -176,6 +176,7 @@
<el-table-column v-if="!liquidWatch" label="操作" width="300" align="center"> <el-table-column v-if="!liquidWatch" label="操作" width="300" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="yearEdit(scope.row)">{{scope.row.editStr}}</el-button> <el-button type="text" @click="yearEdit(scope.row)">{{scope.row.editStr}}</el-button>
<el-button type="text" v-show="scope.row.edit" @click="[scope.row.edit = false,annualStatisticsList()]">取消</el-button>
<!-- <el-button type="text" @click="history(scope.row)">查看</el-button> --> <!-- <el-button type="text" @click="history(scope.row)">查看</el-button> -->
</template> </template>
</el-table-column> </el-table-column>
@ -193,7 +194,7 @@
<div class="left-border fz-16"><p class="c-black mgl10">年份</p></div> <div class="left-border fz-16"><p class="c-black mgl10">年份</p></div>
<el-date-picker <el-date-picker
:disabled="changeStaffDisabled" :disabled="changeStaffDisabled"
class="mgt10 mgl80" class="mgt10 mgl80 year"
v-model="chooisYear" v-model="chooisYear"
value-format="yyyy" value-format="yyyy"
:picker-options="pickerOptions" :picker-options="pickerOptions"
@ -205,6 +206,7 @@
<div class="tree"> <div class="tree">
<div class="left-border fz-16 mgt20"><p class="c-black mgl10">参与本年度清收排名的人员</p></div> <div class="left-border fz-16 mgt20"><p class="c-black mgl10">参与本年度清收排名的人员</p></div>
<div class="mgl80 mgt20 mgr80" style="border: 1px solid #e6e6e6; border-radius: 15px; overflow: auto; padding: 15px"> <div class="mgl80 mgt20 mgr80" style="border: 1px solid #e6e6e6; border-radius: 15px; overflow: auto; padding: 15px">
<el-checkbox @change="allCheck" v-model="checked" class="mgl20" style="margin-left:23px">全选</el-checkbox>
<el-tree <el-tree
:data="tree" :data="tree"
show-checkbox show-checkbox
@ -288,6 +290,7 @@ export default {
recordArr:[],// , recordArr:[],// ,
changeStaffYear:'', changeStaffYear:'',
changeStaffDisabled:false, changeStaffDisabled:false,
checked:false,
}; };
}, },
watch: { watch: {
@ -296,6 +299,15 @@ export default {
this.getTree() this.getTree()
} }
}, },
liquidate(val){
if(val==2){
console.log('判断为2')
this.liquidateList()
this.annualStatisticsList()
}else{
this.annualList()
}
}
}, },
computed: { computed: {
liquidate:{ liquidate:{
@ -323,10 +335,8 @@ export default {
created() { created() {
this.searchStr = this.$store.state.loan.liquidateSearch this.searchStr = this.$store.state.loan.liquidateSearch
this.annualList() this.annualList()
console.log(this.liquidate,'li') console.log(this.liquidate,this.searchStr,'li')
if(this.liquidate=='2'){ if(this.liquidate=='2'){
console.log('判断为2')
this.liquidateList()
this.annualStatisticsList() this.annualStatisticsList()
} }
}, },
@ -376,6 +386,9 @@ export default {
this.loading = false this.loading = false
}) })
}, },
/* TODO
*
*/
annualStatisticsList(){ annualStatisticsList(){
if(this.searchStr.proportionSymbol&&!this.searchStr.proportion) return this.$message('请输入完成比例整数!') if(this.searchStr.proportionSymbol&&!this.searchStr.proportion) return this.$message('请输入完成比例整数!')
if(this.searchStr.allAoumntSymbol&&!this.searchStr.allAoumnt) return this.$message('请输入已清收总额!') if(this.searchStr.allAoumntSymbol&&!this.searchStr.allAoumnt) return this.$message('请输入已清收总额!')
@ -399,19 +412,22 @@ export default {
if(arr.has(e.jobNumber)){ if(arr.has(e.jobNumber)){
let obj = arr.get(e.jobNumber) let obj = arr.get(e.jobNumber)
obj.enterprise.push({enterprise:e.enterprise,id:e.id}) obj.enterprise.push({enterprise:e.enterprise,id:e.id})
obj.totalAmount += ((+e.cash||0)+(+e.assets))
obj.cash.push({cash:e.cash,id:e.id}) obj.cash.push({cash:e.cash,id:e.id})
obj.assets.push({assets:e.assets,id:e.id}) obj.assets.push({assets:e.assets,id:e.id})
obj.collectionTime.push({collectionTime:e.collectionTime,id:e.id}) obj.collectionTime.push({collectionTime:e.collectionTime,id:e.id})
obj.description.push({description:e.description,id:e.id}) obj.description.push({description:e.description,id:e.id})
obj.totalAmount += e.totalAmount
arr.set(e.jobNumber,obj) arr.set(e.jobNumber,obj)
// console.log(e.totalAmount,`${e.personLiable}`)
}else{ }else{
e.enterprise = [{enterprise:e.enterprise,id:e.id}] e.enterprise = [{enterprise:e.enterprise,id:e.id}]
e.totalAmount = (+e.cash||0)+(+e.assets)
e.cash = [{cash:e.cash,id:e.id}] e.cash = [{cash:e.cash,id:e.id}]
e.assets = [{assets:e.assets,id:e.id}] e.assets = [{assets:e.assets,id:e.id}]
e.collectionTime = [{collectionTime:e.collectionTime,id:e.id}] e.collectionTime = [{collectionTime:e.collectionTime,id:e.id}]
e.description = [{description:e.description,id:e.id}] e.description = [{description:e.description,id:e.id}]
e.totalAmount += e.totalAmount // console.log(e.totalAmount,`${e.personLiable}`)
arr.set(e.jobNumber,e) arr.set(e.jobNumber,e)
} }
}) })
@ -421,7 +437,7 @@ export default {
if(value.totalAmount&&value.proportion){ if(value.totalAmount&&value.proportion){
value.percent = ((value.totalAmount/value.proportion)*100).toFixed(2) value.percent = ((value.totalAmount/value.proportion)*100).toFixed(2)
}else{ }else{
value.percent = '未填写任务额度' value.percent = '未填写年度指标'
} }
this.originalData.push(value) this.originalData.push(value)
} }
@ -439,7 +455,7 @@ export default {
case ">": case ">":
if(this.searchStr.proportion){ if(this.searchStr.proportion){
this.statisticsData = this.statisticsData.filter(e=>{ this.statisticsData = this.statisticsData.filter(e=>{
if(e.percent!=='未填写任务额度') if(e.percent!=='未填写年度指标')
return +e.percent > this.searchStr.proportion return +e.percent > this.searchStr.proportion
}) })
} }
@ -447,7 +463,7 @@ export default {
case "<": case "<":
if(this.searchStr.proportion){ if(this.searchStr.proportion){
this.statisticsData = this.statisticsData.filter(e=>{ this.statisticsData = this.statisticsData.filter(e=>{
if(e.percent!=='未填写任务额度') if(e.percent!=='未填写年度指标')
return +e.percent < this.searchStr.proportion return +e.percent < this.searchStr.proportion
}) })
} }
@ -455,7 +471,7 @@ export default {
case ">=": case ">=":
if(this.searchStr.proportion){ if(this.searchStr.proportion){
this.statisticsData = this.statisticsData.filter(e=>{ this.statisticsData = this.statisticsData.filter(e=>{
if(e.percent!=='未填写任务额度') if(e.percent!=='未填写年度指标')
return +e.percent >= this.searchStr.proportion return +e.percent >= this.searchStr.proportion
}) })
} }
@ -463,7 +479,7 @@ export default {
case "<=": case "<=":
if(this.searchStr.proportion){ if(this.searchStr.proportion){
this.statisticsData = this.statisticsData.filter(e=>{ this.statisticsData = this.statisticsData.filter(e=>{
if(e.percent!=='未填写任务额度') if(e.percent!=='未填写年度指标')
return +e.percent <= this.searchStr.proportion return +e.percent <= this.searchStr.proportion
}) })
} }
@ -471,7 +487,7 @@ export default {
case "=": case "=":
if(this.searchStr.proportion){ if(this.searchStr.proportion){
this.statisticsData = this.statisticsData.filter(e=>{ this.statisticsData = this.statisticsData.filter(e=>{
if(e.percent!=='未填写任务额度') if(e.percent!=='未填写年度指标')
return +e.percent == this.searchStr.proportion return +e.percent == this.searchStr.proportion
}) })
} }
@ -685,7 +701,7 @@ export default {
// //
this.$store.commit('liquidWatch',val) this.$store.commit('liquidWatch',val)
console.log(val,this.liquidWatch,'liquidWatch') console.log(val,this.liquidWatch,'liquidWatch')
this.annualStatisticsList() // this.annualStatisticsList()
}, },
yearEdit(row, val){// yearEdit(row, val){//
if(row.edit != false){ if(row.edit != false){
@ -716,6 +732,7 @@ export default {
personnelSelection(val){// personnelSelection(val){//
return personnelSelection({year:val}).then(res=>{ return personnelSelection({year:val}).then(res=>{
this.treeIds = res.data.list this.treeIds = res.data.list
console.log(this.treeIds,'treeids')
this.ids = res.data.list this.ids = res.data.list
}) })
}, },
@ -726,6 +743,30 @@ export default {
}) })
}) })
},
allCheck(val){
console.log(this.tree,'tree')
if(this.tree.length==0) return
let that = this
function recursion(arr){
if(arr&&arr.length>0){
arr.forEach(e=>{
that.treeIds.push(e.id)
if(e.personnel&&e.personnel.length>0){
recursion(e.personnel)
}
})
}
}
if(val){
recursion(this.tree)
// this.ids = this.treeIds
}else{
this.treeIds = []
}
this.$refs.tree.setCheckedKeys([this.treeIds]);
// console.log(this.treeIds,'ids')
// this.$forceUpdate();
} }
} }
}; };
@ -736,12 +777,15 @@ export default {
padding-bottom: 9px; padding-bottom: 9px;
} }
.multi-box { .multi-box {
border: 1px solid #e6e6e6; // border: 1px solid #e6e6e6;
min-height: 50px; min-height: 50px;
text-align: center; text-align: center;
line-height: 50px; line-height: 50px;
&:nth-child(2n) { &:nth-child(2n) {
background: #e6e6e6; background: #e6e6e6;
border-left: 1px solid #fff;
border-right: 1px solid #fff;
} }
} }
.backTime{ .backTime{
@ -761,8 +805,8 @@ export default {
} }
} }
.dataList{ .dataList{
height: 550px; min-height: 550px;
overflow: auto; // overflow: auto;
position: relative; position: relative;
} }
/deep/ .el-table::before{ /deep/ .el-table::before{
@ -777,4 +821,24 @@ export default {
/deep/ .el-input.is-disabled .el-input__inner{ /deep/ .el-input.is-disabled .el-input__inner{
text-align: center; text-align: center;
} }
/deep/ .el-table--enable-row-transition .el-table__body td{
border: 0.0625rem solid #e6e6e6;
border-top: 0;
}
/deep/ .el-table .cell{
padding-left: 0;
padding-right: 0;
}
/deep/ .el-date-editor.el-input{
width: 100%!important;
background: transparent;
}
/deep/ .top .el-date-editor.el-input{
width: 180px!important;
background: transparent;
}
/deep/ .el-input.is-disabled .el-input__inner{
color:#606266;
background: transparent;
}
</style> </style>

@ -5,41 +5,41 @@
<div class="mgt20 pdb20"> <div class="mgt20 pdb20">
<div class="flex-between mgtb20"> <div class="flex-between mgtb20">
<p class="fz-16 mgr10 font-blue mgl20 nowrap">所在区域</p> <p class="fz-16 mgr10 font-blue mgl20 nowrap">所在区域</p>
<el-select v-model="searchStr.area" placeholder="请选择" clearable @change="search"> <el-select style="width:200px" v-model="searchStr.area" placeholder="请选择" clearable @change="search">
<el-option v-for="item in area" :key="item.id" :label="item.name" :value="item.id"></el-option> <el-option v-for="item in area" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select> </el-select>
<p class="fz-16 mgr10 font-blue mgl20 nowrap">经营情况</p> <p class="fz-16 mgr10 font-blue mgl20 nowrap">经营情况</p>
<el-select v-model="searchStr.operation" placeholder="请选择" clearable @change="search"> <el-select style="width:200px" v-model="searchStr.operation" placeholder="请选择" clearable @change="search">
<el-option v-for="item in circumstance" :key="item.id" :label="item.name" :value="item.id"></el-option> <el-option v-for="item in circumstance" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select> </el-select>
<p class="fz-16 mgr10 font-blue mgl20 nowrap">贷款银行</p> <p class="fz-16 mgr10 font-blue mgl20 nowrap">贷款银行</p>
<el-select v-model="searchStr.bank" placeholder="请选择" clearable @change="search"> <el-select style="width:200px" v-model="searchStr.bank" placeholder="请选择" clearable @change="search">
<el-option v-for="(item,index) in bankData" :key="item.index" :label="item.value" :value="item.value"></el-option> <el-option v-for="(item,index) in bankData" :key="item.index" :label="item.value" :value="item.value"></el-option>
</el-select> </el-select>
<p class="fz-16 mgr10 font-blue mgl20 nowrap">代偿金额</p> <p class="fz-16 mgr10 font-blue mgl20 nowrap">代偿金额</p>
<el-select v-model="searchStr.amountSymbol" placeholder="请选择" clearable @change="search"> <el-select style="width:200px" v-model="searchStr.amountSymbol" placeholder="请选择" clearable @change="search">
<el-option v-for="item in proportion" :key="item.id" :label="item.label" :value="item.id"></el-option> <el-option v-for="item in proportion" :key="item.id" :label="item.label" :value="item.id"></el-option>
</el-select> </el-select>
<el-input <el-input
:disabled="!searchStr.amountSymbol" :disabled="!searchStr.amountSymbol"
placeholder="请输入金额(万)" placeholder="请输入金额(万)"
class="wd20 mglr10" class="wd20 mglr10"
style="max-width: 200px" style="width: 200px"
v-model="searchStr.compensationAmount" v-model="searchStr.compensationAmount"
clearable clearable
></el-input> ></el-input>
</div> </div>
<div class="flex-between mgtb20"> <div class="flex-between mgtb20">
<div class="flex-center"> <div class="flex-center">
<p class="fz-16 mgr10 font-blue mgl20 nowrap">代偿余额</p> <p style="margin-right:15px" class="fz-16 font-blue mgl20 nowrap">代偿余额</p>
<el-select v-model="searchStr.balanceSymbol" placeholder="请选择" clearable @change="search"> <el-select style="width:200px;margin-right:15px" v-model="searchStr.balanceSymbol" placeholder="请选择" clearable @change="search">
<el-option v-for="item in proportion" :key="item.id" :label="item.label" :value="item.id"></el-option> <el-option v-for="item in proportion" :key="item.id" :label="item.label" :value="item.id"></el-option>
</el-select> </el-select>
<el-input <el-input
:disabled="!searchStr.balanceSymbol" :disabled="!searchStr.balanceSymbol"
placeholder="请输入整数" placeholder="请输入金额(万)"
class="wd20 mglr10" class="mglr10"
style="min-width: 200px" style="width:200px"
v-model="searchStr.compensatoryBalance" v-model="searchStr.compensatoryBalance"
clearable clearable
></el-input> ></el-input>
@ -59,7 +59,7 @@
</div> </div>
<div class="flex-center mgr10"> <div class="flex-center mgr10">
<el-button v-preventReClick type="primary" round @click="clearOption">清空选项</el-button> <el-button v-preventReClick type="" round @click="clearOption">清空选项</el-button>
<el-button v-preventReClick type="primary" round @click="quryCollectionProgress">搜索</el-button> <el-button v-preventReClick type="primary" round @click="quryCollectionProgress">搜索</el-button>
</div> </div>
</div> </div>
@ -84,6 +84,7 @@
placeholder="企业名称/清收负责人/业务编号" placeholder="企业名称/清收负责人/业务编号"
clearable clearable
></el-input> ></el-input>
<el-button v-preventReClick type="primary" round @click="quryCollectionProgress">搜索</el-button>
</div> </div>
</div> </div>
@ -104,7 +105,7 @@
<el-table-column prop="phone" label="联系电话" align="center" min-width="100px"></el-table-column> <el-table-column prop="phone" label="联系电话" align="center" min-width="100px"></el-table-column>
<el-table-column prop="bank" label="贷款银行" align="center"></el-table-column> <el-table-column prop="bank" label="贷款银行" align="center"></el-table-column>
<el-table-column prop="guaranteeAmount" label="贷款金额(元)" align="center" min-width="100px"></el-table-column> <el-table-column prop="guaranteeAmount" label="贷款金额(元)" align="center" min-width="100px"></el-table-column>
<el-table-column prop="guaranteeTime" label="贷款期限" align="center" min-width="100px"></el-table-column> <el-table-column prop="guaranteeTime" label="贷款期限(月)" align="center" min-width="100px"></el-table-column>
<el-table-column prop="compensatoryTime" label="代偿时间" align="center" min-width="100px"></el-table-column> <el-table-column prop="compensatoryTime" label="代偿时间" align="center" min-width="100px"></el-table-column>
<el-table-column prop="compensationAmount" label="代偿金额(元)" align="center" min-width="100px"></el-table-column> <el-table-column prop="compensationAmount" label="代偿金额(元)" align="center" min-width="100px"></el-table-column>
<el-table-column prop="compensatoryBalance" label="代偿余额(元)" align="center" min-width="100px"></el-table-column> <el-table-column prop="compensatoryBalance" label="代偿余额(元)" align="center" min-width="100px"></el-table-column>

@ -12,8 +12,7 @@ import '../theme/index.css'
import './assets/css/icon.css'; import './assets/css/icon.css';
import './assets/icon/iconfont.css'; import './assets/icon/iconfont.css';
import './assets/css/font_iiho0e2wbc/iconfont.css' import './assets/css/font_iiho0e2wbc/iconfont.css'
import './components/common/directives'; import './components/common/global.js';// 批量注册全局组件
import './components/common/global.js';
import 'babel-polyfill'; import 'babel-polyfill';
import './util/rem' import './util/rem'
import store from './store' import store from './store'
@ -25,6 +24,15 @@ import { Tree } from 'view-design';// --系统管理-权限管理的树状结构
import preventReClick from './utils/preventReClick.js' // 三秒内禁止再次点击 import preventReClick from './utils/preventReClick.js' // 三秒内禁止再次点击
import roleBtn from '../src/util/buttonRole.js' // 验证按钮权限 import roleBtn from '../src/util/buttonRole.js' // 验证按钮权限
import {Popover,Icon} from 'ant-design-vue' // ant流程图插件 import {Popover,Icon} from 'ant-design-vue' // ant流程图插件
// 使用轻量级的、仅限数字的函数实现
/**
* this.$math.adda,b
* this.$math.subtract(a,b)
* this.$math.multiplya,b
* this.$math.dividea,b
* a和b需要使用this.$math.bignumber();格式化一下数据类型
*/
// import 'ant-design-vue/lib/popover/style'; // import 'ant-design-vue/lib/popover/style';
// import 'ant-design-vue/lib/icon/style'; // import 'ant-design-vue/lib/icon/style';
// import { AntdComponent } from 'ant-design-vue/types/component'; // import { AntdComponent } from 'ant-design-vue/types/component';

@ -109,6 +109,7 @@ router.addRoutes(constantRouterMap)
function createdRouter(item,val) {// 处理成路由接受对象的方法 function createdRouter(item,val) {// 处理成路由接受对象的方法
if(item.menuOrNot===1){ if(item.menuOrNot===1){
let len,com,obj let len,com,obj
// 匹配路由名称对应的component
switch (item.name) { switch (item.name) {
case '待办事项': com = Dashboard case '待办事项': com = Dashboard
break; break;
@ -139,16 +140,18 @@ function createdRouter(item,val) {// 处理成路由接受对象的方法
default:console.log('未匹配到文件地址'); default:console.log('未匹配到文件地址');
break; break;
} }
// 每个路由对应的数据形式
obj = { obj = {
path:item.menuUrl, path:item.menuUrl,
component:com, component:com,
meta:{title:item.name,btn:[]}, meta:{title:item.name,btn:[]},
children:[] children:[]
} }
// 判断是否为主路由文件,进行递归匹配
if(item.children&&item.children.length!==0){ if(item.children&&item.children.length!==0){
len = item.children.length len = item.children.length
for(let i=0;i<len;i++){ for(let i=0;i<len;i++){
obj.meta.btn.push(item.children[i].name)// 权限判断 obj.meta.btn.push(item.children[i].name)// 权限判断,把非主路由name作为鉴权信息
if(item.children[i].menuOrNot!==0){ if(item.children[i].menuOrNot!==0){
// 是页面的话,生成新的obj,赛进父级 // 是页面的话,生成新的obj,赛进父级
obj.children.push(createdRouter(item.children[i])) obj.children.push(createdRouter(item.children[i]))
@ -248,7 +251,7 @@ router.beforeEach(function(to,from,next){
sessionStorage.removeItem('token') sessionStorage.removeItem('token')
} }
if(sessionStorage.getItem('token')){ if(sessionStorage.getItem('token')){
if(!sessionStorage.getItem('success')){ if(!sessionStorage.getItem('success')){// 记录路由是否处理过
getPermission().then(res=>{ getPermission().then(res=>{
if(res.success){ if(res.success){
sessionStorage.setItem('getRouter','true') sessionStorage.setItem('getRouter','true')
@ -284,6 +287,8 @@ router.beforeEach(function(to,from,next){
len = res.data.length, len = res.data.length,
homeMenu = [] homeMenu = []
// console.log(res.data,'路由处理,工作台和非工作台路由匹配') // console.log(res.data,'路由处理,工作台和非工作台路由匹配')
// 此处为主路由页面的操作,通过对应的 createdRouter 函数进行路由数据处理,文件地址分配
for(let i=0;i<len;i++){ for(let i=0;i<len;i++){
//匹配非工作台的路由 //匹配非工作台的路由
if(res.data[i].name!=='客户资源管理系统'&&res.data[i].name!=='担保业务管理系统'&&res.data[i].name!=='保后业务管理系统'){ if(res.data[i].name!=='客户资源管理系统'&&res.data[i].name!=='担保业务管理系统'&&res.data[i].name!=='保后业务管理系统'){
@ -294,6 +299,7 @@ router.beforeEach(function(to,from,next){
permissions.children[1].children.push(createdRouter(res.data[i])) permissions.children[1].children.push(createdRouter(res.data[i]))
} }
} }
// 记录主页顶部大按钮的值(路由主页面权限)
router.app.$options.store.commit("homeMenuData", { homeMenu: homeMenu }); router.app.$options.store.commit("homeMenuData", { homeMenu: homeMenu });
let errPage = [ let errPage = [
{ {
@ -309,7 +315,7 @@ router.beforeEach(function(to,from,next){
router.addRoutes([permissions]) router.addRoutes([permissions])
router.addRoutes(errPage) router.addRoutes(errPage)
sessionStorage.setItem('routerData',JSON.stringify([permissions])) sessionStorage.setItem('routerData',JSON.stringify([permissions]))
// 测试处理过路由否 // 处理过路由否
sessionStorage.setItem('success',true) sessionStorage.setItem('success',true)
} }
}).catch(err=>{ }).catch(err=>{

@ -11,12 +11,10 @@ export default function(){
}else{ }else{
e.component = () => import(`@/pages/${e.path}.vue`) e.component = () => import(`@/pages/${e.path}.vue`)
} }
e.children && e.children.forEach(n => { e.children && e.children.forEach(n => {
n.path && (n.component = () => import(`@/pages/${n.path}.vue`)) n.path && (n.component = () => import(`@/pages/${n.path}.vue`))
}) })
}) })
routes.push({ routes.push({
path: '*', path: '*',
redirect: '404' redirect: '404'

@ -2,7 +2,7 @@ import Vue from 'vue';
import Router from 'vue-router'; import Router from 'vue-router';
import router from './index' import router from './index'
Vue.use(Router); Vue.use(Router);
/* 重置路由 */
const staticRouter = [ const staticRouter = [
{ {
path: '/', path: '/',

@ -35,26 +35,26 @@ const state = {
} }
const getters = { const getters = {
// clear(state){ clear(state){
// return state.letterValue ={ return state.letterValue ={
// businessId: '',//业务id businessId: '',//业务id
// bank: '',//银行 bank: '',//银行
// name: '',//客户名称 name: '',//客户名称
// passingTime: '',//贷审会日期 passingTime: '',//贷审会日期
// loanMoney: '',//担保金额 loanMoney: '',//担保金额
// guaranteeMoney: '',//担保金额转格式 guaranteeMoney: '',//担保金额转格式
// file: '',//会议纪要 file: '',//会议纪要
// loanTern: '',//担保期限 loanTern: '',//担保期限
// auditOpinion: '',//审核意见 auditOpinion: '',//审核意见
// // 上面伟哥定义的 // 上面伟哥定义的
// id:'',//行内rowID id:'',//行内rowID
// status:'',//行内状态 status:'',//行内状态
// } }
// ,state.headerImg ='' ,state.headerImg =''
// ,state.headerImg ='' ,state.headerImg =''
// } }
} }
const mutations = { const mutations = {

@ -27,9 +27,10 @@ const state = {
entering:false,// 是否为录入业务 entering:false,// 是否为录入业务
disabledAll:false,//禁用全部 disabledAll:false,//禁用全部
liquidate:'1',// 控制清收统计页面切换 liquidate:'1',// 控制清收统计页面切换
schedule:'1',// 控制清收进度查询后退
liquidateSearch:{}, liquidateSearch:{},
liquidWatch:false,// 清收统计是否进入查看界面 liquidWatch:false,// 清收统计是否进入查看界面
source:'',// 判断是否为系统流转,且需要判断是否已编辑
} }
const getters = { const getters = {
@ -106,6 +107,9 @@ const mutations = {
liquidWatch(s,val){ liquidWatch(s,val){
s.liquidWatch = val==='watch' s.liquidWatch = val==='watch'
}, },
source(s,val){
s.source = val
},
} }

@ -1,7 +1,7 @@
import Vue from 'vue' import Vue from 'vue'
/** /**
* 权限指令--与行内指令V-IF有冲突不要同时用 * 权限指令--与行内指令V-IF有冲突不要同时用
* 使用v-roleBtn = "'角色值'" * 使用v-roleBtn = "'角色值'"详情前往担保业务查看
**/ **/
const roleBtn = Vue.directive('roleBtn', { const roleBtn = Vue.directive('roleBtn', {
inserted: function (el, binding, vnode) { inserted: function (el, binding, vnode) {

@ -1,3 +1,4 @@
/* 微信扫码登录 */
!(function(a, b, c) { !(function(a, b, c) {
function d(a) { function d(a) {
var c = 'default'; var c = 'default';

@ -1,10 +1,4 @@
import { import {get,post,put,del,Url} from './http';
get,
post,
put,
del,
Url
} from './http';
let host = Url; let host = Url;
export const login = p => post('/apiHrmsAuth/hrms/auth/userlogin/login', p); export const login = p => post('/apiHrmsAuth/hrms/auth/userlogin/login', p);
export const phoneCode = p => get('/apiHrmsAuth/hrms/auth/userlogin/sendCode', p); export const phoneCode = p => get('/apiHrmsAuth/hrms/auth/userlogin/sendCode', p);

@ -297,7 +297,38 @@ export default {
document.body.appendChild(downloadElement); document.body.appendChild(downloadElement);
downloadElement.click(); downloadElement.click();
document.body.removeChild(downloadElement); document.body.removeChild(downloadElement);
},
/**
* @description 格式化金额
* @param number要格式化的数字
* @param decimals保留几位小数 默认0位
* @param decPoint小数点符号 默认.
* @param thousandsSep千分位符号 默认为,
*/
formatMoney: (number, decimals = 0, decPoint = '.', thousandsSep = ',') => {
number = (number + '').replace(/[^0-9+-Ee.]/g, '')
let n = !isFinite(+number) ? 0 : +number
let prec = !isFinite(+decimals) ? 0 : Math.abs(decimals)
let sep = (typeof thousandsSep === 'undefined') ? ',' : thousandsSep
let dec = (typeof decPoint === 'undefined') ? '.' : decPoint
let s = ''
let toFixedFix = function (n, prec) {
let k = Math.pow(10, prec)
return '' + Math.ceil(n * k) / k
}
s = (prec ? toFixedFix(n, prec) : '' + Math.round(n)).split('.')
let re = /(-?\d+)(\d{3})/
while (re.test(s[0])) {
s[0] = s[0].replace(re, '$1' + sep + '$2')
} }
if ((s[1] || '').length < prec) {
s[1] = s[1] || ''
s[1] += new Array(prec - s[1].length + 1).join('0')
}
return s.join(dec)
},
}; };

@ -4,8 +4,9 @@ import axios from 'axios';
import { Message } from 'element-ui' import { Message } from 'element-ui'
import router from '../router/index' import router from '../router/index'
// 服务器的切换
export const Url = 'https://test.feifanhitech.com'// 测试服务器地址 export const Url = 'https://test.feifanhitech.com'// 测试服务器地址
// export const Url = 'https://www.feifanhitech.com';// 非凡 // export const Url = 'https://www.feifanhitech.com';// 非凡(正式服)
// export const Url = 'http://192.168.31.137:8080';//陈赓 // export const Url = 'http://192.168.31.137:8080';//陈赓
axios.defaults.baseURL = Url; axios.defaults.baseURL = Url;
const baseurl = Url const baseurl = Url

Loading…
Cancel
Save