Browse Source

Merge branch 'master' into release-20170915

# Conflicts:
#	store/supplier.js
yangc 7 years ago
parent
commit
31cd052009
43 changed files with 2099 additions and 108 deletions
  1. 31 0
      assets/scss/mobileCommon.scss
  2. 51 21
      components/mobile/Home.vue
  3. 1 1
      components/mobile/MobileHeader.vue
  4. 3 1
      components/mobile/applyPurchase/PublishSeek.vue
  5. 269 0
      components/mobile/applyPurchase/PublishSupplierSeek.vue
  6. 5 5
      components/mobile/applyPurchase/SeekList.vue
  7. 2 1
      components/mobile/applyPurchase/index.js
  8. 86 20
      components/mobile/search/MainSearch.vue
  9. 5 2
      components/mobile/store/StoreDetail.vue
  10. 160 0
      components/mobile/supplier/List.vue
  11. 285 0
      components/mobile/supplier/SupplierDetail.vue
  12. 3 0
      components/mobile/supplier/index.js
  13. 1 1
      layouts/error.vue
  14. 1 1
      nuxt.config.js
  15. 0 1
      pages/index.vue
  16. 157 0
      pages/mobile/applyPurchase/list/businessOpportunity.vue
  17. 1 1
      pages/mobile/applyPurchase/list/index.vue
  18. 9 7
      pages/mobile/search/_keycode.vue
  19. 24 17
      pages/mobile/shop/index.vue
  20. 49 0
      pages/mobile/supplier/detail/_uu.vue
  21. 17 0
      pages/mobile/supplier/index.vue
  22. 844 29
      pages/mobile/user/index.vue
  23. BIN
      static/images/mobile/@2x/applyPurchase/opportunity.png
  24. BIN
      static/images/mobile/@2x/home/brand.png
  25. BIN
      static/images/mobile/@2x/home/seek.png
  26. BIN
      static/images/mobile/@2x/home/store.png
  27. BIN
      static/images/mobile/@2x/home/supplier.png
  28. BIN
      static/images/mobile/@2x/istanded.png
  29. BIN
      static/images/mobile/@2x/labelTop.png
  30. BIN
      static/images/mobile/@2x/label_icon.png
  31. BIN
      static/images/mobile/@2x/search/select-arrow.png
  32. BIN
      static/images/mobile/@2x/standed.png
  33. BIN
      static/images/mobile/supplier/address.png
  34. BIN
      static/images/mobile/supplier/business.png
  35. BIN
      static/images/mobile/supplier/email.png
  36. BIN
      static/images/mobile/supplier/house.png
  37. BIN
      static/images/mobile/supplier/is-open.png
  38. BIN
      static/images/mobile/supplier/phone.png
  39. BIN
      static/images/mobile/supplier/tag.png
  40. 10 0
      store/applyPurchase.js
  41. 10 0
      store/shop.js
  42. 28 0
      store/supplier.js
  43. 47 0
      store/supplier/data.js

+ 31 - 0
assets/scss/mobileCommon.scss

@@ -312,6 +312,7 @@ html {
   text-align: center;
   position: relative;
   border-bottom: .02rem solid rgb(219, 219, 219);
+  background: #fff;
   > img {
     width: .36rem;
     height: .38rem;
@@ -337,3 +338,33 @@ html {
     }
   }
 }
+
+/*空状态*/
+.com-none-state{
+  text-align: center;
+  padding:1.5rem 0;
+  background: #fff;
+  margin-top:.1rem;
+  width:100%;
+  img{
+    margin:0 auto;
+    width: 4.08rem;
+    height: 2.62rem;
+  }
+  p {
+    font-size: .32rem;
+    color: #999;
+    margin: 1.19rem 0 0 0;
+  }
+  a {
+    display: block;
+    font-size: .28rem;
+    color: #fff;
+    width: 1.88rem;
+    height: .54rem;
+    line-height: .54rem;
+    background: #418bf6;
+    margin: .7rem auto 0;
+    border-radius: .05rem;
+  }
+}

+ 51 - 21
components/mobile/Home.vue

@@ -14,7 +14,7 @@
           <div class="swiper-pagination swiper-pagination-bullets"></div>
         </div>
         <div class="search-content">
-          <input type="text" placeholder="请输入您要查找的型号或品牌" @click="onHomeSearchClick()">
+          <input type="text" placeholder="请输入您要查找的型号、品牌或店铺" @click="onHomeSearchClick()">
           <span>
         <i class="iconfont icon-sousuo"></i>
       </span>
@@ -23,23 +23,28 @@
       </div>
       <ul class="link-list">
         <li>
-          <nuxt-link to="/mobile/shop">
-            <img src="/images/mobile/@2x/applyPurchase/home/shop.png" alt="">
-            <span>店铺列表</span>
-            <i></i>
+          <nuxt-link to="/mobile/supplier">
+            <img src="/images/mobile/@2x/home/supplier.png" alt="">
+            <span>供应商</span>
           </nuxt-link>
         </li>
         <li>
-          <nuxt-link to="/mobile/brand/brandCenter/ABCD">
-            <img src="/images/mobile/@2x/applyPurchase/home/brand.png" alt="">
-            <span>品牌列表</span>
-            <i></i>
+          <a @click="goOpportunity">
+            <img src="/images/mobile/@2x/home/seek.png" alt="">
+            <span>我的商机</span>
+          </a>
+        </li>
+        <li>
+          <nuxt-link to="/mobile/shop">
+            <img src="/images/mobile/@2x/home/store.png" alt="">
+            <span>店铺列表</span>
+           <!-- <i></i>-->
           </nuxt-link>
         </li>
         <li>
-          <nuxt-link to="/mobile/applyPurchase/list">
-            <img src="/images/mobile/@2x/applyPurchase/home/seek.png" alt="">
-            <span>求购询价</span>
+          <nuxt-link to="/mobile/brand/brandCenter/ABCD">
+            <img src="/images/mobile/@2x/home/brand.png" alt="">
+            <span>品牌中心</span>
           </nuxt-link>
         </li>
       </ul>
@@ -62,11 +67,14 @@
       </div>
     </div>
     <main-search v-if="showMainSearch" @cancelSearchAction="onCancelSearch"></main-search>
+    <remind-box :title="remindText" :timeoutCount="timeoutCount"></remind-box>
+    <login-box @onLoginBoxClose="showLoginBox = false" v-if="showLoginBox"></login-box>
   </div>
 </template>
 <script>
   import SeekList from './applyPurchase/SeekList.vue'
   import MainSearch from '~/components/mobile/search/MainSearch.vue'
+  import { RemindBox, LoginBox } from '~components/mobile/common'
   export default {
     data () {
       return {
@@ -85,12 +93,17 @@
           loop: true,
           prevButton: '.swiper-button-prev',
           nextButton: '.swiper-button-next'
-        }
+        },
+        remindText: '',
+        timeoutCount: 0,
+        showLoginBox: false
       }
     },
     components: {
       SeekList,
-      MainSearch
+      MainSearch,
+      RemindBox,
+      LoginBox
     },
     computed: {
       purchaseManList () {
@@ -104,6 +117,21 @@
       },
       onCancelSearch: function () {
         this.showMainSearch = false
+      },
+      goOpportunity () {
+        if (this.user.logged) {
+          if (this.user.data.enterprise.uu) {
+            this.$router.push('/mobile/applyPurchase/list/businessOpportunity')
+          } else if (this.user.data.enterprise.isVendor !== 313) {
+            this.onRemind('抱歉,您暂未开通卖家中心,可前往PC端开通')
+          }
+        } else {
+          this.showLoginBox = true
+        }
+      },
+      onRemind: function (str) {
+        this.remindText = str
+        this.timeoutCount ++
       }
     }
   }
