Commit 40377a76 authored by 李晓兵's avatar 李晓兵

Merge branch 'develop' of https://hel.hand-china.com/xugong/hls-xcmg-vue-app into develop

parents f3c9d234 13dfed87
Pipeline #3928 canceled with stages
<!--
* @Author: your name
* @Date: 2019-10-31 09:49:57
* @LastEditTime: 2019-11-21 16:41:30
* @LastEditTime: 2019-11-27 17:41:11
* @LastEditors: Please set LastEditors
* @Description: 合同查询--记录
* @FilePath:
......@@ -37,31 +37,141 @@
</div>
<!-- 全部合同记录 -->
<scroll
v-if="data!==null"
v-if="data!==null&&selected==='all'"
ref="scroll"
:updateData="[showLists]"
:updateData="[lists]"
:pullUp="true"
@pullingUp="loadMore"
@pullingUp="loadMore('全部',pagenum,lists)"
>
<div class="pay-content">
<div v-for="(item,index) in showLists" :key="index" class="contract-item">
<div v-for="(item,index) in lists" :key="index" class="contract-item">
<div class="header">
<img src="@/assets/contractRepayment/contract.png" alt="">
<h2>{{ item.project_number }}</h2>
<!-- 状态用类名控制 待还款orange,待签约green,还款中blue,已结清black -->
<div v-if="selected === 'all'">
<p v-if="item.contract_status_n === '待首付'" class="green">待首付</p>
<p v-if="item.contract_status_n === '首付还款中'" class="orange">首付还款中</p>
<p v-if="item.contract_status_n === '还款中'" class="blue">还款中</p>
<p v-if="item.contract_status_n === '已结清'" class="black">已结清</p>
</div>
<div v-if="selected !== 'all'">
<p v-if="item.contract_status_n === '待首付'" class="green">待首付</p>
<p v-if="item.contract_status_n === '首付还款中'" class="orange">首付还款中</p>
<p v-if="item.contract_status_n === '还款中'" class="blue">还款中</p>
<p v-if="item.contract_status_n === '已结清'" class="black">已结清</p>
<div class="center">
<div><span>承租人</span><p>{{ item.bp_name }}</p></div>
<div><span>年利率</span><p>{{ item.int_rate_n }}</p></div>
<div><span>期限</span><p>{{ item.lease_times }}</p></div>
<div><span>融资金额</span><p class="bold">{{ parseFloat(item.finance_amount).toFixed(2) | currency }}</p></div>
<span class="red">{{ item.con_overdue_status }}</span>
<section @click="toRepayDetail(item.project_id)">
<img src="@/assets/contractRepayment/view.png" alt="">
<span>查看合同明细</span>
</section>
</div>
</div>
</div>
</scroll>
<!-- 待首付 -->
<scroll
v-if="data!==null&&selected==='one'"
ref="scrollOne"
:updateData="[unSignedLists]"
:pullUp="true"
@pullingUp="loadMore('待首付',unSigned_pagenum,unSignedLists)"
>
<div class="pay-content">
<div v-for="(item,index) in unSignedLists" :key="index" class="contract-item">
<div class="header">
<img src="@/assets/contractRepayment/contract.png" alt="">
<h2>{{ item.project_number }}</h2>
<p class="green">待首付</p>
</div>
<div class="center">
<div><span>承租人</span><p>{{ item.bp_name }}</p></div>
<div><span>年利率</span><p>{{ item.int_rate_n }}</p></div>
<div><span>期限</span><p>{{ item.lease_times }}</p></div>
<div><span>融资金额</span><p class="bold">{{ parseFloat(item.finance_amount).toFixed(2) | currency }}</p></div>
<span class="red">{{ item.con_overdue_status }}</span>
<section @click="toRepayDetail(item.project_id)">
<img src="@/assets/contractRepayment/view.png" alt="">
<span>查看合同明细</span>
</section>
</div>
</div>
</div>
</scroll>
<!-- 首付还款中 -->
<scroll
v-if="data!==null&&selected==='two'"
ref="scrollTwo"
:updateData="[unRepayLists]"
:pullUp="true"
@pullingUp="loadMore('首付还款中',unRepay_pagenum,unRepayLists)"
>
<div class="pay-content">
<div v-for="(item,index) in unRepayLists" :key="index" class="contract-item">
<div class="header">
<img src="@/assets/contractRepayment/contract.png" alt="">
<h2>{{ item.project_number }}</h2>
<p class="orange">首付还款中</p>
</div>
<div class="center">
<div><span>承租人</span><p>{{ item.bp_name }}</p></div>
<div><span>年利率</span><p>{{ item.int_rate_n }}</p></div>
<div><span>期限</span><p>{{ item.lease_times }}</p></div>
<div><span>融资金额</span><p class="bold">{{ parseFloat(item.finance_amount).toFixed(2) | currency }}</p></div>
<span class="red">{{ item.con_overdue_status }}</span>
<section @click="toRepayDetail(item.project_id)">
<img src="@/assets/contractRepayment/view.png" alt="">
<span>查看合同明细</span>
</section>
</div>
</div>
</div>
</scroll>
<!-- 还款中 -->
<scroll
v-if="data!==null&&selected==='three'"
ref="scrollThree"
:updateData="[repayingLists]"
:pullUp="true"
@pullingUp="loadMore('还款中',repaying_pagenum,repayingLists)"
>
<div class="pay-content">
<div v-for="(item,index) in repayingLists" :key="index" class="contract-item">
<div class="header">
<img src="@/assets/contractRepayment/contract.png" alt="">
<h2>{{ item.project_number }}</h2>
<p class="blue">还款中</p>
</div>
<div class="center">
<div><span>承租人</span><p>{{ item.bp_name }}</p></div>
<div><span>年利率</span><p>{{ item.int_rate_n }}</p></div>
<div><span>期限</span><p>{{ item.lease_times }}</p></div>
<div><span>融资金额</span><p class="bold">{{ parseFloat(item.finance_amount).toFixed(2) | currency }}</p></div>
<span class="red">{{ item.con_overdue_status }}</span>
<section @click="toRepayDetail(item.project_id)">
<img src="@/assets/contractRepayment/view.png" alt="">
<span>查看合同明细</span>
</section>
</div>
</div>
</div>
</scroll>
<!-- 已结清 -->
<scroll
v-if="data!==null&&selected==='four'"
ref="scrollFour"
:updateData="[repayedLists]"
:pullUp="true"
@pullingUp="loadMore('已结清',repayed_pagenum,repayedLists)"
>
<div class="pay-content">
<div v-for="(item,index) in repayedLists" :key="index" class="contract-item">
<div class="header">
<img src="@/assets/contractRepayment/contract.png" alt="">
<h2>{{ item.project_number }}</h2>
<p class="black">已结清</p>
</div>
<div class="center">
<div><span>承租人</span><p>{{ item.bp_name }}</p></div>
<div><span>年利率</span><p>{{ item.int_rate_n }}</p></div>
......@@ -92,28 +202,44 @@ export default {
showLists: [],
lists: [], // 全部记录
selected: 'all',
unSignedLists: [], // 待签约
unRepayLists: [], // 待还款
unSignedLists: [], // 待首付
unRepayLists: [], // 首付还款中
repayingLists: [], // 还款中
repayedLists: [], // 已结清
pagenum: 1,
pagenum: 1, // 全部列表页码
unSigned_pagenum: 1, // 待首付页码
unRepay_pagenum: 1, // 首付还款中页码
repaying_pagenum: 1, // 还款中页码
repayed_pagenum: 1, // 已结清页码
searchInput: '',
contract_status_n: '全部', // 全部/待首付/首付还款中/还款中/已结清
unSigned_flag: false,
unRepay_flag: false,
repaying_flag: false,
repayed_flag: false,
}
},
computed: {},
watch: {
selected () {
if (this.selected === 'all') {
this.showLists = this.lists
// this.showLists = this.lists
} else if (this.selected === 'one') {
this.showLists = this.unSignedLists
if (!this.unSigned_flag) {
this.recordQuery('待首付', this.unSignedLists)
}
} else if (this.selected === 'two') {
this.showLists = this.unRepayLists
if (!this.unRepay_flag) {
this.recordQuery('首付还款中', this.unRepayLists)
}
} else if (this.selected === 'three') {
this.showLists = this.repayingLists
if (!this.repaying_flag) {
this.recordQuery('还款中', this.repayingLists)
}
} else if (this.selected === 'four') {
this.showLists = this.repayedLists
if (!this.repayed_flag) {
this.recordQuery('已结清', this.repayedLists)
}
}
},
searchInput () {
......@@ -122,7 +248,7 @@ export default {
clearTimeout(vm.timeout)
}
vm.timeout = setTimeout(() => {
vm.search()
vm.searchs()
}, 1000)
},
},
......@@ -133,7 +259,14 @@ export default {
vm.pagenum = 1
vm.searchInput = ''
vm.contract_status_n = '全部'
vm.recordQuery()
vm.lists = []
vm.unSignedLists = []
vm.unSigned_flag = false
vm.unRepay_flag = false
vm.repaying_flag = false
vm.repayed_flag = false
vm.recordQuery('待首付', vm.unSignedLists)
}
})
},
......@@ -151,53 +284,79 @@ export default {
this.selected = name
},
// 合同记录
recordQuery () {
recordQuery (status, arr) {
let vm = this
let url = $config.basePath + 'con_contract_list'
let param = {
user_phone: window.localStorage.user_phone,
searchInput: vm.searchInput,
pagenum: vm.pagenum,
pagenum: 1,
pagesize: 10,
contract_status_n: vm.contract_status_n,
contract_status_n: status,
}
vm.hlsPopup.showLoading('数据加载中')
vm.hlsHttp.post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
if (res.lists.length === 0) {
if (status === '全部' && res.lists.length === 0) {
vm.data = null
} else {
vm.data = 1
}
vm.lists = res.lists
vm.classify()
// console.log(arr)
// arr = res.lists
res.lists.forEach((data, index, array) => {
arr.push(array[index])
})
if (res.lists.length >= 0 && res.lists.length < 10) {
if (status === '全部') {
vm.$refs.scroll.update(true)
} else if (status === '待首付') {
vm.unSigned_flag = true
vm.$refs.scrollOne.update(true)
} else if (status === '首付还款中') {
vm.unRepay_flag = true
vm.$refs.scrollTwo.update(true)
} else if (status === '还款中') {
vm.repaying_flag = true
vm.$refs.scrollThree.update(true)
} else if (status === '已结清') {
vm.repayed_flag = true
vm.$refs.scrollFour.update(true)
}
} else if (res.lists.length === 10) {
if (status === '全部') {
vm.$refs.scroll.update(false)
} else if (status === '待首付') {
vm.unSigned_flag = true
vm.$refs.scrollOne.update(false)
} else if (status === '首付还款中') {
vm.unRepay_flag = true
vm.$refs.scrollTwo.update(false)
} else if (status === '还款中') {
vm.repaying_flag = true
vm.$refs.scrollThree.update(false)
} else if (status === '已结清') {
vm.repayed_flag = true
vm.$refs.scrollFour.update(false)
}
}
} else {
hlsPopup.showLongCenter(res.message)
}
})
},
// 分类
classify () {
let vm = this
vm.showLists = vm.lists
vm.unSignedLists = vm.lists.filter(item => item.contract_status_n === '待首付') // 待签约
vm.unRepayLists = vm.lists.filter(item => item.contract_status_n === '首付还款中') // 待还款
vm.repayingLists = vm.lists.filter(item => item.contract_status_n === '还款中') // 还款中
vm.repayedLists = vm.lists.filter(item => item.contract_status_n === '已结清') // 已结清
},
loadMore () {
loadMore (status, pageNum, list) {
let vm = this
vm.pagenum++
pageNum++
let url = $config.basePath + 'con_contract_list'
let param = {
user_phone: window.localStorage.user_phone,
searchInput: vm.searchInput,
pagenum: vm.pagenum,
pagenum: pageNum,
pagesize: 10,
contract_status_n: status,
}
vm.hlsPopup.showLoading('数据加载中')
vm.hlsHttp.post(url, param).then(function (res) {
......@@ -206,44 +365,113 @@ export default {
if (res.result === 'S') {
returnData = res.lists
if (returnData.length === 0) {
if (status === '全部') {
vm.$refs.scroll.update(true)
} else if (status === '待首付') {
vm.$refs.scrollOne.update(true)
} else if (status === '首付还款中') {
vm.$refs.scrollTwo.update(true)
} else if (status === '还款中') {
vm.$refs.scrollThree.update(true)
} else if (status === '已结清') {
vm.$refs.scrollFour.update(true)
}
} else if (returnData.length > 0 && returnData.length < 10) {
returnData.forEach((data, index, array) => {
vm.lists.push(array[index])
list.push(array[index])
})
if (status === '全部') {
vm.$refs.scroll.update(true)
} else if (status === '待首付') {
vm.$refs.scrollOne.update(true)
} else if (status === '首付还款中') {
vm.$refs.scrollTwo.update(true)
} else if (status === '还款中') {
vm.$refs.scrollThree.update(true)
} else if (status === '已结清') {
vm.$refs.scrollFour.update(true)
}
} else if (returnData.length === 10) {
returnData.forEach((data, index, array) => {
vm.lists.push(array[index])
list.push(array[index])
})
if (status === '全部') {
vm.$refs.scroll.update(false)
} else if (status === '待首付') {
vm.$refs.scrollOne.update(false)
} else if (status === '首付还款中') {
vm.$refs.scrollTwo.update(false)
} else if (status === '还款中') {
vm.$refs.scrollThree.update(false)
} else if (status === '已结清') {
vm.$refs.scrollFour.update(false)
}
}
vm.classify()
} else {
hlsPopup.showLongCenter(res.message)
}
})
},
search () {
async searchs () {
// await this.search('全部',this.lists)
await this.search('待首付', this.unSignedLists = [])
// await this.search('首付还款中',this.unRepayLists)
// await this.search('还款中',this.repayingLists)
// await this.search('已结清',this.repayedLists)
},
async search (status, list) {
let vm = this
vm.pagenum = 1
let url = $config.basePath + 'con_contract_list'
let param = {
contract_status_n: status,
user_phone: window.localStorage.user_phone,
searchInput: vm.searchInput,
pagenum: vm.pagenum,
pagenum: 1,
pagesize: 10,
}
vm.hlsPopup.showLoading('数据加载中')
vm.hlsHttp.post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
vm.selected = 'all'
if (status === '全部') {
vm.lists = res.lists
vm.classify()
if (vm.lists.length >= 0 && vm.lists.length < 10) {
} else if (status === '待首付') {
vm.unSignedLists = res.lists
} else if (status === '首付还款中') {
vm.unRepayLists = res.lists
} else if (status === '还款中') {
vm.repayingLists = res.lists
} else if (status === '已结清') {
vm.repayedLists = res.lists
}
// vm.unSignedLists = res.lists
// res.lists.forEach((data, index, array) => {
// list.push(array[index])
// })
// console.log(vm.unSignedLists)
if (res.lists.length >= 0 && res.lists.length < 10) {
if (status === '全部') {
vm.$refs.scroll.update(true)
} else if (vm.lists.length === 10) {
} else if (status === '待首付') {
vm.$refs.scrollOne.update(true)
} else if (status === '首付还款中') {
vm.$refs.scrollTwo.update(true)
} else if (status === '还款中') {
vm.$refs.scrollThree.update(true)
} else if (status === '已结清') {
vm.$refs.scrollFour.update(true)
}
} else if (res.lists.length === 10) {
if (status === '全部') {
vm.$refs.scroll.update(false)
} else if (status === '待首付') {
vm.$refs.scrollOne.update(false)
} else if (status === '首付还款中') {
vm.$refs.scrollTwo.update(false)
} else if (status === '还款中') {
vm.$refs.scrollThree.update(false)
} else if (status === '已结清') {
vm.$refs.scrollFour.update(false)
}
}
})
},
......
......@@ -2,7 +2,7 @@
* @Description: In User Settings Edit
* @Author: your name
* @Date: 2019-09-19 09:31:19
* @LastEditTime: 2019-10-29 09:47:54
* @LastEditTime: 2019-11-27 14:51:15
* @LastEditors: Please set LastEditors
-->
<template>
......@@ -39,7 +39,7 @@
</div>
</item>
<item v-if="bp_type_flag">
<div slot="name">{{ typeName }}</div>
<div slot="name" class="required">{{ typeName }}</div>
<input
v-if="bpClass_flag"
slot="content"
......@@ -645,6 +645,7 @@ export default {
'baseInfo.bp_type_n' () {
let vm = this
if (vm.baseInfo.bp_type === 'TENANT' || vm.baseInfo.bp_type === 'GUTA') {
vm.bp_type_flag = true
vm.type = '请输入业务经办员工代码'
vm.typeName = '业务经办人'
vm.bp_type_flag = true
......@@ -723,7 +724,7 @@ export default {
this.multiBpType.bp_type = ''
this.isAddNewType = false
},
selectIdMultiType () {
selectIdMultiType (e) {
let vm = this
let List
if (vm.baseInfo.bp_type === 'TENANT') {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment