Commit 95b41a94 authored by 786817560's avatar 786817560

Merge branch 'ren' into develop

parents c4707751 f0ccf9bd
......@@ -2,7 +2,7 @@
* @Descrip 融资试算
* @Author: your name
* @Date: 2019-09-29 17:09:49
* @LastEditTime: 2019-11-21 17:27:36
* @LastEditTime: 2019-11-22 09:15:25
* @LastEditors: Please set LastEditors
-->
<template>
......@@ -78,11 +78,11 @@ export default {
clearTimeout(vm.timeout)
}
vm.timeout = setTimeout(() => {
// if (vm.fromProduct) {
// vm.search(vm.fromProduct)
// } else {
// vm.search()
// }
if (vm.fromProduct) {
vm.search(vm.fromProduct)
} else {
vm.search()
}
}, 1000)
},
},
......@@ -122,7 +122,7 @@ export default {
},
})
},
// 试算查询
// 初始试算查询
calculationQuery (val) {
let vm = this
if (val) {
......@@ -165,6 +165,39 @@ export default {
loadMore () {
let vm = this
if (vm.fromProduct) {
vm.pagenum = vm.pagenum + 1
let url = $config.basePath + 'prd_product_calculation_query'
let param = {
division: window.sessionStorage.division, // 收藏到试算通过产品线查询
searchInput: vm.searchInput,
pagenum: vm.pagenum,
pagesize: 10,
}
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((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)
}
} else {
hlsPopup.showLongCenter(res.message)
}
})
} else {
vm.pagenum = vm.pagenum + 1
let url = $config.basePath + 'prd_calculation_query'
let param = {
......@@ -195,15 +228,19 @@ export default {
hlsPopup.showLongCenter(res.message)
}
})
}
},
search () {
search (val) {
let vm = this
if (val) {
vm.pagenum = 1
let url = $config.basePath + 'prd_product_calculation_query'
let param = {
pagesize: 10,
pagenum: 1,
searchInput: vm.searchInput,
division: window.sessionStorage.division, // 收藏到试算通过产品线查询
}
vm.hlsPopup.showLoading('数据加载中')
vm.hlsHttp.post(url, param).then(function (res) {
......@@ -215,7 +252,27 @@ export default {
vm.$refs.scroll.update(false)
}
})
} else {
vm.pagenum = 1
let url = $config.basePath + 'prd_calculation_query'
let param = {
pagesize: 10,
pagenum: 1,
searchInput: vm.searchInput,
}
vm.hlsPopup.showLoading('数据加载中')
vm.hlsHttp.post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
vm.lists = res.lists
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)
}
})
}
},
},
}
</script>
......
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