|
@@ -1,5 +1,11 @@
|
|
|
<template>
|
|
|
<view class="productPricing-content">
|
|
|
+ <view class="top"></view>
|
|
|
+ <view class="status_bar flex justify_between align_center">
|
|
|
+ <u-icon name="arrow-left" color="#191919" size="32" @click="toPage('/pages/sales/index')"></u-icon>
|
|
|
+ <view class="title">产品报价</view>
|
|
|
+ <view><u-icon name="search" color="#999" size="28" @click="search"></u-icon>查询</view>
|
|
|
+ </view>
|
|
|
<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>
|
|
@@ -30,22 +36,22 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="price-all flex justify_between">
|
|
|
- <view class="price-item">
|
|
|
+ <view class="price-all flex">
|
|
|
+ <view class="price-item" v-if="isCostPrice">
|
|
|
<u-count-to :end-val="item.offerCost ? item.offerCost : 0" separator="," font-size="26" :decimals="2"></u-count-to>
|
|
|
<view>成本价</view>
|
|
|
</view>
|
|
|
- <view class="price-item">
|
|
|
- <u-count-to :end-val="item.offerCost ? item.offerCost : 0" separator="," font-size="26" :decimals="2"></u-count-to>
|
|
|
- <view>成本价</view>
|
|
|
+ <view class="price-item" v-if="isCityPrice">
|
|
|
+ <u-count-to :end-val="item.cityPrice ? item.cityPrice : 0" separator="," font-size="26" :decimals="2"></u-count-to>
|
|
|
+ <view>市级价</view>
|
|
|
</view>
|
|
|
- <view class="price-item">
|
|
|
- <u-count-to :end-val="item.offerCost ? item.offerCost : 0" separator="," font-size="26" :decimals="2"></u-count-to>
|
|
|
- <view>成本价</view>
|
|
|
+ <view class="price-item" v-if="isSpecialPrice">
|
|
|
+ <u-count-to :end-val="item.specialPrice ? item.specialPrice : 0" separator="," font-size="26" :decimals="2"></u-count-to>
|
|
|
+ <view>特约价</view>
|
|
|
</view>
|
|
|
- <view class="price-item">
|
|
|
- <u-count-to :end-val="item.offerCost ? item.offerCost : 0" separator="," font-size="26" :decimals="2"></u-count-to>
|
|
|
- <view>成本价</view>
|
|
|
+ <view class="price-item" v-if="isTerminalPrice">
|
|
|
+ <u-count-to :end-val="item.terminalPrice ? item.terminalPrice : 0" separator="," font-size="26" :decimals="2"></u-count-to>
|
|
|
+ <view>终端会员价</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -54,34 +60,82 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</scroll-view>
|
|
|
+ <!-- 搜索弹窗 -->
|
|
|
+ <search :showModal="showModal"/>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import { dealerProductList } from '@/api/sales'
|
|
|
+ import search from './search.vue'
|
|
|
export default{
|
|
|
+ components:{search},
|
|
|
data(){
|
|
|
return{
|
|
|
listData:[],
|
|
|
totalNum:0,
|
|
|
- priceList:[{name:'成本价',checked:false},{name:'市级价',checked:false},{name:'特约价',checked:false},{name:'市级终端价',checked:false}],
|
|
|
+ priceList:[{name:'成本价',checked:false},{name:'市级价',checked:false},{name:'特约价',checked:false},{name:'终端会员价',checked:false}],
|
|
|
pageNo:1,
|
|
|
pageSize:10,
|
|
|
noDataText: '暂无数据',
|
|
|
- theme: ''
|
|
|
+ theme: '',
|
|
|
+ isCostPrice: false,
|
|
|
+ isCityPrice: false,
|
|
|
+ isSpecialPrice: false,
|
|
|
+ isTerminalPrice: false,
|
|
|
+ showModal:false,
|
|
|
+ params:{}
|
|
|
}
|
|
|
},
|
|
|
- onLoad() {
|
|
|
+ onLoad(option) {
|
|
|
this.theme = getApp().globalData.theme
|
|
|
+ this.params = option.data ? JSON.parse(option.data) : {}
|
|
|
this.getList()
|
|
|
},
|
|
|
methods:{
|
|
|
+ toPage(url){
|
|
|
+ uni.switchTab({
|
|
|
+ url:url
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 搜索
|
|
|
+ search(){
|
|
|
+ this.showModal=true
|
|
|
+ console.log('点击的时间里看电视剧')
|
|
|
+ },
|
|
|
// 价格显示
|
|
|
- checkboxChange(e){
|
|
|
- console.log(e,'val ,change')
|
|
|
- // if(val&&val.length>0){
|
|
|
- // const a= val.find(item=>{item=='成本价'})
|
|
|
- // }
|
|
|
+ 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
|
|
|
+ }
|
|
|
},
|
|
|
// 列表
|
|
|
getList(pageNo){
|
|
@@ -89,7 +143,7 @@
|
|
|
if (pageNo) {
|
|
|
this.pageNo = pageNo
|
|
|
}
|
|
|
- let params = { pageNo: this.pageNo, pageSize: this.pageSize }
|
|
|
+ let params = Object.assign(this.params, { pageNo: this.pageNo, pageSize: this.pageSize })
|
|
|
dealerProductList(params).then(res => {
|
|
|
if (res.status == 200) {
|
|
|
if(this.pageNo>1){
|
|
@@ -120,6 +174,23 @@
|
|
|
.productPricing-content{
|
|
|
width:100%;
|
|
|
height: 100vh;
|
|
|
+ .top {
|
|
|
+ top: var(--status-bar-height);
|
|
|
+ }
|
|
|
+ .status_bar {
|
|
|
+ height: 44px;
|
|
|
+ padding: 7px 3px;
|
|
|
+ width: 100%;
|
|
|
+ background-color: #fff;
|
|
|
+ text-align: center;
|
|
|
+ .title{
|
|
|
+ font-weight: 700;
|
|
|
+ font-size: 16px;
|
|
|
+ }
|
|
|
+ // position: fixed;
|
|
|
+ // top: 0px;
|
|
|
+ // z-index: 999;
|
|
|
+ }
|
|
|
.checkbox-price{
|
|
|
background-color: #fff;
|
|
|
display: flex;
|