Commit 37f2c644 authored by 786817560's avatar 786817560

'提代码'

parent 95b41a94
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2019-10-31 09:49:57 * @Date: 2019-10-31 09:49:57
* @LastEditTime: 2019-11-19 11:12:37 * @LastEditTime: 2019-11-22 10:28:20
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: 合同查询--明细 * @Description: 合同查询--明细
* @FilePath: * @FilePath:
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
</div> </div>
</div> </div>
<div slot="content"> <div slot="content">
<span v-if="item.overdue_times" :class="['status','red']">逾期{{ item.overdue_times }}</span> <span v-if="item.overdue_times != 0" :class="['status','red']">逾期{{ item.overdue_times }}</span>
<div class="plan" @click="toRepayPlans(item.contract_id)"> <div class="plan" @click="toRepayPlans(item.contract_id)">
<img src="@/assets/contractRepayment/plan.png" alt=""> <img src="@/assets/contractRepayment/plan.png" alt="">
<span>还款计划</span> <span>还款计划</span>
......
This diff is collapsed.
...@@ -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-22 09:15:25 * @LastEditTime: 2019-11-22 09:28:00
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
--> -->
<template> <template>
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
ref="scroll" ref="scroll"
:updateData="[lists]" :updateData="[lists]"
:pullUp="true" :pullUp="true"
@pullingUp="loadMore"
> >
<section v-for="(item,index) in lists" :key="index"> <section v-for="(item,index) in lists" :key="index">
<div class="descript" @click="goDetails(item.product_plan_id)"> <div class="descript" @click="goDetails(item.product_plan_id)">
...@@ -147,7 +148,11 @@ export default { ...@@ -147,7 +148,11 @@ export default {
}) })
} else { } else {
let url = $config.basePath + 'prd_calculation_query' let url = $config.basePath + 'prd_calculation_query'
let param = {} let param = {
pagesize: 10,
searchInput: vm.searchInput,
pagenum: vm.pagenum,
}
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()
......
...@@ -177,7 +177,6 @@ export default { ...@@ -177,7 +177,6 @@ export default {
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()
console.log(res)
vm.lists = res.lists vm.lists = res.lists
vm.lists.forEach(item => { vm.lists.forEach(item => {
item['url'] = process.env.filePath + 'attachment_id=' + item.product_attachment_id + '&access_token=' + window.localStorage.access_token item['url'] = process.env.filePath + 'attachment_id=' + item.product_attachment_id + '&access_token=' + window.localStorage.access_token
......
...@@ -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-21 16:51:39 * @LastEditTime: 2019-11-22 09:45:40
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
--> -->
<template> <template>
...@@ -13,38 +13,41 @@ ...@@ -13,38 +13,41 @@
<span>产品选择</span> <span>产品选择</span>
</div> </div>
</h-header> </h-header>
<h-content> <!-- 搜索 -->
<!-- 搜索 --> <div class="search has-header">
<div class="search has-header"> <input v-model="searchInput" type="text" placeholder="请输入产品类别/产品线">
<input type="text" placeholder="请输入产品类别/产品线"> </div>
</div> <scroll
<scroll ref="scrollLists"> ref="scrollLists"
<div class="scroll-box"> :updateData="[prolists]"
:pullUp="true"
@pullingUp="loadMore"
>
<div class="scroll-box">
<div v-for="(item,index) in prolists" :key="index" class="wrap"> <div v-for="(item,index) in prolists" :key="index" class="wrap">
<div class="box" @click="goLists(item.division)"> <div class="box" @click="goLists(item.division)">
<div class="leftPic"> <div class="leftPic">
<img src="@/assets/productQuery/product-query.png" alt="" class="leftPic"> <img src="@/assets/productQuery/product-query.png" alt="" class="leftPic">
</div> </div>
<div class="first"> <div class="first">
<p class="product-class">主机厂</p> <p class="product-class">主机厂</p>
<p class="product">{{ item.factory_bp_name }}</p> <p class="product">{{ item.factory_bp_name }}</p>
</div> </div>
<div class="second"> <div class="second">
<p class="product-class">产品名称</p> <p class="product-class">产品名称</p>
<div class="product"> <div class="product">
<p>{{ item.division_n }}</p> <p>{{ item.division_n }}</p>
</div>
<img src="@/assets/productQuery/down.png" alt="" @click.stop="queryDivision(item.factory_bp_id,index)">
</div> </div>
<!-- <img class="arrow" src="@/assets/productQuery/getIn.png" alt="" > --> <img src="@/assets/productQuery/down.png" alt="" @click.stop="queryDivision(item.factory_bp_id,index)">
</div> </div>
<!-- <img class="arrow" src="@/assets/productQuery/getIn.png" alt="" > -->
</div> </div>
</div> </div>
</scroll> </div>
</h-content> </scroll>
</h-view> </h-view>
</template> </template>
...@@ -57,13 +60,27 @@ export default { ...@@ -57,13 +60,27 @@ export default {
divisionList: [], divisionList: [],
list_flag: false, list_flag: false,
factory_bp_id: '', factory_bp_id: '',
searchInput: '', // 搜索内容
pagenum: 1,
} }
}, },
computed: {}, computed: {},
watch: {}, watch: {
searchInput () {
let vm = this
if (vm.timeout) {
clearTimeout(vm.timeout)
}
vm.timeout = setTimeout(() => {
vm.search()
}, 1000)
},
},
beforeRouteEnter (to, from, next) { beforeRouteEnter (to, from, next) {
if (from.name === 'HomePage') { if (from.name === 'HomePage') {
next(vm => { next(vm => {
vm.searchInput = ''
vm.pagenum = 1
vm.proQuery() vm.proQuery()
}) })
} }
...@@ -71,16 +88,27 @@ export default { ...@@ -71,16 +88,27 @@ export default {
}, },
methods: methods:
{ {
// 产品查询 // 初始产品查询
proQuery () { proQuery () {
let vm = this let vm = this
let url = $config.basePath + 'prd_product_type_list' let url = $config.basePath + 'prd_product_type_list'
let param = { } let param = {
searchInput: vm.searchInput,
pagenum: vm.pagenum,
pagesize: 10,
}
vm.hlsPopup.showLoading('数据加载中') vm.hlsPopup.showLoading('数据加载中')
vm.$post(url, param).then(function (res) { vm.$post(url, param).then(function (res) {
vm.hlsPopup.hideLoading() vm.hlsPopup.hideLoading()
if (res.result === 'S') { if (res.result === 'S') {
vm.prolists = res.lists vm.prolists = res.lists
if (vm.prolists.length === 0) {
vm.$refs.scrollLists.update(true)
} else if (vm.prolists.length > 0 && vm.prolists.length < 10) {
vm.$refs.scrollLists.update(true)
} else if (vm.prolists.length === 10) {
vm.$refs.scrollLists.update(false)
}
} else { } else {
hlsPopup.showLongCenter(res.message) hlsPopup.showLongCenter(res.message)
} }
...@@ -94,6 +122,60 @@ export default { ...@@ -94,6 +122,60 @@ export default {
}) })
}, },
loadMore () {
let vm = this
vm.pagenum = vm.pagenum + 1
let url = $config.basePath + 'prd_product_type_list'
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.scrollLists.update(true)
} else if (returnData.length > 0 && returnData.length < 10) {
returnData.forEach((data, index, array) => {
vm.prolists.push(array[index])
})
vm.$refs.scrollLists.update(true)
} else if (returnData.length === 10) {
returnData.forEach((data, index, array) => {
vm.prolists.push(array[index])
})
vm.$refs.scrollLists.update(false)
}
} else {
hlsPopup.showLongCenter(res.message)
}
})
},
// 搜索
search () {
let vm = this
vm.pagenum = 1
let url = $config.basePath + 'prd_product_type_list'
let param = {
pagesize: 10,
pagenum: vm.pagenum,
searchInput: vm.searchInput,
}
vm.hlsPopup.showLoading('数据加载中')
vm.hlsHttp.post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
vm.prolists = res.lists
if (vm.prolists.length >= 0 && vm.prolists.length < 10) {
vm.$refs.scrollLists.update(true)
} else if (vm.lists.length === 10) {
vm.$refs.scrollLists.update(false)
}
})
},
// 产品线查询val=主机厂id,ind=产品列表索引 // 产品线查询val=主机厂id,ind=产品列表索引
queryDivision (val, ind) { queryDivision (val, ind) {
let vm = this let vm = this
......
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