@@ -111,6 +139,7 @@
 <style lang="scss">
   .home {
     padding-bottom: 1rem;
+    background: #f3f3f7;
     .header {
       height: 3.26rem;
       position: relative;
@@ -140,22 +169,23 @@
       }
     }
     .link-list {
-      background: #f3f3f7;
-      height: 1.36rem;
+      background: #fff;
+      height: 1.56rem;
+      margin-bottom: .2rem;
       li {
         position: relative;
         display: inline-block;
-        width: 33.3%;
+        width: 25%;
         text-align: center;
         float: left;
-        height: 1.36rem;
+        height: 1.56rem;
         img {
-          width: .63rem;
-          height: .63rem;
+          width: .7rem;
+          height: .7rem;
           margin-top: .2rem;
         }
         span {
-          font-size: .22rem;
+          font-size: .26rem;
           color: #666;
           display: block;
           margin-top: .15rem;

+ 1 - 1
components/mobile/MobileHeader.vue

@@ -137,7 +137,7 @@
 //          this.showHeader = false
 //          this.showSearch = false
 //        }
-        this.showHeader = val && val !== '/' && val !== '/mobile/applyPurchase/list'
+        this.showHeader = val && val !== '/' && val !== '/mobile/applyPurchase/list' && !this.startWith(val, '/mobile/supplier')
 //        this.showSearch = val !== '/' && !this.startWith(val, '/mobile/search')
         let title = '优软商城'
         if (this.startWith(val, '/mobile/brand/componentDetail/')) {

+ 3 - 1
components/mobile/applyPurchase/PublishSeek.vue

@@ -333,6 +333,9 @@
       z-index: 1000;
       margin-top: -3.7rem;
       margin-left: -2.96rem;
+      .mobile-modal-header {
+        font-size: .38rem;
+      }
       .publish-seek {
         background: #fff;
         padding-top: .1rem;
@@ -343,7 +346,6 @@
           line-height: .8rem;
           font-size: .26rem;
           text-align: left;
-          border-bottom: 1px solid #d0e3fd;
           input {
             width: 3.49rem;
             height: .52rem;

+ 269 - 0
components/mobile/applyPurchase/PublishSupplierSeek.vue

@@ -0,0 +1,269 @@
+<template>
+  <div class="mobile-modal" v-if="showPublishBox">
+    <div class="mobile-modal-box">
+      <div class="mobile-modal-header">我要询价<i class="icon-guanbi iconfont" @click="cancel"></i></div>
+      <div class="props">
+        <div class="prop">型号:{{applyObj.code || '-'}}</div>
+        <div class="prop">品牌:{{applyObj.brand || '-'}}</div>
+        <div class="prop">类目:{{applyObj.prodTitle || '-'}}</div>
+        <div class="prop">规格:{{applyObj.spec || '-'}}</div>
+      </div>
+      <div class="publish-seek">
+        <div class="content-line">
+          <span><i>*</i>截止日期:</span>
+          <input type="date" v-model="applyObj.deadline" :min="minDay" :max="maxDay" @blur="deadlineChange">
+        </div>
+        <div class="content-line">
+          <span>数量:</span>
+          <input type="text" v-model="applyObj.amount" @blur="checkAmount" @input="onAmountInput">
+        </div>
+        <a @click="goPublish">确认</a>
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+  import { formatDate, cutOutString } from '~utils/baseUtils'
+  export default {
+    props: ['showPublishBox', 'product'],
+    data () {
+      return {
+        applyObj: {
+          code: '',
+          brand: '',
+          amount: '',
+          deadline: '',
+          prodTitle: ''
+        },
+        validObj: {
+          amount: true,
+          deadline: true
+        }
+      }
+    },
+    computed: {
+      minDay: function () {
+        return formatDate(new Date(), 'yyyy-MM-dd')
+      },
+      maxDay: function () {
+        let deadDate = new Date(Date.now() + 1000 * 60 * 60 * 24 * 30 * 3)
+        deadDate = formatDate(deadDate, 'yyyy-MM-dd')
+        return deadDate
+      }
+    },
+    watch: {
+//      showPublishBox: function (val, old) {
+//        if (val) {
+//          document.body.style.position = 'fixed'
+//          document.body.style.left = '0'
+//          document.body.style.right = '0'
+//        } else {
+//          document.body.style.position = 'relative'
+//        }
+//      },
+      product: {
+        handler (val, oldVal) {
+          if (val) {
+            let isStandard = val.standard === 1
+            this.applyObj.code = val.cmpCode
+            this.applyObj.brand = isStandard ? val.pbranden : val.brand
+            this.applyObj.spec = val.spec
+//            this.applyObj.unit = val.unit || 'PCS'
+            this.applyObj.prodTitle = isStandard ? val.kind : val.prodName
+          }
+        },
+        immediate: true
+      }
+    },
+    methods: {
+      cancel: function () {
+        this.$emit('cancelAction')
+      },
+      emptyForm: function () {
+        for (let attr in this.applyObj) {
+          this.applyObj[attr] = ''
+        }
+      },
+      setRemindText: function (str) {
+        this.$emit('remindAction', str)
+      },
+      goPublish: function () {
+        if (this.checkAll()) {
+          let inquiry = {}
+          let inquiryItem = {}
+          if (this.user.data.enterprise) {
+            inquiry.enUU = this.user.data.enterprise.uu
+          }
+          let date = new Date()
+          let endDate = formatDate(this.applyObj.deadline, 'yyyy-MM-dd hh:mm:ss')
+          inquiry.recorderUU = this.user.data.userUU
+          inquiry.code = 'MALL' + date.getTime()
+          inquiry.date = date
+          inquiry.recorder = this.user.data.userName
+          inquiry.endDate = endDate
+          inquiry.sourceapp = 'MALL'
+          inquiryItem.userUU = this.user.data.userUU
+          inquiryItem.source = 'MALL'
+          inquiryItem.userName = this.user.data.userName
+          inquiryItem.userTel = this.user.data.userTel
+          inquiryItem.needquantity = this.applyObj.amount
+          inquiryItem.inbrand = this.applyObj.brand
+          inquiryItem.cmpCode = (this.applyObj.code).toUpperCase()
+          inquiryItem.prodTitle = this.applyObj.prodTitle
+          inquiryItem.date = date
+          inquiryItem.endDate = endDate
+          let inquiryItems = []
+          inquiryItems.push(inquiryItem)
+          inquiry.inquiryItems = inquiryItems
+          this.$http.post('/inquiry/buyer/save', inquiry)
+            .then(response => {
+              //              this.$message.success('发布成功')
+              this.setRemindText('发布成功')
+              //                this.showRemindBox = true
+              this.emptyForm()
+              //                this.validObj.deadline = true
+//              this.$emit('reloadAction')
+              this.cancel()
+            }, error => {
+              console.log(error)
+              //              this.$message.error('发布失败')
+              this.setRemindText('发布失败')
+            })
+        } else {
+          if (!this.validObj.deadline) {
+            this.setRemindText('截止日期不能为空')
+          } else if (!this.validObj.amount) {
+            this.setRemindText('请输入正确的数值')
+          }
+        }
+      },
+      isValidDate: function (date) {
+        let now = new Date(formatDate(new Date(), 'yyyy-MM-dd')).getTime()
+        let time = new Date(date).getTime()
+        return !time || (time >= now && time <= now + 1000 * 60 * 60 * 24 * 91)
+      },
+      deadlineChange: function () {
+        if (!this.isValidDate(this.applyObj.deadline)) {
+          this.setRemindText('日期需不小于今天且在90天以内')
+          this.applyObj.deadline = ''
+          this.validObj.deadline = false
+        } else {
+          this.validObj.deadline = true
+        }
+      },
+      checkAll: function () {
+        return this.checkDeadline() && this.checkAmount()
+      },
+      checkAmount: function () {
+        this.validObj.amount = this.applyObj.amount === '' ? true : this.applyObj.amount > 0 && this.applyObj.amount < 1000000000
+        return this.validObj.amount
+      },
+      checkDeadline: function () {
+        this.validObj.deadline = Boolean(this.applyObj.deadline)
+        return this.validObj.deadline
+      },
+      onAmountInput: function () {
+        if (!(/^[0-9]*$/).test(this.applyObj.amount)) {
+          let chineseIndex = -1
+          for (let i = 0; i < this.applyObj.amount.length; i++) {
+            if (!(/^[0-9]*$/).test(this.applyObj.amount.charAt(i))) {
+              chineseIndex = i
+              break
+            }
+          }
+          this.applyObj.amount = cutOutString(this.applyObj.amount, chineseIndex)
+        } else if (this.applyObj.amount.length > 9) {
+          this.applyObj.amount = cutOutString(this.applyObj.amount, 9)
+        }
+      }
+    }
+  }
+</script>
+<style lang="scss" scoped>
+  .mobile-modal {
+    .mobile-modal-box {
+      position: fixed;
+      width: 5.92rem;
+      font-size: .28rem;
+      top: 50%;
+      left: 50%;
+      right: 11%;
+      z-index: 1000;
+      margin-top: -3.7rem;
+      margin-left: -2.96rem;
+      background: #f3f3f3;
+      .mobile-modal-header {
+        border-radius: 0;
+      }
+      .publish-seek {
+        background: #fff;
+        padding-top: .1rem;
+        padding-bottom: .4rem;
+        .content-line {
+          position: relative;
+          height: .8rem;
+          line-height: .8rem;
+          font-size: .26rem;
+          text-align: left;
+          input {
+            width: 3.49rem;
+            height: .52rem;
+            line-height: normal;
+            padding: .1rem .19rem;
+            border: 1px solid #7e7e7e;
+            font-size: .26rem;
+            vertical-align: middle;
+            background: #fff;
+            border-radius: 0;
+          }
+          > span {
+            display: inline-block;
+            width: 1.76rem;
+            text-align: right;
+            i {
+              color: #ff0000;
+              margin-right: .05rem;
+              font-style: normal;
+            }
+          }
+          > a {
+            font-size: .26rem;
+            color: #666;
+          }
+          > img {
+            width: .12rem;
+            height: .06rem;
+            margin-left: .04rem;
+          }
+        }
+        > a {
+          display: block;
+          width: 5.19rem;
+          height: .84rem;
+          text-align: center;
+          line-height: .84rem;
+          font-size: .38rem;
+          margin: .3rem auto 0;
+          background: #3f84f6;
+          color: #fff;
+          border-radius: .08rem;
+        }
+      }
+      .props {
+        font-size: .28rem;
+        background: #fff;
+        margin: .2rem 0;
+        padding-left: .29rem;
+        .prop {
+          padding-top: .2rem;
+          &:last-child {
+            padding-bottom: .2rem;
+          }
+          span {
+            color: #666;
+          }
+        }
+      }
+    }
+  }
+</style>

+ 5 - 5
components/mobile/applyPurchase/SeekList.vue

@@ -3,7 +3,7 @@
     <ul class="seek-list">
       <li v-for="(item, index) in purchaseManListData">
         <p>
-          <span v-if="item.inquiry.enterprise && item.inquiry.enterprise.enName">{{[item.inquiry.enterprise.enName, user.logged] | enterpriseFilter}}</span>
+          <span v-if="item.inquiry && item.inquiry.enterprise && item.inquiry.enterprise.enName">{{[item.inquiry.enterprise.enName, user.logged] | enterpriseFilter}}</span>
           <span v-else>{{[item.userName, user.logged] | userNameFilter}}</span>
         </p>
         <div>
@@ -42,8 +42,8 @@
             </p>
             <p class="over-deadline" v-else>已截止</p>
             <!--<a v-if="!userType && item.quoted == 1">已报价</a>-->
-            <a v-if="!userType && item.remainingTime > 0 && (!item.quoted || item.quoted != 1) && (user.logged && ((item.inquiry.enterprise && user.data.enterprise && (item.inquiry.enterprise.uu === user.data.enterprise.uu)) || (!user.data.enterprise.uu && item.userUU == user.data.userUU  && !item.inquiry.enterprise)))" class="self-publish" @click="onRemind('此为贵公司的求购')">我要报价</a>
-            <a v-if="!(userType == 'saler' && seekType  && seekType != 'wait') && (item.remainingTime > 0 && (!item.quoted || item.quoted != 1) && !(user.logged && ((item.inquiry.enterprise && user.data.enterprise && (item.inquiry.enterprise.uu === user.data.enterprise.uu)) || (!user.data.enterprise.uu && item.userUU == user.data.userUU))))" @click="goSayPrice(item.id, index)">我要报价</a>
+            <a v-if="!userType && item.remainingTime > 0 && (!item.quoted || item.quoted != 1) && (user.logged && ((item.inquiry && item.inquiry.enterprise && user.data.enterprise && (item.inquiry.enterprise.uu === user.data.enterprise.uu)) || (!user.data.enterprise.uu && item.userUU == user.data.userUU  && !item.inquiry.enterprise)))" class="self-publish" @click="onRemind('此为贵公司的求购')">我要报价</a>
+            <a v-if="!(userType == 'saler' && seekType  && seekType != 'wait') && (item.remainingTime > 0 && (!item.quoted || item.quoted != 1) && !(user.logged && ((item.inquiry && item.inquiry.enterprise && user.data.enterprise && (item.inquiry.enterprise.uu === user.data.enterprise.uu)) || (!user.data.enterprise.uu && item.userUU == user.data.userUU))))" @click="goSayPrice(item.id, index)">我要报价</a>
             <a v-if="((!userType || userType == 'buyer') && (seekType  && seekType != 'wait')) || (userType == 'saler' && seekType  && seekType != 'wait') || item.quoted == 1" @click="goSayPriceInfo(item.quteId || item.id, item.agreed, index)">查看报价</a>
           </div>
         </div>
@@ -198,8 +198,8 @@ export default {
 </script>
 <style lang="scss" scoped>
   .seek-list {
-    width: 7.26rem;
-    margin: .13rem auto 0;
+    padding: .13rem .12rem 0;
+    background: #fff;
 
     li {
       border: 1px solid #e0e0e4;

+ 2 - 1
components/mobile/applyPurchase/index.js

@@ -1,4 +1,5 @@
 import SayPriceInfo from './SayPriceInfo.vue'
 import SayPrice from './SayPrice.vue'
+import PublishSupplierSeek from './PublishSupplierSeek.vue'
 
-export { SayPriceInfo, SayPrice }
+export { SayPriceInfo, SayPrice, PublishSupplierSeek }

+ 86 - 20
components/mobile/search/MainSearch.vue

@@ -1,7 +1,14 @@
 <template>
-  <div class="main-search" @touchstart="cancelFocus" id="main-search">
+  <div class="main-search" @touchstart="cancelFocus" @click="setShowSearchType(false)" id="main-search">
     <div class="main-search-header">
-      <input type="text" id="search-box" v-model="keyword" placeholder="请输入您要查找的型号或品牌" @keyup.13="onSearch()">
+      <div class="options" @click="setShowSearchType(!showSearchType, $event)">
+        {{searchType == 'product' ? '产品' : '店铺'}}
+        <i></i>
+        <ul v-if="showSearchType">
+          <li @click="setSearchType(searchType == 'product' ? 'store' : 'product', $event)">{{searchType == 'product' ? '店铺' : '产品'}}</li>
+        </ul>
+      </div>
+      <input type="text" id="search-box" v-model="keyword" :placeholder="searchType == 'product' ? '请输入您要查找的型号/品牌/类目' : '请输入您要查找的店铺'" @keyup.13="onSearch()">
       <span @click="onSearch()">搜索</span>
       <a @click="cancelSearch">取消</a>
     </div>
@@ -16,7 +23,7 @@
       <div class="search-history" v-if="searchHistory && searchHistory.length > 0">
         <p>历史搜索<i class="iconfont icon-lajitong" @click="deleteHistory"></i></p>
         <ul>
-          <li v-for="item in searchHistory" @click="onSearch(item.keyword)">
+          <li v-for="item in searchHistory" @click="onSearch(item)">
             <a>{{item.keyword}}</a>
           </li>
         </ul>
@@ -40,7 +47,9 @@
         keyword: '',
         associate: {
           show: false
-        }
+        },
+        searchType: 'product',
+        showSearchType: false
       }
     },
     props: {
@@ -68,12 +77,22 @@
 //      }
 //    },
     methods: {
-      onSearch (key) {
-        if (key && key !== '') {
-          this.keyword = key
-        }
-        if (this.keyword) {
-          this.$router.push({path: '/mobile/search?w=' + encodeURIComponent(this.keyword)})
+      onSearch (item) {
+        if (item) {
+          this.keyword = item.keyword
+          if (item.type === 'SEARCH_STORE') {
+            this.$router.push('/mobile/shop?keyword=' + encodeURIComponent(this.keyword))
+          } else if (item.type === 'SEARCH_PRODUCT') {
+            this.$router.push('/mobile/search?w=' + encodeURIComponent(this.keyword))
+          }
+        } else {
+          if (this.keyword) {
+            if (this.searchType === 'product') {
+              this.$router.push('/mobile/search?w=' + encodeURIComponent(this.keyword))
+            } else if (this.searchType === 'store') {
+              this.$router.push('/mobile/shop?keyword=' + encodeURIComponent(this.keyword))
+            }
+          }
         }
       },
       onChange () {
@@ -88,8 +107,10 @@
         }
       },
       searchKeywords () {
-        this.$store.dispatch('searchKeywords', { keyword: this.keyword })
-        this.associate.show = true
+        if (this.searchType === 'product') {
+          this.$store.dispatch('searchKeywords', { keyword: this.keyword })
+          this.associate.show = true
+        }
       },
       onAssociateClick (word) {
         this.keyword = word
@@ -105,6 +126,18 @@
         this.$http.delete('/search/searchHistory').then(response => {
           this.$store.dispatch('searchData/getSearchHistory')
         })
+      },
+      setSearchType (type, $event) {
+        $event.stopPropagation()
+        this.searchType = type
+        this.setShowSearchType(false)
+        this.associate.show = false
+      },
+      setShowSearchType (flag, e) {
+        if (e) {
+          e.stopPropagation()
+        }
+        this.showSearchType = flag
       }
     },
     created () {
@@ -148,18 +181,19 @@
     top: -2rem;
     bottom: 0;
     .main-search-header {
+      position: relative;
       height: .88rem;
       background: #3e82f5;
-      padding-left: .5rem;
+      padding-left: .3rem;
       line-height: .88rem;
       margin-top: 2rem;
       input {
-        width: 4.78rem;
+        width: 4.88rem;
         height: .62rem;
         line-height: .62rem;
-        font-size: .28rem;
+        font-size: .26rem;
         color: #999;
-        padding-left: .2rem;
+        padding-left: .92rem;
         border: .04rem solid #fff;
         background: #fff;
         outline: none;
@@ -167,8 +201,8 @@
         float: left;
         margin-top: .12rem;
         -webkit-appearance: none;
-        border-top-left-radius: .05rem;
-        border-bottom-left-radius: .05rem;
+        border-top-left-radius: .14rem;
+        border-bottom-left-radius: .14rem;
       }
       span {
         display: inline-block;
@@ -179,8 +213,8 @@
         color: #366df3;
         font-size: .28rem;
         margin-left: .02rem;
-        border-top-right-radius: .05rem;
-        border-bottom-right-radius: .05rem;
+        border-top-right-radius: .14rem;
+        border-bottom-right-radius: .14rem;
         background: #fff;
         float: left;
         margin-top: .12rem;
@@ -190,6 +224,38 @@
         color: #fff;
         margin-left: .2rem;
       }
+      .options {
+        position: absolute;
+        left: .3rem;
+        font-size: .26rem;
+        width: .9rem;
+        padding-left: .15rem;
+        background: url('/images/mobile/@2x/search/select-arrow.png') no-repeat;
+        background-size: .14rem .12rem;
+        background-position: .68rem .36rem;
+        i {
+          height: .46rem;
+          width: .01rem;
+          background: #eceef0;
+          display: block;
+          float: right;
+          margin-top: .18rem;
+        }
+        ul {
+          position: absolute;
+          left: 0;
+          li {
+            width: 1rem;
+            height: .7rem;
+            border-radius: .02rem;
+            background: rgba(0, 0, 0, .6);
+            font-size: .26rem;
+            color: rgba(255, 255, 255, .89);
+            text-align: center;
+            line-height: .7rem;
+          }
+        }
+      }
     }
     .associate-list {
       background: #fff;

+ 5 - 2
components/mobile/store/StoreDetail.vue

@@ -3,7 +3,7 @@
     <div class="store-logo">
       <div class="store-logo-box">
         <img :src="store.logoUrl || '/images/component/default.png'"/>
-        <i class="iconfont icon-shoucang" :style="isFocus === 'true'?'color:#ff7800':'color: #ddd'" @click="collectStore"></i>
+        <i v-if="showIcon" class="iconfont icon-shoucang" :style="isFocus === 'true'?'color:#ff7800':'color: #ddd'" @click="collectStore"></i>
       </div>
     </div>
     <div class="store-switch-item">
@@ -74,7 +74,7 @@
       </table>
       <div v-if="!commodities.content || commodities.content.length == 0" class="no-product">
         <img src="/images/mobile/@2x/car@2x.png" alt="">
-        <div>抱歉,暂无产品信息</div>
+        <div>抱歉,暂无上架产品信息</div>
       </div>
     </div>
     <remind-box :title="collectResult" :timeoutCount="timeoutCount"></remind-box>
@@ -154,6 +154,9 @@
       },
       user () {
         return this.$store.state.option.user
+      },
+      showIcon() {
+        return this.store.uuid !== this.$store.state.option.storeStatus.data.uuid
       }
     },
     methods: {

+ 160 - 0
components/mobile/supplier/List.vue

@@ -0,0 +1,160 @@
+<template>
+  <div class="supplier-list mobile-content">
+    <div class="mobile-header">
+      <a @click="goLastPage"><i class="iconfont icon-fanhui"></i></a>
+      <div class="search-content">
+        <input type="text" v-model="keyword" placeholder="请输入您要查找的供应商" @keyup.13="search">
+        <span @click="search">
+        <i class="iconfont icon-sousuo"></i>
+        </span>
+      </div>
+    </div>
+    <ul>
+      <li v-for="item in listData">
+        <nuxt-link :to="`/mobile/supplier/detail/${item.enUU}?isStore=${item.isStore}`">
+        <img v-if="item.isStore == 1" class="open" src="/images/mobile/supplier/is-open.png" alt="">
+        <span>{{item.enName}}</span>
+        <img class="tag" src="/images/mobile/supplier/tag.png" alt="">
+        </nuxt-link>
+      </li>
+    </ul>
+  </div>
+</template>
+<script>
+  export default {
+    data () {
+      return {
+        keyword: '',
+        isSearchSearchingMore: false,
+        page: 1,
+        size: 10,
+        listData: [],
+        isChange: false,
+        isDataChange: false
+      }
+    },
+    mounted: function () {
+      this.$nextTick(() => {
+        window.addEventListener('scroll', this.scroll, false)
+      })
+    },
+    watch: {
+      'list': {
+        handler (val, oldVal) {
+          if (this.isChange) {
+            this.listData = val.content
+            this.page = 1
+            this.isChange = false
+            this.isDataChange = true
+          } else {
+            this.listData = this.listData.concat(val.content)
+            this.isSearchSearchingMore = false
+            this.isDataChange = false
+          }
+        },
+        immediate: true
+      }
+    },
+    computed: {
+      list () {
+        return this.$store.state.supplier.data.list.data
+      },
+      allPage () {
+        return Math.floor(this.list.totalElements / this.list.size) + Math.floor(this.list.totalElements % this.list.size > 0 ? 1 : 0)
+      }
+    },
+    methods: {
+      goLastPage: function () {
+        window.history.back(-1)
+      },
+      scroll: function () {
+        let scrolled = document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop
+        if (Math.ceil(scrolled + window.screen.availHeight) >= document.body.scrollHeight && !this.isSearchSearchingMore && this.page < this.allPage) {
+          this.getMoreSearch()
+        }
+      },
+      getMoreSearch: function () {
+        this.page++
+        this.isSearchSearchingMore = true
+        this.reloadData()
+      },
+      reloadData: function () {
+        this.$store.dispatch('supplier/getSupplierList', {keyword: this.keyword, page: this.page, size: this.size})
+      },
+      search: function () {
+        this.page = 1
+        this.isChange = true
+        this.reloadData()
+      }
+    }
+  }
+</script>
+<style lang="scss" scoped>
+    .supplier-list {
+      height: 100%;
+      background: #29a9f9;
+      .mobile-header {
+        position: fixed;
+        top: 0;
+        z-index: 10;
+        width:100%;
+        height:.88rem;
+        line-height: .88rem;
+        background: #3e82f5;
+        padding:0 .2rem 0 .1rem;
+        color:#fff;
+        > a {
+          font-size:.28rem;
+          color:#fff;
+          position: absolute;
+          i {
+            font-size: .48rem;
+            margin-right: -.1rem;
+          }
+        }
+        .search-content {
+          margin-left: .5rem;
+          line-height: normal;
+          padding-top: .14rem;
+          input {
+            color: #333;
+            width: 6.48rem;
+            line-height: normal;
+          }
+          span {
+            height: .46rem;
+            line-height: .46rem;
+          }
+        }
+      }
+      ul {
+        margin: .26rem auto 0;
+        width: 6.91rem;
+        li {
+          position: relative;
+          height: 1.21rem;
+          background: #fff;
+          line-height: 1.21rem;
+          padding-left: .74rem;
+          font-size: .32rem;
+          margin-bottom: .14rem;
+          border-radius: .05rem;
+          .open {
+            width: 1.35rem;
+            position: absolute;
+            top: -.08rem;
+            left: -.1rem;
+          }
+          .tag {
+            width: 1.08rem;
+            position: absolute;
+            right: -.1rem;
+            top: .16rem;
+          }
+          span {
+            color: #333;
+          }
+        }
+      }
+    }
+</style>

+ 285 - 0
components/mobile/supplier/SupplierDetail.vue

@@ -0,0 +1,285 @@
+<template>
+  <div class="supplier-detail">
+    <img v-if="$route.query.isStore === '1'" class="open" src="/images/mobile/supplier/is-open.png" alt="">
+    <div class="detail">
+      <h1>{{enInfo.enName}} <nuxt-link v-if="$route.query.isStore === '1'" :to="`/mobile/shop/${storeInfo.uuid}`"><i class="iconfont icon-xiangyou"></i></nuxt-link></h1>
+      <div class="line">
+        <div class="img-wrap">
+          <img src="/images/mobile/supplier/business.png" alt="">
+        </div>
+        <span>营业执照号:</span>
+        <span>{{enInfo.enBussinessCode || '-'}}</span>
+      </div>
+      <div class="line">
+        <div class="img-wrap">
+          <img src="/images/mobile/supplier/address.png" alt="">
+        </div>
+        <span>地址:</span>
+        <span>{{enInfo.enAddress || '-'}}</span>
+      </div>
+      <div class="line">
+        <div class="img-wrap">
+          <img src="/images/mobile/supplier/email.png" alt="">
+        </div>
+        <span>邮箱:</span>
+        <span>{{enInfo.enEmail || '-'}}</span>
+      </div>
+      <div class="line">
+        <div class="img-wrap">
+          <img src="/images/mobile/supplier/phone.png" alt="">
+        </div>
+        <span>电话:</span>
+        <span>{{enInfo.enTel || '-'}}</span>
+      </div>
+      <div class="line">
+        <div class="img-wrap">
+          <img src="/images/mobile/supplier/house.png" alt="">
+        </div>
+        <span>行业:</span>
+        <span>{{enInfo.enIndustry || '-'}}</span>
+      </div>
+    </div>
+    <div class="list">
+      <div class="search-content">
+        <input type="text" placeholder="请输入您要查找的型号或品牌" @keyup.13="search" v-model="key">
+        <span @click="search" >
+        <i class="iconfont icon-sousuo"></i>
+        </span>
+      </div>
+      <ul>
+        <li v-for="product in productListData">
+          <div class="prop">
+            <span class="head">型号/品牌:</span>
+            <span class="item">{{product.cmpCode || '—'}}</span>
+            <span class="item">{{(product.standard == 1 ? product.pbranden : product.brand) || '—'}}</span>
+          </div>
+          <div class="prop">
+            <span class="head">类目/规格:</span>
+            <span class="item">{{(product.standard == 1 ? product.kind : product.prodName) || '—'}}</span>
+            <span class="item">{{product.spec || '—'}}</span>
+          </div>
+          <div class="prop">
+            <span class="head">单位:</span>
+            <span class="item">{{product.unit || 'PCS'}}</span>
+          </div>
+          <a class="seek-btn" @click="publish(product)">立即询价</a>
+        </li>
+      </ul>
+    </div>
+    <publish-supplier-seek :product="currentProduct" :showPublishBox="showPublishBox" @cancelAction="showPublishBox = false" @remindAction="onRemind"></publish-supplier-seek>
+    <remind-box :title="remindText" :timeoutCount="timeoutCount"></remind-box>
+    <login-box @onLoginBoxClose="showLoginBox = false" v-if="showLoginBox"></login-box>
+  </div>
+</template>
+<script>
+  import { PublishSupplierSeek } from '~components/mobile/applyPurchase'
+  import { RemindBox, LoginBox } from '~components/mobile/common'
+  export default {
+    data () {
+      return {
+        key: '',
+        isSearchSearchingMore: false,
+        page: 1,
+        size: 10,
+        productListData: [],
+        isChange: false,
+        isDataChange: false,
+        showPublishBox: false,
+        remindText: '',
+        timeoutCount: 0,
+        currentProduct: {},
+        showLoginBox: false
+      }
+    },
+    components: {
+      PublishSupplierSeek,
+      RemindBox,
+      LoginBox
+    },
+    mounted: function () {
+      this.$nextTick(() => {
+        window.addEventListener('scroll', this.scroll, false)
+      })
+    },
+    watch: {
+      '$store.state.supplier.data.productList.data': {
+        handler (val, oldVal) {
+          if (this.isChange) {
+            this.productListData = val.content
+            this.page = 1
+            this.isChange = false
+            this.isDataChange = true
+          } else {
+            this.productListData = this.productListData.concat(val.content)
+            this.isSearchSearchingMore = false
+            this.isDataChange = false
+          }
+        },
+        immediate: true
+      }
+    },
+    computed: {
+      enInfo () {
+        return this.$store.state.supplier.data.enterpriseData.data
+      },
+      productList () {
+        return this.$store.state.supplier.data.productList.data
+      },
+      allPage () {
+        return Math.floor(this.productList.totalElements / this.productList.size) + Math.floor(this.productList.totalElements % this.productList.size > 0 ? 1 : 0)
+      },
+      storeInfo () {
+        return this.$store.state.shop.storeInfo.store.data
+      }
+    },
+    methods: {
+      scroll: function () {
+        let scrolled = document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop
+        if (Math.ceil(scrolled + window.screen.availHeight) >= document.body.scrollHeight && !this.isSearchSearchingMore && this.page < this.allPage) {
+          this.getMoreSearch()
+        }
+      },
+      getMoreSearch: function () {
+        this.page++
+        this.isSearchSearchingMore = true
+        this.reloadData()
+      },
+      reloadData: function () {
+        this.$store.dispatch('supplier/getSupplierProductList', { vendUU: this.$route.params.uu, page: this.page, size: this.size, keyword: this.key })
+      },
+      search: function () {
+        this.page = 1
+        this.isChange = true
+        this.reloadData()
+      },
+      publish: function (product) {
+        if (this.user.logged) {
+          this.currentProduct = product
+          this.showPublishBox = true
+        } else {
+          this.showLoginBox = true
+        }
+      },
+      onRemind: function (str) {
+        this.remindText = str
+        this.timeoutCount ++
+      },
+      goLastPage: function () {
+        window.history.back(-1)
+      }
+    }
+  }
+</script>
+<style lang="scss" scoped>
+  .supplier-detail {
+    background: #29a9f9;
+    padding: .38rem .19rem;
+    position: relative;
+    margin-bottom: 1rem;
+    .open {
+      position: absolute;
+      height: .58rem;
+      left: -.1rem;
+      top: .15rem;
+    }
+    .detail {
+      height: 4.46rem;
+      padding: 0 .31rem;
+      background: #fff;
+      overflow: hidden;
+      border-radius: .05rem;
+      h1 {
+        height: 1.11rem;
+        line-height: 1.11rem;
+        text-align: center;
+        font-size: .44rem;
+        border-bottom: 1px solid rgba(0, 0, 0, .26);
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+        i {
+          color: #3f84f6;
+          font-size: .31rem;
+          float: right;
+        }
+      }
+      .line {
+        margin-top: .26rem;
+        font-size: .28rem;
+        color: #666;
+        padding: 0 .15rem;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+        .img-wrap {
+          width: .3rem;
+          text-align: center;
+          display: inline-block;
+          margin-right: .31rem;
+          img {
+            height: .25rem;
+          }
+        }
+      }
+    }
+    .list {
+      background: #f2f2f2;
+      margin-top: .21rem;
+      border-radius: .05rem;
+      .search-content {
+        padding-top: .15rem;
+        padding-bottom: .15rem;
+        text-align: center;
+        input {
+          border: 1px solid #3f84f6;
+        }
+      }
+      ul {
+        li {
+          &:nth-child(odd) {
+            background: #fff;
+          }
+          position: relative;
+          padding: .29rem 0 .16rem .22rem;
+          overflow: hidden;
+          .prop {
+            margin-bottom: .11rem;
+            font-size: .28rem;
+            &:last-child {
+              margin-bottom: 0;
+            }
+            .head {
+              color: #666;
+            }
+            .item {
+              display: inline-block;
+              width: 1.68rem;
+              overflow: hidden;
+              text-overflow: ellipsis;
+              white-space: nowrap;
+              margin-right: .18rem;
+              vertical-align: middle;
+              &:last-child {
+                margin-right: 0;
+              }
+            }
+          }
+          .seek-btn {
+            position: absolute;
+            right: .17rem;
+            top: .67rem;
+            display: block;
+            width: 1.5rem;
+            height: .44rem;
+            line-height: .44rem;
+            text-align: center;
+            color: #fff;
+            background: #3f84f6;
+            border-radius: .22rem;
+            font-size: .26rem;
+          }
+        }
+      }
+    }
+  }
+</style>

+ 3 - 0
components/mobile/supplier/index.js

@@ -0,0 +1,3 @@
+import List from './List.vue'
+import SupplierDetail from './SupplierDetail.vue'
+export { List, SupplierDetail }

+ 1 - 1
layouts/error.vue

@@ -15,7 +15,7 @@
   export default {
     props: ['error'],
     layout (context) {
-      return context.store.state.option.isMobile ? 'login' : 'default'
+      return context.store.state.option.isMobile ? 'none' : 'default'
     },
     computed: {
       isMobile () {

+ 1 - 1
nuxt.config.js

@@ -1,6 +1,6 @@
 const path = require('path')
 const isProdMode = Object.is(process.env.NODE_ENV, 'production')
-const baseUrl = process.env.BASE_URL || (isProdMode ? 'http://api.usoftmall.com/' : 'http://10.1.51.125:8080/platform-b2c')
+const baseUrl = process.env.BASE_URL || (isProdMode ? 'http://api.usoftmall.com/' : 'http://192.168.253.121:9090/platform-b2c')
 const commonUrl = process.env.COMMON_URL || (isProdMode ? 'https://api-inquiry.usoftmall.com/' : 'http://218.17.158.219:24000/')
 const materialUrl = process.env.MATERIAL_URL || (isProdMode ? 'https://api-product.usoftmall.com/' : 'http://218.17.158.219:24000/')
 

+ 0 - 1
pages/index.vue

@@ -105,7 +105,6 @@
         store.dispatch('applyPurchase/loadPurchaseManList', {pageNumber: 1, pageSize: 50, enUU: store.state.option.user.data.enterprise ? store.state.option.user.data.enterprise.uu : null}),
         store.dispatch('loadStoreStatus', { op: 'check' })
       ]) : Promise.all([
-        store.dispatch('loadStoreStatus', { op: 'check' }),
         store.dispatch('applyPurchase/loadMobileHomeList', {pageNumber: 1, pageSize: 5, enUU: store.state.option.user.data.enterprise ? store.state.option.user.data.enterprise.uu : null})
       ])
     },

+ 157 - 0
pages/mobile/applyPurchase/list/businessOpportunity.vue

@@ -0,0 +1,157 @@
+<template>
+  <div class="mobile-content">
+    <div class="mobile-header">
+      <a @click="goLastPage"><i class="iconfont icon-fanhui"></i></a>
+      <div class="search-content">
+        <input type="text" v-model="seekKeyword" placeholder="请输入您要查找的型号或品牌" @keyup.13="searchSeek" ref="searchSeekInput" @focus="inputGetFocus()" @blur="blur()">
+        <span @click="searchSeek">
+        <i class="iconfont icon-sousuo"></i>
+        </span>
+      </div>
+    </div>
+    <div class="seek-title">
+      <img src="/images/mobile/@2x/applyPurchase/opportunity.png" alt="">
+      <span>我的商机</span>
+    </div>
+    <seek-list v-if="purchaseManListData && purchaseManListData.length" :purchaseManList="purchaseManListData" :isDataChange="isDataChange"></seek-list>
+    <div class="com-none-state" v-else>
+      <img src="/images/mobile/@2x/car@2x.png">
+      <p>对个人物料库进行维护后,可获得更多的商机哦!</p>
+      <nuxt-link to="/">返回首页</nuxt-link>
+    </div>
+    <loading v-show="isSearchSearchingMore"></loading>
+    <div v-if="purchaseManList && false"></div>
+  </div>
+</template>
+<script>
+  import SeekList from '~components/mobile/applyPurchase/SeekList.vue'
+  import {Loading} from '~components/mobile/common'
+  export default {
+    layout: 'mobile',
+    components: {
+      SeekList,
+      Loading
+    },
+    data () {
+      return {
+        isSearchSearchingMore: false,
+        page: 1,
+        size: 10,
+        purchaseManListData: [],
+        showSeekSearch: true,
+        seekKeyword: '',
+        isChange: false,
+        isDataChange: false
+      }
+    },
+    mounted: function () {
+      this.$nextTick(() => {
+        window.addEventListener('scroll', this.scroll, false)
+      })
+    },
+//    watch: {
+//      $route: function (val, oldVal) {
+//        window.removeEventListener('scroll', this.scroll, false)
+//      }
+//    },
+    fetch ({store}) {
+      return Promise.all([
+          store.dispatch('applyPurchase/loadVendorPushList', {pageNumber: 1, pageSize: 10, sorting: {'releaseDate': 'DESC'}, enuu: store.state.option.user.data.enterprise ? store.state.option.user.data.enterprise.uu : null, useruu: store.state.option.user.data.userUU})
+      ])
+    },
+    computed: {
+      purchaseManList () {
+        let list = this.$store.state.applyPurchase.purchaseManList.purchaseManList.data
+        if (this.isChange) {
+          this.purchaseManListData = []
+          this.seekPage = 1
+          this.isChange = false
+          this.isDataChange = true
+        } else {
+          this.purchaseManListData = this.purchaseManListData.concat(list.content || [])
+          this.isSearchSearchingMore = false
+          this.isDataChange = false
+        }
+        return this.$store.state.applyPurchase.purchaseManList.purchaseManList.data
+      },
+      allPage () {
+        return Math.floor(this.purchaseManList.totalElements / this.purchaseManList.size) + Math.floor(this.purchaseManList.totalElements % this.purchaseManList.size > 0 ? 1 : 0)
+      }
+    },
+    methods: {
+      scroll: function () {
+        let scrolled = document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop
+        if (Math.ceil(scrolled + window.screen.availHeight) >= document.body.scrollHeight && !this.isSearchSearchingMore && this.page < this.allPage) {
+          this.getMoreSearch()
+        }
+        if (this.$refs.searchSeekInput && this.$store.state.mobile.InputGetFocus) {
+          this.$refs.searchSeekInput.blur()
+        }
+      },
+      blur: function() {
+        // setTimeout(() => {
+        this.$store.dispatch('mobile/SetInputGetFocus', false)
+        // }, 300)
+      },
+      inputGetFocus: function() {
+        setTimeout(() => {
+          this.$store.dispatch('mobile/SetInputGetFocus', true)
+        }, 300)
+      },
+      getMoreSearch: function () {
+        this.page++
+        this.isSearchSearchingMore = true
+        this.reloadData()
+      },
+      reloadData: function () {
+        this.$store.dispatch('applyPurchase/loadVendorPushList', {pageNumber: this.page, pageSize: this.size, sorting: {'releaseDate': 'DESC'}, keyword: this.seekKeyword, enuu: this.user.data.enterprise ? this.$store.state.option.user.data.enterprise.uu : null, useruu: this.user.data.userUU})
+      },
+      goLastPage: function () {
+        window.history.back(-1)
+      },
+      searchSeek: function () {
+        this.page = 1
+        this.isChange = true
+        this.reloadData()
+      }
+    }
+  }
+</script>
+<style lang="scss" scoped>
+  .mobile-content {
+    .mobile-header {
+      position: fixed;
+      top: 0;
+      z-index: 10;
+      width:100%;
+      height:.88rem;
+      line-height: .88rem;
+      background: #3e82f5;
+      padding:0 .2rem 0 .1rem;
+      color:#fff;
+      > a {
+        font-size:.28rem;
+        color:#fff;
+        position: absolute;
+        i {
+          font-size: .48rem;
+          margin-right: -.1rem;
+        }
+      }
+      .search-content {
+        margin-left: .5rem;
+        line-height: normal;
+        padding-top: .14rem;
+        input {
+          color: #333;
+          width: 6.48rem;
+          line-height: normal;
+        }
+        span {
+          height: .46rem;
+          line-height: .46rem;
+        }
+      }
+    }
+  }
+</style>

+ 1 - 1
pages/mobile/applyPurchase/list/index.vue

@@ -139,7 +139,7 @@
         padding-top: .14rem;
         input {
           color: #333;
-          width: 5.78rem;
+          width: 6.48rem;
           line-height: normal;
         }
         span {

+ 9 - 7
pages/mobile/search/_keycode.vue

@@ -30,13 +30,15 @@
       </div>
     </div>
 
-    <div class="detail-brand" v-for="(item, index) in searchLists" :style="index == 0 ? 'padding-top: .2rem;' : ''" v-if="searchLists.length > 0">
-      <div class="brand-item" @click="goComponent(item.uuid)">
-        <p>店铺:<span>{{item.storeName || '-'}}</span></p>
-        <p>型号:<span>{{item.code || '-'}}</span></p>
-        <p>品牌:<span>{{item.brandEn || item.brand.nameCn || '-'}}</span></p>
-        <p>产品描述:<span>{{item.description || '-'}}</span></p>
-        <i class="iconfont icon-shoucang" :style="(item.isFocus)?'color:#ff7800':'color:#bbb'" @click="collect(item, $event)"></i>
+    <div v-if="searchLists && searchLists.length > 0" >
+      <div class="detail-brand" v-for="(item, index) in searchLists" :style="index == 0 ? 'padding-top: .2rem;' : ''" v-if="item">
+        <div class="brand-item" @click="goComponent(item.uuid)">
+          <p>店铺:<span>{{item.storeName || '-'}}</span></p>
+          <p>型号:<span>{{item.code || '-'}}</span></p>
+          <p>品牌:<span>{{item.brandEn || item.brand.nameCn || '-'}}</span></p>
+          <p>产品描述:<span>{{item.description || '-'}}</span></p>
+          <i class="iconfont icon-shoucang" :style="(item.isFocus)?'color:#ff7800':'color:#bbb'" @click="collect(item, $event)"></i>
+        </div>
       </div>
     </div>
 

+ 24 - 17
pages/mobile/shop/index.vue

@@ -11,22 +11,29 @@
         <li @click="onDown('CONSIGNMENT')" v-show="downName !== '寄售'">寄售</li>
       </ul>
     </div>
-    <div class="shop-list" v-for="item in searchLists" @click="goStoreDetail(item.uuid)" v-if="item">
-      <h3>{{item.storeName}}</h3>
-      <div class="list-item">
-        <div class="item-img">
-          <i :style="'background:url(' + isType(item.type) + ')no-repeat 0 0/.65rem .33rem;'"></i>
-          <img :src="item.logoUrl || '/images/component/default.png'">
-        </div>
-        <div class="list-item-phone">
-          <p>电话:<span>{{item.enterprise.enTel}}</span></p>
-          <p>传真:<span>{{item.enterprise.enFax}}</span></p>
-          <!--<p>商家介绍: <nuxt-link :to="'/mobile/merchantDescription/'+item.uuid">点击查看</nuxt-link></p>-->
-          <p>联系商家:<a @click="selectStoreInfo(item, $event)">点击查看</a></p>
-          <i class="iconfont icon-shoucang" :style="item.isFocus=='true'?'color:#ff7800':'color:#bbb'" @click="focusStore(item, $event)"></i>
+    <div v-if="searchLists && searchLists.length">
+      <div class="shop-list" v-for="item in searchLists" @click="goStoreDetail(item.uuid)">
+        <h3>{{item.storeName}}</h3>
+        <div class="list-item">
+          <div class="item-img">
+            <i :style="'background:url(' + isType(item.type) + ')no-repeat 0 0/.65rem .33rem;'"></i>
+            <img :src="item.logoUrl || '/images/component/default.png'">
+          </div>
+          <div class="list-item-phone">
+            <p>电话:<span>{{item.enterprise.enTel}}</span></p>
+            <p>传真:<span>{{item.enterprise.enFax}}</span></p>
+            <!--<p>商家介绍: <nuxt-link :to="'/mobile/merchantDescription/'+item.uuid">点击查看</nuxt-link></p>-->
+            <p>联系商家:<a @click="selectStoreInfo(item, $event)">点击查看</a></p>
+            <i class="iconfont icon-shoucang" :style="item.isFocus=='true'?'color:#ff7800':'color:#bbb'" @click="focusStore(item, $event)"></i>
+          </div>
         </div>
       </div>
     </div>
+    <div class="com-none-state" v-else>
+      <img src="/images/mobile/@2x/search-empty.png">
+      <p>抱歉,暂无搜索结果</p>
+      <nuxt-link to="/">返回首页</nuxt-link>
+    </div>
     <remind-box :title="collectResult" :timeoutCount="timeoutCount"></remind-box>
     <loading v-show="isSearchingMore"></loading>
     <div class="mobile-modal" v-if="showStoreInfo">
@@ -71,9 +78,9 @@
       Loading,
       LoginBox
     },
-    fetch ({ store }) {
+    fetch ({ store, query }) {
       return Promise.all([
-        store.dispatch('provider/findStoreListInMobil', { page: 1, count: 10, types: 'ORIGINAL_FACTORY-DISTRIBUTION-AGENCY-CONSIGNMENT' })
+        store.dispatch('provider/findStoreListInMobil', { page: 1, count: 10, types: 'ORIGINAL_FACTORY-DISTRIBUTION-AGENCY-CONSIGNMENT', keyword: query.keyword || null })
       ])
     },
     computed: {
@@ -115,7 +122,7 @@
         if (!this.isSearchingMore) {
           this.page++
           this.isSearchingMore = true
-          this.$store.dispatch('provider/findStoreListInMobil', { page: this.page, count: this.count, types: this.types })
+          this.$store.dispatch('provider/findStoreListInMobil', { page: this.page, count: this.count, types: this.types, keyword: this.$route.query.keyword || null })
         }
       },
       isType (type) {
@@ -149,7 +156,7 @@
         } else if (type === 'ORIGINAL_FACTORY-DISTRIBUTION-AGENCY-CONSIGNMENT') {
           this.downName = '全部'
         }
-        this.$store.dispatch('provider/findStoreListInMobil', { page: 1, count: 10, types: type })
+        this.$store.dispatch('provider/findStoreListInMobil', { page: 1, count: 10, types: type, keyword: this.$route.query.keyword || null })
       },
       focusStore: function (item, $event) {
 //        item.isFocus = item.isFocus === 'false' ? 'true' : 'false'

+ 49 - 0
pages/mobile/supplier/detail/_uu.vue

@@ -0,0 +1,49 @@
+<template>
+  <div>
+    <div class="sl-title">
+      供应商详情<i class="iconfont icon-fanhui" @click="goLast"></i>
+    </div>
+    <supplier-detail></supplier-detail>
+  </div>
+</template>
+<script>
+  import { SupplierDetail } from '~components/mobile/supplier'
+  export default {
+    layout: 'mobile',
+    fetch ({ store, params, query }) {
+      let promises = [
+        store.dispatch('supplier/getSupplierEnInfo', {uu: params.uu}),
+        store.dispatch('supplier/getSupplierProductList', { vendUU: params.uu, page: 1, size: 10 })
+      ]
+      if (query.isStore === '1') {
+        promises.push(store.dispatch('shop/findStoreInfoFromEnUU', {enUU: params.uu, filter: 'enUU'}))
+      }
+      return Promise.all(promises)
+    },
+    components: {
+      SupplierDetail
+    },
+    methods: {
+      goLast: function () {
+        window.history.back(-1)
+      }
+    }
+  }
+</script>
+<style lang="scss" scoped>
+  .sl-title {
+    position: relative;
+    height: .72rem;
+    font-size: .35rem;
+    color: #fff;
+    background: #3f84f6;
+    text-align: center;
+    line-height: .72rem;
+    i {
+      position: absolute;
+      left: .32rem;
+      top: 0;
+    }
+  }
+</style>
+

+ 17 - 0
pages/mobile/supplier/index.vue

@@ -0,0 +1,17 @@
+<template>
+  <list></list>
+</template>
+<script>
+  import { List } from '~components/mobile/supplier'
+  export default {
+    layout: 'mobile',
+    fetch ({ store }) {
+      return Promise.all([
+        store.dispatch('supplier/getSupplierList', {page: 1, size: 10})
+      ])
+    },
+    components: {
+      List
+    }
+  }
+</script>

+ 844 - 29
pages/mobile/user/index.vue

@@ -24,18 +24,24 @@
       <li :class="{active: activeType == 'comp'}" @click="activeType = 'comp'">器件收藏</li>
       <li :class="{active: activeType == 'store'}" @click="activeType = 'store'">店铺关注</li>
     </ul>
-    <div v-if="activeType == 'seek'">
-      <div class="seek" v-if="userType !== 'saler'">
-        <ul class="seek-type">
+    <ul class="switch-list" v-if="userType !== 'buyer'">
+      <li :class="{active: activeType == 'oppor'}"   @click="activeType = 'oppor'">我的商机</li>
+      <li :class="{active: activeType == 'provider'}"  @click="activeType = 'provider'">产品管理</li>
+      <li :class="{active: activeType == 'mystore'}"  @click="activeType = 'mystore'">我的店铺</li>
+    </ul>
+    <!-- 买家中心 我的求购 -->
+    <div v-if="activeType == 'seek' || activeType == 'oppor'">
+      <div class="seek">
+        <ul class="seek-type" v-if="userType !== 'saler'">
           <li :class="{active: seekType == 'wait'}" @click="switchSeek('wait')"><div>待报价</div></li>
           <li :class="{active: seekType == 'done'}" @click="switchSeek('done')"><div>已报价</div></li>
           <!--<li :class="{active: seekType == 'accept'}" @click="switchSeek('accept')"><div>已采纳</div></li>-->
         </ul>
+        <ul class="seek-type" v-if="userType === 'saler'">
+          <li :class="{active: seekType == 'wait'}" style="border-top: 0px" @click="switchSeek('wait')"><div>全部</div></li>
+          <li :class="{active: seekType == 'done'}" style="border-top: 0px" @click="switchSeek('done')"><div>已报价</div></li>
+        </ul>
       </div>
-      <ul class="switch-list vendor-switch" v-if="userType === 'saler'">
-        <li :class="{active: seekType == 'wait'}" @click="switchSeek('wait')"><div>全部</div></li>
-        <li :class="{active: seekType == 'done'}" @click="switchSeek('done')"><div>已报价</div></li>
-      </ul>
       <div class="search-content">
         <input type="text" placeholder="请输入您要查找的型号或品牌" v-model="seekKeyword" @keyup.13="searchSeek" ref="searchSeekInput" @focus="inputGetFocus()" @blur="blur()">
         <span @click="searchSeek" >
@@ -44,6 +50,9 @@
       </div>
       <seek-list :userType="userType" :seekType="seekType" :purchaseManList="purchaseManListData" :isDataChange="isDataChange"></seek-list>
     </div>
+    <!-- /end 买家中心 我的求购 -->
+
+    <!-- 买家中心 店铺关注 -->
     <div class="shop-list" v-bind:key="item.id" v-if="activeType == 'store'" v-for="item in focusPage.content" @click="goStoreDetail(item.storeInfo.uuid)">
       <h3>{{item.storeName}}</h3>
       <div class="list-item">
@@ -59,6 +68,8 @@
         </div>
       </div>
     </div>
+    <!-- /end 买家中心 店铺关注 -->
+    <!-- 买家中心 器件收藏 -->
     <div class="detail-brand" v-bind:key="index" v-for="(item, index) in collectSave.content" v-if="activeType == 'comp'" @click="goComponentDetail(item.componentinfo.uuid)">
       <a>
         <div class="brand-item">
@@ -69,7 +80,139 @@
         </div>
       </a>
     </div>
-    <div class="none-state" v-if="(activeType != 'seek') && ((collectSave.totalElements == 0 && activeType == 'comp') || (focusPage.totalElements == 0 && activeType == 'store') || (collectSave.totalElements == 0 && focusPage.totalElements == 0))">
+    <!--/end  买家中心 器件收藏 -->
+
+    <!-- 卖家中心 我的店铺 -->
+    <div v-if="activeType == 'mystore'" class="mystore">
+      <div ></div>
+    </div>
+    <!-- /end 卖家中心 我的店铺 -->
+
+    <!-- 卖家中心 产品管理 -->
+    <div v-if="activeType == 'provider'" class="provider">
+      <div class="seek">
+        <ul class="seek-type" >
+          <li :class="{active: providerType == 'enterprise'}" style="width: 33.3%" @click="switchprovide('enterprise')"><div>企业产品库</div></li>
+          <li :class="{active: providerType == 'person'}" style="width: 33.3%" @click="switchprovide('person')"><div>个人产品库</div></li>
+          <li :class="{active: providerType == 'onLine'}" style="width: 33.3%" @click="switchprovide('onLine')"><div>在售产品</div></li>
+        </ul>
+      </div>
+      <div class="search-content" style="border-bottom: 1px solid #f5f5f5;padding-bottom: 0.25rem">
+        <input type="text" placeholder="请输入您要查找的型号或品牌" v-model="seekKeyword" @keyup.13="searchSeek" ref="searchSeekInput" @focus="inputGetFocus()" @blur="blur()">
+        <span @click="searchSeek" >
+        <i class="iconfont icon-sousuo"></i>
+        </span>
+      </div>
+      <div v-bind:key="item.id"  v-for="(item, index) in GetEnterpriseListData" class="providerList">
+        <div v-if="providerType !== 'onLine'">
+          <div class="top">
+            <div class="icon" :class="item.standard ? 'standed' : 'istanded'"></div>
+            <div class="text">
+              {{item.pcmpcode}}
+            </div>
+          </div>
+          <div class="content">
+            <div class="fl">
+              <div class="linetext">类目(产品名称):{{item.kinden || '-'}}</div>
+              <div class="linetext">品牌:{{item.pbranden}}</div>
+              <div class="linetext">单位:PCS</div>
+            </div>
+            <div class="fr" :class="providerType == 'enterprise' && item.batchCount > 0 ? '' : 'addtop'" >
+              <div class="look" v-if="item.batchCount && providerType == 'enterprise'" @click="lookProductitem(item.id, item)">查看产品</div>
+              <div class="add" v-if="providerType == 'enterprise'" @click="addProtoperson(item)">加入个人产品</div>
+              <div class="delete" v-if="providerType == 'person'" @click="deleteProvider(item.id, index)">删除</div>
+            </div>
+          </div>
+        </div>
+        <div v-else>
+          <div class="top top2">
+            <div class="icon" :class="item.standard ? 'standed' : 'istanded'"></div>
+            <div class="text">
+              {{item.code}}
+            </div>
+            <div class="pms">
+              {{(storeInfo.uuid != 'undefind' && item.storeid == storeInfo.uuid && storeInfo.storeName.indexOf('优软测试二') < 0 && storeInfo.storeName.indexOf('优软商城') < 0) ? '自营' : '寄售'}}
+            </div>
+          </div>
+          <div class="middle">
+            <div class="list">
+              <div class="fl">
+                <div class="name">类目(产品名称):</div>
+                <div class="text">{{item.kindNameCn || '-'}}</div>
+              </div>
+              <div class="fr">
+                <div class="textinfo" v-if="item.breakUp">可拆卖</div>
+              </div>
+            </div>
+            <div class="list">
+              <div class="fl">
+                <div class="name">品牌:</div>
+                <div class="text">{{item.brandNameEn}}</div>
+              </div>
+              <div class="fr">
+                <div class="name">交期(天):</div>
+                <div class="text" v-if="item.b2cMaxDelivery && (item.b2cMaxDelivery != item.b2cMinDelivery)" v-text="item.b2cMinDelivery + '-'+ item.b2cMaxDelivery"></div>
+                <div class="text" v-if="item.b2cMaxDelivery && (item.b2cMaxDelivery == item.b2cMinDelivery)" v-text="item.b2cMinDelivery"></div>
+              </div>
+            </div>
+
+            <div class="list">
+              <div class="fl">
+                <div class="name">包装数量:</div>
+                <div class="text">{{item.minPackQty}}</div>
+              </div>
+              <div class="fr">
+                <div class="name">库存:</div>
+                <div class="text">{{item.reserve}}</div>
+              </div>
+            </div>
+
+            <div class="list">
+              <div class="fl">
+                <div class="name">包装方式:</div>
+                <div class="text">{{item.packaging || '无包装信息'}}</div>
+              </div>
+              <div class="fr">
+                <div class="name">起订量:</div>
+                <div class="text" style="color: #f31919">{{item.minBuyQty}}</div>
+              </div>
+            </div>
+
+            <div class="list">
+              <div class="name">生产日期:</div>
+              <div class="text" :title="item.produceDate">{{item.produceDate || '-'}}</div>
+            </div>
+
+            <div class="list">
+              <div class="name left">价格梯度:</div>
+              <div class="table left">
+                <ul>
+                  <li class="title">
+                    <div>分段数量/PCS</div>
+                    <div>分段单价</div>
+                  </li>
+                  <li v-for="price in item.prices">
+                    <div>{{price.start}}+</div>
+                    <div v-if="item.currencyName == 'RMB'">¥{{price.rMBPrice}}</div>
+                    <div v-else>${{price.rMBPrice}}</div>
+                  </li>
+                </ul>
+              </div>
+            </div>
+
+          </div>
+          <div class="labelinfo">
+            <div class="labelicon">标签</div>
+            <div class="labeltext">{{item.tag}}</div>
+          </div>
+        </div>
+      </div>
+      <!--<div v-else v-bind:key="index" v-for="(item, index) in GetEnterpriseListData" class="providerList">-->
+        <!---->
+      <!--</div>-->
+    </div>
+    <!-- /end 卖家中心 产品管理 -->
+    <div class="none-state" v-if="(activeType != 'seek') && ((collectSave.totalElements == 0 && activeType == 'comp') || (focusPage.totalElements == 0 && activeType == 'store') || (collectSave.totalElements == 0 && focusPage.totalElements == 0) || GetEnterpriseListData.totalElements == 0)">
       <img src="/images/mobile/@2x/empty-collect.png">
       <p v-text="getRemindText()"></p>
       <nuxt-link to="/">返回首页</nuxt-link>
@@ -90,6 +233,106 @@
     <loading v-show="isSearchSearchingMore"></loading>
     <div v-if="purchaseManList && false"></div>
     <div v-if="purchaseManListFetching && false"></div>
+    <!--<div v-if="EnterpriseList && false"></div>-->
+    <!-- 删除提示框 -->
+    <div class="deleteKuang" v-show="showDelete">
+      <div class="kuangContent">
+        <div class="title">删除信息</div>
+        <div class="titleinfo">是否删除此信息</div>
+        <!--<div class="info" v-show="isUploadpro">*存在已上架信息</div>-->
+        <div class="K_btn">
+          <div class="cancelBtn" @click="cancelFn()">取消</div>
+          <div class="answerBtn" @click="deleteFn()">确定</div>
+        </div>
+      </div>
+    </div>
+    <!-- /end 删除提示框 -->
+    <!-- 企业产品库 查看信息 -->
+    <div class="deleteKuang" v-show="showMoreinfn">
+      <div class="Kuang">
+        <div class="title">产品信息<i data-v-4faa6b2d="" @click="closeMoreinfo()" class="icon-guanbi iconfont"></i></div>
+        <div class="content">
+          <div class="infob">
+            <div class="info"><div class="name">型号:</div><div>{{cnmpCode}}</div></div>
+            <div class="info"><div class="name">类目(产品名称):</div><div>{{cnmpType || '-'}}</div></div>
+            <div class="info"><div class="name">品牌:</div><div>{{cnmpBand}}</div></div>
+          </div>
+          <div class="content_sq" v-bind:key="item.id" v-for="(item, index) in vendorlist" >
+            <div class="labelBg">
+              <div class="labelinfo" style="margin-left: -0.1rem">
+                <div class="labelicon" style="vertical-align:top;margin-top: 0.09rem">标签</div>
+                <div class="labeltext">{{item.tag}}</div>
+              </div>
+              <div class="middle">
+                <div class="list">
+                  <div class="fl">
+                    <div class="name">
+                      <div class="pms">
+                        {{(storeInfo.uuid != 'undefind' && item.storeid == storeInfo.uuid && storeInfo.storeName.indexOf('优软测试二') < 0 && storeInfo.storeName.indexOf('优软商城') < 0) ? '自营' : '寄售'}}</div>
+                      </div>
+                  </div>
+                  <div class="fr">
+                    <div class="textinfo" v-if="item.breakUp">可拆卖</div>
+                  </div>
+                </div>
+                <div class="list">
+                  <div class="fl">
+                    <div class="name">包装数量:</div>
+                    <div class="text">{{item.minPackQty}}</div>
+                  </div>
+                  <div class="fr">
+                    <div class="name">交期(天):</div>
+                    <div class="text" v-if="item.b2cMaxDelivery && (item.b2cMaxDelivery != item.b2cMinDelivery)" v-text="item.b2cMinDelivery + '-'+ item.b2cMaxDelivery"></div>
+                    <div class="text" v-if="item.b2cMaxDelivery && (item.b2cMaxDelivery == item.b2cMinDelivery)" v-text="item.b2cMinDelivery"></div>
+                  </div>
+                </div>
+
+                <div class="list">
+                  <div class="fl">
+                    <div class="name">包装方式:</div>
+                    <div class="text">{{item.packaging || '无包装信息'}}</div>
+                  </div>
+                  <div class="fr">
+                    <div class="name">库存:</div>
+                    <div class="text">{{item.reserve}}</div>
+                  </div>
+                </div>
+
+                <div class="list">
+                  <div class="fl">
+                    <div class="name">生产日期:</div>
+                    <div class="text" :title="item.produceDate">{{item.produceDate || '-'}}</div>
+                  </div>
+                  <div class="fr">
+                    <div class="name">起订量:</div>
+                    <div class="text" style="color: #f31919">{{item.minBuyQty}}</div>
+                  </div>
+                </div>
+
+                <div class="list">
+                  <div class="name left">价格梯度:</div>
+                  <div class="table left">
+                    <ul>
+                      <li class="title">
+                        <div>分段数量/PCS</div>
+                        <div>分段单价</div>
+                      </li>
+                      <li v-for="price in item.prices">
+                        <div>{{price.start}}+</div>
+                        <div v-if="item.currencyName == 'RMB'">¥{{price.rMBPrice}}</div>
+                        <div v-else>${{price.rMBPrice}}</div>
+                      </li>
+                    </ul>
+                  </div>
+                </div>
+
+              </div>
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+    <!-- /end 企业产品库 查看信息 -->
   </div>
 </template>
 
@@ -120,7 +363,15 @@
         seekSize: 10,
         purchaseManListData: [],
         isDataChange: false,
-        showEnterpriseToggle: false
+        showEnterpriseToggle: false,
+        providerType: 'enterprise',
+        GetEnterpriseListData: [],
+        isUploadpro: 1, // 是否存在已上架信息
+        showDelete: false, // 显示删除提示框
+        EnterprisePage: 1,
+        vendorlist: [], // 查看更多信息
+        showMoreinfn: false, // 是否打开更多信息
+        chooseItem: {}
       }
     },
     components: {
@@ -131,21 +382,27 @@
     },
     fetch ({ store, route }) {
       let user = store.state.option.user.data
+      let isSaler = route.query.type === 'saler'
       let params = {
         pageNumber: 1,
         pageSize: 10,
-        state: (!route.query.type || route.query.type === 'buyer') ? 'todo' : null
+        state: !isSaler ? 'todo' : null
       }
-      if (user.enterprise.uu) {
-        params.enUU = user.enterprise.uu
+      if (!isSaler) {
+        if (user.enterprise.uu) {
+          params.enUU = user.enterprise.uu
+        } else {
+          params.userUU = user.userUU
+        }
       } else {
-        params.userUU = user.userUU
+        params.enuu = user.enterprise.uu
+        params.useruu = user.userUU
       }
-//      console.log(params)
       return Promise.all([
         store.dispatch('product/saveStores', { count: 100, page: 1, type: 'component' }),
         store.dispatch('shop/StoreFocusPage', { count: 100, page: 1 }),
-        store.dispatch(route.query.type === 'saler' ? 'applyPurchase/loadPurchaseManList' : 'applyPurchase/loadBuyerUnSayPricePurchaseManList', params)
+        store.dispatch(route.query.type === 'saler' ? 'applyPurchase/loadVendorPushList' : 'applyPurchase/loadBuyerUnSayPricePurchaseManList', params),
+        store.dispatch('loadStoreStatus', { op: 'check' })
       ])
     },
     watch: {
@@ -153,6 +410,18 @@
         handler: function (val, old) {
           this.switchSeek('wait')
         }
+      },
+      'activeType': {
+        handler: function (val, old) {
+          if (val === 'provider') {
+            this.GetEnterpriseList().then(res => {
+              this.GetEnterpriseListData = res.data.content
+              this.EnterprisePage = res.data.totalPages
+            })
+          } else if (val === 'mystore') {
+            this.$router.push(`/mobile/shop/${this.$store.state.option.storeStatus.data.uuid}`)
+          }
+        }
       }
     },
     mounted: function () {
@@ -244,7 +513,11 @@
         this.reloadData()
       },
       switchType: function () {
-        this.activeType = 'seek'
+        if (this.userType === 'buyer') {
+          this.activeType = 'oppor'
+        } else {
+          this.activeType = 'seek'
+        }
         this.seekKeyword = ''
         this.$router.push('/mobile/user' + (this.userType === 'saler' ? '?type=buyer' : '?type=saler'))
       },
@@ -277,23 +550,30 @@
             this.$store.dispatch('applyPurchase/loadBuyerPurchaseManList', params)
           }
         } else {
-          if (type === 'wait') {
-            this.$store.dispatch('applyPurchase/loadPurchaseManList', {pageNumber: this.seekPage, pageSize: this.seekSize, enUU: this.$store.state.option.user.data.enterprise.uu, keyword: this.seekKeyword})
-          } else if (type === 'done') {
-            this.$store.dispatch('applyPurchase/loadVendorPurchaseManList', {pageNumber: this.seekPage, pageSize: this.seekSize, _state: 'done', filter: {vendUU: this.$store.state.option.user.data.enterprise.uu, fromDate: null, endDate: null, keyword: this.seekKeyword}, overdue: 1})
+          if (this.activeType === 'provider') {
+            this.getResourceProvidor()
           } else {
-            this.$store.dispatch('applyPurchase/loadVendorPurchaseManList', {pageNumber: this.seekPage, pageSize: this.seekSize, _state: 'done', filter: {vendUU: this.$store.state.option.user.data.enterprise.uu, fromDate: null, endDate: null, keyword: this.seekKeyword}, overdue: 1})
+            if (type === 'wait') {
+              this.$store.dispatch('applyPurchase/loadVendorPushList', {pageNumber: this.seekPage, pageSize: this.seekSize, enuu: this.user.data.enterprise.uu, useruu: this.user.data.userUU, keyword: this.seekKeyword})
+            } else if (type === 'done') {
+              this.$store.dispatch('applyPurchase/loadVendorPurchaseManList', {pageNumber: this.seekPage, pageSize: this.seekSize, _state: 'done', filter: {vendUU: this.$store.state.option.user.data.enterprise.uu, fromDate: null, endDate: null, keyword: this.seekKeyword}, overdue: 1})
+            } else {
+              this.$store.dispatch('applyPurchase/loadVendorPurchaseManList', {pageNumber: this.seekPage, pageSize: this.seekSize, _state: 'done', filter: {vendUU: this.$store.state.option.user.data.enterprise.uu, fromDate: null, endDate: null, keyword: this.seekKeyword}, overdue: 1})
+            }
           }
         }
       },
       scroll: function () {
         let scrolled = document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop
-        if (Math.ceil(scrolled + window.screen.availHeight) >= document.body.scrollHeight && !this.isSearchSearchingMore && this.seekPage < this.allPage) {
-          this.getMoreSearch()
-        }
+
         if (this.$refs.searchSeekInput && this.$store.state.mobile.InputGetFocus) {
           this.$refs.searchSeekInput.blur()
         }
+        if (Math.ceil(scrolled + window.screen.availHeight) >= document.body.scrollHeight && this.activeType === 'provider' && !this.isSearchSearchingMore && this.seekPage < this.EnterprisePage) {
+          this.getMoreSearch()
+        } else if (Math.ceil(scrolled + window.screen.availHeight) >= document.body.scrollHeight && this.activeType !== 'provider' && !this.isSearchSearchingMore && this.seekPage < this.allPage) {
+          this.getMoreSearch()
+        }
       },
       blur: function() {
         setTimeout(() => {
@@ -306,9 +586,126 @@
         }, 300)
       },
       getMoreSearch: function () {
-        this.seekPage++
-        this.isSearchSearchingMore = true
-        this.reloadData()
+          this.seekPage++
+          this.isSearchSearchingMore = true
+          this.reloadData()
+      },
+      // 获取当前企业产品库
+      GetEnterpriseList: function() {
+        let params = {
+          _status: 'all',
+          count: 20,
+          isStandard: true,
+          keyword: this.seekKeyword || '',
+          page: this.seekPage,
+          sorting: { id: 'DESC' },
+          type: 'all'
+        }
+        return this.$http.get('/trade/products', { params })
+      },
+      // 获取当前个人产品库
+      GetPersonList: function(cb) {
+        let params = {
+          _status: 'all',
+          count: 20,
+          isStandard: true,
+          keyword: this.seekKeyword || '',
+          page: this.seekPage,
+          sorting: { id: 'DESC' },
+          type: 'all'
+        }
+        return this.$http.get('/trade/products/person', { params })
+      },
+      // 获取当前在售产品
+      GetOnlineList: function() {
+        let params = {
+          count: 10,
+          keyword: this.seekKeyword || '',
+          page: this.seekPage,
+          sorting: { 'createdDate': 'DESC' },
+          status: '601-602'
+        }
+        return this.$http.get('/trade/goods/store/status', { params })
+      },
+      // 产品管理切换
+      switchprovide: function(type) {
+        this.providerType = type
+        this.seekPage = 1
+        this.GetEnterpriseListData.splice(0, this.GetEnterpriseListData.length)
+        this.GetEnterpriseListData = null
+        this.GetEnterpriseListData = []
+        this.getResourceProvidor()
+      },
+      // 删除个人产品库
+      deleteProvider: function(id, index) {
+        this.showDelete = true
+        this.deleteId = id
+        // this.deleteItemIndex = index
+        // this.$http.get(`/trade/goods/${id}/deleteMessage`).then(response => {
+        //   this.isUploadpro = response.data.code
+        // })
+      },
+      deleteFn: function() {
+        this.$http.delete(`/trade/products/${this.deleteId}?isPerson=1`).then(response => {
+          this.showDelete = false
+          this.collectResult = '删除成功'
+          this.timeoutCount++
+          this.seekPage = 1
+          this.GetEnterpriseListData.splice(0, this.GetEnterpriseListData.length)
+          this.isChange2 = true
+          this.reloadData()
+          // this.GetEnterpriseListData.splice(this.deleteItemIndex, 1)
+        }, () => {
+          this.showDelete = false
+          this.collectResult = '删除失败'
+          this.timeoutCount++
+        })
+      },
+      cancelFn: function() {
+        this.showDelete = false
+      },
+      addProtoperson: function(item) {
+        this.$http.post('/trade/products/person', [item.id])
+          .then(response => {
+            this.collectResult = '绑定成功'
+            this.timeoutCount++
+          }, () => {
+            this.collectResult = '绑定失败'
+            this.timeoutCount++
+          })
+      },
+      // 获取相对应的信息
+      getResourceProvidor: function() {
+        if (this.providerType === 'enterprise') {
+          this.GetEnterpriseList().then(res => {
+            this.GetEnterpriseListData = this.GetEnterpriseListData.concat(res.data.content)
+            this.EnterprisePage = res.data.totalPages
+            this.isSearchSearchingMore = false
+          })
+        } else if (this.providerType === 'person') {
+          this.GetPersonList().then(res => {
+            this.GetEnterpriseListData = this.GetEnterpriseListData.concat(res.data.content)
+            this.EnterprisePage = res.data.totalPages
+            this.isSearchSearchingMore = false
+          })
+        } else if (this.providerType === 'onLine') {
+          this.GetOnlineList().then(res => {
+            this.GetEnterpriseListData = this.GetEnterpriseListData.concat(res.data.content)
+            this.EnterprisePage = res.data.totalPages
+            this.isSearchSearchingMore = false
+          })
+        }
+      },
+      // 查看企业产品库更多信息
+      lookProductitem: function(id, item) {
+        this.chooseItem = item
+        this.$http.get(`/trade/products/goods/productid/${id}`).then(res => {
+          this.showMoreinfn = true
+          this.vendorlist = res.data
+        })
+      },
+      closeMoreinfo: function() {
+        this.showMoreinfn = false
       }
     },
     computed: {
@@ -350,6 +747,7 @@
         return this.enterpriseInfo.isVendor === 313
       },
       userType () {
+        this.activeType = this.$route.query.type === 'saler' ? 'oppor' : 'seek'
         return this.$route.query.type
       },
       focusPage () {
@@ -359,7 +757,7 @@
         return this.$store.state.applyPurchase.purchaseManList.purchaseManList
       },
       purchaseManList () {
-        let list = this.purchase.data.content.slice()
+        let list = this.purchase.data.content ? this.purchase.data.content.slice() : []
         if (this.isChange) {
           this.purchaseManListData = []
           this.seekPage = 1
@@ -370,7 +768,6 @@
           this.isSearchSearchingMore = false
           this.isDataChange = false
         }
-//        console.log(this.purchaseManListData)
         return this.purchase.data.content
       },
       allPage () {
@@ -379,6 +776,24 @@
       purchaseManListFetching () {
         this.showLoading = false
         return this.purchase.fetching
+      },
+      cnmpCode() { // 型号
+        if (this.chooseItem.pcmpcode) {
+          return this.chooseItem.pcmpcode
+        }
+        return ''
+      },
+      cnmpType() { // 类目
+        if (this.chooseItem.kinden) {
+          return this.chooseItem.kinden
+        }
+        return ''
+      },
+      cnmpBand() { // 品牌
+        if (this.chooseItem.pbranden) {
+          return this.chooseItem.pbranden
+        }
+        return ''
       }
     }
   }
@@ -677,4 +1092,404 @@
       }
     }
   }
+  .providerList {
+    border-top: 1px solid #e0e0e4;
+    border-bottom: 1px solid #e0e0e4;
+    margin-bottom: 0.24rem;
+    .top {
+      &.top2 {
+        .text {
+          width: 5.4rem;
+        }
+        .pms {
+          color: #f57710;
+          border: 1px solid #f57710;
+          border-radius: 0.4rem;
+          background: #fff;
+          font-size: 0.24rem;
+          height: 0.4rem;
+          line-height: 0.4rem;
+          width: 0.8rem;
+          text-align: center;
+          float: right;
+          margin-top: 0.25rem;
+        }
+      }
+      .icon {
+        width: 0.6rem;
+        height: 0.36rem;
+        line-height: 0.36rem;
+        margin-top: 0.27rem;
+        float: left;
+        background-size: 100%;
+        background-repeat: no-repeat;
+        margin-right: 0.12rem;
+        text-align: center;
+        &.istanded{
+          background-image: url('/images/mobile/@2x/istanded.png')
+        }
+        &.standed{
+          background-image: url('/images/mobile/@2x/standed.png')
+        }
+      }
+      .text {
+        float: left;
+        width: 6.3rem;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+      }
+      padding: 0 0.24rem;
+      background: #f5f9fd;
+      height: 0.9rem;
+      line-height: 0.9rem;
+      color: #0067e7;
+      font-size: 0.3rem;
+      &::after{
+        clear: both;
+        display: block;
+        content: ' ';
+        visibility: hidden;
+        zoom: 1;
+      }
+    }
+    .content {
+      padding: 0.24rem 0.24rem;
+      background: #fff;
+      .linetext {
+        margin-bottom: 0.24rem;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+        &:nth-last-of-type(1){
+          margin-bottom: 0rem;
+        }
+      }
+      .fl {
+        float: left;
+        border-right: 1px dashed #e0e0e4;
+        width: 4.68rem;
+      }
+      .fr {
+        float: right;
+        margin: 0.18rem 0.24rem;
+        margin-right: 0rem;
+        font-size: 0.3rem;
+        &.addtop {
+          margin-top: 0.6rem;
+          .add {
+            background: #0067e7;
+            color: #fff;
+          }
+        }
+        div {
+          width: 2.1rem;
+          height: 0.6rem;
+          text-align: center;
+          line-height: 0.6rem;
+          border-radius: 3px;
+          &.look{
+            background: #0067e7;
+            color: #fff;
+          }
+          &.add{
+            background: #fff;
+            color: #0067e7;
+            border: 1px solid #0067e7;
+          }
+          &.delete{
+            background: #fff;
+            color: #f70415;
+            border: 1px solid #f70415;
+          }
+        }
+        div:nth-child(1){
+          margin-bottom: 0.26rem
+        }
+      }
+      &::after{
+        clear: both;
+        display: block;
+        content: ' ';
+        visibility: hidden;
+        zoom: 1;
+      }
+    }
+  }
+  .middle {
+    padding: 0.24rem 0.24rem 0px;
+    background: #fff;
+    .pms {
+      color: #f57710;
+      border: 1px solid #f57710;
+      border-radius: 0.4rem;
+      background: #fff;
+      font-size: 0.24rem;
+      height: 0.4rem;
+      line-height: 0.4rem;
+      width: 0.8rem;
+      text-align: center;
+    }
+    .list {
+      .left {
+        float: left;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+      }
+      .textinfo {
+        color: #0067e7;
+        font-size: 0.3rem
+      }
+      margin-bottom: 0.18rem;
+      &::after{
+        clear: both;
+        display: block;
+        content: ' ';
+        visibility: hidden;
+        zoom: 1;
+      }
+      .fl {
+        width: 4.4rem;
+        float: left;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+      }
+      .fr {
+        text-align: left;
+        width: 2.6rem;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+      }
+      .name {
+        color: #666;
+        font-size: 0.3rem;
+        display: inline-block;
+      }
+      .text {
+        display: inline-block;
+        color: #333;
+        font-size: 0.3rem
+      }
+      .table {
+        width: 5.5rem;
+        margin-bottom: 0px;
+        margin-top: -.1rem;
+        li {
+          height: 0.6rem;
+          line-height: 0.6rem;
+          &::after {
+            clear: both;
+            display: block;
+            content: ' ';
+            visibility: hidden;
+            zoom: 1;
+          }
+          div {
+            text-align: center;
+            width: 50%;
+            float: left
+          }
+          &:nth-child(odd) {
+            background: #f7f7f7;
+            color: #666;
+            font-size: 0.28rem;
+          }
+          &:nth-child(even) {
+            background: #fcfcfc;
+            color: #666;
+            font-size: 0.28rem;
+          }
+          &:nth-last-of-type(1){
+            color: #f31919;
+          }
+          &.title {
+            font-size: 0.3rem;
+            color: #666;
+          }
+        }
+      }
+    }
+  }
+  .labelinfo {
+    padding: 0 .24rem;
+    background: #e6e6e6;
+    height: 0.6rem;
+    line-height: 0.6rem;
+    width: 100%;
+    color: #666;
+    font-size: 0.26rem;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+    .labelicon {
+      background-image: url('/images/mobile/@2x/label_icon.png');
+      background-repeat: no-repeat;
+      width: 0.61rem;
+      height: 0.38rem;
+      line-height: 0.38rem;
+      background-size: 100%;
+      color: #fff;
+      margin-right: 0.1rem;
+      display: inline-block;
+      font-size: 0.22rem;
+      text-align: center;
+      /*vertical-align: middle;*/
+    }
+    .labeltext{
+      display: inline-block;
+      /*vertical-align: middle;*/
+    }
+  }
+  .deleteKuang {
+    position: fixed;
+    background: rgba(0,0,0,0.5);
+    top: 0px;
+    left: 0px;
+    right: 0px;
+    bottom: 0px;
+    z-index: 9999;
+    .kuangContent {
+      border-radius: 5px;
+      background: #fff;
+      width: 5rem;
+      position: absolute;
+      left: 50%;
+      top: 50%;
+      transform: translate3d(-50%, -50%, 0);
+      border-radius: 5px;
+      overflow: hidden;
+      .titleinfo {
+        font-size: .3rem;
+        color: #666;
+        text-align: center;
+        margin-top: 0.5rem;
+        margin-bottom: 0.1rem;
+      }
+      .title {
+        background: #5078cb;
+        height: .7rem;
+        line-height: .7rem;
+        font-size: .3rem;
+        color: #fff;
+        text-align: center;
+      }
+      .info {
+        color: #f00;
+        text-align: center;
+      }
+      .K_btn {
+        margin-top: 0.4rem;
+        line-height: 0.7rem;
+        height: 0.7rem;
+        &::after{
+          clear: both;
+          display: block;
+          content: ' ';
+          visibility: hidden;
+          zoom: 1;
+        }
+        div {
+          float: left;
+          width: 50%;
+          font-size: 0.3rem;
+          text-align: center;
+          &.cancelBtn {
+            background: #b4b5b9;
+            color: #333;
+          }
+          &.answerBtn {
+            background: #5078cb;
+            color: #fff;
+          }
+        }
+      }
+    }
+    i {
+      font-size: .6rem;
+      position: absolute;
+      right: -0.3rem;
+      top: -0.35rem;
+      color: #fff;
+      &::after{
+        position: absolute;
+        top: -0.1rem;
+        left: -0.1rem;
+        right: -0.1rem;
+        bottom: -0.1rem;
+        content: ' '
+      }
+    }
+    .title {
+      background: #3f84f6;
+      height: 0.7rem;
+      line-height: 0.7rem;
+      color: #fff;
+      text-align: center;
+      font-size: 0.3rem;
+      position: relative;
+    }
+    .Kuang {
+      max-height: 10rem;
+      width: 6.7rem;
+      position: absolute;
+      left: 50%;
+      top: 50%;
+      transform: translate3d(-50%, -50%, 0);
+      background: #ececec;
+      border-radius: 5px;
+    }
+    .content {
+      overflow-y: scroll;
+      max-height: 9.3rem;
+      .infob {
+        background: #e3edfd;
+        padding: 0.2rem;
+        .info {
+          color: #333;
+          font-size: 0.3rem;
+          overflow: hidden;
+          text-overflow: ellipsis;
+          white-space: nowrap;
+          margin-bottom: 0.18rem;
+          .name {
+            color: #666;
+          }
+          div {
+            display: inline-block;
+          }
+        }
+      }
+      .content_sq {
+        width: 6.4rem;
+        margin: 0.1rem auto;
+        background: #fff;
+        padding: 0.2rem 0rem;
+        .list {
+          margin-bottom: 0.18rem;
+        }
+        .fl {
+          width: 3.2rem;
+        }
+        .table {
+          width: 4.2rem;
+          margin-top: -0.1rem;
+        }
+        .labelinfo {
+          background-image: url('/images/mobile/@2x/labelTop.png');
+          background-repeat: no-repeat;
+          width: 6.29rem;
+          height: 0.64rem;
+          line-height: 0.64rem;
+          background-size: 100%;
+          margin-top: 0rem;
+          margin-right: 0rem;
+          background-color: rgba(0, 0, 0, 0);
+          color: #666;
+        }
+      }
+    }
+  }
 </style>

BIN
static/images/mobile/@2x/applyPurchase/opportunity.png


BIN
static/images/mobile/@2x/home/brand.png


BIN
static/images/mobile/@2x/home/seek.png


BIN
static/images/mobile/@2x/home/store.png


BIN
static/images/mobile/@2x/home/supplier.png


BIN
static/images/mobile/@2x/istanded.png


BIN
static/images/mobile/@2x/labelTop.png


BIN
static/images/mobile/@2x/label_icon.png


BIN
static/images/mobile/@2x/search/select-arrow.png


BIN
static/images/mobile/@2x/standed.png


BIN
static/images/mobile/supplier/address.png


BIN
static/images/mobile/supplier/business.png


BIN
static/images/mobile/supplier/email.png


BIN
static/images/mobile/supplier/house.png


BIN
static/images/mobile/supplier/is-open.png


BIN
static/images/mobile/supplier/phone.png


BIN
static/images/mobile/supplier/tag.png


+ 10 - 0
store/applyPurchase.js

@@ -122,6 +122,16 @@ export const actions = {
         commit('purchaseManList/GET_PURCHASEMAN_FAILURE', err)
       })
   },
