Browse Source

Merge remote-tracking branch 'origin/master'

ouxq 8 years ago
parent
commit
b102585bf6

+ 85 - 8
assets/scss/common.scss

@@ -304,6 +304,9 @@
 .el-tree-node__content:hover span{
 .el-tree-node__content:hover span{
   color: #5078cb;
   color: #5078cb;
 }
 }
+.is-current>div.el-tree-node__content:first-child{
+  color: #5078cb;
+}
 .el-pagination .el-pager li.active{
 .el-pagination .el-pager li.active{
   background-color: #5078cb;
   background-color: #5078cb;
   border-color: #337ab7;
   border-color: #337ab7;
@@ -343,18 +346,92 @@ div.el-tree-node__content{
 .dialog .el-dialog__body{
 .dialog .el-dialog__body{
   padding: 0 !important;
   padding: 0 !important;
 }
 }
-/*查看*/
-.messageBoard .img-item .preview {
-  display: none;
+
+/*查看大图*/
+#image-box .x-floating-wrap,.image-box .x-floating-wrap {
+  position: fixed;
+  z-index: 99998;
+  background: #000;
+  top: 0;
+  left: 0;
+  width: 100%;
+  height: 100%;
+  opacity: 0.5;
+}
+#image-box,.image-box{
+  display:table; overflow:hidden; margin-left:50px; _position:relative;  width: 1200px;height: 700px;
+  position: fixed;
+  top: 50%;
+  margin-top: -350px;
+  left: 50%;
+  margin-left: -600px;
+  z-index: 2020;
+}
+#image-box .x-floating,.image-box .x-floating {
+  vertical-align:middle !important;
+  display:table-cell;
+  text-align:center;
+  _position:absolute;
+  _top:50%; _left:50%;
+  top: inherit !important;
+  left: inherit !important;
+}
+#image-box .x-floating img ,.image-box .x-floating img {
+  margin: auto auto;
+  max-width: 970px !important;
+  max-height: 600px !important;
+  -webkit-user-select: none;
+  -moz-user-select: none;
+  -ms-user-select: none;
+  user-select: none;
+}
+#image-box .x-floating-wrap,.image-box .x-floating-wrap{
+  z-index: 1000000 !important;
+}
+#item-content{
+  color:#fff; display:inline-block; _position:relative; _top:-50%; _left:-50%;
+  position: relative;
+  z-index: 10000000;
+}
+#item-content div.x-close-wrap{
   position: absolute;
   position: absolute;
-  top: 27px;
-  right: 16px;
-  z-index: 1000;
+  right: -15px;
+  line-height: 30px;
+  top: -13px;
   color: #fff;
   color: #fff;
+  width: 35px;
+  height: 35px;
+  background: rgba(0, 0, 0, 0.5);
+  border-radius: 100%;
+  opacity: 1;
+  margin: 0;
+  z-index: 100000;
+  min-height: initial;
+  text-align: center;
 }
 }
-.messageBoard .img-item:hover .preview {
-  display: block;
+#item-content div.x-close-wrap a{
+  position: relative;
+  left: 0;
+  bottom: 0;
+  font-size: 34px;
+  color: #fff;
 }
 }
+#item-content div.x-close-wrap a:hover{
+  color: #fff !important;
+}
+#item-content div.x-close-wrap:hover{
+  cursor: pointer;
+  opacity: .9;
+}
+#item-content div.x-close-wrap img{
+  width: 30px !important;
+  height: 30px !important;
+}
+#item-content .img{
+  position: relative;
+  z-index: 10;
+}
+
 
 
 /*查看大图*/
 /*查看大图*/
 #image-box .x-floating-wrap,.image-box .x-floating-wrap {
 #image-box .x-floating-wrap,.image-box .x-floating-wrap {

+ 6 - 2
components/common/buyOrCar/buyComponent.vue

@@ -45,7 +45,7 @@
                     }
                     }
                   } else {
                   } else {
                     if (response.data.data && response.data.data.unvailable === 1) {
                     if (response.data.data && response.data.data.unvailable === 1) {
-                      this.$message.error('产品信息已失效')
+                      this.$message.error('产品信息已失效,请刷新界面')
                     } else {
                     } else {
                       this.$message.error(response.data.message)
                       this.$message.error(response.data.message)
                     }
                     }
@@ -78,7 +78,11 @@
                       })
                       })
                     }
                     }
                   } else {
                   } else {
-                    this.$message.error(response.data.message)
+                    if (response.data.message === '该产品已失效') {
+                      this.$message.error(response.data.message + ',请刷新页面')
+                    } else {
+                      this.$message.error(response.data.message)
+                    }
                   }
                   }
                 })
                 })
             }
             }

