Browse Source

1、调整电商模块轮播样式优化
2、app询价求购/商机管理优化

shenjunjie 6 years ago
parent
commit
ada7ed56c1

+ 11 - 4
components/brandCenter/RecommendBrand.vue

@@ -1,17 +1,17 @@
 <template>
   <div class="recommend-brand">
     <div class="brand-content">
-      <div v-swiper:mySwiper="swiperOption" class="swiper-container">
+      <div v-swiper:mySwiper="swiperOption" class="swiper-container" ref="Vswiper">
         <div class="swiper-wrapper">
           <div class="swiper-slide" v-for="banner in sliceBanners">
             <a :href="banner.detailsLink" target="_blank">
               <img :src="banner.pictureLink"/>
             </a>
           </div>
-          <div v-if="sliceBanners.length === 0" class="swiper-button-prev"><i class="iconfont icon-swiper-left"></i></div>
-          <div v-if="sliceBanners.length === 0"class="swiper-button-next"><i class="iconfont icon-swiper-right"></i></div>
+          <div v-show="sliceBanners.length > 1" class="swiper-button-prev"><i class="iconfont icon-swiper-left"></i></div>
+          <div v-show="sliceBanners.length > 1" class="swiper-button-next"><i class="iconfont icon-swiper-right"></i></div>
         </div>
-        <div v-if="sliceBanners.length === 0" class="swiper-pagination swiper-pagination-bullets"></div>
+        <div v-show="sliceBanners.length > 1" class="swiper-pagination swiper-pagination-bullets"></div>
       </div>
     </div>
   </div>
@@ -24,9 +24,12 @@
           autoplay: 6000,
           pagination: '.swiper-pagination',
           paginationClickable: true,
+          // 解决点击分页器后图片就不能轮播的问题
+          autoplayDisableOnInteraction: false,
           mousewheelControl: false,
           effect: 'fade',
           lazyLoading: true,
+          observer: true,
           loop: true,
           prevButton: '.swiper-button-prev',
           nextButton: '.swiper-button-next',
@@ -44,6 +47,10 @@
     created () {
       this.$store.dispatch('loadBrandCarousel')
     },
