Commit 92979b63 authored by 786817560's avatar 786817560

'解决冲突'

parents 5bf94a75 2a0f5606
......@@ -2,7 +2,7 @@
* @Descrip""/>User Settings Edit
* @Author: your name
* @Date: 2019-09-29 20:31:00
* @LastEditTime: 2019-11-05 15:35:42
* @LastEditTime: 2019-11-06 14:58:45
* @LastEditors: Please set LastEditors
-->
<template>
......@@ -54,7 +54,7 @@
<item>
<div slot="name" class="font-color">手续费</div>
<span v-if="!equip_price" slot="content" class="autoColor">手续费金额自动填充</span>
<span v-if="equip_price" slot="content">{{ (equip_price - equip_price*info.down_payment_ratio_n.replace("%","")/100)*(info.lease_charge_ratio_n.replace("%","")/100) | currency }}</span>
<span v-if="equip_price" slot="content">{{ parseFloat((equip_price - equip_price*info.down_payment_ratio_n.replace("%","")/100)*(info.lease_charge_ratio_n.replace("%","")/100)).toFixed(2) | currency }}</span>
</item>
<item>
<div slot="name" class="font-color">保险押金</div>
......@@ -67,7 +67,8 @@
<item>
<div slot="name" class="font-color">首次付款合计</div>
<span v-if="!equip_price" slot="content" class="autoColor">首次付款合计金额自动填充</span>
<span v-if="equip_price" slot="content">{{ equip_price*info.down_payment_ratio_n.replace("%","")/100 + equip_price*info.deposit_ratio_n.replace("%","")/100 + (equip_price - equip_price*info.down_payment_ratio_n.replace("%","")/100)*(info.lease_charge_ratio_n.replace("%","")/100) | currency }}</span>
<!-- 合计 = 首付款+保证金+手续费+GPS费用+保险押金 -->
<span v-if="equip_price" slot="content">{{ parseFloat(equip_price*info.down_payment_ratio_n.replace("%","")/100 + equip_price*info.deposit_ratio_n.replace("%","")/100 + (equip_price - equip_price*info.down_payment_ratio_n.replace("%","")/100)*(info.lease_charge_ratio_n.replace("%","")/100) + Number(gps_fee) + Number(insurance_fee)).toFixed(2) | currency }}</span>
</item>
<item>
<div slot="name" class="font-color">预计付款日</div>
......@@ -75,7 +76,7 @@
<div slot="content" class="autoColor">{{ price_date_to | dateFormat }}</div>
<img src="@/assets/trial/date.png" alt="" class="date-pic" @click="showTime('YYYY-MM-DD')">
</item>
<item>
<item @click.native="periodPull" :show-arrow="true">
<div slot="name" class="font-color">还款周期</div>
<input slot="content" v-model="info.annual_pay_times_n" placeholder="月">
</item>
......@@ -114,9 +115,9 @@
</template>
<script>
export default {
export default {
name: 'FinancingDetails',
data() {
data () {
return {
info: {},
dates: '',
......@@ -125,6 +126,7 @@
quotation_id: '', // 试算成功返回id
trial_flag: false, // 检测是否通过试算
equip_price: null,
periodLists: [], // 还款周期
product_num: '',
price_date_to: '',
product_plan_id: '',
......@@ -132,11 +134,11 @@
},
computed: {},
watch: {
equip_price() {
equip_price () {
},
},
beforeRouteEnter(to, from, next) {
beforeRouteEnter (to, from, next) {
next(vm => {
if (from.name === 'FinancingTrial') {
vm.price_date_to = vm.$route.params.price_date_to // 有效日期
......@@ -145,15 +147,16 @@
vm.product_plan_id = vm.$route.params.product_plan_id
vm.quotation_id = ''
vm.trial_flag = false
vm.insurance_fee = ''
vm.gps_fee = ''
}
vm.detailsQuery()
vm.repayPeriod()
}
})
next()
},
created() {
},
created () {},
methods:
{
// 还款计划
......@@ -171,7 +174,7 @@
},
// 时间选择
showTime(format) {
showTime (format) {
let vm = this
hlsPopup.showTime({
nowDate: (new Date()).format('yyyy-MM-dd'),
......@@ -181,8 +184,48 @@
},
})
},
// 还款周期查询
repayPeriod () {
let vm = this
let url = $config.basePath + 'annual_pay_times_query'
let param = {
product_plan_id: vm.product_plan_id,
}
vm.hlsPopup.showLoading('数据加载中')
vm.hlsHttp.post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
vm.periodLists = res.lists.map(item => {
return {
code: item.annual_pay_times,
code_name: item.annual_pay_times_n,
}
})
} else {
hlsPopup.showLongCenter(res.message)
}
})
},
periodPull () {
let vm = this
vm.hlsPopup.selectList({
list: vm.periodLists, // 下拉列表
code: 'bp_type',
object: {},
returnItem: function (index, obj) {
vm.info.annual_pay_times_n = obj.bp_type_n
},
})
},
// 试算明细查询
detailsQuery() {
detailsQuery () {
let vm = this
let url = $config.basePath + 'finance_detial'
let param = {
......@@ -199,7 +242,7 @@
})
},
// 试算保存
calculationSave() {
calculationSave () {
if (!this.equip_price) {
hlsPopup.showLongCenter('请输入设备总价')
} else if (!this.price_date_to) {
......@@ -230,8 +273,8 @@
})
}
},
},
}
},
}
</script>
<style lang='less' scoped>
#details1 {
......
......@@ -2,7 +2,7 @@
* @Descrip: 产品明细
* @Author: your name
* @Date: 2019-10-15 14:30:00
* @LastEditTime: 2019-11-06 10:36:40
* @LastEditTime: 2019-11-06 13:56:38
* @LastEditors: Please set LastEditors
-->
<template>
......@@ -23,7 +23,7 @@
<!-- <Tab v-if="slide" :tabNums="tabNum" @getTabNum="getTabNum"/> -->
<!-- 基本信息 -->
<h-content v-swipeup="(e)=>vueTouch('上滑',e)" v-swipedown="(e)=>vueTouch('下滑',e)" class="hcontent">
<scroll class="scrolls">
<scroll class="scrolls" ref="scrolls">
<div id="baseInfo" class="base">
......@@ -155,23 +155,33 @@ export default {
}
},
methods:
{
// tab切换
tabCheck (num) {
let scrollContent = document.getElementsByClassName('scrollContent')[0]
if(num === 0){
this.num = 0
console.log('基本信息',document.getElementsByClassName('base')[0].getBoundingClientRect().top)
this.height = document.getElementsByClassName('base')[0].getBoundingClientRect().top - 83
// console.log(height)
scrollContent.style.transition = 'all .3s cubic-bezier(0.165, 0.84, 0.44, 1) 0s'
scrollContent.style.transform = 'translate(0px, -' + this.height + 'px) scale(1) translateZ(0px)'
}else if(num === 1){
this.num = 1
console.log('详情信息',document.getElementsByClassName('prodetail')[0].getBoundingClientRect().top)
this.height = document.getElementsByClassName('prodetail')[0].getBoundingClientRect().top - 83
console.log(this.height)
scrollContent.style.transition = 'all .3s cubic-bezier(0.165, 0.84, 0.44, 1) 0s'
scrollContent.style.transform = 'translate(0px, -' + this.height + 'px) scale(1) translateZ(0px)'
}else{
this.num = 2
console.log('配置信息',document.getElementsByClassName('procnf')[0].getBoundingClientRect().top)
this.height = document.getElementsByClassName('procnf')[0].getBoundingClientRect().top - 83
// console.log(height)
document.getElementsByClassName('scrollContent')[0].style.transition = 'all .3s cubic-bezier(0.165, 0.84, 0.44, 1) 0s'
document.getElementsByClassName('scrollContent')[0].style.transform = 'translate(0px, -' + this.height + 'px) scale(1) translateZ(0px)'
scrollContent.style.transition = 'all .3s cubic-bezier(0.165, 0.84, 0.44, 1) 0s'
scrollContent.style.transform = 'translate(0px, -' + this.height + 'px) scale(1) translateZ(0px)'
}
},
returnGo () {
......@@ -183,7 +193,7 @@ export default {
vueTouch: function (s, e) {
// console.log(s, e)
this.slide = true
this.height = 0
// this.height = 0
// document.getElementsByTagName('hcontent')[0].addEventListener('touchmove',function(e){
// console.log("开始滑动了touchstart");
// let a = document.documentElement.scrollTop;
......@@ -194,11 +204,11 @@ export default {
let procnfGather = document.getElementsByClassName('procnf')[0].getBoundingClientRect() // 配置信息元素集合
let detailGather = document.getElementsByClassName('prodetail')[0].getBoundingClientRect() // 详情信息元素集合
let baseGather = document.getElementsByClassName('base')[0].getBoundingClientRect() // 基本信息元素集合
if (clientHeight - procnfGather.top >= procnfGather.height) {
if (clientHeight - procnfGather.top - 83 >= procnfGather.height) {
this.num = 2
} else if (clientHeight - detailGather.top >= detailGather.height) {
} else if (clientHeight - detailGather.top - 83 >= detailGather.height) {
this.num = 1
} else if (clientHeight - baseGather.top >= baseGather.height) {
} else if (clientHeight - baseGather.top - 83 >= baseGather.height) {
this.num = 0
}
},
......
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