Commit f0ccf9bd authored by 786817560's avatar 786817560

'拉代码'

parent 372859e3
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Descrip 融资试算 * @Descrip 融资试算
* @Author: your name * @Author: your name
* @Date: 2019-09-29 17:09:49 * @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 * @LastEditors: Please set LastEditors
--> -->
<template> <template>
...@@ -78,11 +78,11 @@ export default { ...@@ -78,11 +78,11 @@ export default {
clearTimeout(vm.timeout) clearTimeout(vm.timeout)
} }
vm.timeout = setTimeout(() => { vm.timeout = setTimeout(() => {
// if (vm.fromProduct) { if (vm.fromProduct) {
// vm.search(vm.fromProduct) vm.search(vm.fromProduct)
// } else { } else {
// vm.search() vm.search()
// } }
}, 1000) }, 1000)
}, },
}, },
...@@ -122,7 +122,7 @@ export default { ...@@ -122,7 +122,7 @@ export default {
}, },
}) })
}, },
// 试算查询 // 初始试算查询
calculationQuery (val) { calculationQuery (val) {
let vm = this let vm = this
if (val) { if (val) {
...@@ -165,57 +165,114 @@ export default { ...@@ -165,57 +165,114 @@ export default {
loadMore () { loadMore () {
let vm = this let vm = this
vm.pagenum = vm.pagenum + 1 if (vm.fromProduct) {
let url = $config.basePath + 'prd_calculation_query' vm.pagenum = vm.pagenum + 1
let param = { let url = $config.basePath + 'prd_product_calculation_query'
searchInput: vm.searchInput, let param = {
pagenum: vm.pagenum, division: window.sessionStorage.division, // 收藏到试算通过产品线查询
pagesize: 10, 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 = {
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)
}
})
} }
vm.hlsPopup.showLoading('数据加载中') },
vm.$post(url, param).then(function (res) {
vm.hlsPopup.hideLoading() search (val) {
let returnData = [] let vm = this
if (res.result === 'S') { if (val) {
returnData = res.lists vm.pagenum = 1
if (returnData.length === 0) { let url = $config.basePath + 'prd_product_calculation_query'
vm.$refs.scroll.update(true) let param = {
} else if (returnData.length > 0 && returnData.length < 10) { pagesize: 10,
returnData.forEach((data, index, array) => { pagenum: 1,
vm.lists.push(array[index]) searchInput: vm.searchInput,
}) division: window.sessionStorage.division, // 收藏到试算通过产品线查询
}
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) vm.$refs.scroll.update(true)
} else if (returnData.length === 10) { } else if (vm.lists.length === 10) {
returnData.forEach((data, index, array) => {
vm.lists.push(array[index])
})
vm.$refs.scroll.update(false) vm.$refs.scroll.update(false)
} }
} else { })
hlsPopup.showLongCenter(res.message) } 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) {
search () { vm.hlsPopup.hideLoading()
let vm = this vm.lists = res.lists
vm.pagenum = 1 if (vm.lists.length >= 0 && vm.lists.length < 10) {
let url = $config.basePath + 'prd_product_calculation_query' vm.$refs.scroll.update(true)
let param = { } else if (vm.lists.length === 10) {
pagesize: 10, vm.$refs.scroll.update(false)
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> </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