+    mounted() {
+      this.$nextTick(() => {
+      })
+    },
     computed: {
       banners () {
         return this.$store.state.carousel.brandCarousel.data

+ 3 - 2
components/home/displayCard.vue

@@ -10,7 +10,7 @@
          </ul>
          <ul class="list-unstyled">
            <li ref="pingdanListWrapper" v-for="c in counts" v-if="c"  :style="'top: -' + 30 * timerIndex + 'px'" :class="{'top': isTop}">
-             <span v-for="(item, index) in formatScrollNumber(c.count, c.logo)" class="count-distance" :class="'count' + index">{{item}}</span>
+             <span v-for="(item, index) in formatScrollNumber(c.count, c.logo, c)" class="count-distance" :class="'count' + index">{{item}}</span>
            </li>
          </ul>
        </div>
@@ -71,8 +71,9 @@
       cardClose () {
         this.cardShow = false
       },
-      formatScrollNumber (num, logo) {
+      formatScrollNumber (num, logo, name) {
         if (num) {
+          // console.log(num, logo, name)
           if (num > 99999999) {
             let str2 = num.toString()
             num = Math.floor(num / 100000000)

+ 4 - 2
components/mobile/applyPurchase/SeekList.vue

@@ -111,7 +111,8 @@
                 </p>
                 <p class="remain-time" v-if="item.status === 201 && item.invalid === 0 && item.overdue === 0 && !item.agreed"><span>已报价</span></p>
                 <p class="remain-time" v-if="item.agreed === 1 && item.status === 201 && item.invalid === 0 && item.overdue === 0"><span>已采纳</span></p>
-                <p class="remain-time" v-if="item.invalid === 1 || item.status === 314 || (item.inquiry.check || item.inquiry.check === 1) || item.overdue === 1"><span>已失效</span></p>
+                <!--<p class="remain-time" v-if="item.invalid === 1 || item.status === 314 || (item.inquiry.check || item.inquiry.check === 1) || item.overdue === 1"><span>已失效</span></p>-->
+                <p class="remain-time" v-if="item.invalid === 1 || item.status === 314 || (item.inquiry.check || item.inquiry.check === 1) || item.overdue === 1"><span>已截止</span></p>
                 <a style="margin-top:-1rem;" v-if="(seekType === 'enquiry') && (item.status===200 && item.invalid!==1 && item.overdue !== 1 && (!item.inquiry.check || item.inquiry.check === 0))" @click="goBtobDetails(item.id)">我要报价</a>
                 <a v-else @click="goBtobDetails(item.id)">查看更多</a>
               </div>
@@ -124,7 +125,8 @@
                 </p>
                 <p class="remain-time" v-if="activeType === 'done'"><span>已报价</span></p>
                 <p class="remain-time" v-if="activeType === 'agreed'"><span>已采纳</span></p>
-                <p class="remain-time" v-if="activeType === 'end'"><span>已失效</span></p>
+                <!--<p class="remain-time" v-if="activeType === 'end'"><span>已失效</span></p>-->
+                <p class="remain-time" v-if="activeType === 'end'"><span>已截止</span></p>
                 <!--<a style="margin-top:-1rem;" v-if="(seekType === 'enquiry') && (item.status===200 && item.invalid!==1 && item.overdue !== 1 && (!item.inquiry.check || item.inquiry.check === 0))" @click="goBtobDetails(item.id)">我要报价</a>-->
                 <a @click="goBtobDetails(item.id)">查看更多</a>
               </div>

+ 45 - 13
components/mobile/center/Seek.vue

@@ -21,20 +21,24 @@
         <span class="mobile-switch-btn fours" :class="{'active': activeType==='invalid'}" @click="switchActiveType('invalid')"><b>已失效</b></span>
       </div>
       <div class="seek-title com-switch-item" v-if="userType === 'buyer' && seekType === 'seekPurchase'">
-        <span class="mobile-switch-btn" :class="{'active': activeType==='todo'}" @click="switchActiveType('todo')"><b>待报价</b></span>
-        <span class="mobile-switch-btn" :class="{'active': activeType==='done'}" @click="switchActiveType('done')"><b>已报价</b></span>
+        <span class="mobile-switch-btn" :class="{'active': backType==='seekPurchase'}" @click="switchActiveType( 'seekPurchase')"><b>公共询价</b></span>
+        <span class="mobile-switch-btn" :class="{'active': backType==='purchaseinquiry'}" @click="switchActiveType('purchaseinquiry')"><b>定向询价</b></span>
+        <!--<span class="mobile-switch-btn" :class="{'active': activeType==='todo'}" @click="switchActiveType('todo')"><b>待报价</b></span>-->
+        <!--<span class="mobile-switch-btn" :class="{'active': activeType==='done'}" @click="switchActiveType('done')"><b>已报价</b></span>-->
       </div>
       <div class="seek-title com-switch-item" v-if="userType === 'buyer' && seekType === 'purchaseinquiry'">
-        <span class="mobile-switch-btn fours" :class="{'active': activeType==='todo'}" @click="switchActiveType('todo')"><b>待报价</b></span>
-        <span class="mobile-switch-btn fours" :class="{'active': activeType==='done'}" @click="switchActiveType('done')"><b>已报价</b></span>
-        <span class="mobile-switch-btn fours" :class="{'active': activeType==='agreed'}" @click="switchActiveType('agreed')"><b>已采纳</b></span>
-        <span class="mobile-switch-btn fours" :class="{'active': activeType==='end'}" @click="switchActiveType('end')"><b>已失效</b></span>
+        <span class="mobile-switch-btn" :class="{'active': backType==='seekPurchase'}" @click="switchActiveType( 'seekPurchase')"><b>公共询价</b></span>
+        <span class="mobile-switch-btn" :class="{'active': backType==='purchaseinquiry'}" @click="switchActiveType('purchaseinquiry')"><b>定向询价</b></span>
+        <!--<span class="mobile-switch-btn fours" :class="{'active': activeType==='todo'}" @click="switchActiveType('todo')"><b>待报价</b></span>-->
+        <!--<span class="mobile-switch-btn fours" :class="{'active': activeType==='done'}" @click="switchActiveType('done')"><b>已报价</b></span>-->
+        <!--<span class="mobile-switch-btn fours" :class="{'active': activeType==='agreed'}" @click="switchActiveType('agreed')"><b>已采纳</b></span>-->
+        <!--<span class="mobile-switch-btn fours" :class="{'active': activeType==='end'}" @click="switchActiveType('end')"><b>已失效</b></span>-->
       </div>
       <div class="search-content">
         <input type="text" v-model="seekKeyword" :placeholder="userType === 'buyer' ? '品牌/型号' : '品牌/物料名称/型号/规格/公司'" @keyup.13="onSearch">
         <span @click="onSearch"><i class="iconfont icon-sousuo"></i></span>
       </div>
-      <seek-list :keyword="remindKeyword" :isSearch="isSearch" :userType="userType" :seekType="seekType" :activeType="activeType" :purchaseManList="purchaseManListData"></seek-list>
+      <seek-list v-if="showSeeklist" :keyword="remindKeyword" :isSearch="isSearch" :userType="userType" :seekType="backType" :activeType="activeType" :purchaseManList="purchaseManListData"></seek-list>
       <pull-up :fixId="'mobileFixContent'" :searchMore="fetching" :allPage="allPage" :page="page" @pullUpAction="onPullUpAction"></pull-up>
     </div>
   </div>
@@ -54,7 +58,9 @@
         isChange: false,
         isSearch: false,
         remindKeyword: '',
-        activeType: 'todo'
+        activeType: 'todo',
+        backType: '',
+        showSeeklist: false
       }
     },
     props: ['userType'],
@@ -67,7 +73,7 @@
       'purchase.data': {
         handler: function (val) {
           let list = this.baseUtils.deepCopy(val.content || [])
-          if (this.activeType === 'done' && this.seekType !== 'seekPurchase') {
+          if (this.activeType === 'done' && this.backType !== 'seekPurchase') {
             list.map(val => {
               val.quotations = {
                 replies: val.replies,
@@ -84,6 +90,7 @@
           } else {
             this.purchaseManListData = this.purchaseManListData.concat(list)
           }
+          this.showSeeklist = true
         },
         immediate: true
       }
@@ -109,13 +116,22 @@
           case 'personage': title = '我的商机'; break
           case 'enterprise': title = '公司商机'; break
           case 'enquiry': title = '定向询价'; break
-          case 'seekPurchase': title = '公共询价'; break
-          case 'purchaseinquiry': title = '定向询价'; break
+          case 'seekPurchase': title = '待报价'; break
+          case 'purchaseinquiry': title = '已报价'; break
+          // case 'seekPurchase': title = '公共询价'; break
+          // case 'purchaseinquiry': title = '定向询价'; break
           default: title = '已报价'
         }
         return title
       }
     },
+    created() {
+      if (this.userType === 'buyer') {
+        this.backType = 'seekPurchase'
+      } else {
+        this.backType = this.seekType
+      }
+    },
     mounted () {
 //      获取链接
       this.$nextTick(() => {
@@ -132,14 +148,26 @@
       },
       reloadData: function () {
         // let overdue = this.overdue === 'attention' ? '0' : '1'
-        this.$emit('reloadAction', this.page, this.count, this.seekKeyword, this.seekType, this.activeType)
+        if (this.userType === 'buyer') {
+          let _type = this.seekType === 'seekPurchase' ? 'todo' : 'done'
+          this.$emit('reloadAction', this.page, this.count, this.seekKeyword, this.backType, _type)
+        } else {
+          this.$emit('reloadAction', this.page, this.count, this.seekKeyword, this.seekType, this.activeType)
+        }
       },
       onPullUpAction: function () {
         this.page++
         this.reloadData()
       },
       switchActiveType: function (type) {
-        this.activeType = type
+        // 修改买家中心,顶部头部切换功能
+        if (this.userType === 'buyer') {
+          this.showSeeklist = false
+          this.backType = type
+        } else {
+          this.backType = this.seekType
+          this.activeType = type
+        }
         this.isSearch = false
         this.remindKeyword = this.seekKeyword = ''
         this.page = 1
@@ -149,6 +177,10 @@
       myActiveType: function () {
         if (this.$store.state.option.messageType) {
           this.activeType = 'done'
+        } else if (this.userType === 'buyer' && this.seekType === 'seekPurchase') {
+          this.activeType = 'todo'
+        } else if (this.userType === 'buyer' && this.seekType === 'purchaseinquiry') {
+          this.activeType = 'done'
         } else {
           this.activeType = 'todo'
         }

+ 222 - 0
components/mobile/center/Seek_old.vue

@@ -0,0 +1,222 @@
+<template>
+  <div class="seek">
+    <div class="com-mobile-header mobile-center-header">
+      <a @click="goLastPage"><i class="iconfont icon-fanhui"></i></a>
+      <p>{{seekTitle}}</p>
+      <p class="en-name"><img :src="`/images/mobile/center/${user.data.enterprise.uu ? 'en' : 'self'}.png`" alt="">{{currentEnName}}</p>
+    </div>
+    <div class="mobile-fix-content mobile-centerfix-content" id="mobileFixContent">
+      <div class="seek-title com-switch-item" v-if="userType === 'saler' && seekType === 'enterprise'">
+        <span class="mobile-switch-btn" :class="{'active': activeType==='todo'}" @click="switchActiveType('todo')"><b>待报价</b></span>
+        <span class="mobile-switch-btn" :class="{'active': activeType==='done'}" @click="switchActiveType('done')"><b>已报价</b></span>
+      </div>
+      <div class="seek-title com-switch-item" v-if="userType === 'saler' && seekType === 'personage'">
+        <span class="mobile-switch-btn" :class="{'active': activeType==='todo'}" @click="switchActiveType('todo')"><b>待报价</b></span>
+        <span class="mobile-switch-btn" :class="{'active': activeType==='done'}" @click="switchActiveType('done')"><b>已报价</b></span>
+      </div>
+      <div class="seek-title com-switch-item" v-if="userType === 'saler' && seekType === 'enquiry'">
+        <span class="mobile-switch-btn fours" :class="{'active': activeType==='todo'}" @click="switchActiveType('todo')"><b>待报价</b></span>
+        <span class="mobile-switch-btn fours" :class="{'active': activeType==='done'}" @click="switchActiveType('done')"><b>已报价</b></span>
+        <span class="mobile-switch-btn fours" :class="{'active': activeType==='agreed'}" @click="switchActiveType('agreed')"><b>已采纳</b></span>
+        <span class="mobile-switch-btn fours" :class="{'active': activeType==='invalid'}" @click="switchActiveType('invalid')"><b>已失效</b></span>
+      </div>
+      <div class="seek-title com-switch-item" v-if="userType === 'buyer' && seekType === 'seekPurchase'">
+        <span class="mobile-switch-btn" :class="{'active': activeType==='todo'}" @click="switchActiveType('todo')"><b>待报价</b></span>
+        <span class="mobile-switch-btn" :class="{'active': activeType==='done'}" @click="switchActiveType('done')"><b>已报价</b></span>
+      </div>
+      <div class="seek-title com-switch-item" v-if="userType === 'buyer' && seekType === 'purchaseinquiry'">
+        <span class="mobile-switch-btn fours" :class="{'active': activeType==='todo'}" @click="switchActiveType('todo')"><b>待报价</b></span>
+        <span class="mobile-switch-btn fours" :class="{'active': activeType==='done'}" @click="switchActiveType('done')"><b>已报价</b></span>
+        <span class="mobile-switch-btn fours" :class="{'active': activeType==='agreed'}" @click="switchActiveType('agreed')"><b>已采纳</b></span>
+        <span class="mobile-switch-btn fours" :class="{'active': activeType==='end'}" @click="switchActiveType('end')"><b>已失效</b></span>
+      </div>
+      <div class="search-content">
+        <input type="text" v-model="seekKeyword" :placeholder="userType === 'buyer' ? '品牌/型号' : '品牌/物料名称/型号/规格/公司'" @keyup.13="onSearch">
+        <span @click="onSearch"><i class="iconfont icon-sousuo"></i></span>
+      </div>
+      <seek-list :keyword="remindKeyword" :isSearch="isSearch" :userType="userType" :seekType="seekType" :activeType="activeType" :purchaseManList="purchaseManListData"></seek-list>
+      <pull-up :fixId="'mobileFixContent'" :searchMore="fetching" :allPage="allPage" :page="page" @pullUpAction="onPullUpAction"></pull-up>
+    </div>
+  </div>
+</template>
+<script>
+  import SeekList from '~components/mobile/applyPurchase/SeekList.vue'
+  import { PullUp, EmptyStatus } from '~components/mobile/common'
+  export default {
+    layout: 'mobileNoHeader',
+    middleware: 'authenticated',
+    data () {
+      return {
+        seekKeyword: '',
+        purchaseManListData: [],
+        page: 1,
+        count: 10,
+        isChange: false,
+        isSearch: false,
+        remindKeyword: '',
+        activeType: 'todo'
+      }
+    },
+    props: ['userType'],
+    components: {
+      SeekList,
+      PullUp,
+      EmptyStatus
+    },
+    watch: {
+      'purchase.data': {
+        handler: function (val) {
+          let list = this.baseUtils.deepCopy(val.content || [])
+          if (this.activeType === 'done' && this.seekType !== 'seekPurchase') {
+            list.map(val => {
+              val.quotations = {
+                replies: val.replies,
+                vendName: val.vendName,
+                leadtime: val.leadtime,
+                taxrate: val.taxrate,
+                user: val.user
+              }
+            })
+          }
+          if (this.isChange) {
+            this.purchaseManListData = list
+            this.isChange = false
+          } else {
+            this.purchaseManListData = this.purchaseManListData.concat(list)
+          }
+        },
+        immediate: true
+      }
+    },
+    computed: {
+      seekType () {
+        return this.$route.query.seekType
+      },
+      purchase () {
+        return this.$store.state.applyPurchase.purchaseManList.purchaseManList
+      },
+      fetching () {
+        return this.purchase.fetching
+      },
+      allPage () {
+        return Math.floor(this.purchase.data.totalElements / this.purchase.data.size) + Math.floor(this.purchase.data.totalElements % this.purchase.data.size > 0 ? 1 : 0)
+      },
+      seekTitle () {
+        let title = ''
+        switch (this.seekType) {
+          case 'todo': title = '待报价'; break
+          case 'done': title = '已报价'; break
+          case 'personage': title = '我的商机'; break
+          case 'enterprise': title = '公司商机'; break
+          case 'enquiry': title = '定向询价'; break
+          case 'seekPurchase': title = '公共询价'; break
+          case 'purchaseinquiry': title = '定向询价'; break
+          default: title = '已报价'
+        }
+        return title
+      }
+    },
+    mounted () {
+//      获取链接
+      this.$nextTick(() => {
+        this.myActiveType()
+      })
+    },
+    methods: {
+      onSearch: function () {
+        this.isSearch = true
+        this.remindKeyword = this.seekKeyword
+        this.page = 1
+        this.isChange = true
+        this.reloadData()
+      },
+      reloadData: function () {
+        // let overdue = this.overdue === 'attention' ? '0' : '1'
+        this.$emit('reloadAction', this.page, this.count, this.seekKeyword, this.seekType, this.activeType)
+      },
+      onPullUpAction: function () {
+        this.page++
+        this.reloadData()
+      },
+      switchActiveType: function (type) {
+        this.activeType = type
+        this.isSearch = false
+        this.remindKeyword = this.seekKeyword = ''
+        this.page = 1
+        this.isChange = true
+        this.reloadData()
+      },
+      myActiveType: function () {
+        if (this.$store.state.option.messageType) {
+          this.activeType = 'done'
+        } else {
+          this.activeType = 'todo'
+        }
+      }
+    }
+  }
+</script>
+<style lang="scss" scoped>
+  .search-content {
+    text-align: center;
+    padding: .25rem 0 0 0;
+    input {
+      border: 1px solid #376ff3;
+      width: 7.2rem;
+      margin: 0 0 0 -.02rem;
+    }
+    span {
+      /*height: .46rem;*/
+      /*line-height: .46rem;*/
+    }
+  }
+  $seekTitleLine: .72rem;
+  .product-switch-item {
+    text-align: center;
+    background: #fff;
+    border-bottom: 1px solid #d8d8d8;
+    box-shadow: 0 1px 3px #ddd;
+    .mobile-switch-btn {
+      color: #333;
+      display: inline-block;
+      height: .72rem;
+      line-height: .72rem;
+      font-size: .28rem;
+      width: 1.4rem;
+      &:first-child {
+        margin-right: 1.78rem;
+      }
+      &.active {
+        color: #3f84f6;
+        border-bottom: .04rem solid #3f84f6;
+      }
+    }
+  }
+  .seek-title {
+    height: $seekTitleLine;
+    line-height: $seekTitleLine;
+    .mobile-switch-btn {
+     /* height: $seekTitleLine;
+      line-height: $seekTitleLine;*/
+      font-size: .28rem;
+      &.active {
+        b{
+          border-bottom: .04rem solid #3f84f6;
+        }
+        border-bottom:none;
+      }
+      width:50%;
+      b{
+        display:inline-block;
+         font-weight: normal;
+        line-height: .64rem;
+       }
+      &:first-child{
+        margin:0;
+      }
+      &.fours{
+        width:25%;
+      }
+    }
+  }
+</style>

+ 8 - 0
components/provider/Carousel.vue

@@ -37,6 +37,7 @@
           loop: true,
           effect: this.effect,
           lazyLoading: true,
+          observer: true,
           // 解决点击分页器后图片就不能轮播的问题
           autoplayDisableOnInteraction: false,
           pagination: '.swiper-pagination',
@@ -47,6 +48,13 @@
         }
       }
     },
+    mounted() {
+      this.$nextTick(() => {
+        this.mySwiper.update()
+        // this.mySwiper.slideTo(0, 500, true)
+        // alert(this.mySwiper.activeIndex)
+      })
+    },
     created () {
       this.$store.dispatch('loadBanners', {type: this.storeType + '_banner_carousel'})
     }

+ 12 - 4
components/supplier/banner.vue

@@ -1,16 +1,16 @@
 <template>
   <div class="banner">
-    <div v-swiper:mySwiper="swiperOption" class="swiper-container">
+    <div v-swiper:mySwiper="swiperOption" class="swiper-container" refs="Vswiper">
       <div class="swiper-wrapper">
         <div class="swiper-slide" v-for="banner in banners">
           <a>
             <img :src="banner.pictureLink"/>
           </a>
         </div>
-        <div v-if="banners.length === 0" class="swiper-button-prev"><i class="iconfont icon-swiper-left"></i></div>
-        <div v-if="banners.length === 0"class="swiper-button-next"><i class="iconfont icon-swiper-right"></i></div>
+        <div v-show="banners.length > 1" class="swiper-button-prev"><i class="iconfont icon-swiper-left"></i></div>
+        <div v-show="banners.length > 1" class="swiper-button-next"><i class="iconfont icon-swiper-right"></i></div>
       </div>
-      <div v-if="banners.length === 0" class="swiper-pagination swiper-pagination-bullets"></div>
+      <div v-show="banners.length > 1" class="swiper-pagination swiper-pagination-bullets"></div>
     </div>
   </div>
 </template>
@@ -23,10 +23,13 @@
         swiperOption: {
           autoplay: 6000,
           pagination: '.swiper-pagination',
+          // 解决点击分页器后图片就不能轮播的问题
+          autoplayDisableOnInteraction: false,
           paginationClickable: true,
           mousewheelControl: false,
           effect: 'fade',
           lazyLoading: true,
+          observer: true,
           loop: true,
           prevButton: '.swiper-button-prev',
           nextButton: '.swiper-button-next'
@@ -37,6 +40,11 @@
       banners () {
         return this.$store.state.supplier.detail.banner.data.data || []
       }
+    },
+    mounted() {
+      this.$nextTick(() => {
+        this.mySwiper.update()
+      })
     }
   }
 </script>

+ 2 - 2
pages/mobile/center/user/index.vue

@@ -18,11 +18,11 @@
           </nuxt-link>
           <nuxt-link to="/mobile/center/user/seek?seekType=seekPurchase" tag="li">
             <img src="/images/mobile/center/vendor/seek-done.png" alt="">
-            <p>公共询价</p>
+            <p>待报价</p>
           </nuxt-link>
           <nuxt-link to="/mobile/center/user/seek?seekType=purchaseinquiry" tag="li">
             <img src="/images/mobile/center/vendor/seek-enquiry.png" alt="">
-            <p>定向询价</p>
+            <p>已报价</p>
           </nuxt-link>
         </ul>
       </div>

+ 42 - 37
pages/mobile/center/user/seek.vue

@@ -10,57 +10,62 @@
       let user = store.state.option.user.data
       let params = {
         pageNumber: 1,
-        pageSize: 10,
-        overdue: 0
+        pageSize: 10
       }
       if (user.enterprise.uu) {
         params.enUU = user.enterprise.uu
       } else {
         params.userUU = user.userUU
       }
-      if (query.seekType === 'seekPurchase') {
+      if (query.seekType === 'seekPurchase') { // 待报价
         params.state = 'todo'
+        params.overdue = 0
         return Promise.all([
           store.dispatch('applyPurchase/loadBuyerUnSayPricePurchaseManList', params)
         ])
+      } else {
+        params.state = 'done'
+        return Promise.all([
+          store.dispatch('applyPurchase/loadBuyerPurchaseManList', params)
+        ])
       }
     },
     components: {
       Seek
     },
-    created () {
-      if (this.$route.query && this.$route.query.seekType === 'purchaseinquiry') {
-        let params = {}
-        params.page = 1
-        params.count = 10
-        params._state = 'todo'
-        params.searchFilter = {
-          'fromDate': null,
-          'endDate': null
-        }
-        params.sorting = {
-          'inquiry.date': 'desc',
-          'inquiry.enterprise.enName': 'asc',
-          'inquiry.code': 'asc'
-        }
-        this.$http.get('/purc/inquiry/info/search', {params})
-          .then(response => {
-            let obj = {}
-            if (response.data) {
-              obj.first = response.data.first
-              obj.last = response.data.last
-              obj.number = response.data.page
-              obj.numberOfElements = response.data.totalPage
-              obj.size = response.data.size
-              obj.totalElements = response.data.totalElement
-              obj.content = JSON.parse(JSON.stringify(response.data.content))
-            }
-            this.$store.commit('applyPurchase/purchaseManList/GET_PURCHASEMAN_SUCCESS', obj)
-          }, err => {
-            this.$store.commit('applyPurchase/purchaseManList/GET_PURCHASEMAN_FAILURE', err)
-          })
-      }
-    },
+    // created () {
+    //   if (this.$route.query && this.$route.query.seekType === 'purchaseinquiry') {
+    //     let params = {}
+    //     params.page = 1
+    //     params.count = 10
+    //     params._state = 'todo'
+    //     params.searchFilter = {
+    //       'fromDate': null,
+    //       'endDate': null
+    //     }
+    //     params.sorting = {
+    //       'inquiry.date': 'desc',
+    //       'inquiry.enterprise.enName': 'asc',
+    //       'inquiry.code': 'asc'
+    //     }
+    //     this.$http.get('/purc/inquiry/info/search', {params})
+    //       .then(response => {
+    //         let obj = {}
+    //         if (response.data) {
+    //           obj.first = response.data.first
+    //           obj.last = response.data.last
+    //           obj.number = response.data.page
+    //           obj.numberOfElements = response.data.totalPage
+    //           obj.size = response.data.size
+    //           obj.totalElements = response.data.totalElement
+    //           obj.content = JSON.parse(JSON.stringify(response.data.content))
+    //         }
+    //         this.$store.commit('applyPurchase/purchaseManList/GET_PURCHASEMAN_SUCCESS', obj)
+    //       }, err => {
+    //         this.$store.commit('applyPurchase/purchaseManList/GET_PURCHASEMAN_FAILURE', err)
+    //       })
+    //   }
+    // },
     destroyed() {
       this.$nextTick(() => {
         this.$store.commit('applyPurchase/purchaseManList/GET_PURCHASEMAN_SUCCESS')
@@ -85,7 +90,7 @@
             params.userUU = this.user.data.userUU
           }
           if (otherParamas[1] === 'done') {
-            params._state = 'done'
+            params.state = 'done'
             this.$store.dispatch('applyPurchase/loadBuyerPurchaseManList', params)
           } else {
             params.state = 'todo'

+ 143 - 0
pages/mobile/center/user/seek_old_(48).vue

@@ -0,0 +1,143 @@
+<template>
+  <seek :userType="'buyer'" @reloadAction="reloadData"></seek>
+</template>
+<script>
+  import { Seek } from '~components/mobile/center'
+  export default {
+    layout: 'mobileNoHeader',
+    middleware: 'authenticated',
+    fetch ({ store, query }) {
+      let user = store.state.option.user.data
+      let params = {
+        pageNumber: 1,
+        pageSize: 10,
+        overdue: 0
+      }
+      if (user.enterprise.uu) {
+        params.enUU = user.enterprise.uu
+      } else {
+        params.userUU = user.userUU
+      }
+      if (query.seekType === 'seekPurchase') {
+        params.state = 'todo'
+        return Promise.all([
+          store.dispatch('applyPurchase/loadBuyerUnSayPricePurchaseManList', params)
+        ])
+      }
+    },
+    components: {
+      Seek
+    },
+    created () {
+      if (this.$route.query && this.$route.query.seekType === 'purchaseinquiry') {
+        let params = {}
+        params.page = 1
+        params.count = 10
+        params._state = 'todo'
+        params.searchFilter = {
+          'fromDate': null,
+          'endDate': null
+        }
+        params.sorting = {
+          'inquiry.date': 'desc',
+          'inquiry.enterprise.enName': 'asc',
+          'inquiry.code': 'asc'
+        }
+        this.$http.get('/purc/inquiry/info/search', {params})
+          .then(response => {
+            let obj = {}
+            if (response.data) {
+              obj.first = response.data.first
+              obj.last = response.data.last
+              obj.number = response.data.page
+              obj.numberOfElements = response.data.totalPage
+              obj.size = response.data.size
+              obj.totalElements = response.data.totalElement
+              obj.content = JSON.parse(JSON.stringify(response.data.content))
+            }
+            this.$store.commit('applyPurchase/purchaseManList/GET_PURCHASEMAN_SUCCESS', obj)
+          }, err => {
+            this.$store.commit('applyPurchase/purchaseManList/GET_PURCHASEMAN_FAILURE', err)
+          })
+      }
+    },
+    destroyed() {
+      this.$nextTick(() => {
+        this.$store.commit('applyPurchase/purchaseManList/GET_PURCHASEMAN_SUCCESS')
+      })
+    },
+    computed: {
+      seekType () {
+        return this.$route.query.seekType
+      }
+    },
+    methods: {
+      reloadData: function (page = 1, count = 10, keyword, ...otherParamas) {
+        if (otherParamas[0] === 'seekPurchase') {
+          let params = {
+            pageNumber: page,
+            pageSize: count,
+            keyword: keyword
+          }
+          if (this.user.data.enterprise.uu) {
+            params.enUU = this.user.data.enterprise.uu
+          } else {
+            params.userUU = this.user.data.userUU
+          }
+          if (otherParamas[1] === 'done') {
+            params._state = 'done'
+            this.$store.dispatch('applyPurchase/loadBuyerPurchaseManList', params)
+          } else {
+            params.state = 'todo'
+            params.overdue = 0
+            this.$store.dispatch('applyPurchase/loadBuyerUnSayPricePurchaseManList', params)
+          }
+        } else {
+          let params = {}
+          params.page = page
+          params.count = count
+          params._state = otherParamas[1]
+          params.searchFilter = {
+            'keyword': keyword,
+            'fromDate': null,
+            'endDate': null
+          }
+          params.sorting = {
+            'inquiry.date': 'desc',
+            'inquiry.enterprise.enName': 'asc',
+            'inquiry.code': 'asc'
+          }
+          this.$http.get('/purc/inquiry/info/search', {params})
+            .then(response => {
+              let obj = {}
+              if (response.data) {
+                obj.first = response.data.first
+                obj.last = response.data.last
+                obj.number = response.data.page
+                obj.numberOfElements = response.data.totalPage
+                obj.size = response.data.size
+                obj.totalElements = response.data.totalElement
+                obj.content = JSON.parse(JSON.stringify(response.data.content))
+              }
+              this.$store.commit('applyPurchase/purchaseManList/GET_PURCHASEMAN_SUCCESS', obj)
+            }, err => {
+              this.$store.commit('applyPurchase/purchaseManList/GET_PURCHASEMAN_FAILURE', err)
+            })
+        }
+      }
+    }
+  }
+</script>
+<style lang="scss" scoped>
+  .search-content {
+    text-align: center;
+    padding: .25rem 0 0 0;
+    input {
+      border: 1px solid #376ff3;
+    }
+    span {
+      height: .46rem;
+      line-height: .46rem;
+    }
+  }
+</style>

+ 4 - 4
pages/mobile/center/vendor/index.vue

@@ -29,10 +29,10 @@
             <img src="/images/mobile/center/vendor/seek-done.png" alt="">
             <p>我的商机</p>
           </nuxt-link>
-          <nuxt-link to="/mobile/center/vendor/seek?seekType=enquiry" tag="li">
-            <img src="/images/mobile/center/vendor/seek-enquiry.png" alt="">
-            <p>定向询价</p>
-          </nuxt-link>
+          <!--<nuxt-link to="/mobile/center/vendor/seek?seekType=enquiry" tag="li">-->
+            <!--<img src="/images/mobile/center/vendor/seek-enquiry.png" alt="">-->
+            <!--<p>定向询价</p>-->
+          <!--</nuxt-link>-->
           <nuxt-link to="/mobile/center/vendor/attentionBus" tag="li">
             <img src="/images/mobile/center/vendor/attention-bu.png" alt="">
             <p>商机关注</p>