Commit 0e40f4e2 authored by 786817560's avatar 786817560

Merge branch 'ren' into develop

parents b9135066 19a1cbe4
......@@ -2,7 +2,7 @@
* @Description: In User Settings Edit
* @Author: your name
* @Date: 2019-09-27 18:07:12
* @LastEditTime: 2019-10-29 09:54:47
* @LastEditTime: 2019-10-29 20:11:21
* @LastEditors: Please set LastEditors
-->
<template>
......@@ -93,6 +93,10 @@ export default {
Object.assign(vm.info, res.info)
}
})
},
// 根据试算信息查询
getTrial () {
},
dateConverse (date) {
return date.replace(/\//g, '-')
......
......@@ -2,7 +2,7 @@
* @Descrip""/>User Settings Edit
* @Author: your name
* @Date: 2019-09-29 20:31:00
* @LastEditTime: 2019-10-29 09:51:46
* @LastEditTime: 2019-10-29 19:30:27
* @LastEditors: Please set LastEditors
-->
<template>
......@@ -26,53 +26,56 @@
<list-item :item-height="44" class="second-part">
<item>
<div slot="name" class="font-color">商务政策</div>
<input slot="content" placeholder="零手续费产品" >
<span slot="content" >{{ info.product_plan_name }}</span>
</item>
<item>
<div slot="name" class="font-color">设备总价</div>
<input slot="content" v-model="plan_price" placeholder="请输入设备总价">
<input slot="content" v-model="equip_price" placeholder="请输入设备总价">
</item>
<item>
<div slot="name" class="font-color">首付款比例</div>
<input slot="content" placeholder="30%" >
<input slot="content" v-model="info.down_payment_ratio_n" placeholder="30%">
</item>
<item>
<div slot="name" class="font-color">首付款</div>
<input slot="content" placeholder="首付款金额自动填充" readonly>
<span v-if="!equip_price" slot="content">首付款金额自动填充</span>
<span v-if="equip_price" slot="content">{{ equip_price*info.down_payment_ratio_n.replace("%","")/100 | currency }}</span>
</item>
<item>
<div slot="name" class="font-color">保证金比例</div>
<input slot="content" placeholder="10%" >
<input slot="content" v-model="info.deposit_ratio_n" placeholder="请输入保证金比例" >
</item>
<item>
<div slot="name" class="font-color">保证金</div>
<input slot="content" placeholder="保证金金额自动填充" readonly>
<span v-if="!equip_price" slot="content">保证金额自动填充</span>
<span v-if="equip_price" slot="content">{{ equip_price*info.deposit_ratio_n.replace("%","")/100 | currency }}</span>
</item>
<item>
<div slot="name" class="font-color">手续费比例</div>
<input slot="content" placeholder="5%" >
<input slot="content" v-model="info.lease_charge_ratio_n" placeholder="请输入手续费比例" >
</item>
<item>
<div slot="name" class="font-color">手续费</div>
<input slot="content" placeholder="手续费金额自动填充" readonly>
<span v-if="!equip_price" slot="content">手续费金额自动填充</span>
<span v-if="equip_price" slot="content">{{ equip_price*info.lease_charge_ratio_n.replace("%","")/100 | currency }}</span>
</item>
<item>
<div slot="name" class="font-color">预计付款日</div>
<!-- <input slot="content" placeholder="YYYY-MM-DD" readonly> -->
<div slot="content">{{ dates }}</div>
<div slot="content">{{ price_date_to | dateFormat }}</div>
<img src="@/assets/trial/date.png" alt="" class="date-pic" @click="showTime('YYYY-MM-DD')">
</item>
<item :showArrow="true">
<item>
<div slot="name" class="font-color">还款周期</div>
<input slot="content" placeholder="月" >
<input slot="content" v-model="info.annual_pay_times_n" placeholder="月" >
</item>
<item>
<div slot="name" class="font-color">租赁期数</div>
<input slot="content" placeholder="6" >
<input slot="content" v-model="info.lease_times" placeholder="6" >
</item>
<item>
<div slot="name" class="font-color">年利率</div>
<input slot="content" placeholder="6.5%" >
<input slot="content" v-model="info.int_rate_n" placeholder="6.5%" >
</item>
<item :showArrow="true" @click.native="goRepay">
<div slot="name" class="font-color">查看还款计划</div>
......@@ -80,7 +83,7 @@
</list-item>
</h-content>
<bottom-tab class="footer-button">
<tab-button class="approve" @click.native="showModalValue=true">
<tab-button class="approve" @click.native="calculationSave">
试算
</tab-button>
</bottom-tab>
......@@ -92,20 +95,28 @@ export default {
name: 'FinancingDetails',
data () {
return {
info: {},
dates: '',
plan_price: '',
equip_price: '',
price_date_to: '',
product_plan_id: '',
}
},
computed: {},
watch: {},
watch: {
equip_price () {
},
},
beforeRouteEnter (to, from, next) {
if (from.name === 'FinancingTrial') {
next(vm => {
if (from.name === 'FinancingTrial') {
vm.price_date_to = vm.$route.params.price_date_to // 有效日期
vm.plan_price = vm.$route.params.plan_price // 参考价
})
vm.equip_price = vm.$route.params.plan_price // 参考价
vm.product_plan_id = vm.$route.params.product_plan_id
vm.detailsQuery()
}
})
next()
},
created () {
......@@ -124,11 +135,60 @@ export default {
nowDate: (new Date()).format('yyyy-MM-dd'),
format: format,
callback: (date) => {
// alert(date)
vm.dates = date
vm.price_date_to = date
},
})
},
// 试算明细查询
detailsQuery () {
let vm = this
let url = $config.basePath + 'finance_detial'
let param = {
product_plan_id: vm.product_plan_id,
}
vm.hlsPopup.showLoading('数据加载中')
vm.hlsHttp.post(url, param).then(function (res) {
console.log(res)
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
vm.info = res.info
} else {
hlsPopup.showLongCenter(res.message)
}
})
},
// 试算保存
calculationSave () {
if (!this.equip_price) {
hlsPopup.showLongCenter('请输入设备总价')
} else if (!this.price_date_to) {
hlsPopup.showLongCenter('请选择时间')
} else {
let vm = this
let url = $config.basePath + 'prd_calculation_save'
let param = {
'master': {
'product_plan_id': vm.info.product_plan_id,
'equip_price': vm.equip_price,
'down_payment': vm.equip_price * (vm.info.down_payment_ratio_n.replace('%', '') / 100),
'deposit': vm.equip_price * (vm.info.deposit_ratio_n.replace('%', '') / 100),
'lease_charge': vm.equip_price * (vm.info.lease_charge_ratio_n.replace('%', '') / 100),
'due_date': vm.price_date_to,
},
}
vm.hlsPopup.showLoading('试算中,请稍后')
vm.hlsHttp.post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
console.log('.........', res)
if (res.result === 'S') {
hlsPopup.showLongCenter('试算成功')
// vm.info = res.info
} else {
hlsPopup.showLongCenter(res.message)
}
})
}
},
},
}
</script>
......@@ -137,8 +197,8 @@ export default {
.date-pic {
height: 17px;
width: 17px;
margin-top: 13px;
margin-left: 4px;
margin-top: 14px;
margin-left: 6px;
}
.h-header-btn {
img {
......
......@@ -2,7 +2,7 @@
* @Descrip 融资试算
* @Author: your name
* @Date: 2019-09-29 17:09:49
* @LastEditTime: 2019-10-29 09:52:41
* @LastEditTime: 2019-10-29 18:45:37
* @LastEditors: Please set LastEditors
-->
<template>
......@@ -14,30 +14,32 @@
</div>
</h-header>
<h-content>
<section v-for="(item,index) in lists" :key="index">
<div class="descript">
<img src="@/assets/trial/product.png" alt="">
<p class="produc">零手续费产品</p>
</div>
<div class="tario" @click="goDetails">
<div class="tario" @click="goDetails(item.product_plan_id)">
<div class="wrap">
<p class="ratio">
<span>保证金比例</span>
<span>10%</span>
<span>{{ item.deposit_ratio_n }}</span>
</p>
<p>
<span>手续费比例</span>
<span>5%</span>
<span>{{ item.lease_charge_ratio_n }}</span>
</p>
</div>
<div class="wrap">
<p>
<span>年利率</span>
<span>10%</span>
<span>{{ item.int_rate_n }}</span>
</p>
<p>
<span>&nbsp;&nbsp;&nbsp;</span>
<span>12</span>
<span>{{ item.lease_times }}</span>
</p>
</div>
<!-- <div class="pic"> -->
......@@ -45,15 +47,18 @@
<img src="@/assets/distributorSign/righticon.png" alt="">
<!-- </div> -->
</div>
</section>
</h-content>
</h-view></template>
</h-view>
</template>
<script>
export default {
name: 'FinancingTrial',
data () {
return {
lists: [],
plan_price: '',
price_date_to: '',
}
......@@ -61,12 +66,17 @@ export default {
computed: {},
watch: {},
beforeRouteEnter (to, from, next) {
if (from.name === 'ProDetailed') {
next(vm => {
if (from.name === 'ProDetailed') {
vm.price_date_to = vm.$route.params.price_date_to // 有效日期
vm.plan_price = vm.$route.params.plan_price // 参考价
})
vm.calculationQuery()
} else if (from.name === 'HomePage') {
vm.calculationQuery()
vm.price_date_to = '' // 清楚缓存(从收藏带来的数据)
vm.plan_price = ''
}
})
next()
},
activated () {
......@@ -77,15 +87,32 @@ export default {
},
methods:
{
goDetails () {
goDetails (val) {
this.$router.push({
name: 'FinancingDetails',
params: {
product_plan_id: val,
plan_price: this.plan_price,
price_date_to: this.price_date_to,
},
})
},
// 试算查询
calculationQuery () {
let vm = this
let url = $config.basePath + 'prd_calculation_query'
let param = {}
vm.hlsPopup.showLoading('数据加载中')
vm.hlsHttp.post(url, param).then(function (res) {
console.log(res)
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
vm.lists = res.lists
} else {
hlsPopup.showLongCenter(res.message)
}
})
},
},
}
</script>
......@@ -135,6 +162,7 @@ export default {
flex-direction: row;
justify-content: space-around;
background: #fff;
margin-bottom: 8px;
img {
width: 16px;
height: 16px;
......
......@@ -2,7 +2,7 @@
* @Description: In User Settings Edit
* @Author: your name
* @Date: 2019-09-24 12:34:06
* @LastEditTime: 2019-10-15 11:13:36
* @LastEditTime: 2019-10-29 13:37:18
* @LastEditors: Please set LastEditors
*/
export default {
......@@ -21,7 +21,7 @@ export default {
'moduleIcon': require('@/assets/homePage/product-select.png'),
},
{
'moduleState': '',
'moduleState': 'FinancingTrial',
'moduleName': '产品试算',
'moduleIcon': require('@/assets/homePage/product-trial.png'),
},
......
......@@ -2,7 +2,7 @@
* @Description: In User Settings Edit
* @Author: your name
* @Date: 2019-09-24 12:34:06
* @LastEditTime: 2019-10-24 16:52:41
* @LastEditTime: 2019-10-29 19:34:45
* @LastEditors: Please set LastEditors
*/
import Vue from 'vue'
......@@ -171,7 +171,7 @@ export default new Router({
{path: '/financ-details', component: FinancDetails, name: 'FinancDetails', meta: {keepAlive: false}},
// 试算
{path: '/financing-trial', component: FinancingTrial, name: 'FinancingTrial', meta: {keepAlive: true}},
{path: '/financing-details', component: FinancingDetails, name: 'FinancingDetails', meta: {keepAlive: false}},
{path: '/financing-details', component: FinancingDetails, name: 'FinancingDetails', meta: {keepAlive: true}},
// 合同签约
{path: '/contract-signing', component: ContractSigning, name: 'ContractSigning', meta: {keepAlive: true}},
{path: '/contract-detail', component: ContractDetail, name: 'ContractDetail', meta: {keepAlive: true}},
......
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