+  // 卖家精准推送求购列表
+  loadVendorPushList ({ commit }, params = {}) {
+    commit('purchaseManList/REQUEST_PURCHASEMAN')
+    return axios.get('/inquiry/sale/remind', {params})
+      .then(response => {
+        commit('purchaseManList/GET_PURCHASEMAN_SUCCESS', response.data)
+      }, err => {
+        commit('purchaseManList/GET_PURCHASEMAN_FAILURE', err)
+      })
+  },
   // 求购排行榜
   loadPurchaseApplyRank ({ commit }, params = {}) {
     commit('purchaseApplyRank/REQUEST_PURCHASERANK', params)

+ 10 - 0
store/shop.js

@@ -131,5 +131,15 @@ export const actions = {
       }, err => {
         commit('storeInfo/GET_FOCUSPAGE_FAILURE', err)
       })
+  },
+  // 获取某店铺信息
+  findStoreInfoFromEnUU ({ commit }, params = {}) {
+    commit('storeInfo/REQUEST_STORE_INFO')
+    return axios.get('/api/store-service/stores', { params })
+      .then(response => {
+        commit('storeInfo/GET_STORE_INFO_SUCCESS', response.data)
+      }, err => {
+        commit('storeInfo/GET_STORE_INFO_FAILURE', err)
+      })
   }
 }

