Browse Source

Merge remote-tracking branch 'origin/feature-201819-wangcz' into feature-201819-wangcz

yangc 7 years ago
parent
commit
8794314e36

+ 24 - 5
components/common/upload/upload.vue

@@ -1,7 +1,9 @@
 <template>
   <div>
     <div class="preview">
-      <img :src="qualifications.url==''? uploadImgTemp : isPdf?'/images/all/timg.png':qualifications.url" class="previewImage" :class="{'mobile-previewImage': isMobile}"/>
+      <img :src="qualifications.url==''? uploadImgTemp : isPdf?'/images/all/timg.png':qualifications.url" class="previewImage" :class="{'mobile-previewImage': isMobile}"
+        :style="imgStyle"
+      />
       <input type="file" v-if="!qualifications.url" class="com-input" @change="update" accept="image/jpeg,image/jpg,image/gif,image/bmp,image/png,.pdf" />
     </div>
     <div class="hover-show" v-if="qualifications.url && !noReview">
@@ -21,7 +23,7 @@
 </template>
 <script>
   export default {
-    props: ['typeData', 'url', 'NopassThree', 'noReview', 'maxSize'],
+    props: ['typeData', 'url', 'NopassThree', 'noReview', 'maxSize', 'imgStyle', 'HASPDF'],
     data () {
       return {
         qualifications: {
@@ -35,6 +37,7 @@
     watch: {
       url: function (val, oldVal) {
         if (val && val !== '') {
+          console.log(val)
           this.qualifications.url = val
         }
       }
@@ -44,6 +47,9 @@
         return this.isMobile ? '/images/mobile/openStore/upload.png' : '/images/all/upload-apply.png'
       }
     },
+    mounted() {
+      this.qualifications.url = this.url
+    },
     methods: {
       update (e) {
         let file = e.target.files[0]
@@ -62,6 +68,9 @@
         let param = new FormData()
         param.append('file', file, file.name)
         param.append('chunk', '0')
+        if (this.HASPDF === false && file.type === 'application/pdf') {
+          this.$emit('remindAction', `请选择有效图片进行上传`)
+        }
         if (file.type !== 'application/pdf') {
           let config = {
             headers: {'Content-Type': 'multipart/form-data'}
@@ -106,9 +115,19 @@
 </script>
 <style scoped>
   .mobile-previewImage {
-    width: .5rem !important;
-    height: .5rem !important;
+    width: .5rem;
+    height: .5rem ;
     display: block;
-    margin: .3rem auto 0 !important;
+    margin: .3rem auto 0;
+  }
+  .com-input{
+    width: 100%;
+    height: 100%;
+    text-align: center;
+    position: absolute;
+    bottom: 0;
+    left: 0;
+    opacity: 0;
+    display: inline-block !important;
   }
 </style>

+ 13 - 13
components/default/Header.vue

@@ -1,11 +1,11 @@
 <template>
   <header class="header">
-    <div class="apply-adv" v-if="isShowApplyAdv">
-      <a href="/applyPurchase#opportunities">
-        <img src="/images/applyPurchase/apply-top-ad.jpg" alt="">
-      </a>
-      <i @click="ShowApplyAdv = false"></i>
-    </div>
+    <!--<div class="apply-adv" v-if="isShowApplyAdv">-->
+      <!--<a href="/applyPurchase#opportunities">-->
+        <!--<img src="/images/applyPurchase/apply-top-ad.jpg" alt="">-->
+      <!--</a>-->
+      <!--<i @click="ShowApplyAdv = false"></i>-->
+    <!--</div>-->
     <nav class="navbar">
       <div class="navbar-container container">
         <div class="navbar-header">
@@ -76,17 +76,17 @@
 //        searchEnterpriseArr: [],
 //        keyword: '',
 //        isSearching: false
-        ShowApplyAdv: true,
+//         ShowApplyAdv: true,
         showEnterpriseToggle: false
       }
     },
     computed: {
-      isShowApplyAdv () {
-        if (this.$route.path.indexOf('/applyPurchase') === -1) {
-          this.ShowApplyAdv = true
-        }
-        return this.ShowApplyAdv && this.$route.path.indexOf('/applyPurchase') !== -1
-      },
+      // isShowApplyAdv () {
+      //   if (this.$route.path.indexOf('/applyPurchase') === -1) {
+      //     this.ShowApplyAdv = true
+      //   }
+      //   return this.ShowApplyAdv && this.$route.path.indexOf('/applyPurchase') !== -1
+      // },
       user () {
         // console.log(this.$store.state.option.user)
         return this.$store.state.option.user

+ 2 - 1
components/help/helpHeader.vue

@@ -34,9 +34,10 @@
 <style scoped>
   .user_center {
     width: 100%;
-    margin: 0px auto;
+    margin: 0 auto;
     height: 80px;
     background: #5078cb;
+    margin-top:-20px;
   }
   .wid1190{
     width: 100%;

+ 2 - 2
components/main/Nav.vue

@@ -83,9 +83,9 @@
       },
       goB2B () {
         if (this.user.logged) {
-          window.location.href = `${process.env.uasUrl}/#/index`
+          window.location.href = `${process.env.uasUrl}#/sale/pubinquiry`
         } else {
-          this.$router.push('/btbBusiness')
+          this.login()
         }
       }
     }

+ 133 - 191
components/mobile/applyPurchase/PublishSeek.vue

@@ -1,70 +1,65 @@
 <template>
-  <div class="mobile-modal" v-if="showSayPriceBox" @click="setShowCurrencyList(false)" @touchmove="preventTouchMove($event)">
-    <div class="mobile-modal-box">
-      <div class="mobile-modal-header">
-        <i class="icon-guanbi iconfont" @click="cancel"></i>
+  <div class="publish_seek_mobile">
+    <div class="publish-seek">
+      <div class="content-line">
+        <span><i>*</i>品牌:</span>
+        <input type="text" v-model="applyObj.brand" @blur="checkBrand" @input="onBrandChange" placeholder="请勿填中文符号">
+        <ul class="similar brand-similar-list" v-show="showSimilarBrandList && applyObj.brand">
+          <li v-for="sBrand in similarBrand" @click="setBrand(sBrand.nameEn)">{{sBrand.nameEn}}</li>
+        </ul>
       </div>
-      <div class="publish-seek">
-        <div class="content-line">
-          <span><i>*</i>品牌:</span>
-          <input type="text" v-model="applyObj.brand" @blur="checkBrand" @input="onBrandChange" placeholder="请勿填中文符号">
-          <ul class="similar brand-similar-list" v-show="showSimilarBrandList && applyObj.brand">
-            <li v-for="sBrand in similarBrand" @click="setBrand(sBrand.nameEn)">{{sBrand.nameEn}}</li>
-          </ul>
-        </div>
-        <div class="content-line">
-          <span><i>*</i>物料名称(类目):</span>
-          <input type="text" v-model="applyObj.prodTitle" @blur="checkProdTitle" @input="onProdTitleInput">
-        </div>
-        <div class="content-line">
-          <span><i>*</i>型号:</span>
-          <input type="text" v-model="applyObj.code" @blur="checkCode" @input="onCodeChange" placeholder="请勿填中文符号">
-          <ul class="similar" v-show="showSimilarCodeList && applyObj.code">
-            <li v-for="sCode in similarCode" @click="setCode(sCode.code)">{{sCode.code}}</li>
-          </ul>
-        </div>
-        <div class="content-line">
-          <span>规格:</span>
-          <input type="text" v-model="applyObj.spec" @blur="checkSpec" @input="onSpecInput">
-        </div>
-        <div class="content-line">
-          <span><i>*</i>截止日期:</span>
-          <input type="date" v-model="applyObj.deadline" :min="minDay" :max="maxDay" @blur="deadlineChange">
-          <!--<el-date-picker-->
-            <!--v-model="applyObj.deadline"-->
-            <!--type="date"-->
-            <!--:editable="false"-->
-            <!--:clearable="true"-->
-            <!--size="mini">-->
-          <!--</el-date-picker>-->
-        </div>
-        <!--<div class="content-line">
-          <span>币种:</span>
-          <a v-text="applyObj.currency" @click="setShowCurrencyList(!showCurrencyList, $event)"></a>
-          <img v-if="!showCurrencyList" src="/images/mobile/@2x/applyPurchase/currency-arrow-down.png" alt="">
-          <img v-if="showCurrencyList" src="/images/mobile/@2x/applyPurchase/currency-arrow-up.png" alt="">
-          <ul v-if="showCurrencyList">
-            <li @click="setCurrency('不限')">不限</li>
-            <li @click="setCurrency('RMB')">RMB</li>
-            <li @click="setCurrency('USD')">USD</li>
-          </ul>
-        </div>-->
-        <div class="content-line">
-          <span>数量(PCS):</span>
-          <input type="text" v-model="applyObj.amount" @blur="checkAmount" @input="onAmountInput">
-        </div>
-        <!--<div class="content-line">
-          <span>生产日期:</span>
-          <input type="text" v-model="applyObj.produceDate" @input="onProduceDateChange">
-        </div>-->
-        <a @click="authorityInterceptor(baseUrls.userPublishSeek, goPublish)">确认发布</a>
+      <div class="content-line">
+        <span><i>*</i>物料名称(类目):</span>
+        <input type="text" v-model="applyObj.prodTitle" @blur="checkProdTitle" @input="onProdTitleInput">
       </div>
+      <div class="content-line">
+        <span><i>*</i>型号:</span>
+        <input type="text" v-model="applyObj.code" @blur="checkCode" @input="onCodeChange" placeholder="请勿填中文符号">
+        <ul class="similar" v-show="showSimilarCodeList && applyObj.code">
+          <li v-for="sCode in similarCode" @click="setCode(sCode.code)">{{sCode.code}}</li>
+        </ul>
+      </div>
+      <div class="content-line">
+        <span>规格:</span>
+        <input type="text" v-model="applyObj.spec" @blur="checkSpec" @input="onSpecInput">
+      </div>
+      <div class="content-line">
+        <span><i>*</i>截止日期:</span>
+        <input type="date" v-model="applyObj.deadline" :min="minDay" :max="maxDay" @blur="deadlineChange">
+        <!--<el-date-picker-->
+        <!--v-model="applyObj.deadline"-->
+        <!--type="date"-->
+        <!--:editable="false"-->
+        <!--:clearable="true"-->
+        <!--size="mini">-->
+        <!--</el-date-picker>-->
+      </div>
+      <!--<div class="content-line">
+        <span>币种:</span>
+        <a v-text="applyObj.currency" @click="setShowCurrencyList(!showCurrencyList, $event)"></a>
+        <img v-if="!showCurrencyList" src="/images/mobile/@2x/applyPurchase/currency-arrow-down.png" alt="">
+        <img v-if="showCurrencyList" src="/images/mobile/@2x/applyPurchase/currency-arrow-up.png" alt="">
+        <ul v-if="showCurrencyList">
+          <li @click="setCurrency('不限')">不限</li>
+          <li @click="setCurrency('RMB')">RMB</li>
+          <li @click="setCurrency('USD')">USD</li>
+        </ul>
+      </div>-->
+      <div class="content-line">
+        <span>数量(PCS):</span>
+        <input type="text" v-model="applyObj.amount" @blur="checkAmount" @input="onAmountInput">
+      </div>
+      <!--<div class="content-line">
+        <span>生产日期:</span>
+        <input type="text" v-model="applyObj.produceDate" @input="onProduceDateChange">
+      </div>-->
     </div>
+    <a @click="authorityInterceptor(baseUrls.userPublishSeek, goPublish)">确认发布</a>
   </div>
 </template>
 <script>
   export default {
-    props: ['showSayPriceBox'],
+    props: ['dataObj'],
     data () {
       return {
         applyObj: {
@@ -106,29 +101,19 @@
         return deadDate
       }
     },
-    watch: {
-      showSayPriceBox: function (val, old) {
-        this.emptyForm()
-//        if (val) {
-//          document.body.style.position = 'fixed'
-//          document.body.style.left = '0'
-//          document.body.style.right = '0'
-//        } else {
-//          document.body.style.position = 'static'
-//        }
-      }
-    },
     mounted () {
       let _this = this
+      if (this.dataObj) {
+        this.applyObj = this.dataObj
+      } else {
+        this.emptyForm()
+      }
       document.body.onclick = function () {
         _this.showSimilarCodeList = false
         _this.showSimilarBrandList = false
       }
     },
     methods: {
-      cancel: function () {
-        this.$emit('cancelAction')
-      },
       emptyForm: function () {
         for (let attr in this.applyObj) {
           this.applyObj[attr] = attr === 'currency' ? '不限' : ''
@@ -147,6 +132,7 @@
         return this.$http.get('/productuser/match/getKind', {params: {cmpCode: code, brand: brand}})
       },
       goPublish: function () {
+        console.log('12', this.applyObj)
         if (this.checkAll()) {
           this.getMaterialKind(this.applyObj.code, this.applyObj.brand).then(response => {
             let inquiry = {}
@@ -186,16 +172,11 @@
             inquiry.currency = currency
             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('发布失败')
               })
           })
@@ -368,129 +349,90 @@
   }
 </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;
+  .publish_seek_mobile{
+    padding:.2rem;
+    .publish-seek {
       background: #fff;
-      .mobile-modal-header {
-        font-size: .38rem;
-        background: #fff;
-        background: url(/images/mobile/@2x/applyPurchase/pub.png) no-repeat;
-        background-size: cover;
-        height: 1.51rem;
-        i {
-          top: -.36rem;
+      padding: .1rem;
+      border-radius:.1rem;
+      .content-line {
+        position: relative;
+        height: 1rem;
+        line-height: 1rem;
+        font-size: .26rem;
+        text-align: left;
+        border-bottom:1px solid #d3d3d3;
+        &:last-child{
+          border:none;
         }
-      }
-      .publish-seek {
-        background: #fff;
-        padding-top: .1rem;
-        padding-bottom: .4rem;
-        .content-line {
-          position: relative;
-          height: .8rem;
-          line-height: .8rem;
+        input {
+          width: 3.49rem;
+          height: .52rem;
+          border: none;
           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: 2.26rem;
-            text-align: right;
-            i {
-              color: #ff0000;
-              margin-right: .05rem;
-              font-style: normal;
-            }
+          vertical-align: middle;
+          background: #fff;
+          border-radius: 0;
+        }
+        > span {
+          display: inline-block;
+          width: 2.5rem;
+          text-align: right;
+          color:#3176e9;
+          i {
+            color: #ff0000;
+            margin-right: .05rem;
+            font-style: normal;
           }
-          > a {
+        }
+        > a {
+          font-size: .26rem;
+          color: #666;
+        }
+        > img {
+          width: .12rem;
+          height: .06rem;
+          margin-left: .04rem;
+        }
+        .similar {
+          position: absolute;
+          width: 3.52rem;
+          max-height: 2.5rem;
+          overflow-y: auto;
+          z-index: 12;
+          border: 1px solid #7e7e7e;
+          border-radius: .05rem;
+          left: 2.25rem;
+          top: .7rem;
+          background: #fff;
+          li {
+            height: .5rem;
+            line-height: .5rem;
             font-size: .26rem;
-            color: #666;
-          }
-          > img {
-            width: .12rem;
-            height: .06rem;
-            margin-left: .04rem;
-          }
-          .similar {
-            position: absolute;
-            width: 3.52rem;
-            max-height: 2.5rem;
-            overflow-y: auto;
-            z-index: 12;
-            border: 1px solid #7e7e7e;
-            border-radius: .05rem;
-            left: 2.25rem;
-            top: .7rem;
-            background: #fff;
-            li {
-              height: .5rem;
-              line-height: .5rem;
-              font-size: .26rem;
-              color: #999;
-              padding-left: .19rem;
-              &:focus, &:active, &:hover {
-                background: #999;
-                color: #fff;
-              }
+            color: #999;
+            padding-left: .19rem;
+            &:focus, &:active, &:hover {
+              background: #999;
+              color: #fff;
             }
           }
-          /*> ul {
-            position: absolute;
-            top: .6rem;
-            left: 1.16rem;
-            z-index: 1;
-            width: 1.75rem;
-            background: #fff;
-            text-align: center;
-            border-radius: .1rem;
-            border: .02rem solid #dfdfdf;
-            -webkit-box-shadow: 0 0 .12rem .02rem #e2d9d975;
-            -moz-box-shadow:  0 0 .12rem .02rem #e2d9d975;
-            box-shadow:  0 0 .12rem .02rem #e2d9d975;
-            li {
-              height: .52rem;
-              line-height: .52rem;
-              border-bottom: .02rem solid #dfdfdf;
-              &:hover, &:active {
-                background: #dedede;
-              }
-            }
-          }*/
-        }
-        > 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;
         }
       }
     }
+    > a {
+      display: block;
+      width: 5.19rem;
+      height: .84rem;
+      text-align: center;
+      line-height: .84rem;
+      font-size: .38rem;
+      margin: .3rem auto 0;
+      background: #3176e9;
+      color: #fff;
+      border-radius: .08rem;
+    }
   }
+
   .datepicker-overlay {
     z-index: 9999;
     .cov-date-body {

+ 12 - 6
components/mobile/common/PullUp.vue

@@ -27,6 +27,10 @@
       isValid: {
         type: Boolean,
         default: true
+      },
+      FixedEl: { // 获取元素区域内滚动高度
+        type: Boolean,
+        default: false
       }
     },
     mounted () {
@@ -46,6 +50,7 @@
       scroll: function () {
         let scrolled = 0
         let height = 0
+        let availHeight = window.screen.availHeight
 //        console.log(document.getElementById(this.fixId).scrollHeight)
 //        console.log(document.getElementById(this.fixId).scrollTop + window.screen.availHeight + '-------')
         if (this.fixId) {
@@ -59,12 +64,13 @@
         } else {
           height = document.body.scrollHeight
           scrolled = document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop
-        }
-//        this.hideToTop = scrolled <= window.screen.availHeight
-//        console.log(this.hideToTop)
-//        console.log(this.allPage)
-//        console.log(this.page)
-        if (Math.ceil(scrolled + window.screen.availHeight) >= height && !this.searchMore && this.page < this.allPage) {
+        } if (this.FixedEl) {
+          let obj = document.getElementById(this.fixId)
+          // availHeight = document.getElementById(this.fixId).clientHeight + 50
+          if (obj.clientHeight + obj.scrollTop >= obj.scrollHeight && !this.searchMore && this.page < this.allPage) {
+            this.getMore()
+          }
+        } else if (Math.ceil(scrolled + availHeight) >= height && !this.searchMore && this.page < this.allPage) {
           this.getMore()
         }
       },

+ 124 - 71
components/mobile/search/MainSearch.vue

@@ -1,29 +1,44 @@
 <template>
   <div class="main-search" @touchstart="cancelFocus" @click="setShowSearchType(false)" id="main-search">
+    <!--<div class="main-search-header">-->
+      <!--<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" @keyup.13="onSearch()">-->
+      <!--<span @click="onSearch()">搜索</span>-->
+      <!--<a @click="cancelSearch">取消</a>-->
+    <!--</div>-->
     <div class="main-search-header">
-      <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" @keyup.13="onSearch()">
+      <input type="text" v-model="keyword" id="search-box" @keyup.13="onSearch()" :placeholder="placeholder">
       <span @click="onSearch()">搜索</span>
-      <a @click="cancelSearch">取消</a>
+      <a @click="cancelSearch()">取消</a>
+      <div class="main-search-header-controll clearfix">
+        <span :class="ChooseTop === 'component' ? 'active' : ''" @click="setChangelistHander('component')"><a>型号</a></span>
+        <span :class="ChooseTop === 'kind' ? 'active' : ''" @click="setChangelistHander('kind')"><a>物料名称</a></span>
+        <span :class="ChooseTop === 'store' ? 'active' : ''" @click="setChangelistHander('store')"><a>卖家</a></span>
+        <span :class="ChooseTop === 'brand' ? 'active' : ''" @click="setChangelistHander('brand')"><a>品牌</a></span>
+      </div>
     </div>
     <ul class="associate-list" v-show="associate.show">
-      <li @click="onAssociateClick(similar)" v-for="similar in similarKeywords.all">
+      <li @click="onAssociateClick(similar)" v-for="similar in similarKeywords.result">
         <i class="icon-sousuo iconfont"></i>
-        <span>{{similar}}</span>
+        <span>{{Getsimilar(similar)}}</span>
+        <!--<span v-if="ChooseTop === 'component'">{{similar.code}}</span>-->
+        <!--<span v-else-if="ChooseTop === 'product'">{{similar}}</span>-->
+        <!--<span v-else-if="ChooseTop === 'store'">{{similar}}</span>-->
+        <!--<span v-else-if="ChooseTop === 'brand'">{{similar.nameEn}}</span>-->
       </li>
       <li @click="onAssociateClick(keyword)">查找“{{baseUtils.filterStringEllipsis(keyword, 30)}}”</li>
     </ul>
-    <div class="hot-history" v-show="!associate.show">
+    <div class="hot-history" v-show="!associate.show" style="margin-top: 2.08rem">
       <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)" v-if="item.keyword && item.keyword.trim().length">
+          <li v-for="item in searchHistory" @click="onSearch(item.keyword)" v-if="item.keyword && item.keyword.trim().length">
             <a>{{item.keyword}}</a>
           </li>
         </ul>
@@ -49,7 +64,8 @@
           show: false
         },
         searchType: 'product',
-        showSearchType: false
+        showSearchType: false,
+        ChooseTop: 'component'
       }
     },
     props: {
@@ -78,23 +94,32 @@
 //      }
 //    },
     methods: {
+      setChangelistHander(str) {
+        this.ChooseTop = str
+        if (!this.keyword) return
+        this.$store.dispatch('searchKeywords', {keyword: this.keyword, type: this.ChooseTop})
+        this.associate.show = true
+      },
       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))
-            }
-          }
+        if (this.keyword) {
+          this.$router.push(`/mobile/search/newkeycode?choosetype=${this.ChooseTop}&keyword=${encodeURIComponent(this.keyword)}`)
         }
+        // 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 () {
         if (!this.keyword) {
@@ -108,15 +133,32 @@
         }
       },
       searchKeywords () {
-        if (this.searchType === 'product') {
-          this.$store.dispatch('searchKeywords', { keyword: this.keyword })
-          this.associate.show = true
-        }
+        this.$store.dispatch('searchKeywords', {keyword: this.keyword, type: this.ChooseTop})
+        this.associate.show = true
       },
       onAssociateClick (word) {
-        this.keyword = word
+        if (this.ChooseTop === 'component') {
+          this.keyword = word.code
+        } else if (this.ChooseTop === 'kind') {
+          this.keyword = word.nameCn
+        } else if (this.ChooseTop === 'store') {
+          this.keyword = word.name
+        } else if (this.ChooseTop === 'brand') {
+          this.keyword = word.nameEn
+        }
         this.onSearch()
       },
+      Getsimilar(word) {
+        if (this.ChooseTop === 'component') {
+          return word.code
+        } else if (this.ChooseTop === 'kind') {
+          return word.nameCn
+        } else if (this.ChooseTop === 'store') {
+          return word.name
+        } else if (this.ChooseTop === 'brand') {
+          return word.nameEn
+        }
+      },
       cancelSearch: function () {
         this.$emit('cancelSearchAction')
       },
@@ -169,11 +211,31 @@
       },
       searchHistory () {
         return this.$store.state.searchData.searchHistory.searchHistory.data
+      },
+      placeholder() {
+        if (this.ChooseTop === 'cmpcode') {
+          return '请输入您要搜索的型号'
+        } else if (this.ChooseTop === 'materiel') {
+          return '请输入您要搜索的物料名称'
+        } else if (this.ChooseTop === 'seller') {
+          return '请输入您要搜索的卖家名称'
+        } else if (this.ChooseTop === 'cmpbrand') {
+          return '请输入您要搜索的品牌'
+        }
       }
     }
   }
 </script>
 <style lang="scss" scoped>
+  @mixin overFlowHidden {
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+  }
+  @mixin lineHeight($value) {
+    height: $value;
+    line-height: $value;
+  }
   .main-search {
     background: #fff;
     width: 100%;
@@ -182,20 +244,20 @@
     top: 0;
     bottom: 0;
     .main-search-header {
-      position: relative;
-      height: .88rem;
+      position: absolute;
       background: #3e82f5;
-      padding-left: .3rem;
       line-height: .88rem;
       margin-top: 0;
       z-index: 1;
+      width: 100%;
       input {
         width: 4.88rem;
         height: .62rem;
         line-height: .62rem;
         font-size: .26rem;
         color: #999;
-        padding-left: 1.26rem;
+        margin-left: 0.3rem;
+        /*padding-left: 1.26rem;*/
         border: .04rem solid #fff;
         background: #fff;
         outline: none;
@@ -226,49 +288,41 @@
         color: #fff;
         margin-left: .2rem;
       }
-      .options {
-        position: absolute;
-        left: .3rem;
-        width: 1.25rem;
-        padding-left: .25rem;
-        background: url(/images/mobile/@2x/search/select-arrow-blue.jpg) no-repeat;
-        background-size: .14rem .12rem;
-        background-position: .92rem .36rem;
-        color: #3e82f5;
-        font-size: .3rem;
-        i {
-          height: .46rem;
-          width: .01rem;
-          background: #eceef0;
-          display: block;
-          float: right;
-          margin-top: .18rem;
-        }
-        ul {
-          position: absolute;
-          left: 0;
-          top: .54rem;
-          z-index: -1;
-          li {
-            width: 1.25rem;
-            height: .99rem;
-            border-radius: .05rem;
-            background: #666;
-            color: rgba(255, 255, 255, 0.89);
-            text-align: center;
-            line-height: 1.2rem;
-            font-size: .3rem;
+      .main-search-header-controll {
+        background: #3e82f5;
+        span {
+          padding: 0 0.2rem;
+          @include lineHeight(0.66rem);
+          font-size: 0.28rem;
+          color: #fff;
+          margin: 0;
+          background: rgba(0,0,0,0);
+          border-radius: 0;
+          width: auto;
+          &.active a{
+            color: #fff;
+            border-bottom: 0.04rem solid #fff;
           }
         }
       }
     }
     .associate-list {
+      position: absolute;
+      width: 100%;
       background: #fff;
+      top: 0.8rem;
+      border: 1px solid #dcdcdc;
+      z-index: 100;
+      height: 100%;
+      left: 0;
+      bottom: 0;
+      right: 0;
       li {
         height: 0.7rem;
         line-height: .9rem;
         margin: 0 .45rem;
         border-bottom: .04rem solid #f1f0f0;
+        @include overFlowHidden();
         i {
           font-size: .36rem;
           margin-right: .24rem;
@@ -298,7 +352,6 @@
     .hot-history {
       .search-history {
         padding-left: .51rem;
-        padding-top: .38rem;
         >p {
           font-size: .3rem;
           color: #333;

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

@@ -666,7 +666,8 @@
         .text {
           display: inline-block;
           color: #333;
-          font-size: 0.28rem
+          font-size: 0.28rem;
+          vertical-align: top;
         }
         .table {
           width: 5.25rem;

+ 1 - 1
components/personalMaterial/PersonalMaterial.vue

@@ -425,7 +425,7 @@
       position: fixed;
       top: 23%;
       left: 31%;
-      z-index: 10;
+      z-index: 102;
       width: 577px;
       height: 239px;
       background: #fff;

+ 183 - 0
pages/mobile/center/user/applyPurchase.vue

@@ -0,0 +1,183 @@
+<template>
+  <div class="apply_purchase_mobile">
+    <div class="com-mobile-header mobile-center-header">
+      <a @click="goLastPage"><i class="iconfont icon-fanhui"></i></a>
+      <p>发布求购</p>
+      <p class="en-name"><img :src="`/images/mobile/center/${user.data.enterprise.uu ? 'en' : 'self'}.png`" alt="">{{currentEnName}}</p>
+    </div>
+    <div class="mobile-fix-content mobile-centerfix-content" id="mobileFixContent">
+      <div class="search-content search-content2">
+        <input type="text" placeholder="请输入您要询价求购的型号" v-model="keyword" @keyup.13="searchComplist">
+        <span @click="searchComplist" >
+          <i class="iconfont icon-sousuo"></i>
+      </span>
+      </div>
+      <publish-seek v-if="showPublishBox" :dataObj="componentSeekObj" @remindAction="onRemind"></publish-seek>
+      <template v-else>
+        <ul v-if="compList && compList.length">
+          <li v-for="comp in compList">
+            <div class="listInfo">
+              <p>品牌:<span v-text="comp.brand || '-'"></span></p>
+              <p>物料名称(类目):<span v-text="comp.kind || '-'"></span></p>
+              <p>型号:<span v-text="comp.cmpCode || '-'"></span></p>
+              <p>规格:<span v-text="comp.spec || '-'"></span></p>
+              <p>单位:<span v-text="comp.unit || 'PCS'"></span></p>
+            </div>
+            <a class="sa-pub" @click="compInquiry(comp, $event)">立即询价</a>
+          </li>
+        </ul>
+        <empty-status :type="'collect'" :showLink="true" :text="'抱歉,没有相关信息'" v-else></empty-status>
+      </template>
+    </div>
+    <remind-box :title="remindText" :timeoutCount="timeoutCount"></remind-box>
+    <pull-up :fixId="'mobileFixContent'" :searchMore="fetching" :allPage="allPage" :page="page" @pullUpAction="onPullUpAction"></pull-up>
+  </div>
+</template>
+<script>
+  import { RemindBox, PullUp, EmptyStatus } from '~components/mobile/common'
+  import {PublishSeek} from '~components/mobile/applyPurchase'
+  export default {
+    middleware: 'authenticated',
+    layout: 'mobileNoHeader',
+    fetch ({ store }) {
+      return Promise.all([
+        store.dispatch('product/loadPublishList', { count: 10, page: 1, keyword: null })
+      ])
+    },
+    data () {
+      return {
+        keyword: '',
+        remindText: '',
+        timeoutCount: 0,
+        page: 1,
+        count: 10,
+        isChange: false,
+        compList: [],
+        componentSeekObj: {
+          code: '',
+          brand: '',
+          spec: '',
+          prodTitle: ''
+        },
+        showPublishBox: true
+      }
+    },
+    watch: {
+      'compCollectList.data': {
+        handler: function (val) {
+          if (this.isChange) {
+            this.compList = val.content
+            this.isChange = false
+          } else {
+            this.compList = [...this.compList, ...val.content]
+          }
+        },
+        immediate: true
+      }
+    },
+    computed: {
+      compCollectList () {
+        console.log('123', this.$store.state.product.common.publishMobile)
+        return this.$store.state.product.common.publishMobile
+      },
+      fetching () {
+        return this.compCollectList.fetching
+      },
+      allPage () {
+        return Math.floor(this.compCollectList.data.totalElements / this.compCollectList.data.size) + Math.floor(this.compCollectList.data.totalElements % this.compCollectList.data.size > 0 ? 1 : 0)
+      }
+    },
+    components: {
+      RemindBox,
+      PullUp,
+      EmptyStatus,
+      PublishSeek
+    },
+    methods: {
+      searchComplist () {
+        this.showPublishBox = false
+        this.page = 1
+        this.isChange = true
+        if (this.keyword) {
+          this.reloadList()
+        }
+      },
+      onRemind: function (str) {
+        this.remindText = str
+        this.timeoutCount++
+      },
+      reloadList: function () {
+        this.$store.dispatch('product/loadPublishList', { page: this.page, count: this.count, keyword: this.keyword })
+      },
+      onPullUpAction: function () {
+        this.page++
+        this.reloadList()
+      },
+      compInquiry: function (item, e) {
+        if (e) {
+          e.stopPropagation()
+        }
+        this.componentSeekObj.code = item.cmpCode ? item.cmpCode : '-'
+        this.componentSeekObj.brand = item.brand ? item.brand : '-'
+        this.componentSeekObj.spec = item.spec ? item.spec : '-'
+        this.componentSeekObj.prodTitle = item.kind ? item.kind : '-'
+        this.componentSeekObj = JSON.parse(JSON.stringify(this.componentSeekObj))
+        this.showPublishBox = true
+      },
+      goUrl: function (url) {
+        this.$router.push(url)
+      }
+    }
+  }
+</script>
+<style lang="scss" scoped>
+  .mobile-fix-content {
+    .search-content {
+      text-align: center;
+      input {
+        border: 1px solid #376ff3;
+      }
+      span{
+        top:0;
+      }
+    }
+    ul {
+      margin: .2rem;
+      li {
+        border-radius: .05rem;
+        margin: .25rem 0 0 0;
+        position: relative;
+        background: #fff;
+        .listInfo {
+          padding: .25rem .1rem .25rem .23rem;
+          p {
+            color: #666;
+            font-size: .3rem;
+            line-height: .45rem;
+            overflow: hidden;
+            text-overflow: ellipsis;
+            white-space: nowrap;
+            span {
+              color: #333;
+            }
+          }
+        }
+        .sa-pub {
+          position: absolute;
+          bottom: .2rem;
+          right:0;
+          display: block;
+          width: 1.7rem;
+          height: .47rem;
+          line-height: .47rem;
+          text-align: center;
+          font-size: .26rem;
+          color: #fff;
+          background: #008bf7;
+          margin-right:.2rem;
+          border-radius: .05rem;
+        }
+      }
+    }
+  }
+</style>

+ 3 - 7
pages/mobile/center/user/index.vue

@@ -12,10 +12,10 @@
       <div class="block-wrap seek-operation">
         <p><i></i>我的求购</p>
         <ul>
-          <li @click="showPublishBox = true">
+          <nuxt-link to="/mobile/center/user/applyPurchase" tag="li">
             <img src="/images/mobile/center/user/pub.png" alt="">
             <p>发布求购</p>
-          </li>
+          </nuxt-link>
           <nuxt-link to="/mobile/center/user/seek?seekType=wait" tag="li">
             <img src="/images/mobile/center/user/wait.png" alt="">
             <p>待报价</p>
@@ -62,19 +62,16 @@
       </div>
 
     </div>
-    <publish-seek :showSayPriceBox="showPublishBox" @cancelAction="showPublishBox = false" @remindAction="onRemind"></publish-seek>
     <remind-box :title="remindText" :timeoutCount="timeoutCount"></remind-box>
   </div>
 </template>
 <script>
   import { RemindBox } from '~components/mobile/common'
-  import { PublishSeek } from '~components/mobile/applyPurchase'
   export default {
     layout: 'mobileNoHeader',
     middleware: 'authenticated',
     data () {
       return {
-        showPublishBox: false,
         remindText: '',
         timeoutCount: 0,
         carCount: 0
@@ -92,8 +89,7 @@
       return Promise.all(promises)
     },
     components: {
-      RemindBox,
-      PublishSeek
+      RemindBox
     },
     computed: {
       compCount () {

+ 8 - 7
pages/mobile/center/vendor/payCenter.vue

@@ -112,14 +112,14 @@
           </div>
         </li>
       </ul>
-      <div class="fix-count-wrap" v-if="recordList.length">
-        <span class="content">收入总计:<span>{{currencySymbol | currencyFilter}}&nbsp;{{totalRecordPrice}}</span></span>
-        <span class="content">支出总计:<span>{{currencySymbol | currencyFilter}}&nbsp;0</span></span>
-        <p>结余:{{currencySymbol | currencyFilter}}&nbsp;{{totalRecordPrice}} (共计{{recordList.length || 0}}笔交易)</p>
-      </div>
+
     </div>
     <!-- 交易记录end -->
-
+    <div class="fix-count-wrap" v-if="recordList.length">
+      <span class="content">收入总计:<span>{{currencySymbol | currencyFilter}}&nbsp;{{totalRecordPrice}}</span></span>
+      <span class="content">支出总计:<span>{{currencySymbol | currencyFilter}}&nbsp;0</span></span>
+      <p>结余:{{currencySymbol | currencyFilter}}&nbsp;{{totalRecordPrice}} (共计{{recordList.length || 0}}笔交易)</p>
+    </div>
     <!-- 新增账户弹框start -->
     <modal-wrapper :noHeader="true" :showModal="showModal" @closeAction="showModal = false">
       <div class="add-account-modal in-wrapper">
@@ -729,6 +729,7 @@
     }
   }
   .vendor-pay-record {
-    bottom: 2.23rem !important;
+    /*bottom: 2.23rem !important;*/
+    padding-bottom: 1.25rem;
   }
 </style>

+ 445 - 17
pages/mobile/center/vendor/product.vue

@@ -1,13 +1,6 @@
 <template>
-  <div class="user-content">
-    <div 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="user-content" >
+    <div class="provider" id="provider-wrapper">
       <div class="search-content" style="border-bottom: 1px solid #f5f5f5;padding-bottom: 0.25rem">
         <input type="text" placeholder="请输入您要查找的品牌或型号" v-model="seekKeyword" @keyup.13="searchSeek">
         <span @click="searchSeek" >
@@ -49,6 +42,7 @@
             <div class="pull-right add" v-if="providerType === 'enterprise'" @click="addProtoperson(item)" :class="{noadd: item.addProductPerson}">加入个人产品</div>
             <div class="pull-right look" @click="lookProductitem(item.id, item)" v-if="item.batchCount">查看产品</div>
             <div class="pull-right look" @click="toAddpro(item)" v-else>编辑上架</div>
+            <div class="pull-right look" v-if="providerType === 'enterprise'" @click="updateMateriel(item)">编辑物料</div>
           </div>
         </div>
         <div v-else>
@@ -269,13 +263,98 @@
       <nuxt-link to="/">返回首页</nuxt-link>
     </div>
     <remind-box :title="collectResult" :timeoutCount="timeoutCount"></remind-box>
-    <pull-up :searchMore="isSearchSearchingMore" :allPage="EnterprisePage" :page="seekPage" @pullUpAction="getMoreSearch"></pull-up>
+    <pull-up :fixId="'provider-wrapper'" :searchMore="isSearchSearchingMore" :allPage="EnterprisePage" :page="seekPage" @pullUpAction="getMoreSearch"></pull-up>
     <!-- 在售产品编辑框 -->
+    <!-- 编辑物料 -->
+    <div class="update-materiel" v-if="showMateriel">
+      <div class="mobile-nav">
+        <div class="mobile-header mobile-center-header">
+          <a @click="showMateriel = false"><i class="iconfont icon-fanhui"></i></a>
+          <p>编辑物料</p>
+          <p class="en-name">
+            <img :src="`/images/mobile/center/${user.data.enterprise && user.data.enterprise.uu ? 'en' : 'self'}.png`" alt="">{{currentEnName}}
+          </p>
+        </div>
+      </div>
+      <div class="update-materiel-wrapper">
+        <!--<div class="clearfix">-->
+          <!--<div class="update-materiel-wrapper-image pull-left">-->
+            <!--<img :src="cmpImg || '/images/mobile/openStore/upload.png'"  style='width: 1.1rem; height: 1.1rem;display:block;margin: 0.2rem auto'/>-->
+            <!--<input type="file" class="com-input" @change="update" accept="image/jpeg,image/jpg,image/gif,image/bmp,image/png,.pdf" />-->
+            <!--<span style="position: relative">点击上传</span>-->
+          <!--</div>-->
+          <!--<div class="uploadImgBtn pull-left">上传图片<input type="file" class="com-input" @change="update" accept="image/jpeg,image/jpg,image/gif,image/bmp,image/png,.pdf" /></div>-->
+          <!--<span class="uploadImgInfo pull-left">图片上传须知</span>-->
+        <!--</div>-->
+        <template v-if="MaterielItem.standard === 1">
+          <img class="imgUrl" src="/images/mobile/@2x/productDetail/Strand.png" />
+        </template>
+        <template v-else>
+          <img class="imgUrl" src="/images/mobile/@2x/productDetail/isStrand.png" />
+        </template>
+        <div class="update-materiel-wrapper-list clearfix overHidden">
+          <div class="name pull-left"><a class="red">*</a>品牌:</div>
+          <template v-if="MaterielItem.standard === 1">
+            {{MaterielItem.brand}}
+          </template>
+          <template v-else>
+            <div class="input pull-left clearfix overHidden">
+              <input type="text" v-model="MaterielItem.brand" placeholder="请勿填中文符号" @blur="checkBrand" @input="onBrandChange"/>
+              <ul class="similar brand-similar-list" v-show="showSimilarBrandList && MaterielItem.brand">
+                <li v-for="sBrand in similarBrand" @click="setBrand(sBrand.nameEn)">{{sBrand.nameEn}}</li>
+              </ul>
+              <i class="iconfont icon-guanbi1" @click="MaterielItem.brand = ''"></i>
+            </div>
+          </template>
+        </div>
+        <div class="update-materiel-wrapper-list clearfix overHidden">
+          <div class="name pull-left"><a class="red">*</a>物料名称(类目):</div>
+          <template v-if="MaterielItem.standard === 1">
+            {{MaterielItem.kind}}
+          </template>
+          <template v-else>
+            <div class="input pull-left clearfix"  style="width: 4.09rem">
+              <!--<input type="text" v-model="MaterielItem.kind" @blur="checkCode" @input="onCodeChange" placeholder="请勿填中文符号">-->
+              <input type="text" placeholder="请输入物料名称(类目)" v-model="MaterielItem.kind"/>
+              <i class="iconfont icon-guanbi1" @click="MaterielItem.kind = ''"></i>
+            </div>
+          </template>
+        </div>
+        <div class="update-materiel-wrapper-list clearfix">
+          <div class="name pull-left"><a class="red">*</a>型号:</div>
+          <template v-if="MaterielItem.standard === 1">
+            {{MaterielItem.cmpCode}}
+          </template>
+          <template v-else>
+            <div class="input pull-left clearfix">
+              <input type="text" v-model="MaterielItem.cmpCode" @blur="checkCode" @input="onCodeChange" placeholder="请勿填中文符号">
+              <ul class="similar" v-show="showSimilarCodeList && MaterielItem.cmpCode">
+                <li v-for="sCode in similarCode" @click="setCode(sCode.code)">{{sCode.code}}</li>
+              </ul>
+              <!--<input type="text" placeholder="请输入型号" v-model="MaterielItem.cmpCode"/>-->
+              <i class="iconfont icon-guanbi1" @click="MaterielItem.code = ''"></i>
+            </div>
+          </template>
+        </div>
+        <div class="update-materiel-wrapper-list clearfix">
+          <div class="name pull-left"><a class="red" style="opacity: 0">*</a>规格:</div>
+          <div class="input pull-left clearfix">
+            <input type="text" placeholder="请输入规格" v-model="MaterielItem.spec" @blur="checkSpec" @input="onSpecInput"/>
+            <i class="iconfont icon-guanbi1" @click="MaterielItem.spec = ''"></i>
+          </div>
+        </div>
+        <div class="update-materiel-wrapper-controll clearfix">
+          <div class="pull-left" @click="saveMateriel()">保存</div>
+          <div class="pull-right" @click="showMateriel = false">取消</div>
+        </div>
+      </div>
+    </div>
   </div>
 </template>
 
 <script>
   import { RemindBox, PullUp } from '~components/mobile/common'
+  import Upload from '~components/common/upload/upload.vue'
   export default {
     layout: 'mobile',
     middleware: 'authenticated',
@@ -294,7 +373,15 @@
         EnterprisePage: 1,
         chooseItem: {},
         vendorlist: [], // 查看更多信息
-        showoffshelf: false
+        showoffshelf: false,
+        showMateriel: false,
+        imgStyle: 'width: 1.1rem;height:1.1rem',
+        MaterielItem: {},
+        showSimilarCodeList: false,
+        showSimilarBrandList: false,
+        similarCode: [],
+        similarBrand: [],
+        cmpImg: ''
       }
     },
     methods: {
@@ -494,6 +581,13 @@
       closeMoreinfo: function() {
         this.showMoreinfn = false
       },
+      // 编辑物料
+      updateMateriel(item) {
+        this.MaterielItem = item
+        this.cmpImg = item.cmpImg || ''
+        // this.MaterielItem.cmpImg = item.cmpImg || ''
+        this.showMateriel = true
+      },
       addProtoperson: function(item) {
         if (item.addProductPerson) {
           this.collectResult = '已在个人产品库'
@@ -513,6 +607,144 @@
             this.collectResult = '绑定失败'
             this.timeoutCount++
           })
+      },
+      checkBrand: function () {
+        // this.MaterielItem.brand = this.MaterielItem.brand && this.MaterielItem.brand !== ''
+        if (!this.MaterielItem.brand || this.MaterielItem.brand === '') {
+          this.setRemindText('品牌不能为空')
+        }
+        return this.MaterielItem.brand
+      },
+      checkCode: function () {
+        if (!this.MaterielItem.cmpCode || this.MaterielItem.cmpCode === '') {
+          this.setRemindText('型号不能为空')
+        }
+        return this.MaterielItem.cmpCode
+      },
+      onCodeChange: function () {
+        this.MaterielItem.cmpCode = this.MaterielItem.cmpCode.trim()
+        if ((/[^\x00-\xff]/g).test(this.MaterielItem.cmpCode)) {
+          let chineseIndex = -1
+          for (let i = 0; i < this.MaterielItem.cmpCode.length; i++) {
+            if ((/[^\x00-\xff]/g).test(this.MaterielItem.cmpCode.charAt(i))) {
+              chineseIndex = i
+              break
+            }
+          }
+          this.MaterielItem.cmpCode = this.baseUtils.cutOutString(this.MaterielItem.cmpCode, chineseIndex)
+        } else if (this.MaterielItem.cmpCode && this.baseUtils.getRealLen(this.MaterielItem.cmpCode) > 100) {
+          this.MaterielItem.cmpCode = this.baseUtils.cutOutString(this.MaterielItem.cmpCode, 100)
+        } else {
+          this.getSimilarCode()
+        }
+      },
+      onBrandChange: function () {
+        this.MaterielItem.brand = this.MaterielItem.brand.trim()
+        if ((/[^\x00-\xff]/g).test(this.MaterielItem.brand)) {
+          let chineseIndex = -1
+          for (let i = 0; i < this.MaterielItem.brand.length; i++) {
+            if ((/[^\x00-\xff]/g).test(this.MaterielItem.brand.charAt(i)) && !(/[\u4e00-\u9fa5]/).test(this.MaterielItem.brand.charAt(i))) {
+              chineseIndex = i
+              break
+            }
+          }
+          if (chineseIndex > -1) {
+            this.MaterielItem.brand = this.MaterielItem.brand.substring(0, chineseIndex)
+          }
+        } else if (this.MaterielItem.brand && this.baseUtils.getRealLen(this.MaterielItem.brand) > 50) {
+          this.MaterielItem.brand = this.baseUtils.cutOutString(this.MaterielItem.brand, 50)
+        } else {
+          this.getSimilarBrand()
+        }
+      },
+      getSimilarBrand: function () {
+        if (this.MaterielItem.brand) {
+          this.$http.get('/search/similarBrands', {params: {keyword: this.MaterielItem.brand}})
+            .then(response => {
+              this.similarBrand = response.data
+              this.showSimilarBrandList = response.data.length > 0
+            })
+        } else {
+          this.showSimilarBrandList = false
+        }
+      },
+      getSimilarCode: function () {
+        if (this.MaterielItem.cmpCode) {
+          this.$http.get('/search/similarComponents', {params: {keyword: this.MaterielItem.cmpCode}})
+            .then(response => {
+              this.similarCode = response.data
+              this.showSimilarCodeList = response.data.length > 0
+            })
+        } else {
+          this.showSimilarCodeList = false
+        }
+      },
+      setCode: function (code) {
+        this.MaterielItem.cmpCode = code
+        this.showSimilarCodeList = false
+      },
+      setBrand: function (brand) {
+        this.MaterielItem.brand = brand
+        this.showSimilarBrandList = false
+      },
+      setRemindText: function (str) {
+        this.collectResult = str
+        this.timeoutCount++
+      },
+      checkSpec: function () {
+        // let nullStrFlag =
+        // this.MaterielItem.spec = nullStrFlag
+        if (!this.baseUtils.checkNullStr(this.MaterielItem.spec)) {
+          this.setRemindText('规格输入不合法')
+        }
+        return this.MaterielItem.spec
+      },
+      onSpecInput: function () {
+        if (this.MaterielItem.spec && this.baseUtils.getRealLen(this.MaterielItem.spec) > 100) {
+          this.MaterielItem.spec = this.baseUtils.cutOutString(this.MaterielItem.spec, 100)
+        }
+      },
+      saveMateriel() {
+        if (this.MaterielItem.brand === '') {
+          this.setRemindText('品牌不能为空')
+          return
+        } else if (this.MaterielItem.kind === '') {
+          this.setRemindText('类目不能为空')
+          return
+        } else if (this.MaterielItem.cmpCode === '') {
+          this.setRemindText('型号不能为空')
+          return
+        }
+        this.MaterielItem.pcmpcode = this.MaterielItem.cmpCode
+        this.MaterielItem.pbranden = this.MaterielItem.brand
+        this.MaterielItem.pbranden = this.MaterielItem.brand
+        this.$http.post('/trade/products/update/product', this.MaterielItem).then(res => {
+          this.setRemindText('修改成功')
+          this.showMateriel = false
+          this.page = 1
+          this.getResourceProvidor()
+        })
+      },
+      update (e) {
+        let file = e.target.files[0]
+        if (file.size > 3 * 1024 * 1024) {
+          this.setRemindText(`上传文件不得超过3M`)
+        }
+        let param = new FormData()
+        param.append('file', file, file.name)
+        param.append('chunk', '0')
+        if (file.type === 'application/pdf') {
+          this.setRemindText(`请选择有效图片进行上传`)
+          return
+        }
+        let config = {
+          headers: {'Content-Type': 'multipart/form-data'}
+        }
+        this.$http.post('/api/images', param, config)
+          .then(response => {
+            this.MaterielItem.img = response.data[0].path
+            this.cmpImg = response.data[0].path
+          })
       }
     },
     computed: {
@@ -556,15 +788,34 @@
     },
     components: {
       RemindBox,
-      PullUp
+      PullUp,
+      Upload
     }
   }
 </script>
 
 <style scoped lang="scss">
+  @mixin overFlowHidden {
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+  }
+  @mixin lineHeight($value) {
+    height: $value;
+    line-height: $value;
+  }
+  .overHidden  {
+    @include overFlowHidden()
+  }
   .user-content{
-    margin-bottom: .98rem;
-    margin-top: 1.26rem;
+    position: absolute;
+    width: 100%;
+    height: 100%;
+    .provider {
+      margin: 1.26rem 0 0.98rem 0;
+      height: calc(100vh - 1.26rem - 0.98rem);
+      overflow-y: auto;
+    }
     .sa-pub {
       display: inline-block;
       width: 1.41rem;
@@ -1250,7 +1501,7 @@
   }
   .deleteKuang {
     position: fixed;
-    background: rgba(0,0,0,0.5);
+    background: rgba(0, 0, 0, 0.5);
     top: 0;
     left: 0;
     right: 0;
@@ -1288,7 +1539,7 @@
         margin-top: 0.4rem;
         line-height: 0.7rem;
         height: 0.7rem;
-        &::after{
+        &::after {
           clear: both;
           display: block;
           content: ' ';
@@ -1317,7 +1568,7 @@
       right: -0.3rem;
       top: -0.35rem;
       color: #fff;
-      &::after{
+      &::after {
         position: absolute;
         top: -0.1rem;
         left: -0.1rem;
@@ -1394,4 +1645,181 @@
       }
     }
   }
+  .update-materiel {
+    position: fixed;
+    z-index: 99;
+    background: #f1f3f6;
+    top: 0;
+    left: 0;
+    bottom: 0;
+    right: 0;
+    .mobile-header{
+      position: fixed;
+      top: 0;
+      z-index: 10;
+      width:100%;
+      height: 1.26rem;
+      line-height: 1.26rem;
+      /*border-bottom:.01rem solid #ccc;*/
+      background: #3e82f5;
+      padding:0 .2rem 0 .1rem;
+      color:#fff;
+    }
+    .mobile-header p{
+      overflow: hidden;
+      text-overflow: ellipsis;
+      white-space: nowrap;
+      font-size:.36rem;
+      text-align: center;
+      width: 6rem;
+      padding-left: 1rem;
+    }
+    .mobile-center-header p.en-name {
+      font-size: .3rem;
+    }
+    .mobile-header a{
+      font-size:.28rem;
+      color:#fff;
+      position: absolute;
+    }
+    .mobile-header a i{
+      font-size: .48rem;
+      margin-right: -.1rem;
+    }
+    .update-materiel-wrapper {
+      border: 1px solid #dcdcdc;
+      border-radius: 0.07rem;
+      background: #fff;
+      margin: 1.46rem 0.2rem 0;
+      position: relative;
+      padding-bottom: 0.4rem;
+      padding-top: 1rem;
+      position: relative;
+      .imgUrl{
+        position: absolute;
+        width: 0.94rem;
+        height: 0.94rem;
+        right: 0;
+        top: 0;
+      }
+      .update-materiel-wrapper-image {
+        width: 2.28rem;
+        height: 2.28rem;
+        border: 1px solid #dcdcdc;
+        border-radius: 0.07rem;
+        position: relative;
+        margin: 0.27rem 0 0 0.55rem;
+        text-align: center;
+        position: relative;
+        span {
+          color: #b2b2b2;
+          font-size: 0.28rem;
+        }
+        .com-input {
+          width: 100%;
+          height: 100%;
+          text-align: center;
+          position: absolute;
+          bottom: 0;
+          left: 0;
+          opacity: 0;
+          display: inline-block !important;
+        }
+      }
+      .uploadImgBtn {
+        color: #fff;
+        font-size: .28rem;
+        width: 1.51rem;
+        @include lineHeight(0.47rem);
+        border-radius: 0.07rem;
+        background: #f9b209;
+        text-align: center;
+        margin:2rem 0.1rem 0;
+        position: relative;
+        .com-input {
+          width: 100%;
+          height: 100%;
+          text-align: center;
+          position: absolute;
+          bottom: 0;
+          left: 0;
+          opacity: 0;
+          display: inline-block !important;
+        }
+      }
+      .uploadImgInfo {
+        color: #3f84f6;
+        font-size: 0.24rem;
+        margin-top: 2.15rem;
+      }
+      .update-materiel-wrapper-list {
+        margin-left:0.28rem;
+        margin-top: 0.3rem;
+        line-height: 0.5rem;
+        .red {color: #ea0f42}
+        .name {color: #666;}
+        .input {
+          position: relative;
+          width:5.4rem;
+          line-height: 0.5rem;
+          height: 0.5rem;border: 1px solid #dcdcdc;
+          input {
+            text-indent: 5px;
+            border: 0;
+            border-radius: 0.07rem;
+            line-height: 0.44rem;
+            height: 0.44rem;
+            width: 90%;
+            font-size:0.28rem;
+            float: left;
+            color: #333;
+          }
+          i {
+            font-size: 0.16rem;
+            vertical-align: top;
+            color: #666;
+            float: right;
+            margin-right: 0.05rem
+          }
+          .similar {
+            position: absolute;
+            width:100%;
+            max-height: 2.5rem;
+            overflow-y: auto;
+            z-index: 12;
+            border: 1px solid #7e7e7e;
+            border-radius: .05rem;
+            top: .5rem;
+            background: #fff;
+            li {
+              height: .5rem;
+              line-height: .5rem;
+              font-size: .26rem;
+              color: #999;
+              padding-left: .19rem;
+              &:focus, &:active, &:hover {
+                background: #999;
+                color: #fff;
+              }
+            }
+          }
+        }
+      }
+      .update-materiel-wrapper-controll {
+        margin: 0.4rem 0.2rem 0;
+        div {
+          width: 48%;
+          background: #b5b5b5;
+          font-size: 0.3rem;
+          color: #fafbfc;
+          text-align: center;
+          @include lineHeight(0.62rem);
+          border-radius: 0.07rem;
+          &:first-child {
+            background: #3f84f6;
+          }
+        }
+      }
+    }
+  }
 </style>

+ 1237 - 0
pages/mobile/search/newkeycode.vue

@@ -0,0 +1,1237 @@
+<template>
+ <div class="search-wrapper">
+   <!-- 头部搜索 -->
+   <div class="main-search-header">
+     <input type="text" id="search-box" v-model="keyword" @keyup.13="onClickSearchHander()" :placeholder="placeholder" @input="changeKeyWord()">
+     <span @click="onClickSearchHander()">搜索</span>
+     <a @click="cancelSearchHander()">取消</a>
+     <div class="main-search-header-controll clearfix">
+       <span :class="ChooseTop === 'component' ? 'active' : ''" @click="setChangelistHander('component')"><a>型号</a></span>
+       <span :class="ChooseTop === 'kind' ? 'active' : ''" @click="setChangelistHander('kind')"><a>物料名称</a></span>
+       <span :class="ChooseTop === 'store' ? 'active' : ''" @click="setChangelistHander('store')"><a>卖家</a></span>
+       <span :class="ChooseTop === 'brand' ? 'active' : ''" @click="setChangelistHander('brand')"><a>品牌</a></span>
+     </div>
+   </div>
+   <ul class="associate-list" v-show="associate.show" @click="associate.show = false">
+     <li @click.stop="onAssociateClick(similar)" v-for="similar in similarKeywords.result">
+       <i class="icon-sousuo iconfont"></i>
+       <span>{{Getsimilar(similar)}}</span>
+       <!--<span v-if="ChooseTop === 'component'">{{similar.code}}</span>-->
+       <!--<span v-else-if="ChooseTop === 'product'">{{similar}}</span>-->
+       <!--<span v-else-if="ChooseTop === 'store'">{{similar}}</span>-->
+       <!--<span v-else-if="ChooseTop === 'brand'">{{similar.nameEn}}</span>-->
+     </li>
+     <li @click.stop="onClickTosearch(keyword)">查找“{{baseUtils.filterStringEllipsis(keyword, 30)}}”</li>
+   </ul>
+   <!-- 主体内容 -->
+   <div class="main-search-wrapper">
+     <div class="search-title">搜索“<span>{{displayKeyword}}</span>”暂无此{{getNowChooseType}}{{allTotal === 0 ? '' : `,为您找到${allTotal}条相关信息`}}</div>
+     <template v-if="allTotal > 0">
+       <!-- 品牌精确查找 -->
+       <template v-if="ChooseTop === 'brand' && brandIsAccurate">
+         <div class="search-content" style="margin-bottom: 0.2rem;height: auto">
+           <div class="middle">
+             <div class="list clearfix" style="border-bottom: 1px solid #dcdcdc;padding-bottom: 0.1rem;line-height: 0.8rem;">
+               <img :src="'' || '/images/component/default.png'" class="pull-left">
+               <div class="name pull-left overHidden" style="max-width: 5rem;">{{resourceList.brand && resourceList.brand.nameEn}}</div>
+             </div>
+             <div class="list">
+               <div class="name">主打产品:</div>
+               <div class="text">
+                 {{resourceList.brand && resourceList.brand.series}}
+               </div>
+             </div>
+             <div class="list">
+               <div class="name">应用领域:</div>
+               <div class="text">
+                 {{resourceList.brand && resourceList.brand.application}}
+               </div>
+             </div>
+             <div class="list">
+               <div class="name">品牌介绍:</div>
+               <div class="text">
+                 {{resourceList.brand && resourceList.brand.brief}}
+               </div>
+             </div>
+             <div class="list">
+               <div class="name">官网地址:</div>
+               <div class="text" style="width: 4.5rem">
+                 <a :href="resourceList.brand && resourceList.brand.url" target="_blank">{{resourceList.brand && resourceList.brand.url}}</a>
+               </div>
+               <div class="pull-right lookMoreBtn" @click="showBrandDetails = true">
+                 查看更多
+               </div>
+             </div>
+           </div>
+         </div>
+       </template>
+       <div class="search-nav clearfix" v-if="brandIsAccurate || (!brandIsAccurate && ChooseTop !== 'brand')">
+        <span class="pull-left" :class="navType === 'hasStore' ? 'active' : ''" @click="getReloadList('hasStore')">
+          {{ChooseTop === 'component' ? '现货': '现货卖家'}}({{stockallTotal}})条
+        </span>
+         <span class="pull-left" :class="navType === 'noHasStore' ? 'active' : ''" @click="getReloadList('noHasStore')">
+          {{ChooseTop === 'component' ? '期货': '期货卖家'}}({{futuresallTotal}})条</span>
+       </div>
+       <div class="search-content" id="main-search-wrapper" :class="{'searchContent2' : ChooseTop === 'brand' && brandIsAccurate, 'searchContent3': ChooseTop === 'brand' && !brandIsAccurate}">
+         <!-- 品牌模糊查询 -->
+         <template v-if="!brandIsAccurate && ChooseTop === 'brand'">
+           <div class="middle" v-for="item in resourceList.content">
+             <div class="list clearfix" style="border-bottom: 1px solid #dcdcdc;padding-bottom: 0.1rem;line-height: 0.8rem;" @click="goToBrandAccurate(item)">
+               <img :src="item.logoUrl || '/images/component/default.png'" class="pull-left">
+               <div class="name pull-left overHidden" style="max-width: 5rem;">{{item.nameEn}}</div>
+               <div class="more_icon pull-right"><i class="iconfont icon-swiper-right"></i></div>
+             </div>
+             <div class="list">
+               <div class="name">主打产品:</div>
+               <div class="text">
+                 {{item.series}}
+               </div>
+             </div>
+             <div class="list">
+               <div class="name">应用领域:</div>
+               <div class="text">
+                 {{item.application}}
+               </div>
+             </div>
+             <div class="list">
+               <div class="name">品牌介绍:</div>
+               <div class="text">
+                 {{item.brief}}
+               </div>
+             </div>
+             <div class="list">
+               <div class="name">官网地址:</div>
+               <div class="text">
+                 <a :href="item.url" target="_blank">{{item.url}}</a>
+               </div>
+             </div>
+           </div>
+         </template>
+         <!-- /end 品牌模糊查询 -->
+         <template v-if="brandIsAccurate || (!brandIsAccurate && ChooseTop !== 'brand')">
+           <!-- 现货 -->
+           <template v-if="navType === 'hasStore'">
+             <!-- 型号结果 -->
+             <template v-if="ChooseTop === 'component'">
+               <div v-if="resourceList&&resourceList.stock&&resourceList.stock.content.length > 0">
+                 <div v-for="(item, index) in resourceList.stock.content">
+                   <!--@click="goProductDetail(item)"-->
+                   <div class="middle">
+                     <div class="list">
+                       <div class="name">品牌:</div>
+                       <div class="text overHidden">{{item.brand && item.brand.nameEn || '-'}}</div>
+                     </div>
+                     <div class="list">
+                       <div class="name">物料名称(类目):</div>
+                       <div class="text overHidden">{{item.kindNameCn || '-'}}</div>
+                     </div>
+                     <div class="list">
+                       <div class="name">型号:</div>
+                       <div class="text overHidden">{{item.code || '-'}}</div>
+                     </div>
+                     <div class="list">
+                       <div class="name">规格:</div>
+                       <div class="text overHidden">{{item.spec || '-'}}</div>
+                     </div>
+                     <div class="list">
+                       <div class="fl">
+                         <div class="name">包装:</div>
+                         <div class="text overHidden" style="width: 2.3rem">{{item.packaging || '无包装信息'}}</div>
+                       </div>
+                       <div class="fl">
+                         <div class="name">交期(天):</div>
+                         <div class="text overHidden" style="width: 1.8rem" v-if="item.b2cMaxDelivery && (item.b2cMaxDelivery != item.b2cMinDelivery)" v-text="item.b2cMinDelivery + '-'+ item.b2cMaxDelivery"></div>
+                         <div class="text overHidden" style="width: 1.8rem" 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 overHidden" style="width: 1.75rem" :title="item.produceDate">{{item.produceDate || '-'}}</div>
+                       </div>
+                       <div class="fl">
+                         <div class="name">库存:</div>
+                         <div class="text overHidden" style="width: 2.3rem">{{item.reserve || '-'}}</div>
+                       </div>
+                     </div>
+                     <div class="list">
+                       <div class="fl" @click.stop="goAttach(item.attach)">
+                         <div class="name">规格书:</div>
+                         <div class="text">
+                           <i class="iconfont icon-pdf" :class="{'active': item.attach && item.attach !== '' && item.attach !== '1'}"></i>
+                         </div>
+                       </div>
+                       <div class="fl">
+                         <div class="name">起拍:</div>
+                         <div class="text overHidden" style="width: 2.3rem">{{item.minBuyQty || '-'}}</div>
+                       </div>
+                     </div>
+                     <div class="list">
+                       <div class="name">卖家名称:</div>
+                       <div class="text overHidden">{{item.storeName}}</div>
+                     </div>
+                     <div class="list">
+                       <div class="name left">价格梯度<p>(pcs):</p></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.uSDPrice}}</div>
+                           </li>
+                         </ul>
+                       </div>
+                     </div>
+                     <div class="list clearfix">
+                       <div class="pull-left cancat" @click.stop="cancatSeller(item)">
+                         <i class="iconfont icon-kefu1"></i>联系卖家
+                       </div>
+                       <div class="pull-right clearfix">
+                         <div class="pull-left" @click="buy(item, false, $event)">加入购物车</div>
+                         <div class="pull-left" @click="buy(item, true, $event)">立即购买</div>
+                       </div>
+                     </div>
+                   </div>
+                 </div>
+               </div>
+             </template>
+             <!-- 卖家 物料名称 品牌-->
+             <template v-else-if="ChooseTop === 'kind' || ChooseTop === 'store' || ChooseTop === 'brand'">
+               <div v-if="resourceList&&resourceList.stock&&resourceList.stock.content.length > 0">
+                 <div class="middle" v-for="(item, index) in resourceList.stock.content">
+                   <nuxt-link :to="`/mobile/shop/${item.storeUuid}`" tag="div" class="list clearfix" style="border-bottom: 1px solid #dcdcdc;padding-bottom: 0.1rem">
+                     <div class="name pull-left">{{item.enName}}</div>
+                     <div class="more_icon pull-right"><i class="iconfont icon-swiper-right"></i></div>
+                   </nuxt-link>
+                   <div class="middle_bottom clearfix">
+                     <div class="middle_bottom-left">
+                       <img :src="item.storeLogoUrl || '/images/component/default.png'">
+                     </div>
+                     <div class="middle_bottom-left">
+                       <div class="middle_bottom-leftitem clearfix">
+                         <div class="bottom-title">电话</div><label style="float: left">:</label>
+                         <div class="overHidden" style="width: 3.9rem">
+                           <a :href="'tel:' + AlertstoreInfo.enterprise.enTel" target="_blank" class="content-line" style="color: #2d8cf0">{{item.enTel}}</a>
+                         </div>
+                       </div>
+                       <div class="middle_bottom-leftitem clearfix">
+                         <div class="bottom-title">邮箱</div><label style="float: left">:</label><div class="overHidden" style="width: 3.9rem">{{item.enEmail}}</div>
+                       </div>
+                       <div class="middle_bottom-leftitem clearfix">
+                         <div class="bottom-title">执照号</div><label style="float: left">:</label><div class="overHidden" style="width: 3.9rem">{{item.enBusinesscode}}</div>
+                       </div>
+                       <div class="middle_bottom-leftitem clearfix">
+                         <div class="bottom-title">地址</div><label style="float: left">:</label><div style="width: 3.9rem;">{{item.enAddress}}</div>
+                       </div>
+                     </div>
+                   </div>
+                 </div>
+               </div>
+             </template>
+           </template>
+           <!-- 期货 -->
+           <template v-else>
+             <!-- 型号结果 -->
+             <template v-if="ChooseTop === 'component'">
+               <div v-if="resourceList && resourceList.futures && resourceList.futures.content.length > 0">
+                 <div class="middle" v-for="(item, index) in resourceList.futures.content">
+                   <div class="list">
+                     <div class="name">品牌:</div>
+                     <div class="text overHidden">{{item.brandNameEn || '—'}}</div>
+                   </div>
+                   <div class="list">
+                     <div class="name">物料名称(类目):</div>
+                     <div class="text overHidden">{{item.kindNameCn || '-'}}</div>
+                   </div>
+                   <div class="list">
+                     <div class="name">型号:</div>
+                     <div class="text overHidden">{{item.code || '-'}}</div>
+                   </div>
+                   <div class="list">
+                     <div class="name">规格:</div>
+                     <div class="text overHidden">{{item.spec || '-'}}</div>
+                   </div>
+                   <div class="list">
+                     <div class="name">单位:</div>
+                     <div class="text overHidden">{{item.unit || 'PCS'}}</div>
+                   </div>
+                   <div class="list clearfix" style="overflow: inherit;">
+                     <div class="fl">
+                       <div class="name">卖家:</div>
+                       <div class="text overHidden" style="width: 4rem">{{item.storeName || '卖家名称'}}</div>
+                     </div>
+                     <div class="pull-right sayPriBtn" @click="publish(item)">立即询价</div>
+                   </div>
+                 </div>
+               </div>
+             </template>
+             <!-- 卖家 物料名称 品牌-->
+             <template v-else-if="ChooseTop === 'kind' || ChooseTop === 'store' || ChooseTop === 'brand'">
+               <div v-if="resourceList&&resourceList.futures &&resourceList.futures.content.length > 0">
+                 <div class="middle" v-for="(item, index) in resourceList.futures.content" @click="goSupplierDetail(item)">
+                   <div class="list clearfix" style="border-bottom: 1px solid #dcdcdc;padding-bottom: 0.1rem">
+                     <div class="name pull-left">{{item.enName}}</div>
+                     <div class="more_icon pull-right"><i class="iconfont icon-swiper-right"></i></div>
+                   </div>
+                   <div class="middle_bottom clearfix">
+                     <div class="middle_bottom-left">
+                       <img :src="item.storeLogoUrl || '/images/component/default.png'">
+                     </div>
+                     <div class="middle_bottom-left">
+                       <div class="middle_bottom-leftitem clearfix">
+                         <div class="bottom-title">电话</div><label style="float: left">:</label>
+                         <div class="overHidden" style="width: 3.9rem">
+                           <a :href="'tel:' + AlertstoreInfo.enterprise.enTel" target="_blank" class="content-line" style="color: #2d8cf0">{{item.enTel}}</a>
+                         </div>
+                       </div>
+                       <div class="middle_bottom-leftitem clearfix">
+                         <div class="bottom-title">邮箱</div><label style="float: left">:</label><div class="overHidden" style="width: 3.9rem">{{item.enEmail}}</div>
+                       </div>
+                       <div class="middle_bottom-leftitem clearfix">
+                         <div class="bottom-title">执照号</div><label style="float: left">:</label><div class="overHidden" style="width: 3.9rem">{{item.enBusinesscode}}</div>
+                       </div>
+                       <div class="middle_bottom-leftitem clearfix">
+                         <div class="bottom-title">地址</div><label style="float: left">:</label><div style="width: 3.9rem;">{{item.enAddress}}</div>
+                       </div>
+                     </div>
+                   </div>
+                 </div>
+               </div>
+             </template>
+           </template>
+         </template>
+       </div>
+     </template>
+     <template v-if="allTotal === 0">
+       <div class="none-state">
+         <img src="/images/mobile/@2x/search-empty.png">
+         <p>暂无数据</p>
+         <nuxt-link to="/">返回首页</nuxt-link>
+       </div>
+     </template>
+   </div>
+   <!-- 联系卖买家 -->
+   <div class="mobile-modal" v-if="showStoreInfo" @touchmove="preventTouchMove($event)">
+     <div class="mobile-modal-box mobile-link-en">
+       <div class="mobile-modal-header">联系方式<i @click="showStoreInfo = false" class="icon-guanbi iconfont"></i></div>
+       <div class="mobile-modal-content">
+         <div v-if="AlertstoreInfo.enterprise.enTel"><span >电话:</span><a :href="'tel:' + AlertstoreInfo.enterprise.enTel" target="_blank" class="content-line link-url">{{AlertstoreInfo.enterprise.enTel}}</a></div>
+         <div v-if="AlertstoreInfo.enterprise.enPhone"><span >手机:</span><a :href="'tel:' + AlertstoreInfo.enterprise.enPhone" target="_blank" class="content-line link-url">{{AlertstoreInfo.enterprise.enPhone}}</a></div>
+         <div v-if="AlertstoreInfo.enterprise.enWeixin"><span >微信:</span><span class="content-line">{{AlertstoreInfo.enterprise.enWeixin}}</span></div>
+         <div v-if="AlertstoreInfo.enterprise.enQQ"><span >Q&nbsp;Q:</span><span class="content-line">{{AlertstoreInfo.enterprise.enQQ}}</span></div>
+         <div v-if="!empty">暂无联系方式</div>
+       </div>
+     </div>
+   </div>
+   <!-- 询价 -->
+   <publish-supplier-seek :product="currentProduct" :showPublishBox="showPublishBox" @cancelAction="showPublishBox = false" @remindAction="setRemindText"></publish-supplier-seek>
+    <!-- 查看品牌更多信息 -->
+   <modal-wrapper :showModal="showBrandDetails" :title="currentBrandItem.nameEn" @closeAction="showBrandDetails=false">
+     <div class="store-info" >
+       <div class="store-description">
+         <h4>主营产品</h4>
+         <p class="content" v-if="currentBrandItem.series">
+           {{currentBrandItem.series}}
+         </p>
+         <div class="com-none-state" v-else>
+           <p>抱歉,暂无主营产品信息</p>
+         </div>
+       </div>
+       <div class="store-description">
+         <h4>应用领域</h4>
+         <p class="content" v-if="currentBrandItem.application">
+           {{currentBrandItem.application}}
+         </p>
+         <div class="com-none-state" v-else>
+           <p>抱歉,暂无应用领域信息</p>
+         </div>
+       </div>
+       <div class="store-description">
+         <h4>品牌介绍</h4>
+         <p class="content" v-if="currentBrandItem.brief">
+           {{currentBrandItem.brief}}
+         </p>
+         <div class="com-none-state" v-else>
+           <p>抱歉,暂无企业介绍</p>
+         </div>
+       </div>
+       <div class="contact-info">
+         <h4>联系我们</h4>
+         <ul class="list-unstyled clearfix">
+           <li>
+             <div>电&nbsp;&nbsp;话:</div>
+             <div v-if="currentBrandItem.userDefine.userTel"><a :href="'tel:' + currentBrandItem.userDefine.userTel" >{{currentBrandItem.userDefine.userTel}}</a></div>
+             <div v-else><span>-</span></div>
+           </li>
+           <!-- <li>
+              <div>店铺地址:</div>
+              <div v-if="store.enterprise.address">{{store.enterprise.address}}</div>
+              <div v-else><span>-</span></div>
+            </li>-->
+         </ul>
+       </div>
+     </div>
+   </modal-wrapper>
+   <remind-box :title="collectResult" :timeoutCount="timeoutCount"></remind-box>
+   <!--<loading v-if="isSearchSearchingMore"></loading>-->
+   <login-box @onLoginBoxClose="showLoginBox = false" v-if="showLoginBox" :url="url"></login-box>
+   <pull-up :fixId="'main-search-wrapper'" :searchMore="isSearchSearchingMore" :allPage="allPage" :page="page" @pullUpAction="onPullUp" :FixedEl="true"></pull-up>
+ </div>
+</template>
+
+<script>
+  import { PublishSupplierSeek } from '~components/mobile/applyPurchase'
+  import { RemindBox, Loading, LoginBox, PullUp } from '~components/mobile/common'
+  import { ModalWrapper } from '~components/mobile/base'
+  import axios from '~plugins/axios'
+  export default {
+    layout: 'mobile',
+    data() {
+      return {
+        collectResult: '', // 提示性文字
+        timeoutCount: 0, // 弹出框计时数
+        isSearchSearchingMore: false, // 是否正在请求数据
+        showLoginBox: false, // 是否显示登录弹窗
+        url: '', // 登录后跳转回来的地址
+        keyword: '', // 关键字搜索
+        showStoreInfo: false, // 联系买卖家弹窗
+        AlertstoreInfo: { // 买卖家弹窗信息
+          enterprise: {}
+        },
+        navType: 'hasStore', // 现货 期货
+        ChooseTop: 'component', // 型号, 物料名称, 卖家, 品牌
+        page: 1,
+        currentProduct: {},
+        currentBrandItem: { // 查看品牌详情信息
+          userDefine: {}
+        }, // 存放当前点击的品牌内容
+        showBrandDetails: false, // 是否展示品牌详情
+        brandIsAccurate: false, // 品牌是否处于精确查找
+        showPublishBox: false, // 询价弹窗
+        resourceList: [],
+        futuresallTotal: 0,
+        stockallTotal: 0,
+        allPage: 0, // 总页数
+        allTotal: 0, // 总条数
+        associate: {
+          show: false
+        },
+        displayKeyword: ''
+      }
+    },
+    computed: {
+      getNowChooseType() {
+        if (this.ChooseTop === 'component') {
+          return '型号'
+        } else if (this.ChooseTop === 'kind') {
+          return '物料'
+        } else if (this.ChooseTop === 'store') {
+          return '卖家'
+        } else if (this.ChooseTop === 'brand') {
+          return '品牌'
+        }
+      },
+      empty () {
+        return this.checkInfo(this.AlertstoreInfo.enterprise.enTel) || this.checkInfo(this.AlertstoreInfo.enterprise.enPhone) || this.checkInfo(this.AlertstoreInfo.enterprise.enWeixin) || this.checkInfo(this.AlertstoreInfo.enterprise.enQQ)
+      },
+      placeholder() {
+        if (this.ChooseTop === 'component') {
+          return '请输入您要搜索的型号'
+        } else if (this.ChooseTop === 'kind') {
+          return '请输入您要搜索的物料名称'
+        } else if (this.ChooseTop === 'store') {
+          return '请输入您要搜索的卖家名称'
+        } else if (this.ChooseTop === 'brand') {
+          return '请输入您要搜索的品牌'
+        }
+      },
+      similarKeywords () {
+        return this.$store.state.search.keywords.data
+      }
+    },
+    async asyncData({store, route}) {
+      let ChooseTop = route.query.choosetype || 'component'
+      let keyword = route.query.keyword || ''
+      let brandIsAccurate = false
+      let { data } = await axios.get(`/search/201819`, {params: {count: 10, page: 1, keyword: keyword, type: ChooseTop}})
+      let allTotal = 0
+      let futuresallTotal = data.futures ? data.futures.total : 0
+      let stockallTotal = data.stock ? data.stock.total : 0
+      let allPage = 0
+      let currentBrandItem = {
+        userDefine: {}
+      }
+      if (ChooseTop === 'brand') {
+        if (data.futures && data.stock) {
+          // 品牌查询 精准查找
+          brandIsAccurate = true
+          currentBrandItem = data.brand
+          // 则总条数等于 现货 + 期货
+          allTotal = stockallTotal + futuresallTotal
+          allPage = Math.ceil(data.stock.total / 10)
+        } else {
+          allTotal = data.total || 0
+          allPage = Math.ceil(data.total / 10)
+        }
+      } else {
+        // 其他情况
+        allTotal = stockallTotal + futuresallTotal
+        allPage = Math.ceil(data.stock.total / 10)
+      }
+      return {
+        ChooseTop: ChooseTop,
+        keyword: keyword,
+        resourceList: data,
+        allPage: allPage,
+        stockallTotal: stockallTotal,
+        futuresallTotal: futuresallTotal,
+        allTotal: allTotal,
+        brandIsAccurate: brandIsAccurate,
+        currentBrandItem: currentBrandItem,
+        displayKeyword: keyword
+      }
+    },
+    methods: {
+      onPullUp() {
+        this.page++
+        this.ReloadList()
+      },
+      // 搜索点击事件
+      onClickSearchHander() {
+        if (!this.keyword) return
+        this.$router.push(`/mobile/search/newkeycode?choosetype=${this.ChooseTop}&keyword=${this.keyword}`)
+        // this.setChangelistHander(this.ChooseTop)
+        // window.location.href =
+      },
+      // 现货 期货切换
+      getReloadList(_tp) {
+        this.navType = _tp
+        this.page = 1
+        this.resourceList.futures.content = []
+        this.resourceList.stock.content = []
+        this.ReloadList()
+      },
+      // 刷新数据
+      ReloadList(param) {
+        // 如果有值,则代表 是品牌 模糊到精确
+        // 这里发送数据请求
+        this.isSearchSearchingMore = true
+        this.$http.get(`/search/201819`, {params: {count: 10, page: this.page, keyword: this.keyword, type: this.ChooseTop}}).then(res => {
+          this.isSearchSearchingMore = false
+          if (!this.brandIsAccurate && this.ChooseTop === 'brand') {
+            this.resourceList.content = [...this.resourceList.content, ...res.data.content]
+            return
+          }
+          if (this.navType === 'hasStore') {
+            this.resourceList.stock.content = [...this.resourceList.stock.content, ...res.data.stock.content]
+          } else {
+            this.resourceList.futures.content = [...this.resourceList.futures.content, ...res.data.futures.content]
+          }
+        }, err => {
+          this.isSearchSearchingMore = false
+        })
+      },
+      // 模糊品牌查询结果点击
+      goToBrandAccurate(item) {
+        this.currentBrandItem = item
+        this.keyword = item.nameEn
+        this.setChangelistHander(this.ChooseTop)
+      },
+      // 取消返回事件
+      cancelSearchHander() {
+        this.$router.replace('/')
+      },
+      // 购买 加入购物车
+      buy: function (item, flag, e) {
+        this.baseUtils.buyOrCar(flag, e, this, item, '/mobile/center/user/pay/')
+      },
+      // 联系买卖家
+      cancatSeller(item) {
+        this.$http.get(`/api/store-service/stores?uuid=${item.storeid}`).then(res => {
+          this.AlertstoreInfo = res.data
+          this.showStoreInfo = true
+        })
+      },
+      // 切换顶部一级标题
+      setChangelistHander(str) {
+        if (document.querySelector('#main-search-wrapper')) document.querySelector('#main-search-wrapper').scrollTop = 0
+        this.ChooseTop = str
+        this.page = 1
+        if (!this.keyword) return
+        this.displayKeyword = this.keyword
+        this.brandIsAccurate = false
+        this.isSearchSearchingMore = true
+        this.$http.get(`/search/201819`, {params: {count: 10, page: 1, keyword: this.keyword, type: this.ChooseTop}}).then(data => {
+          data = data.data
+          this.resourceList = data
+          this.futuresallTotal = data.futures ? data.futures.total : 0
+          this.stockallTotal = data.stock ? data.stock.total : 0
+          let allTotal = 0 // 总条数
+          if (this.ChooseTop === 'brand') {
+            if (data.futures && data.stock) {
+              // 品牌查询 精准查找
+              this.brandIsAccurate = true
+              // 则总条数等于 现货 + 期货
+              allTotal = this.stockallTotal + this.futuresallTotal
+              this.currentBrandItem = data.brand
+            } else {
+              allTotal = data.total || 0
+            }
+          } else {
+            // 其他情况
+            allTotal = this.stockallTotal + this.futuresallTotal
+          }
+          this.allTotal = allTotal
+          this.isSearchSearchingMore = false
+          if (!this.brandIsAccurate && this.ChooseTop === 'brand') {
+            // 品牌 模糊查找
+            this.allPage = Math.ceil(this.resourceList.total / 10) || 0
+          } else {
+            if (this.navType === 'hasStore') {
+              this.allPage = this.resourceList.stock && Math.ceil(this.resourceList.stock.total / 10) || 0
+            } else {
+              this.allPage = this.resourceList.futures && Math.ceil(this.resourceList.futures.total / 10) || 0
+            }
+          }
+          this.associate.show = false
+        })
+      },
+      // 供应商详情
+      goSupplierDetail: function (item) {
+        this.$http.get('/vendor/introduction/product/count', {params: {vendUU: item.enUU}})
+          .then(response => {
+            if (response.data.success && response.data.count > 0) {
+              this.$router.push(`/mobile/supplier/detail/${item.enUU}?isStore=${item.isStore}`)
+            } else {
+              this.setRemindText('供应商正在完善产品信息,暂时不能查看更多。')
+            }
+          })
+      },
+      checkInfo: function (str) {
+        return str && str.trim() !== ''
+      },
+      publish: function (product) {
+        if (this.user.logged) {
+          let item = {
+            cmpCode: product.code,
+            pbranden: product.brandNameEn,
+            brand: product.brandNameEn,
+            spec: product.spec,
+            kind: product.kindNameCn
+          }
+          this.currentProduct = item
+          this.showPublishBox = true
+        } else {
+          this.url = this.$route.fullPath
+          this.showLoginBox = true
+        }
+      },
+      setRemindText(str) {
+        this.timeoutCount++
+        this.collectResult = str
+      },
+      onAssociateClick (word) {
+        if (this.ChooseTop === 'component') {
+          this.keyword = word.code
+        } else if (this.ChooseTop === 'kind') {
+          this.keyword = word.nameCn
+        } else if (this.ChooseTop === 'store') {
+          this.keyword = word.name
+        } else if (this.ChooseTop === 'brand') {
+          this.keyword = word.nameEn
+        }
+        this.associate.show = false
+        this.setChangelistHander(this.ChooseTop)
+      },
+      Getsimilar(word) {
+        if (this.ChooseTop === 'component') {
+          return word.code
+        } else if (this.ChooseTop === 'kind') {
+          return word.nameCn
+        } else if (this.ChooseTop === 'store') {
+          return word.name
+        } else if (this.ChooseTop === 'brand') {
+          return word.nameEn
+        }
+      },
+      onChange () {
+        if (!this.keyword) {
+          this.associate.show = false
+          this.$store.dispatch('resetSearchKeywords')
+        } else {
+          this.searchKeywords()
+        }
+      },
+      changeKeyWord() {
+        this.associate.show = true
+        this.onChange()
+      },
+      searchKeywords () {
+        this.$store.dispatch('searchKeywords', {keyword: this.keyword, type: this.ChooseTop})
+      },
+      onClickTosearch(str) {
+        this.keyword = str
+        this.setChangelistHander(this.ChooseTop)
+      }
+    },
+    components: {
+      RemindBox,
+      Loading,
+      LoginBox,
+      PublishSupplierSeek,
+      ModalWrapper,
+      PullUp
+    },
+    watch: {
+      '$route' (to, from) {
+        this.keyword = to.query.keyword
+        this.displayKeyword = to.query.keyword
+        this.setChangelistHander(to.query.choosetype)
+      }
+    }
+  }
+</script>
+
+<style lang="scss" scoped>
+  @mixin overFlowHidden {
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+  }
+  @mixin lineHeight($value) {
+    height: $value;
+    line-height: $value;
+  }
+  .search-wrapper {
+    background: #f1f3f6;
+    width: 100%;
+    position: fixed;
+    z-index: 1000;
+    top: 0;
+    bottom: 0;
+    .main-search-header {
+      position: absolute;
+      background: #3e82f5;
+      line-height: .88rem;
+      margin-top: 0;
+      z-index: 1;
+      width: 100%;
+      input {
+        width: 4.88rem;
+        height: .62rem;
+        line-height: .62rem;
+        font-size: .26rem;
+        color: #999;
+        margin-left: 0.3rem;
+        /*padding-left: 1.26rem;*/
+        border: .04rem solid #fff;
+        background: #fff;
+        outline: none;
+        border-radius: 0;
+        float: left;
+        margin-top: .12rem;
+        -webkit-appearance: none;
+        border-top-left-radius: .14rem;
+        border-bottom-left-radius: .14rem;
+      }
+      span {
+        display: inline-block;
+        width: 1.02rem;
+        text-align: center;
+        height: .62rem;
+        line-height: .62rem;
+        color: #366df3;
+        font-size: .28rem;
+        margin-left: .02rem;
+        border-top-right-radius: .14rem;
+        border-bottom-right-radius: .14rem;
+        background: #fff;
+        float: left;
+        margin-top: .12rem;
+      }
+      a {
+        font-size: .28rem;
+        color: #fff;
+        margin-left: .2rem;
+      }
+      .main-search-header-controll {
+        background: #3e82f5;
+        width: 6.2rem;
+        span {
+          @include lineHeight(0.66rem);
+          font-size: 0.28rem;
+          color: #fff;
+          margin: 0;
+          background: rgba(0,0,0,0);
+          border-radius: 0;
+          width: 25%;
+          &.active a {
+            color: #fff;
+            border-bottom: 0.04rem solid #fff;
+          }
+          a {
+            margin-left: 0 !important;
+          }
+       }
+      }
+    }
+    .main-search-wrapper {
+      margin-top: 1.7rem;
+    }
+    .search-title {
+      font-size: 0.26rem;
+      text-align: center;
+      color: #999;
+      margin: 0 auto 0.2rem;
+      span {
+        color: #4290f7
+      }
+    }
+    .search-nav {
+      background: #fff;
+      @include lineHeight(1rem);
+      padding: 0 0.2rem;
+      span {
+        width: 50%;
+        color: #666;
+        font-size: 0.28rem;
+        text-align: center;
+        border-bottom: 0.04rem solid #dcdcdc;
+        @include lineHeight(0.7rem);
+        margin-top: 0.15rem;
+        &.active {
+          border-bottom: 0.04rem solid #4290f7;
+          color: #4290f7
+        }
+      }
+    }
+    .search-content {
+      padding-top: 0;
+      margin-top: 0.2rem;
+      height: calc(100vh - 3.43rem);
+      overflow-y: auto;
+      .middle {
+        background: #fff;
+        padding: 0.2rem;
+        .lookMoreBtn {
+          font-size: 0.28rem;
+          color: #2d8cf0
+        }
+        .more_icon {
+          font-size: 0.34rem;
+          color: #999;
+        }
+        .order-tag {
+          display: inline-block;
+          font-size: .18rem;
+          color: #fff;
+          font-weight: bold;
+          background: #ee1717;
+          height: .27rem;
+          width: .27rem;
+          line-height: .27rem;
+          text-align: center;
+          border-radius: .05rem;
+          position: relative;
+          top: -.05rem;
+          margin-right: .05rem;
+          &.reserve-tag {
+            background: #07bb1c;
+          }
+        }
+        text-align: left;
+        background: #fff;
+        /*border-radius: 5px;*/
+        margin-bottom: 0.2rem;
+        .overHidden {
+          @include overFlowHidden()
+        }
+        .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 {
+          @include overFlowHidden();
+          width: 100%;
+          .left {
+            float: left;
+            overflow: hidden;
+            text-overflow: ellipsis;
+            white-space: nowrap;
+          }
+          .textinfo {
+            font-size: 0.18rem;
+            margin-left: 0.1rem;
+            display: inline-block;
+            background: #3f84f6;
+            color: #fff;
+            font-weight: bold;
+            border-radius: 3px;
+            width: 0.8rem;
+            height: 0.32rem;
+            line-height: 0.32rem;
+            text-align: center
+          }
+          .button {
+            font-size: 0.3rem;
+            color: #1a58dd;
+            width: 0.92rem;
+            height: 0.43rem;
+            line-height: 0.43rem;
+            text-align: center;
+            border-radius: 5px;
+            border:1px solid #1a58dd;
+            display: inline-block;
+            margin-right: 0.2rem;
+          }
+          margin-bottom: 0.18rem;
+          &::after{
+            clear: both;
+            display: block;
+            content: ' ';
+            visibility: hidden;
+            zoom: 1;
+          }
+          .fl {
+            width: 3.5rem;
+            float: left;
+          }
+          .fr {
+            text-align: left;
+            width: 2.6rem;
+            overflow: hidden;
+            text-overflow: ellipsis;
+            white-space: nowrap;
+          }
+          &.list-long {
+            .fl {
+              width: 100% !important;
+            }
+          }
+          .name {
+            color: #666;
+            font-size: 0.28rem;
+            display: inline-block;
+          }
+          .text {
+            display: inline-block;
+            color: #333;
+            font-size: 0.28rem;
+            vertical-align: top;
+            width: 5.5rem;
+            @include overFlowHidden();
+          }
+          .table {
+            width: 5.85rem;
+            margin-bottom: 0;
+            margin-top: 0;
+            margin-left: 0.1rem;
+            li {
+              height: 0.43rem;
+              line-height: 0.43rem;
+              border-left: .01rem solid #c5c5c5;
+              font-size: .28rem;
+              &::after {
+                clear: both;
+                display: block;
+                content: ' ';
+                visibility: hidden;
+                zoom: 1;
+              }
+              div {
+                text-align: center;
+                width: 50%;
+                float: left;
+                border-right: .01rem solid #c5c5c5;
+                border-bottom: .01rem solid #c5c5c5;
+              }
+              &:nth-child(odd) {
+                background: #ddd;
+                color: #333;
+                font-size: 0.28rem;
+              }
+              &:nth-child(even) {
+                background: #fcfcfc;
+                color: #333;
+                font-size: 0.28rem;
+              }
+              &:nth-last-of-type(1){
+                color: #f31919;
+              }
+              &.title {
+                font-size: 0.28rem;
+                color: #333;
+              }
+            }
+          }
+          .pull-right {
+            div {
+              color: #3f84f6;
+              font-size: 0.28rem;
+              border-radius: 0.07rem;
+              border: 1px solid #3f84f6;
+              background: #fff;
+              width: 2rem;
+              line-height: 0.54rem;
+              height: 0.54rem;
+              text-align: center;
+            }
+            div:last-child {
+              margin-left: 0.2rem;
+              color: #fff;
+              background: #3f84f6;
+            }
+          }
+          i {
+            &.icon-pdf {
+              color: #929292;
+              font-size: 0.4rem;
+            }
+            &.active {
+              color: #eb062b;
+            }
+          }
+          .cancat {
+            height: 0.56rem;
+            line-height: 0.56rem;
+            border: 1px solid #3f84f6;
+            color: #3f84f6;
+            font-size: 0.26rem;
+            text-align: center;
+            border-radius: 3px;
+            padding: 0 0.1rem;
+            overflow: hidden;
+            width: auto;
+          }
+          img.pull-left {
+            width: 1.21rem;
+            height: 0.8rem;
+            border: 1px solid #dcdcdc;
+            border-radius: 0.07rem;
+            margin-top: 0;
+          }
+        }
+        .sayPriBtn {
+          width: 2rem;
+          @include lineHeight(0.54rem);
+          color: #fff;
+          font-size: 0.28rem;
+          background: #3f84f6;
+          border-radius: 3px;
+          text-align: center;
+          margin-top: -0.1rem;
+        }
+        .middle_bottom {
+          .middle_bottom-left {
+            float: left;
+            img {
+              width: 1.21rem;
+              height: 1.21rem;
+              border: 1px solid #3e82f5;
+              border-radius: 0.07rem;
+              overflow: hidden;
+            }
+            div.middle_bottom-leftitem {
+              line-height: 0.5rem;
+              font-size: 0.28rem;
+              div {
+                display: inline-block;
+                color: #666;
+                height: 100%;
+                float: left;
+                &.bottom-title {
+                  display: inline-block;
+                  text-align: justify;
+                  vertical-align: top;
+                  width: 1.5rem;
+                  height: 0.5rem;
+                  &::after {
+                    content: "";
+                    display: inline-block;
+                    width: 100%;
+                    overflow: hidden;
+                    height: 0;
+                  }
+                }
+              }
+            }
+          }
+        }
+      }
+    }
+    .searchContent2 {
+      height: calc(100vh - 7.3rem);
+    }
+    .searchContent3 {
+      height: calc(100vh - 2.25rem);
+    }
+    .store-info {
+      background: #f7f7f7;
+      h4{
+        width: 100%;
+        text-align: left;
+        font-size: 0.3rem;
+        line-height: 0.6rem;
+        height: 0.6rem;
+        letter-spacing: 0px;
+        color: #333;
+        font-weight: normal;
+        border-bottom: 1px solid #efeded;
+        padding-left: 0.11rem;
+        &:before{
+          content: '';
+          display: inline-block;
+          width: 0.08rem;
+          height: 0.26rem;
+          background-color: #145dee;
+          margin-right: 0.13rem;
+          position: relative;
+          top: 0.02rem;
+        }
+      }
+      .contact-info{
+        background: #fff;
+        margin: .2rem auto;
+        border-radius: .1rem;
+        ul{
+          padding: 0.22rem 0rem;
+          li{
+            div{
+              float: left;
+              font-size: .28rem;
+              color: #666;
+              line-height: .53rem;
+              width:80%;
+              text-align: left;
+              &:first-child{
+                width: 20%;
+                padding-left: 0.36rem;
+                text-align: justify;
+              }
+              a{
+                color: #145dee;
+              }
+              .click-tel, .click-phone{
+                color: #f44336;
+              }
+            }
+            /* &:last-child{
+               div{
+                 width: 74%;
+                 padding-right:.34rem;
+                 word-wrap: break-word;
+                 &:first-child{
+                   text-align: left;
+                   padding: 0rem 0rem 0rem .36rem;
+                   width: 26%;
+                 }
+               }
+             }*/
+          }
+        }
+      }
+      .store-description{
+        background: #fff;
+        /*width: 6.96rem;*/
+        margin: 0 auto .2rem;
+        border-radius: .1rem;
+        .content {
+          text-indent:2em;
+          background: #fff;
+          margin: .2rem auto 0;
+          padding: .04rem .34rem .4rem .34rem;
+          width: 100%;
+          font-size: .28rem;
+          color: #666;
+          text-align: left;
+          height: 95%;
+          /*box-shadow: 0 .03rem .01rem 0 #cdcbcb96;*/
+          line-height: .5rem;
+          word-break: break-all;
+        }
+      }
+    }
+    .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;
+      }
+    }
+    .associate-list {
+      position: absolute;
+      width: 100%;
+      background: #fff;
+      top: 0.8rem;
+      border: 1px solid #dcdcdc;
+      z-index: 100;
+      height: 100%;
+      left: 0;
+      bottom: 0;
+      right: 0;
+      li {
+        height: 0.7rem;
+        line-height: .9rem;
+        margin: 0 .45rem;
+        border-bottom: .04rem solid #f1f0f0;
+        @include overFlowHidden();
+        i {
+          font-size: .36rem;
+          margin-right: .24rem;
+          color: #ddd;
+        }
+        span {
+          color: #999;
+          font-size: .28rem;
+          line-height: .58rem;
+          height: .58rem;
+          display: inline-block;
+        }
+        &:active, &:hover {
+          background: #eee;
+        }
+        &:last-child {
+          text-align: center;
+          font-size: .3rem;
+          color: #3976f4;
+          border-bottom: none;
+          &:active, &:hover {
+            background: #fff;
+          }
+        }
+      }
+    }
+  }
+</style>

BIN
static/images/mobile/@2x/productDetail/Strand.png


BIN
static/images/mobile/@2x/productDetail/isStrand.png


+ 10 - 0
store/index.js

@@ -244,6 +244,16 @@ export const actions = {
         commit('search/GET_KEYWORDS_FAILURE', err)
       })
   },
+  // 搜索关键字列表
+  searchKeywordsList({ commit }, params = {}) {
+    commit('search/REQUEST_KEYWORDSLIST')
+    return axios.get('/search/201819', { params })
+      .then(response => {
+        commit('search/GET_KEYWORDSLIST_SUCCESS', response.data)
+      }, err => {
+        commit('search/GET_KEYWORDSLIST_FAILURE', err)
+      })
+  },
   resetSearchKeywords({ commit }) {
     commit('search/RESET_KEYWORDS')
   },

+ 10 - 0
store/product.js

@@ -185,6 +185,16 @@ export const actions = {
         commit('common/GET_COLLECT_LIST_FAILURE', err)
       })
   },
+  // 获取搜索所有物料信息
+  loadPublishList ({ commit }, params = {}) {
+    commit('common/REQUEST_PUBLISH_MOBILE')
+    return axios.get(`/api/product/search/page`, { params })
+      .then(response => {
+        commit('common/GET_PUBLISH_MOBILE_SUCCESS', response.data)
+      }, err => {
+        commit('common/GET_PUBLISH_MOBILE_FAILURE', err)
+      })
+  },
   // 供应商维护
   loadSupplierInformation ({ commit }, params = {}) {
     let uuid = params.uuid

+ 14 - 0
store/product/common.js

@@ -14,6 +14,10 @@ export const state = () => ({
   collectListMobile: {
     fetching: false,
     data: []
+  },
+  publishMobile: {
+    fetching: false,
+    data: []
   }
 })
 
@@ -57,5 +61,15 @@ export const mutations = {
   GET_COLLECT_LIST_SUCCESS (state, result) {
     state.collectListMobile.fetching = false
     state.collectListMobile.data = result
+  },
+  REQUEST_PUBLISH_MOBILE (state) {
+    state.publishMobile.fetching = true
+  },
+  GET_PUBLISH_MOBILE_FAILURE (state) {
+    state.publishMobile.fetching = false
+  },
+  GET_PUBLISH_MOBILE_SUCCESS (state, result) {
+    state.publishMobile.fetching = false
+    state.publishMobile.data = result
   }
 }

+ 15 - 0
store/search.js

@@ -2,6 +2,11 @@ export const state = () => ({
   keywords: {
     fetching: false,
     data: []
+  },
+
+  keywordsList: {
+    fetching: false,
+    data: []
   }
 })
 
@@ -16,6 +21,16 @@ export const mutations = {
     state.keywords.fetching = false
     state.keywords.data = result
   },
+  REQUEST_KEYWORDSLIST (state) {
+    state.keywordsList.fetching = true
+  },
+  GET_KEYWORDSLIST_FAILURE (state) {
+    state.keywordsList.fetching = false
+  },
+  GET_KEYWORDSLIST_SUCCESS (state, result) {
+    state.keywordsList.fetching = false
+    state.keywordsList.data = result
+  },
   RESET_KEYWORDS (state) {
     state.keywords.data = []
   }