Commit 4cb0d869 authored by 786817560's avatar 786817560

'scroll修改'

parent ba8e1dbb
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2019-10-31 09:49:57 * @Date: 2019-10-31 09:49:57
* @LastEditTime: 2019-11-28 16:25:04 * @LastEditTime: 2019-12-02 09:02:06
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: 合同查询--记录 * @Description: 合同查询--记录
* @FilePath: * @FilePath:
...@@ -37,14 +37,14 @@ ...@@ -37,14 +37,14 @@
</div> </div>
<!-- 全部合同记录 --> <!-- 全部合同记录 -->
<scroll <scroll
v-show="data!==null&&selected==='all'" v-show="data!==null"
ref="scroll" ref="scroll"
:updateData="[lists]" :updateData="[showLists]"
:pullUp="true" :pullUp="true"
@pullingUp="loadMore('全部',pagenum,lists)" @pullingUp="loadMore('全部',pagenum,lists)"
> >
<div class="pay-content"> <div class="pay-content">
<div v-for="(item,index) in lists" :key="index" class="contract-item"> <div v-for="(item,index) in showLists" :key="index" class="contract-item">
<div class="header"> <div class="header">
<img src="@/assets/contractRepayment/contract.png" alt=""> <img src="@/assets/contractRepayment/contract.png" alt="">
<h2>{{ item.project_number }}</h2> <h2>{{ item.project_number }}</h2>
...@@ -67,125 +67,7 @@ ...@@ -67,125 +67,7 @@
</div> </div>
</div> </div>
</scroll> </scroll>
<!-- 待首付 -->
<scroll
v-show="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-show="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-show="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-show="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>
<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>
</h-view> </h-view>
</template> </template>
...@@ -200,6 +82,7 @@ export default { ...@@ -200,6 +82,7 @@ export default {
// data: null, // 无记录时 // data: null, // 无记录时
data: 1, data: 1,
lists: [], // 全部记录 lists: [], // 全部记录
showLists: [],
selected: 'all', selected: 'all',
unSignedLists: [], // 待首付 unSignedLists: [], // 待首付
unRepayLists: [], // 首付还款中 unRepayLists: [], // 首付还款中
...@@ -221,21 +104,37 @@ export default { ...@@ -221,21 +104,37 @@ export default {
computed: {}, computed: {},
watch: { watch: {
selected () { selected () {
this.$refs.scroll.update(false)
this.$refs.scroll.scrollToTop()
if (this.selected === 'all') { if (this.selected === 'all') {
this.contract_status_n = '全部'
this.pageNum = this.pagenum
this.showLists = this.lists
} else if (this.selected === 'one') { } else if (this.selected === 'one') {
this.contract_status_n = '待首付'
this.pageNum = this.unSigned_pagenum
this.showLists = this.unSignedLists
if (!this.unSigned_flag) { if (!this.unSigned_flag) {
this.recordQuery('待首付', this.unSignedLists) this.recordQuery('待首付', this.unSignedLists)
} }
} else if (this.selected === 'two') { } else if (this.selected === 'two') {
this.contract_status_n = '首付还款中'
this.pageNum = this.unRepay_pagenum
this.showLists = this.unRepayLists
if (!this.unRepay_flag) { if (!this.unRepay_flag) {
this.recordQuery('首付还款中', this.unRepayLists) this.recordQuery('首付还款中', this.unRepayLists)
} }
} else if (this.selected === 'three') { } else if (this.selected === 'three') {
this.contract_status_n = '还款中'
this.pageNum = this.repaying_pagenum
this.showLists = this.repayingLists
if (!this.repaying_flag) { if (!this.repaying_flag) {
this.recordQuery('还款中', this.repayingLists) this.recordQuery('还款中', this.repayingLists)
} }
} else if (this.selected === 'four') { } else if (this.selected === 'four') {
this.contract_status_n = '已结清'
this.pageNum = this.repayed_pagenum
this.showLists = this.repayedLists
if (!this.repayed_flag) { if (!this.repayed_flag) {
this.recordQuery('已结清', this.repayedLists) this.recordQuery('已结清', this.repayedLists)
} }
...@@ -272,7 +171,7 @@ export default { ...@@ -272,7 +171,7 @@ export default {
vm.repaying_flag = false vm.repaying_flag = false
vm.repayed_flag = false vm.repayed_flag = false
vm.recordQuery('待首付', vm.unSignedLists) vm.recordQuery('全部', vm.lists)
} }
}) })
}, },
...@@ -314,37 +213,39 @@ export default { ...@@ -314,37 +213,39 @@ export default {
res.lists.forEach((data, index, array) => { res.lists.forEach((data, index, array) => {
arr.push(array[index]) arr.push(array[index])
}) })
vm.showLists = arr
console.log('......', vm.lists)
if (res.lists.length >= 0 && res.lists.length < 10) { if (res.lists.length >= 0 && res.lists.length < 10) {
if (status === '全部') { if (status === '全部') {
vm.$refs.scroll.update(true) vm.$refs.scroll.update(true)
} else if (status === '待首付') { } else if (status === '待首付') {
vm.unSigned_flag = true vm.unSigned_flag = true
vm.$refs.scrollOne.update(true) vm.$refs.scroll.update(true)
} else if (status === '首付还款中') { } else if (status === '首付还款中') {
vm.unRepay_flag = true vm.unRepay_flag = true
vm.$refs.scrollTwo.update(true) vm.$refs.scroll.update(true)
} else if (status === '还款中') { } else if (status === '还款中') {
vm.repaying_flag = true vm.repaying_flag = true
vm.$refs.scrollThree.update(true) vm.$refs.scroll.update(true)
} else if (status === '已结清') { } else if (status === '已结清') {
vm.repayed_flag = true vm.repayed_flag = true
vm.$refs.scrollFour.update(true) vm.$refs.scroll.update(true)
} }
} else if (res.lists.length === 10) { } else if (res.lists.length === 10) {
if (status === '全部') { if (status === '全部') {
vm.$refs.scroll.update(false) vm.$refs.scroll.update(false)
} else if (status === '待首付') { } else if (status === '待首付') {
vm.unSigned_flag = true vm.unSigned_flag = true
vm.$refs.scrollOne.update(false) vm.$refs.scroll.update(false)
} else if (status === '首付还款中') { } else if (status === '首付还款中') {
vm.unRepay_flag = true vm.unRepay_flag = true
vm.$refs.scrollTwo.update(false) vm.$refs.scroll.update(false)
} else if (status === '还款中') { } else if (status === '还款中') {
vm.repaying_flag = true vm.repaying_flag = true
vm.$refs.scrollThree.update(false) vm.$refs.scroll.update(false)
} else if (status === '已结清') { } else if (status === '已结清') {
vm.repayed_flag = true vm.repayed_flag = true
vm.$refs.scrollFour.update(false) vm.$refs.scroll.update(false)
} }
} }
} else { } else {
...@@ -353,65 +254,54 @@ export default { ...@@ -353,65 +254,54 @@ export default {
}) })
}, },
loadMore (status, pageNum, list) { loadMore () {
let vm = this let vm = this
pageNum++
let url = $config.basePath + 'con_contract_list' let url = $config.basePath + 'con_contract_list'
let param = { let param = {
user_phone: window.localStorage.user_phone, user_phone: window.localStorage.user_phone,
searchInput: vm.searchInput, searchInput: vm.searchInput,
pagenum: pageNum, pagenum: vm.pageNum,
pagesize: 10, pagesize: 10,
contract_status_n: status, contract_status_n: vm.contract_status_n,
} }
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()
let returnData = [] let returnData = []
if (res.result === 'S') { if (res.result === 'S') {
returnData = res.lists returnData = res.lists
if (returnData.length === 0) { if (returnData.length === 0) {
if (status === '全部') { vm.$refs.scroll.update(true)
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) { } else if (returnData.length > 0 && returnData.length < 10) {
returnData.forEach((data, index, array) => { returnData.forEach((data, index, array) => {
list.push(array[index]) if (this.selected === 'all') {
vm.lists.push(array[index])
} else if (this.selected === 'one') {
vm.unSignedLists.push(array[index])
} else if (this.selected === 'two') {
vm.unRepayLists.push(array[index])
} else if (this.selected === 'three') {
vm.repayingLists.push(array[index])
} else if (this.selected === 'four') {
vm.repayedLists.push(array[index])
}
}) })
if (status === '全部') { vm.$refs.scroll.update(true)
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) { } else if (returnData.length === 10) {
returnData.forEach((data, index, array) => { returnData.forEach((data, index, array) => {
list.push(array[index]) if (this.selected === 'all') {
vm.lists.push(array[index])
} else if (this.selected === 'one') {
vm.unSignedLists.push(array[index])
} else if (this.selected === 'two') {
vm.unRepayLists.push(array[index])
} else if (this.selected === 'three') {
vm.repayingLists.push(array[index])
} else if (this.selected === 'four') {
vm.repayedLists.push(array[index])
}
}) })
if (status === '全部') { vm.$refs.scroll.update(true)
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)
}
} }
} else { } else {
hlsPopup.showLongCenter(res.message) hlsPopup.showLongCenter(res.message)
...@@ -419,23 +309,49 @@ export default { ...@@ -419,23 +309,49 @@ export default {
}) })
}, },
async searchs () { async searchs () {
// await this.search('全部',this.lists) let resAll = await this.searchAll()
// await this.search('待首付', this.unSignedLists = []) if (resAll) {
// await this.search('首付还款中', this.unRepayLists = []) let res = await this.searchUnsign() // 待首付结果
// await this.search('还款中', this.repayingLists = []) if (res) {
// await this.search('已结清', this.repayedLists = []) let resUnrepay = await this.searchUnrepay() // 首付还款中结果
if (resUnrepay) {
let res = await this.searchUnsign() // 待首付结果 let resRepaying = await this.searchRepaying() // 还款中结果
if (res) { if (resRepaying) {
let resUnrepay = await this.searchUnrepay() // 首付还款中结果 this.searchRepayed()
if (resUnrepay) { }
let resRepaying = await this.searchRepaying() // 还款中结果
if (resRepaying) {
this.searchRepayed()
} }
} }
} }
}, },
async searchAll () {
let vm = this
let url = $config.basePath + 'con_contract_list'
let param = {
contract_status_n: '全部',
user_phone: window.localStorage.user_phone,
searchInput: vm.searchInput,
pagenum: 1,
pagesize: 10,
}
vm.hlsPopup.showLoading('请稍后')
let res = await vm.$post(url, param)
if (res.result === 'S') {
vm.hlsPopup.hideLoading()
vm.lists = res.lists
if (vm.selected === 'all') {
vm.showLists = vm.lists
}
if (res.lists.length >= 0 && res.lists.length < 10) {
vm.$refs.scroll.update(true)
} else if (res.lists.length === 10) {
vm.$refs.scroll.update(false)
}
return true
} else {
hlsPopup.showLongCenter(res.message)
return false
}
},
async searchUnsign () { async searchUnsign () {
let vm = this let vm = this
let url = $config.basePath + 'con_contract_list' let url = $config.basePath + 'con_contract_list'
...@@ -451,10 +367,13 @@ export default { ...@@ -451,10 +367,13 @@ export default {
if (res.result === 'S') { if (res.result === 'S') {
vm.hlsPopup.hideLoading() vm.hlsPopup.hideLoading()
vm.unSignedLists = res.lists vm.unSignedLists = res.lists
if (vm.selected === 'one') {
vm.showLists = vm.unSignedLists
}
if (res.lists.length >= 0 && res.lists.length < 10) { if (res.lists.length >= 0 && res.lists.length < 10) {
vm.$refs.scrollOne.update(true) vm.$refs.scroll.update(true)
} else if (res.lists.length === 10) { } else if (res.lists.length === 10) {
vm.$refs.scrollOne.update(false) vm.$refs.scroll.update(false)
} }
return true return true
} else { } else {
...@@ -477,10 +396,13 @@ export default { ...@@ -477,10 +396,13 @@ export default {
let res = await vm.$post(url, param) let res = await vm.$post(url, param)
if (res.result === 'S') { if (res.result === 'S') {
vm.unRepayLists = res.lists vm.unRepayLists = res.lists
if (vm.selected === 'two') {
vm.showLists = vm.unRepayLists
}
if (res.lists.length >= 0 && res.lists.length < 10) { if (res.lists.length >= 0 && res.lists.length < 10) {
vm.$refs.scrollTwo.update(true) vm.$refs.scroll.update(true)
} else if (res.lists.length === 10) { } else if (res.lists.length === 10) {
vm.$refs.scrollTwo.update(false) vm.$refs.scroll.update(false)
} }
return true return true
} else { } else {
...@@ -503,10 +425,13 @@ export default { ...@@ -503,10 +425,13 @@ export default {
let res = await vm.$post(url, param) let res = await vm.$post(url, param)
if (res.result === 'S') { if (res.result === 'S') {
vm.repayingLists = res.lists vm.repayingLists = res.lists
if (vm.selected === 'three') {
vm.showLists = vm.repayingLists
}
if (res.lists.length >= 0 && res.lists.length < 10) { if (res.lists.length >= 0 && res.lists.length < 10) {
vm.$refs.scrollThree.update(true) vm.$refs.scroll.update(true)
} else if (res.lists.length === 10) { } else if (res.lists.length === 10) {
vm.$refs.scrollThree.update(false) vm.$refs.scroll.update(false)
} }
return true return true
} else { } else {
...@@ -529,70 +454,16 @@ export default { ...@@ -529,70 +454,16 @@ export default {
vm.hlsHttp.post(url, param).then(function (res) { vm.hlsHttp.post(url, param).then(function (res) {
// vm.hlsPopup.hideLoading() // vm.hlsPopup.hideLoading()
vm.repayedLists = res.lists vm.repayedLists = res.lists
if (vm.selected === 'four') {
vm.showLists = vm.repayedLists
}
if (res.lists.length >= 0 && res.lists.length < 10) { if (res.lists.length >= 0 && res.lists.length < 10) {
vm.$refs.scrollFour.update(true) vm.$refs.scroll.update(true)
} else if (res.lists.length === 10) { } else if (res.lists.length === 10) {
vm.$refs.scrollFour.update(false) vm.$refs.scroll.update(false)
} }
}) })
}, },
// search (status, list) {
// let vm = this
// let url = $config.basePath + 'con_contract_list'
// let param = {
// contract_status_n: status,
// user_phone: window.localStorage.user_phone,
// searchInput: vm.searchInput,
// pagenum: 1,
// pagesize: 10,
// }
// vm.hlsPopup.showLoading('数据加载中')
// vm.hlsHttp.post(url, param).then(function (res) {
// vm.hlsPopup.hideLoading()
// if (status === '全部') {
// vm.lists = res.lists
// } 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 (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)
// }
// }
// })
// },
}, },
} }
</script> </script>
......
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2019-09-29 10:02:11 * @Date: 2019-09-29 10:02:11
* @LastEditTime: 2019-11-29 12:40:38 * @LastEditTime: 2019-11-29 17:31:00
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: In User Settings Edit * @Description: In User Settings Edit
--> -->
...@@ -23,14 +23,13 @@ ...@@ -23,14 +23,13 @@
</div> </div>
<scroll <scroll
v-show="num === 1"
ref="scroll" ref="scroll"
:updateData="[submitLists]" :updateData="[showLists]"
:pullUp="true" :pullUp="true"
@pullingUp="loadMore" @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>
...@@ -48,9 +47,9 @@ ...@@ -48,9 +47,9 @@
</div> </div>
</scroll> </scroll>
<scroll <!-- <scroll
v-show="num === 2" v-show="num === 2"
ref="scrolls" ref="scroll"
:updateData="[approvedLists]" :updateData="[approvedLists]"
:pullUp="true" :pullUp="true"
@pullingUp="loadMore" @pullingUp="loadMore"
...@@ -72,7 +71,7 @@ ...@@ -72,7 +71,7 @@
</div> </div>
</div> </div>
</div> </div>
</scroll> </scroll> -->
</h-view> </h-view>
</template> </template>
...@@ -99,17 +98,23 @@ export default { ...@@ -99,17 +98,23 @@ export default {
approvedLists: [], // 已签约 approvedLists: [], // 已签约
showLists: [], showLists: [],
lists: [], lists: [],
submitFlag: false,
approvedFlag: false, approvedFlag: false,
} }
}, },
watch: { watch: {
'num': { 'num': {
handler (newVal, oldVal) { handler (newVal, oldVal) {
this.$refs.scroll.update(false)
if (newVal === 2) { if (newVal === 2) {
if (!this.approvedFlag) { if (!this.approvedFlag) {
this.contractList() this.contractList()
} }
this.$refs.scroll.scrollToTop()
this.showLists = this.approvedLists
} else if (newVal === 1) {
this.showLists = this.submitLists
this.$refs.scroll.scrollToTop()
// this.$refs.scroll.update(false)
} }
}, },
immediate: true, immediate: true,
...@@ -175,7 +180,7 @@ export default { ...@@ -175,7 +180,7 @@ export default {
vm.hlsPopup.hideLoading() vm.hlsPopup.hideLoading()
if (res.result === 'S') { if (res.result === 'S') {
vm.submitLists = res.lists vm.submitLists = res.lists
vm.submitFlag = true vm.showLists = vm.submitLists
if (res.lists.length > 0 && res.lists.length < 10) { 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) { } else if (res.lists.length === 10) {
...@@ -201,10 +206,11 @@ export default { ...@@ -201,10 +206,11 @@ export default {
console.log(res.lists) console.log(res.lists)
vm.approvedLists = res.lists vm.approvedLists = res.lists
vm.approvedFlag = true vm.approvedFlag = true
vm.showLists = vm.approvedLists
if (res.lists.length > 0 && res.lists.length < 10) { if (res.lists.length > 0 && res.lists.length < 10) {
vm.$refs.scrolls.update(true) vm.$refs.scroll.update(true)
} else if (res.lists.length === 10) { } else if (res.lists.length === 10) {
vm.$refs.scrolls.update(false) vm.$refs.scroll.update(false)
} }
} else { } else {
hlsPopup.showLongCenter(res.message) hlsPopup.showLongCenter(res.message)
...@@ -225,7 +231,7 @@ export default { ...@@ -225,7 +231,7 @@ export default {
confirm_status: 'SUBMIT', confirm_status: 'SUBMIT',
searchInput: vm.searchInput, searchInput: vm.searchInput,
} }
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()
let returnData = [] let returnData = []
...@@ -244,6 +250,7 @@ export default { ...@@ -244,6 +250,7 @@ export default {
}) })
vm.$refs.scroll.update(false) vm.$refs.scroll.update(false)
} }
vm.showLists = vm.submitLists
} else { } else {
hlsPopup.showLongCenter(res.message) hlsPopup.showLongCenter(res.message)
} }
...@@ -258,25 +265,26 @@ export default { ...@@ -258,25 +265,26 @@ export default {
confirm_status: 'APPROVED', confirm_status: 'APPROVED',
searchInput: vm.searchInput, searchInput: vm.searchInput,
} }
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()
let returnData = [] let returnData = []
if (res.result === 'S') { if (res.result === 'S') {
returnData = res.lists returnData = res.lists
if (returnData.length === 0) { if (returnData.length === 0) {
vm.$refs.scrolls.update(true) vm.$refs.scroll.update(true)
} else if (returnData.length > 0 && returnData.length < 10) { } else if (returnData.length > 0 && returnData.length < 10) {
returnData.forEach((data, index, array) => { returnData.forEach((data, index, array) => {
vm.approvedLists.push(array[index]) vm.approvedLists.push(array[index])
}) })
vm.$refs.scrolls.update(true) vm.$refs.scroll.update(true)
} else if (returnData.length === 10) { } else if (returnData.length === 10) {
returnData.forEach((data, index, array) => { returnData.forEach((data, index, array) => {
vm.approvedLists.push(array[index]) vm.approvedLists.push(array[index])
}) })
vm.$refs.scrolls.update(false) vm.$refs.scroll.update(false)
} }
vm.showLists = vm.approvedLists
} else { } else {
hlsPopup.showLongCenter(res.message) hlsPopup.showLongCenter(res.message)
} }
...@@ -294,11 +302,15 @@ export default { ...@@ -294,11 +302,15 @@ export default {
confirm_status: 'SUBMIT', confirm_status: 'SUBMIT',
searchInput: vm.searchInput, searchInput: vm.searchInput,
} }
vm.hlsPopup.showLoading('数据加载中') vm.hlsPopup.showLoading('请稍后')
let res = await vm.$post(url, param) let res = await vm.$post(url, param)
if (res.result === 'S') { if (res.result === 'S') {
vm.hlsPopup.hideLoading() vm.hlsPopup.hideLoading()
vm.submitLists = res.lists vm.submitLists = res.lists
if (vm.num === 1) {
vm.showLists = vm.submitLists
}
// vm.showLists = vm.submitLists
if (res.lists.length >= 0 && res.lists.length < 10) { 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) { } else if (res.lists.length === 10) {
...@@ -325,10 +337,14 @@ export default { ...@@ -325,10 +337,14 @@ export default {
vm.hlsHttp.post(url, param).then(function (res) { vm.hlsHttp.post(url, param).then(function (res) {
vm.hlsPopup.hideLoading() vm.hlsPopup.hideLoading()
vm.approvedLists = res.lists vm.approvedLists = res.lists
if (vm.num === 2) {
vm.showLists = vm.approvedLists
}
// vm.showLists = vm.approvedLists
if (res.lists.length >= 0 && res.lists.length < 10) { if (res.lists.length >= 0 && res.lists.length < 10) {
vm.$refs.scrolls.update(true) vm.$refs.scroll.update(true)
} else if (res.lists.length === 10) { } else if (res.lists.length === 10) {
vm.$refs.scrolls.update(false) vm.$refs.scroll.update(false)
} }
}) })
}, },
......
...@@ -136,6 +136,7 @@ export default { ...@@ -136,6 +136,7 @@ export default {
}, },
getTabNum (i) { getTabNum (i) {
this.tabNum = i this.tabNum = i
this.$refs.scroll.scrollToTop()
}, },
goAdd () { goAdd () {
hlsPopup.showLongCenter('暂不支持无关联进件的车辆发送') hlsPopup.showLongCenter('暂不支持无关联进件的车辆发送')
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<h-view id="distribute-sign" title="经销商签约"> <h-view id="distribute-sign" title="经销商签约">
<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="goBack"> <img src="@/assets/userBind/arrow.png" @click="$routeGo()">
<span>经销商签约</span> <span>经销商签约</span>
</div> </div>
</h-header> </h-header>
...@@ -21,21 +21,20 @@ ...@@ -21,21 +21,20 @@
<input v-model="searchInput" type="text" placeholder="请输入合同号/承租人名称"> <input v-model="searchInput" type="text" placeholder="请输入合同号/承租人名称">
</div> </div>
<scroll <scroll
v-show="num === 1"
ref="scroll" ref="scroll"
:updateData="[submitLists]" :updateData="[showLists]"
:pullUp="true" :pullUp="true"
@pullingUp="loadMore" @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>
<span>合同号</span> <span>合同号</span>
<span>{{ item.project_number }}</span> <span>{{ item.project_number }}</span>
</p> </p>
<img src="@/assets/constractSigning/righticon.png" alt="" class="arrow"> <img src="@/assets/distributorSign/goDetails.png" alt="" class="arrow">
</div> </div>
<div class="box"> <div class="box">
<div><p>承租人</p><p>{{ item.bp_name }}</p></div> <div><p>承租人</p><p>{{ item.bp_name }}</p></div>
...@@ -45,9 +44,9 @@ ...@@ -45,9 +44,9 @@
</div> </div>
</div> </div>
</scroll> </scroll>
<scroll <!-- <scroll
v-show="num === 2" v-show="num === 2"
ref="scrolls" ref="scroll"
:updateData="[approvedLists]" :updateData="[approvedLists]"
:pullUp="true" :pullUp="true"
@pullingUp="loadMore" @pullingUp="loadMore"
...@@ -60,7 +59,7 @@ ...@@ -60,7 +59,7 @@
<span>合同号</span> <span>合同号</span>
<span>{{ item.project_number }}</span> <span>{{ item.project_number }}</span>
</p> </p>
<img src="@/assets/constractSigning/righticon.png" alt="" class="arrow"> <img src="@/assets/distributorSign/goDetails.png" alt="" class="arrow">
</div> </div>
<div class="box"> <div class="box">
<div><p>承租人</p><p>{{ item.bp_name }}</p></div> <div><p>承租人</p><p>{{ item.bp_name }}</p></div>
...@@ -69,7 +68,7 @@ ...@@ -69,7 +68,7 @@
</div> </div>
</div> </div>
</div> </div>
</scroll> </scroll> -->
</h-view> </h-view>
</template> </template>
...@@ -91,28 +90,29 @@ export default { ...@@ -91,28 +90,29 @@ export default {
uncheck1: unCheck1, uncheck1: unCheck1,
uncheck2: unCheck2, uncheck2: unCheck2,
lists: [], lists: [],
showLists: [],
submitLists: [], // 待签约列表 submitLists: [], // 待签约列表
approvedLists: [], // 已签约列表 approvedLists: [], // 已签约列表
approvedFlag: false, approvedFlag: false,
} }
}, },
watch: { watch: {
// 'num': { 'num': {
// handler (newVal, oldVal) { handler (newVal, oldVal) {
// if (newVal === 2) { this.$refs.scroll.update(false)
// if (!this.approvedFlag) { if (newVal === 2) {
// this.getLists() if (!this.approvedFlag) {
// } this.getLists()
// } }
// }, this.$refs.scroll.scrollToTop()
// immediate: true, this.showLists = this.approvedLists
// }, } else if (newVal === 1) {
num () { this.showLists = this.submitLists
if (this.num === 2) { this.$refs.scroll.scrollToTop()
if (!this.approvedFlag) { // this.$refs.scroll.update(false)
this.getLists()
} }
} },
immediate: true,
}, },
searchInput () { searchInput () {
let vm = this let vm = this
...@@ -168,7 +168,7 @@ export default { ...@@ -168,7 +168,7 @@ export default {
if (res.result === 'S') { if (res.result === 'S') {
console.log(res.lists) console.log(res.lists)
vm.submitLists = res.lists vm.submitLists = res.lists
// vm.showLists = vm.submitLists vm.showLists = vm.submitLists
if (res.lists.length > 0 && res.lists.length < 10) { 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) { } else if (res.lists.length === 10) {
...@@ -194,10 +194,11 @@ export default { ...@@ -194,10 +194,11 @@ export default {
console.log(res.lists) console.log(res.lists)
vm.approvedLists = res.lists vm.approvedLists = res.lists
vm.approvedFlag = true vm.approvedFlag = true
vm.showLists = vm.approvedLists
if (res.lists.length > 0 && res.lists.length < 10) { if (res.lists.length > 0 && res.lists.length < 10) {
vm.$refs.scrolls.update(true) vm.$refs.scroll.update(true)
} else if (res.lists.length === 10) { } else if (res.lists.length === 10) {
vm.$refs.scrolls.update(false) vm.$refs.scroll.update(false)
} }
} else { } else {
hlsPopup.showLongCenter(res.message) hlsPopup.showLongCenter(res.message)
...@@ -206,7 +207,6 @@ export default { ...@@ -206,7 +207,6 @@ export default {
} }
}, },
loadMore () { loadMore () {
console.log('lodeMore')
let vm = this let vm = this
if (vm.num === 1) { if (vm.num === 1) {
vm.submitPagenum++ vm.submitPagenum++
...@@ -237,6 +237,7 @@ export default { ...@@ -237,6 +237,7 @@ export default {
}) })
vm.$refs.scroll.update(false) vm.$refs.scroll.update(false)
} }
vm.showLists = vm.submitLists
} else { } else {
hlsPopup.showLongCenter(res.message) hlsPopup.showLongCenter(res.message)
} }
...@@ -258,25 +259,26 @@ export default { ...@@ -258,25 +259,26 @@ export default {
if (res.result === 'S') { if (res.result === 'S') {
returnData = res.lists returnData = res.lists
if (returnData.length === 0) { if (returnData.length === 0) {
vm.$refs.scrolls.update(true) vm.$refs.scroll.update(true)
} else if (returnData.length > 0 && returnData.length < 10) { } else if (returnData.length > 0 && returnData.length < 10) {
returnData.forEach((data, index, array) => { returnData.forEach((data, index, array) => {
vm.approvedLists.push(array[index]) vm.approvedLists.push(array[index])
}) })
vm.$refs.scrolls.update(true) vm.$refs.scroll.update(true)
} else if (returnData.length === 10) { } else if (returnData.length === 10) {
returnData.forEach((data, index, array) => { returnData.forEach((data, index, array) => {
vm.approvedLists.push(array[index]) vm.approvedLists.push(array[index])
}) })
vm.$refs.scrolls.update(false) vm.$refs.scroll.update(false)
} }
vm.showLists = vm.approvedLists
} else { } else {
hlsPopup.showLongCenter(res.message) hlsPopup.showLongCenter(res.message)
} }
}) })
} }
}, },
async submitSearch () { submitSearch () {
let vm = this let vm = this
vm.submitPagenum = 1 vm.submitPagenum = 1
let url = $config.basePath + 'prj_confirm_list_query' let url = $config.basePath + 'prj_confirm_list_query'
...@@ -288,20 +290,16 @@ export default { ...@@ -288,20 +290,16 @@ export default {
searchInput: vm.searchInput, searchInput: vm.searchInput,
} }
vm.hlsPopup.showLoading('请稍后') vm.hlsPopup.showLoading('请稍后')
let res = await vm.$post(url, param) vm.hlsHttp.post(url, param).then(function (res) {
if (res.result === 'S') {
vm.hlsPopup.hideLoading() vm.hlsPopup.hideLoading()
vm.submitLists = res.lists vm.submitLists = res.lists
vm.showLists = vm.submitLists
if (res.lists.length >= 0 && res.lists.length < 10) { 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) { } else if (res.lists.length === 10) {
vm.$refs.scroll.update(false) vm.$refs.scroll.update(false)
} }
return true })
} else {
hlsPopup.showLongCenter(res.message)
return false
}
}, },
approvedearch () { approvedearch () {
let vm = this let vm = this
...@@ -319,18 +317,17 @@ export default { ...@@ -319,18 +317,17 @@ export default {
// vm.hlsPopup.hideLoading() // vm.hlsPopup.hideLoading()
// console.log(res.lists) // console.log(res.lists)
vm.approvedLists = res.lists vm.approvedLists = res.lists
vm.showLists = vm.approvedLists
if (res.lists.length >= 0 && res.lists.length < 10) { if (res.lists.length >= 0 && res.lists.length < 10) {
vm.$refs.scrolls.update(true) vm.$refs.scroll.update(true)
} else if (res.lists.length === 10) { } else if (res.lists.length === 10) {
vm.$refs.scrolls.update(false) vm.$refs.scroll.update(false)
} }
}) })
}, },
async search () { search () {
let res = await this.submitSearch() this.submitSearch()
if (res) { setTimeout(this.approvedearch, 1000)
this.approvedearch()
}
}, },
goDetails (item) { goDetails (item) {
this.$router.push({ this.$router.push({
...@@ -343,12 +340,6 @@ export default { ...@@ -343,12 +340,6 @@ export default {
dateConverse (date) { dateConverse (date) {
return date.replace(/\//g, '-') return date.replace(/\//g, '-')
}, },
// 返回个人中心
goBack () {
this.$router.push({
name: 'MyInfo',
})
},
}, },
} }
</script> </script>
...@@ -415,7 +406,7 @@ export default { ...@@ -415,7 +406,7 @@ export default {
font-family: PingFangSC-Regular; font-family: PingFangSC-Regular;
font-size: 14px; font-size: 14px;
color: #888C8F; color: #888C8F;
// line-height: 36px; line-height: 36px;
background: url("../../assets/contractStart/search1.png") 320px no-repeat; background: url("../../assets/contractStart/search1.png") 320px no-repeat;
background-size: 16px 16px; background-size: 16px 16px;
background-color: rgba(239, 239, 239, 0.55); background-color: rgba(239, 239, 239, 0.55);
......
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