Commit c6f097b9 authored by 李晓兵's avatar 李晓兵

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

parents e948e710 a1be51fd
Pipeline #3207 pending with stages
<template> <template>
<h-view id="startList"> <h-view id="confirmList">
<h-header :proportion="[5,1,1]" class="bar-custom"> <h-header :proportion="[5,1,1]" class="bar-custom">
<div slot="left" class="h-header-btn"> <div slot="left" class="h-header-btn">
<img src="@/assets/userBind/arrow.png" @click="$routeGo()" > <img src="@/assets/userBind/arrow.png" @click="$routeGo()" >
...@@ -7,47 +7,40 @@ ...@@ -7,47 +7,40 @@
</div> </div>
</h-header> </h-header>
<Tab @getTabNum="getTabNum" /> <Tab @getTabNum="getTabNum" />
<div class="search"> <div class="search has-header">
<input v-model="keyWord" placeholder="请输入合同号/产品线/承租人名称" > <input v-model="keyWord" placeholder="请输入合同号/产品线/承租人名称" >
</div> </div>
<h-content class="my-content"> <scroll ref="scroll" :updateData="[showList]" :pullUp="true" @pullingUp="getList">
<scroll <div v-for="(item,index) in showList" :key="index" class="item" @click="changePage(item)">
ref="scroll" <div class="left">
:updateData="[showList]" <span>
:pullUp="true" <img src="@/assets/contractStart/icon.png" >
@pullingUp="getList" </span>
> </div>
<div v-for="(item,index) in showList" :key="index" class="item" @click="changePage(item)"> <div class="right">
<div class="left"> <div class="right-top">
<span> <span>合同号</span>
<img src="@/assets/contractStart/icon.png" > <span>{{ item.project_number }}</span>
</span>
</div> </div>
<div class="right"> <div class="right-bottom">
<div class="right-top"> <ul>
<span>合同号</span> <li>
<span>{{ item.project_number }}</span> 承租人
</div> <span>{{ item.bp_name }}</span>
<div class="right-bottom"> </li>
<ul> <li>
<li> 产品线
承租人 <span>{{ item.division_n }}</span>
<span>{{ item.bp_name }}</span> </li>
</li> <li>
<li> 合同金额
产品线 <span class="number">{{ item.total_price|currency }}</span>
<span>{{ item.division_n }}</span> </li>
</li> </ul>
<li>
合同金额
<span class="number">{{ item.total_price|currency }}</span>
</li>
</ul>
</div>
</div> </div>
</div> </div>
</scroll> </div>
</h-content> </scroll>
</h-view> </h-view>
</template> </template>
<script> <script>
...@@ -68,7 +61,7 @@ export default { ...@@ -68,7 +61,7 @@ export default {
} }
}, },
watch: { watch: {
'tabNum': { tabNum: {
handler (newVal, oldVal) { handler (newVal, oldVal) {
if (newVal === 0) { if (newVal === 0) {
this.showList = this.undo this.showList = this.undo
...@@ -82,8 +75,7 @@ export default { ...@@ -82,8 +75,7 @@ export default {
this.search() this.search()
}, },
}, },
created () { created () {},
},
beforeRouteEnter (to, from, next) { beforeRouteEnter (to, from, next) {
next(vm => { next(vm => {
vm.pagenum = 1 vm.pagenum = 1
...@@ -95,7 +87,11 @@ export default { ...@@ -95,7 +87,11 @@ export default {
search () { search () {
let vm = this let vm = this
let randomString = Math.floor(Math.random() * 21) let randomString = Math.floor(Math.random() * 21)
let url = process.env.basePath + 'car_confirm_list_query' + '&index' + `'${randomString}'` let url =
process.env.basePath +
'car_confirm_list_query' +
'&index' +
`'${randomString}'`
let param = { let param = {
user_phone: window.localStorage.getItem('user_phone'), user_phone: window.localStorage.getItem('user_phone'),
searchInput: vm.keyWord, searchInput: vm.keyWord,
...@@ -138,7 +134,11 @@ export default { ...@@ -138,7 +134,11 @@ export default {
getList () { getList () {
let vm = this let vm = this
let randomString = Math.floor(Math.random() * 21) let randomString = Math.floor(Math.random() * 21)
let url = process.env.basePath + 'car_confirm_list_query' + '&index' + `'${randomString}'` let url =
process.env.basePath +
'car_confirm_list_query' +
'&index' +
`'${randomString}'`
let param = { let param = {
user_phone: window.localStorage.getItem('user_phone'), user_phone: window.localStorage.getItem('user_phone'),
pagesize: 10, pagesize: 10,
...@@ -175,14 +175,16 @@ export default { ...@@ -175,14 +175,16 @@ export default {
}, },
} }
</script> </script>
<style lang="less" scoped> <style lang="less">
#startList { #confirmList {
.search { .search {
height: 52px;
background-color: #fff; background-color: #fff;
display: flex; padding: 8px 12px;
align-items: center; position: absolute;
justify-content: center; width: 100%;
z-index: 100;
margin-top: 52px;
margin-bottom: 8px;
input { input {
width: 351px; width: 351px;
height: 36px; height: 36px;
...@@ -210,7 +212,6 @@ export default { ...@@ -210,7 +212,6 @@ export default {
border: 2px solid #bcc6ff; border: 2px solid #bcc6ff;
} }
} }
.my-content {
.item { .item {
width: 359px; width: 359px;
height: 148px; height: 148px;
...@@ -260,12 +261,12 @@ export default { ...@@ -260,12 +261,12 @@ export default {
width: 285px; width: 285px;
margin-top: 10px; margin-top: 10px;
.number { .number {
font-family: Verdana-Bold; font-family: Verdana-Bold;
font-size: 14px; font-size: 14px;
color: #4b4a4b; color: #4b4a4b;
letter-spacing: 0; letter-spacing: 0;
font-weight:bold; font-weight: bold;
} }
li { li {
font-family: PingFangSC-Regular; font-family: PingFangSC-Regular;
font-size: 14px; font-size: 14px;
...@@ -280,6 +281,44 @@ export default { ...@@ -280,6 +281,44 @@ export default {
} }
} }
} }
.content {
position: absolute;
top: 0;
}
.scrollContent {
padding-top: 2.92rem;
padding-bottom: 20px;
}
.tab-style {
width: 100%;
position: absolute;
}
}
.platform-ios {
#confirmList {
.scrollContent {
padding-top: 3.32rem;
}
}
}
@media (device-width: 375px) and (device-height: 812px) and (-webkit-min-device-pixel-ratio: 3) {
.platform-ios {
#confirmList {
.scrollContent {
padding-top: 3.72rem;
}
}
}
}
// iPhoneXR适配
@media (device-width: 414px) and (device-height: 896px) {
.platform-ios {
#confirmList {
.scrollContent {
padding-top: 3.72rem;
}
}
} }
} }
</style> </style>
...@@ -6,27 +6,28 @@ ...@@ -6,27 +6,28 @@
<span>合同还款</span> <span>合同还款</span>
</div> </div>
</h-header> </h-header>
<scroll
<h-content v-if="data!==null" class="pay-content"> v-if="data!==null"
<scroll ref="scroll" :updateData="[lists]" :pullUp="true" @pullingUp="getList"> ref="scroll" :updateData="[lists]" :pullUp="true" class="pay-content has-header"
<div v-for="(item,index) in lists" :key="index" class="contract-item"> @pullingUp="getList">
<div class="header"> <div v-for="(item,index) in lists" :key="index" class="contract-item">
<img src="@/assets/contractRepayment/contract.png" alt=""> <div class="header">
<h2>{{ item.project_number }}</h2> <img src="@/assets/contractRepayment/contract.png" alt="">
<!-- 状态用类名控制 待还款orange,待签约blue,还款中green --> <h2>{{ item.project_number }}</h2>
<p :class="{'green':item.repayment_status==='首付还款中','blue':item.repayment_status==='待首付','orange':item.repayment_status==='还款中','grey':item.repayment_status==='已结清'}">{{ item.repayment_status }}</p> <!-- 状态用类名控制 待还款orange,待签约blue,还款中green -->
</div> <p :class="{'green':item.repayment_status==='首付还款中','blue':item.repayment_status==='待首付','orange':item.repayment_status==='还款中','grey':item.repayment_status==='已结清'}">{{ item.repayment_status }}</p>
<div class="center"> </div>
<div><span>合同金额</span><p>{{ item.total_price|currency }}</p></div> <div class="center">
<div><span>已还金额</span><p class="bold">{{ item.recivied_amount|currency }}</p></div> <div><span>合同金额</span><p>{{ item.total_price|currency }}</p></div>
<span v-if="item.overdue_status==='已逾期'" class="red">已逾期</span> <div><span>已还金额</span><p class="bold">{{ item.recivied_amount|currency }}</p></div>
<section @click="toRepayDetails(item)"> <span v-if="item.overdue_status==='已逾期'" class="red">已逾期</span>
<img src="@/assets/contractRepayment/view.png" alt=""> <section @click="toRepayDetails(item)">
<span>查看合同明细</span> <img src="@/assets/contractRepayment/view.png" alt="">
</section> <span>查看合同明细</span>
</div> </section>
</div> </div>
</scroll></h-content> </div>
</scroll>
<h-content v-if="data===null" class="null"> <h-content v-if="data===null" class="null">
<div class="display"> <div class="display">
<img src="@/assets/contractRepayment/null.png" alt=""> <img src="@/assets/contractRepayment/null.png" alt="">
...@@ -325,6 +326,41 @@ export default { ...@@ -325,6 +326,41 @@ export default {
} }
} }
.content {
position: absolute;
top: 0;
}
.scrollContent {
padding-top: 0.8rem;
padding-bottom: 20px;
}
}
.platform-ios {
#contract-repayment {
.scrollContent {
padding-top: 1.2rem;
}
}
}
@media (device-width: 375px) and (device-height: 812px) and (-webkit-min-device-pixel-ratio: 3) {
.platform-ios {
#contract-repayment {
.scrollContent {
padding-top: 1.6rem;
}
}
}
}
// iPhoneXR适配
@media (device-width: 414px) and (device-height: 896px) {
.platform-ios {
#contract-repayment {
.scrollContent {
padding-top: 1.6rem;
}
}
}
} }
</style> </style>
...@@ -6,48 +6,41 @@ ...@@ -6,48 +6,41 @@
<span>合同发车</span> <span>合同发车</span>
</div> </div>
</h-header> </h-header>
<Tab :fatherTabNum = "tabNum" @getTabNum="getTabNum" /> <Tab :fatherTabNum="tabNum" @getTabNum="getTabNum" />
<div class="search"> <div class="search has-header">
<input v-model="keyWord" placeholder="请输入合同号/产品线/承租人名称" > <input v-model="keyWord" placeholder="请输入合同号/产品线/承租人名称" >
</div> </div>
<h-content class="my-content"> <scroll ref="scroll" :updateData="[lists]" :pullUp="true" @pullingUp="getList">
<scroll ref="scroll" :updateData="[lists]" :pullUp="true" @pullingUp="getList"> <div v-for="(item,index) in showList" :key="index" class="item" @click="changePage(item)">
<div <div class="left">
v-for="(item,index) in showList" <span>
:key="index" <img src="@/assets/contractStart/icon.png" >
class="item" </span>
@click="changePage(item)" </div>
> <div class="right">
<div class="left"> <div class="right-top">
<span> <span>合同号</span>
<img src="@/assets/contractStart/icon.png" > <span>{{ item.project_number }}</span>
</span>
</div> </div>
<div class="right"> <div class="right-bottom">
<div class="right-top"> <ul>
<span>合同号</span> <li>
<span>{{ item.project_number }}</span> 承租人
</div> <span>{{ item.bp_name }}</span>
<div class="right-bottom"> </li>
<ul> <li>
<li> 产品线
承租人 <span>{{ item.division_n }}</span>
<span>{{ item.bp_name }}</span> </li>
</li> <li>
<li> 合同金额
产品线 <span class="number">{{ item.total_price|currency }}</span>
<span>{{ item.division_n }}</span> </li>
</li> </ul>
<li>
合同金额
<span class="number">{{ item.total_price|currency }}</span>
</li>
</ul>
</div>
</div> </div>
</div> </div>
</scroll> </div>
</h-content> </scroll>
<bottom-tab> <bottom-tab>
<tab-button class="add" @click.native="goAdd">新增发车</tab-button> <tab-button class="add" @click.native="goAdd">新增发车</tab-button>
</bottom-tab> </bottom-tab>
...@@ -94,13 +87,16 @@ export default { ...@@ -94,13 +87,16 @@ export default {
this.search() this.search()
}, },
}, },
created () { created () {},
},
methods: { methods: {
search () { search () {
let vm = this let vm = this
let randomString = Math.floor(Math.random() * 21) let randomString = Math.floor(Math.random() * 21)
let url = process.env.basePath + 'car_apply_list_query' + '&index' + `'${randomString}'` let url =
process.env.basePath +
'car_apply_list_query' +
'&index' +
`'${randomString}'`
let param = { let param = {
user_phone: window.localStorage.getItem('user_phone'), user_phone: window.localStorage.getItem('user_phone'),
searchInput: vm.keyWord, searchInput: vm.keyWord,
...@@ -120,7 +116,9 @@ export default { ...@@ -120,7 +116,9 @@ export default {
vm.done = [] vm.done = []
vm.tabNum = 0 vm.tabNum = 0
vm.undo = vm.lists.filter(i => { vm.undo = vm.lists.filter(i => {
return i.car_start_status === 'REJECTED' || i.car_start_status === 'NEW' return (
i.car_start_status === 'REJECTED' || i.car_start_status === 'NEW'
)
}) })
vm.done = vm.lists.filter(i => { vm.done = vm.lists.filter(i => {
return i.car_start_status === 'APPROVED' return i.car_start_status === 'APPROVED'
...@@ -149,7 +147,11 @@ export default { ...@@ -149,7 +147,11 @@ export default {
getList () { getList () {
let vm = this let vm = this
let randomString = Math.floor(Math.random() * 21) let randomString = Math.floor(Math.random() * 21)
let url = process.env.basePath + 'car_apply_list_query' + '&index' + `'${randomString}'` let url =
process.env.basePath +
'car_apply_list_query' +
'&index' +
`'${randomString}'`
let param = { let param = {
user_phone: window.localStorage.getItem('user_phone'), user_phone: window.localStorage.getItem('user_phone'),
pagesize: 10, pagesize: 10,
...@@ -186,14 +188,16 @@ export default { ...@@ -186,14 +188,16 @@ export default {
}, },
} }
</script> </script>
<style lang="less" scoped> <style lang="less">
#startList { #startList {
.search { .search {
height: 52px;
background-color: #fff; background-color: #fff;
display: flex; padding: 8px 12px;
align-items: center; position: absolute;
justify-content: center; width: 100%;
z-index: 100;
margin-top: 52px;
margin-bottom: 8px;
input { input {
width: 351px; width: 351px;
height: 36px; height: 36px;
...@@ -221,72 +225,70 @@ export default { ...@@ -221,72 +225,70 @@ export default {
border: 2px solid #bcc6ff; border: 2px solid #bcc6ff;
} }
} }
.my-content { .item {
.item { width: 359px;
width: 359px; height: 148px;
height: 148px; background-color: #fff;
background-color: #fff; border-radius: 2px;
border-radius: 2px; margin: 0 auto;
margin: 0 auto; margin-top: 9px;
margin-top: 9px; .left {
.left { width: 15%;
width: 15%; height: 100%;
height: 100%; float: left;
float: left; span {
span { display: block;
display: block; width: 30px;
width: 30px; height: 30px;
height: 30px; background-color: #e8e9ed;
background-color: #e8e9ed; border-radius: 8px;
border-radius: 8px; display: flex;
display: flex; align-items: center;
align-items: center; justify-content: center;
justify-content: center; margin-left: 10px;
margin-left: 10px; margin-top: 8px;
margin-top: 8px; img {
img { width: 11px;
width: 11px; height: 14px;
height: 14px; }
} }
}
.right {
height: 100%;
width: 85%;
float: right;
.right-top {
width: 285px;
height: 45px;
font-family: PingFangSC-Semibold;
font-size: 15px;
color: #4b4a4b;
letter-spacing: 0;
line-height: 45px;
border-bottom: 1px solid #f3f3f7;
span:last-child {
float: right;
} }
} }
.right { .right-bottom {
height: 100%; width: 285px;
width: 85%; margin-top: 10px;
float: right; .number {
.right-top { font-family: Verdana-Bold;
width: 285px; font-size: 14px;
height: 45px;
font-family: PingFangSC-Semibold;
font-size: 15px;
color: #4b4a4b; color: #4b4a4b;
letter-spacing: 0; letter-spacing: 0;
line-height: 45px; font-weight: bold;
border-bottom: 1px solid #f3f3f7;
span:last-child {
float: right;
}
} }
.right-bottom { li {
width: 285px; font-family: PingFangSC-Regular;
margin-top: 10px; font-size: 14px;
.number { color: #4b4a4b;
font-family: Verdana-Bold; letter-spacing: 0;
font-size: 14px; height: 30px;
color: #4b4a4b; width: 100%;
letter-spacing: 0; span {
font-weight: bold; float: right;
}
li {
font-family: PingFangSC-Regular;
font-size: 14px;
color: #4b4a4b;
letter-spacing: 0;
height: 30px;
width: 100%;
span {
float: right;
}
} }
} }
} }
...@@ -296,5 +298,45 @@ export default { ...@@ -296,5 +298,45 @@ export default {
color: #fff; color: #fff;
background-color: #0041c4; background-color: #0041c4;
} }
.content {
position: absolute;
top: 0;
}
.scrollContent {
padding-top: 2.92rem;
padding-bottom: 20px;
}
.tab-style {
width: 100%;
position: absolute;
}
}
.platform-ios {
#startList {
.scrollContent {
padding-top: 3.32rem;
}
}
}
@media (device-width: 375px) and (device-height: 812px) and (-webkit-min-device-pixel-ratio: 3) {
.platform-ios {
#startList {
.scrollContent {
padding-top: 3.72rem;
}
}
}
}
// iPhoneXR适配
@media (device-width: 414px) and (device-height: 896px) {
.platform-ios {
#startList {
.scrollContent {
padding-top: 3.72rem;
}
}
}
} }
</style> </style>
...@@ -15,18 +15,18 @@ ...@@ -15,18 +15,18 @@
<Tab @getTabNum="getTabNum"/> <Tab @getTabNum="getTabNum"/>
<div class="hinput"> <div class="hinput">
<div class="search-box"> <div class="search-box">
<input type="text" placeholder="请输入合同号/承租人名称"> <input v-model="searchInput" type="text" placeholder="请输入合同号/承租人名称">
<img src="@/assets/distributorSign/search.png" alt=""> <img src="@/assets/distributorSign/search.png" alt="">
</div> </div>
</div> </div>
<scroll <scroll
v-if="tabNum === 0"
ref="scroll" ref="scroll"
:updateData="[submitLists]" :updateData="[showLists]"
:pullUp="true" :pullUp="true"
@pullingUp="loadMore"
> >
<div class="wrap"> <div class="wrap">
<div v-for="(item,index) in submitLists" :key="index" class="contract-lists" > <div v-for="(item,index) in showLists" :key="index" class="contract-lists" >
<div class="pro-code" @click="goDetails(item)"> <div class="pro-code" @click="goDetails(item)">
<img src="@/assets/distributorSign/fileIcon.png" alt="" class="file-icon"> <img src="@/assets/distributorSign/fileIcon.png" alt="" class="file-icon">
<p> <p>
...@@ -43,32 +43,6 @@ ...@@ -43,32 +43,6 @@
</div> </div>
</div> </div>
</scroll> </scroll>
<scroll
v-if="tabNum === 1"
ref="scrollList"
:updateData="[approvedLists]"
:pullUp="true"
>
<div class="wrap">
<div v-for="(item,index) in approvedLists" :key="index" class="contract-lists" >
<div class="pro-code" @click="goDetails(item)">
<img src="@/assets/distributorSign/fileIcon.png" alt="" class="file-icon">
<p>
<span>合同号</span>
<span>{{ item.project_number }}</span>
</p>
<img src="@/assets/distributorSign/goDetails.png" alt="" class="arrow">
</div>
<div class="box">
<div><p>承租人</p><p>{{ item.bp_name }}</p></div>
<div><p>合同租金</p><p class="money">{{ item.total_price|currency }}</p></div>
<div><p>申请时间</p><p>{{ dateConverse(item.confirm_start_date) }}</p></div>
</div>
</div>
</div>
</scroll>
</h-view> </h-view>
</template> </template>
...@@ -81,13 +55,38 @@ export default { ...@@ -81,13 +55,38 @@ export default {
}, },
data () { data () {
return { return {
tabNum: 0, tabNum: null,
pagenum: 1,
searchInput: '',
lists: [], lists: [],
showLists: [],
submitLists: [], submitLists: [],
approvedLists: [], approvedLists: [],
} }
}, },
watch: {
'tabNum': {
handler (newVal, oldVal) {
if (newVal === 0) {
this.showLists = this.submitLists
} else if (newVal === 1) {
this.showLists = this.approvedLists
}
},
immediate: true,
},
searchInput () {
let vm = this
if (vm.timeout) {
clearTimeout(vm.timeout)
}
vm.timeout = setTimeout(() => {
vm.search()
}, 1000)
},
},
created () { created () {
this.tabNum = 0
this.getLists() this.getLists()
}, },
methods: { methods: {
...@@ -96,25 +95,99 @@ export default { ...@@ -96,25 +95,99 @@ export default {
let vm = this let vm = this
let url = $config.basePath + 'prj_confirm_list_query' let url = $config.basePath + 'prj_confirm_list_query'
let param = { let param = {
pagesize: 10,
pagenum: vm.pagenum,
searchInput: vm.searchInput,
user_phone: window.localStorage.user_phone, user_phone: window.localStorage.user_phone,
} }
vm.hlsPopup.showLoading('数据加载中') vm.hlsPopup.showLoading('数据加载中')
vm.hlsHttp.post(url, param).then(function (res) { vm.hlsHttp.post(url, param).then(function (res) {
vm.hlsPopup.hideLoading() vm.hlsPopup.hideLoading()
if (res.result === 'S') { if (res.result === 'S') {
vm.lists = res.lists
vm.submitLists = res.lists.filter(item => item.confirm_status === 'SUBMIT') vm.submitLists = res.lists.filter(item => item.confirm_status === 'SUBMIT')
vm.approvedLists = res.lists.filter(item => item.confirm_status === 'APPROVED') vm.approvedLists = res.lists.filter(item => item.confirm_status === 'APPROVED')
if (vm.submitLists.length > 0 && vm.submitLists.length < 10) { vm.showLists = vm.submitLists
if (res.lists.length > 0 && res.lists.length < 10) {
vm.$refs.scroll.update(true) vm.$refs.scroll.update(true)
} else if (res.lists.length === 10) {
vm.$refs.scroll.update(false)
} }
if (vm.approvedLists.length > 0 && vm.approvedLists.length < 10) { } else {
vm.$refs.scrollList.update(true) hlsPopup.showLongCenter(res.message)
}
})
},
loadMore () {
let vm = this
vm.pagenum++
let url = $config.basePath + 'prj_confirm_list_query'
let param = {
user_phone: window.localStorage.user_phone,
pagesize: 10,
pagenum: vm.pagenum,
searchInput: vm.searchInput,
}
vm.hlsPopup.showLoading('数据加载中')
vm.hlsHttp.post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
let returnData = []
if (res.result === 'S') {
returnData = res.lists
if (returnData.length === 0) {
vm.$refs.scroll.update(true)
} else if (returnData.length > 0 && returnData.length < 10) {
returnData.forEach((data, index, array) => {
vm.lists.push(array[index])
})
vm.$refs.scroll.update(true)
} else if (returnData.length === 10) {
returnData.forEach((data, index, array) => {
vm.lists.push(array[index])
})
vm.$refs.scroll.update(false)
}
vm.submitLists = vm.lists.filter(item => item.confirm_status === 'SUBMIT')
vm.approvedLists = vm.lists.filter(item => item.confirm_status === 'APPROVED')
if (vm.tabNum === 0) {
vm.showLists = vm.submitLists
} else {
vm.showLists = vm.approvedLists
} }
} else { } else {
hlsPopup.showLongCenter(res.message) hlsPopup.showLongCenter(res.message)
} }
}) })
}, },
search () {
let vm = this
vm.pagenum = 1
let url = $config.basePath + 'prj_confirm_list_query'
let param = {
user_phone: window.localStorage.user_phone,
pagesize: 10,
pagenum: vm.pagenum,
searchInput: vm.searchInput,
}
vm.hlsPopup.showLoading('数据加载中')
vm.hlsHttp.post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
vm.lists = res.lists
vm.submitLists = vm.lists.filter(item => item.confirm_status === 'SUBMIT')
vm.approvedLists = vm.lists.filter(item => item.confirm_status === 'APPROVED')
if (vm.tabNum === 0) {
vm.showLists = vm.submitLists
} else {
vm.showLists = vm.approvedLists
}
if (vm.lists.length >= 0 && vm.lists.length < 10) {
vm.$refs.scroll.update(true)
} else if (vm.lists.length === 10) {
vm.$refs.scroll.update(false)
}
})
},
goDetails (item) { goDetails (item) {
window.sessionStorage.setItem('confirm_id', item.confirm_id) window.sessionStorage.setItem('confirm_id', item.confirm_id)
window.sessionStorage.setItem('bp_class', item.bp_class) window.sessionStorage.setItem('bp_class', item.bp_class)
......
...@@ -59,40 +59,40 @@ ...@@ -59,40 +59,40 @@
</template> </template>
<script> <script>
export default { export default {
name: 'FinancingTrial', name: 'FinancingTrial',
data() { data () {
return { return {
lists: [], lists: [],
plan_price: '', plan_price: '',
price_date_to: '', price_date_to: '',
}
},
computed: {},
watch: {},
beforeRouteEnter (to, from, next) {
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('collect')
} else if (from.name === 'HomePage') {
vm.calculationQuery()
vm.price_date_to = '' // 清除缓存(从收藏带来的数据)
vm.plan_price = ''
} }
}, })
computed: {}, next()
watch: {}, },
beforeRouteEnter(to, from, next) { activated () {
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('collect')
} else if (from.name === 'HomePage') {
vm.calculationQuery()
vm.price_date_to = '' // 清除缓存(从收藏带来的数据)
vm.plan_price = ''
}
})
next()
},
activated() {
}, },
created() { created () {
}, },
methods: methods:
{ {
goDetails(val) { goDetails (val) {
this.$router.push({ this.$router.push({
name: 'FinancingDetails', name: 'FinancingDetails',
params: { params: {
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
}) })
}, },
// 试算查询 // 试算查询
calculationQuery(val) { calculationQuery (val) {
let vm = this let vm = this
if (val) { if (val) {
let url = $config.basePath + 'prd_product_calculation_query' let url = $config.basePath + 'prd_product_calculation_query'
...@@ -140,7 +140,7 @@ ...@@ -140,7 +140,7 @@
} }
}, },
}, },
} }
</script> </script>
<style lang='less'> <style lang='less'>
#trial { #trial {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Descrip: 产品明细 * @Descrip: 产品明细
* @Author: your name * @Author: your name
* @Date: 2019-10-15 14:30:00 * @Date: 2019-10-15 14:30:00
* @LastEditTime: 2019-11-14 15:19:39 * @LastEditTime: 2019-11-20 14:44:52
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
--> -->
<template> <template>
...@@ -22,62 +22,64 @@ ...@@ -22,62 +22,64 @@
</div> </div>
<!-- 基本信息 --> <!-- 基本信息 -->
<h-content v-swipeup="(e)=>vueTouch('上滑',e)" v-swipedown="(e)=>vueTouch('下滑',e)" class="hcontent"> <!-- <h-content v-swipeup="(e)=>vueTouch('上滑',e)" v-swipedown="(e)=>vueTouch('下滑',e)" class="hcontent"> -->
<scroll ref="scrolls" :listenScroll="true" class="scrolls" @scroll="startScroll"> <scroll
<!-- 基本信息 --> v-swipeup="(e)=>vueTouch('上滑',e)" v-swipedown="(e)=>vueTouch('下滑',e)" ref="scrolls" :listenScroll="true"
<div id="baseInfo" class="base"> class="scrolls" @scroll="startScroll">
<swipe :interval="5000" class="hls-swipe"> <!-- 基本信息 -->
<swipe-item v-for="(item,index) in picLists" :key="index" class="hls-swipe"> <div id="baseInfo" class="base">
<img :src="item.url" alt=""> <swipe :interval="5000" class="hls-swipe">
</swipe-item> <swipe-item v-for="(item,index) in picLists" :key="index" class="hls-swipe">
</swipe> <img :src="item.url" alt="">
<div class="base-content"> </swipe-item>
<div class="top-code"> </swipe>
<div>参数项 &nbsp;{{ baseInfo.product_code }}</div> <div class="base-content">
<div>{{ baseInfo.division_n }}</div> <div class="top-code">
<div>参数项 &nbsp;{{ baseInfo.product_code }}</div>
<div>{{ baseInfo.division_n }}</div>
</div>
<div class="pro-name">{{ baseInfo.product_name }}</div>
<div class="pro-price">
<p>参考价 <span class="prices">{{ baseInfo.plan_price | currency }}</span></p>
<p class="dates">价格有效期 &nbsp;{{ baseInfo.price_date_to | dateFormat }}</p>
</div>
<div class="agent">
<div class="items">
<img src="@/assets/productQuery/agent.png" alt="">
<p>{{ baseInfo.agent_bp_name }}</p>
</div>
<div class="items">
<img src="@/assets/productQuery/address.png" alt="">
<p>{{ baseInfo.business_address }} .{{ baseInfo.province_name }}</p>
</div> </div>
<div class="pro-name">{{ baseInfo.product_name }}</div> <div class="items">
<div class="pro-price"> <img src="@/assets/productQuery/call.png" alt="">
<p>参考价 <span class="prices">{{ baseInfo.plan_price | currency }}</span></p> <p>{{ baseInfo.phone }}</p>
<p class="dates">价格有效期 &nbsp;{{ baseInfo.price_date_to | dateFormat }}</p>
</div> </div>
<div class="agent"> <div class="items">
<div class="items"> <img src="@/assets/productQuery/house.png" alt="">
<img src="@/assets/productQuery/agent.png" alt=""> <p>{{ baseInfo.factory_bp_name }}</p>
<p>{{ baseInfo.agent_bp_name }}</p>
</div>
<div class="items">
<img src="@/assets/productQuery/address.png" alt="">
<p>{{ baseInfo.business_address }} .{{ baseInfo.province_name }}</p>
</div>
<div class="items">
<img src="@/assets/productQuery/call.png" alt="">
<p>{{ baseInfo.phone }}</p>
</div>
<div class="items">
<img src="@/assets/productQuery/house.png" alt="">
<p>{{ baseInfo.factory_bp_name }}</p>
</div>
</div> </div>
</div> </div>
</div> </div>
</div>
<!-- 商品详情 --> <!-- 商品详情 -->
<div id="prodetail" ref="detail" class="pro-details prodetail"> <div id="prodetail" ref="detail" class="pro-details prodetail">
<div class="equipment-list">商品详情</div> <div class="equipment-list">商品详情</div>
<div v-for="item in picLists" :key="item.product_attachment_id" class="proPic"> <div v-for="item in picLists" :key="item.product_attachment_id" class="proPic">
<img :src="item.url" alt=""> <img :src="item.url" alt="">
</div>
</div>
<!-- 产品配置 -->
<div id="procfg" class="pro-details procnf">
<div class="equipment-list">产品配置</div>
<div class="table-wrap" v-html="confgInfo.product_properties"/>
</div> </div>
</scroll>
</h-content> </div>
<!-- 产品配置 -->
<div id="procfg" class="pro-details procnf">
<div class="equipment-list">产品配置</div>
<div class="table-wrap" v-html="confgInfo.product_properties"/>
</div>
</scroll>
<!-- </h-content> -->
<bottom-tab class="footer-button"> <bottom-tab class="footer-button">
<tab-button <tab-button
:class="{bgcolor: bgc_flag}" class="butt" :class="{bgcolor: bgc_flag}" class="butt"
...@@ -131,14 +133,14 @@ export default { ...@@ -131,14 +133,14 @@ export default {
}, },
beforeRouteEnter (to, from, next) { beforeRouteEnter (to, from, next) {
debugger // debugger
if (from.name === 'ProductList' || from.name === 'MyProductList' || from.name === 'HomePage') { if (from.name === 'ProductList' || from.name === 'MyProductList' || from.name === 'HomePage') {
next(vm => { next(vm => {
vm.baseInfo = {} vm.baseInfo = {}
vm.confgInfo = {} vm.confgInfo = {}
vm.detailInfo = {} vm.detailInfo = {}
vm.picLists = [] vm.picLists = []
vm.tabNum = 0 vm.num = 0
vm.slide = false vm.slide = false
vm.product_id = vm.$route.params.product_id vm.product_id = vm.$route.params.product_id
vm.bp_id = vm.$route.params.bp_id vm.bp_id = vm.$route.params.bp_id
...@@ -187,9 +189,9 @@ export default { ...@@ -187,9 +189,9 @@ export default {
let baseGather = document.getElementsByClassName('base')[0].getBoundingClientRect() // 基本信息元素集合 let baseGather = document.getElementsByClassName('base')[0].getBoundingClientRect() // 基本信息元素集合
if (clientHeight - procnfGather.top >= procnfGather.height) { if (clientHeight - procnfGather.top >= procnfGather.height) {
this.num = 2 this.num = 2
} else if (clientHeight - detailGather.top >= detailGather.height) { } else if (detailGather.top <= clientHeight / 2) {
this.num = 1 this.num = 1
} else if (-(baseGather.top) <= baseGather.height / 2) { } else if (-(baseGather.top) <= baseGather.height / 2 || detailGather.top > clientHeight / 2) {
this.num = 0 this.num = 0
} }
}, },
...@@ -319,6 +321,9 @@ export default { ...@@ -319,6 +321,9 @@ export default {
</script> </script>
<style lang='less'> <style lang='less'>
#detailed { #detailed {
.scrollContent {
padding-bottom: 90px;
}
.hls-swipe { .hls-swipe {
background: #fff; background: #fff;
img { img {
......
...@@ -11,46 +11,44 @@ ...@@ -11,46 +11,44 @@
<span>产品列表</span> <span>产品列表</span>
</div> </div>
</h-header> </h-header>
<h-content> <div class="hinput">
<div class="hinput"> <div class="search-box">
<div class="search-box"> <input v-model="searchInput" type="text" placeholder="请输入经销商/产品名称/参数项">
<input v-model="searchInput" type="text" placeholder="请输入经销商/产品名称/参数项"> <img src="@/assets/distributorSign/search.png" alt="">
<img src="@/assets/distributorSign/search.png" alt="">
</div>
</div> </div>
<scroll </div>
ref="scroll" <scroll
:updateData="[lists]" ref="scroll"
:pullUp="true" :updateData="[lists]"
@pullingUp="loadMore" :pullUp="true"
> @pullingUp="loadMore"
>
<div class="division-box"> <div class="division-box">
<list-item v-for="(item,index) in lists" :key="index"> <list-item v-for="(item,index) in lists" :key="index">
<item :proportion="[1,4]" @click.native="goDetailed(item.product_id,item.collect_status,item.bp_id)"> <item :proportion="[1,4]" @click.native="goDetailed(item.product_id,item.collect_status,item.bp_id)">
<div slot="name" class="item-pic"> <div slot="name" class="item-pic">
<img :src="item.url" alt=""> <img :src="item.url" alt="">
</div>
<div slot="content" class="item-content">
<div class="pro-name">
<p>{{ item.product_name }}</p>
<img class="arrow" src="@/assets/productQuery/getIn.png" alt="" >
</div> </div>
<div slot="content" class="item-content"> <div class="centers">
<div class="pro-name"> <p class="firsts1">{{ item.bp_type_n }}</p>
<p>{{ item.product_name }}</p> <p class="seconds1">{{ item.bp_name }}</p>
<img class="arrow" src="@/assets/productQuery/getIn.png" alt="" >
</div>
<div class="centers">
<p class="firsts1">{{ item.bp_type_n }}</p>
<p class="seconds1">{{ item.bp_name }}</p>
</div>
<div class="centers">
<p class="firsts1">参数项</p>
<p class="seconds1">{{ item.product_code }}</p>
</div>
</div> </div>
</item> <div class="centers">
</list-item> <p class="firsts1">参数项</p>
</div> <p class="seconds1">{{ item.product_code }}</p>
</scroll> </div>
</h-content> </div>
</item>
</list-item>
</div>
</scroll>
</h-view> </h-view>
</template> </template>
<script> <script>
......
<template> <template>
<h-view id="startList"> <h-view id="videoList">
<h-header :proportion="[5,1,1]" class="bar-custom"> <h-header :proportion="[5,1,1]" class="bar-custom">
<div slot="left" class="h-header-btn"> <div slot="left" class="h-header-btn">
<img src="@/assets/userBind/arrow.png" @click="$routeGo()" > <img src="@/assets/userBind/arrow.png" @click="$routeGo()" >
...@@ -171,7 +171,7 @@ export default { ...@@ -171,7 +171,7 @@ export default {
} }
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
#startList { #videoList {
.search { .search {
height: 52px; height: 52px;
background-color: #fff; background-color: #fff;
......
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