Bläddra i källkod

Merge branch 'dev'

yangc 7 år sedan
förälder
incheckning
96485434b1
96 ändrade filer med 3674 tillägg och 628 borttagningar
  1. 1 1
      app.html
  2. 91 2
      assets/scss/mobileCommon.scss
  3. 3 3
      components/applyPurchase/ApplyInfo.vue
  4. 31 15
      components/applyPurchase/BatchPublish.vue
  5. 36 20
      components/applyPurchase/PublishApply.vue
  6. 231 0
      components/common/PcSearchHeader.vue
  7. 16 2
      components/home/count/displayCard.vue
  8. 29 13
      components/mobile/Home.vue
  9. 2 2
      components/mobile/HomeOld.vue
  10. 1 1
      components/mobile/MobileFooter.vue
  11. 25 2
      components/mobile/MobileHeader.vue
  12. 49 12
      components/mobile/applyPurchase/PublishSeek.vue
  13. 13 6
      components/mobile/applyPurchase/SayPrice.vue
  14. 357 96
      components/mobile/applyPurchase/SayPriceInfo.vue
  15. 145 68
      components/mobile/applyPurchase/SeekList.vue
  16. 10 10
      components/mobile/base/SearchHeader.vue
  17. 14 9
      components/mobile/brand/ComponentDetail.vue
  18. 46 6
      components/mobile/center/Seek.vue
  19. 254 0
      components/mobile/common/StatisticsMobile.vue
  20. 2 1
      components/mobile/common/index.js
  21. 485 119
      components/mobile/store/StoreDetail.vue
  22. 1 1
      components/mobile/supplier/List.vue
  23. 1 1
      components/mobile/supplier/List2.vue
  24. 1 1
      components/mobile/supplier/SupplierDetail.vue
  25. 61 0
      components/mobile/user/Admin.vue
  26. 80 12
      components/mobile/user/Info.vue
  27. 3 3
      components/news/Right.vue
  28. 6 1
      components/product/ComponentGoods.vue
  29. 2 0
      components/product/brand/BrandComponent.vue
  30. 21 9
      components/product/component/ComponentDetail.vue
  31. 1 1
      components/provider/ExcellentSuppliers.vue
  32. 1 1
      components/provider/NewStore.vue
  33. 2 2
      components/provider/RecommendOriginal.vue
  34. 21 16
      components/provider/Suppliers.vue
  35. 3 2
      components/search/GoodList.vue
  36. 2 1
      components/search/ResultTitle.vue
  37. 14 14
      components/store/BaseInfo.vue
  38. 1 1
      components/store/CommodityList.vue
  39. 2 2
      components/store/common/StoreHeader.vue
  40. 22 15
      components/supplier/merchant.vue
  41. 31 0
      layouts/mobileNoFooter.vue
  42. 6 8
      middleware/wechatInfo.js
  43. 6 1
      pages/index.vue
  44. 0 4
      pages/mobile/applyPurchase/list/businessOpportunity.vue
  45. 1 5
      pages/mobile/applyPurchase/list/index.vue
  46. 5 1
      pages/mobile/center/index.vue
  47. 10 7
      pages/mobile/center/user/collect/component.vue
  48. 10 6
      pages/mobile/center/user/collect/store.vue
  49. 3 2
      pages/mobile/center/user/index.vue
  50. 5 4
      pages/mobile/center/vendor/index.vue
  51. 76 20
      pages/mobile/center/vendor/product.vue
  52. 770 0
      pages/mobile/center/vendor/productdetails.vue
  53. 9 22
      pages/mobile/center/vendor/seek.vue
  54. 430 0
      pages/mobile/product/_batchCode.vue
  55. 12 6
      pages/mobile/search/_keycode.vue
  56. 5 5
      pages/mobile/shop/index.vue
  57. 19 19
      pages/mobile/user/enterpriseinfo.vue
  58. 36 17
      pages/mobile/user/index.vue
  59. 3 3
      pages/mobile/user/info/admin.vue
  60. 1 1
      pages/mobile/user/info/personal.vue
  61. 103 18
      pages/mobile/user/storeinfo.vue
  62. 4 4
      pages/mobile/wechat/index.vue
  63. 1 1
      pages/mobile/wechat/toggle.vue
  64. 1 1
      pages/provider/factories.vue
  65. 1 1
      pages/provider/list.vue
  66. 7 0
      plugins/mixin.js
  67. BIN
      static/images/mobile/@2x/brand-bg2.jpg
  68. BIN
      static/images/mobile/@2x/home/count1.jpg
  69. BIN
      static/images/mobile/@2x/home/count2.jpg
  70. BIN
      static/images/mobile/@2x/home/count3.jpg
  71. BIN
      static/images/mobile/@2x/home/count4.jpg
  72. BIN
      static/images/mobile/@2x/home/count5.jpg
  73. BIN
      static/images/mobile/@2x/home/count6.jpg
  74. BIN
      static/images/mobile/@2x/home/count7.jpg
  75. BIN
      static/images/mobile/@2x/home/count8.jpg
  76. BIN
      static/images/mobile/@2x/home/mobile-count.png
  77. BIN
      static/images/mobile/@2x/mobile-count.png
  78. BIN
      static/images/mobile/@2x/productDetail/desc-bg.png
  79. BIN
      static/images/mobile/center/accept.png
  80. BIN
      static/images/mobile/center/en.png
  81. BIN
      static/images/mobile/center/refuse-arrow-down.png
  82. BIN
      static/images/mobile/center/refuse-arrow-up.png
  83. BIN
      static/images/mobile/center/refuse.png
  84. BIN
      static/images/mobile/center/self.png
  85. BIN
      static/images/mobile/product/add_icon.png
  86. BIN
      static/images/mobile/product/close_icon.png
  87. BIN
      static/images/mobile/product/drop_icon.png
  88. BIN
      static/images/mobile/product/mui_icon.png
  89. BIN
      static/images/mobile/user/edit.png
  90. BIN
      static/images/mobile/user/icon_1.png
  91. BIN
      static/images/mobile/user/icon_2.png
  92. BIN
      static/images/mobile/user/icon_3.png
  93. BIN
      static/images/mobile/user/icon_4.png
  94. 11 1
      store/applyPurchase.js
  95. 12 0
      store/product/brand.js
  96. 10 0
      store/provider.js

+ 1 - 1
app.html

@@ -6,7 +6,7 @@
   <link rel="stylesheet" type="text/css" href="https://cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css" />
   <link rel="stylesheet" type="text/css" href="https://cdn.bootcss.com/element-ui/1.3.7/theme-default/index.css" />
   <!--<link rel="stylesheet" type="text/css" href="https://at.alicdn.com/t/font_0d1jjt5tukcblnmi.css"/>-->
-  <link rel="stylesheet" type="text/css" href="https://at.alicdn.com/t/font_452262_oi789zl3ptp7rpb9.css">
+  <link rel="stylesheet" type="text/css" href="https://at.alicdn.com/t/font_452262_0c0tncbpq6umzpvi.css">
   <link rel="stylesheet" type="text/css" href="https://cdn.bootcss.com/Swiper/3.4.2/css/swiper.css" />
   {{ HEAD }}
   <script>

+ 91 - 2
assets/scss/mobileCommon.scss

@@ -96,6 +96,17 @@ html {
     text-decoration: underline;
   }
 
+  button {
+    -webkit-appearance: none;
+    -moz-appearance: none;
+    appearance: none;
+    outline: none;
+    border: none;
+    -webkit-box-shadow: none;
+    -moz-box-shadow: none;
+    box-shadow: none;
+  }
+
   /* 默认不显示下划线,保持页面简洁 */
   ins, a {
     text-decoration: none;
@@ -233,11 +244,15 @@ html {
         &:last-child {
           border-bottom: none;
         }
-        &:first-child {
+        /*&:first-child {
           text-align: left;
-        }
+        }*/
       }
     }
+    &.mobile-link-en {
+      top: 50%;
+      margin-top: -1.34rem;
+    }
   }
   .mobile-share-box {
     position: fixed;
@@ -422,3 +437,77 @@ html {
 .overflow-hidden {
   overflow: hidden !important;
 }
+
+/* 公共导航切换 */
+.com-switch-item {
+  text-align: center;
+  background: #fff;
+  .mobile-switch-btn {
+    background: #fff;
+    color: #666;
+    display: inline-block;
+    height: .64rem;
+    font-size: .34rem;
+    line-height: .64rem;
+    width: 1.4rem;
+    &:first-child {
+      margin-right: 1.78rem;
+    }
+    &.active {
+      color: #3f84f6;
+      border-bottom: .04rem solid #3f84f6;
+    }
+  }
+}
+
+.mobile-center-header {
+  height: 1.26rem;
+  line-height: 1.26rem;
+  p {
+    line-height: normal;
+    margin-top: .13rem;
+    &.en-name {
+      font-size: .3rem;
+      margin-top: .06rem;
+      img {
+        height: .25rem;
+        margin-top: -.02rem;
+        margin-right: .05rem;
+      }
+    }
+  }
+}
+
+.mobile-centerfix-content {
+  top: 1.26rem;
+}
+
+$border-color: 1px solid #c5c5c5;
+table.com-price-list {
+  table-layout: fixed;
+  width: 3rem;
+  margin: .19rem 0 .21rem .11rem;
+  border: $border-color;
+  font-size: .28rem;
+  &.com-price-listLong {
+    width: 5rem;
+  }
+  thead {
+    tr th {
+      background: #f3f3f3;
+      border-bottom: $border-color;
+    }
+  }
+  th, td {
+    border-right: $border-color;
+    text-align: center;
+    height: .44rem;
+    padding: 0 .1rem;
+    &:last-child {
+      border-right: none;
+    }
+    &.date {
+      color: #e6353d;
+    }
+  }
+}

+ 3 - 3
components/applyPurchase/ApplyInfo.vue

@@ -45,11 +45,11 @@
                 <span>品牌</span>
                 <div class="content">{{purchaseMan.inbrand || '-'}}</div>
               </div>
-              <div :title="purchaseMan.prodTitle | nullFilter" class="fl item">
+              <div :title="purchaseMan.cmpCode | nullFilter" class="fl item">
                 <span>型号</span>
                 <div class="content">{{purchaseMan.cmpCode || '-'}}</div>
               </div>
-              <div :title="purchaseMan.cmpCode" class="fl item bottom size-middle">
+              <div :title="purchaseMan.prodTitle" class="fl item bottom size-middle">
                 <span>类目(产品名称)</span>
                 <div class="content">{{(purchaseMan.prodTitle || '-') | nullFilter}}</div>
               </div>
@@ -609,7 +609,7 @@ export default {
                     width: 260px;
                     margin-right: 10px;
                     .content {
-                      width: 86px;
+                      width: 155px;
                     }
                   }
                 }

+ 31 - 15
components/applyPurchase/BatchPublish.vue

@@ -29,7 +29,7 @@
           </td>-->
           <td>
             <div class="prod-items">
-              <div class="prod-item prod-item-large" :title="item.kind">
+              <div class="prod-item prod-item-large" :title="item.brand">
                 <span class="pi-title"><i class="red-text">*</i>品牌:</span>
                 <div class="pi-content over-ell" v-if="item.brand && (!item.brandWord || item.brandWord.length == 0)" :title="item.brand">{{item.brand}}</div>
                 <div class="pi-content red-text" v-if="!item.brand">请完善信息</div>
@@ -43,9 +43,11 @@
                 <div class="pi-content over-ell" v-if="item.unitPrice">{{(item.currency === 'RMB' ? '¥' : '$') + item.unitPrice}}</div>
                 <div class="pi-content over-ell" v-else="!item.unitPrice">-</div>
               </div>-->
-              <div class="prod-item prod-item-large" :title="item.brand">
-                <span class="pi-title">类目(产品名称):</span>
-                <div class="pi-content over-ell">{{item.kind || '-'}}</div>
+              <div class="prod-item prod-item-large" :title="item.kind">
+                <span class="pi-title"><i class="red-text">*</i>类目(产品名称):</span>
+                <div class="pi-content over-ell" v-if="item.kind && (!item.kindWord || item.kindWord.length == 0)" :title="item.kind">{{item.kind}}</div>
+                <div class="pi-content red-text" v-if="!item.kind">请完善信息</div>
+                <!--<div class="pi-content over-ell">{{item.kind || '-'}}</div>-->
               </div>
               <!--<div class="prod-item prod-item-small" :title="item.encapsulation">
                 <span class="pi-title">封装:</span>
@@ -164,8 +166,8 @@
                 </ul>
               </div>
               <div class="prod-item prod-item-large">
-                <span class="pi-title">类目(产品名称):</span>
-                <input type="text" class="form-control" v-model="modifyObj.kind" @input="onProdTitleInput">
+                <span class="pi-title"><i class="red-text">*</i>类目(产品名称):</span>
+                <input type="text" class="form-control" v-model="modifyObj.kind" :class="{'error': !validObj.kind}" @input="onProdTitleInput" @blur="checkKind">
               </div>
               <!--<div class="prod-item prod-item-small pi-select">
                 <span class="pi-title">单价预算:</span>
@@ -268,7 +270,8 @@
 //          produceDate: true,
           amount: true,
           deadline: true,
-          spec: true
+          spec: true,
+          kind: true
         },
 //        successResult: 0,
         showSimilarCodeList: false,
@@ -374,7 +377,8 @@
           unitPrice: true,
           amount: true,
           deadline: true,
-          spec: true
+          spec: true,
+          kind: true
         }
       },
       listenPage: function (page) {
@@ -632,6 +636,18 @@
         this.validObj.amount = (!this.modifyObj.amount || this.modifyObj.amount === '') ? true : this.modifyObj.amount > 0 && this.modifyObj.amount < 1000000000
         return this.validObj.amount
       },
