Commit 0e40f4e2 authored by 786817560's avatar 786817560

Merge branch 'ren' into develop

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