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

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

parents 9d251116 2184a8df
Pipeline #3146 canceled with stages
......@@ -86,6 +86,8 @@ export default {
},
beforeRouteEnter (to, from, next) {
next(vm => {
vm.pagenum = 1
vm.lists = []
vm.getList()
})
},
......@@ -155,6 +157,7 @@ export default {
vum.forEach(returnData, function (data, index, array) {
vm.lists.push(array[index])
})
vm.pagenum++
vm.$refs.scroll.update(true)
} else if (returnData.length === 10) {
vum.forEach(returnData, function (data, index, array) {
......
<!--
* @Author: your name
* @Date: 2019-10-31 09:49:57
* @LastEditTime: 2019-11-18 16:31:19
* @LastEditTime: 2019-11-19 11:12:37
* @LastEditors: Please set LastEditors
* @Description: 合同查询--明细
* @FilePath:
......@@ -73,7 +73,7 @@
</div>
</div>
<div slot="content">
<span v-if="item.overdue_times" :class="['status','red']">逾期{{ totalTimes }}</span>
<span v-if="item.overdue_times" :class="['status','red']">逾期{{ item.overdue_times }}</span>
<div class="plan" @click="toRepayPlans(item.contract_id)">
<img src="@/assets/contractRepayment/plan.png" alt="">
<span>还款计划</span>
......@@ -99,13 +99,7 @@ export default {
}
},
computed: {
totalTimes () {
let num = 0
for (let item of this.lists) {
num += Number(item.overdue_times)
}
return num
},
},
watch: {},
beforeRouteEnter (to, from, next) {
......
......@@ -8,7 +8,7 @@
</h-header>
<h-content v-if="data!==null" class="pay-content">
<scroll ref="scroll" :updateData="[lists]" :pullUp="true">
<scroll ref="scroll" :updateData="[lists]" :pullUp="true" @pullingUp="getList">
<div v-for="(item,index) in lists" :key="index" class="contract-item">
<div class="header">
<img src="@/assets/contractRepayment/contract.png" alt="">
......@@ -46,6 +46,7 @@ export default {
data () {
return {
// data: null, 无记录时
pagenum: 1,
lists: [],
}
},
......@@ -62,6 +63,8 @@ export default {
beforeRouteEnter (to, from, next) {
next(vm => {
if (from.name === 'HomePage') {
vm.pagenum = 1
vm.lists = []
vm.getList()
}
})
......@@ -72,15 +75,34 @@ export default {
let url = process.env.basePath + 'con_repayment_list_query'
let param = {
user_phone: window.localStorage.getItem('user_phone'),
pagesize: 10,
pagenum: vm.pagenum,
}
hlsPopup.showLoading('请稍候')
vm.$post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
vm.lists = res.lists
if (res.listst.length >= 0 && res.lists.length < 10) {
let returnData = []
returnData = res.lists
if (returnData.length === 0) {
vm.$refs.scroll.update(true)
} else if (returnData.length > 0 && returnData.length < 10) {
vum.forEach(returnData, function (data, index, array) {
vm.lists.push(array[index])
})
vm.pagenum++
vm.$refs.scroll.update(true)
} else if (returnData.length === 10) {
vum.forEach(returnData, function (data, index, array) {
vm.lists.push(array[index])
})
vm.pagenum++
vm.$refs.scroll.update(false)
}
// vm.lists = res.lists
// if (res.listst.length >= 0 && res.lists.length < 10) {
// vm.$refs.scroll.update(true)
// }
} else {
hlsPopup.showLongCenter(res.message)
}
......
<!--
* @Author: your name
* @Date: 2019-09-29 10:02:11
* @LastEditTime: 2019-11-18 16:25:52
* @LastEditTime: 2019-11-19 16:47:01
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
-->
......@@ -26,14 +26,13 @@
<!-- <h-content > -->
<scroll
v-if="num === 1"
ref="scroll"
:updateData="[submitLists]"
:updateData="[showLists]"
:pullUp="true"
@pullingUp="loadMore"
>
<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)">
<img src="@/assets/distributorSign/fileIcon.png" alt="" class="file-icon">
<p>
......@@ -50,35 +49,6 @@
</div>
</div>
</scroll>
<!-- </h-content> -->
<!-- <h-content > -->
<scroll
v-if="num === 2"
ref="scrollList"
:updateData="[approvedLists]"
:pullUp="true"
@pullingUp="loadMore"
>
<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-content> -->
</h-view>
</template>
......@@ -91,7 +61,7 @@ import unCheck2 from '@/assets/constractSigning/yes-undone.png'
export default {
data () {
return {
num: 1,
num: null,
pagenum: 1,
searchInput: '',
check1: Check1,
......@@ -101,8 +71,31 @@ export default {
user_bp_type: '', // 客户类型
submitLists: [], // 待签约
approvedLists: [], // 已签约
showLists: [],
lists: [],
}
},
watch: {
'num': {
handler (newVal, oldVal) {
if (newVal === 1) {
this.showLists = this.submitLists
} else if (newVal === 2) {
this.showLists = this.approvedLists
}
},
immediate: true,
},
searchInput () {
let vm = this
if (vm.timeout) {
clearTimeout(vm.timeout)
}
vm.timeout = setTimeout(() => {
vm.search()
}, 1000)
},
},
activated () {
},
......@@ -113,6 +106,8 @@ export default {
next(vm => {
if (from.name === 'MyInfo') {
vm.num = 1
vm.pagenum = 1
vm.searchInput = ''
vm.user_bp_type = vm.$route.params.user_bp_type
}
vm.contractList()
......@@ -138,13 +133,14 @@ export default {
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
console.log(res.lists)
vm.lists = res.lists
vm.submitLists = res.lists.filter(item => item.confirm_status === 'SUBMIT')
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)
}
if (vm.approvedLists.length > 0 && vm.approvedLists.length < 10) {
vm.$refs.scrollList.update(true)
} else if (res.lists.length === 10) {
vm.$refs.scroll.update(false)
}
} else {
hlsPopup.showLongCenter(res.message)
......@@ -154,31 +150,73 @@ export default {
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 + 1,
searchInput: '1',
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') {
console.log('.....', res.lists)
vm.submitLists = res.lists.filter(item => item.confirm_status === 'SUBMIT')
vm.approvedLists = res.lists.filter(item => item.confirm_status === 'APPROVED')
if (vm.submitLists.length > 0 && vm.submitLists.length < 10) {
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)
}
if (vm.approvedLists.length > 0 && vm.approvedLists.length < 10) {
vm.$refs.scrollList.update(true)
vm.submitLists = vm.lists.filter(item => item.confirm_status === 'SUBMIT')
vm.approvedLists = vm.lists.filter(item => item.confirm_status === 'APPROVED')
if (vm.num === 1) {
vm.showLists = vm.submitLists
} else {
vm.showLists = vm.approvedLists
}
} else {
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.num === 1) {
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) {
this.$router.push({
......
......@@ -168,6 +168,7 @@ export default {
vum.forEach(returnData, function (data, index, array) {
vm.lists.push(array[index])
})
vm.pagenum++
vm.$refs.scroll.update(true)
} else if (returnData.length === 10) {
vum.forEach(returnData, function (data, index, array) {
......
......@@ -14,7 +14,7 @@
<h-content>
<div class="hinput">
<div class="search-box">
<input type="text" placeholder="请输入经销商/产品名称/参数项">
<input v-model="searchInput" type="text" placeholder="请输入经销商/产品名称/参数项">
<img src="@/assets/distributorSign/search.png" alt="">
</div>
</div>
......@@ -22,6 +22,7 @@
ref="scroll"
:updateData="[productList]"
:pullUp="true"
@pullingUp="loadMore"
>
<div class="division-box">
......@@ -56,11 +57,24 @@
export default {
data () {
return {
pagenum: 1,
searchInput: '',
productList: [],
}
},
created: function () {
},
watch: {
searchInput () {
let vm = this
if (vm.timeout) {
clearTimeout(vm.timeout)
}
vm.timeout = setTimeout(() => {
vm.search()
}, 1000)
},
},
mounted: function () {
},
......@@ -70,9 +84,13 @@ export default {
},
beforeRouteEnter (to, from, next) {
next(vm => {
// if (from.name === 'MyInfo') {
if (from.name === 'MyInfo') {
vm.pagenum = 1
vm.searchInput = ''
vm.getList()
// }
} else if (from.name === 'ProDetailed') {
vm.getList()
}
})
},
methods: {
......@@ -80,6 +98,9 @@ export default {
let vm = this
let url = $config.basePath + 'my_collection_query'
let param = {
pagesize: 10,
pagenum: vm.pagenum,
searchInput: vm.searchInput,
user_phone: window.localStorage.getItem('user_phone'),
}
hlsPopup.showLoading('数据加载中')
......@@ -87,17 +108,90 @@ export default {
hlsPopup.hideLoading()
if (res.result === 'S') {
vm.productList = res.lists
res.lists.forEach(item => {
item['url'] = process.env.filePath + 'attachment_id=' + item.product_attachment_id + '&access_token=' + window.localStorage.access_token
})
if (res.lists.length > 0 && res.lists.length < 10) {
vm.$refs.scroll.update(true)
}
if (vm.productList.length === 0) {
vm.$refs.scroll.update(true)
} else if (vm.productList.length > 0 && vm.productList.length < 10) {
vm.productList.forEach(item => {
item['url'] = process.env.filePath + 'attachment_id=' + item.product_attachment_id + '&access_token=' + window.localStorage.access_token
})
vm.$refs.scroll.update(true)
} else if (vm.productList.length === 10) {
vm.productList.forEach(item => {
item['url'] = process.env.filePath + 'attachment_id=' + item.product_attachment_id + '&access_token=' + window.localStorage.access_token
})
vm.$refs.scroll.update(false)
}
} else {
hlsPopup.showLongCenter(res.message)
}
})
},
loadMore () {
let vm = this
vm.pagenum = vm.pagenum + 1
let url = $config.basePath + 'my_collection_query'
let param = {
pagesize: 10,
pagenum: vm.pagenum,
searchInput: vm.searchInput,
user_phone: window.localStorage.getItem('user_phone'),
}
vm.hlsPopup.showLoading('数据加载中')
vm.$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(item => {
item['url'] = process.env.filePath + 'attachment_id=' + item.product_attachment_id + '&access_token=' + window.localStorage.access_token
})
returnData.forEach((data, index, array) => {
vm.productList.push(array[index])
})
vm.$refs.scroll.update(true)
} else if (returnData.length === 10) {
returnData.forEach(item => {
item['url'] = process.env.filePath + 'attachment_id=' + item.product_attachment_id + '&access_token=' + window.localStorage.access_token
})
returnData.forEach((data, index, array) => {
vm.productList.push(array[index])
})
vm.$refs.scroll.update(false)
}
} else {
hlsPopup.showLongCenter(res.message)
}
})
},
search () {
let vm = this
vm.pagenum = 1
// vm.bpList = []
let url = $config.basePath + 'my_collection_query'
let param = {
pagesize: 10,
pagenum: 1,
searchInput: vm.searchInput,
user_phone: window.localStorage.getItem('user_phone'),
}
vm.hlsPopup.showLoading('数据加载中')
vm.hlsHttp.post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
vm.productList = res.lists
vm.productList.forEach(item => {
item['url'] = process.env.filePath + 'attachment_id=' + item.product_attachment_id + '&access_token=' + window.localStorage.access_token
})
if (vm.productList.length >= 0 && vm.productList.length < 10) {
vm.$refs.scroll.update(true)
} else if (vm.productList.length === 10) {
vm.$refs.scroll.update(false)
}
})
},
// val:产品id, status: 收藏状态
goDetailed (val, status, bp_id) { // 进入产品查询功能明细页面
window.sessionStorage.setItem('collect_status', status)
......
......@@ -59,15 +59,32 @@ export default {
data () {
return {
lists: [],
pagenum: 2,
pagenum: 1,
searchInput: '',
}
},
computed: {},
watch: {},
activated () {
// debugger
this.proQuery()
watch: {
searchInput () {
let vm = this
if (vm.timeout) {
clearTimeout(vm.timeout)
}
vm.timeout = setTimeout(() => {
vm.search()
}, 1000)
},
},
beforeRouteEnter (to, from, next) {
next(vm => {
if (from.name === 'QueryHome') {
vm.pagenum = 1
vm.searchInput = ''
vm.proQuery()
} else if (from.name === 'ProDetailed') {
vm.proQuery()
}
})
},
methods:
{
......@@ -87,14 +104,19 @@ export default {
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
vm.lists = res.lists
res.lists.forEach(item => {
item['url'] = process.env.filePath + 'attachment_id=' + item.product_attachment_id + '&access_token=' + window.localStorage.access_token
})
if (res.lists.length > 0 && res.lists.length < 10) {
if (vm.lists.length === 0) {
vm.$refs.scroll.update(true)
} else if (vm.lists.length > 0 && vm.lists.length < 10) {
vm.lists.forEach(item => {
item['url'] = process.env.filePath + 'attachment_id=' + item.product_attachment_id + '&access_token=' + window.localStorage.access_token
})
vm.$refs.scroll.update(true)
} else if (vm.lists.length === 10) {
vm.lists.forEach(item => {
item['url'] = process.env.filePath + 'attachment_id=' + item.product_attachment_id + '&access_token=' + window.localStorage.access_token
})
vm.$refs.scroll.update(false)
}
// vm.picLists = res.lists
// console.log('........',vm.picLists)
} else {
hlsPopup.showLongCenter(res.message)
}
......@@ -103,7 +125,7 @@ export default {
loadMore () {
let vm = this
vm.pagenum++
vm.pagenum = vm.pagenum + 1
let url = $config.basePath + 'prd_product_list'
let param = {
division: window.sessionStorage.division,
......@@ -115,20 +137,62 @@ export default {
vm.hlsPopup.showLoading('数据加载中')
vm.$post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
let returnData = []
if (res.result === 'S') {
console.log('...........', res.lists)
// vm.lists = res.lists
// res.lists.forEach(item => {
// item['url'] = process.env.filePath + 'attachment_id=' + item.product_attachment_id + '&access_token=' + window.localStorage.access_token
// })
// if (res.lists.length > 0 && res.lists.length < 10) {
// vm.$refs.scroll.update(true)
// }
returnData = res.lists
if (returnData.length === 0) {
vm.$refs.scroll.update(true)
} else if (returnData.length > 0 && returnData.length < 10) {
returnData.forEach(item => {
item['url'] = process.env.filePath + 'attachment_id=' + item.product_attachment_id + '&access_token=' + window.localStorage.access_token
})
returnData.forEach((data, index, array) => {
vm.lists.push(array[index])
})
vm.$refs.scroll.update(true)
} else if (returnData.length === 10) {
returnData.forEach(item => {
item['url'] = process.env.filePath + 'attachment_id=' + item.product_attachment_id + '&access_token=' + window.localStorage.access_token
})
returnData.forEach((data, index, array) => {
vm.lists.push(array[index])
})
vm.$refs.scroll.update(false)
}
} else {
hlsPopup.showLongCenter(res.message)
}
})
},
// 搜索
search () {
let vm = this
vm.pagenum = 1
// vm.bpList = []
let url = $config.basePath + 'prd_product_list'
let param = {
pagesize: 10,
pagenum: 1,
searchInput: vm.searchInput,
division: window.sessionStorage.division,
user_phone: window.localStorage.user_phone,
}
vm.hlsPopup.showLoading('数据加载中')
vm.hlsHttp.post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
console.log(res)
vm.lists = res.lists
vm.lists.forEach(item => {
item['url'] = process.env.filePath + 'attachment_id=' + item.product_attachment_id + '&access_token=' + window.localStorage.access_token
})
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)
}
})
},
// val:产品id, status: 收藏状态
goDetailed (val, status, bp_id) {
window.sessionStorage.setItem('collect_status', status)
......
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