+      checkKind: function() {
+        let nullStrFlag = checkNullStr(this.modifyObj.kind)
+        this.validObj.kind = this.modifyObj.kind && this.modifyObj.kind !== ''
+        // if (!this.validObj.kind) {
+        if (!nullStrFlag) {
+          this.$message.error('类目输入不合法')
+        } else if (!this.validObj.kind) {
+          this.$message.error('类目不能为空')
+        }
+        // }
+        return this.validObj.kind
+      },
       checkSpec: function () {
         let nullStrFlag = checkNullStr(this.modifyObj.spec)
         this.validObj.spec = nullStrFlag
@@ -641,7 +657,7 @@
         return this.validObj.spec
       },
       checkAll: function () {
-        return this.checkCode() && this.checkBrand() && this.checkDeadline() && this.checkUnitPrice() && this.checkAmount() && this.checkSpec()
+        return this.checkBrand() && this.checkCode() && this.checkKind() && this.checkDeadline() && this.checkUnitPrice() && this.checkAmount() && this.checkSpec()
       },
       checkDeadline: function () {
         this.validObj.deadline = this.modifyObj.deadline && this.modifyObj.deadline !== '' && this.isValidDate(this.modifyObj.deadline)
@@ -1152,10 +1168,10 @@
                   }
                   &.prod-item-large {
                     .pi-content {
-                      width: 226px;
+                      width: 224px;
                     }
                     .pi-title {
-                      width: 115px;
+                      width: 117px;
                     }
                   }
                   &.prod-item-small {
@@ -1178,7 +1194,7 @@
                     overflow-y: auto;
                     overflow-x: hidden;
                     border-radius: 2px;
-                    width: 226px;
+                    width: 224px;
                     li {
                       height: 30px;
                       line-height: 30px;
@@ -1371,7 +1387,7 @@
                   position: relative;
                   &.prod-item-large {
                     input {
-                      width: 226px;
+                      width: 224px;
                     }
                   }
                   &.prod-item-small {
@@ -1410,10 +1426,10 @@
                 }
                 &:nth-child(4) {
                   div {
-                    width: 106px;
+                    width: 125px;
                     overflow: unset;
                     input {
-                      width: 106px;
+                      width: 115px;
                       border-radius: 2px;
                       border: 1px solid #dadada;
                     }

+ 36 - 20
components/applyPurchase/PublishApply.vue

@@ -26,9 +26,9 @@
           </div>
           <div class="form-item">
            <span>
-              类目(产品名称):
+              <i>*</i>类目(产品名称):
             </span>
-            <input type="text" class="form-control" v-model="applyObj.prodTitle" @input="onProdTitleInput"/>
+            <input type="text" class="form-control" :class="{'error': !validObj.prodTitle}" v-model="applyObj.prodTitle" @blur="checkProdTitle" @input="onProdTitleInput"/>
           </div>
           <div class="form-item">
             <span>
@@ -179,7 +179,8 @@
 //          produceDate: true,
           amount: true,
           deadline: true,
-          spec: true
+          spec: true,
+          prodTitle: true
         },
         pickerOptions: {
           disabledDate (time) {
@@ -256,6 +257,7 @@
         inquiryItem.userTel = this.user.data.userTel
         inquiryItem.needquantity = this.applyObj.amount
         inquiryItem.inbrand = this.applyObj.brand
+        inquiryItem.spec = this.applyObj.spec
         inquiryItem.currency = currency
         inquiryItem.cmpCode = this.applyObj.code.trim().toUpperCase()
         inquiryItem.unitPrice = this.applyObj.unitPrice
@@ -284,15 +286,20 @@
       goPublish: function () {
         if (this.user.logged) {
           if (this.checkAll()) {
-            if (!this.applyObj.prodTitle || this.applyObj.prodTitle.length === 0) {
-              this.getMaterialKind(this.applyObj.code, this.applyObj.brand).then(response => {
-                this.startPublish(response.data && response.data.length ? response.data : '其他')
-              })
-            } else {
-              this.startPublish()
-            }
+//            if (!this.applyObj.prodTitle || this.applyObj.prodTitle.length === 0) {
+//              this.getMaterialKind(this.applyObj.code, this.applyObj.brand).then(response => {
+//                this.startPublish(response.data && response.data.length ? response.data : '其他')
+//              })
+//            } else {
+//              this.startPublish()
+//            }
+            this.getMaterialKind(this.applyObj.code, this.applyObj.brand).then(response => {
+              this.startPublish(response.data && response.data.length ? response.data : this.applyObj.prodTitle)
+            })
           } else {
-            if (!this.validObj.deadline) {
+            if (!this.validObj.prodTitle) {
+              this.$message.error('类目不能为空')
+            } else if (!this.validObj.deadline) {
               this.$message.error('截止日期不能为空')
             } else if (!this.validObj.amount) {
               this.$message.error('请输入正确的数值')
@@ -337,6 +344,15 @@
         }
         return this.validObj.code
       },
+      checkProdTitle: function () {
+        let prodTitle = this.applyObj.prodTitle.trim()
+        this.validObj.prodTitle = prodTitle && prodTitle !== ''
+        if (!this.validObj.prodTitle) {
+          this.$message.error('类目不能为空')
+        }
+        console.log(prodTitle)
+        return this.validObj.prodTitle
+      },
       checkBrand: function () {
         let nullStrFlag = checkNullStr(this.applyObj.brand)
         this.validObj.brand = this.applyObj.brand && this.applyObj.brand !== '' && nullStrFlag
@@ -369,7 +385,7 @@
         return this.validObj.amount
       },
       checkAll: function () {
-        return this.checkCode() && this.checkBrand() && this.checkDeadline() && this.checkUnitPrice() && this.checkAmount() && this.checkSpec()
+        return this.checkBrand() && this.checkProdTitle() && this.checkCode() && this.checkDeadline() && this.checkUnitPrice() && this.checkAmount() && this.checkSpec()
       },
       checkDeadline: function () {
         this.validObj.deadline = Boolean(this.applyObj.deadline)
@@ -579,7 +595,7 @@
             margin-bottom: 14px;
             position: relative;
             span {
-              width: 109px;
+              width: 114px;
               text-align: right;
               display: inline-block;
               i {
@@ -592,8 +608,8 @@
             ul {
               line-height: normal;
               position: absolute;
-              top: 19px;
-              left: 108px;
+              top: 16px;
+              left: 114px;
               background: #fff;
               border: 1px solid #b5b5b5;
               z-index: 1;
@@ -601,7 +617,7 @@
               overflow-y: auto;
               overflow-x: hidden;
               border-radius: 3px;
-              width: 114px;
+              width: 107px;
               font-size: 12px;
               li {
                 height: 24px;
@@ -629,13 +645,13 @@
               }
             }
             .el-input {
-              width: 111px;
-              .el-input__inner {
-              }
+              width: 106px;
+              /*.el-input__inner {
+              }*/
             }
             input {
               font-size: 12px;
-              width: 111px;
+              width: 106px;
               height: 18px;
               line-height: 18px;
               border-radius: 2px;

+ 231 - 0
components/common/PcSearchHeader.vue

@@ -0,0 +1,231 @@
+<template>
+  <div class="search-content com-mobile-header">
+    <!--<a @click="goLastPage"><i class="iconfont icon-fanhui"></i></a>-->
+    <div class="input-group" style="display: table;">
+      <input :placeholder="placeholder" class="form-control" type="text" v-model="keyword" @input="onKeywordInput()"  @keyup.13="onSearch()" />
+      <span class="input-group-btn">
+        <button type="button" class="btn btn-default" @click="onSearch()">搜索</button>
+      </span>
+    </div>
+    <!--<input type="text" v-model="keyword" @input="onKeywordInput()" :placeholder="placeholder" @keyup.13="onSearch()">-->
+    <!--<span @click="onSearch()"><i class="iconfont icon-sousuo"></i></span>-->
+    <ul v-if="emptyStatus && type == 'supplier' && keyword && keyword !== '' && showSimilarWord">
+      <template v-if="similarList.pBrandEn && similarList.pBrandEn.length">
+        <li class="title text-ellipse">品牌</li>
+        <li class="text-ellipse" v-for="brand in similarList.pBrandEn.slice(0, 4)" @click="onSearch(brand.nameEn, 'pBrandEn', $event)">{{brand.nameEn}}</li>
+      </template>
+      <template v-if="similarList.kind && similarList.kind.length">
+        <li class="title text-ellipse">类目(产品名称)</li>
+        <li class="text-ellipse" v-for="kind in similarList.kind.slice(0, 4)" @click="onSearch(kind.kind, 'kind', $event)">{{kind.kind}}</li>
+      </template>
+      <template v-if="similarList.pCmpCode && similarList.pCmpCode.length">
+        <li class="title text-ellipse">型号</li>
+        <li class="text-ellipse" v-for="code in similarList.pCmpCode.slice(0, 4)" @click="onSearch(code.pCmpCode, 'pCmpCode', $event)">{{code.pCmpCode}}</li>
+      </template>
+    </ul>
+    <ul v-if="emptyStatus && type == 'default' && keyword && keyword !== '' && showSimilarWord">
+      <template v-if="similarList.brand && similarList.brand.length">
+        <li class="title text-ellipse">品牌</li>
+        <li class="text-ellipse" v-for="brand in similarList.brand.slice(0, 4)" @click="onSearch(brand.nameEn, 'brand', $event)">{{brand.nameEn}}</li>
+      </template>
+      <template v-if="similarList.kind && similarList.kind.length">
+        <li class="title text-ellipse">类目(产品名称)</li>
+        <li class="text-ellipse" v-for="kind in similarList.kind.slice(0, 4)" @click="onSearch(kind.nameCn, 'kind', $event)">{{kind.nameCn}}</li>
+      </template>
+      <template v-if="similarList.component && similarList.component.length">
+        <li class="title text-ellipse">型号</li>
+        <li class="text-ellipse" v-for="code in similarList.component.slice(0, 4)" @click="onSearch(code.code, 'code', $event)">{{code.code}}</li>
+      </template>
+    </ul>
+  </div>
+</template>
+<script>
+  export default {
+    props: {
+      placeholder: {
+        type: String,
+        default: '请输入要查找的内容'
+      },
+      similarUrl: { // 联想词url
+        type: String,
+        default: '/search/similarKeywords'
+      },
+      type: { // 搜索类型
+        type: String,
+        default: 'default'
+      },
+      showSimilar: { // 是否显示联想词
+        type: Boolean,
+        default: true
+      },
+      outerKeyword: {
+        type: String,
+        default: ''
+      }
+    },
+    data () {
+      return {
+        keyword: '',
+        similarList: {},
+        showSimilarWord: false,
+        searchKeyword: '',
+        clickCount: 0
+      }
+    },
+    watch: {
+      outerKeyword: {
+        handler: function (val) {
+          this.keyword = val
+        },
+        immediate: true
+      }
+    },
+    mounted () {
+      this.$nextTick(() => {
+        document.onclick = () => {
+          this.showSimilarWord = false
+        }
+      })
+    },
+    computed: {
+      emptyStatus () {
+        let similarList = this.similarList
+        if (this.type === 'supplier') {
+          return (similarList.pCmpCode && similarList.pCmpCode.length) ||
+            (similarList.pBrandEn && similarList.pBrandEn.length) ||
+            (similarList.kind && similarList.kind.length)
+        } else if (this.type === 'default') {
+          return (similarList.component && similarList.component.length) ||
+            (similarList.brand && similarList.brand.length) ||
+            (similarList.kind && similarList.kind.length)
+        }
+      }
+    },
+    methods: {
+      onSearch: function (key, type, e) {
+        if (e) {
+          e.stopPropagation()
+        }
+//        if (key === this.searchKeyword || this.keyword === this.searchKeyword) {
+//          return
+//        }
+        if (key) {
+          this.keyword = key
+          this.$emit('searchAction', {
+            keyword: this.keyword,
+            type: type
+          })
+        } else {
+          let sType = null
+          if (this.type === 'default' && this.keyword && this.keyword !== '' && this.similarList.component) {
+            if (this.similarList.component[0] && this.keyword === this.similarList.component[0].code) {
+              sType = 'code'
+            } else if (this.similarList.brand[0] && this.keyword === this.similarList.brand[0].nameEn) {
+              sType = 'brand'
+            } else if (this.similarList.kind[0] && this.keyword === this.similarList.kind[0].nameCn) {
+              sType = 'kind'
+            } else {
+              let arr = [...this.similarList.component, ...this.similarList.brand, ...this.similarList.kind]
+              if (arr[0]) {
+                if (arr[0].code) {
+                  this.keyword = arr[0].code
+                  sType = 'code'
+                } else if (arr[0].nameEn) {
+                  this.keyword = arr[0].nameEn
+                  sType = 'brand'
+                } else if (arr[0].nameCn) {
+                  this.keyword = arr[0].nameCn
+                  sType = 'kind'
+                }
+              }
+            }
+          } else if (this.type === 'supplier' && this.keyword && this.keyword !== '' && this.similarList.pCmpCode) {
+            if (this.similarList.pCmpCode[0] && this.keyword === this.similarList.pCmpCode[0].pCmpCode) {
+              sType = 'pCmpCode'
+            } else if (this.similarList.pBrandEn[0] && this.keyword === this.similarList.pBrandEn[0].nameEn) {
+              sType = 'pBrandEn'
+            } else if (this.similarList.kind[0] && this.keyword === this.similarList.kind[0].kind) {
+              sType = 'kind'
+            } else {
+              let arr = [...this.similarList.pCmpCode, ...this.similarList.pBrandEn, ...this.similarList.kind]
+              if (arr[0]) {
+                if (arr[0].pCmpCode) {
+                  this.keyword = arr[0].pCmpCode
+                  sType = 'pCmpCode'
+                } else if (arr[0].nameEn) {
+                  this.keyword = arr[0].nameEn
+                  sType = 'pBrandEn'
+                } else if (arr[0].kind) {
+                  this.keyword = arr[0].kind
+                  sType = 'kind'
+                }
+              }
+            }
+          }
+          this.$emit('searchAction', {
+            keyword: this.keyword,
+            type: sType
+          })
+        }
+        this.searchKeyword = this.keyword
+        this.showSimilarWord = false
+      },
+      onKeywordInput: function () {
+        this.clickCount ++
+        let count = this.clickCount
+        let timer = setTimeout(() => {
+          this.getSimilarList(count, timer)
+        }, 300)
+      },
+      getSimilarList: function (clickCount, timer) {
+        clearTimeout(timer)
+        if (this.showSimilar && this.keyword && this.keyword !== '' && clickCount === this.clickCount) {
+          this.$http.get(this.similarUrl, {params: {keyword: this.keyword}}).then(
+            res => {
+              this.similarList = res.data
+              this.showSimilarWord = true
+            }
+          )
+        }
+      }
+    }
+  }
+</script>
+<style lang="scss" scoped>
+  .search-content {
+    position: relative;
+    color: #333;
+    z-index: 991;
+    background: #fff;
+    input {
+      line-height: normal;
+    }
+    ul {
+      width: 100%;
+      background: #fff;
+      position: absolute;
+      left: 0;
+      top: 36px;
+      border: 1px solid #ccc;
+      border-radius: 5px;
+      max-height: 400px;
+      overflow-y: auto;
+      li {
+        height: 36px;
+        line-height: 36px;
+        padding: 0 10px;
+        font-size: 14px;
+        &:hover {
+          background: #f6f5f5;
+          cursor: pointer;
+        }
+        &.title {
+          color: #666;
+          border-bottom: 1px solid #ddd;
+          font-weight: bold;
+          background: #f6f5f5;
+        }
+      }
+    }
+  }
+</style>

+ 16 - 2
components/home/count/displayCard.vue

@@ -114,6 +114,20 @@
         }
         return num
       },
+      formatDouble (num) {
+        if (num.toString().indexOf('E') !== -1) {
+          let arr = num.toString().split('E')
+          num = arr[0] * Math.pow(10, arr[1])
+        }
+        if (num > 99999999) {
+          num = (num / 100000000).toFixed(2).slice(num.length - 1, 4) + '亿'
+        } else if (num > 9999) {
+          num = (num / 10000).toFixed(2).slice(num.length - 1, 4) + '万'
+        } else {
+            num += ''
+        }
+        return num
+      },
       goStoreApply: function () {
         if (this.user.logged) {
           if (this.enterprise && this.enterprise.isVendor === 313) {
@@ -138,11 +152,11 @@
       },
       inquirySheet () {
         let sheetNum = this.$store.state.count.inquirySheet.data.count
-        return this.formatNumber(sheetNum, 3)
+        return this.formatDouble(sheetNum)
       },
       inquirySheetLast () {
         let lastSheetNum = this.$store.state.count.inquirySheetLast.data.count
-        return this.formatNumber(lastSheetNum, 4)
+        return this.formatDouble(lastSheetNum)
       },
       all () {
         let count = this.$store.state.supplier.merchant.merchantAll.data

+ 29 - 13
components/mobile/Home.vue

@@ -48,6 +48,11 @@
           </nuxt-link>
         </li>
       </ul>
+
+      <div class="display_card">
+        <statistics-mobile/>
+      </div>
+
       <div class="seek-title">
         <img src="/images/mobile/@2x/applyPurchase/home/seek-title.png" alt="">
         <span>最新求购信息</span>
@@ -75,7 +80,7 @@
 <script>
   import SeekList from './applyPurchase/SeekList.vue'
   import MainSearch from '~/components/mobile/search/MainSearch.vue'
-  import { RemindBox, LoginBox, PullUp } from '~components/mobile/common'
+  import { RemindBox, LoginBox, PullUp, StatisticsMobile } from '~components/mobile/common'
   export default {
     data () {
       return {
@@ -113,17 +118,26 @@
       MainSearch,
       RemindBox,
       LoginBox,
-      PullUp
+      PullUp,
+      StatisticsMobile
     },
     watch: {
       '$store.state.applyPurchase.purchaseManList.purchaseHomeList.data': {
         handler: function (val) {
-          if (this.isChange) {
+          if (val.length === 0) {
+            // console.log(111)
+            this.$store.dispatch('applyPurchase/loadMobileHomeList', {
+              pageNumber: 1,
+              pageSize: 5,
+              enUU: this.$store.state.option.user.data.enterprise ? this.$store.state.option.user.data.enterprise.uu : null
+            })
+          } else if (this.isChange) {
             this.purchaseManListData = []
             this.page = 1
             this.isChange = false
             this.isDataChange = false
           } else {
+            // console.log(val.content)
             this.purchaseManListData = this.purchaseManListData.concat(val.content)
             this.isSearchSearchingMore = false
             this.isDataChange = true
@@ -191,16 +205,17 @@
     },
     mounted() {
       this.$nextTick(() => {
-//        window.addEventListener('scroll', this.scroll, false)
-        if (this.$route.query.code) {
-          let ua = window.navigator.userAgent.toLowerCase()
-          if (ua.match(/micromessenger/i)[0] === 'micromessenger') {
-            let info = localStorage.getItem('USOFTMALLWECHATINFO')
-            if (info) {
-              this.$store.commit('option/REQUEST_WECHATINFO_STATUS_SUCCESS', JSON.parse(info))
-            } else {
-              this.$store.dispatch('GerWechatInfo', {code: this.$route.query.code})
-            }
+        let ua = this.$store.state.option.userAgent.toLowerCase()
+        let info = localStorage.getItem('USOFTMALLWECHATINFO')
+        // 如果本地有缓存 则证明存在openid
+        if (ua.match(/micromessenger/i) && ua.match(/micromessenger/i)[0] === 'micromessenger' && !this.$route.query.code && !info) {
+          // window.location.href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxb3274b676737a319&redirect_uri=https://www.usoftmall.com&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`
+          window.location.href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxd29bbca61728b189&redirect_uri=http://gwzcfb.natappfree.cc&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`
+        } else if (ua.match(/micromessenger/i) && ua.match(/micromessenger/i)[0] === 'micromessenger') {
+          if (info) {
+            this.$store.commit('option/REQUEST_WECHATINFO_STATUS_SUCCESS', JSON.parse(info))
+          } else {
+            this.$store.dispatch('GerWechatInfo', {code: this.$route.query.code})
           }
         }
       })
@@ -208,6 +223,7 @@
   }
 </script>
 <style lang="scss">
+  @import '~assets/scss/mobileCommon';
   .home {
     padding-bottom: 1rem;
     background: #f3f3f7;

+ 2 - 2
components/mobile/HomeOld.vue

@@ -4,10 +4,10 @@
       <div class="mobile-modal-box">
         <div class="mobile-modal-header">联系方式<i @click="showStoreInfo = false" class="icon-guanbi iconfont"></i></div>
         <div class="mobile-modal-content">
-          <div>商家地址:深圳市南山区英唐大厦6楼</div>
+          <!--<div>商家地址:深圳市南山区英唐大厦6楼</div>-->
          <!-- <div class="content-line link-url">在线咨询</div>-->
           <div>致电:<a href="tel:4008301818" target="_blank" class="content-line link-url">4008301818</a></div>
-          <div>邮件:<a href="mailto:yrsc@usoftchina.com" target="_blank" class="content-line link-url">yrsc@usoftchina.com</a></div>
+          <!--<div>邮件:<a href="mailto:yrsc@usoftchina.com" target="_blank" class="content-line link-url">yrsc@usoftchina.com</a></div>-->
         </div>
       </div>
     </div>

+ 1 - 1
components/mobile/MobileFooter.vue

@@ -71,7 +71,7 @@
           return 'home'
         } else if (path === '/mobile/shop') {
           return 'shops'
-        } else if (path === '/mobile/user') {
+        } else if (startWith(path, '/mobile/user')) {
           return 'user'
         } else if (startWith(path, '/mobile/center/user')) {
           return 'userCenter'

+ 25 - 2
components/mobile/MobileHeader.vue

@@ -54,11 +54,12 @@
         <div class="cancel-share" @click="showShare=false">取消</div>
       </div>
     </div>-->
-    <div class="mobile-header" v-if="showHeader && !showMainSearch">
+    <div class="mobile-header" :class="{'mobile-center-header': showEnHeader}" v-if="showHeader && !showMainSearch">
       <a @click="goLastPage"><i class="iconfont icon-fanhui"></i></a>
       <p>{{title}}
         <span @click="goMainSearch" v-if="showSearchIcon"><i class="icon-sousuo iconfont"></i>搜索</span>
       </p>
+      <p v-show="showEnHeader" class="en-name"><img :src="`/images/mobile/center/${user.data.enterprise.uu ? 'en' : 'self'}.png`" alt="">{{currentEnName}}</p>
     </div>
     <main-search v-if="showMainSearch" @cancelSearchAction="onCancelSearch"></main-search>
 <!--    <i v-show="rightIcon=='share'" class="iconfont icon-fenxiang" @click="showShare = true" @touchmove="onTouchMove($event)"></i>
@@ -105,6 +106,9 @@
       },
       component () {
         return this.$store.state.componentDetail.detail.data
+      },
+      showEnHeader () {
+        return this.startWith(this.$route.path, '/mobile/center')
       }
 //      showHeader () {
 //        return this.$route.path !== '/' || !this.$route.path || this.$route.path === ''
@@ -187,6 +191,9 @@
         } else if (this.startWith(val, '/mobile/user/info/admin')) {
           this.showSearchIcon = false
           title = '管理员信息'
+        } else if (this.startWith(val, '/mobile/product')) {
+          this.showSearchIcon = false
+          title = '产品详情'
         } else {
           this.showSearchIcon = true
           title = '优软商城'
@@ -279,7 +286,7 @@
     width:100%;
     height:.88rem;
     line-height: .88rem;
-    border-bottom:.01rem solid #ccc;
+    /*border-bottom:.01rem solid #ccc;*/
     background: #3e82f5;
     padding:0 .2rem 0 .1rem;
     color:#fff;
@@ -334,4 +341,20 @@
       color: #333;
     }
   }
+  .mobile-center-header {
+    height: 1.26rem;
+    line-height: 1.26rem;
+    p {
+      line-height: normal;
+      margin-top: .13rem;
+      &.en-name {
+        font-size: .3rem;
+        margin-top: .06rem;
+        img {
+          width: .31rem;
+          margin-right: .05rem;
+        }
+      }
+    }
+  }
 </style>

+ 49 - 12
components/mobile/applyPurchase/PublishSeek.vue

@@ -5,6 +5,17 @@
         <i class="icon-guanbi iconfont" @click="cancel"></i>
       </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="请勿填中文符号">
@@ -13,11 +24,8 @@
           </ul>
         </div>
         <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>
+          <span>规格:</span>
+          <input type="text" v-model="applyObj.spec" @blur="checkSpec" @input="onSpecInput">
         </div>
         <div class="content-line">
           <span><i>*</i>截止日期:</span>
@@ -55,7 +63,7 @@
   </div>
 </template>
 <script>
-  import { formatDate, getRealLen, cutOutString } from '~utils/baseUtils'
+  import { formatDate, getRealLen, cutOutString, checkNullStr } from '~utils/baseUtils'
   export default {
     props: ['showSayPriceBox'],
     data () {
@@ -68,14 +76,16 @@
           encapsulation: '',
           produceDate: '',
           amount: '',
-          deadline: ''
+          deadline: '',
+          prodTitle: ''
         },
         validObj: {
           code: true,
           brand: true,
           unitPrice: true,
           amount: true,
-          deadline: true
+          deadline: true,
+          prodTitle: true
         },
         showCurrencyList: false,
         showSimilarCodeList: false,
@@ -156,13 +166,14 @@
             inquiry.endDate = endDate
             inquiry.sourceapp = 'MALL'
             inquiry.amount = 1
-            inquiryItem.prodTitle = response.data && response.data.length ? response.data : '其他'
+            inquiryItem.prodTitle = response.data && response.data.length ? response.data : this.applyObj.prodTitle
             inquiryItem.userUU = this.user.data.userUU
             inquiryItem.source = 'MALL'
             inquiryItem.userName = this.user.data.userName
             inquiryItem.userTel = this.user.data.userTel
             inquiryItem.needquantity = this.applyObj.amount
             inquiryItem.inbrand = this.applyObj.brand
+            inquiryItem.spec = this.applyObj.spec
             inquiryItem.custCurrency = currency
             inquiryItem.cmpCode = (this.applyObj.code).toUpperCase()
             inquiryItem.unitPrice = this.applyObj.unitPrice
@@ -219,7 +230,7 @@
         }
       },
       checkAll: function () {
-        return this.checkCode() && this.checkBrand() && this.checkDeadline() && this.checkAmount()
+        return this.checkBrand() && this.checkProdTitle() && this.checkCode() && this.checkDeadline() && this.checkSpec() && this.checkAmount()
       },
       checkCode: function () {
         this.validObj.code = this.applyObj.code && this.applyObj.code !== ''
@@ -235,6 +246,22 @@
         }
         return this.validObj.brand
       },
+      checkProdTitle: function () {
+        let prodTitle = this.applyObj.prodTitle.trim()
+        this.validObj.prodTitle = prodTitle && prodTitle !== ''
+        if (!this.validObj.prodTitle) {
+          this.setRemindText('类目不能为空')
+        }
+        return this.validObj.prodTitle
+      },
+      checkSpec: function () {
+        let nullStrFlag = checkNullStr(this.applyObj.spec)
+        this.validObj.spec = nullStrFlag
+        if (!nullStrFlag) {
+          this.setRemindText('规格输入不合法')
+        }
+        return this.validObj.spec
+      },
       checkAmount: function () {
         this.validObj.amount = this.applyObj.amount === '' ? true : this.applyObj.amount > 0 && this.applyObj.amount < 1000000000
         return this.validObj.amount
@@ -306,6 +333,16 @@
           this.getSimilarBrand()
         }
       },
+      onProdTitleInput: function () {
+        if (this.applyObj.prodTitle && getRealLen(this.applyObj.prodTitle) > 40) {
+          this.applyObj.prodTitle = cutOutString(this.applyObj.prodTitle, 40)
+        }
+      },
+      onSpecInput: function () {
+        if (this.applyObj.spec && getRealLen(this.applyObj.spec) > 100) {
+          this.applyObj.spec = cutOutString(this.applyObj.spec, 100)
+        }
+      },
       onAmountInput: function () {
         if (!(/^[0-9]*$/).test(this.applyObj.amount)) {
           let chineseIndex = -1
@@ -377,7 +414,7 @@
           }
           > span {
             display: inline-block;
-            width: 1.76rem;
+            width: 2.26rem;
             text-align: right;
             i {
               color: #ff0000;
@@ -402,7 +439,7 @@
             z-index: 12;
             border: 1px solid #7e7e7e;
             border-radius: .05rem;
-            left: 1.75rem;
+            left: 2.25rem;
             top: .7rem;
             background: #fff;
             li {

+ 13 - 6
components/mobile/applyPurchase/SayPrice.vue

@@ -287,17 +287,24 @@
       checkValid: function () {
         this.validSayPrice.repliesLapQty = true
         this.validSayPrice.repliesPrice = true
+        this.validSayPrice.repliesleadtime = true
         for (let i = 0; i < this.sayPriceObj.replies.length; i++) {
-          if (!this.sayPriceObj.replies[i].lapQty) {
+          console.log(this.sayPriceObj.replies)
+          if (!/^\d+$/.test(this.sayPriceObj.replies[i].lapQty) || this.sayPriceObj.replies[i].lapQty === '') {
             this.validSayPrice.repliesLapQty = false
             break
-          } else if (!this.sayPriceObj.replies[i].price) {
+          } else if (!/^\d+$/.test(this.sayPriceObj.replies[i].price) || this.sayPriceObj.replies[i].price === '') {
             this.validSayPrice.repliesPrice = false
             break
           }
         }
-//        console.log(this.validSayPrice.leadtime + '-' + this.validSayPrice.repliesLapQty + '-' + this.validSayPrice.repliesPrice)
-        return this.validSayPrice.leadtime && this.validSayPrice.repliesLapQty && this.validSayPrice.repliesPrice
+        if (/^\d+$/.test(this.validSayPrice.leadtime) || this.validSayPrice.leadtime === '') {
+          this.validSayPrice.repliesleadtime = false
+        }
+        console.log(this.validSayPrice.repliesleadtime)
+        console.log(this.validSayPrice.repliesLapQty)
+        console.log(this.validSayPrice.repliesPrice)
+        return this.validSayPrice.repliesleadtime && this.validSayPrice.repliesLapQty && this.validSayPrice.repliesPrice
       },
       onRemind: function (str) {
         this.remindText = str
@@ -309,11 +316,11 @@
 <style lang="scss" scoped>
   .mobile-modal {
     .mobile-modal-box {
-      top: 10%;
+      top: 1.66rem;
       left: 3%;
       right: 3%;
       width: 7rem;
-      bottom: 10%;
+      bottom: 1.66rem;
       margin: 0 auto;
       .say-price {
         background: #f3f3f3;

+ 357 - 96
components/mobile/applyPurchase/SayPriceInfo.vue

@@ -1,11 +1,16 @@
 <template>
   <div class="mobile-modal" @touchmove="preventTouchMove($event)">
     <div class="mobile-modal-box">
-      <div class="mobile-modal-header">{{purchaseDetail.agreed == 1 || agreed == 1 ? '已采纳' : '已报价'}}<i class="icon-guanbi iconfont" @click="cancel"></i></div>
+      <div class="mobile-modal-header">
+        查看报价
+        <!--{{purchaseDetail.agreed == 1 || agreed == 1 ? '已采纳' : '已报价'}}-->
+        <i class="icon-guanbi iconfont" @click="cancel"></i>
+      </div>
+      <!--<i class="icon-guanbi iconfont" @click="cancel"></i>-->
       <div class="say-price-info" ref="mobileModalBox">
         <div>
-          <div v-if="isBuyer">
-            <div class="base-info">
+          <div v-if="isBuyer" class="is-buyer">
+            <div class="base-info base">
               <div class="content-line">
                 品牌:<span>{{purchaseDetail.inbrand || '-'}}</span>
               </div>
@@ -21,30 +26,36 @@
               <div class="content-line">
                 采购数量(PCS):<span>{{purchaseDetail.needquantity || '-'}}</span>
               </div>
-              <!--<div class="content-line">
+             <!-- <div class="content-line">
                 币种:<span>{{purchaseDetail.custCurrency || '不限'}}</span>
-              </div>
-              <div class="content-line">
+              </div>-->
+              <!--<div class="content-line">
                 生产日期:<span>{{purchaseDetail.produceDate || '-'}}</span>
               </div>-->
               <div class="content-line">
                 截止日期:<span>{{purchaseDetail.endDate | date}}</span>
               </div>
+              <div class="content-line">
+                联系电话:<span>{{purchaseDetail.userTel || '-'}}</span>
+              </div>
             </div>
-            <div class="base-info">
+           <!-- <div class="base-info">
               <div class="content-line">
                 买家:<span>{{purchaseDetail.inquiry && purchaseDetail.inquiry.enterprise ? purchaseDetail.inquiry.enterprise.enName : purchaseDetail.userName}}</span>
               </div>
               <div class="content-line">
                 联系电话:<span>{{purchaseDetail.userTel || '-'}}</span>
               </div>
-            </div>
-            <div class="base-info say-info" v-for="(item, index) in purchaseDetail.qutations" @click="selectQutation(index)">
-              <img v-if="agreed != 1 && (!item.agreed || item.agreed !== 1) && activeIndex == index" src="/images/mobile/@2x/applyPurchase/say-price-check.png" alt="">
+            </div>-->
+            <div class="base-info say-info say" :class="{'long': item.showRefuseList}" v-for="(item, index) in qutationsTemp">
+          <!--    <img v-if="agreed != 1 && (!item.agreed || item.agreed !== 1) && activeIndex == index" src="/images/mobile/@2x/applyPurchase/say-price-check.png" alt="">
               <img v-if="agreed != 1 && (!item.agreed || item.agreed !== 1) && activeIndex != index" src="/images/mobile/@2x/applyPurchase/say-price-default.png" alt="">
-              <img v-if="item.agreed == 1" src="/images/mobile/@2x/applyPurchase/say-price-accept.png" alt="">
-              <div class="content-line">
-                {{item.vendName}}
+              <img v-if="item.agreed == 1" src="/images/mobile/@2x/applyPurchase/say-price-accept.png" alt="">-->
+              <div class="content-title">
+                <i>{{index + 1}}</i>
+                <div class="inline-block text-ellipse vend-name">{{item.vendName}}</div>
+                <img src="/images/mobile/center/accept.png" alt="" v-if="item.agreed == 1">
+                <img src="/images/mobile/center/refuse.png" alt="" v-if="item.agreed == 0">
               </div>
               <div class="content-line">
                 报价人:<span v-if="item.user">{{item.user.userName}}</span>
@@ -57,8 +68,28 @@
               <div class="content-line date">
                 交期(天):<span>{{item.leadtime}}</span>
               </div>
-              <p>{{item.offerTime | date}}</p>
-              <div class="price-level">
+              <div class="content-line date">
+                报价时间:<span>{{item.offerTime | date}}</span>
+              </div>
+              <!--<p>{{item.offerTime | date}}</p>-->
+              <div class="price clearfix">
+                <span>价格梯度:<br/>(PCS)</span>
+                <table class="com-price-list com-price-listLong">
+                <thead>
+                <tr>
+                  <th>分段数量</th>
+                  <th>分段单价</th>
+                </tr>
+                </thead>
+                <tbody>
+                <tr v-for="replie in item.replies">
+                  <td class="date text-ellipse">{{replie.lapQty ? replie.lapQty + '+' : '-'}}</td>
+                  <td class="date text-ellipse">{{replie.price ? (item.currency == 'USD' ? '$' : '¥') + replie.price : '-'}}</td>
+                </tr>
+                </tbody>
+              </table>
+              </div>
+              <!--<div class="price-level">
                 <p>价格梯度:<span>(pcs)</span></p>
                 <ul>
                   <li v-for="replie in item.replies">
@@ -66,71 +97,113 @@
                     <span>{{replie.price ? (item.currency == 'USD' ? '$' : '¥') + replie.price : '-'}}</span>
                   </li>
                 </ul>
+              </div>-->
+              <div class="operate-say" v-if="item.agreed != 1 && item.agreed != 0">
+                <a class="operate-say-btn inline-block" @click="acceptQutation(item)">采纳报价</a>
+                <a class="operate-say-btn inline-block refuse" @click="setShowRefuseList(item, !item.showRefuseList)">
+                  拒绝报价
+                  <img src="/images/mobile/center/refuse-arrow-down.png" alt="">
+                  <ul v-if="item.showRefuseList">
+                    <li class="text-ellipse" @click.stop="selectRefuse(item, '采购需求变更')">采购需求变更</li>
+                    <li class="text-ellipse" @click.stop="selectRefuse(item, '价格过高')">价格过高</li>
+                    <li class="text-ellipse" @click.stop="selectRefuse(item, '需进一步了解原因')">需进一步了解原因</li>
+                    <li class="text-ellipse" @click.stop="selectRefuse(item, '已选定合适供应商')">已选定合适供应商</li>
+                    <li class="text-ellipse" @click.stop="selectRefuse(item, '交期过长')">交期过长</li>
+                  </ul>
+                </a>
               </div>
             </div>
-            <a class="say-price-btn" v-if="purchaseDetail.agreed != 1" @click="acceptQutation">采纳报价</a>
-            <div style="height: 0.5rem;width: 100%"></div>
+           <!-- <a class="say-price-btn" v-if="purchaseDetail.agreed != 1" @click="acceptQutation">采纳报价</a>
+            <div style="height: 0.5rem;width: 100%"></div>-->
           </div>
-          <div v-if="!isBuyer">
-          <div class="base-info">
-            <div class="content-line">
-              品牌:<span>{{purchaseDetail.inbrand || '-'}}</span>
-            </div>
-            <div class="content-line">
-              类目(产品名称):<span>{{purchaseDetail.prodTitle || '-'}}</span>
-            </div>
-            <div class="content-line">
-              型号:<span>{{purchaseDetail.cmpCode || '-'}}</span>
-            </div>
-            <div class="content-line">
-              规格:<span>{{purchaseDetail.spec || '-'}}</span>
-            </div>
-            <div class="content-line">
-              采购数量(PCS):<span>{{purchaseDetail.needquantity || '-'}}</span>
-            </div>
-            <!--<div class="content-line">
-              币种:<span>{{purchaseDetail.custCurrency || '不限'}}</span>
+          <div v-if="!isBuyer" class="is-vendor">
+            <div class="base-info">
+              <div class="content-title">
+                <span class="inline-block text-ellipse">{{purchaseDetail.inquiry && purchaseDetail.inquiry.enterprise ? purchaseDetail.inquiry.enterprise.enName : purchaseDetail.userName}}</span>
+                <img src="/images/mobile/center/accept.png" alt="" v-if="purchaseDetail.agreed == 1">
+                <img src="/images/mobile/center/refuse.png" alt="" v-if="purchaseDetail.agreed == 0">
+              </div>
+              <div class="content-line">
+                品牌:<span>{{purchaseDetail.inbrand || '-'}}</span>
+              </div>
+              <div class="content-line">
+                类目(产品名称):<span>{{purchaseDetail.prodTitle || '-'}}</span>
+              </div>
+              <div class="content-line">
+                型号:<span>{{purchaseDetail.cmpCode || '-'}}</span>
+              </div>
+              <div class="content-line">
+                规格:<span>{{purchaseDetail.spec || '-'}}</span>
+              </div>
+              <div class="content-line">
+                采购数量(PCS):<span>{{purchaseDetail.needquantity || '-'}}</span>
+              </div>
+              <div class="content-line">
+                币种:<span>{{purchaseDetail.custCurrency || '不限'}}</span>
+              </div>
+             <!-- <div class="content-line">
+                生产日期:<span>{{purchaseDetail.produceDate || '-'}}</span>
+              </div>-->
+              <div class="content-line">
+                截止日期:<span>{{purchaseDetail.endDate | date}}</span>
+              </div>
+              <div class="content-line">
+                联系电话:<span>{{purchaseDetail.userTel || '-'}}</span>
+              </div>
             </div>
-            <div class="content-line">
-              生产日期:<span>{{purchaseDetail.produceDate || '-'}}</span>
+            <!--<div class="base-info">
+              <div class="content-line">
+                报价人:<span v-if="purchaseDetail.user">{{purchaseDetail.user.userName}}</span>
+                <span v-else>-</span>
+              </div>
+              <div class="content-line">
+                联系电话:<span v-if="purchaseDetail.user">{{purchaseDetail.user.userTel || '-'}}</span>
+                <span v-else>-</span>
+              </div>
             </div>-->
-            <div class="content-line">
-              截止日期:<span>{{purchaseDetail.endDate | date}}</span>
-            </div>
-            <div class="content-line">
-              买家:<span>{{purchaseDetail.inquiry && purchaseDetail.inquiry.enterprise ? purchaseDetail.inquiry.enterprise.enName : purchaseDetail.userName}}</span>
-            </div>
-            <div class="content-line">
-              联系电话:<span>{{purchaseDetail.userTel || '-'}}</span>
-            </div>
-          </div>
-          <div class="base-info">
-            <div class="content-line">
-              报价人:<span v-if="purchaseDetail.user">{{purchaseDetail.user.userName}}</span>
-              <span v-else>-</span>
-            </div>
-            <div class="content-line">
-              联系电话:<span v-if="purchaseDetail.user">{{purchaseDetail.user.userTel || '-'}}</span>
-              <span v-else>-</span>
-            </div>
-          </div>
-          <div class="base-info say-info">
-            <div class="content-line date">
-              交期(天):<span>{{purchaseDetail.leadtime}}</span>
-            </div>
-            <p>{{purchaseDetail.offerTime | date}}</p>
-            <div class="price-level vendor">
-              <p>价格梯度:<span>(pcs)</span></p>
-              <ul>
-                <li v-for="replie in purchaseDetail.replies">
-                  <span>{{replie.lapQty ? replie.lapQty + '+' : '-'}}</span>
-                  <span>{{replie.price ? (purchaseDetail.currency == 'USD' ? '$' : '¥') + replie.price : '-'}}</span>
-                </li>
-              </ul>
+            <div class="base-info say-info">
+              <div class="content-line inline-block">
+                报价人:<span>{{purchaseDetail.user ? purchaseDetail.user.userName : '-'}}</span>
+              </div>
+              <div class="content-line inline-block">
+                电话:<span>{{purchaseDetail.user ? purchaseDetail.user.userTel : '-'}}</span>
+              </div>
+              <div class="content-line inline-block date">
+                交期(天):<span>{{purchaseDetail.leadtime}}</span>
+              </div>
+              <div class="content-line inline-block date">
+                报价时间:<span>{{purchaseDetail.offerTime | date}}</span>
+              </div>
+              <!--<p>{{purchaseDetail.offerTime | date}}</p>-->
+              <div class="price clearfix">
+                <span>价格梯度:<br/>(PCS)</span>
+                <table class="com-price-list com-price-listLong">
+                  <thead>
+                  <tr>
+                    <th>分段数量</th>
+                    <th>分段单价</th>
+                  </tr>
+                  </thead>
+                  <tbody>
+                  <tr v-for="replie in purchaseDetail.replies">
+                    <td class="date text-ellipse">{{replie.lapQty ? replie.lapQty + '+' : '-'}}</td>
+                    <td class="date text-ellipse">{{replie.price ? (purchaseDetail.currency == 'USD' ? '$' : '¥') + replie.price : '-'}}</td>
+                  </tr>
+                  </tbody>
+                </table>
+              </div>
+              <!--<div class="price-level vendor">
+                <p>价格梯度:<span>(pcs)</span></p>
+                <ul>
+                  <li v-for="replie in purchaseDetail.replies">
+                    <span>{{replie.lapQty ? replie.lapQty + '+' : '-'}}</span>
+                    <span>{{replie.price ? (purchaseDetail.currency == 'USD' ? '$' : '¥') + replie.price : '-'}}</span>
+                  </li>
+                </ul>
+              </div>-->
             </div>
           </div>
         </div>
-        </div>
         <remind-box :title="remindText" :timeoutCount="timeoutCount"></remind-box>
       </div>
     </div>
@@ -138,12 +211,14 @@
 </template>
 <script>
   import {RemindBox} from '~components/mobile/common'
+  import {deepCopy} from '~utils/baseUtils'
   export default {
     data () {
       return {
         activeIndex: -1,
         remindText: '',
-        timeoutCount: 0
+        timeoutCount: 0,
+        qutationsTemp: []
       }
     },
     components: {
@@ -169,7 +244,19 @@
     },
     computed: {
       purchaseDetail () {
-        return this.isBuyer ? this.$store.state.applyPurchase.purchaseManList.buyerInquiryDetail.data : this.$store.state.applyPurchase.purchaseManList.vendorInquiryDetail.data
+        let obj = {}
+        if (this.isBuyer) {
+          obj = deepCopy(this.$store.state.applyPurchase.purchaseManList.buyerInquiryDetail.data)
+          if (obj.qutations) {
+            this.qutationsTemp = obj.qutations
+            for (let i = 0; i < this.qutationsTemp.length; i++) {
+              this.$set(this.qutationsTemp[i], 'showRefuseList', false)
+            }
+          }
+        } else {
+          obj = this.$store.state.applyPurchase.purchaseManList.vendorInquiryDetail.data
+        }
+        return obj
       },
       user () {
         return this.$store.state.option.user
@@ -185,33 +272,50 @@
       selectQutation: function (index) {
         this.activeIndex = this.activeIndex === index ? -1 : index
       },
-      acceptQutation: function () {
-        if (this.activeIndex > -1) {
-          let obj = this.purchaseDetail.qutations[this.activeIndex]
-          this.$http.post('/inquiry/buyer/decide?id=' + obj.id + '&status=1')
-            .then(response => {
+      acceptQutation: function (item) {
+//        if (this.activeIndex > -1) {
+//        } else {
+// //          this.$message.success('请选择报价信息')
+//          this.onRemind('请选择报价信息')
+//        }
+        this.$http.post('/inquiry/buyer/decide?id=' + item.id + '&status=1')
+          .then(response => {
 //              this.$message.success('采纳成功')
-//              this.onRemind('采纳成功')
-              this.$emit('cancelSayPriceInfoAction', true)
+              this.onRemind('采纳成功')
+//            this.$emit('cancelSayPriceInfoAction', true)
+            item.agreed = 1
 //              this.$route.query.type === 'saler' ? this.$store.dispatch('applyPurchase/loadVendorInquiryDetail', {id: this.$route.params.id}) : this.$store.dispatch('applyPurchase/loadBuyerInquiryDetail', {id: this.$route.params.id})
-            }, err => {
-              console.log(err)
+          }, err => {
+            console.log(err)
 //              this.$message.success('系统错误')
-              this.onRemind('系统错误')
-            })
-        } else {
-//          this.$message.success('请选择报价信息')
-          this.onRemind('请选择报价信息')
-        }
+            this.onRemind('系统错误')
+          })
       },
       onRemind: function (str) {
         this.remindText = str
         this.timeoutCount ++
+      },
+      selectRefuse: function (item, reason) {
+        item.showRefuseList = false
+        this.$http.post(`/inquiry/buyer/refuse?id=${item.id}&status=0&refusereason=${encodeURIComponent(reason)}`)
+          .then(res => {
+            item.agreed = 0
+            this.onRemind('拒绝报价成功')
+          }, err => {
+            this.onRemind('拒绝报价失败,系统错误')
+            console.log(err)
+          })
+      },
+      setShowRefuseList: function (item, flag) {
+//        console.log(flag)
+        item.showRefuseList = flag
       }
     },
     mounted() {
       this.$nextTick(() => {
         this._initscroll()
+//        console.log(this.$refs.modalBody.scrollHeight)
+//        this.$refs.modalBody.style.marginTop = (0 - (this.$refs.modalBody.scrollHeight / 2)) / 100 - 2.5 + 'rem'
       })
     }
   }
@@ -219,25 +323,38 @@
 <style lang="scss" scoped>
   .mobile-modal {
     .mobile-modal-box {
-      top: 10%;
+      top: 1.66rem;
       left: 3%;
       right: 3%;
+      bottom: 1.66rem;
       width: 7rem;
-      bottom: 10%;
       margin: 0 auto;
+      background: #fff;
+      .icon-guanbi {
+        position: absolute;
+        right: -.25rem;
+        font-size: .6rem;
+        top: -.4rem;
+        color: #fff;
+        z-index: 1;
+      }
       .say-price-info {
-        background: #f3f3f3;
-        padding: 0px;
+        /*background: #f3f3f3;*/
+        padding: 0;
         width: 100%;
         overflow: hidden;
         max-height: 90%;
+        position: relative;
         .base-info {
-          &:last-child {
+          margin: 0 auto;
+          /*border-bottom: .18rem solid #f3f3f3;*/
+         /* &:last-child {
             margin-bottom: 0;
-          }
+          }*/
           &.say-info {
             /*height: 4.54rem;*/
             position: relative;
+           /* margin-top: .18rem;*/
             > img {
               position: absolute;
               right: 0;
@@ -306,8 +423,152 @@
             }
           }
         }
+        .price {
+          margin-top: .3rem;
+          span {
+            width: 1.4rem;
+            color: #666;
+            font-size: .28rem;
+            display: inline-block;
+            float: left;
+          }
+          table {
+            float: left;
+            margin: 0 0 .32rem 0;
+          }
+        }
+        .is-buyer {
+          .base {
+            background: #3f84f6;
+            color: #fff;
+            margin: .1rem;
+            border-radius: .1rem;
+            .content-line {
+              span {
+                color: #fff;
+              }
+            }
+          }
+          .say {
+            .content-title {
+              border-bottom: 1px solid #d3d3d3;
+              font-size: .28rem;
+              font-weight: bold;
+              height: .81rem;
+              line-height: .81rem;
+              .vend-name {
+                width: 5rem;
+              }
+              img {
+                width: .69rem;
+                margin-left: .2rem;
+              }
+              i {
+                display: inline-block;
+                width: .4rem;
+                height: .4rem;
+                line-height: .4rem;
+                color: #fff;
+                font-weight: bold;
+                font-style: normal;
+                background: #3f84f6;
+                border-radius: .05rem;
+                text-align: center;
+                margin-right: .12rem;
+              }
+            }
+            .content-line {
+              width: 50%;
+              margin-top: .3rem;
+              display: inline-block;
+              vertical-align: middle;
+            }
+            .operate-say {
+              text-align: center;
+              margin-bottom: .73rem;
+              .operate-say-btn {
+                width: 3rem;
+                height: .54rem;
+                line-height: .54rem;
+                text-align: center;
+                font-size: .28rem;
+                background: #fff;
+                color: #3f84f6;
+                border: 1px solid #3f84f6;
+                border-radius: .08rem;
+                &.refuse {
+                  color: #666;
+                  border-color: #e5e5e5;
+                  margin-left: .2rem;
+                  position: relative;
+                  img {
+                    width: .1rem;
+                    position: absolute;
+                    right: .21rem;
+                    top: .25rem;
+                  }
+                  ul {
+                    position: absolute;
+                    width: 3rem;
+                    li {
+                      height: .58rem;
+                      line-height: .58rem;
+                      padding-left: .16rem;
+                      font-size: .28rem;
+                      color: #666;
+                      background: #fff;
+                      text-align: left;
+                      border: 1px solid #e5e5e5;
+                      border-bottom-left-radius: .08rem;
+                      border-bottom-right-radius: .08rem;
+                      border-top: none;
+                      &:active, &:hover, &:focus {
+                        background: #dbf0fd;
+                        color: #333;
+                      }
+                    }
+                  }
+                }
+              }
+            }
+            &.long {
+              .operate-say {
+                margin-bottom: 3rem;
+              }
+            }
+          }
+        }
+        .is-vendor {
+          .base-info {
+            .content-title {
+              color: #3f84f6;
+              font-size: .28rem;
+              font-weight: bold;
+              height: .82rem;
+              line-height: .82rem;
+              border-bottom: 1px solid #d3d3d3;
+              margin-bottom: .1rem;
+              span {
+                width: 5.62rem;
+              }
+              img {
+                width: .76rem;
+              }
+            }
+          }
+          .say-info {
+            border-top: 1px solid #d3d3d3;
+            .inline-block {
+              width: 50%;
+              margin-top: .1rem;
+            }
+            .price {
+              margin-top: .1rem;
+            }
+          }
+        }
         .say-price-btn {
-          margin: .37rem auto 0rem;
+          margin: .37rem auto 0;
         }
       }
     }

+ 145 - 68
components/mobile/applyPurchase/SeekList.vue

@@ -1,51 +1,98 @@
 <template>
   <div>
     <ul class="seek-list">
-      <li v-for="(item, index) in purchaseManListData">
-        <p>
+      <li v-for="(item, index) in purchaseManListData" class="clearfix">
+        <p v-if="!item.quotation">
           <span v-if="item.inquiry && (item.inquiry.enName || (item.inquiry.enterprise && item.inquiry.enterprise.enName))">{{[item.inquiry.enName || item.inquiry.enterprise.enName, user.logged] | enterpriseFilter}}</span>
           <span v-else>{{[item.userName, user.logged] | userNameFilter}}</span>
         </p>
-        <div>
+        <div class="clearfix">
           <div class="fl">
-            <div>
+            <div class="content" v-if="item.quotation && userType !== 'buyer'">
+              <span v-if="item.inquiry && (item.inquiry.enName || (item.inquiry.enterprise && item.inquiry.enterprise.enName))">{{[item.inquiry.enName || item.inquiry.enterprise.enName, user.logged] | enterpriseFilter}}</span>
+              <span v-else>{{[item.userName, user.logged] | userNameFilter}}</span>
+            </div>
+            <div class="content">
               品牌:
               <span>{{item.inbrand || '-'}}</span>
             </div>
-            <div>
-            <div>
+            <div class="content">
               类目(产品名称):
               <span>{{item.title || item.prodTitle || '-'}}</span>
             </div>
-            <div>
+            <div class="content">
               型号:
               <span>{{item.cmpCode || '-'}}</span>
             </div>
+            <div class="content">
               规格:
               <span>{{item.spec || '-'}}</span>
             </div>
-            <div>
+            <div class="content">
               采购数量(PCS):
               <span>{{item.needQty || item.needquantity || '-'}}</span>
             </div>
-            <div>
+            <div class="content">
               截止日期:
               <span class="date">{{item.endDate | date}}</span>
             </div>
+            <template v-if="item.quotation">
+              <p class="remain-time" v-if="item.remainingTime > 0">剩余&nbsp;:
+                <span v-if="getDay(item.remainingTime) > 0" v-text="getDay(item.remainingTime)"></span>
+                <i v-if="getDay(item.remainingTime) > 0">&nbsp;天&nbsp;</i>
+                <span v-if="getDay(item.remainingTime) <= 0" v-text="getHours(item.remainingTime)"></span>
+                <i v-if="getDay(item.remainingTime) <= 0">&nbsp;小时</i>
+              </p>
+              <p class="remain-time" v-else><span>已截止</span></p>
+            </template>
           </div>
-          <div class="fr" :class="{'no-btn': !isSelfSeek(item) && !canSayPrice(item) && !canSeeInfo(item)}">
-            <p v-if="item.remainingTime > 0">剩余&nbsp;:
-              <span v-if="getDay(item.remainingTime) > 0" v-text="getDay(item.remainingTime)"></span>
-              <i v-if="getDay(item.remainingTime) > 0">&nbsp;天&nbsp;</i>
-              <span v-if="getDay(item.remainingTime) <= 0" v-text="getHours(item.remainingTime)"></span>
-              <i v-if="getDay(item.remainingTime) <= 0">&nbsp;小时</i>
-            </p>
-            <p class="over-deadline" v-else>已截止</p>
-            <!--<a v-if="!userType && item.quoted == 1">已报价</a>-->
-            <a v-if="isSelfSeek(item)" class="self-publish" @click="onRemind('此为贵公司的求购')">我要报价</a>
-            <a v-if="canSayPrice(item)" @click="goSayPrice(item.itemId || item.id, index)">我要报价</a>
-            <!--<a v-if="item.newId" class="self-publish" @click="onRemind('您已报价')">我要报价</a>-->
-            <a v-if="canSeeInfo(item)" @click="goSayPriceInfo(item.newId || item.quteId || item.id, item.agreed, index)">查看报价</a>
+          <div class="fr" :class="{'no-btn': !isSelfSeek(item) && !canSayPrice(item) && !canSeeInfo(item), 'is-qutation': item.quotation, 'is-simple': userType !== 'buyer' && item.quotation}">
+            <template v-if="item.quotation">
+              <div class="content" v-if="userType === 'buyer'">
+                <span>{{item.quotation.vendName || '-'}}</span>
+              </div>
+              <div class="content">
+                报价人:
+                <span>{{item.quotation.user ? item.quotation.user.userName : '-'}}</span>
+              </div>
+              <div class="content">
+                电话:
+                <span>{{item.quotation.user ? item.quotation.user.userTel : '-'}}</span>
+              </div>
+              <div class="content">
+                交期:
+                <span class="date">{{item.quotation.leadtime || '-'}}</span>
+              </div>
+              <table class="com-price-list">
+                <thead>
+                <tr>
+                  <th>分段数量</th>
+                  <th>分段单价</th>
+                </tr>
+                </thead>
+                <tbody>
+                <tr>
+                  <td class="date text-ellipse">{{item.quotation.replies[0].lapQty + '+'}}</td>
+                  <td class="date text-ellipse">{{item.quotation.replies[0].price}}</td>
+                </tr>
+                </tbody>
+              </table>
+              <button class="more-btn" @click="goSayPriceInfo(item.newId || item.quteId || item.id, item.agreed, index)">查看更多</button>
+            </template>
+            <template v-else>
+              <p class="remain-time" v-if="item.remainingTime > 0">剩余&nbsp;:
+                <span v-if="getDay(item.remainingTime) > 0" v-text="getDay(item.remainingTime)"></span>
+                <i v-if="getDay(item.remainingTime) > 0">&nbsp;天&nbsp;</i>
+                <span v-if="getDay(item.remainingTime) <= 0" v-text="getHours(item.remainingTime)"></span>
+                <i v-if="getDay(item.remainingTime) <= 0">&nbsp;小时</i>
+              </p>
+              <p class="remain-time" v-else><span>已截止</span></p>
+              <!--<a v-if="!userType && item.quoted == 1">已报价</a>-->
+              <a v-if="isSelfSeek(item)" class="self-publish" @click="onRemind('此为贵公司的求购')">我要报价</a>
+              <a v-if="canSayPrice(item)" @click="goSayPrice(item.itemId || item.id, index)">我要报价</a>
+              <!--<a v-if="item.newId" class="self-publish" @click="onRemind('您已报价')">我要报价</a>-->
+              <a v-if="canSeeInfo(item)" @click="goSayPriceInfo(item.newId || item.quteId || item.id, item.agreed, index)">查看报价</a>
+            </template>
           </div>
         </div>
       </li>
@@ -70,7 +117,7 @@ export default {
       remindText: '',
       timeoutCount: 0,
       agreed: 0,
-      purchaseManListData: [],
+      purchaseManListData: [{}],
       url: ''
     }
   },
@@ -116,18 +163,30 @@ export default {
     }
   },
   watch: {
+    // 'purchaseManList': {
+    //   handler (newVal) {
+    //     if (this.purchaseManListData.length === 0) {
+    //       this.$store.dispatch('applyPurchase/loadMobileHomeList', {
+    //         pageNumber: 1,
+    //         pageSize: 5,
+    //         enUU: this.$store.state.option.user.data.enterprise ? this.$store.state.option.user.data.enterprise.uu : null
+    //       }).then(res => {
+    //         this.purchaseManListData = JSON.parse(JSON.stringify(this.purchaseManList))
+    //         console.log(this.purchaseManListData.length)
+    //       })
+    //     } else {
+    //       this.purchaseManListData = JSON.parse(JSON.stringify(this.purchaseManList))
+    //     }
+    //   },
+    //   immediate: true
+    // }
     'purchaseManList': {
-      handler () {
+      handler (newVal) {
         this.purchaseManListData = JSON.parse(JSON.stringify(this.purchaseManList))
       },
       immediate: true
     }
   },
-  computed: {
-    user() {
-      return this.$store.state.option.user
-    }
-  },
   methods: {
     getDay: function(timeStamp) {
       return Math.floor(timeStamp / (1000 * 60 * 60 * 24))
@@ -215,9 +274,9 @@ export default {
     padding: .13rem .12rem 0;
     background: #f1f3f6;
 
-    li {
+    li.clearfix {
       border: 1px solid #e0e0e4;
-      height: 4.2rem;
+      /*height: 4.2rem;*/
       margin: auto;
       margin-bottom: .2rem;
       max-width: 7.3rem;
@@ -239,60 +298,75 @@ export default {
 
       }
       > div {
-        font-size: .3rem;
+        font-size: .28rem;
+        .remain-time {
+          font-size: .28rem;
+          text-align: center;
+          span {
+            font-size: .35rem;
+            color: #ff3208;
+          }
 
+          i {
+            font-style: normal;
+          }
+
+        }
+        .content {
+          overflow: hidden;
+          text-overflow: ellipsis;
+          white-space: nowrap;
+          padding: 0 .18rem;
+          line-height: .46rem;
+
+          span {
+            color: #333;
+          }
+
+        }
         .fl {
           color: #666;
-          width: 4.8rem;
-          height: 2.62rem;
-          margin: .27rem 0 .29rem .18rem;
+          width: 50%;
+          /*height: 2.62rem;*/
           line-height: .46rem;
+          margin: .27rem 0;
           border-right: 1px dashed #9f9f9f;
 
-          > div {
-            overflow: hidden;
-            text-overflow: ellipsis;
-            white-space: nowrap;
-
-            span {
-              color: #333;
-              &.date {
-                color: #e6353d;
-              }
-
-            }
-
+          .remain-time {
+            margin-top: .41rem;
           }
 
         }
         .fr {
-          width: 2.2rem;
+          width: 50%;
           padding: .9rem 0 0 0;
+          &.is-qutation {
+            margin: .27rem 0;
+            padding: 0 .18rem;
+            color: #666;
+            .more-btn {
+              width: 3.2rem;
+              margin: 0 auto;
+              color: #fff;
+              font-size: .28rem;
+              height: .54rem;
+              background: #3f84f6;
+              border-radius: .08rem;
+            }
+          }
+
+          &.is-simple {
+            margin-top: .73rem;
+            .more-btn {
+              margin-top: .38rem;
+            }
+          }
 
           &.no-btn {
             padding-top: 0;
             line-height: 3.18rem;
           }
 
-          p {
-            font-size: .28rem;
-            text-align: center;
-
-            &.over-deadline {
-              text-align: center;
-              padding-right: .2rem;
-            }
-
-            span {
-              font-size: .35rem;
-              color: #ff3208;
-            }
-
-            i {
-              font-style: normal;
-            }
-
-          }
           a {
             display: block;
             width: 1.7rem;
@@ -314,6 +388,9 @@ export default {
           }
 
         }
+        .date {
+          color: #e6353d !important;
+        }
       }
     }
 

+ 10 - 10
components/mobile/base/SearchHeader.vue

@@ -4,32 +4,32 @@
     <input type="text" v-model="keyword" @input="onKeywordInput()" :placeholder="placeholder" @keyup.13="onSearch()">
     <span @click="onSearch()"><i class="iconfont icon-sousuo"></i></span>
     <ul v-if="emptyStatus && type == 'supplier' && keyword && keyword !== '' && showSimilarWord">
-      <template v-if="similarList.pCmpCode && similarList.pCmpCode.length">
-        <li class="title text-ellipse">型号</li>
-        <li class="text-ellipse" v-for="code in similarList.pCmpCode.slice(0, 4)" @click="onSearch(code.pCmpCode, 'pCmpCode', $event)">{{code.pCmpCode}}</li>
-      </template>
       <template v-if="similarList.pBrandEn && similarList.pBrandEn.length">
         <li class="title text-ellipse">品牌</li>
         <li class="text-ellipse" v-for="brand in similarList.pBrandEn.slice(0, 4)" @click="onSearch(brand.nameEn, 'pBrandEn', $event)">{{brand.nameEn}}</li>
       </template>
       <template v-if="similarList.kind && similarList.kind.length">
-        <li class="title text-ellipse">类目</li>
+        <li class="title text-ellipse">类目(产品名称)</li>
         <li class="text-ellipse" v-for="kind in similarList.kind.slice(0, 4)" @click="onSearch(kind.kind, 'kind', $event)">{{kind.kind}}</li>
       </template>
-    </ul>
-    <ul v-if="emptyStatus && type == 'default' && keyword && keyword !== '' && showSimilarWord">
-      <template v-if="similarList.component && similarList.component.length">
+      <template v-if="similarList.pCmpCode && similarList.pCmpCode.length">
         <li class="title text-ellipse">型号</li>
-        <li class="text-ellipse" v-for="code in similarList.component.slice(0, 4)" @click="onSearch(code.code, 'code', $event)">{{code.code}}</li>
+        <li class="text-ellipse" v-for="code in similarList.pCmpCode.slice(0, 4)" @click="onSearch(code.pCmpCode, 'pCmpCode', $event)">{{code.pCmpCode}}</li>
       </template>
+    </ul>
+    <ul v-if="emptyStatus && type == 'default' && keyword && keyword !== '' && showSimilarWord">
       <template v-if="similarList.brand && similarList.brand.length">
         <li class="title text-ellipse">品牌</li>
         <li class="text-ellipse" v-for="brand in similarList.brand.slice(0, 4)" @click="onSearch(brand.nameEn, 'brand', $event)">{{brand.nameEn}}</li>
       </template>
       <template v-if="similarList.kind && similarList.kind.length">
-        <li class="title text-ellipse">类目</li>
+        <li class="title text-ellipse">类目(产品名称)</li>
         <li class="text-ellipse" v-for="kind in similarList.kind.slice(0, 4)" @click="onSearch(kind.nameCn, 'kind', $event)">{{kind.nameCn}}</li>
       </template>
+      <template v-if="similarList.component && similarList.component.length">
+        <li class="title text-ellipse">型号</li>
+        <li class="text-ellipse" v-for="code in similarList.component.slice(0, 4)" @click="onSearch(code.code, 'code', $event)">{{code.code}}</li>
+      </template>
     </ul>
   </div>
 </template>

+ 14 - 9
components/mobile/brand/ComponentDetail.vue

@@ -1,13 +1,17 @@
 <template>
   <div class="component-detail mobile-content">
     <div class="base-detail">
-      <div class="base-detail-item" v-if="component.kind.nameCn">
-        <span>类&nbsp;&nbsp;&nbsp;&nbsp;目:</span>
-        <span>{{component.kind.nameCn}}</span>
-      </div>
-      <div class="base-detail-item" v-if="component.brand.nameCn">
+      <div class="base-detail-item">
         <span>品&nbsp;&nbsp;&nbsp;&nbsp;牌:</span>
-        <span>{{component.brand.nameCn}}</span>
+        <span>{{component.brand.nameCn || '-'}}</span>
+      </div>
+      <div class="base-detail-item">
+        <span>类目(产品名称):</span>
+        <span>{{component.kind.nameCn || '-'}}</span>
+      </div>
+      <div class="base-detail-item">
+        <span>规&nbsp;&nbsp;&nbsp;&nbsp;格:</span>
+        <span>{{component.spec || '-'}}</span>
       </div>
       <div class="base-detail-item attach" @click="goAttach(component.attach)">
         <span v-if="component.attach">规格书:<img src="/images/mobile/@2x/productDetail/pdf.png" alt=""><span>查看</span></span>
@@ -303,12 +307,12 @@
       margin: 0 .27rem .2rem .27rem;
       padding: .18rem .36rem 0 .36rem;
       border-radius: .1rem;
-      background: url('/images/mobile/@2x/productDetail/component-desc-bg.png')no-repeat;
+      background: url('/images/mobile/@2x/productDetail/desc-bg.png')no-repeat;
       background-size: cover;
-      max-height: 3.17rem;
+      height: 3.96rem;
       position: relative;
       .base-detail-item {
-        margin-top: .2rem;
+        margin-top: .14rem;
         position: relative;
         color: #fff;
         &:nth-child(1) {
@@ -336,6 +340,7 @@
         }
         &.product-description {
           height: 1.58rem;
+          margin-top: .2rem;
         }
         .description {
           line-height: .4rem;

+ 46 - 6
components/mobile/center/Seek.vue

@@ -1,10 +1,15 @@
 <template>
   <div class="seek">
-    <div class="com-mobile-header">
+    <div class="com-mobile-header mobile-center-header">
       <a @click="goLastPage"><i class="iconfont icon-fanhui"></i></a>
       <p>{{seekTitle}}</p>
+      <p class="en-name"><img :src="`/images/mobile/center/${user.data.enterprise.uu ? 'en' : 'self'}.png`" alt="">{{currentEnName}}</p>
     </div>
-    <div class="mobile-fix-content" id="mobileFixContent">
+    <div class="mobile-fix-content mobile-centerfix-content" id="mobileFixContent">
+      <div class="seek-title com-switch-item" v-if="userType == 'saler' && seekType == 'wait'">
+        <span class="mobile-switch-btn" :class="{'active': activeType=='all'}" @click="switchActiveType('all')">公司商机</span>
+        <span class="mobile-switch-btn" :class="{'active': activeType=='self'}" @click="switchActiveType('self')">我的商机</span>
+      </div>
       <div class="search-content">
         <input type="text" v-model="seekKeyword" :placeholder="userType == 'buyer' ? '品牌/型号' : '品牌/类目/型号/规格/公司'" @keyup.13="onSearch">
         <span @click="onSearch"><i class="iconfont icon-sousuo"></i></span>
@@ -17,6 +22,7 @@
 <script>
   import SeekList from '~components/mobile/applyPurchase/SeekList.vue'
   import { PullUp, EmptyStatus } from '~components/mobile/common'
+  import {deepCopy} from '~utils/baseUtils'
   export default {
     layout: 'mobileNoHeader',
     middleware: 'authenticated',
@@ -28,7 +34,8 @@
         count: 10,
         isChange: false,
         isSearch: false,
-        remindKeyword: ''
+        remindKeyword: '',
+        activeType: 'all'
       }
     },
     props: ['userType'],
@@ -40,7 +47,17 @@
     watch: {
       'purchase.data': {
         handler: function (val) {
-          let list = val.content ? val.content.slice() : []
+          let list = deepCopy(val.content || [])
+          if (this.seekType === 'done' && this.userType === 'saler') {
+            list.map(val => {
+              val.quotation = {
+                replies: val.replies,
+                vendName: val.vendName,
+                leadtime: val.leadtime,
+                user: val.user
+              }
+            })
+          }
           if (this.isChange) {
             this.purchaseManListData = list
             this.isChange = false
@@ -67,7 +84,7 @@
       seekTitle () {
         if (this.seekType === 'wait') {
           if (this.userType === 'saler') {
-            return '我的商机'
+            return '商机管理'
           } else {
             return '待报价'
           }
@@ -86,11 +103,19 @@
         this.reloadData()
       },
       reloadData: function () {
-        this.$emit('reloadAction', this.page, this.count, this.seekKeyword, this.seekType)
+        this.$emit('reloadAction', this.page, this.count, this.seekKeyword, this.seekType, this.activeType)
       },
       onPullUpAction: function () {
         this.page++
         this.reloadData()
+      },
+      switchActiveType: function (type) {
+        this.activeType = type
+        this.isSearch = false
+        this.remindKeyword = this.seekKeyword = ''
+        this.page = 1
+        this.isChange = true
+        this.reloadData()
       }
     }
   }
@@ -101,10 +126,25 @@
     padding: .25rem 0 0 0;
     input {
       border: 1px solid #376ff3;
+      width: 7.2rem;
+      margin: 0 0 0 -.02rem;
     }
     span {
       height: .46rem;
       line-height: .46rem;
     }
   }
+  $seekTitleLine: .72rem;
+  .seek-title {
+    height: $seekTitleLine;
+    line-height: $seekTitleLine;
+    .mobile-switch-btn {
+     /* height: $seekTitleLine;
+      line-height: $seekTitleLine;*/
+      font-size: .28rem;
+      /*&.active {
+        border-bottom-width: .07rem;
+      }*/
+    }
+  }
 </style>

+ 254 - 0
components/mobile/common/StatisticsMobile.vue

@@ -0,0 +1,254 @@
+<template>
+  <div class="statistics">
+    <ul class="list-inline" :style="{top: widthTop + 'rem'}" :class="{no_tran: widthTop == 2.4}">
+      <li v-for="(item, index) in itemData">
+        <span class="title"><i class="icon" :class="'icon' + index" ></i></span>
+        <span class="number" v-if="item.type === 2">
+          <span v-html="formatDouble(item.count)"></span>
+          <span class="unit">条</span>
+        </span>
+        <span class="number" v-else>
+          <span v-html="formatNumber(item.count, index)"></span>
+          <span class="unit" v-if="item.type === 3">家</span>
+        </span>
+      </li>
+    </ul>
+  </div>
+</template>
+<script>
+  export default {
+    name: 'StatisticsView',
+    data () {
+      return {
+        step: 1,
+        widthTop: 0,
+        timerIndex: 0,
+        timer: {}, // 定时器实体
+        imgbox: {
+            'src': ''
+        }
+      }
+    },
+    mounted () {
+      this.$nextTick(() => {
+        this.changeInterval()
+      })
+    },
+    methods: {
+      changeInterval () {
+        setInterval(() => {
+          this.widthTop += -0.6
+          if (this.widthTop === -2.4) {
+            this.widthTop = 0
+          }
+        }, 3000)
+      },
+      formatNumber (num, type) {
+        if (num.toString().indexOf('E') !== -1) {
+          let arr = num.toString().split('E')
+          num = arr[0] * Math.pow(10, arr[1])
+        }
+        if (num > 99999999) {
+          let str2 = num.toString()
+          num = Math.floor(num / 100000000)
+          if (parseInt(str2.charAt(str2.length - 8)) > 8) {
+            num = num + 1
+          }
+          num = num + '<span style="color: #333">亿</span>'
+        } else if (num > 9999) {
+          let str = num.toString()
+          num = Math.floor(num / 10000)
+          if (parseInt(str.charAt(str.length - 4)) > 4) {
+            num = num + 1
+          }
+          num += '<span style="color: #333">万</span>'
+        } else {
+          if (type === 6 || type === 7) {
+            num += '<span style="color: #333">元</span>'
+          } else {
+            num += ''
+          }
+        }
+        return num
+      },
+      formatDouble (num) {
+        console.log(11)
+        if (num.toString().indexOf('E') !== -1) {
+          let arr = num.toString().split('E')
+          num = arr[0] * Math.pow(10, arr[1])
+        }
+        if (num > 99999999) {
+          num = (num / 100000000).toFixed(2).slice(num.length - 1, 4) + '<span style="color: #333">亿</span>'
+        } else if (num > 9999) {
+          num = (num / 10000).toFixed(2).slice(num.length - 1, 4) + '<span style="color: #333">万</span>'
+        } else {
+          num += ''
+        }
+        return num
+      }
+    },
+    computed: {
+      allCount () {
+        return this.$store.state.count.allCount.data
+      },
+      inquirySheet () {
+        let sheetNum = this.$store.state.count.inquirySheet.data.count
+        return this.formatDouble(sheetNum)
+      },
+      inquirySheetLast () {
+        let lastSheetNum = this.$store.state.count.inquirySheetLast.data.count
+        return this.formatDouble(lastSheetNum)
+      },
+      all () {
+        let count = this.$store.state.supplier.merchant.merchantAll.data
+        return count.content ? count.totalElements : '0'
+      },
+      counts () {
+        return this.$store.state.product.common.counts
+      },
+      itemData () {
+        let str = []
+        if (this.counts.data) {
+          this.counts.data.forEach((value, key, $data) => {
+            str.push({id: $data[key].item, count: $data[key].count, type: 1})
+          })
+        }
+        str.push({id: '供应商', count: this.all ? this.all : 0, type: 3})
+        str.push({id: '本月询价单', count: this.$store.state.count.inquirySheet.data ? this.$store.state.count.inquirySheet.data.count : 0, type: 2})
+        str.push({id: '上月询价单', count: this.$store.state.count.inquirySheetLast.data ? this.$store.state.count.inquirySheetLast.data.count : 0, type: 2})
+        if (this.allCount) {
+          this.allCount.forEach((value, key, $data) => {
+            str.push({id: $data[key].item, count: $data[key].count, type: 1})
+          })
+        }
+        str = [str[1], str[2], str[0], ...str.slice(3, 6), str[7], str[6]]
+        return str
+      }
+    }
+  }
+</script>
+<style lang="scss" scoped>
+  .statistics{
+    position:relative;
+    height: .6rem;
+    border-radius:.3rem;
+    background: #fff;
+    margin:0 .05rem .2rem;
+    overflow: hidden;
+    ul{
+      position:absolute;
+      transition: .5s all linear;
+      &:no_tran{
+        transition:none;
+      }
+      li{
+        width:50%;
+        height:.6rem;
+        line-height: .6rem;
+        /*padding: 0 .3rem;*/
+        /*text-align: center;*/
+        font-size: .28rem;
+        font-weight: bold;
+        white-space: nowrap;
+        overflow: hidden;
+        vertical-align:top;
+        &:nth-child(odd){
+          &::after{
+            content: '';
+            display: inline-block;
+            width: 0.02rem;
+            height: 0.3rem;
+            background-color: #9c9c9c;
+            position: relative;
+            top: 3px;
+          }
+        }
+        span{
+          &.title{
+            display: inline-block;
+            width: 1.85rem;
+            height:.6rem;
+            line-height: .6rem;
+            vertical-align:middle;
+            margin-left: 0.15rem;
+
+            i{
+              &.icon{
+                display: inline-block;
+                width: 100%;
+                height: .6rem;
+              }
+              &.icon0{
+                background:url('/images/mobile/@2x/home/count1.jpg') right no-repeat;
+                background-size: auto 0.3rem;
+              }
+              &.icon1{
+                background:url('/images/mobile/@2x/home/count2.jpg') right no-repeat;
+                background-size: auto 0.3rem;
+              }
+              &.icon2{
+                background:url('/images/mobile/@2x/home/count3.jpg') right no-repeat;
+                background-size: auto 0.3rem;
+              }
+              &.icon3{
+                background:url('/images/mobile/@2x/home/count4.jpg') right no-repeat;
+                background-size: auto 0.3rem;
+              }
+              &.icon4{
+                background:url('/images/mobile/@2x/home/count5.jpg') right no-repeat;
+                background-size: auto 0.3rem;
+              }
+              &.icon5{
+                background:url('/images/mobile/@2x/home/count6.jpg') right no-repeat;
+                background-size: auto 0.3rem;
+              }
+              &.icon6{
+                background:url('/images/mobile/@2x/home/count7.jpg') right no-repeat;
+                background-size: auto 0.3rem;
+              }
+              &.icon7{
+                background:url('/images/mobile/@2x/home/count8.jpg') right no-repeat;
+                background-size: auto 0.3rem;
+              }
+            }
+          }
+          &.number{
+            display: inline-block;
+            color:red;
+            width: 1.6rem;
+            font-size: 0.32rem;
+            height: .6rem;
+            vertical-align:middle;
+            padding-left: 0.14rem;
+            line-height:.6rem;
+            .unit{
+              color: #333;
+            }
+          }
+        }
+        &:nth-child(2), &:nth-child(4){
+          span{
+            &.title{
+              width: 1.4rem;
+            }
+          }
+        }
+        &:nth-child(6){
+          span{
+            &.title{
+              width: 1.83rem;
+              margin-left: 0rem;
+            }
+          }
+        }
+        &:nth-child(8){
+          span{
+            &.title{
+              width: 1.3rem;
+            }
+          }
+        }
+      }
+    }
+  }
+</style>

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

@@ -4,4 +4,5 @@ import LoginBox from './LoginBox.vue'
 import userHeader from './userHeader.vue'
 import PullUp from './PullUp.vue'
 import EmptyStatus from './EmptyStatus.vue'
-export { Loading, RemindBox, LoginBox, userHeader, PullUp, EmptyStatus }
+import StatisticsMobile from './StatisticsMobile.vue'
+export { Loading, RemindBox, LoginBox, userHeader, PullUp, EmptyStatus, StatisticsMobile }

+ 485 - 119
components/mobile/store/StoreDetail.vue

@@ -5,11 +5,12 @@
         <img :src="store.logoUrl || '/images/component/default.png'"/>
         <i v-if="showIcon" class="iconfont icon-shoucang" :style="isFocus === 'true'?'color:#ff7800':'color: #ddd'" @click="collectStore"></i>
       </div>
+      <div class="store-switch-item">
+        <span :class="activeType=='product'?'mobile-switch-btn active':'mobile-switch-btn'" @click="activeType='product'">产品</span>
+        <span :class="activeType=='detail'?'mobile-switch-btn active':'mobile-switch-btn'" @click="activeType='detail'">介绍</span>
+      </div>
     </div>
-    <div class="store-switch-item">
-      <span :class="activeType=='product'?'mobile-switch-btn active':'mobile-switch-btn'" @click="activeType='product'">产品</span>
-      <span :class="activeType=='detail'?'mobile-switch-btn active':'mobile-switch-btn'" @click="activeType='detail'">介绍</span>
-    </div>
+
     <div class="store-info" v-if="activeType=='detail'">
       <div class="store-description">
         <h4>主营产品</h4>
@@ -20,6 +21,24 @@
           <p>抱歉,暂无主营产品信息</p>
         </div>
       </div>
+      <div class="store-description">
+        <h4>应用领域</h4>
+        <p class="content" v-if="store.storeApplication">
+          {{store.storeApplication}}
+        </p>
+        <div class="com-none-state" v-else>
+          <p>抱歉,暂无应用领域信息</p>
+        </div>
+      </div>
+      <div class="store-description">
+        <h4>企业介绍</h4>
+        <p class="content" v-if="store.enterprise.description">
+          {{store.enterprise.description}}
+        </p>
+        <div class="com-none-state" v-else>
+          <p>抱歉,暂无企业介绍</p>
+        </div>
+      </div>
      <div class="contact-info">
       <h4>联系我们</h4>
       <ul class="list-unstyled clearfix">
@@ -45,100 +64,191 @@
         </li>
         <li>
           <div>Q&nbsp;&nbsp;&nbsp;Q:</div>
-          <div v-if="store.enterprise.enQQ"> {{store.enterprise.enQQ}}</div>
-          <div v-else><span>-</span></div>
+          <div v-if="store.enterprise.enQQ"> {{store.enterprise.enQQ.trim()}}</div>
+          <div v-else>-</div>
         </li>
-        <li>
+       <!-- <li>
           <div>店铺地址:</div>
           <div v-if="store.enterprise.address">{{store.enterprise.address}}</div>
           <div v-else><span>-</span></div>
-        </li>
+        </li>-->
       </ul>
      </div>
-      <div class="store-description">
-        <h4>企业简介</h4>
-        <p class="content" v-if="store.enterprise.description">
-          {{store.enterprise.description}}
-        </p>
-        <div class="com-none-state" v-else>
-          <p>抱歉,暂无企业简介</p>
-        </div>
-      </div>
     </div>
   <!--  <div class="com-none-state" v-if="activeType=='detail'">
       <img src="/images/mobile/@2x/empty-collect.png">
       <p>抱歉,暂无店铺简介</p>
       <nuxt-link to="/">返回首页</nuxt-link>
     </div>-->
-    <div class="product-store" v-if="activeType == 'product'">
-      <table v-if="commodities.content&&commodities.content.length > 0">
-        <thead id="product-head" >
-          <tr>
-            <th style="width: 1.77rem;">型号/品牌</th>
-            <th style="width: 1.75rem;">包装</th>
-            <th style="width: 2.2rem;">价格梯度</th>
-            <th style="width: 1.77rem;">交期(天)</th>
-          </tr>
-        </thead>
-        <thead class="active" v-show="isScrollOverTab">
-          <tr>
-            <th style="width: 1.77rem;">型号/品牌</th>
-            <th style="width: 1.75rem;">包装</th>
-            <th style="width: 2.2rem;">价格梯度</th>
-            <th style="width: 1.77rem;">交期(天)</th>
-          </tr>
-        </thead>
-        <tbody id="product-body">
-        <tr v-for="commodity in searchLists" @click="goProductDetail(commodity.uuid)">
-          <td class="store-name">
-            <div>{{commodity.code}}</div>
-            <div>{{commodity.brandNameCn}}</div>
-          </td>
-          <td>
-            <div v-if="!commodity.packaging && !commodity.breakUp && !commodity.produceDate">-</div>
-            <div>{{commodity.packaging}}</div>
-            <div>{{commodity.breakUp?'可拆卖':'不可拆卖'}}</div>
-            <div>{{commodity.produceDate}}</div>
-          </td>
-          <td class="price-level-wrap">
-            <div v-if="!commodity.prices || commodity.prices.length == 0">-</div>
-            <div class="price-number fl">
-              <div v-for="price in commodity.prices">{{price.start}}+</div>
+    <div class="product-store" v-else>
+      <div class="search-content">
+        <input type="text" v-model="keyword" placeholder="品牌/类目/型号/规格" @keyup.13="search">
+        <span @click="search" style="height:0.5rem;line-height:0.5rem;">
+        <i class="iconfont icon-sousuo"></i>
+        </span>
+      </div>
+      <div v-if="commodities.content&&commodities.content.length > 0">
+        <div v-for="(item, index) in commodities.content">
+          <div class="middle" @click="goProductDetail(item)">
+            <div class="list">
+              <div class="fl">
+                <div class="name">品牌:</div>
+                <div class="text">{{item.brandNameEn}}</div>
+              </div>
             </div>
-            <div class="price-number fr">
-              <div v-for="price in commodity.prices" class="price-level">
-                <span v-if="commodity.currencyName.indexOf('RMB')!==-1">¥{{price.rMBPrice | currency}}</span>
-                <span v-if="commodity.currencyName.indexOf('USD')!==-1">${{price.uSDPrice | currency}}</span>
+            <div class="list">
+              <div class="fl" style="width: 100%">
+                <div class="name">类目(产品名称):</div>
+                <div class="text" style="color: #3f84f6">{{item.kindNameCn || '-'}}</div>
               </div>
+
             </div>
-          </td>
-          <td>
-            <div v-if="commodity.b2cMinDelivery">
-              <span>{{commodity.b2cMinDelivery}}</span>
-              <span v-if="commodity.b2cMaxDelivery && commodity.b2cMaxDelivery !== commodity.b2cMinDelivery">-</span>
-              <span v-if="commodity.b2cMaxDelivery && commodity.b2cMaxDelivery !== commodity.b2cMinDelivery">{{commodity.b2cMaxDelivery}}</span>
+            <div class="list">
+              <div class="fl" style="width: 100%">
+                <div class="name">型号:</div>
+                <div class="text">{{item.code || '-'}}</div>
+              </div>
             </div>
-            <div v-if="commodity.minBuyQty"><span class="order-tag">订</span>{{commodity.minBuyQty}}起订</div>
-            <div v-if="commodity.reserve"><span class="order-tag reserve-tag">库</span>{{commodity.reserve}}</div>
-            <div v-if="!commodity.b2cMinDelivery">
-              <span>—</span>
+            <div class="list">
+              <div class="fl" style="width: 100%">
+                <div class="name">规格:</div>
+                <div class="text">{{item.spec || '-'}}</div>
+              </div>
+            </div>
+
+            <div class="list">
+              <div class="fl" style="width: 100%">
+                <div class="name">包装:</div>
+                <div class="text">{{item.packaging || '无包装信息'}}</div>
+                <div class="textinfo" v-if="item.breakUp">可拆卖</div>
+              </div>
+            </div>
+
+            <div class="list">
+              <div class="name">生产日期:</div>
+              <div class="text" :title="item.produceDate">{{item.produceDate || '-'}}</div>
             </div>
-          </td>
-        </tr>
-        </tbody>
-      </table>
-      <div v-if="!commodities.content || commodities.content.length == 0" class="no-product">
-        <img src="/images/mobile/@2x/car@2x.png" alt="">
-        <div>抱歉,暂无上架产品信息</div>
+
+            <div class="list">
+              <div class="fl" style="width: 100%; ">
+                <div class="name">交期(天):</div>
+                <div class="text" style="color: #ef5042" v-if="item.b2cMaxDelivery && (item.b2cMaxDelivery != item.b2cMinDelivery)" v-text="item.b2cMinDelivery + '-'+ item.b2cMaxDelivery"></div>
+                <div class="text" style="color: #ef5042" v-if="item.b2cMaxDelivery && (item.b2cMaxDelivery == item.b2cMinDelivery)" v-text="item.b2cMinDelivery"></div>
+                <div v-if="item.minBuyQty" style="display: inline-block;margin-left: 0.2rem"><span class="order-tag">订</span>{{item.minBuyQty}}起订</div>
+                <div v-if="item.reserve" style="display: inline-block;margin-left: 0.2rem"><span class="order-tag reserve-tag">库</span>{{item.reserve}}</div>
+              </div>
+            </div>
+            <!--<div class="list">-->
+              <!--<div class="fl">-->
+                <!--<div class="name">最小包装数:</div>-->
+                <!--<div class="text">{{item.minPackQty}}</div>-->
+              <!--</div>-->
+              <!--<div class="fr">-->
+                <!--<div class="name">库存:</div>-->
+                <!--<div class="text">{{item.reserve}}</div>-->
+              <!--</div>-->
+            <!--</div>-->
+
+            <!--<div class="list">-->
+              <!--<div class="fl">-->
+                <!--<div class="name">包装方式:</div>-->
+                <!--<div class="text">{{item.packaging || '无包装信息'}}</div>-->
+              <!--</div>-->
+              <!--<div class="fr">-->
+                <!--<div class="name">最小起订量:</div>-->
+                <!--<div class="text" style="color: #f31919">{{item.minBuyQty}}</div>-->
+              <!--</div>-->
+            <!--</div>-->
+
+            <div class="list">
+              <div class="name 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.rMBPrice}}</div>
+                  </li>
+                </ul>
+              </div>
+            </div>
+
+          </div>
+          </div>
       </div>
+      <!--<table v-if="commodities.content&&commodities.content.length > 0">-->
+        <!--<thead id="product-head" >-->
+          <!--<tr>-->
+            <!--<th style="width: 1.77rem;">型号/品牌</th>-->
+            <!--<th style="width: 1.75rem;">包装</th>-->
+            <!--<th style="width: 2.2rem;">价格梯度</th>-->
+            <!--<th style="width: 1.77rem;">交期(天)</th>-->
+          <!--</tr>-->
+        <!--</thead>-->
+        <!--<thead class="active" v-show="isScrollOverTab">-->
+          <!--<tr>-->
+            <!--<th style="width: 1.77rem;">型号/品牌</th>-->
+            <!--<th style="width: 1.75rem;">包装</th>-->
+            <!--<th style="width: 2.2rem;">价格梯度</th>-->
+            <!--<th style="width: 1.77rem;">交期(天)</th>-->
+          <!--</tr>-->
+        <!--</thead>-->
+        <!--<tbody id="product-body">-->
+        <!--<tr v-for="commodity in searchLists" @click="goProductDetail(commodity)">-->
+          <!--<td class="store-name">-->
+            <!--<div>{{commodity.code}}</div>-->
+            <!--<div>{{commodity.brandNameCn}}</div>-->
+          <!--</td>-->
+          <!--<td>-->
+            <!--<div v-if="!commodity.packaging && !commodity.breakUp && !commodity.produceDate">-</div>-->
+            <!--<div>{{commodity.packaging}}</div>-->
+            <!--<div>{{commodity.breakUp?'可拆卖':'不可拆卖'}}</div>-->
+            <!--<div>{{commodity.produceDate}}</div>-->
+          <!--</td>-->
+          <!--<td class="price-level-wrap">-->
+            <!--<div v-if="!commodity.prices || commodity.prices.length == 0">-</div>-->
+            <!--<div class="price-number fl">-->
+              <!--<div v-for="price in commodity.prices">{{price.start}}+</div>-->
+            <!--</div>-->
+            <!--<div class="price-number fr">-->
+              <!--<div v-for="price in commodity.prices" class="price-level">-->
+                <!--<span v-if="commodity.currencyName.indexOf('RMB')!==-1">¥{{price.rMBPrice | currency}}</span>-->
+                <!--<span v-if="commodity.currencyName.indexOf('USD')!==-1">${{price.uSDPrice | currency}}</span>-->
+              <!--</div>-->
+            <!--</div>-->
+          <!--</td>-->
+          <!--<td>-->
+            <!--<div v-if="commodity.b2cMinDelivery">-->
+              <!--<span>{{commodity.b2cMinDelivery}}</span>-->
+              <!--<span v-if="commodity.b2cMaxDelivery && commodity.b2cMaxDelivery !== commodity.b2cMinDelivery">-</span>-->
+              <!--<span v-if="commodity.b2cMaxDelivery && commodity.b2cMaxDelivery !== commodity.b2cMinDelivery">{{commodity.b2cMaxDelivery}}</span>-->
+            <!--</div>-->
+            <!--<div v-if="commodity.minBuyQty"><span class="order-tag">订</span>{{commodity.minBuyQty}}起订</div>-->
+            <!--<div v-if="commodity.reserve"><span class="order-tag reserve-tag">库</span>{{commodity.reserve}}</div>-->
+            <!--<div v-if="!commodity.b2cMinDelivery">-->
+              <!--<span>—</span>-->
+            <!--</div>-->
+          <!--</td>-->
+        <!--</tr>-->
+        <!--</tbody>-->
+      <!--</table>-->
+      <empty-status :type="isSearch ? 'search' : 'collect'"
+                    :text="isSearch ? `抱歉,暂无与“${remindKeyword}”匹配的产品信息`: '抱歉,暂无产品信息'"
+                    :showLink="false"
+                    v-else
+      ></empty-status>
     </div>
     <remind-box :title="collectResult" :timeoutCount="timeoutCount"></remind-box>
-    <loading v-show="isSearchingMore"></loading>
     <login-box @onLoginBoxClose="showLoginBox = false" v-if="showLoginBox" :url="url"></login-box>
+    <pull-up :searchMore="fetching" :allPage="allPage" :page="page" @pullUpAction="getMoreSearch"></pull-up>
   </div>
 </template>
 <script>
-  import {RemindBox, Loading, LoginBox} from '~components/mobile/common'
+  import {RemindBox, LoginBox, PullUp, EmptyStatus} from '~components/mobile/common'
   export default {
     data () {
       return {
@@ -147,26 +257,23 @@
         timeoutCount: 0,
         clickTel: false,
         clickPhone: false,
-        isSearchingMore: false,
         searchLists: [],
         page: 1,
+        count: 10,
         showLoginBox: false,
         isScrollOverTab: false,
-        url: ''
+        url: '',
+        keyword: '',
+        remindKeyword: '',
+        isChange: false,
+        isSearch: false
       }
     },
     components: {
       RemindBox,
-      Loading,
-      LoginBox
-    },
-    mounted: function () {
-      let _this = this
-      _this.$nextTick(function () {
-        window.addEventListener('scroll', function () {
-          _this.scroll()
-        }, false)
-      })
+      LoginBox,
+      PullUp,
+      EmptyStatus
     },
     filters: {
       currency: function (num) {
@@ -204,10 +311,19 @@
       },
       commodities () {
         let list = this.$store.state.shop.storeInfo.storeCommodity.data
-        this.searchLists = this.searchLists.concat(list.content)
-        this.isSearchingMore = false
+        if (this.isChange) {
+          this.searchLists = []
+          this.page = 1
+          this.isChange = false
+        } else {
+          this.searchLists = [...this.searchLists, ...list.content]
+          this.isSearchSearchingMore = false
+        }
         return list
       },
+      fetching () {
+        return this.$store.state.shop.storeInfo.storeCommodity.fetching
+      },
       allPage () {
         return this.commodities.totalPages
       },
@@ -223,25 +339,18 @@
     },
     methods: {
       scroll: function () {
-        let scrolled = document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop
-        if (Math.ceil(scrolled + window.screen.availHeight) >= document.body.scrollHeight && !this.isSearchingMore && this.page < this.allPage && this.activeType === 'product') {
-          this.getMoreCom()
-        }
         let tbodyObj = document.getElementById('product-body')
         let theadObj = document.getElementById('product-head')
         if (theadObj) {
           this.isScrollOverTab = tbodyObj.getBoundingClientRect().top - theadObj.getBoundingClientRect().height - 5 <= theadObj.getBoundingClientRect().height
         }
       },
-      getMoreCom: function () {
-        if (!this.isSearchingMore) {
-          this.page++
-          this.isSearchingMore = true
-          this.pageCommodity({ page: this.page, count: 6 })
-        }
+      getMoreSearch: function () {
+        this.page++
+        this.pageCommodity({ page: this.page, count: this.count })
       },
-      async pageCommodity (pageParams, kindId, keyword) {
-        let params = { storeid: this.$route.params.uuid, origin: 'store', kindUuid: kindId, code: keyword }
+      async pageCommodity (pageParams) {
+        let params = { storeid: this.$route.params.uuid, origin: 'store', code: this.keyword }
         params.page = pageParams.page
         params.count = pageParams.count
         try {
@@ -251,11 +360,17 @@
           this.$store.commit('shop/storeInfo/GET_STORE_COMMODITY_FAILURE', err)
         }
       },
-      goProductDetail: function (uuid) {
-        if (uuid) {
-          this.$router.push('/mobile/brand/componentDetail/' + uuid)
+      goProductDetail: function (com) {
+//        if (uuid) {
+//          this.$router.push('/mobile/brand/componentDetail/' + uuid)
+//        } else {
+//          this.collectResult = '卖家上传的产品暂无参数,请联系卖家了解具体详情。'
+//          this.timeoutCount ++
+//        }
+        if (com.batchCode) {
+          this.$router.push('/mobile/product/' + com.batchCode)
         } else {
-          this.collectResult = '卖家上传的产品暂无参数,请联系卖家了解具体详情。'
+          this.collectResult = '产品参数错误'
           this.timeoutCount ++
         }
       },
@@ -265,7 +380,7 @@
             this.$store.dispatch('shop/StoreFocus', {storeName: this.store.storeName, storeid: this.store.id})
               .then(response => {
                 this.$store.dispatch('shop/StoreFocusList', {id: this.store.id})
-                this.collectResult = '收藏成功'
+                this.collectResult = '关注成功'
                 this.timeoutCount++
               })
           } else if (this.isFocus === 'true') {
@@ -280,11 +395,21 @@
           this.url = this.$route.fullPath
           this.showLoginBox = true
         }
+      },
+      search: function () {
+        this.page = 1
+        this.isChange = true
+        this.isSearch = true
+        this.remindKeyword = this.keyword
+        this.pageCommodity({ page: this.page, count: this.count })
       }
     }
   }
 </script>
 <style lang="scss" scoped>
+  .mobile-header {
+    border-bottom: 0px !important;
+  }
   .store-detail {
     margin: 0 auto;
     margin-bottom: 1.2rem;
@@ -292,18 +417,17 @@
     background: #f7f7f7;
     height: 100%;
     .store-logo {
-      height: 3.17rem;
-      width: 6.96rem;
+      height: 4.49rem;
+      width: 100%;
       display: inline-block;
-      margin: .2rem auto;
       line-height: 2.13rem;
       background: #fff;
       text-align: center;
-      border-radius: .1rem;
-      background: url('/images/mobile/@2x/brand-bg.png') no-repeat;
+      background: url('/images/mobile/@2x/brand-bg2.jpg') no-repeat;
       background-size: cover;
+      position: relative;
       .store-logo-box {
-        border: .04rem solid #c7e5fd;
+        border: .01rem solid #c7e5fd;
         border-radius: .1rem;
         height: 2.21rem;
         width: 3.73rem;
@@ -332,14 +456,21 @@
     .store-switch-item {
       text-align: center;
       background: #fff;
+      position: absolute;
+      width: 100%;
+      bottom: 0;
+      left: 0;
+      height: 0.83rem;
+      line-height: 0.83rem;
+      border-bottom: 1px solid #ccc;
       .mobile-switch-btn {
         background: #fff;
         color: #666;
         display: inline-block;
-        height: .64rem;
         font-size: .34rem;
-        line-height: .64rem;
         width: 1.4rem;
+        height: 0.79rem;
+        line-height: 0.79rem;
         &:first-child {
           margin-right: 1.78rem;
         }
@@ -401,7 +532,7 @@
                 color: #f44336;
               }
             }
-            &:last-child{
+           /* &:last-child{
               div{
                 width: 74%;
                 padding-right:.34rem;
@@ -412,7 +543,7 @@
                   width: 26%;
                 }
               }
-            }
+            }*/
           }
         }
       }
@@ -437,6 +568,229 @@
         }
       }
     }
+    .providerList {
+      border-top: .31rem solid #f1f3f7;
+      .content {
+        padding: 0.24rem 0.24rem;
+        background: #fff;
+        .linetext {
+          margin-bottom: 0.24rem;
+          overflow: hidden;
+          text-overflow: ellipsis;
+          white-space: nowrap;
+          &:nth-last-of-type(1){
+            margin-bottom: 0rem;
+          }
+        }
+        .fl {
+          float: left;
+          border-right: 1px dashed #e0e0e4;
+          width: 4.68rem;
+        }
+        .fr {
+          float: right;
+          margin: 0.18rem 0.24rem;
+          margin-right: 0rem;
+          font-size: 0.3rem;
+          &.addtop {
+            margin-top: 0.6rem;
+            .add {
+              background: #0067e7;
+              color: #fff;
+              &.noadd{
+                background: #cccbcb;
+                color: #fff;
+                border:1px solid #cccbcb;
+              }
+            }
+          }
+          div {
+            width: 2.1rem;
+            height: 0.6rem;
+            text-align: center;
+            line-height: 0.6rem;
+            border-radius: 3px;
+            &.look{
+              background: #0067e7;
+              color: #fff;
+            }
+            &.add{
+              background: #fff;
+              color: #0067e7;
+              border: 1px solid #0067e7;
+            }
+            &.delete{
+              background: #fff;
+              color: #f70415;
+              border: 1px solid #f70415;
+            }
+            &.noadd{
+              background: #cccbcb;
+              color: #fff;
+              border:1px solid #cccbcb;
+            }
+          }
+          div:nth-child(1){
+            margin-bottom: 0.26rem
+          }
+        }
+        &::after{
+          clear: both;
+          display: block;
+          content: ' ';
+          visibility: hidden;
+          zoom: 1;
+        }
+      }
+    }
+    .middle {
+      .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;
+      padding: 0.24rem 0.24rem;
+      background: #fff;
+      margin: 0.24rem 0.24rem 0;
+      border-radius: 5px;
+      .pms {
+        color: #f57710;
+        border: 1px solid #f57710;
+        border-radius: 0.4rem;
+        background: #fff;
+        font-size: 0.24rem;
+        height: 0.4rem;
+        line-height: 0.4rem;
+        width: 0.8rem;
+        text-align: center;
+      }
+      .list {
+        .left {
+          float: left;
+          overflow: hidden;
+          text-overflow: ellipsis;
+          white-space: nowrap;
+        }
+        .textinfo {
+          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: 4.4rem;
+          float: left;
+          overflow: hidden;
+          text-overflow: ellipsis;
+          white-space: nowrap;
+        }
+        .fr {
+          text-align: left;
+          width: 2.6rem;
+          overflow: hidden;
+          text-overflow: ellipsis;
+          white-space: nowrap;
+        }
+        &.list-long {
+          .fl {
+            width: 100% !important;
+          }
+        }
+        .name {
+          color: #333;
+          font-size: 0.28rem;
+          display: inline-block;
+        }
+        .text {
+          display: inline-block;
+          color: #333;
+          font-size: 0.28rem
+        }
+        .table {
+          width: 5rem;
+          margin-bottom: 0;
+          margin-top: 0;
+          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;
+            }
+          }
+        }
+      }
+    }
     .product-store {
       margin: .2rem 0 0 0;
       table {
@@ -451,10 +805,12 @@
           }
           tr {
             th {
-              font-weight: bold;
               text-align: center;
-              height: .78rem;
-              line-height: .78rem;
+              height: .98rem;
+              line-height: normal;
+              font-size: .26rem;
+              font-weight: normal;
+              color: #333;
             }
           }
         }
@@ -536,6 +892,7 @@
       }
     }
     .no-product {
+
       background: #fff;
       padding-top: 1rem;
       img {
@@ -557,10 +914,19 @@
     }
   }
   .com-none-state {
-    padding: .6rem;
+    background: #fff !important;
+    padding: .3rem;
+    margin: 0;
     p {
       margin: 0;
       font-size: .28rem;
     }
   }
+  .search-content {
+    padding: .07rem 0;
+    input {
+      width: 6.37rem;
+      border: 1px solid #376ff3;
+    }
+  }
 </style>

+ 1 - 1
components/mobile/supplier/List.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <search-header @searchAction="search" :similarUrl="similarUrl" :type="'supplier'" :placeholder="'可通过品牌/类目/型号/名称查找供应商'"></search-header>
+    <search-header @searchAction="search" :similarUrl="similarUrl" :type="'supplier'" :placeholder="'品牌/类目/型号/公司名'"></search-header>
     <div class="supplier-list mobile-content">
       <ul v-if="listData && listData.length">
         <li v-for="item in listData" @click="goSupplierDetail(item)">

+ 1 - 1
components/mobile/supplier/List2.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <search-header2 @searchAction="search" :similarUrl="similarUrl" :type="'supplier'" :placeholder="'可通过品牌/类目/型号/名称查找供应商'"></search-header2>
+    <search-header2 @searchAction="search" :similarUrl="similarUrl" :type="'supplier'" :placeholder="'品牌/类目/型号/公司名'"></search-header2>
     <div class="supplier-list mobile-content">
       <ul v-if="listData && listData.length">
         <li v-for="item in listData" @click="goSupplierDetail(item)">

+ 1 - 1
components/mobile/supplier/SupplierDetail.vue

@@ -49,7 +49,7 @@
       <ul v-if="productListData && productListData.length">
         <li v-for="product in productListData">
           <div class="prop">
-            <span class="head">品牌/类目:</span>
+            <span class="head">品牌/类目(产品名称):</span>
             <span class="item">{{(product.standard == 1 ? product.pbranden : product.brand) || '—'}}</span>
             <span class="item">{{product.kind || product.prodName || '—'}}</span>
           </div>

+ 61 - 0
components/mobile/user/Admin.vue

@@ -0,0 +1,61 @@
+<template>
+  <div class="mobile-fix-content">
+    <div class="info">
+      <div class="line">
+        <span>用户名:</span>
+        {{info.userName}}
+      </div>
+      <div class="line">
+        <span>手机:</span>
+        {{info.userTel}}
+      </div>
+      <div class="line">
+        <span>邮箱:</span>
+        {{info.userEmail}}
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+  export default {
+    props: {
+      info: {
+        default: {},
+        type: Object
+      }
+    }
+  }
+</script>
+<style lang="scss" scoped>
+  .mobile-fix-content {
+    background: #f1f3f6;
+  }
+  .info {
+    width: 7.1rem;
+    background: #fff;
+    margin: 0 auto;
+    height: 3.5rem;
+    padding: 0 .24rem;
+    font-size: .28rem;
+    color: #999;
+    border-radius: .05rem;
+    margin-top: .3rem;
+  .line {
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+    height: 1.16rem;
+    line-height: 1.16rem;
+    border-bottom: .01rem solid #d9d9d9;
+  &:last-child {
+     border-bottom: none;
+   }
+  span {
+    margin-left: .56rem;
+    display: inline-block;
+    width: .92rem;
+    text-align: right;
+  }
+  }
+  }
+</style>

+ 80 - 12
components/mobile/user/Info.vue

@@ -2,16 +2,26 @@
   <div class="mobile-fix-content">
     <div class="info">
       <div class="line">
-        <span>用户名:</span>
-        {{info.userName}}
+        <input type="file"
+               class="file-input"
+               name="name"
+               accept="image/jpeg,image/jpg,image/gif,image/bmp,image/png"
+               @change="uploadImg"/>
+        <span><i class="iconfont icon-tuxiang-" style="font-size: .29rem;"></i>头像:</span>
+        <span class="describe"><img :src="imageUploadUrl ? imageUploadUrl : info.imageUrl ? info.imageUrl : '/images/component/default.png'" alt="">
+          <i class="iconfont icon-xiangyou"></i></span>
       </div>
       <div class="line">
-        <span>手机:</span>
-        {{info.userTel}}
+        <span><i class="iconfont icon-yonghuming"></i>用户名:</span>
+        <span class="describe">{{info.userName}}</span>
       </div>
       <div class="line">
-        <span>邮箱:</span>
-        {{info.userEmail}}
+        <span><i class="iconfont icon-youxiang"></i>邮箱:</span>
+        <span class="describe">{{info.userEmail}}</span>
+      </div>
+      <div class="line">
+        <span><i class="iconfont icon-shouji"></i>手机:</span>
+        <span class="describe">{{info.userTel}}</span>
       </div>
     </div>
   </div>
@@ -23,10 +33,40 @@
         default: {},
         type: Object
       }
+    },
+    data () {
+      return {
+        imageUploadUrl: ''
+      }
+    },
+    methods: {
+      uploadImg (e) {
+        let file = e.target.files[0]
+        if (file) {
+          let param = new FormData()
+          param.append('image', file, file.name)
+          let config = {
+            headers: {'Content-Type': 'multipart/form-data'}
+          }
+          this.$http.post('/api/images', param, config)
+            .then(response => {
+              if (response.data) {
+                let imageUrl = response.data[0].path
+                this.$http.post('/basic/user/setImageUrl', {imageUrl: imageUrl})
+                  .then(response => {
+                    if (response.data) {
+                      this.imageUploadUrl = response.data.imageUrl
+                      this.$store.dispatch('loadUserInfo')
+                    }
+                  })
+              }
+            })
+        }
+      }
     }
   }
 </script>
-<style lang="scss" scoped>
+<style lang="scss">
   .mobile-fix-content {
     background: #f1f3f6;
   }
@@ -34,13 +74,14 @@
     width: 7.1rem;
     background: #fff;
     margin: 0 auto;
-    height: 3.5rem;
+    height: 4.66rem;
     padding: 0 .24rem;
     font-size: .28rem;
     color: #999;
     border-radius: .05rem;
     margin-top: .3rem;
     .line {
+      position: relative;
       overflow: hidden;
       text-overflow: ellipsis;
       white-space: nowrap;
@@ -50,11 +91,38 @@
       &:last-child {
         border-bottom: none;
       }
-      span {
-        margin-left: .56rem;
+      input{
+        position: absolute;
+        top: 0;
+        left: 0;
+        height: 1.16rem;
+        width: 100%;
+        opacity: 0;
+      }
+      span{
         display: inline-block;
-        width: 1.2rem;
-        text-align: right;
+        font-size: 0.28rem;
+        color: #999;
+        text-align: left;
+        i{
+          margin-right: .15rem;
+          font-size: .3rem;
+          color: #f8953c;
+        }
+      }
+      span.describe {
+        float: right;
+        color: #333;
+        i{
+          margin: 0 0 0 .1rem;
+          font-size: .24rem;
+          color: #bebebe;
+        }
+        img{
+          width: .58rem;
+          height: .58rem;
+          border: 1px solid #bebebe;
+        }
       }
     }
   }

+ 3 - 3
components/news/Right.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="news-content col-md-9">
     <h4><span class="label label-primary">News</span>新闻资讯</h4>
-    <div class="news" v-for="item in news_show">
+    <div class="news" v-if="news_show && news_show.length > 0"  v-for="item in news_show">
       <div class="new">
         <div style="width: 120px;">
           <div class="thumbnail-news">
@@ -42,10 +42,10 @@
         return this.$store.state.newsData.newsPage.allNews
       },
       news_show () {
-        return this.new.data.content
+        return this.new.data.content ? this.new.data.content : []
       },
       totalCount () {
-        return this.new.data.count
+        return this.new.data.count ? this.new.data.count : 0
       }
     },
     filters: {

+ 6 - 1
components/product/ComponentGoods.vue

@@ -9,7 +9,7 @@
       <thead>
       <tr style="height: 40px;">
         <th width="80"></th>
-        <th width="150">品牌/型号</th>
+        <th width="150">品牌/类目/型号/规格</th>
         <th width="100">包装/生产日期</th>
         <th width="130">库存</th>
         <th width="90">梯度/pcs</th>
@@ -35,8 +35,13 @@
         <td class="brand-code">
           <div class="brand" v-if="compGoods.brand.nameEn"><nuxt-link :to="`/product/brand/${compGoods.brand.uuid}/`" title="compGoods.brand.nameEn">{{compGoods.brand.nameEn}}</nuxt-link></div>
           <div class="brand" v-if="!compGoods.brand.nameEn">—</div>
+          <div class="brand">
+            <nuxt-link v-if="compGoods.kind&&compGoods.kind.nameCn" :to="`/product/kind/${compGoods.kindid}`" v-text="compGoods.kind.nameCn"></nuxt-link>
+          </div>
+          <div v-if="!compGoods.kind||!compGoods.kind.nameCn">{{compGoods.kindName || '—'}}</div>
           <div class="code" v-if="compGoods.code"><nuxt-link :to="`/product/component/${compGoods.uuid}/`" :title="compGoods.code">{{compGoods.code}}</nuxt-link></div>
           <div class="code" v-if="!compGoods.code">—</div>
+          <div class="brand" style="width: 160px;">{{compGoods.spec || '—'}}</div>
         </td>
         <td>
           <div class="package" v-if="compGoods.packaging">{{compGoods.packaging}}</div>

+ 2 - 0
components/product/brand/BrandComponent.vue

@@ -14,6 +14,7 @@
         <tr class="bgf7">
           <th width="300">类目(产品名称)</th>
           <th width="300">型号</th>
+          <th width="300">规格</th>
           <th width="200">数据手册</th>
           <th width="200">操作</th>
         </tr>
@@ -22,6 +23,7 @@
         <tr class="text-center" v-for="item in list.content">
           <td><nuxt-link :to="'/product/kind/' + item.kindid"><span>{{item.kind.nameCn || '-'}}</span></nuxt-link></td>
           <td><nuxt-link :to="'/product/component/' + item.uuid"><span>{{item.code}}</span></nuxt-link></td>
+          <td><span>{{item.spec || '-'}}</span></td>
           <td><a @click="toAttach(item.attach)"><button class="btn btn-default"  :disabled="!item.attach" :class="{'disabledbtn':!item.attach}">Datasheet手册</button></a></td>
           <td>
             <button class="btn btn-default disabledbtn" :disabled="true">申请样片</button>

+ 21 - 9
components/product/component/ComponentDetail.vue

@@ -23,37 +23,42 @@
               <div class="message-item">类目(产品名称)</div>
               <div class="colon">:</div>
               <div class="message-body body-long">
-                {{list.kind.nameCn || ''}}
+                {{list.kind.nameCn || '-'}}
               </div>
             </div>
+            <div class="message-detail">
+              <div class="message-item">规格</div>
+              <div class="colon">:</div>
+              <div :title="list.spec">{{list.spec || '-'}}</div>
+            </div>
             <div class="message-detail">
               <div class="message-item">总库存量</div>
               <div class="colon">:</div>
-              <div class="message-body">{{list.reserve || '暂无库存'}}</div>
+              <div class="message-body body-long">{{list.reserve || '暂无库存'}}</div>
             </div>
             <div class="message-detail">
               <div class="message-item">产品生命周期</div>
               <div class="colon">:</div>
-              <div class="message-body body-long">
+              <div class="message-body">
                 {{list.lifecycle | lifecycleFilter}}
               </div>
             </div>
             <div class="message-detail">
               <div class="message-item">规格书</div>
               <div class="colon">:</div>
-              <div class="message-body">
+              <div class="message-body body-long">
                 <img src="/images/all/pdf.png" alt="" @click="toAttach(list.attach)" v-if="list.attach">
                 <span v-if="!list.attach">暂无</span>
               </div>
             </div>
-            <div class="message-detail">
+            <div class="message-detail message-long-line">
               <div class="message-item">产品描述</div>
               <div class="colon" style="margin-right: 17px">:</div>
               <div class="description"
                    :class="{'more-description':showMoreDesc}"
                    v-if="list.description">
                 {{[list.description, showMoreDesc] | descriptionFilter}}
-                <span @click="showMoreDesc = !showMoreDesc" v-if="list.description.length > 30">
+                <span @click="showMoreDesc = !showMoreDesc" v-if="getRealLength(list.description) > 84">
                   <img :src="!showMoreDesc?'/images/component/circle-arrow-down.png':'/images/component/circle-arrow-up.png'" alt="">
                   <!--<i class="iconfont" :class="{'icon-shouqi':showMoreDesc,'icon-shouqi1':!showMoreDesc}"></i>-->
                   <span v-text="showMoreDesc ? '收起' : '展开'"></span>
@@ -105,6 +110,7 @@
 </template>
 <script>
   //  import ComponentMenu from '~components/product/component/componentMenu.vue'
+  import {getRealLen, cutOutString} from '~utils/baseUtils'
   export default {
     name: 'ComponentDetail',
     data () {
@@ -155,7 +161,7 @@
 //    },
     filters: {
       descriptionFilter: function ([str, type]) {
-        return !type ? str.length > 30 ? str.substring(0, 30) : str : str
+        return !type ? getRealLen(str) > 84 ? cutOutString(str, 84) + '...' : str : str
       },
       lifecycleFilter: function (code) {
         if (code === 815) {
@@ -209,6 +215,9 @@
           tmp += str.substring(index, str.length - 1)
         }
         return tmp
+      },
+      getRealLength: function (str) {
+        return getRealLen(str)
       }
 //      getRealLen: function (str) {
 //        let len = 0
@@ -313,7 +322,7 @@
     overflow: hidden;
     text-overflow: ellipsis;
     white-space: nowrap;
-    width: 93px;
+    width: 65px;
   }
   .componentDetail .container .component-message .message-body.body-long {
     width: 450px;
@@ -344,7 +353,7 @@
     border-top: none;
     position: absolute;
     right: 94px;
-    width: 508px;
+    width: 708px;
     background: #f5f6f8;
     z-index: 1;
     line-height: 22.7px;
@@ -491,6 +500,9 @@
   .component-message .message-detail:nth-child(odd) {
     width: 200px;
   }
+  .component-message .message-detail.message-long-line {
+    width: 796px;
+  }
   .component-message .message-detail:nth-child(1),.component-message .message-detail:nth-child(2) {
     border-top: 1px solid #e5e5e5;
   }

+ 1 - 1
components/provider/ExcellentSuppliers.vue

@@ -13,7 +13,7 @@
               <span>{{store.storeName}}</span>
             </div>
             <div class="description">
-              商家介绍:<span>{{store.description}}</span>
+              企业介绍:<span>{{store.enterprise.description}}</span>
             </div>
           </div>
         </a>

+ 1 - 1
components/provider/NewStore.vue

@@ -17,7 +17,7 @@
             主营:<span>暂无</span>
           </div>
           <div class="subject">
-            商家简介:<span>{{store.description}}</span>
+            企业介绍:<span>{{store.enterprise.description}}</span>
           </div>
         </div>
       </li>

+ 2 - 2
components/provider/RecommendOriginal.vue

@@ -13,8 +13,8 @@
             <!--<div class="subject" style="min-height: 5px;">
             </div>-->
             <div class="description">
-              <strong>商家介绍</strong>:
-              <span>{{store.description || '暂无简介'}}</span>
+              <strong>企业介绍</strong>:
+              <span>{{store.enterprise.description || '暂无简介'}}</span>
             </div>
           </div>
         </a>

+ 21 - 16
components/provider/Suppliers.vue

@@ -5,13 +5,14 @@
       <tr>
         <td width="175"></td>
         <td width="auto"></td>
-        <td width="200">
-          <div class="input-group" style="display: table;">
-            <input class="form-control" type="search" v-model="keyword" placeholder="请输入商家名称" @search="search()" />
-            <span class="input-group-btn">
-							<button type="button" class="btn btn-default" @click="search()"><i class="iconfont">&#xe6fc;</i></button>
-						</span>
-          </div>
+        <td width="400">
+          <search-header :outerKeyword="keyword" @searchAction="search" :placeholder="'品牌/类目/型号/店铺名'"></search-header>
+          <!--<div class="input-group" style="display: table;">-->
+            <!--<input class="form-control" type="search" v-model="keyword" placeholder="品牌/类目/型号/店铺名" @search="search()" />-->
+            <!--<span class="input-group-btn">-->
+							<!--<button type="button" class="btn btn-default" @click="search()"><i class="iconfont">&#xe6fc;</i></button>-->
+						<!--</span>-->
+          <!--</div>-->
         </td>
         <td width="150" style="vertical-align: middle"><span>入驻商家:</span><span class="text-message">{{stores ? stores.totalElements : 0}}</span><span>家</span></td>
         <td width="150" style="vertical-align: middle;">
@@ -30,15 +31,15 @@
         <td colspan="3">
           <a class="store-name" :href="'/store/' + store.uuid" target="_blank"><div :title="store.storeName">{{store.storeName}}</div></a>
           <div class="store-message">
-            <span>商家介绍:</span>
-            <span>{{showLittleDescription(store.description)}}<em v-if="store.description && store.description.length > 160">...</em></span>
+            <span>企业介绍:</span>
+            <span style="word-break: break-word;">{{showLittleDescription(store.enterprise.description)}}<em v-if="store.description && store.description.length > 160">...</em></span>
           </div>
         </td>
         <td class="vertical-middle">
           <a :href="'/store/' + store.uuid" target="_blank"><button class="btn btn-primary">进入店铺&nbsp;&gt;</button></a>
         </td>
       </tr>
-      <tr v-if="!stores || stores.length == 0">
+      <tr v-if="!stores.content || stores.content.length == 0">
         <td colspan="10" class="text-center" style="line-height: 40px; font-size: 20px;">
           <i class="fa fa-smile-o fa-lg"></i> 暂无店铺信息
         </td>
@@ -53,11 +54,13 @@
 </template>
 <script>
 import Page from '~components/common/page/pageComponent.vue'
+import SearchHeader from '~components/common/PcSearchHeader.vue'
 export default {
   name: 'suppliers',
   props: ['types'],
   components: {
-    Page
+    Page,
+    SearchHeader
   },
   data () {
     return {
@@ -66,7 +69,8 @@ export default {
         page: 1,
         count: 10,
         keyword: '',
-        types: this.types
+        type: this.types,
+        field: ''
       }
     }
   },
@@ -87,10 +91,11 @@ export default {
     }
   },
   methods: {
-    search () {
+    search (obj) {
       this.pageParams.page = 1
-      this.pageParams.keyword = this.keyword === '' ? null : this.keyword
-      this.$store.dispatch('provider/findStoreList', this.pageParams)
+      this.pageParams.keyword = obj.keyword === '' ? null : obj.keyword
+      this.pageParams.field = obj.type ? 'similar' : null
+      this.pageCommodity(this.pageParams)
     },
     showLittleDescription (description) {
       if (!description || description === '') {
@@ -100,7 +105,7 @@ export default {
     },
     async pageCommodity (pageParams) {
 //    pageCommodity (pageParams) {
-      pageParams.op = 'pageByType'
+      pageParams.op = 'similar'
 
       try {
         let { data } = await this.$http.get('/api/store-service/stores', { params: pageParams })

+ 3 - 2
components/search/GoodList.vue

@@ -41,7 +41,7 @@
           <thead>
           <tr style="height: 40px;">
             <!--<th width="80"></th>-->
-            <th width="140">品牌/类目/型号</th>
+            <th width="140">品牌/类目/型号/规格</th>
             <th width="100">包装/生产日期</th>
             <th width="110">商家名称</th>
             <th width="140">库存</th>
@@ -73,6 +73,7 @@
                 <span v-if="!item.uuid">{{item.code}}</span>
               </div>
               <div class="brand" v-if="!item.code">—</div>
+              <div class="brand">{{item.spec || '—'}}</div>
             </td>
             <td>
               <div class="package" v-text="item.packaging"></div>
@@ -313,7 +314,7 @@
         this.$emit('filterPriceEvent', this.filter)
       },
       goUnstandardDetail: function (comp) {
-        if (!comp.uuid) {
+        if (comp.batchCode) {
           this.$router.push('/store/productDetail/' + comp.batchCode)
         }
       }

+ 2 - 1
components/search/ResultTitle.vue

@@ -38,12 +38,13 @@
   #searchResult .result-title {
     margin-top: 5px;
     padding: 10px 5px;
-    height: 30px;
+    min-height: 30px;
     line-height: 30px;
     font-size: 14px;
   }
   .text-inverse {
     color: #f40!important;
+    word-break: break-all;
   }
   .text-num {
     font-style: normal;

+ 14 - 14
components/store/BaseInfo.vue

@@ -20,10 +20,22 @@
           <nuxt-link class="col-xs-10" :to="'/store/' + storeInfo.uuid">返回店铺</nuxt-link>
         </div>
         <div class="intro-text" v-text="storeInfo.description || '暂无主营产品信息'"></div>
+        <div class="intro-title row">
+          <h3 class="col-xs-2">
+            应用领域
+          </h3>
+        </div>
+        <div class="intro-text" v-text="storeInfo.storeApplication || '暂无应用领域信息'"></div>
+        <div class="intro-title row">
+          <h3 class="col-xs-2">
+            企业介绍
+          </h3>
+        </div>
+        <div class="intro-text" v-text="storeInfo.enterprise.description || '暂无企业介绍信息'"></div>
       </div>
     </div>
     <div id="contact-fragment">
-      <div class="container" style="margin-top: 30px;">
+      <div class="container" style="margin-top: 10px;">
         <div class="contact-title">
           <h3>
             联系我们
@@ -32,7 +44,7 @@
         <div v-if="storeInfo.enterprise">
           <div class="contact-text">
             <div v-text="storeInfo.enterprise.enName || '-'"></div>
-            <div><span class="public">地址:</span><span v-text="storeInfo.enterprise.address || '-'"></span></div>
+            <!--<div><span class="public">地址:</span><span v-text="storeInfo.enterprise.address || '-'"></span></div>-->
             <div><span class="public">电话:</span><span v-text="storeInfo.enterprise.enTel || '-'"></span></div>
             <div><span class="public">传真:</span><span v-text="storeInfo.enterprise.enFax || '-'"></span></div>
             <div><span class="public">官网地址:</span><a @click="goTarget(storeInfo.enterprise.enUrl)">{{storeInfo.enterprise.enUrl || '-'}}</a></div>
@@ -42,18 +54,6 @@
           </div>
         </div>
       </div>
-      <div class="container" style="margin-top: 30px;">
-        <div class="contact-title">
-          <h3>
-            企业简介
-          </h3>
-        </div>
-        <div v-if="storeInfo.enterprise">
-          <div class="contact-text">
-            <div class="intro-text" v-text="storeInfo.enterprise.description || '暂无企业简介'"></div>
-          </div>
-        </div>
-      </div>
     </div>
     <div id="proof-fragment" v-show="qualifications.length > 0">
       <div class="container" style="margin-top: 30px; margin-bottom: 60px;">

+ 1 - 1
components/store/CommodityList.vue

@@ -549,7 +549,7 @@ export default {
 
 	/* 物品列表 */
 	#goods-list-fragment .goodslist .brand-code {
-		font-size: 14px;
+		font-size: 12px;
 		text-align: center;
     position: relative;
 	}

+ 2 - 2
components/store/common/StoreHeader.vue

@@ -48,9 +48,9 @@
                 <li v-if="storeInfo.enterprise.enFax">
                   <span class="public">传真:</span><span v-text="storeInfo.enterprise.enFax"></span>
                 </li>
-                <li v-if="storeInfo.enterprise.address">
+                <!--<li v-if="storeInfo.enterprise.address">
                   <span class="public">地址:</span><span v-text="storeInfo.enterprise.address"></span>
-                </li>
+                </li>-->
                 <li v-if="storeInfo.enterprise.enPhone">
                   <span class="public">手机:</span><span v-text="storeInfo.enterprise.enPhone"></span>
                 </li>

+ 22 - 15
components/supplier/merchant.vue

@@ -19,16 +19,9 @@
           </div>
         </div>
       <div class="search">
-        <div class="input-group">
-          <input type="search" class="form-control" title="code" placeholder="名称/地址/行业"
-                 v-model="searchCode" @keyup.13="goodsSearch(searchCode)" @search="goodsSearch(searchCode)"/>
-          <span class="input-group-btn">
-            <button type="button" class="btn" @click="goodsSearch(searchCode)">&nbsp;查 询</button>
-          </span>
-        </div>
+        <search-header :outerKeyword="searchCode" :similarUrl="similarUrl" :type="'supplier'" @searchAction="search" :placeholder="'品牌/类目/型号/公司名'"></search-header>
       </div>
     </div>
-
     <div class="list_info">
       <div class="empty" v-if="!list.content || list.content.length === 0">
         <img src="/images/supplier/icon/empty.png">
@@ -72,6 +65,7 @@
 </template>
 
 <script>
+  import SearchHeader from '~components/common/PcSearchHeader.vue'
   import Page from '~components/common/page/pageComponent.vue'
   export default {
     name: 'MerchantView',
@@ -83,11 +77,14 @@
         pageParams: {
           count: 20,
           page: 1
-        }
+        },
+        similarUrl: '/search/product/similarKeywords',
+        type: ''
       }
     },
     components: {
-      Page
+      Page,
+      SearchHeader
     },
     computed: {
       list () {
@@ -142,13 +139,19 @@
             console.log(err)
           })
       },
-      goodsSearch (type) {
+      search (type) {
         this.pageParams.page = 1
-        this.$store.dispatch('supplier/loadVendorList', {page: this.pageParams.page, size: this.pageParams.count, keyword: type})
+        this.searchCode = type.keyword
+        this.type = type.type
+        this.handleCurrentChange(1)
+      },
+      goodsSearch (type) {
+        this.searchCode = type
+        this.handleCurrentChange(1)
       },
       handleCurrentChange (type) {
         this.pageParams.page = type
-        this.$store.dispatch('supplier/loadVendorList', {page: type, size: this.pageParams.count, keyword: this.searchCode})
+        this.$store.dispatch('supplier/loadVendorList', {page: this.pageParams.page, size: this.pageParams.count, keyword: this.searchCode, field: this.type})
       }
     }
   }
@@ -264,14 +267,18 @@
     }
     .search{
       float:right;
-      width:310px;
-      text-align: right;
+      width:370px;
+      padding-top:50px;
       margin-right:10px;
       .btn{
         width:68px;
         background: #ffa200;
         color:#fff;
       }
+      .title{
+        width:100%;
+        text-align: left;
+      }
     }
   }
   .list_info{

+ 31 - 0
layouts/mobileNoFooter.vue

@@ -0,0 +1,31 @@
+<template>
+  <div id="mobile">
+    <mobile-header></mobile-header>
+    <nuxt/>
+  </div>
+</template>
+<script>
+  import { MobileHeader } from '~components/mobile'
+  export default {
+    name: 'mobile',
+    components: {
+      MobileHeader
+    },
+//    middleware: 'authenticated',
+    head () {
+      return {
+        meta: [
+          { name: 'apple-mobile-web-app-capable', content: 'yes' },
+          { name: 'MobileOptimized', content: '320' },
+          { name: 'HandheldFriendly', content: 'true' },
+          { name: 'viewport', content: 'width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no' },
+          { 'http-equiv': 'Cache-Control', content: 'no-siteapp' },
+          { name: 'format-detection', content: 'telephone=no, email=no' }
+        ]
+      }
+    }
+  }
+</script>
+<style lang="scss">
+  @import '~assets/scss/mobileCommon';
+</style>

+ 6 - 8
middleware/wechatInfo.js

@@ -1,17 +1,15 @@
 export default function ({ isServer, store, req, redirect, route }) {
   if (isServer && !req) return
+  if (isServer) return
   // nuxt拦截器 存在一个问题,如果进入到了判断的地方,一定需要做跳转路由相关操作,不然会出现404
+  //  && window.__wxjs_environment !== 'miniprogram'
   if (!store.state.option.wechatInfo.data.openid) {
     let ua = store.state.option.userAgent.toLowerCase()
-    // let _info = localStorage.getItem('USOFTMALLWECHATINFO')
     if (ua.match(/micromessenger/i) && ua.match(/micromessenger/i)[0] === 'micromessenger' && req.url.indexOf('?code') === -1) {
-      // 判断是浏览器,且不存在code
-      console.log('进入拦截器')
-      if (isServer) {
-        return redirect(`/mobile/wechat/toggle?url=${route.path}`)
-      }
-    } else {
-      return true
+      // 判断是浏览器,且不存在code且不是微信小程序打开
+      // return redirect(`/mobile/wechat/toggle?url=${route.path}`)
+      // window.location.href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxb3274b676737a319&redirect_uri=https://www.usoftmall.com${route.path}&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`
+      // return
     }
   }
 }

+ 6 - 1
pages/index.vue

@@ -24,8 +24,9 @@
   import { Home } from '~components/mobile'
   export default {
     name: 'index',
-    middleware: 'wechatInfo',
+    // middleware: 'wechatInfo',
     layout (context) {
+//      console.log(context.store.state.option.isMobile)
       return context.store.state.option.isMobile ? 'mobile' : 'main'
     },
     data () {
@@ -115,6 +116,10 @@
         store.dispatch('applyPurchase/loadPurchaseManList', {pageNumber: 1, pageSize: 50, enUU: store.state.option.user.data.enterprise ? store.state.option.user.data.enterprise.uu : null}),
         store.dispatch('loadStoreStatus', { op: 'check' })
       ]) : Promise.all([
+        store.dispatch('supplier/loadVendorAll', {page: 1, size: 20}),
+        store.dispatch('loadAllCount', {_status: 'actived', usedFor: 'mall_home_banner'}),
+        store.dispatch('loadInquirySheet', {year: nowYear, month: nowMonth}),
+        store.dispatch('loadInquirySheetLast', {year: nowYear, month: LastMonth}),
         store.dispatch('applyPurchase/loadMobileHomeList', {pageNumber: 1, pageSize: 5, enUU: store.state.option.user.data.enterprise ? store.state.option.user.data.enterprise.uu : null})
       ])
     },

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

@@ -89,9 +89,6 @@
         if (Math.ceil(scrolled + window.screen.availHeight) >= document.body.scrollHeight && !this.isSearchSearchingMore && this.page < this.allPage) {
           this.getMoreSearch()
         }
-        if (this.$refs.searchSeekInput && this.$store.state.mobile.InputGetFocus) {
-          this.$refs.searchSeekInput.blur()
-        }
       },
 //      blur: function() {
 //        // setTimeout(() => {
@@ -116,7 +113,6 @@
         this.remindKeyword = this.seekKeyword
         this.page = 1
         this.isChange = true
-        this.$refs.searchSeekInput.blur()
         this.reloadData()
       }
     }

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

@@ -3,7 +3,7 @@
     <div class="mobile-header">
       <a @click="goLastPage"><i class="iconfont icon-fanhui"></i></a>
       <div class="search-content">
-        <input type="text" v-model="seekKeyword" :placeholder="user.logged ? '品牌/类目型号//规格/公司' : '品牌/类目/型号/规格'" @keyup.13="searchSeek">
+        <input type="text" v-model="seekKeyword" :placeholder="user.logged ? '品牌/类目/型号/规格/公司' : '品牌/类目/型号/规格'" @keyup.13="searchSeek">
         <span @click="searchSeek">
         <i class="iconfont icon-sousuo"></i>
         </span>
@@ -81,9 +81,6 @@
         if (Math.ceil(scrolled + window.screen.availHeight) >= document.body.scrollHeight && !this.isSearchSearchingMore && this.page < this.allPage) {
           this.getMoreSearch()
         }
-        if (this.$refs.searchSeekInput && this.$store.state.mobile.InputGetFocus) {
-          this.$refs.searchSeekInput.blur()
-        }
       },
       getMoreSearch: function () {
         this.page++
@@ -98,7 +95,6 @@
         this.remindKeyword = this.seekKeyword
         this.page = 1
         this.isChange = true
-        this.$refs.searchSeekInput.blur()
         this.reloadData()
       }
     }

+ 5 - 1
pages/mobile/center/index.vue

@@ -225,13 +225,17 @@
     </div>
     <remind-box :title="collectResult" :timeoutCount="timeoutCount"></remind-box>
     <div class="mobile-modal" v-if="showStoreInfo" @touchmove="preventTouchMove($event)">
-      <div class="mobile-modal-box">
+      <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="checkInfo(storeInfo.enAddress || storeInfo.address)">商家地址:{{storeInfo.enAddress || storeInfo.address}}</div>
+-->
           <!--<div class="content-line link-url">在线咨询</div>-->
           <div v-if="checkInfo(storeInfo.enTel)">致电:<a :href="'tel:' + storeInfo.enTel" target="_blank" class="content-line link-url">{{storeInfo.enTel}}</a></div>
+<!--
           <div v-if="checkInfo(storeInfo.enEmail)">邮件:<a :href="'mailto:' + storeInfo.enEmail" target="_blank" class="content-line link-url">{{storeInfo.enEmail}}</a></div>
+-->
         </div>
       </div>
     </div>

+ 10 - 7
pages/mobile/center/user/collect/component.vue

@@ -1,16 +1,19 @@
 <template>
   <div class="mobile-center">
-    <div class="com-mobile-header">
+    <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" id="mobileFixContent">
+    <div class="mobile-fix-content mobile-centerfix-content" id="mobileFixContent">
       <ul v-if="compList && compList.length">
-        <li :key="comp.componentid" v-for="comp in compList" @click="goUrl('/mobile/brand/componentDetail/' + comp.componentinfo.uuid)">
+        <li class="clearfix" :key="comp.componentid" v-for="comp in compList" @click="goUrl('/mobile/brand/componentDetail/' + comp.componentinfo.uuid)">
           <div class="fl">
-            <p>品牌:<span v-text="comp.componentinfo.brand.nameCn"></span></p>
-            <p>类目(产品名称):<span v-text="comp.componentinfo.kind.nameCn"></span></p>
-            <p>型号:<span v-text="comp.componentinfo.code"></span></p>
+            <p>品牌:<span v-text="comp.componentinfo.brand.nameCn || '-'"></span></p>
+            <p>类目(产品名称):<span v-text="comp.componentinfo.kind.nameCn || '-'"></span></p>
+            <p>型号:<span v-text="comp.componentinfo.code || '-'"></span></p>
+            <p>规格:<span v-text="comp.componentinfo.spec || '-'"></span></p>
+            <p>产品描述:<span v-text="comp.componentinfo.description || '-'"></span></p>
           </div>
           <div class="vir"></div>
           <div class="fr">
@@ -134,7 +137,6 @@
       width: 7.1rem;
       margin: 0 auto;
       li {
-        height: 1.8rem;
         border-radius: .05rem;
         border: 1px solid #ccc;
         margin: .25rem 0 0 0;
@@ -165,6 +167,7 @@
         .fr {
           width: 2.34rem;
           text-align: center;
+          margin-top: .3rem;
           i {
             display: block;
             color: #ff7800;

+ 10 - 6
pages/mobile/center/user/collect/store.vue

@@ -1,8 +1,9 @@
 <template>
   <div class="mobile-center">
-    <div class="com-mobile-header">
+    <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-content">
       <div v-if="storeList.length" class="shop-list" v-bind:key="item.id" v-for="item in storeList" @click="goStoreDetail(item.storeInfo.uuid)">
@@ -13,8 +14,8 @@
             <img :src="item.storeInfo.logoUrl || '/images/component/default.png'">
           </div>
           <div class="list-item-phone">
-            <p>电话:<span>{{item.storeInfo.enterprise ? item.storeInfo.enterprise.enTel : '-'}}</span></p>
-            <p>传真:<span>{{item.storeInfo.enterprise ? item.storeInfo.enterprise.enFax : '-'}}</span></p>
+            <p>电话:<span>{{item.storeInfo.enterprise.enTel || '-'}}</span></p>
+            <p>传真:<span>{{item.storeInfo.enterprise.enFax || '-'}}</span></p>
             <p>联系商家:<a @click="selectStoreInfo(item, $event)">点击查看</a></p>
             <i class="iconfont icon-shoucang" @click="cancelFocus(item, $event)"></i>
           </div>
@@ -23,13 +24,13 @@
       <empty-status v-if="!storeList.length" :type="'collect'" :showLink="true" :text="'抱歉,暂无店铺关注'"></empty-status>
     </div>
     <div class="mobile-modal" v-if="showStoreInfo" @touchmove="preventTouchMove($event)">
-      <div class="mobile-modal-box">
+      <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>商家地址:{{storeInfo.enAddress || storeInfo.address || '-'}}</div>
+         <!-- <div>商家地址:{{storeInfo.enAddress || storeInfo.address || '-'}}</div>-->
           <!--<div class="content-line link-url">在线咨询</div>-->
           <div>致电:<a :href="'tel:' + storeInfo.enTel" target="_blank" class="content-line link-url">{{storeInfo.enTel || '-'}}</a></div>
-          <div>邮件:<a :href="'mailto:' + storeInfo.enEmail" target="_blank" class="content-line link-url">{{storeInfo.enEmail || '-'}}</a></div>
+          <!--<div>邮件:<a :href="'mailto:' + storeInfo.enEmail" target="_blank" class="content-line link-url">{{storeInfo.enEmail || '-'}}</a></div>-->
         </div>
       </div>
     </div>
@@ -141,6 +142,9 @@
   }
 </script>
 <style lang="scss" scoped>
+  .mobile-content {
+    padding-top: 1.26rem !important;
+  }
   .shop-list {
     background:#fff;
     border-bottom: .1rem solid #dfe2e4;

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

@@ -1,10 +1,11 @@
 <template>
   <div class="mobile-center">
-    <div class="com-mobile-header">
+    <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">
+    <div class="mobile-fix-content mobile-centerfix-content">
       <div class="seek-banner block-wrap">
         <img src="/images/mobile/center/user/adv.jpg" alt="">
       </div>

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

@@ -1,10 +1,11 @@
 <template>
   <div class="mobile-center">
-    <div class="com-mobile-header">
+    <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">
+    <div class="mobile-fix-content mobile-centerfix-content">
       <div class="seek-banner block-wrap">
         <img src="/images/mobile/center/vendor/adv.jpg" alt="">
       </div>
@@ -26,11 +27,11 @@
         </ul>
       </div>
       <div class="block-wrap seek-operation">
-        <p><i></i>我的商机</p>
+        <p><i></i>商机管理</p>
         <ul>
           <nuxt-link to="/mobile/center/vendor/seek?seekType=wait" tag="li">
             <img src="/images/mobile/center/vendor/all.png" alt="">
-            <p>我的商机</p>
+            <p>公司商机</p>
           </nuxt-link>
           <nuxt-link to="/mobile/center/vendor/seek?seekType=done" tag="li">
             <img src="/images/mobile/center/vendor/seek-done.png" alt="">

+ 76 - 20
pages/mobile/center/vendor/product.vue

@@ -14,7 +14,7 @@
           <i class="iconfont icon-sousuo"></i>
           </span>
       </div>
-      <div v-bind:key="item.id"  v-for="(item, index) in GetEnterpriseListData" class="providerList">
+      <div v-bind:key="index"  v-for="(item, index) in GetEnterpriseListData" class="providerList">
         <div v-if="providerType !== 'onLine'">
           <div class="top">
             <div class="icon" :class="item.standard ? 'standed' : 'istanded'"></div>
@@ -57,11 +57,15 @@
             <img class="store-type" src="/images/mobile/product/self.png" alt="" v-else >
           </div>
           <div class="middle">
-            <div class="list list-long">
+            <div class="list">
               <div class="fl">
                 <div class="name">品牌:</div>
                 <div class="text">{{item.brandNameEn}}</div>
               </div>
+              <div class="fr">
+                <div class="button" @click="update(item)">编辑</div>
+                <div class="button" @click="offProduct(item, index)">下架</div>
+              </div>
             </div>
             <div class="list">
               <div class="fl">
@@ -223,7 +227,6 @@
                       </ul>
                     </div>
                   </div>
-
                 </div>
               </div>
             </div>
@@ -234,7 +237,7 @@
     <div class="deleteKuang" v-show="showDelete">
       <div class="kuangContent">
         <div class="title">删除信息</div>
-        <div class="titleinfo">是否删除此信息</div>
+        <div class="titleinfo">是否删除该产品</div>
         <!--<div class="info" v-show="isUploadpro">*存在已上架信息</div>-->
         <div class="K_btn">
           <div class="cancelBtn" @click="cancelFn()">取消</div>
@@ -242,17 +245,30 @@
         </div>
       </div>
     </div>
+    <div class="deleteKuang" v-show="showoffshelf">
+      <div class="kuangContent">
+        <div class="title">系统信息</div>
+        <div class="titleinfo">是否下架该产品?</div>
+        <!--<div class="info" v-show="isUploadpro">*存在已上架信息</div>-->
+        <div class="K_btn">
+          <div class="cancelBtn" @click="cancelFn()">取消</div>
+          <div class="answerBtn" @click="offshelfFn()">确定</div>
+        </div>
+      </div>
+    </div>
     <div class="none-state" v-show="StateNone">
-      <img src="/images/mobile/@2x/empty-collect.png">
+      <img src="/images/mobile/@2x/search-empty.png">
       <p>暂无数据</p>
       <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>
+    <!-- 在售产品编辑框 -->
   </div>
 </template>
 
 <script>
-  import { RemindBox } from '~components/mobile/common'
+  import { RemindBox, PullUp } from '~components/mobile/common'
   export default {
     layout: 'mobile',
     middleware: 'authenticated',
@@ -270,20 +286,46 @@
         timeoutCount: 0,
         EnterprisePage: 1,
         chooseItem: {},
-        vendorlist: [] // 查看更多信息
+        vendorlist: [], // 查看更多信息
+        showoffshelf: false
       }
     },
     methods: {
-      scroll: function () {
-        let scrolled = document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop
-
-//        if (this.$refs.searchSeekInput && this.$store.state.mobile.InputGetFocus) {
-//          this.$refs.searchSeekInput.blur()
-//        }
-        if (Math.ceil(scrolled + window.screen.availHeight) >= document.body.scrollHeight && !this.isSearchSearchingMore && this.seekPage < this.EnterprisePage) {
-          this.getMoreSearch()
-        }
+      update(item) {
+        this.$store.commit('product/brand/GET_ONSALE_DETAILS_SUCCESS', item)
+        this.$router.push('/mobile/center/vendor/productdetails')
+      },
+      offProduct(item) {
+        this.showoffshelf = true
+        this.shelfItem = item
+      },
+      offshelfFn() {
+        let item = this.shelfItem
+        this.$http.put(`/trade/goods/provider/off/shelf?batchCodes=${item.batchCode}`).then(res => {
+          if (res.data.success) {
+            this.timeoutCount++
+            this.collectResult = '下架成功'
+            this.showoffshelf = false
+            this.seekPage = 1
+            this.GetEnterpriseListData.splice(0, this.GetEnterpriseListData.length)
+            this.GetEnterpriseListData = null
+            this.GetEnterpriseListData = []
+            this.reloadData()
+          } else {
+            this.timeoutCount++
+            this.collectResult = res.data.message
+          }
+        }, err => {
+          this.timeoutCount++
+          this.collectResult = err.response.data
+        })
       },
+//      scroll: function () {
+//        let scrolled = document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop
+//        if (Math.ceil(scrolled + window.screen.availHeight) >= document.body.scrollHeight && !this.isSearchSearchingMore && this.seekPage < this.EnterprisePage) {
+//          this.getMoreSearch()
+//        }
+//      },
       searchSeek: function () {
         this.GetEnterpriseListData.splice(0, this.GetEnterpriseListData.length)
         this.GetEnterpriseListData = null
@@ -382,6 +424,7 @@
       },
       cancelFn: function() {
         this.showDelete = false
+        this.showoffshelf = false
       },
       // 获取相对应的信息
       getResourceProvidor: function() {
@@ -470,7 +513,7 @@
     },
     mounted: function () {
       this.$nextTick(() => {
-        window.addEventListener('scroll', this.scroll, false)
+//        window.addEventListener('scroll', this.scroll, false)
         this._initscroll()
       })
     },
@@ -478,7 +521,8 @@
       this.getResourceProvidor()
     },
     components: {
-      RemindBox
+      RemindBox,
+      PullUp
     }
   }
 </script>
@@ -486,7 +530,7 @@
 <style scoped lang="scss">
   .user-content{
     margin-bottom: .98rem;
-    margin-top: 0.88rem;
+    margin-top: 1.26rem;
     .sa-pub {
       display: inline-block;
       width: 1.41rem;
@@ -1014,7 +1058,19 @@
       }
       .textinfo {
         color: #0067e7;
-        font-size: 0.3rem
+        font-size: 0.3rem;
+      }
+      .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{

+ 770 - 0
pages/mobile/center/vendor/productdetails.vue

@@ -0,0 +1,770 @@
+<template>
+  <div class="productDetails" @click.prevent="closeAlert()">
+    <div class="product">
+      <div class="over top clearfix">
+        <div class="icon" :class="chooseItem.standard ? 'standed' : 'istanded'"></div>
+        <div class="text">
+          {{chooseItem.code}}
+        </div>
+      </div>
+      <div class="over list">
+        <span class="name">品牌:</span>
+        <span>{{chooseItem.brandNameEn}}</span>
+      </div>
+      <div class="over list">
+        <span class="name">类目(产品名称):</span>
+        <span>{{chooseItem.kindNameCn}}</span>
+      </div>
+      <div class="over list clearfix">
+        <div class="pull-left">
+          <span class="name">型号:</span>
+          <span>{{chooseItem.code}}</span>
+        </div>
+        <div class="pull-right">
+          <span class="name">可拆卖:</span>
+          <div class="progress-wrapper" :class="{active: chooseItem.breakUp}" @click="changeBreakUp()">
+            <div class="progress-btn"></div>
+          </div>
+        </div>
+      </div>
+      <div class="list clearfix">
+        <div class="pull-left">
+          <span class="name">规格:</span>
+          <div class="specInput input">
+            <input type="text" placeholder="请输入规格" v-model="chooseItem.spec" maxlength="50"/>
+            <img src="/images/mobile/product/close_icon.png" @click="deleteText('spec')"/>
+          </div>
+        </div>
+        <div class="pull-right">
+          <span class="name">库存:</span>
+          <input type="tel" placeholder="数量" v-model="chooseItem.reserve" class="input reserveInput" maxlength="9" />
+        </div>
+      </div>
+      <div class="list clearfix">
+        <div class="pull-left">
+          <span class="name">包装:</span>
+          <div class="selectInput" @click.stop="showdropmenu('pack')">
+            <span>{{chooseItem.packaging || '无包装信息'}}</span>
+            <img src="/images/mobile/product/drop_icon.png"/>
+            <ul :class="{active : showDrop === 'pack' }">
+              <li v-for="item in packObj" @click.stop="choosePack(item)">{{item}}</li>
+            </ul>
+          </div>
+        </div>
+        <div class="pull-right">
+          <span class="name">生产日期:</span>
+          <input type="text" placeholder="2018-02-05" v-model="chooseItem.produceDate" class="input dateInput" maxlength="12" />
+        </div>
+      </div>
+      <div class="list clearfix">
+        <div class="pull-left">
+          <span class="name">最小包装数:</span>
+          <input type="tel" placeholder="请输入最小包装数" v-model="chooseItem.minPackQty" class="input minPackQtyInput" maxlength="6" @blur="minBuyQtyBlur()"/>
+        </div>
+        <div class="pull-right">
+          <span class="name">最小起订量:</span>
+          <input type="tel" placeholder="请输入最小起订量" v-model="chooseItem.minBuyQty" class="input minBuyQtyInput" maxlength="6" @blur="minBuyQtyBlur()" />
+        </div>
+      </div>
+      <div class="list clearfix">
+        <div class="pull-left">
+          <span class="name">销售方式:</span>
+          <div class="selectInput selectInput2" @click.stop="showdropmenu('store')">
+            <span v-if="chooseItem.storeInfoOms">{{chooseItem.storeInfoOms}}</span>
+            <span v-else>{{chooseItem.storeid === '33069557578d44e69bd91ad12d28a8d4' ? '寄售' : '自营'}}</span>
+            <img src="/images/mobile/product/drop_icon.png" v-if="!ShowShopshelfOff"/>
+            <ul :class="{active : showDrop === 'store' }" v-if="!ShowShopshelfOff">
+              <li v-for="item in storeObj" @click.stop="chooseStore(item)">{{item}}</li>
+            </ul>
+          </div>
+        </div>
+        <div class="pull-right">
+          <span class="name">交期:</span>
+          <input type="tel" placeholder="天数" v-model="chooseItem.minDelivery" class="input startInput" maxlength="3" @blur="minDeliveryBlur()" />
+          -
+          <input type="tel" placeholder="天数" v-model="chooseItem.maxDelivery" class="input endInput" maxlength="3" @blur="minDeliveryBlur()"/>
+        </div>
+      </div>
+      <div class="list" style="border-bottom: 0px">
+        <span class="name">自定义标签:</span>
+        <div class="labelInput input">
+          <input type="text" v-model="chooseItem.tag" placeholder="请输入标签名字" maxlength="20"/>
+          <img src="/images/mobile/product/close_icon.png" @click="deleteText('label')" @blur="tagBlur()"/>
+        </div>
+      </div>
+      <div class="pscList-top clearfix">
+        <div class="pull-left">梯度/pcs</div>
+        <div class="pull-right">单价</div>
+      </div>
+      <ul class="prices">
+        <li v-for="(item, index) in chooseItem.prices" v-bind:key="index">
+          <div class="clearfix">
+            <div class="pull-left">
+              <input type="number" placeholder="数量" class="otherNumber" :class="{firstNumber: index === 0}" v-model.lazy.trim="item.start" :disabled="index === 0" :readonly="index === 0" @blur="startpriceBlur(item, index)" maxlength="9"/>
+              <label v-if="index !== chooseItem.prices.length - 1">-</label>
+              <label v-if="index === chooseItem.prices.length - 1">以上</label>
+              <input type="number" placeholder="数量" class="otherNumber" v-model.lazy.trim="item.end" v-if="index !== chooseItem.prices.length - 1" @blur="endpriceBlur(item, index)" maxlength="9"/>
+            </div>
+            <div class="pull-right">
+              <template v-if="chooseItem.currencyName == 'RMB'">
+                <input class="priceM" type="tel" placeholder="单价(¥)" v-model="item.rMBPrice" @blur="rMBPriceBlur(item)"/>
+              </template>
+              <template v-else>
+                <input class="priceM" type="tel" placeholder="单价($)" v-model="item.rMBPrice" @blur="rMBPriceBlur(item)"/>
+              </template>
+              <span @click="miuPrice(index)"><img src="/images/mobile/product/mui_icon.png"/></span>
+              <span @click="addPrice()"><img src="/images/mobile/product/add_icon.png"/></span>
+            </div>
+          </div>
+        </li>
+      </ul>
+      <div class="button clearfix">
+        <div class="save pull-left" @click="save()">保存</div>
+        <div class="cancel pull-right" @click="goLastPage()">取消</div>
+      </div>
+    </div>
+    <div v-if="GetchooseItem && false"></div>
+    <remind-box :title="collectResult" :timeoutCount="timeoutCount"></remind-box>
+  </div>
+</template>
+
+<script>
+  function deepCopy(target) {
+    if (typeof target !== 'object') return
+    // 判断目标类型,来创建返回值
+    var newObj = target instanceof Array ? [] : {}
+    for (var item in target) {
+      // 只复制元素自身的属性,不复制原型链上的
+      if (target.hasOwnProperty(item)) {
+        newObj[item] = typeof target[item] === 'object' ? deepCopy(target[item]) : target[item]
+      }
+    }
+    return newObj
+  }
+  import { RemindBox } from '~components/mobile/common'
+  export default {
+    name: 'productDetails',
+    layout: 'mobileNoFooter',
+    components: {
+      RemindBox
+    },
+    // middleware: 'authenticated',
+    data() {
+      return {
+        collectResult: '',
+        timeoutCount: 0,
+        specinput: '',
+        timedate: '',
+        chooseItem: {},
+        showDrop: '',
+        storeObj: ['寄售', '自营'],
+        packObj: ['Bulk-散装', 'Reel-卷装', 'Tape/Reel-编带', 'Tray-盘装', 'Tube-管装', '盒装', '袋装', '罐装', '瓶装', '桶装', '箱装', '其他']
+      }
+    },
+    computed: {
+      GetchooseItem() {
+        this.chooseItem = deepCopy(this.$store.state.product.brand.onSaleDetails.data)
+      },
+      storeInfoStore() {
+        return this.$store.state.option.storeStatus.data
+      },
+      ShowShopshelfOff() {
+        return this.storeInfoStore.storeName && (this.storeInfoStore.storeName.indexOf('优软测试二') > -1 || this.storeInfoStore.storeName.indexOf('优软商城') > -1) || ''
+      }
+    },
+    methods: {
+      closeAlert() {
+        this.showDrop = ''
+      },
+      changeBreakUp() {
+        this.chooseItem.breakUp = !this.chooseItem.breakUp
+        this.minBuyQtyBlur()
+      },
+      showdropmenu(str) {
+        this.showDrop = str
+      },
+      // 选择销售方式
+      chooseStore(item) {
+        this.chooseItem.storeInfoOms = item
+        this.showDrop = ''
+      },
+      // 选择包装
+      choosePack(item) {
+        this.showDrop = ''
+        this.chooseItem.packaging = item
+      },
+      // 清空规格
+      deleteText(ty) {
+        if (ty === 'spec') {
+          this.chooseItem.spec = ''
+        } else {
+          this.chooseItem.tag = ''
+        }
+      },
+      // 最低起订量失去焦点操作
+      minBuyQtyBlur() {
+        if (this.chooseItem.minPackQty <= 0) {
+          this.timeoutCount++
+          this.collectResult = '包装数必须是大于0的整数'
+          this.chooseItem.minPackQty = 1
+        } else if (this.chooseItem.minBuyQty <= 0) {
+          this.timeoutCount++
+          this.collectResult = '起订量必须是大于0的整数'
+          this.chooseItem.minBuyQty = 1
+        } else if (!this.chooseItem.breakUp && this.chooseItem.minBuyQty % this.chooseItem.minPackQty !== 0) {
+          this.timeoutCount++
+          this.collectResult = '不可拆卖时,起订量必须是包装数量的倍数'
+          if (this.chooseItem.minPackQty > this.chooseItem.minBuyQty) {
+            this.chooseItem.minBuyQty = this.chooseItem.minPackQty
+          } else {
+            this.chooseItem.minBuyQty = this.chooseItem.minBuyQty - this.chooseItem.minBuyQty % this.chooseItem.minPackQty
+          }
+        }
+        this.chooseItem.prices[0].start = this.chooseItem.minBuyQty
+      },
+      // 自定义标签失去焦点操作
+      tagBlur() {
+        if (!this.chooseItem.tag) {
+          this.timeoutCount++
+          this.collectResult = '自定义标签不能为空'
+        }
+      },
+      addPrice() {
+        if (this.chooseItem.prices.length === 3) {
+          this.timeoutCount++
+          this.collectResult = '价格梯度最多只能有三个分段'
+          return false
+        }
+        let copy = Object.assign({}, this.chooseItem.prices[this.chooseItem.prices.length - 1], {
+          end: ''
+        })
+        this.chooseItem.prices[this.chooseItem.prices.length - 1] = copy
+        this.chooseItem.prices.push({
+          end: '',
+          rMBNTPrice: '',
+          rMBPrice: '',
+          start: ''
+        })
+      },
+      miuPrice(index) {
+        if (index === 0) {
+          if (this.chooseItem.prices.length === 3) {
+            this.chooseItem.prices[0].rMBPrice = this.chooseItem.prices[1].rMBPrice
+            this.chooseItem.prices[0].end = this.chooseItem.prices[1].end
+            this.chooseItem.prices[1].start = this.chooseItem.prices[2].start
+            this.chooseItem.prices[1].rMBPrice = this.chooseItem.prices[2].rMBPrice
+            this.chooseItem.prices[1].end = '9999999999'
+            this.chooseItem.prices.splice(2, 1)
+          } else {
+            index++
+            this.chooseItem.prices[0].rMBPrice = this.chooseItem.prices[1].rMBPrice
+            this.chooseItem.prices[0].end = '9999999999'
+            this.chooseItem.prices.splice(index, 1)
+          }
+        } else if (index === 1) {
+          if (this.chooseItem.prices.length === 3) {
+            this.chooseItem.prices[1].rMBPrice = this.chooseItem.prices[2].rMBPrice
+            this.chooseItem.prices[1].end = '9999999999'
+            this.chooseItem.prices.splice(2, 1)
+          } else {
+            this.chooseItem.prices[0].end = '9999999999'
+            this.chooseItem.prices.splice(index, 1)
+          }
+        } else {
+          this.chooseItem.prices[1].end = '9999999999'
+          this.chooseItem.prices.splice(index, 1)
+        }
+        console.log(this.chooseItem.prices)
+      },
+      // 开始价格阶段失去焦点
+      startpriceBlur(item, index) {
+        if (index > 0) {
+          if (item.start === '' || toString(item.start).trim() === '') {
+            return false
+          } else if (Math.abs(item.start) <= Math.abs(this.chooseItem.prices[index - 1].start)) {
+            this.timeoutCount++
+            this.collectResult = '输入值会导致梯度重叠,请重新修改'
+            item.start = ''
+            return false
+          }
+          if (index === 2) {
+            this.chooseItem.prices[index - 1].end = item.start - 1
+            return false
+          }
+          if (item.end && toString(item.end).trim() !== '' && Math.abs(item.start) > Math.abs(item.end)) {
+            this.timeoutCount++
+            this.collectResult = `输入值必须小于${item.end}`
+            item.start = ''
+            return false
+          }
+          this.chooseItem.prices[index - 1].end = item.start - 1
+          console.log(this.chooseItem.prices)
+        }
+      },
+      // 结束价格阶段失去焦点
+      endpriceBlur(item, index) {
+        console.log(index === 1)
+        console.log(Math.abs(item.end) + 1 <= Math.abs(item.start))
+        if (item.end === '') {
+          return false
+        } else if (index === 1 && Math.abs(item.end) + 1 >= Math.abs(item.start)) {
+        } else if (Math.abs(item.end) + 1 <= Math.abs(item.start)) {
+          this.timeoutCount++
+          this.collectResult = `输入值不能小于${item.start}`
+          item.end = ''
+          return false
+        } else if (this.chooseItem.prices[index + 1].start !== '' && toString(this.chooseItem.prices[index + 1].start).trim() !== '' && Math.abs(item.end) + 1 > Math.abs(this.chooseItem.prices[index + 1].start)) {
+          this.timeoutCount++
+          this.collectResult = `输入值不能大于${this.chooseItem.prices[index + 1].start - 1}`
+          item.end = ''
+          return false
+        } else if (this.chooseItem.prices[index + 1].end !== '' && toString(this.chooseItem.prices[index + 1].end).trim() !== '' && Math.abs(item.end) + 1 > Math.abs(this.chooseItem.prices[index + 1].end)) {
+          this.timeoutCount++
+          this.collectResult = `输入值不能大于${this.chooseItem.prices[index + 1].end}`
+          item.end = ''
+          return false
+        }
+        this.chooseItem.prices[index + 1].start = Math.abs(item.end) + 1
+        console.log(this.chooseItem.prices)
+      },
+      // 交期失去焦点
+      minDeliveryBlur() {
+        if (this.chooseItem.minDelivery > this.chooseItem.maxDelivery) {
+          this.timeoutCount++
+          this.collectResult = `最短交期应小于等于最长交期`
+          this.chooseItem.maxDelivery = ''
+        }
+      },
+      // 单价失去焦点
+      rMBPriceBlur(item) {
+        if (!/^[0-9]+([.]{1}[0-9]+)?$/.test(item.rMBPrice)) {
+          this.timeoutCount++
+          this.collectResult = '单价只能输入数字'
+          return false
+        }
+        item.rMBPrice = item.rMBPrice.toString()
+        let splits = item.rMBPrice.split('.')
+        if (splits[0].length >= 4) {
+          splits[0] = splits[0].substr(0, 4)
+          item.rMBPrice = splits[0]
+        }
+        if (splits[1]) {
+          item.rMBPrice = splits[0] + '.' + splits[1]
+        }
+        if (splits[1] && splits[1].length > 6) {
+          splits[1] = splits[1].substr(0, 7)
+          let str = splits[1].substr(0, 6)
+          if (splits[1][splits[1].length - 1] >= 5) {
+            str = splits[1].substr(0, 6)
+            str = Math.abs(str) + 1
+          }
+          item.rMBPrice = splits[0] + '.' + Math.ceil(str)
+        }
+      },
+      // 保存
+      save() {
+        // else if (!/^\d{4}[-/]\d{2}[-/]\d{2}$/.test(this.chooseItem.produceDate)) {
+        //     this.timeoutCount++
+        //     this.collectResult = '请输入正确的生产日期'
+        //     return false
+        //   }
+        if (!this.chooseItem.reserve && toString(this.chooseItem.reserve).trim()) {
+          this.timeoutCount++
+          this.collectResult = '库存不能为空'
+          return false
+        } else if (!/^\d{1,9}$/.test(this.chooseItem.reserve)) {
+          this.timeoutCount++
+          this.collectResult = '库存只能输入数字'
+          return false
+        } else if (!/^\d{1,6}$/.test(this.chooseItem.minPackQty)) {
+          this.timeoutCount++
+          this.collectResult = '最小包装数只能输入数字'
+          return false
+        } else if (this.chooseItem.minPackQty && !toString(this.chooseItem.minPackQty).trim()) {
+          this.timeoutCount++
+          this.collectResult = '最小包装数不能为空'
+          return false
+        } else if (!/^\d{1,6}$/.test(this.chooseItem.minBuyQty)) {
+          this.timeoutCount++
+          this.collectResult = '最小起订量只能输入数字'
+          return false
+        } else if (this.chooseItem.minBuyQty && !toString(this.chooseItem.minBuyQty).trim()) {
+          this.timeoutCount++
+          this.collectResult = '最小起订量不能为空'
+          return false
+        } else if (!this.chooseItem.tag) {
+          this.timeoutCount++
+          this.collectResult = '自定义标签不能为空'
+          return false
+        } else if (!this.chooseItem.produceDate) {
+          this.timeoutCount++
+          this.collectResult = '请填写生产日期'
+          return false
+        } else if (!this.chooseItem.minDelivery && !toString(this.chooseItem.minDelivery).trim()) {
+          this.timeoutCount++
+          this.collectResult = '请填写最小交期时间'
+          return false
+        } else if (!this.chooseItem.maxDelivery && !toString(this.chooseItem.maxDelivery).trim()) {
+          this.timeoutCount++
+          this.collectResult = '请填写最大交期时间'
+          return false
+        } else if (!this.chooseItem.minDelivery || !this.chooseItem.maxDelivery) {
+          this.timeoutCount++
+          this.collectResult = '交期不能为空'
+          return false
+        } else if (!/^\d{1,3}$/.test(this.chooseItem.minDelivery) || !/^\d{1,3}$/.test(this.chooseItem.maxDelivery)) {
+          this.timeoutCount++
+          this.collectResult = '交期只能输入数字'
+          return false
+        } else {
+          let isHas = false
+          for (let i = 0; i < this.chooseItem.prices.length; i++) {
+            if (!this.chooseItem.prices[i].start || (this.chooseItem.prices[i].end === '' && i !== this.chooseItem.prices.length - 1)) {
+              this.timeoutCount++
+              this.collectResult = '分段数量必须填写'
+              isHas = true
+              break
+            } else if (i !== this.chooseItem.prices.length - 1 && Math.abs(this.chooseItem.prices[i].start) > Math.abs(this.chooseItem.prices[i].end)) {
+              this.timeoutCount++
+              this.collectResult = '存在分段的起始值大于分段的结束值'
+              isHas = true
+              break
+            } else if (Math.abs(this.chooseItem.prices[i].rMBPrice) <= 0) {
+              this.timeoutCount++
+              this.collectResult = '单价必须是大于0的数字'
+              isHas = true
+              break
+            } else if (!/^\d+$/.test(this.chooseItem.prices[i].start) || (this.chooseItem.prices[i].end !== '' && !/^\d+$/.test(this.chooseItem.prices[i].end))) {
+              this.timeoutCount++
+              this.collectResult = '分段数量必须是正整数'
+              isHas = true
+              break
+            } else if (!/^[0-9]+([.]{1}[0-9]{1,6})?$/.test(this.chooseItem.prices[i].rMBPrice)) {
+              console.log(this.chooseItem.prices[i].rMBPrice)
+              this.timeoutCount++
+              this.collectResult = '单价只能输入数字'
+              isHas = true
+              break
+            }
+          }
+          if (isHas === true) {
+            return false
+          }
+        }
+        this.chooseItem.selfSale = 2
+        if (this.storeInfoStore.uuid) {
+          if (this.chooseItem.storeInfoOms === '寄售') {
+            this.chooseItem.selfSale = 2
+          } else if (this.chooseItem.storeInfoOms === '自营') {
+            this.chooseItem.selfSale = 1
+          }
+        }
+        this.chooseItem.prices[this.chooseItem.prices.length - 1].end = '9999999999'
+        this.$http.put('/trade/goods', this.chooseItem).then(res => {
+          if (res.data.success) {
+            this.timeoutCount++
+            this.collectResult = '保存成功'
+            setTimeout(() => {
+              this.goLastPage()
+            }, 300)
+          } else {
+            this.timeoutCount++
+            this.collectResult = res.data.message
+          }
+        }, err => {
+          this.timeoutCount++
+          this.collectResult = err.response.data
+        })
+      }
+    }
+  }
+</script>
+
+<style lang="scss" scoped>
+  .productDetails {
+    background: #fff;
+    margin: .2rem 0.2rem 0;
+    padding: 0.9rem 0 0.5rem 0;
+    .product {
+      /*background: #fff;*/
+      /*margin: .2rem 0.2rem 0;*/
+      /*padding-bottom: 0.3rem;*/
+      /*max-height: 8rem;*/
+      /*overflow-y: auto;*/
+      .top {
+        height: 0.88rem;
+        line-height: 0.88rem;
+        border-bottom: 1px solid #d3d3d3;
+        margin: 0 0.24rem;
+        .icon {
+          width: 0.6rem;
+          height: 0.36rem;
+          line-height: 0.36rem;
+          margin-top: 0.27rem;
+          float: left;
+          background-size: 100%;
+          background-repeat: no-repeat;
+          margin-right: 0.12rem;
+          text-align: center;
+          &.istanded{
+            background-image: url('/images/mobile/@2x/istanded.png')
+          }
+          &.standed{
+            background-image: url('/images/mobile/@2x/standed.png')
+          }
+        }
+        .text {
+          font-size: 0.28rem;
+          color: #1a58dd;
+        }
+      }
+      .list {
+        &.over {
+          white-space: nowrap;
+          overflow: hidden;
+          text-overflow: ellipsis;
+        }
+        font-size: 0.28rem;
+        color: #333;
+        margin: 0 0.2rem 0;
+        border-bottom: 1px dotted #d3d3d3;
+        line-height: 0.84rem;
+        height: 0.84rem;
+        span.name {
+          color: #666;
+          margin-right: 0.1rem;
+        }
+        .pull-left {
+          width: 50%;
+        }
+        .progress-wrapper {
+          width: .68rem;
+          height: .32rem;
+          border-radius: 0.32rem;
+          position: relative;
+          display: inline-block;
+          vertical-align: top;
+          margin-left: 0.3rem;
+          margin-top: 0.26rem;
+          background: #c4c5c6;
+          .progress-btn {
+            position: absolute;
+            height: 0.28rem;
+            width: 0.28rem;
+            border-radius: 50%;
+            left: 0.01rem;
+            top: 0.01rem;
+            background: #fff;
+            box-shadow: 0 0 5px #000;
+          }
+          &.active {
+            background: #22ac38;
+            .progress-btn {
+              left: 0.37rem;
+            }
+          }
+        }
+        .input {
+          height: 0.5rem;
+          line-height: 0.5rem;
+          margin-top: 0.16rem;
+          border: 1px solid #d2d2d2;
+          border-radius: 2px;
+          text-indent: .12rem;
+        }
+        .specInput {
+          vertical-align: top;
+          display: inline-block;
+          width: 2.4rem;
+          text-indent: 0;
+          input {
+            width: 2.02rem;
+            color: #333;
+            font-size: .24rem;
+            height: 0.46rem;
+            vertical-align: top;
+            text-indent: 0.12rem;
+          }
+          img {
+            width: 0.32rem;
+            height: 0.32rem;
+            vertical-align: top;
+            margin-top: 0.06rem;
+            display: inline-block;
+          }
+        }
+        .dateInput {
+          vertical-align: top;
+          display: inline-block;
+          width: 2rem;
+        }
+        .reserveInput {
+          width: 1.4rem;
+        }
+        .minBuyQtyInput {
+          width: 1.26rem;
+        }
+        .minPackQtyInput {
+          width: 1.56rem;
+        }
+        .startInput, .endInput {
+          text-indent: 0;
+          text-align: center;
+          width: 1rem;
+        }
+        .selectInput {
+          display: inline-block;
+          position: relative;
+          vertical-align: top;
+          height: 0.5rem;
+          line-height: 0.5rem;
+          margin-top: 0.18rem;
+          border: 1px solid #d2d2d2;
+          border-radius: 2px;
+          width: 2.4rem;
+          text-indent: 0.12rem;
+          img {
+            position: absolute;
+            width: 0.17rem;
+            height: 0.11rem;
+            right:0.1rem;
+            top: 0.17rem;
+          }
+          &.selectInput2 {
+            width: 1.56rem;
+          }
+          span {
+            height: 0.5rem;
+            line-height: 0.5rem;
+            display: block;
+          }
+          ul {
+            position: absolute;
+            left: 0;
+            top: .5rem;
+            z-index: 12;
+            width: 100%;
+            max-height: 3rem;
+            overflow-y: auto;
+            display: none;
+            li {
+              text-indent: 0px;
+              width: 100%;
+              background: #666;
+              color: rgba(255, 255, 255, 0.89);
+              text-align: center;
+              font-size: .3rem;
+            }
+            &.active {
+              display: block;
+            }
+          }
+        }
+        .labelInput {
+          display: inline-block;
+          vertical-align: top;
+          width: 5.1rem;
+          text-indent: 0;
+          input {
+            width: 4.7rem;
+            color: #333;
+            font-size: .24rem;
+            height: 0.44rem;
+            vertical-align: top;
+            text-indent: 0.12rem;
+          }
+          img {
+            vertical-align: top;
+            display: inline-block;
+            margin-top: 0.06rem;
+            height: 0.32rem;
+            width: 0.32rem;
+          }
+        }
+      }
+      .pscList-top {
+        margin: 0 0.2rem 0;
+        height: 0.5rem;
+        line-height: 0.5rem;
+        background: #e5e5e5;
+        font-size: 0.28rem;
+        color: #666;
+        border-radius: 3px;
+        .pull-left {
+          margin-left: 0.2rem
+        }
+        .pull-right {
+          margin-right: 0.2rem
+        }
+      }
+      ul.prices{
+        margin: 0.2rem 0.2rem 0;
+        padding-bottom: 0.2rem;
+        .clearfix {
+          margin-bottom: 0.14rem;
+          font-size: 0.24rem;
+          color: #666;
+          .priceM {
+            width: 1.6rem;
+            height: 0.5rem;
+            border: 1px solid #d2d2d2;
+            text-align: center;
+            line-height: 0.5rem;
+            border-radius: 3px;
+          }
+          span {
+            width: 0.34rem;
+            height: 0.34rem;
+            margin-top: 0.08rem;
+            display: inline-block;
+            vertical-align: top;
+            &:nth-of-type(1){
+              margin: 0.08rem 0.2rem 0;
+            }
+            img {
+              width: 100%;
+            }
+          }
+          .firstNumber {
+            width: 0.4rem;
+            background: #eeeeee !important;
+            height: 0.5rem;
+            border:1px solid #d2d2d2;
+            border-radius: 3px;
+            line-height: 0.5rem;
+            text-align: center;
+            font-size: 0.24rem;
+          }
+          .otherNumber {
+            width: 1.6rem;
+            background: #fff;
+            height: 0.5rem;
+            border:1px solid #d2d2d2;
+            border-radius: 3px;
+            line-height: 0.5rem;
+            text-align: center;
+            font-size: 0.24rem;
+          }
+        }
+      }
+      .button {
+        margin: 0rem 0.2rem 0;
+        div{
+          width: 3.2rem;
+          height: 0.62rem;
+          color: #fff;
+          border-radius: 5px;
+          text-align: center;
+          line-height: 0.62rem;
+          font-size: 0.3rem;
+        }
+        .save {
+          background: #3f84f6;
+        }
+        .cancel {
+          background: #b5b5b5
+        }
+      }
+    }
+  }
+</style>

+ 9 - 22
pages/mobile/center/vendor/seek.vue

@@ -6,6 +6,11 @@
   export default {
     layout: 'mobileNoHeader',
     middleware: 'authenticated',
+    data () {
+      return {
+        activeType: 'all'
+      }
+    },
     fetch ({ store, query }) {
       let user = store.state.option.user.data
       let params = {
@@ -16,7 +21,7 @@
         params.enuu = user.enterprise.uu
         params.useruu = user.userUU
         return Promise.all([
-          store.dispatch('applyPurchase/loadVendorPushList', params)
+          store.dispatch('applyPurchase/loadVendorEnPushList', params)
         ])
       } else {
         params._state = 'done'
@@ -35,25 +40,20 @@
     components: {
       Seek
     },
-    computed: {
-      seekType () {
-        return this.$route.query.seekType
-      }
-    },
     methods: {
-      reloadData: function (page = 1, count = 10, keyword) {
+      reloadData: function (page = 1, count = 10, keyword, seekType, activeType = 'all') {
         let store = this.$store
         let user = store.state.option.user.data
         let params = {
           pageNumber: page,
           pageSize: count
         }
-        if (this.seekType === 'wait') {
+        if (seekType === 'wait') {
           params.enuu = user.enterprise.uu
           params.useruu = user.userUU
           params.keyword = keyword
           return Promise.all([
-            store.dispatch('applyPurchase/loadVendorPushList', params)
+            store.dispatch(`applyPurchase/${activeType === 'all' ? 'loadVendorEnPushList' : 'loadVendorPushList'}`, params)
           ])
         } else {
           params._state = 'done'
@@ -72,16 +72,3 @@
     }
   }
 </script>
-<style lang="scss" scoped>
-  .search-content {
-    text-align: center;
-    padding: .25rem 0 0 0;
-    input {
-      border: 1px solid #376ff3;
-    }
-    span {
-      height: .46rem;
-      line-height: .46rem;
-    }
-  }
-</style>

+ 430 - 0
pages/mobile/product/_batchCode.vue

@@ -0,0 +1,430 @@
+<template>
+  <div class="mobile-content commodity-detail">
+    <div class="logo-wrap">
+      <img :src="commodity.img || '/images/store/common/default.png'" alt="">
+    </div>
+    <div class="content-wrap">
+      <div class="content-line cl-title">
+        <span class="code text-ellipse inline-block">{{commodity.code}}</span>
+        <div class="focus-wrap inline-block" :class="{'active': isFocus}">
+          <i class="iconfont icon-shoucang" @click="collectStore"></i>
+          <span>店铺关注</span>
+        </div>
+      </div>
+      <div class="content-line cl-price1">
+        <div class="fl">
+          <p class="price-tag">价格:</p>
+          <span>数量:</span>
+        </div>
+        <ul>
+          <li class="text-ellipse inline-block price-level" v-for="price in priceLevel1">
+            <p><span>{{isRMB ? '¥' : '$'}}</span>
+              {{isRMB ? price.rMBPrice : price.uSDPrice}}
+            </p>
+            <span>{{price.start}}+</span>
+          </li>
+        </ul>
+        <i :class="`iconfont icon-arrow-${isMore ? 'up' : 'down'}`" @click="isMore = !isMore" v-if="priceLevel2.length"></i>
+      </div>
+      <div class="content-line cl-price2" v-if="priceLevel2.length && isMore">
+        <ul>
+          <li class="text-ellipse inline-block price-level" v-for="price in priceLevel2">
+            <p><span>$</span>159.00</p>
+            <span>1+</span>
+          </li>
+        </ul>
+      </div>
+      <div class="content-line link cl-price2">
+        <ul>
+          <nuxt-link :to="`/mobile/shop/${storeInfo.uuid}`" tag="li" class="text-ellipse inline-block price-level">
+            <i class="iconfont icon-shouye-copy"></i>
+            <p>店铺</p>
+          </nuxt-link>
+          <li class="text-ellipse inline-block price-level" @click="showStoreInfo = true">
+            <i class="iconfont icon-kefu1"></i>
+            <p>联系卖家</p>
+          </li>
+          <li class="text-ellipse inline-block price-level active" @click="goAttach(component.attach)">
+            <i class="iconfont icon-pdf"></i>
+            <p>数据手册</p>
+          </li>
+        </ul>
+      </div>
+    </div>
+    <div class="item-wrap">
+      <p>产品信息</p>
+      <div class="com-info">
+        <span class="name">品牌</span>:<span v-text="commodity.brandNameEn"></span>
+      </div>
+      <div class="com-info">
+        <span class="name no-letter">类目(产品名称)</span>:<span v-text="commodity.kindNameCn || '无类目信息'"></span>
+      </div>
+      <div class="com-info">
+        <span class="name">规格</span>:<span v-text="commodity.spec || '无规格信息'"></span>
+      </div>
+      <div class="com-info">
+        <span class="name">包装</span>:<span v-text="commodity.packaging || '无包装信息'"></span>
+      </div>
+      <div class="com-info">
+        <span class="name">最小包装数</span>:<span v-text="commodity.minPackQty || '无最小包装数信息'"></span>
+      </div>
+      <div class="com-info">
+        <span class="name">库存</span>:<span v-text="commodity.reserve || 0"></span><em style="margin-left: 3px;">PCS</em>
+        (<span v-text="commodity.minBuyQty || 1"></span>个起订)
+        <span class="can-div-sell" v-if="commodity.breakUp">可拆卖</span>
+      </div>
+      <div class="com-info">
+        <span class="name">交期</span>:
+        <div class="delivery inline-block">
+          <span v-text="commodity.b2cMinDelivery || 0"></span>
+          <span v-if="commodity.b2cMaxDelivery && commodity.b2cMaxDelivery !== commodity.b2cMinDelivery">-</span>
+          <span v-if="commodity.b2cMaxDelivery && commodity.b2cMaxDelivery !== commodity.b2cMinDelivery" v-text="commodity.b2cMaxDelivery || 0"></span>
+          <span>(天)</span>
+        </div>
+      </div>
+    </div>
+    <div class="params-wrap">
+      <p>产品参数</p>
+      <ul v-if="component.properties && component.properties.length">
+        <li v-for="prop in component.properties" v-if="prop.property">
+          <span class="inline-block text-ellipse" v-text="prop.property.labelCn"></span>
+          <span class="inline-block text-ellipse" v-text="prop.value || '—'"></span>
+        </li>
+      </ul>
+      <div class="com-none-state" v-else>
+        <p>卖家上传的产品暂无参数,请 <b @click="showStoreInfo = true">联系卖家</b> 了解具体详情</p>
+      </div>
+    </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="checkInfo(storeInfo.enterprise.enAddress)">商家地址:{{storeInfo.enterprise.enAddress}}</div>
+-->
+          <!--<div class="content-line link-url">在线咨询</div>-->
+          <div v-if="checkInfo(storeInfo.enterprise.enTel)">致电:<a :href="'tel:' + storeInfo.enterprise.enTel" target="_blank" class="content-line link-url">{{storeInfo.enterprise.enTel}}</a></div>
+<!--
+          <div v-if="checkInfo(storeInfo.enterprise.enEmail)">邮件:<a :href="'mailto:' + storeInfo.enterprise.enEmail" target="_blank" class="content-line link-url">{{storeInfo.enterprise.enEmail}}</a></div>
+-->
+        </div>
+      </div>
+    </div>
+    <remind-box :title="remindText" :timeoutCount="remindCount"></remind-box>
+    <login-box @onLoginBoxClose="showLoginBox = false" v-if="showLoginBox" :url="url"></login-box>
+  </div>
+</template>
+<script>
+  import {RemindBox, LoginBox} from '~components/mobile/common'
+  export default {
+    layout: 'mobile',
+    fetch({ store, route }) {
+      return Promise.all([
+        store.dispatch('shop/findCommodityOnBatchInfo', route.params)
+      ])
+    },
+    components: {
+      RemindBox,
+      LoginBox
+    },
+    data () {
+      return {
+        isMore: false,
+        showStoreInfo: false,
+        remindText: '',
+        remindCount: 1,
+        url: '',
+        showLoginBox: false
+      }
+    },
+    computed: {
+      commodity () {
+        return this.$store.state.shop.storeInfo.commodity.data
+      },
+      isRMB () {
+        return this.commodity.currencyName === 'RMB'
+      },
+      commodityPrices () {
+        return this.commodity.prices
+      },
+      priceLevel1 () {
+        return this.commodityPrices.length > 3 ? this.commodityPrices.slice(0, 3) : this.commodityPrices
+      },
+      priceLevel2 () {
+        return this.commodityPrices.length > 3 ? this.commodityPrices.slice(3, this.commodityPrices.length) : []
+      },
+      isFocus () {
+        // console.log(this.$store.state.shop.storeInfo)
+        return this.$store.state.shop.storeInfo.focusList.data === 'true'
+      },
+      storeInfo () {
+        return this.$store.state.shop.storeInfo.store.data
+      },
+      component () {
+        return this.$store.state.shop.storeInfo.component.data
+      }
+    },
+    methods: {
+      checkInfo: function (str) {
+        return str && str.trim() !== ''
+      },
+      goAttach: function (url) {
+        if (this.user.logged) {
+          if (url && url !== '1') {
+            window.open(url)
+//            window.location.href = url
+          } else {
+            if (!url) {
+              this.onRemind('该产品暂无数据手册')
+            } else {
+              this.onRemind('数据手册地址错误')
+            }
+          }
+        } else {
+          this.url = this.$route.fullPath
+          this.showLoginBox = true
+        }
+      },
+      collectStore: function () {
+        if (this.user.logged) {
+          if (!this.isFocus) {
+            this.$store.dispatch('shop/StoreFocus', {storeName: this.storeInfo.storeName, storeid: this.storeInfo.id})
+              .then(response => {
+                this.$store.dispatch('shop/StoreFocusList', {id: this.storeInfo.id})
+                this.onRemind('关注成功')
+              })
+          } else {
+            this.$http.post('/trade/storeFocus/delete/storeId', [this.storeInfo.id])
+              .then(response => {
+                this.$store.dispatch('shop/StoreFocusList', {id: this.storeInfo.id})
+                this.onRemind('取消成功')
+              })
+          }
+        } else {
+          this.url = this.$route.fullPath
+          this.showLoginBox = true
+        }
+      },
+      onRemind: function (str) {
+        this.remindText = str
+        this.remindCount++
+      }
+    }
+  }
+</script>
+<style lang="scss" scoped>
+  .commodity-detail {
+    .logo-wrap {
+      height: 5.18rem;
+      line-height: 5.18rem;
+      background: #fff;
+      text-align: center;
+      img {
+       /* border: .01rem solid #ccc;*/
+        max-width: 4.06rem;
+        max-height: 3.27rem;
+      }
+    }
+    .content-wrap {
+      -webkit-box-shadow: 0 -2px 7px 0 rgba(143, 141, 141, 0.25);
+      -moz-box-shadow: 0 -2px 7px 0 rgba(143, 141, 141, 0.25);
+      box-shadow: 0 -2px 7px 0 rgba(143, 141, 141, 0.25);
+      border-bottom: .1rem solid #f4f4f4;
+      .content-line {
+        height: 1.04rem;
+        border-bottom: .01rem solid #d9d9d9;
+        &.cl-title {
+          padding: .14rem 0 .14rem .2rem;
+          .code {
+            font-size: .3rem;
+            font-weight: bold;
+            width: 6.22rem;
+            padding-right: .3rem;
+            border-right: .01rem solid #e1e1e1;
+            line-height: .76rem;
+          }
+          .focus-wrap {
+            width: .9rem;
+            text-align: center;
+            margin-left: .15rem;
+            i {
+              font-size: .4rem;
+              display: block;
+              color: #dddddd;
+            }
+            span {
+              font-size: .2rem;
+            }
+            &.active {
+              i {
+                color: #ff7803;
+              }
+            }
+          }
+        }
+        .price-level {
+          text-align: center;
+          font-size: .24rem;
+          border-right: .01rem solid #b0b0b0;
+          &:last-child {
+            border-right: none;
+          }
+          p {
+            font-size: .38rem;
+            color: #f42d29;
+            overflow: hidden;
+            text-overflow: ellipsis;
+            white-space: nowrap;
+            max-width: 1.88rem;
+            margin: 0 auto;
+            span {
+              font-size: .22rem;
+            }
+          }
+        }
+        &.cl-price1 {
+          padding: .1rem .18rem 0;
+          .fl {
+            font-size: .24rem;
+            text-align: center;
+            margin-top: .08rem;
+            .price-tag {
+              width: .69rem;
+              height: .34rem;
+              line-height: .34rem;
+              text-align: center;
+              background: #f42d29;
+              border-radius: .1rem;
+              color: #fff;
+              margin: .02rem 0 .06rem;
+            }
+          }
+          ul {
+            display: inline-block;
+            li {
+              width: 1.96rem;
+            }
+          }
+          i {
+            font-size: .32rem;
+          }
+        }
+        &.cl-price2 {
+          padding-top: .1rem;
+          ul {
+            text-align: center;
+            li {
+              width: 2.83rem;
+            }
+          }
+        }
+        &.link {
+          padding-top: .18rem;
+          ul {
+            li {
+              width: 33%;
+              &.active {
+                i {
+                  color: #d81e06;
+                }
+              }
+            }
+            i {
+              font-size: .39rem;
+              &.icon-kefu1 {
+                font-size: .44rem;
+                position: relative;
+                top: -.05rem;
+                color: #ff6000;
+                & + p {
+                  margin-top: -.07rem;
+                }
+              }
+              &.icon-shouye-copy {
+                color: #3f84f6;
+              }
+            }
+            p {
+              font-size: .2rem;
+              color: #333;
+            }
+          }
+        }
+      }
+    }
+    .params-wrap {
+      background: #fff;
+      padding: .29rem .23rem;
+      p {
+        font-size: .26rem;
+        text-align: center;
+        margin-bottom: .24rem;
+      }
+      ul {
+        border-left: .01rem solid #d9d9d9;
+        border-top: .01rem solid #d9d9d9;
+        background: #fff;
+        font-size: .24rem;
+        li {
+          border-bottom: .01rem solid #d9d9d9;
+          span {
+            border-right: .01rem solid #d9d9d9;
+            height: .67rem;
+            line-height: .67rem;
+            text-align: center;
+            padding: 0 .15rem;
+            &:first-child {
+              width: 50%;
+            }
+            &:last-child {
+              width: 50%;
+              text-align: left;
+            }
+          }
+        }
+      }
+    }
+    .item-wrap {
+      padding: .3rem 0;
+      border-bottom: .1rem solid #f4f4f4;
+      p {
+        font-size: .26rem;
+        text-align: center;
+        margin-bottom: .24rem;
+        font-weight: bold;
+      }
+      .com-info {
+        padding-left: .5rem;
+        padding-right: .2rem;
+        line-height: .5rem;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+        .name {
+          color: #666;
+        }
+        .can-div-sell {
+          font-size: 0.18rem;
+          margin-left: 0.1rem;
+          display: inline-block;
+          height: .3rem;
+          line-height: .3rem;
+          width: .7rem;
+          text-align: center;
+          background: #3f84f6;
+          color: #fff;
+          font-weight: bold;
+          border-radius: 3px;
+        }
+      }
+    }
+  }
+  .com-none-state {
+    padding: .2rem 0;
+    background: transparent;
+    b {
+      color: #3c7cf5;
+      font-weight: normal;
+    }
+  }
+</style>

+ 12 - 6
pages/mobile/search/_keycode.vue

@@ -32,7 +32,7 @@
 
     <div v-if="searchLists && searchLists.length > 0" >
       <div class="detail-brand" v-for="(item, index) in searchLists" :style="index == 0 ? 'padding-top: .2rem;' : ''" v-if="item">
-        <div class="brand-item" @click="goComponent(item.uuid)">
+        <div class="brand-item" @click="goComponent(item)">
           <p>商家名称:<span>{{item.storeName || '-'}}</span></p>
           <p>品牌:<span>{{item.brandEn || item.brand.nameCn || '-'}}</span></p>
           <p>类目(产品名称):<span>{{item.kind ? item.kind.nameCn : '-'}}</span></p>
@@ -191,13 +191,19 @@
           this.showLoginBox = true
         }
       },
-      goComponent: function (uuid) {
+      goComponent: function (item) {
         if (!this.isClickCollect) {
-          if (uuid) {
-            this.$router.push('/mobile/brand/componentDetail/' + uuid)
+//          if (uuid) {
+//            this.$router.push('/mobile/brand/componentDetail/' + uuid)
+//          } else {
+//            this.collectResult = '卖家上传的产品暂无参数,请联系卖家了解具体详情。'
+//            this.timeoutCount++
+//          }
+          if (item.batchCode) {
+            this.$router.push('/mobile/product/' + item.batchCode)
           } else {
-            this.collectResult = '卖家上传的产品暂无参数,请联系卖家了解具体详情。'
-            this.timeoutCount++
+            this.collectResult = '产品参数错误'
+            this.timeoutCount ++
           }
         } else {
           this.isClickCollect = false

+ 5 - 5
pages/mobile/shop/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <search-header @searchAction="onSearch" :outerKeyword="keyword" :placeholder="'可通过品牌/类目/型号/名称查找店铺'"></search-header>
+    <search-header @searchAction="onSearch" :outerKeyword="keyword" :placeholder="'品牌/类目/型号/店铺'"></search-header>
     <div class="shop mobile-content">
       <div class="shop-top">
         <p><i class="iconfont icon-dianpu1"></i><span>{{list.totalElements || 0}}</span>家店铺</p>
@@ -39,13 +39,13 @@
       <remind-box :title="collectResult" :timeoutCount="timeoutCount"></remind-box>
       <loading v-show="isSearchingMore"></loading>
       <div class="mobile-modal" v-if="showStoreInfo" @touchmove="preventTouchMove($event)">
-        <div class="mobile-modal-box">
+        <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="checkInfo(enterpriseInfo.enAddress || enterpriseInfo.address)">商家地址:{{enterpriseInfo.enAddress || enterpriseInfo.address}}</div>
+            <!--<div v-if="checkInfo(enterpriseInfo.enAddress || enterpriseInfo.address)">商家地址:{{enterpriseInfo.enAddress || enterpriseInfo.address}}</div>-->
             <!--<div class="content-line link-url">在线咨询</div>-->
             <div v-if="checkInfo(enterpriseInfo.enTel)">致电:<a :href="'tel:' + enterpriseInfo.enTel" target="_blank" class="content-line link-url">{{enterpriseInfo.enTel}}</a></div>
-            <div v-if="checkInfo(enterpriseInfo.enEmail)">邮件:<a :href="'mailto:' + enterpriseInfo.enEmail" target="_blank" class="content-line link-url">{{enterpriseInfo.enEmail}}</a></div>
+            <!--<div v-if="checkInfo(enterpriseInfo.enEmail)">邮件:<a :href="'mailto:' + enterpriseInfo.enEmail" target="_blank" class="content-line link-url">{{enterpriseInfo.enEmail}}</a></div>-->
           </div>
         </div>
       </div>
@@ -197,7 +197,7 @@
             this.$http.post('/trade/storeFocus/save', {storeName: item.storeName, storeid: item.id})
               .then(response => {
                 item.isFocus = 'true'
-                this.collectResult = '收藏成功'
+                this.collectResult = '关注成功'
                 this.timeoutCount++
               })
           } else {

+ 19 - 19
pages/mobile/user/enterpriseinfo.vue

@@ -103,7 +103,7 @@
                 </div>
               </li>
 
-              <li class="clearfix" :class="{border:  storeState !== 'look'}">
+            <!--  <li class="clearfix" :class="{border:  storeState !== 'look'}">
                 <div class="name pull-left" :class="{update: storeState !== 'look'}">企业简介:</div>
                 <div class="text pull-left clearfix" v-if="storeState === 'look'">
                   {{Islook ? dealWithText(enterpriseInfo.description) : dealWithText()}}
@@ -117,7 +117,7 @@
                 <div class="text pull-left" v-else>
                   <textarea v-model="enterpriseInfo.description" maxlength="500" ref="descTextarea"></textarea>
                 </div>
-              </li>
+              </li>-->
 
             </ul>
           </div>
@@ -212,13 +212,13 @@
     components: {
       RemindBox
     },
-    watch: {
-      'enterpriseInfo.description': {
-        handler: function (val) {
-          this.setTextareaHeight()
-        }
-      }
-    },
+//    watch: {
+//      'enterpriseInfo.description': {
+//        handler: function (val) {
+//          this.setTextareaHeight()
+//        }
+//      }
+//    },
     methods: {
       chooseTitle(key) {
         if (key === 0) {
@@ -378,7 +378,7 @@
         this.storeState = 'update'
         this.Islook = true
         this.hidelook = true
-        this.setTextareaHeight()
+//        this.setTextareaHeight()
         this.BScroll.refresh()
       },
       dealWithText2(tp) {
@@ -444,16 +444,16 @@
         this.labelText = ''
         this.IsChange = ''
         this.AddBtnShow = true
-      },
-      setTextareaHeight () {
-        this.$nextTick(() => {
-          let el = this.$refs.descTextarea
-          if (el) {
-            el.style.height = '2rem'
-            el.style.height = (el.scrollHeight * 2.06 - el.clientHeight + 150) / 100 + 'rem'
-          }
-        })
       }
+//      setTextareaHeight () {
+//        this.$nextTick(() => {
+//          let el = this.$refs.descTextarea
+//          if (el) {
+//            el.style.height = '2rem'
+//            el.style.height = (el.scrollHeight * 2.06 - el.clientHeight + 150) / 100 + 'rem'
+//          }
+//        })
+//      }
     },
     computed: {
       enterprise() {

+ 36 - 17
pages/mobile/user/index.vue

@@ -7,19 +7,23 @@
       </p>
     </div>
     <div class="mobile-user mobile-fix-content">
-      <div class="line img-line">
+      <nuxt-link to="/mobile/user/info/personal" tag="div" class="line img-line">
         <div class="img-wrap">
-          <img src="/images/component/default.png" alt="">
+          <img :src="user.data.imageUrl ? user.data.imageUrl : '/images/component/default.png'" alt="" class="photo"/>
         </div>
         <span>{{user.data.userName}}</span>
-      </div>
+        <span class="tel">{{user.data.userTel}}</span>
+        <span class="edit" to="/mobile/user/info/personal">
+          <img src="/images/mobile/user/edit.png" alt=""/>
+        </span>
+      </nuxt-link>
       <div class="line" @click="showLogin=true">
         <div class="img-wrap">
           <img src="/images/mobile/user/icon_01.png" alt="">
         </div>
-        <span>公司</span>
+       <!-- <span>公司</span>-->
         <i class="iconfont icon-xiangyou"></i>
-        <span class="l-right">{{user.data.enterprise.enName}}</span>
+        <span class="l-right">{{currentEnName}}</span>
       </div>
       <div class="line" @click="go('/mobile/user/storeinfo')">
         <div class="img-wrap">
@@ -36,14 +40,14 @@
         <i class="iconfont icon-xiangyou"></i>
         <div class="border-line"></div>
       </div>
-      <nuxt-link to="/mobile/user/info/personal" tag="div" class="line block-line">
-        <div class="img-wrap">
-          <img src="/images/mobile/user/icon_04.png" alt="">
-        </div>
-        <span>个人信息</span>
-        <i class="iconfont icon-xiangyou"></i>
-        <div class="border-line"></div>
-      </nuxt-link>
+      <!--<nuxt-link to="/mobile/user/info/personal" tag="div" class="line block-line">-->
+        <!--<div class="img-wrap">-->
+          <!--<img src="/images/mobile/user/icon_04.png" alt="">-->
+        <!--</div>-->
+        <!--<span>个人信息</span>-->
+        <!--<i class="iconfont icon-xiangyou"></i>-->
+        <!--<div class="border-line"></div>-->
+      <!--</nuxt-link>-->
       <div @click="go('/mobile/user/info/admin')" class="line block-line">
         <div class="img-wrap">
           <img src="/images/mobile/user/icon_05.png" alt="">
@@ -68,7 +72,7 @@
           <p>公司选择 <i class="iconfont icon-guanbi1" @click="showLogin=false"></i></p>
           <ul>
             <li class="active" @click="switchEnterprise(user.data.enterprise)">
-              <a>{{ user.data.enterprise.enName }}</a>
+              <a>{{ currentEnName }}</a>
               <i class="iconfont icon-xuanzhong"></i>
             </li>
             <li
@@ -168,12 +172,24 @@
           max-width: .8rem;
           max-height: .8rem;
         }
+        img.photo {
+          width: 1.27rem;
+          height: 1.27rem;
+        }
+      }
+      span.edit img{
+        float: right;
+        margin-top: .43rem;
+        width: .3rem;
+        height: .3rem;
+      }
+      span.tel{
+        margin-left: .2rem;
       }
       .l-right {
         color: #666;
-        float: right;
         margin-right: .35rem;
-        max-width: 4.2rem;
+        max-width: 4.8rem;
         text-align: right;
         overflow: hidden;
         text-overflow: ellipsis;
@@ -277,7 +293,7 @@
   .modal-content {
     position: absolute;
     height: 5.32rem;
-    bottom: 0;
+    bottom: .98rem;
     left: 0;
     background: #fff;
     width: 100%;
@@ -308,6 +324,9 @@
         overflow: hidden;
         text-overflow: ellipsis;
         white-space: nowrap;
+        &:hover, &:active, &:focus {
+          background: #f7f7f7;
+        }
         a {
           display: inline-block;
           color: #666;

+ 3 - 3
pages/mobile/user/info/admin.vue

@@ -1,12 +1,12 @@
 <template>
-  <info :info="admin"></info>
+  <admin :info="admin"></admin>
 </template>
 <script>
-  import {Info} from '~components/mobile'
+  import Admin from '~components/mobile/user/Admin.vue'
   export default {
     layout: 'mobile',
     components: {
-      Info
+      Admin
     },
     fetch ({store}) {
       return Promise.all([

+ 1 - 1
pages/mobile/user/info/personal.vue

@@ -2,7 +2,7 @@
   <info :info="user.data"></info>
 </template>
 <script>
-  import {Info} from '~components/mobile'
+  import Info from '~components/mobile/user/Info.vue'
   export default {
     layout: 'mobile',
     components: {

+ 103 - 18
pages/mobile/user/storeinfo.vue

@@ -38,15 +38,39 @@
                   </div>
                 </li>
                 <li class="clearfix" :class="{border:  storeState !== 'look'}">
+                  <div class="name pull-left" :class="{update: storeState !== 'look'}">应用领域:</div>
+                  <div class="text pull-left clearfix" v-if="storeState === 'look'">
+                    {{storeInfo.storeApplication || '暂无信息'}}
+                  </div>
+                  <div class="text pull-left" v-else>
+                    <textarea v-model="storeInfo.storeApplication" maxlength="100" ref="applicationTextarea"></textarea>
+                  </div>
+                </li>
+                <li class="clearfix" :class="{border:  storeState !== 'look'}">
+                  <div class="name pull-left" :class="{update: storeState !== 'look'}">企业介绍:</div>
+                  <div class="text pull-left clearfix" v-if="storeState === 'look'">
+                    {{IsEnlook ? dealWithEnText(storeInfo.enterprise.description) : dealWithEnText()}}
+                    <a class="pull-right" @click="dealWithEnText2('open')" v-show="IsEnlook">
+                      全部<img src="/images/store/default/openblack.png"/>
+                    </a>
+                    <a class="pull-right upload" @click="dealWithEnText2('hide')" v-show="!hideEnlook">
+                      收起<img src="/images/store/default/openblack.png"/>
+                    </a>
+                  </div>
+                  <div class="text pull-left" v-else>
+                    <textarea v-model="storeInfo.enterprise.description" maxlength="500" ref="enTextarea"></textarea>
+                  </div>
+                </li>
+               <!-- <li class="clearfix" :class="{border:  storeState !== 'look'}">
                   <div class="name pull-left" :class="{update: storeState !== 'look'}">店铺地址:</div>
                   <div class="text pull-left" v-if="storeState === 'look'">
                     {{storeInfo.enterprise.address || '暂无信息'}}
                   </div>
                   <div class="text pull-left" v-else>
                     <textarea v-model="storeInfo.enterprise.address" maxlength="50" ref="addTextarea"></textarea>
-                    <!--<input v-model="storeInfo.enterprise.address" type="text" maxlength="50"/>-->
+                    &lt;!&ndash;<input v-model="storeInfo.enterprise.address" type="text" maxlength="50"/>&ndash;&gt;
                   </div>
-                </li>
+                </li>-->
                 <li class="clearfix" :class="{border:  storeState !== 'look'}">
                   <div class="name pull-left" :class="{update: storeState !== 'look'}">电话:</div>
                   <div class="text pull-left" v-if="storeState === 'look'">
@@ -134,6 +158,9 @@
         normalText: '', // 原来文本
         Islook: true,
         hidelook: true,
+        normalEnText: '', // 原来文本
+        IsEnlook: true,
+        hideEnlook: true,
         timeoutCount: 0,
         collectResult: ''
       }
@@ -144,11 +171,21 @@
           this.setTextareaHeight()
         }
       },
-      'storeInfo.enterprise.address': {
+//      'storeInfo.storeApplication': {
+//        handler: function (val) {
+//          this.setApplicationTextareaHeight()
+//        }
+//      },
+      'storeInfo.enterprise.description': {
         handler: function (val) {
-          this.setAddarea()
+          this.setEnTextareaHeight()
         }
       }
+//      'storeInfo.enterprise.address': {
+//        handler: function (val) {
+//          this.setAddarea()
+//        }
+//      }
     },
     methods: {
       setRemindText (str) {
@@ -163,8 +200,12 @@
         this.storeState = 'update'
         this.Islook = true
         this.hidelook = true
+        this.IsEnlook = true
+        this.hideEnlook = true
         this.setTextareaHeight()
-        this.setAddarea()
+        this.setApplicationTextareaHeight()
+        this.setEnTextareaHeight()
+//        this.setAddarea()
       },
       dealWithText2(tp) {
         if (tp === 'open') {
@@ -175,6 +216,15 @@
           this.hidelook = true
         }
       },
+      dealWithEnText2(tp) {
+        if (tp === 'open') {
+          this.IsEnlook = false
+          this.hideEnlook = false
+        } else {
+          this.IsEnlook = true
+          this.hideEnlook = true
+        }
+      },
       dealWithText(_T) {
         if (_T !== undefined) {
           // 文本处理
@@ -191,6 +241,22 @@
           return this.normalText && this.normalText.length ? this.normalText : '暂无信息'
         }
       },
+      dealWithEnText(_T) {
+        if (_T !== undefined) {
+          // 文本处理
+          this.normalEnText = _T
+          if (_T.length < 140) {
+            this.IsEnlook = false
+            return _T
+          } else {
+            this.IsEnlook = true
+            return _T.substr(0, 140) + '...'
+          }
+        } else {
+          this.IsEnlook = false
+          return this.normalEnText && this.normalEnText.length ? this.normalEnText : '暂无信息'
+        }
+      },
       storeInfosave(_tp) {
         this.BScroll.refresh()
         if (_tp === 'cancel') {
@@ -214,11 +280,11 @@
           this.timeoutCount++
           return false
         }
-        if (!this.storeInfo.enterprise.address || this.storeInfo.enterprise.address === '') {
-          this.collectResult = '企业地址不能为空'
-          this.timeoutCount++
-          return false
-        }
+//        if (!this.storeInfo.enterprise.description || this.storeInfo.enterprise.description === '') {
+//          this.collectResult = '企业介绍不能为空'
+//          this.timeoutCount++
+//          return false
+//        }
         if (!this.storeInfo.enterprise.enTel || this.storeInfo.enterprise.enTel === '' || !/^[\d-]{8,20}$/.test(this.storeInfo.enterprise.enTel)) {
           this.collectResult = '请输入正确的电话号码'
           this.timeoutCount++
@@ -248,7 +314,8 @@
           description: this.storeInfo.description,
           enterprise: this.storeInfo.enterprise,
           storeName: this.storeInfo.storeName,
-          storeShortName: this.storeInfo.storeShortName
+          storeShortName: this.storeInfo.storeShortName,
+          storeApplication: this.storeInfo.storeApplication
         }
         this.$http.put(`/store-service/stores/${this.storeInfo.uuid}?kind=BASIC_INFO`, kay).then(res => {
           this.collectResult = '保存成功'
@@ -270,18 +337,36 @@
           }
         })
       },
-      setAddarea () {
+      setApplicationTextareaHeight () {
         this.$nextTick(() => {
-          let el = this.$refs.addTextarea
+          let el = this.$refs.applicationTextarea
           if (el) {
-//            console.log(el.scrollHeight - el.clientHeight)
-//            console.log(el.clientHeight)
-//            console.log('-----------------')
-            el.style.height = '.6rem'
-            el.style.height = (el.scrollHeight * 2 - el.clientHeight + 25) / 100 + 'rem'
+            el.style.height = '2rem'
+            el.style.height = (el.scrollHeight * 2.06 - el.clientHeight + 150) / 100 + 'rem'
+          }
+        })
+      },
+      setEnTextareaHeight () {
+        this.$nextTick(() => {
+          let el = this.$refs.enTextarea
+          if (el) {
+            el.style.height = '2rem'
+            el.style.height = (el.scrollHeight * 2.06 - el.clientHeight + 150) / 100 + 'rem'
           }
         })
       },
+//      setAddarea () {
+//        this.$nextTick(() => {
+//          let el = this.$refs.addTextarea
+//          if (el) {
+// //            console.log(el.scrollHeight - el.clientHeight)
+// //            console.log(el.clientHeight)
+// //            console.log('-----------------')
+//            el.style.height = '.6rem'
+//            el.style.height = (el.scrollHeight * 2 - el.clientHeight + 25) / 100 + 'rem'
+//          }
+//        })
+//      },
       setBS () {
         if (this.BScroll) {
           this.BScroll.refresh()

+ 4 - 4
pages/mobile/wechat/index.vue

@@ -81,8 +81,8 @@
     },
     mounted() {
       this.$nextTick(() => {
-        let info = localStorage.getItem('USOFTMALLWECHATINFO')
-        this.$store.commit('option/REQUEST_WECHATINFO_STATUS_SUCCESS', JSON.parse(info))
+      // let info = localStorage.getItem('USOFTMALLWECHATINFO')
+      // this.$store.commit('option/REQUEST_WECHATINFO_STATUS_SUCCESS', JSON.parse(info))
         if (this.BScroll) {
           this.BScroll.refresh()
         } else {
@@ -149,11 +149,11 @@
     computed: {
       userName() {
         // return ''
-        return this.$store.state.option.wechatInfo.data.nickname
+        return this.wechatInfo.nickname
       },
       headerImg() {
         // return ''
-        return this.$store.state.option.wechatInfo.data.headimgurl
+        return this.wechatInfo.headimgurl
       },
       wechatInfo() {
         return this.$store.state.option.wechatInfo.data

+ 1 - 1
pages/mobile/wechat/toggle.vue

@@ -9,7 +9,7 @@
       this.$nextTick(() => {
         // this.$route.query.url
         window.location.href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxb3274b676737a319&redirect_uri=https://www.usoftmall.com${this.$route.query.url}&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`
-        // window.location.href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxd29bbca61728b189&redirect_uri=http://6fpbmx.natappfree.cc${this.$route.query.url}&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`
+        // window.location.href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxd29bbca61728b189&redirect_uri=http://yq43d5.natappfree.cc${this.$route.query.url}&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`
       })
     }
   }

+ 1 - 1
pages/provider/factories.vue

@@ -24,7 +24,7 @@ export default {
       store.dispatch('provider/loadSalesStore', { isOriginal: true }),
       store.dispatch('provider/loadNewStores', { types: 'ORIGINAL_FACTORY' }),
       store.dispatch('provider/loadRecommendOriginal', { types: 'ORIGINAL_FACTORY', num: 5 }),
-      store.dispatch('provider/findStoreList', { page: 1, count: 10, types: 'ORIGINAL_FACTORY' }),
+      store.dispatch('provider/findSimilarStoreList', { page: 1, count: 10, types: 'ORIGINAL_FACTORY' }),
       store.dispatch('loadStoreStatus', { op: 'check' })
     ])
   },

+ 1 - 1
pages/provider/list.vue

@@ -13,7 +13,7 @@ export default {
   fetch ({ store }) {
     return Promise.all([
       store.dispatch('provider/loadRecommendStores', { types: 'AGENCY-DISTRIBUTION', num: 5 }),
-      store.dispatch('provider/findStoreList', { page: 1, count: 10, types: 'AGENCY-DISTRIBUTION' })
+      store.dispatch('provider/findSimilarStoreList', { page: 1, count: 10, types: 'AGENCY-DISTRIBUTION' })
     ])
   },
   components: {

+ 7 - 0
plugins/mixin.js

@@ -41,6 +41,13 @@ Vue.mixin({
         }
         return cookieObj.type === 'erp'
       }
+    },
+    currentEnName () {
+      if (this.user.data.enterprise) {
+        return this.user.data.enterprise.uu ? this.user.data.enterprise.enName : this.user.data.userName + '(个人账户)'
+      } else {
+        return {}
+      }
     }
   },
   methods: {

BIN
static/images/mobile/@2x/brand-bg2.jpg


BIN
static/images/mobile/@2x/home/count1.jpg


BIN
static/images/mobile/@2x/home/count2.jpg


BIN
static/images/mobile/@2x/home/count3.jpg


BIN
static/images/mobile/@2x/home/count4.jpg


BIN
static/images/mobile/@2x/home/count5.jpg


BIN
static/images/mobile/@2x/home/count6.jpg


BIN
static/images/mobile/@2x/home/count7.jpg


BIN
static/images/mobile/@2x/home/count8.jpg


BIN
static/images/mobile/@2x/home/mobile-count.png


BIN
static/images/mobile/@2x/mobile-count.png


BIN
static/images/mobile/@2x/productDetail/desc-bg.png


BIN
static/images/mobile/center/accept.png


BIN
static/images/mobile/center/en.png


BIN
static/images/mobile/center/refuse-arrow-down.png


BIN
static/images/mobile/center/refuse-arrow-up.png


BIN
static/images/mobile/center/refuse.png


BIN
static/images/mobile/center/self.png


BIN
static/images/mobile/product/add_icon.png


BIN
static/images/mobile/product/close_icon.png


BIN
static/images/mobile/product/drop_icon.png


BIN
static/images/mobile/product/mui_icon.png


BIN
static/images/mobile/user/edit.png


BIN
static/images/mobile/user/icon_1.png


BIN
static/images/mobile/user/icon_2.png


BIN
static/images/mobile/user/icon_3.png


BIN
static/images/mobile/user/icon_4.png


+ 11 - 1
store/applyPurchase.js

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

+ 12 - 0
store/product/brand.js

@@ -10,6 +10,11 @@ export const state = () => ({
   brandPagerList: {
     fetching: false,
     data: []
+  },
+  // 编辑在售产品
+  onSaleDetails: {
+    fetching: false,
+    data: []
   }
 })
 
@@ -43,5 +48,12 @@ export const mutations = {
   },
   GET_BRANDS_PAGER_FAILURE (state) {
     state.brandPagerList.fetching = false
+  },
+  GET_ONSALE_DETAILS_SUCCESS (state, result) {
+    state.onSaleDetails.fetching = false
+    state.onSaleDetails.data = result
+  },
+  GET_ONSALE_DETAILS_FAILURE (state) {
+    state.onSaleDetails.fetching = false
   }
 }

+ 10 - 0
store/provider.js

@@ -105,6 +105,16 @@ export const actions = {
         commit('stores/GET_STORE_LIST_FAILURE', err)
       })
   },
+  findSimilarStoreList ({ commit }, params = {}) {
+    params.op = 'similar'
+    commit('stores/REQUEST_STORE_LIST')
+    return axios.get('/api/store-service/stores', { params })
+      .then(response => {
+        commit('stores/GET_STORE_LIST_SUCCESS', response.data)
+      }, err => {
+        commit('stores/GET_STORE_LIST_FAILURE', err)
+      })
+  },
   findStoreListInMobil ({ commit }, params = {}) {
     params.op = 'similar'
     commit('stores/REQUEST_STORE_LIST')