+ 7 - 1
components/product/brand/CategoriesList.vue

@@ -21,6 +21,12 @@
         if (!brands || brands.length === 0) {
         if (!brands || brands.length === 0) {
           return []
           return []
         }
         }
+        // 初始化去除重复数据
+        for (let i = 0; i < brands.length; i++) {
+          for (let j = 0; j < brands[i].length; j++) {
+            brands[i][j].children = []
+          }
+        }
 
 
         // 处理第1层
         // 处理第1层
         if ((brands[0] && brands[0].length > 0) && (brands[1] && brands[1].length > 0)) {
         if ((brands[0] && brands[0].length > 0) && (brands[1] && brands[1].length > 0)) {
@@ -66,7 +72,7 @@
             }
             }
           }
           }
         }
         }
-        console.log(brands)
+ //       console.log(brands)
         return brands[0] || []
         return brands[0] || []
       },
       },
       brand () {
       brand () {

+ 9 - 20
components/product/component/StoreInfo.vue

@@ -20,12 +20,12 @@
         <div style="font-size: 14px">
         <div style="font-size: 14px">
           <span>产品匹配:</span>
           <span>产品匹配:</span>
           <span v-if="store && store.length > 0">
           <span v-if="store && store.length > 0">
-            <input type="checkbox" v-if="storeExist && UmallExist" @click="filterType('umall')">
+            <input type="checkbox" v-if="storeExist && UmallExist" @click="filterType('umall')" :checked="!this.params.filter.ignoreUMall">
             <span v-if="UmallExist">&nbsp;库存寄售&nbsp;</span>
             <span v-if="UmallExist">&nbsp;库存寄售&nbsp;</span>
-            <input type="checkbox" v-if="storeExist && UmallExist" @click="filterType('store')">
+            <input type="checkbox" v-if="storeExist && UmallExist" @click="filterType('store')" :checked="!this.params.filter.ignoreStore">
             <span v-if="storeExist">&nbsp;店铺自营</span>
             <span v-if="storeExist">&nbsp;店铺自营</span>
           </span>
           </span>
-          <span v-if="!storeList.content || storeList.content.length == 0">暂无可匹配的信息 </span>
+          <span v-if="!store || store.length == 0">暂无可匹配的信息 </span>
         </div>
         </div>
       </div>
       </div>
     </div>
     </div>
@@ -60,10 +60,10 @@
                   <span>起拍:</span>
                   <span>起拍:</span>
                   <span>{{list.minBuyQty}}</span>
                   <span>{{list.minBuyQty}}</span>
                 </div>
                 </div>
-                <div>
-                  <span>倍数:</span>
-                  <span>{{list.minPackQty}}</span>
-                </div>
+                <!--<div>-->
+                  <!--<span>倍数:</span>-->
+                  <!--<span>{{list.minPackQty}}</span>-->
+                <!--</div>-->
               </a>
               </a>
             </td>
             </td>
             <td>
             <td>
@@ -185,13 +185,10 @@
     },
     },
     methods: {
     methods: {
       addStore (storeIn) {
       addStore (storeIn) {
-        if (this.storeIds.indexOf(storeIn.uuid) !== -1) {
-          this.storeIds.splice(this.storeIds.indexOf(storeIn.uuid), 1)
+        if (typeof storeIn.isSelected === 'undefined') {
           storeIn.isSelected = false
           storeIn.isSelected = false
-        } else {
-          this.storeIds.push(storeIn.uuid)
-          storeIn.isSelected = true
         }
         }
+        storeIn.isSelected = !storeIn.isSelected
         // 点击请求处理
         // 点击请求处理
         let index = this.params.filter.storeIds.indexOf(storeIn.uuid)
         let index = this.params.filter.storeIds.indexOf(storeIn.uuid)
         if (index === -1) {
         if (index === -1) {
@@ -201,8 +198,6 @@
             this.params.filter.storeIds += ',' + storeIn.uuid
             this.params.filter.storeIds += ',' + storeIn.uuid
           }
           }
         } else {
         } else {
-   //       console.log(this.params.filter.storeIds.replace(storeIn.uuid, ''))
-          console.log(this.params.filter.storeIds.charAt(index + storeIn.uuid.length))
           if (this.params.filter.storeIds.charAt(index + storeIn.uuid.length) === '') {
           if (this.params.filter.storeIds.charAt(index + storeIn.uuid.length) === '') {
             if (this.params.filter.storeIds.charAt(index - 1) === ',') {
             if (this.params.filter.storeIds.charAt(index - 1) === ',') {
               this.params.filter.storeIds = this.params.filter.storeIds.replace(',' + storeIn.uuid, '')
               this.params.filter.storeIds = this.params.filter.storeIds.replace(',' + storeIn.uuid, '')
@@ -213,9 +208,6 @@
           }
           }
         }
         }
         this.$store.dispatch('loadComponentInformation', this.params)
         this.$store.dispatch('loadComponentInformation', this.params)
-          .then(response => {
-            this.$store.commit('componentInformation/GET_INFORMATION_SUCCESS', response.data)
-          })
       },
       },
       filterType (type) {
       filterType (type) {
         if (type === 'umall') {
         if (type === 'umall') {
@@ -224,9 +216,6 @@
           this.params.filter.ignoreStore = !this.params.filter.ignoreStore
           this.params.filter.ignoreStore = !this.params.filter.ignoreStore
         }
         }
         this.$store.dispatch('loadComponentInformation', this.params)
         this.$store.dispatch('loadComponentInformation', this.params)
-          .then(response => {
-            this.$store.commit('componentInformation/GET_INFORMATION_SUCCESS', response.data)
-          })
       }
       }
     }
     }
   }
   }

