|
@@ -1,13 +1,13 @@
|
|
|
<template>
|
|
|
<view class="productPricing-content">
|
|
|
- <u-navbar leftText="返回" title="产品报价" :safeAreaInsetTop="false" :border-bottom="false" @leftClick="toPage('/pages/sales/index')">
|
|
|
- <view class="u-nav-slot" slot="right" style="padding-right: 20rpx;">
|
|
|
- <u-icon name="search" color="#999" size="28" @click="search"></u-icon>查询
|
|
|
+ <u-navbar title="产品报价" :safeAreaInsetTop="false" :border-bottom="false" @leftClick="toPage('/pages/sales/index')">
|
|
|
+ <view class="u-nav-slot" slot="right" style="padding-right: 40rpx;" @click="showModal=true">
|
|
|
+ <u-icon name="search" color="#999" size="28"></u-icon>查询
|
|
|
</view>
|
|
|
</u-navbar>
|
|
|
<view class="checkbox-price">
|
|
|
- <u-checkbox-group placement="row" @change="checkboxChange">
|
|
|
- <u-checkbox v-model="item.checked" activeColor="rgb(4, 133, 246)" v-for="(item,index) in priceList" :key="index" :name="item.name" :label="item.name">{{item.name}}</u-checkbox>
|
|
|
+ <u-checkbox-group placement="row">
|
|
|
+ <u-checkbox v-model="item.checked" activeColor="rgb(4, 133, 246)" v-for="(item,index) in priceList" :key="index" :name="item.val">{{item.name}}</u-checkbox>
|
|
|
</u-checkbox-group>
|
|
|
</view>
|
|
|
<scroll-view class="product-list" scroll-y @scrolltolower="onreachBottom">
|
|
@@ -34,31 +34,32 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="price-all flex">
|
|
|
- <view class="price-item" v-if="isCostPrice">
|
|
|
+ <view class="price-item" v-if="priceList[0].checked">
|
|
|
<text>{{toThousands(item.offerCost|| 0,2)}} </text>
|
|
|
<view>成本价</view>
|
|
|
</view>
|
|
|
- <view class="price-item" v-if="isCityPrice">
|
|
|
+ <view class="price-item" v-if="priceList[1].checked">
|
|
|
<text>{{toThousands(item.cityPrice|| 0,2)}} </text>
|
|
|
<view>市级价</view>
|
|
|
</view>
|
|
|
- <view class="price-item" v-if="isSpecialPrice">
|
|
|
+ <view class="price-item" v-if="priceList[2].checked">
|
|
|
<text>{{toThousands(item.specialPrice|| 0,2)}} </text>
|
|
|
<view>特约价</view>
|
|
|
</view>
|
|
|
- <view class="price-item" v-if="isTerminalPrice">
|
|
|
+ <view class="price-item" v-if="priceList[3].checked">
|
|
|
<text>{{toThousands(item.terminalPrice|| 0,2)}} </text>
|
|
|
<view>终端会员价</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view v-if="listData && listData.length == 0">
|
|
|
- <u-empty :text="noDataText" mode="list" :img-width="200" :margin-top="30"></u-empty>
|
|
|
+ <u-empty v-if="listData.length == 0 &&status!='loading'" :text="noDataText" mode="list" ></u-empty>
|
|
|
+ <view style="padding-bottom: 20upx;">
|
|
|
+ <u-loadmore v-if="totalNum>listData.length || status=='loading'" :status="status" />
|
|
|
</view>
|
|
|
</view>
|
|
|
</scroll-view>
|
|
|
<!-- 搜索弹窗 -->
|
|
|
- <search :showModal="showModal"/>
|
|
|
+ <search :showModal="showModal" @refresh="refreshList" @close="showModal=false"/>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -73,22 +74,23 @@
|
|
|
toThousands,
|
|
|
listData:[],
|
|
|
totalNum:0,
|
|
|
- priceList:[{name:'成本价',checked:false},{name:'市级价',checked:false},{name:'特约价',checked:false},{name:'终端会员价',checked:false}],
|
|
|
+ priceList:[
|
|
|
+ { name: '成本价', checked: false, val: 'offerCost' },
|
|
|
+ { name: '市级价', checked: false, val: 'cityPrice' },
|
|
|
+ { name: '特约价', checked: false, val: 'specialPrice' },
|
|
|
+ { name: '终端会员价', checked: false, val: 'terminalPrice' },
|
|
|
+ ],
|
|
|
pageNo:1,
|
|
|
- pageSize:10,
|
|
|
+ pageSize:6,
|
|
|
noDataText: '暂无数据',
|
|
|
theme: '',
|
|
|
- isCostPrice: false,
|
|
|
- isCityPrice: false,
|
|
|
- isSpecialPrice: false,
|
|
|
- isTerminalPrice: false,
|
|
|
+ status: 'loadmore',
|
|
|
showModal:false,
|
|
|
params:{}
|
|
|
}
|
|
|
},
|
|
|
onLoad(option) {
|
|
|
this.theme = getApp().globalData.theme
|
|
|
- this.params = option.data ? JSON.parse(option.data) : {}
|
|
|
this.getList()
|
|
|
},
|
|
|
methods:{
|
|
@@ -97,44 +99,13 @@
|
|
|
url:url
|
|
|
})
|
|
|
},
|
|
|
- // 搜索
|
|
|
- search(){
|
|
|
- this.showModal=true
|
|
|
- console.log('点击的时间里看电视剧')
|
|
|
- },
|
|
|
- // 价格显示
|
|
|
- checkboxChange(val){
|
|
|
- if(val&&val.length>0){
|
|
|
- const a= val.filter(item=>{return item=='成本价'})
|
|
|
- const b= val.filter(item=>{return item=='市级价'})
|
|
|
- const c= val.filter(item=>{return item=='特约价'})
|
|
|
- const d= val.filter(item=>{return item=='终端会员价'})
|
|
|
- if(a&&a.length>0){
|
|
|
- this.isCostPrice=true
|
|
|
- }else{
|
|
|
- this.isCostPrice=false
|
|
|
- }
|
|
|
- if(b&&b.length>0){
|
|
|
- this.isCityPrice=true
|
|
|
- }else{
|
|
|
- this.isCityPrice=false
|
|
|
- }
|
|
|
- if(c&&c.length>0){
|
|
|
- this.isSpecialPrice=true
|
|
|
- }else{
|
|
|
- this.isSpecialPrice=false
|
|
|
- }
|
|
|
- if(d&&d.length>0){
|
|
|
- this.isTerminalPrice=true
|
|
|
- }else{
|
|
|
- this.isTerminalPrice=false
|
|
|
- }
|
|
|
- }else{
|
|
|
- this.isCostPrice=false
|
|
|
- this.isCityPrice=false
|
|
|
- this.isSpecialPrice=false
|
|
|
- this.isTerminalPrice=false
|
|
|
- }
|
|
|
+ // 刷新列表
|
|
|
+ refreshList(val){
|
|
|
+ this.params =val ? val : {},
|
|
|
+ this.$nextTick(function(){
|
|
|
+ this.getList(1)
|
|
|
+ })
|
|
|
+
|
|
|
},
|
|
|
// 列表
|
|
|
getList(pageNo){
|
|
@@ -143,6 +114,7 @@
|
|
|
this.pageNo = pageNo
|
|
|
}
|
|
|
let params = Object.assign(this.params, { pageNo: this.pageNo, pageSize: this.pageSize })
|
|
|
+ this.status = "loading"
|
|
|
dealerProductList(params).then(res => {
|
|
|
if (res.status == 200) {
|
|
|
if(this.pageNo>1){
|
|
@@ -156,6 +128,7 @@
|
|
|
this.totalNum = 0
|
|
|
this.noDataText = res.message
|
|
|
}
|
|
|
+ this.status = "loadmore"
|
|
|
})
|
|
|
},
|
|
|
// scroll-view到底部加载更多
|