Przeglądaj źródła

求购添加宣传及快速入口

gaoxm 8 lat temu
rodzic
commit
13bd166ad0

+ 379 - 368
components/applyPurchase/ApplyInfo.vue

@@ -160,9 +160,6 @@ export default {
       Timer: {}
     }
   },
-  phone: function(str) {
-    return str ? str.substring(0, 3) + '****' + str.substring(7, 11) : '-'
-  },
   filters: {
     date: function(date) {
       const d = new Date(Number(date))
@@ -208,8 +205,7 @@ export default {
       return this.$store.state.shop.storeInfo.store.data
     },
     purchaseManList() {
-      return this.$store.state.applyPurchase.purchaseManList.purchaseManList
-        .data
+      return this.$store.state.applyPurchase.purchaseManList.purchaseManList.data
     },
     totalCount() {
       return this.purchaseManList.totalElements
@@ -368,74 +364,38 @@ export default {
 }
 </script>
 <style lang="scss" scoped>
-.apply-info {
-  width: 1190px;
-  margin: 0 auto;
-  .apply-info-title {
-    border-bottom: 1px solid #3975f4;
-    > p {
-      display: inline-block;
-      width: 156px;
-      height: 33px;
-      line-height: 33px;
-      color: #fff;
-      background: #3975f4;
-      font-size: 18px;
-      text-align: center;
-      border: {
-        top-left-radius: 3px;
-        top-right-radius: 3px;
-      }
-      margin: 0;
-    }
-    > span {
-      color: #999;
-      margin-left: 16px;
-    }
-    > div {
-      float: right;
-      height: 32px;
-      line-height: 32px;
-      > input {
-        width: 241px;
-        height: 32px;
-        line-height: 32px;
-        font-size: 13px;
-        border: {
-          top-right-radius: 0;
-          bottom-right-radius: 0;
-        }
-      }
-      > span {
+  .apply-info {
+    width: 1190px;
+    margin: 0 auto;
+    .apply-info-title {
+      border-bottom: 1px solid #3975f4;
+      > p {
         display: inline-block;
-        width: 69px;
+        width: 156px;
+        height: 33px;
+        line-height: 33px;
         color: #fff;
         background: #3975f4;
+        font-size: 18px;
         text-align: center;
-        margin: 0 6px 0 -1px;
-        /*vertical-align: middle;*/
         border: {
+          top-left-radius: 3px;
           top-right-radius: 3px;
-          bottom-right-radius: 3px;
         }
-        cursor: pointer;
+        margin: 0;
       }
-      > a {
-        background: #ffa200;
-        color: #fff;
-        width: 79px;
-        border-radius: 3px;
-        text-align: center;
-        display: inline-block;
+      > span {
+        color: #999;
+        margin-left: 16px;
       }
       > div {
         float: right;
-        height: 33px;
-        line-height: 33px;
+        height: 32px;
+        line-height: 32px;
         > input {
           width: 241px;
-          height: 33px;
-          line-height: 33px;
+          height: 32px;
+          line-height: 32px;
           font-size: 13px;
           border: {
             top-right-radius: 0;
@@ -449,7 +409,6 @@ export default {
           background: #3975f4;
           text-align: center;
           margin: 0 6px 0 -1px;
-          height: 33px;
           /*vertical-align: middle;*/
           border: {
             top-right-radius: 3px;
@@ -457,368 +416,420 @@ export default {
           }
           cursor: pointer;
         }
-        &:nth-child(2) {
-          width: 106px;
-        }
-        &:nth-child(3) {
-          width: 200px;
-        }
-        &:nth-child(4) {
-          width: 174px;
-        }
-        &:nth-child(5) {
-          width: 152px;
-        }
-        &:nth-child(6) {
-          width: 158px;
+        > a {
+          background: #ffa200;
+          color: #fff;
+          width: 79px;
+          border-radius: 3px;
+          text-align: center;
+          display: inline-block;
         }
-        &:nth-child(7) {
-          width: 180px;
-          margin-left: 30px;
+        > div {
+          float: right;
+          height: 33px;
+          line-height: 33px;
+          > input {
+            width: 241px;
+            height: 33px;
+            line-height: 33px;
+            font-size: 13px;
+            border: {
+              top-right-radius: 0;
+              bottom-right-radius: 0;
+            }
+          }
+          > span {
+            display: inline-block;
+            width: 69px;
+            color: #fff;
+            background: #3975f4;
+            text-align: center;
+            margin: 0 6px 0 -1px;
+            height: 33px;
+            /*vertical-align: middle;*/
+            border: {
+              top-right-radius: 3px;
+              bottom-right-radius: 3px;
+            }
+            cursor: pointer;
+          }
+          &:nth-child(2) {
+            width: 106px;
+          }
+          &:nth-child(3) {
+            width: 200px;
+          }
+          &:nth-child(4) {
+            width: 174px;
+          }
+          &:nth-child(5) {
+            width: 152px;
+          }
+          &:nth-child(6) {
+            width: 158px;
+          }
+          &:nth-child(7) {
+            width: 180px;
+            margin-left: 30px;
+          }
         }
       }
-    }
 
-    .empty {
-      text-align: center;
-      height: 200px;
-      line-height: 200px;
-      border: 1px solid #e8e8e8;
-      margin-bottom: 10px;
-      span {
-        color: #999;
-        margin-left: 10px;
-      }
-    }
-  }
-  .apply-info-list {
-    .list-title {
-      background: #e2ebff;
-      height: 40px;
-      line-height: 40px;
-      margin: 9px 0 0 0;
-      .list-title-item {
-        display: inline-block;
+      .empty {
         text-align: center;
-        .fa {
-          color: #333;
-          &.active {
-            color: #5078cb;
-          }
-        }
-        &:nth-child(1) {
-          margin-left: 76px;
-        }
-        &:nth-child(2) {
-          margin-left: 345px;
-        }
-        &:nth-child(3) {
-          margin-left: 399px;
-        }
-        &:nth-child(4) {
-          margin-left: 71px;
+        height: 200px;
+        line-height: 200px;
+        border: 1px solid #e8e8e8;
+        margin-bottom: 10px;
+        span {
+          color: #999;
+          margin-left: 10px;
         }
       }
     }
-    > ul {
-      margin-bottom: 29px;
-      > li {
-        position: relative;
-        border: 1px solid #ededed;
-        &.active {
-          border: 1px solid #4290f7;
-          box-shadow: 2px 4px 5px 0 rgb(205, 221, 252);
-        }
-        &:hover {
-          border: 1px solid #4290f7;
-          box-shadow: 2px 4px 5px 0 rgb(205, 221, 252);
-          .il-item.il-right .sharecode {
-            display: block;
-          }
-        }
-        .il-item {
-          height: 120px;
+    .apply-info-list {
+      .list-title {
+        background: #e2ebff;
+        height: 40px;
+        line-height: 40px;
+        margin: 9px 0 0 0;
+        .list-title-item {
           display: inline-block;
           text-align: center;
-          color: #3c3c3c;
-          padding-top: 16px;
-          vertical-align: middle;
-          .item {
-            display: inline-block;
-            overflow: hidden;
-            text-overflow: ellipsis;
-            white-space: nowrap;
-            span {
-              color: #999;
+          .fa {
+            color: #333;
+            &.active {
+              color: #5078cb;
             }
           }
-          &.il-left {
-            width: 236px;
-            padding: 16px 10px 0;
-            div {
+          &:nth-child(1) {
+            margin-left: 76px;
+          }
+          &:nth-child(2) {
+            margin-left: 345px;
+          }
+          &:nth-child(3) {
+            margin-left: 399px;
+          }
+          &:nth-child(4) {
+            margin-left: 71px;
+          }
+        }
+      }
+      > ul {
+        margin-bottom: 29px;
+        > li {
+          position: relative;
+          border: 1px solid #ededed;
+          &.active {
+            border: 1px solid #4290f7;
+            box-shadow: 2px 4px 5px 0 rgb(205, 221, 252);
+          }
+          &:hover {
+            border: 1px solid #4290f7;
+            box-shadow: 2px 4px 5px 0 rgb(205, 221, 252);
+            .il-item.il-right .sharecode {
               display: block;
-              &:last-child {
-                margin-top: 37px;
-                color: #666;
-              }
             }
           }
-          &.il-center {
-            text-align: left;
-            width: 654px;
-            .il-box {
+          .il-item {
+            height: 120px;
+            display: inline-block;
+            text-align: center;
+            color: #3c3c3c;
+            padding-top: 16px;
+            vertical-align: middle;
+            .item {
               display: inline-block;
-              float: left;
+              overflow: hidden;
+              text-overflow: ellipsis;
+              white-space: nowrap;
               span {
                 color: #999;
               }
             }
-            .il-box-large {
-              width: 482px;
-              .fl {
-                width: 284px;
-                line-height: 19px;
-                word-break: break-all;
-                white-space: unset;
-                &.bottom {
-                  margin-top: 14px;
-                }
-                .content {
-                  display: inline-block;
-                  width: 220px;
-                  overflow: hidden;
-                  vertical-align: middle;
-                  height: 38px;
+            &.il-left {
+              width: 236px;
+              padding: 16px 10px 0;
+              div {
+                display: block;
+                &:last-child {
+                  margin-top: 37px;
+                  color: #666;
                 }
+              }
+            }
+            &.il-center {
+              text-align: left;
+              width: 654px;
+              .il-box {
+                display: inline-block;
+                float: left;
                 span {
-                  float: left;
+                  color: #999;
                 }
-                &.size-middle {
-                  width: 136px;
-                  margin-right: 37px;
+              }
+              .il-box-large {
+                width: 482px;
+                .fl {
+                  width: 284px;
+                  line-height: 19px;
+                  word-break: break-all;
+                  white-space: unset;
+                  &.bottom {
+                    margin-top: 14px;
+                  }
                   .content {
-                    width: 86px;
+                    display: inline-block;
+                    width: 220px;
+                    overflow: hidden;
+                    vertical-align: middle;
+                    height: 38px;
+                  }
+                  span {
+                    float: left;
+                  }
+                  &.size-middle {
+                    width: 136px;
+                    margin-right: 37px;
+                    .content {
+                      width: 86px;
+                    }
                   }
                 }
               }
-            }
-            .il-box-small {
-              width: 151px;
-              margin-left: 12px;
-              .item {
-                color: #020202;
+              .il-box-small {
                 width: 151px;
-                margin-bottom: 6px;
-              }
-            }
-          }
-          &.il-right {
-            width: 100px;
-            .date-content {
-              margin-top: 14px;
-              margin-bottom: 17px;
-              span {
-                &:first-child {
-                  font-size: 12px;
-                  color: #666;
+                margin-left: 12px;
+                .item {
+                  color: #020202;
+                  width: 151px;
+                  margin-bottom: 6px;
                 }
-                color: #f71026;
-              }
-              i {
-                font-style: normal;
               }
             }
-            .btn-content {
-              > div a {
-                display: inline-block;
-                width: 71px;
-                height: 28px;
-                line-height: 28px;
-                color: #fff;
-                background: #3c7cf5;
-                border-radius: 3px;
-                cursor: pointer;
-                /*  &:first-child {
-                      background: #ffa200;
-                      float: left;
-                      margin-top: 19px;
-                    }*/
+            &.il-right {
+              width: 100px;
+              .date-content {
+                margin-top: 14px;
+                margin-bottom: 17px;
+                span {
+                  &:first-child {
+                    font-size: 12px;
+                    color: #666;
+                  }
+                  color: #f71026;
+                }
+                i {
+                  font-style: normal;
+                }
               }
-              .is-say-price {
-                display: inline-block;
-                color: #39ae05;
-                margin-left: 11px;
-                img {
-                  margin-bottom: 2px;
+              .btn-content {
+                > div a {
+                  display: inline-block;
+                  width: 71px;
+                  height: 28px;
+                  line-height: 28px;
+                  color: #fff;
+                  background: #3c7cf5;
+                  border-radius: 3px;
+                  cursor: pointer;
+                  /*  &:first-child {
+                        background: #ffa200;
+                        float: left;
+                        margin-top: 19px;
+                      }*/
+                }
+                .is-say-price {
+                  display: inline-block;
+                  color: #39ae05;
+                  margin-left: 11px;
+                  img {
+                    margin-bottom: 2px;
+                  }
                 }
               }
-            }
-            .sharescancodekuang {
-              // width: 100%;
-              // height: 220px;
-              // position: absolute;
-              // top: 115px;
-              // left: 0px;
-              // background: rgba(0, 0, 0, 0);
-            }
-            .sharescancode {
-              position: absolute;
-              background: url('/images/mobile/@2x/purChase/codebg.png');
-              width: 248px;
-              height: 207px;
-              top: 115px;
-              right: 0px;
-              z-index: 98;
-              display: none;
-              line-height: 14px;
-              canvas {
-                display: block;
-                text-align: center;
-                margin: 0 auto;
-                line-height: 14px;
+              .sharescancodekuang {
+                // width: 100%;
+                // height: 220px;
+                // position: absolute;
+                // top: 115px;
+                // left: 0px;
+                // background: rgba(0, 0, 0, 0);
               }
-              .title {
-                color: #3c7cf5;
-                font-size: 16px;
-                margin: 21px auto;
-                margin-bottom: 0px;
-                text-align: center;
+              .sharescancode {
+                position: absolute;
+                background: url('/images/mobile/@2x/purChase/codebg.png');
+                width: 248px;
+                height: 207px;
+                top: 115px;
+                right: 0;
+                z-index: 98;
+                display: none;
                 line-height: 14px;
+                canvas {
+                  display: block;
+                  text-align: center;
+                  margin: 0 auto;
+                  line-height: 14px;
+                }
+                .title {
+                  color: #3c7cf5;
+                  font-size: 16px;
+                  margin: 21px auto;
+                  margin-bottom: 0px;
+                  text-align: center;
+                  line-height: 14px;
+                }
+                div input {
+                  display: inline-block;
+                  width: 140px;
+                  overflow: hidden;
+                  height: 35px;
+                  vertical-align: middle;
+                  margin-left: 14px;
+                  line-height: 35px;
+                }
+                div span {
+                  display: inline-block;
+                  color: #fff;
+                  background: #4290f7;
+                  height: 36px;
+                  line-height: 36px;
+                  width: 70px;
+                  font-style: normal;
+                  vertical-align: middle;
+                  cursor: pointer;
+                }
               }
-              div input {
-                display: inline-block;
-                width: 140px;
-                overflow: hidden;
-                height: 35px;
-                vertical-align: middle;
-                margin-left: 14px;
-                line-height: 35px;
-              }
-              div span {
-                display: inline-block;
-                color: #fff;
-                background: #4290f7;
-                height: 36px;
-                line-height: 36px;
-                width: 70px;
-                font-style: normal;
-                vertical-align: middle;
-                cursor: pointer;
-              }
-            }
-            .sharecode {
-              position: absolute;
-              right: 0;
-              top: 0;
-              height: 120px;
-              z-index: 99;
-              display: none;
-              .sharecodeR {
-                width: 4px;
+              .sharecode {
+                position: absolute;
+                right: 0;
+                top: 0;
                 height: 120px;
-                background: #4290f7;
-                float: right;
-              }
-              .sharecodeL {
-                float: right;
-                margin-right: 1px;
-              }
-              .sharecodeT {
-                padding-top: 5px;
-                margin-top: 10px;
-                width: 28px;
-                height: 68px;
-                background-color: #3c7cf5;
-                border-radius: 2px;
-                color: #ffffff;
-                font-size: 14px;
-                word-wrap: break-word;
-                white-space: pre-wrap;
-                line-height: 14px;
-              }
-              .sharecodeBtn {
-                width: 28px;
-                height: 28px;
-                margin-top: 4px;
-                &::after {
-                  content: ' ';
-                  clear: both;
-                  display: inline;
-                  visibility: hidden;
+                z-index: 99;
+                display: none;
+                .sharecodeR {
+                  width: 4px;
+                  height: 120px;
+                  background: #4290f7;
+                  float: right;
+                }
+                .sharecodeL {
+                  float: right;
+                  margin-right: 1px;
+                }
+                .sharecodeT {
+                  padding-top: 5px;
+                  margin-top: 10px;
+                  width: 28px;
+                  height: 68px;
+                  background-color: #3c7cf5;
+                  border-radius: 2px;
+                  color: #ffffff;
+                  font-size: 14px;
+                  word-wrap: break-word;
+                  white-space: pre-wrap;
+                  line-height: 14px;
                 }
-                img {
-                  float: left;
+                .sharecodeBtn {
+                  width: 28px;
+                  height: 28px;
+                  margin-top: 4px;
+                  &::after {
+                    content: ' ';
+                    clear: both;
+                    display: inline;
+                    visibility: hidden;
+                  }
+                  img {
+                    float: left;
+                  }
                 }
               }
             }
+            i {
+              color: #e41515;
+              position: relative;
+              top: 0px;
+              right: 3px;
+            }
           }
-          i {
-            color: #e41515;
-            position: relative;
-            top: 2px;
-            right: 3px;
+          .number-content {
+            margin-left: 56px;
+            line-height: 120px;
+            padding-top: 0;
+            width: 77px;
+            margin-right: 34px;
+            span {
+              color: #5392f9;
+              &.active {
+                color: #ff9a00;
+              }
+            }
+            > img {
+              margin-bottom: 5px;
+              margin-right: 2px;
+            }
           }
+          /*.say-price {*/
+          /*display: block;*/
+          /*}*/
         }
-        .number-content {
-          margin-left: 56px;
-          line-height: 120px;
+      }
+    }
+    .page-wrap {
+      text-align: right;
+      float: none;
+    }
+
+    .link-saler-box {
+      width: 289px;
+      height: auto;
+      min-height: auto;
+      border-radius: 2px;
+      .title {
+        background-color: #4290f7;
+        height: 22px;
+        line-height: 22px;
+        margin-bottom: 20px;
+      }
+      .content {
+        p {
+          line-height: 20px;
           padding-top: 0;
-          width: 77px;
-          margin-right: 34px;
+          i {
+            color: #4290f7;
+            margin-right: 4px;
+          }
           span {
-            color: #5392f9;
-            &.active {
-              color: #ff9a00;
-            }
+            color: #f62d37;
           }
-          > img {
-            margin-bottom: 5px;
-            margin-right: 2px;
+        }
+        div {
+          a {
+            width: 78px;
+            background: #4290f7;
+            margin: 18px 0 13px 0;
+            border-radius: 2px;
           }
         }
-        /*.say-price {*/
-        /*display: block;*/
-        /*}*/
       }
     }
   }
+  .empty{
+    text-align: center;
+    height: 200px;
+    line-height: 200px;
+    border: 1px solid #e8e8e8;
+    margin-bottom: 10px;
+    span {
+      color: #999;
+      margin-left: 10px;
+    }
+  }
   .page-wrap {
     text-align: right;
     float: none;
   }
-
-  .link-saler-box {
-    width: 289px;
-    height: auto;
-    min-height: auto;
-    border-radius: 2px;
-    .title {
-      background-color: #4290f7;
-      height: 22px;
-      line-height: 22px;
-      margin-bottom: 20px;
-    }
-    .content {
-      p {
-        line-height: 20px;
-        padding-top: 0;
-        i {
-          color: #4290f7;
-          margin-right: 4px;
-        }
-        span {
-          color: #f62d37;
-        }
-      }
-      div {
-        a {
-          width: 78px;
-          background: #4290f7;
-          margin: 18px 0 13px 0;
-          border-radius: 2px;
-        }
-      }
-    }
-  }
-}
 </style>

+ 4 - 3
components/applyPurchase/BatchPublish.vue

@@ -447,6 +447,7 @@
           if (!this.modifyObj.unitPrice) {
             this.modifyObj.currency = null
           }
+          this.modifyObj.code = this.modifyObj.code.trim()
           this.$http.put('/seek/updateSeekPurchaseByBatch', this.modifyObj)
             .then(response => {
               if (response.data.success) {
@@ -556,8 +557,9 @@
         return item.code && item.brand && item.deadline && this.isValidDate(item.deadline)
       },
       checkCode: function () {
-        let nullStrFlag = checkNullStr(this.modifyObj.code)
-        this.validObj.code = this.modifyObj.code && this.modifyObj.code !== '' && nullStrFlag
+        let code = this.modifyObj.code.trim()
+        let nullStrFlag = checkNullStr(code)
+        this.validObj.code = code && code !== '' && nullStrFlag
         if (!this.validObj.code) {
           if (!nullStrFlag) {
             this.$message.error('型号输入不合法')
@@ -626,7 +628,6 @@
         }
       },
       onCodeChange: function () {
-        this.modifyObj.code = this.modifyObj.code.trim()
         if ((/[^\x00-\xff]/g).test(this.modifyObj.code)) {
           let chineseIndex = -1
           for (let i = 0; i < this.modifyObj.code.length; i++) {

+ 4 - 5
components/applyPurchase/PublishApply.vue

@@ -249,7 +249,6 @@
             inquiry.endDate = this.applyObj.deadline
             inquiry.sourceapp = 'MALL'
             inquiry.amount = 1
-            inquiryItem.prodTitle = this.applyObj.code
             inquiryItem.userUU = this.user.data.userUU
             inquiryItem.source = 'MALL'
             inquiryItem.userName = this.user.data.userName
@@ -257,7 +256,7 @@
             inquiryItem.needquantity = this.applyObj.amount
             inquiryItem.inbrand = this.applyObj.brand
             inquiryItem.currency = currency
-            inquiryItem.cmpCode = this.applyObj.code.toUpperCase()
+            inquiryItem.cmpCode = this.applyObj.code.trim().toUpperCase()
             inquiryItem.unitPrice = this.applyObj.unitPrice
             inquiryItem.produceDate = this.applyObj.produceDate
             inquiryItem.date = date
@@ -314,8 +313,9 @@
         }
       },
       checkCode: function () {
-        let nullStrFlag = checkNullStr(this.applyObj.code)
-        this.validObj.code = this.applyObj.code && this.applyObj.code !== '' && nullStrFlag
+        let code = this.applyObj.code.trim()
+        let nullStrFlag = checkNullStr(code)
+        this.validObj.code = code && code !== '' && nullStrFlag
         if (!this.validObj.code) {
           if (!nullStrFlag) {
             this.$message.error('型号输入不合法')
@@ -401,7 +401,6 @@
         }
       },
       onCodeChange: function () {
-        this.applyObj.code = this.applyObj.code.trim()
         if ((/[^\x00-\xff]/g).test(this.applyObj.code)) {
           let chineseIndex = -1
           for (let i = 0; i < this.applyObj.code.length; i++) {

+ 68 - 0
components/common/LinkSalerBox.vue

@@ -0,0 +1,68 @@
+<template>
+  <div class="com-del-box link-saler-box">
+    <div class="title">
+      <i @click="cancel()"></i>
+    </div>
+    <div class="content">
+      <p><i class="fa fa-exclamation-circle"></i>抱歉,暂时无法与{{target == 'saler' ? '卖' : '买'}}家在线沟通!</p>
+      <p>{{target == 'saler' ? '卖' : '买'}}家联系电话:<span v-text="tel"></span></p>
+      <div>
+        <a @click="cancel()">我知道了</a>
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+  export default {
+    props: {
+      tel: {
+        default: '',
+        type: String
+      },
+      target: {
+        default: 'saler',
+        type: String
+      }
+    },
+    methods: {
+      cancel: function () {
+        this.$emit('cancelAction')
+      }
+    }
+  }
+</script>
+<style lang="scss" scoped>
+  .link-saler-box {
+    width: 289px;
+    height: auto;
+    min-height: auto;
+    border-radius: 2px;
+    .title {
+      background-color: #4290f7;
+      height: 22px;
+      line-height: 22px;
+      margin-bottom: 20px;
+    }
+    .content {
+      p {
+        line-height: 20px;
+        padding-top: 0;
+        i {
+          color: #4290f7;
+          margin-right: 4px;
+        }
+        span {
+          color: #f62d37;
+        }
+      }
+      div {
+        a {
+          width: 78px;
+          background: #4290f7;
+          margin: 18px 0 13px 0;
+          border-radius: 2px;
+        }
+      }
+    }
+  }
+</style>

+ 0 - 3
components/common/upload/upload.vue

@@ -87,6 +87,3 @@
     }
   }
 </script>
-<style>
-
-</style>

+ 2 - 2
components/default/RightBar.vue

@@ -32,14 +32,14 @@
             <p>周一至周五 9:00-18:00</p>
           </div>
         </li>
-        <li class="right-bar-item contact-menu">
+       <!-- <li class="right-bar-item contact-menu">
           <a href="javascript:void(0)" class="title" @click="goWebChat">
             <i class="fa fa-comments-o" aria-hidden="true" style="color: #FFFFFF;">
             </i>
             <i class="remind-point" v-if="user.logged && chatCount>0"></i>
           </a>
           <div class="sidebar-menu" title="优软互联"><a @click="goWebChat">优软互联<span v-if="user.logged">({{chatCount}})</span></a></div>
-        </li>
+        </li>-->
       </ul>
       <ul class="right-bar-bottom">
         <li class="right-bar-item" @mouseenter="loadHistorys()">

+ 8 - 2
components/error/error.vue

@@ -30,10 +30,10 @@
           <nuxt-link :to="{ path: '/provider/factories'}">原厂专区</nuxt-link>
         </div>
 
-        <div class="infotext" v-else-if="title==='品'">您可以逛逛:
+        <div class="infotext" v-else-if="title==='品'">您可以逛逛:
           <nuxt-link :to="{ path: '/'}">商城首页</nuxt-link>
           <span>|</span>
-          <nuxt-link :to="{ path: '/product/home'}">代理分销</nuxt-link>
+          <nuxt-link :to="{ path: '/provider/home'}">代理经销</nuxt-link>
           <span>|</span>
           <nuxt-link :to="{ name: 'store-uuid', params: { uuid: '33069557578d44e69bd91ad12d28a8d4' }}">库存寄售</nuxt-link>
         </div>
@@ -82,6 +82,12 @@ export default {
         span {
           margin: 0 6px;
         }
+        a {
+          color: #5078CB
+        }
+        a:hover {
+          color: #fd7022
+        }
       }
     }
   }

+ 1 - 2
components/main/index.js

@@ -1,4 +1,3 @@
 import MainHeader from './Header.vue'
 import MainNav from './Nav.vue'
-import VendorHeader from './vendorHeader.vue'
-export { MainHeader, MainNav, VendorHeader }
+export { MainHeader, MainNav }

+ 1 - 0
components/mobile/applyPurchase/SeekList.vue

@@ -153,6 +153,7 @@ export default {
       } else {
         this.showLoginBox = true
       }
+      return false
     },
     goSayPriceInfo: function(id, agreed, index) {
       this.userType === 'buyer'

+ 3 - 0
components/register-saler/Register.vue

@@ -181,4 +181,7 @@
     border-left: 17px solid transparent;
     content: '';
   }
+  .brand-type .brand-small-img .preview {
+    line-height: 84px;
+  }
 </style>

+ 16 - 3
components/searchStore/StoreContent.vue

@@ -10,7 +10,7 @@
           <a :href="'/store/' + store.uuid" target="_blank" :title="store.storeName">{{store.storeName}}</a>
           <span style="position: relative;" class="call-seller">
             <img src="static/img/common/songguo.png?_v=1503050008623">
-							<a name="21059" href="javascript:void(0)" class="contact_btn">联系卖家</a>
+							<a @click="goLink(store)" href="javascript:void(0)" class="contact_btn">联系卖家</a>
           </span>
           <span class="main-product">
              <a :href="'/store/' + store.uuid" target="_blank" v-text="'店铺简介:' + store.description"></a>
@@ -62,20 +62,30 @@
         </button>
       </div>
     </el-dialog>
+    <link-saler-box
+      :tel="tel"
+      v-if="showLinkBox"
+      @cancelAction="showLinkBox = false">
+    </link-saler-box>
   </div>
 </template>
 <script>
   import Page from '~components/common/page/pageComponent.vue'
+  import { goLinkUser } from '~utils/baseUtils'
+  import LinkSalerBox from '~components/common/LinkSalerBox.vue'
   export default {
     data () {
       return {
         dialogVisible: false,
         pageSize: 8,
-        nowPage: 1
+        nowPage: 1,
+        showLinkBox: false,
+        tel: ''
       }
     },
     components: {
-      Page
+      Page,
+      LinkSalerBox
     },
     computed: {
       user () {
@@ -130,6 +140,9 @@
       },
       goStore: function (index, compIndex) {
         window.open('/store/productDetail/' + this.componentData[index].content[compIndex].batchCode)
+      },
+      goLink: function (store) {
+        goLinkUser(this, store.enUU)
       }
     }
   }

+ 1 - 1
components/store/BaseInfo.vue

@@ -32,7 +32,7 @@
         <div ng-if="storeInfo.enterprise">
           <div class="contact-text">
             <div v-text="storeInfo.enterprise.enName || '-'"></div>
-            <div><span class="public">地址:</span><span v-text="storeInfo.enterprise.enAddress || '-'"></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 :href=storeInfo.enterprise.enUrl target="_blank">{{storeInfo.enterprise.enUrl || '-'}}</a></div>

+ 17 - 4
components/store/CommodityList.vue

@@ -27,7 +27,7 @@
               </span>
             </div>
           </div>
-          
+
         </div>
 
         <!-- 列表展示 -->
@@ -134,12 +134,17 @@
         <div class="remind-area">
           <img src="/images/store/store-remind.png" alt="">
           所有报价、库存信息的真实性及准确性均由店铺负责,如有疑问请点击
-          <a @click="goWebChat()" class="link-seller">联系卖家</a>
+          <a @click="goLink" class="link-seller">联系卖家</a>
         </div>
         <page :total="commodities.totalElements" :page-size="pageParams.count"
               :current="pageParams.page" @childEvent="handleCurrentChange"></page>
       </div>
     </div>
+    <link-saler-box
+      :tel="tel"
+      v-if="showLinkBox"
+      @cancelAction="showLinkBox = false">
+    </link-saler-box>
   </div>
 </template>
 <script>
@@ -165,12 +170,15 @@ function getAllLeafIds (kind) {
 }
 import Buy from '~components/common/buyOrCar/buyComponent.vue'
 import Page from '~components/common/page/pageComponent.vue'
+import LinkSalerBox from '~components/common/LinkSalerBox.vue'
+import { goLinkUser } from '~utils/baseUtils'
 export default {
   name: 'commodity-list',
   props: ['kinds'],
   components: {
     Buy,
-    Page
+    Page,
+    LinkSalerBox
   },
   data () {
     return {
@@ -184,7 +192,9 @@ export default {
       },
       searchCode: '',
       parentKindId: 0,
-      ids: null
+      ids: null,
+      showLinkBox: false,
+      tel: ''
     }
   },
   filters: {
@@ -384,6 +394,9 @@ export default {
       } else {
         this.$router.push('/auth/login?returnUrl=' + window.location.href)
       }
+    },
+    goLink: function () {
+      goLinkUser(this, this.storeInfo.enUU)
     }
   }
 }

+ 37 - 9
components/store/ComponentInfo.vue

@@ -13,25 +13,53 @@
         </li>
         <li v-if="!commodity.uuid || !component.properties || component.properties.length === 0" class="text-info">
           <!--<i class="fa fa-smile-o fa-lg"></i> 暂无参数信息-->
-          <span class="info">卖家上传的产品暂无参数,请 <a href="">联系卖家</a> 了解具体详情</span>
+          <span class="info">卖家上传的产品暂无参数,请 <a @click="goLink">联系卖家</a> 了解具体详情</span>
         </li>
       </ul>
     </div>
+    <link-saler-box
+      :tel="tel"
+      v-if="showLinkBox"
+      @cancelAction="showLinkBox = false">
+    </link-saler-box>
   </div>
 </template>
 <script>
 
-export default {
-  name: 'component-info',
-  computed: {
-    component () {
-      return this.$store.state.shop.storeInfo.component.data
+  import LinkSalerBox from '~components/common/LinkSalerBox.vue'
+  import { goLinkUser } from '~utils/baseUtils'
+
+  export default {
+    name: 'component-info',
+    data () {
+      return {
+        showLinkBox: false,
+        tel: ''
+      }
+    },
+    components: {
+      LinkSalerBox
+    },
+    computed: {
+      storeInfo () {
+        return this.$store.state.shop.storeInfo.store.data
+      },
+      user () {
+        return this.$store.state.option.user
+      },
+      component () {
+        return this.$store.state.shop.storeInfo.component.data
+      },
+      commodity () {
+        return this.$store.state.shop.storeInfo.commodity.data
+      }
     },
-    commodity () {
-      return this.$store.state.shop.storeInfo.commodity.data
+    methods: {
+      goLink: function () {
+        goLinkUser(this, this.storeInfo.enUU)
+      }
     }
   }
-}
 </script>
 <style scoped>
   .component-info {

+ 43 - 6
layouts/shop.vue

@@ -1,8 +1,15 @@
 <template>
   <div id="main">
     <header-view v-if="!isInFrame"></header-view>
-    <store-header/>
-    <store-title/>
+    <template v-if="isShowShopHeader">
+      <store-header/>
+      <store-title/>
+    </template>
+    <template v-else>
+      <main-header></main-header>
+      <main-nav></main-nav>
+    </template>
+
     <img v-if="isConsignment" class="banner-img" src="/images/all/banner-consignment.png" alt="">
     <!--<img v-if="isConsignment" class="cuxiao-banner" src="/images/all/banner-cuxiao.png" alt="">-->
     <nuxt/>
@@ -14,7 +21,7 @@
 <script>
   import { Header, Footer, RightBar } from '~components/default'
   import { StoreHeader, StoreTitle } from '~components/store'
-
+  import { MainHeader, MainNav } from '~components/main'
   function getCount (str, char) {
     return str.split(char).length - 1
   }
@@ -25,7 +32,9 @@
       FooterView: Footer,
       RightBar,
       StoreHeader,
-      StoreTitle
+      StoreTitle,
+      MainHeader,
+      MainNav
     },
     head () {
       return {
@@ -58,11 +67,17 @@
         let path = this.$route.path
         if ((path.startsWith('/store/') && getCount(path, '/') === 2) || path.endsWith('/description')) {
           if (!this.isConsignment) {
+            if (!this.storeInfo.storeName) {
+              return '【优软商城】IC电子元器件现货采购交易平台商城'
+            }
             return this.storeInfo.storeName + this.getStoreType(this.storeInfo.type) + '专卖店-优软商城'
           } else {
             return 'IC电子元器件库存寄售呆滞尾料空闲库存商城自营现货寄售-优软商城'
           }
         } else if (path.startsWith('/store/') && getCount(path, '/') === 3) {
+          if (!this.commodity) {
+            return '【优软商城】IC电子元器件现货采购交易平台商城'
+          }
           return this.commodity.brandNameEn + this.commodity.code + '价格|现货库存|报价|产品参数-优软商城'
         } else {
           return '【优软商城】IC电子元器件现货采购交易平台商城'
@@ -72,11 +87,17 @@
         let path = this.$route.path
         if ((path.startsWith('/store/') && getCount(path, '/') === 2) || path.endsWith('/description')) {
           if (!this.isConsignment) {
+            if (!this.storeInfo.storeName) {
+              return '优软商城为您提供IC电子元器件库存寄售呆滞尾料空闲库存现货寄售服务,商城自营现货寄售让您更放心更省心。'
+            }
             return this.storeInfo.storeName + '官方' + this.getStoreType(this.storeInfo.type) + '专卖店,提供最新IC电子元器件现货在线销售。'
           } else {
             return '优软商城为您提供IC电子元器件库存寄售呆滞尾料空闲库存现货寄售服务,商城自营现货寄售让您更放心更省心。'
           }
         } else if (path.startsWith('/store/') && getCount(path, '/') === 3) {
+          if (!this.commodity) {
+            return '优软商城(usoftmall.com)是中国领先的IC电子元器件现货采购交易网上商城,提供上千万种电子元器件现货采购交易,采购电子元器件就上优软商城!'
+          }
           return this.commodity.enterpriseName + '提供' + this.commodity.brandNameEn + this.commodity.code + '价格和' + this.commodity.code + '现货库存,并且内容还包含' + this.commodity.code + '产品参数、' + this.commodity.code + '规格书数据手册等。'
         } else {
           return '优软商城(usoftmall.com)是中国领先的IC电子元器件现货采购交易网上商城,提供上千万种电子元器件现货采购交易,采购电子元器件就上优软商城!'
@@ -86,11 +107,17 @@
         let path = this.$route.path
         if ((path.startsWith('/store/') && getCount(path, '/') === 2) || path.endsWith('/description')) {
           if (!this.isConsignment) {
+            if (!this.storeInfo.storeName) {
+              return '优软商城,ic芯片库存寄售,电子元器件寄售'
+            }
             return '电子元器件' + this.getStoreType(this.storeInfo.type) + '专卖店'
           } else {
             return '优软商城,ic芯片库存寄售,电子元器件寄售'
           }
         } else if (path.startsWith('/store/') && getCount(path, '/') === 3) {
+          if (!this.commodity) {
+            return '优软商城'
+          }
           return this.commodity.code + '价格,' + this.commodity.code + '现货,' + this.commodity.code + '报价,' + this.commodity.code + '产品参数'
         } else {
           return '优软商城'
@@ -105,8 +132,18 @@
       isInDetail () {
         return this.$route.path.indexOf('/store/productDetail/') !== -1
       },
-      commodity () {
-        return this.$store.state.shop.storeInfo.commodity.data
+      isShowShopHeader () {
+        if (this.isInDetail) {
+          if (this.$store.state.shop.storeInfo.commodity.data.id) {
+            return true
+          } else {
+            return false
+          }
+        } else if (this.storeInfo.id) {
+          return true
+        } else {
+          return false
+        }
       }
     },
     methods: {

+ 1 - 1
nuxt.config.js

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

+ 49 - 16
pages/mobile/share/purChase/_uuid.vue

@@ -3,7 +3,7 @@
     <div class="purchase-top">
       <div class="purchase-top-bg">
         <div class="clearfix">
-          <div class="title fl">{{purchaseDetail.inquiry.enName}}</div>
+          <div class="title fl">{{purchaseDetail.inquiry ? purchaseDetail.inquiry.enName : ''}}</div>
           <div class="time fr">{{purchaseDetail.endDate | date}}</div>
         </div>
         <div class="desc">{{purchaseDetail.cmpCode}}</div>
@@ -93,6 +93,7 @@ import { SayPrice, SayPriceInfo } from '~components/mobile/applyPurchase'
 import { LoginBox, RemindBox } from '~components/mobile/common'
 import SeekList from '~components/mobile/applyPurchase/SeekList.vue'
 import PublishSeek from '~components/mobile/applyPurchase/PublishSeek.vue'
+// var flg = true
 export default {
   layout: 'mobileStore',
   props: ['userType', 'seekType', 'purchaseManList'],
@@ -126,7 +127,12 @@ export default {
       remindText: '',
       timeoutCount: 0,
       agreed: 0,
-      showsendApplyBox: false
+      showsendApplyBox: false,
+      purchaseDetail: {
+        inquiry: {
+          enName: ''
+        }
+      }
     }
   },
   components: {
@@ -138,18 +144,20 @@ export default {
     PublishSeek
   },
   computed: {
-    purchaseDetail() {
-      console.log(
-        this.$store.state.applyPurchase.purchaseManList.purchaseManDetail.data
-      )
-      return this.$store.state.applyPurchase.purchaseManList.purchaseManDetail
-        .data
-    },
+    // purchaseDetail() {
+    //   // if (flg === true) {
+    //   //   flg = false
+
+    //   // }
+    // },
     purchaseManListData() {
       return this.$store.state.applyPurchase.purchaseManList.purchaseManList
         .data.content
     }
   },
+  created() {
+    this.purchaseDetail = this.$store.state.applyPurchase.purchaseManList.purchaseManDetail.data
+  },
   methods: {
     toMore() {
       if (
@@ -197,16 +205,41 @@ export default {
     },
     goSayPrice(id) {
       if (this.user.logged) {
-        this.$store.dispatch('applyPurchase/loadPurchaseManDetail', {
-          itemId: id,
-          enuu: this.$store.state.option.user.data.enterprise
-            ? this.$store.state.option.user.data.enterprise.uu
-            : null
-        })
-        this.showSayPriceBox = true
+        if (this.user.data.enterprise.uu) {
+          if (
+            this.user.data.enterprise.isVendor &&
+            this.user.data.enterprise.isVendor !== '1690'
+          ) {
+            this.$store.dispatch('applyPurchase/loadPurchaseManDetail', {
+              itemId: id,
+              enuu: this.$store.state.option.user.data.enterprise
+                ? this.$store.state.option.user.data.enterprise.uu
+                : null
+            })
+            this.showSayPriceBox = true
+            // this.activeIndex = index
+          } else {
+            this.onRemind('抱歉,您需开通卖家功能才可报价')
+          }
+        } else {
+          this.onRemind('个人账户暂不可报价')
+        }
       } else {
         this.showLoginBox = true
       }
+      return false
+
+      // if (this.user.logged) {
+      //   this.$store.dispatch('applyPurchase/loadPurchaseManDetail', {
+      //     itemId: id,
+      //     enuu: this.$store.state.option.user.data.enterprise
+      //       ? this.$store.state.option.user.data.enterprise.uu
+      //       : null
+      //   })
+      //   this.showSayPriceBox = true
+      // } else {
+      //   this.showLoginBox = true
+      // }
     },
     sendApplyPurchase() {
       console.log(this.user)

+ 17 - 2
pages/product/brand/_code.vue

@@ -1,16 +1,20 @@
 <template>
   <div class="details">
-    <div class="information">
+    <div class="information" v-if="list.id">
       <brand-detail/>
       <div class="comm-list">
         <categories-list/>
         <brand-component/>
       </div>
     </div>
+    <div v-else>
+      <error-page :title="'品牌'"></error-page>
+    </div>
   </div>
 </template>
 <script>
   import { BrandDetail, CategoriesList, BrandComponent } from '~components/product'
+  import { ErrorPage } from '~components/error'
   export default {
     layout: 'main',
     data () {
@@ -21,7 +25,18 @@
     components: {
       BrandDetail,
       CategoriesList,
-      BrandComponent
+      BrandComponent,
+      ErrorPage
+    },
+    computed: {
+      list () {
+        let list = this.$store.state.brandDetail.detail.data
+        if (list.application && list.application !== '') {
+          this.applications = list.application.split(',')
+        }
+        console.log(list)
+        return list
+      }
     },
     fetch ({ store, params }) {
       return Promise.all([

+ 1 - 1
pages/product/component/_uuid.vue

@@ -6,7 +6,7 @@
       <store-info/>
     </div>
     <div v-else>
-      <error-page :title="'店铺'"></error-page>
+      <error-page :title="'器件'"></error-page>
     </div>
   </div>
 </template>

+ 17 - 5
pages/product/kind/_id.vue

@@ -1,14 +1,19 @@
 <template>
   <div class="container">
-    <categroy-nav></categroy-nav>
-    <!--<category-property  @loadCmpGoodsByBrandEvent="listemBrandFilter" @loadCmpGoodsByTypeEvent="listemProTypeFilter"></category-property>-->
-    <component-goods :brandid="brandid" :propertyJSON="propertyJSON"></component-goods>
+    <div v-if="actives.length">
+      <categroy-nav></categroy-nav>
+      <!--<category-property  @loadCmpGoodsByBrandEvent="listemBrandFilter" @loadCmpGoodsByTypeEvent="listemProTypeFilter"></category-property>-->
+      <component-goods :brandid="brandid" :propertyJSON="propertyJSON"></component-goods>
+    </div>
+    <div v-else>
+      <error-page :title="'类目'"></error-page>
+    </div>
   </div>
 </template>
 
 <script>
   import { CategroyNav, CategoryProperty, ComponentGoods } from '~components/product'
-
+  import { ErrorPage } from '~components/error'
   export default {
     layout: 'main',
     data () {
@@ -27,7 +32,14 @@
     components: {
       CategroyNav,
       CategoryProperty,
-      ComponentGoods
+      ComponentGoods,
+      ErrorPage
+    },
+    computed: {
+      actives () {
+        console.log(this.$store.state.product.kind.kindsParentWithBother.data)
+        return this.$store.state.product.kind.kindsParentWithBother.data
+      }
     },
     methods: {
       loadPage (id) {

+ 15 - 4
pages/store/_uuid/index.vue

@@ -1,13 +1,18 @@
 <template>
   <div class="container">
-    <recommend-product/>
-    <commodity-list :kinds="kinds"/>
+    <div v-if="storeInfoStore.id">
+      <recommend-product/>
+      <commodity-list :kinds="kinds"/>
+    </div>
+    <div v-else>
+      <error-page :title="'店铺'"></error-page>
+    </div>
   </div>
 </template>
 <script>
 import axios from '~plugins/axios'
 import { CommodityList, RecommendProduct } from '~components/store'
-
+import { ErrorPage } from '~components/error'
 export default {
 //  validate ({ params }) {
 //    return false
@@ -40,7 +45,13 @@ export default {
   },
   components: {
     RecommendProduct,
-    CommodityList
+    CommodityList,
+    ErrorPage
+  },
+  computed: {
+    storeInfoStore() {
+      return this.$store.state.shop.storeInfo.store.data
+    }
   }
 }
 </script>

+ 23 - 11
pages/store/productDetail/_batchCode.vue

@@ -1,30 +1,42 @@
 <template>
   <div class="container commodity">
-    <commodity-info />
-    <component-info />
+    <div v-if="commodity">
+      <commodity-info />
+      <component-info />
+    </div>
+    <div v-else>
+      <error-page :title="'产品'"></error-page>
+    </div>
   </div>
 </template>
 <script>
 import { ComponentInfo, CommodityInfo } from '~components/store'
-
+import { ErrorPage } from '~components/error'
 export default {
   layout: 'shop',
-  fetch ({ store, route }) {
+  fetch({ store, route }) {
     return Promise.all([
-//      store.dispatch('shop/findStoreInfoFromUuid', route.params),
+      //      store.dispatch('shop/findStoreInfoFromUuid', route.params),
       store.dispatch('shop/findCommodityOnBatchInfo', route.params)
     ])
   },
   components: {
     ComponentInfo,
-    CommodityInfo
+    CommodityInfo,
+    ErrorPage
+  },
+  computed: {
+    commodity() {
+      // console.log(this.$store.state.shop.storeInfo.commodity.data)
+      return this.$store.state.shop.storeInfo.commodity.data
+    }
   }
 }
 </script>
 <style>
-  .container.commodity {
-		width: 1190px;
-		padding-left: 0px;
-		padding-right: 0px;
-	}
+.container.commodity {
+  width: 1190px;
+  padding-left: 0px;
+  padding-right: 0px;
+}
 </style>

+ 32 - 0
utils/baseUtils.js

@@ -131,3 +131,35 @@ export const checkNullStr = (str) => {
   })
   return flag
 }
+
+export const goLinkUser = ($this, enuu) => {
+  if ($this.user.logged) {
+    // $this.$http.get('/basic/enterprise/' + $this.storeInfo.enUU + '/info').then(response => {
+    //   if (response.data.enTel) {
+    //     $this.tel = response.data.enTel
+    //     $this.showLinkBox = true
+    //   } else {
+    //     $this.$http.get('/basic/enterprise/' + response.data.uu + '/admin').then(response => {
+    //       $this.tel = response.data.userTel
+    //       $this.showLinkBox = true
+    //     }, err => {
+    //       $this.$message.error('获取卖家联系方式失败')
+    //       console.log(err)
+    //     })
+    //   }
+    //   $this.showLinkBox = true
+    // }, err => {
+    //   $this.$message.error('获取卖家联系方式失败')
+    //   console.log(err)
+    // })
+    $this.$http.get(`/basic/enterprise/${enuu}/tels`).then(response => {
+      $this.tel = response.data.data.entel || response.data.data.adminTel
+      $this.showLinkBox = true
+    }, err => {
+      $this.$message.error('获取卖家联系方式失败')
+      throw err
+    })
+  } else {
+    $this.$router.push(`/auth/login?returnUrl=${window.location.href}`)
+  }
+}