+ 1 - 1
components/store/CommodityInfo.vue

@@ -308,7 +308,7 @@ export default {
                   }
                   }
                 } else {
                 } else {
                   if (response.data.data && response.data.data.unvailable === 1) {
                   if (response.data.data && response.data.data.unvailable === 1) {
-                    this.$message.error('产品信息已失效')
+                    this.$message.error('产品信息已失效,请刷新界面')
                   } else {
                   } else {
                     this.$message.error(response.data.message)
                     this.$message.error(response.data.message)
                   }
                   }

+ 4 - 3
components/store/RecommendProduct.vue

@@ -43,6 +43,7 @@
     },
     },
     methods: {
     methods: {
       buyNow: function (isBuy, item) {
       buyNow: function (isBuy, item) {
+        console.log(item)
         if (!this.$store.state.option.user.logged) {
         if (!this.$store.state.option.user.logged) {
           this.$http.get('/login/page').then(response => {
           this.$http.get('/login/page').then(response => {
             if (response.data) {
             if (response.data) {
@@ -59,7 +60,7 @@
                 storeid: item.storeId,
                 storeid: item.storeId,
                 storeUuid: item.storeUuid,
                 storeUuid: item.storeUuid,
                 currencyName: item.currency,
                 currencyName: item.currency,
-                minPackQty: item.minPackQty
+                minPackQty: item.minPackQty ? item.minPackQty : item.minBuyQty
               }])
               }])
                 .then(response => {
                 .then(response => {
                   //        window.location.href = '/user#/order/pay/' + this.enidfilter(response.data.orderid)
                   //        window.location.href = '/user#/order/pay/' + this.enidfilter(response.data.orderid)
@@ -78,7 +79,7 @@
                     }
                     }
                   } else {
                   } else {
                     if (response.data.data && response.data.data.unvailable === 1) {
                     if (response.data.data && response.data.data.unvailable === 1) {
-                      this.$message.error('产品信息已失效')
+                      this.$message.error('产品信息已失效,请刷新界面')
                     } else {
                     } else {
                       this.$message.error(response.data.message)
                       this.$message.error(response.data.message)
                     }
                     }
@@ -95,7 +96,7 @@
                 storeid: item.storeId,
                 storeid: item.storeId,
                 storeUuid: item.storeUuid,
                 storeUuid: item.storeUuid,
                 currencyName: item.currency,
                 currencyName: item.currency,
-                minPackQty: item.minPackQty
+                minPackQty: item.minPackQty ? item.minPackQty : item.minBuyQty
               })
               })
                 .then(response => {
                 .then(response => {
                   if (response.data.success) {
                   if (response.data.success) {