+ 28 - 0
store/supplier.js

@@ -1,6 +1,34 @@
 import axios from '~/plugins/axios'
 
 export const actions = {
+  // 获取浏览记录
+  getSupplierList ({ commit }, params = {}) {
+    commit('data/REQUEST_LIST')
+    return axios.get('/vendor/introduction/vendor/list', {params})
+      .then(response => {
+        commit('data/GET_LIST_SUCCESS', response.data)
+      }, err => {
+        commit('data/GET_LIST_FAILURE', err)
+      })
+  },
+  // 根据uu获取供应商企业信息
+  getSupplierEnInfo ({ commit }, params = {}) {
+    commit('data/REQUEST_EN')
+    return axios.get(`/basic/enterprise/${params.uu}/info`, {params})
+      .then(response => {
+        commit('data/GET_EN_SUCCESS', response.data)
+      }, err => {
+        commit('data/GET_EN_FAILURE', err)
+      })
+  },
+  // 获取供应商物料列表
+  getSupplierProductList ({ commit }, params = {}) {
+    commit('data/REQUEST_PRODUCT_LIST')
+    return axios.get(`/vendor/introduction/product/list`, {params})
+      .then(response => {
+        commit('data/GET_PRODUCT_LIST_SUCCESS', response.data)
+      }, err => {
+        commit('data/GET_PRODUCT_LIST_FAILURE', err)
   // 获取供应商展示列表
   loadVendorList ({commit}, params) {
     commit('merchant/REQUEST_MERCHANT')

+ 47 - 0
store/supplier/data.js

@@ -0,0 +1,47 @@
+export const state = () => ({
+  list: {
+    fetching: false,
+    data: []
+  },
+  enterpriseData: {
+    fetching: false,
+    data: []
+  },
+  productList: {
+    fetching: false,
+    data: []
+  }
+})
+
+export const mutations = {
+  REQUEST_LIST (state) {
+    state.list.fetching = true
+  },
+  GET_LIST_FAILURE (state) {
+    state.list.fetching = false
+  },
+  GET_LIST_SUCCESS (state, result = []) {
+    state.list.fetching = false
+    state.list.data = result
+  },
+  REQUEST_EN (state) {
+    state.enterpriseData.fetching = true
+  },
+  GET_EN_FAILURE (state) {
+    state.enterpriseData.fetching = false
+  },
+  GET_EN_SUCCESS (state, result = []) {
+    state.enterpriseData.fetching = false
+    state.enterpriseData.data = result
+  },
+  REQUEST_PRODUCT_LIST (state) {
+    state.productList.fetching = true
+  },
+  GET_PRODUCT_LIST_FAILURE (state) {
+    state.productList.fetching = false
+  },
+  GET_PRODUCT_LIST_SUCCESS (state, result = []) {
+    state.productList.fetching = false
+    state.productList.data = result
+  }
+}