Переглянути джерело

Merge branch 'feature/yc-isSellOut-1103'

hangb 8 роки тому
батько
коміт
c11156bd51

+ 2 - 2
assets/scss/common.scss

@@ -337,9 +337,9 @@ div.el-tree-node__content{
   line-height: 36px;
   height: 36px;
 }
-.el-tree-node__children .el-tree-node__content{
+/*.el-tree-node__children .el-tree-node__content{
   padding-left: 8px !important;
-}
+}*/
 .el-tree-node__expand-icon.is-leaf{
   visibility: hidden;
 }

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

@@ -1,15 +1,16 @@
 <template>
   <div>
-    <button class="btn btn-primary btn-buy-now"  @click="buyNow(true)"><span class="watch">立即购买</span></button>
-    <button class="btn btn-add-cart"  @click="buyNow(false)"><span class="watch">加入购物车</span></button>
+    <button style="z-index: 1000;" class="btn btn-primary btn-buy-now" :class="{'disabled': disabledFlag}"  @click="buyNow(true, $event)"><span class="watch">立即购买</span></button>
+    <button style="z-index: 1000;" class="btn btn-add-cart" :class="{'disabled': disabledFlag}"  @click="buyNow(false, $event)"><span class="watch">加入购物车</span></button>
   </div>
 </template>
 
 <script>
   export default {
-    props: ['item'],
+    props: ['item', 'disabledFlag'],
     methods: {
-      buyNow: function (isBuy) {
+      buyNow: function (isBuy, event) {
+        event.stopPropagation()
         if (!this.$store.state.option.user.logged) {
           this.$http.get('/login/page', {params: {returnUrl: window.location.href}}).then(response => {
             if (response.data) {
@@ -17,7 +18,7 @@
             }
           })
         } else {
-          if (this.item) {
+          if (this.item && !this.disabledFlag) {
             if (isBuy) {
               this.$http.post('trade/order/buyNow', [{
                 uuid: this.item.uuid,
@@ -45,7 +46,7 @@
                     }
                   } else {
                     if (response.data.data && response.data.data.unvailable === 1) {
-                      this.$message.error('产品信息已失效,请刷新面')
+                      this.$message.error('产品信息已失效,请刷新面')
                     } else {
                       this.$message.error(response.data.message)
                     }
@@ -82,6 +83,8 @@
                     }
                   } else {
                     if (response.data.code === 2) {
+                      this.$message.error('库存已不满足起订量')
+                    } else if (response.data.message === '该产品已失效') {
                       this.$message.error(response.data.message + ',请刷新页面')
                     } else {
                       this.$message.error(response.data.message)
@@ -191,4 +194,14 @@
     background-color: #5078CB;
     color: #fff;
   }
+  .btn-buy-now.disabled,
+  .btn-buy-now.disabled:focus,
+  .btn-add-cart.disabled,
+  .btn-add-cart.disabled:focus{
+    background-color: #d1d2d3!important;
+    border: none!important;
+    outline: none;
+    color: #fff!important;
+    cursor: not-allowed;
+  }
 </style>

+ 1 - 1
components/default/Header.vue

@@ -46,7 +46,7 @@
             <!--<a class="item" :href="url + '/user'">买家中心</a>
             <a class="item" :href="url + '/vendor'">卖家中心</a>-->
             <a class="item" href="/user#/index">买家中心</a>
-            <a class="item" @click="toVendor">卖家中心</a>
+            <a class="item" href="/vendor#/index" v-if="enterprise.uu">卖家中心</a>
           </template>
           <template v-else>
             <a class="item" @click="onLoginClick()">登录</a>

+ 9 - 2
components/product/ComponentGoods.vue

@@ -22,7 +22,8 @@
       <tbody id="productList-content">
       <!--| orderBy : dir + orderType  ng-class="{'tr-even' : !compGoods.isOdd}"-->
       <tr v-for="compGoods in componentGoods.content">
-        <td>
+        <td style="position: relative">
+          <img class="sellout-flag" v-if="compGoods.status === 602" src="/images/search/sellout-search.png" alt="">
           <!--store/{{compGoods.storeId}}#/batchInfo/{{compGoods.batchCode}}-->
           <nuxt-link v-if="compGoods.batchCode" :to="`/store/${compGoods.storeId}/${compGoods.batchCode}`" target="_blank">
             <img :src="compGoods.img?compGoods.img:compGoods.brand&&compGoods.brand.logoUrl?compGoods.brand.logoUrl:'/images/all/default.png'"/>
@@ -95,7 +96,7 @@
             <span>—</span>
           </div>
           <div v-if="compGoods.reserve > 0">
-            <buy :item="compGoods"></buy>
+            <buy :item="compGoods" :disabledFlag="compGoods.status === 602"></buy>
           </div>
         </td>
       </tr>
@@ -349,6 +350,12 @@
   .product-list tbody tr td .can-div-sell {
     color: #333;
   }
+  .product-list tbody tr td .sellout-flag {
+    position: absolute;
+    right: 0;
+    bottom: 0;
+    border: none;
+  }
   .search-record{
     width: 100%;
     margin: 0 auto;

+ 4 - 4
components/product/component/ComponentDetail.vue

@@ -55,10 +55,10 @@
               </div>
             </div>
             <div class="message-detail"></div>
-            <div class="form-group">
-               <button type="text" v-if="!collectList" @click="collect(list.id)" class="btn btn-default btn-store">加入收藏</button>
-               <button class="btn btn-default btn-store" v-if="collectList" disabled="disabled">已收藏</button>
-            </div>
+            <!--<div class="form-group">-->
+               <!--<button type="text" v-if="!collectList" @click="collect(list.id)" class="btn btn-default btn-store">加入收藏</button>-->
+               <!--<button class="btn btn-default btn-store" v-if="collectList" disabled="disabled">已收藏</button>-->
+            <!--</div>-->
           </div>
         </div>
       </div>

+ 15 - 12
components/product/component/StoreInfo.vue

@@ -34,9 +34,9 @@
       <table class="table">
         <thead>
           <tr class="height54">
-            <th class="text-center" width="100">制造商型号</th>
-            <th class="text-center" width="120">生产日期</th>
+            <th class="text-center" width="100">型号</th>
             <th class="text-center" width="80">包装方式</th>
+            <th class="text-center" width="120">生产日期</th>
             <th class="text-center" width="150">库存</th>
             <th class="text-center" width="80">梯度/pcs</th>
             <th class="text-center" width="100">香港交货<span style="font-size: 12px;">($)</span></th>
@@ -47,18 +47,19 @@
         </thead>
         <tbody class="text-center">
           <tr style="cursor: pointer;" v-for="list in storeList.content" @click="goProductDetail(list.storeid, list.batchCode)">
-            <td>
+            <td style="position: relative">
+              <img class="sellout-flag" v-if="list.status === 602" src="/images/search/sellout-search.png" alt="">
               <a v-if="list.code">{{list.code}}</a>
               <a v-if="!list.code">—</a>
             </td>
-            <td>
-              <a v-if="list.produceDate">{{list.produceDate}}</a>
-              <a v-if="!list.produceDate">—</a>
-            </td>
             <td>
               <a v-if="list.packaging">{{list.packaging}}</a>
               <a v-if="!list.packaging">—</a>
             </td>
+            <td>
+              <a v-if="list.produceDate">{{list.produceDate}}</a>
+              <a v-if="!list.produceDate">—</a>
+            </td>
             <td style="text-align: left;padding-left: 25px;">
               <a>
                 <div v-if="list.reserve">
@@ -120,7 +121,7 @@
               </a>
             </td>
             <td>
-              <buy :item="list"></buy>
+              <buy :item="list" :disabledFlag="list.status === 602"></buy>
             </td>
           </tr>
           <tr v-if="!storeList.content || storeList.content.length == 0">
@@ -342,6 +343,11 @@
     vertical-align: middle;
     text-align: center;
   }
+  .storeInfo .goodsList tbody tr td .sellout-flag {
+    position: absolute;
+    right: 0;
+    bottom: 0;
+  }
   .storeInfo .goodsList tbody tr td a {
     color: #474443;
   }
@@ -396,10 +402,7 @@
     margin-left: 10%;
   }
   .storeInfo .table tbody tr:hover{
-    background: #f5f5f5;
-  }
-  .storeInfo .table tbody tr:hover{
-    background: #f5f5f5;
+    background: #ecf2fd;
   }
   .storeInfo .goodsList .can-div-sell {
     text-align: left;

+ 44 - 18
components/search/GoodList.vue

@@ -40,33 +40,39 @@
         <table class="product-list" >
           <thead>
           <tr style="height: 40px;">
-            <th width="80"></th>
+            <!--<th width="80"></th>-->
             <th width="160">品牌/型号/类目</th>
-            <th width="100">装/生产日期</th>
-            <th width="110">店铺名称</th>
+            <th width="100">装/生产日期</th>
+            <th width="110">商家名称</th>
             <th width="110">库存</th>
             <th width="90">梯度/pcs</th>
             <th width="90" v-if="!crname_click_flag.rmb_click_flag">香港交货</th>
             <th width="110" v-if="!crname_click_flag.usd_click_flag">大陆交货<span style="font-size: 12px;">(含税)</span></th>
             <th width="110">交期<span style="font-size: 12px;">(天)</span></th>
+            <th width="100">规格书</th>
             <th width="100">操作</th>
           </tr>
           </thead>
           <tbody id="productList-content">
-          <tr v-for="item in good_list.components">
-            <td>
-              <nuxt-link class="component-img-box" :to="item.batchCode?`/store/${item.storeId}/${item.batchCode}`:`/product/component/${item.uuid}`">
-      <!--          <img :src="item.img?item.img:item.brand&&item.brand.logoUrl?item.brand.logoUrl:'/images/component/default.png'">-->
-                <img :src="item.batchCode?item.img?item.img:'/images/component/default.png':item.brand&&item.brand.logoUrl?item.brand.logoUrl:'/images/component/default.png'">
-              </nuxt-link>
-            </td>
+          <tr v-for="item in good_list.components" @click="goUnstandardDetail(item)">
+            <!--<td>-->
+            <!--<nuxt-link class="component-img-box" :to="item.batchCode?`/store/${item.storeId}/${item.batchCode}`:`/product/component/${item.uuid}`">-->
+              <!--&lt;!&ndash;          <img :src="item.img?item.img:item.brand&&item.brand.logoUrl?item.brand.logoUrl:'/images/component/default.png'">&ndash;&gt;-->
+              <!--<img class="component-img" :src="item.batchCode?item.img?item.img:'/images/component/default.png':item.brand&&item.brand.logoUrl?item.brand.logoUrl:'/images/component/default.png'">-->
+              <!--<img v-if="item.status === 602" class="sellout-flag" src="/images/search/sellout-search.png" alt="">-->
+            <!--</nuxt-link>-->
+          <!--</td>-->
             <td class="brand-code">
-              <div class="brand" v-if="item.brand.nameEn"><nuxt-link :to="`/product/brand/${item.brand.uuid}`" class="text-num" v-text="item.brand.nameEn"></nuxt-link></div>
-              <div class="brand" v-if="!item.brand.nameEn">—</div>
-              <div class="code"  v-if="item.code"><nuxt-link :to="`/product/component/${item.uuid}`" class="f16 text-bold text-num" v-text="item.code"></nuxt-link></div>
+              <img v-if="item.status === 602" class="sellout-flag" src="/images/search/sellout-search.png" alt="">
+              <div class="brand" v-if="item.brand&&item.brand.nameEn"><nuxt-link :to="`/product/brand/${item.brand.uuid}`" class="text-num" v-text="item.brand.nameEn"></nuxt-link></div>
+              <div class="brand" v-if="!item.brand||!item.brand.nameEn">{{item.brandEn||'—'}}</div>
+              <div class="code"  v-if="item.code">
+                <nuxt-link v-if="item.uuid" :to="`/product/component/${item.uuid}`" class="f16 text-bold text-num" v-text="item.code"></nuxt-link>
+                <span v-if="!item.uuid">{{item.code}}</span>
+              </div>
               <div class="brand" v-if="!item.code">—</div>
-              <div class="brand"  v-if="item.kind.nameCn"><nuxt-link :to="`/product/kind/${item.kindid}`" v-text="item.kind.nameCn"></nuxt-link></div>
-              <div class="brand" v-if="!item.kind.nameCn">—</div>
+              <div class="brand"  v-if="item.kind&&item.kind.nameCn"><nuxt-link :to="`/product/kind/${item.kindid}`" v-text="item.kind.nameCn"></nuxt-link></div>
+              <div class="brand" v-if="!item.kind||!item.kind.nameCn">{{item.kindName || ''}}</div>
             </td>
             <td>
               <div class="package" v-text="item.packaging"></div>
@@ -127,12 +133,16 @@
                 <span v-if="item.b2cMinDelivery == item.b2cMaxDelivery" v-text="item.b2cMinDelivery"></span>
               </div>
             </td>
+            <td>
+              <span v-if="item.attach && item.attach !=='1'"><a :href="item.attach" target="_blank"><img src="/images/store/common/pdf.png" alt=""/></a></span>
+              <span v-show="!item.attach || item.attach =='1'">—</span>
+            </td>
             <td>
               <div v-show="!item.reserve">
                 <span>—</span>
               </div>
               <div v-if="item.reserve > 0">
-              <buy :item="item" :isStoreStyle="false"></buy>
+              <buy :item="item" :isStoreStyle="false" :disabledFlag="item.status === 602"></buy>
               </div>
             </td>
           </tr>
@@ -282,6 +292,11 @@
         this.min_price = ''
         this.max_price = ''
         this.$emit('filterPriceEvent', this.filter)
+      },
+      goUnstandardDetail: function (comp) {
+        if (!comp.brand && comp.brandEn) {
+          this.$router.push('/store/' + comp.storeId + '/' + comp.batchCode)
+        }
       }
     }
   }
@@ -422,6 +437,7 @@
   .product-list .brand-code {
     font-size: 14px;
     text-align: center;
+    position: relative;
   }
   .product-list .brand-code .brand{
   font-size: 12px;
@@ -440,13 +456,23 @@
 
   .product-list tbody>tr {
     border: 1px solid #e8e8e8;
+    cursor: pointer ;
+    position: relative;
   }
-
+  .product-list tbody>tr:hover{
+   background: #ecf2fd;
+ }
   .product-list tbody>tr .component-img-box {
     width: 80px;
     height: 80px;
+    position: relative;
+  }
+  .product-list tbody>tr .brand-code .sellout-flag {
+    position: absolute;
+    right: 0;
+    bottom: 0;
   }
-  .product-list tbody>tr img {
+  .product-list tbody>tr .component-img-box .component-img {
     border: 1px solid #e8e8e8;
     margin: 10px 0 5px 0;
     max-width: 80px;

+ 46 - 25
components/store/CommodityInfo.vue

@@ -15,7 +15,9 @@
       <div class="commodity-detail">
         <div class="img">
           <img :src="commodity.img || '/images/store/common/default.png'" style="width: 256px;height: 256px;"/>
-          <div class="box"></div>
+          <div class="box">
+            <img v-if="commodity.status === 602" src="/images/store/isSellOut.png" alt="">
+          </div>
         </div>
         <div class="content">
           <div class="code">
@@ -46,7 +48,7 @@
               <span class="name">封&nbsp;装</span>:<span v-text="commodity.encapsulation || '无封装信息'"></span>
             </div>
             <div class="com-info">
-              <span class="name">库&nbsp;存</span>:<span v-text="commodity.reserve || 0"></span>
+              <span class="name">库&nbsp;存</span>:<span v-text="commodity.reserve || 0"></span><em style="margin-left: 3px;">PCS</em>
               (<span v-text="commodity.minBuyQty || 1"></span>个起订)
               <span :class="commodity.breakUp?'div-sell can-div-sell':'div-sell not-div-sell'" v-text="commodity.breakUp?'可拆卖':'不可拆卖'" ></span>
             </div>
@@ -59,7 +61,7 @@
                 <span>(天)</span>
               </div>
             </div>
-            <div class="com-info form-inline">
+            <div class="com-info form-inline" v-if="commodity.status !== 602 && commodity.status !== 612">
               <span class="name">数&nbsp;量</span>:
               <div class="input-group" style="width: 120px">
                 <div :class="fragment.canSub ? ' input-group-addon operate':'input-group-addon'" @click="fragment.canSub ?subNum():''" :style="!fragment.canSub ?'cursor: not-allowed;':''">-</div>
@@ -89,10 +91,11 @@
                  <span>{{(calculate || 0) | currency}}</span>
               </span>
             </div>
-            <div class="button">
+            <div class="button" v-if="commodity.status !== 602 && commodity.status !== 612">
               <button class="btn btn-default btn-primary" @click="buyNow(false, commodity)">加入购物车</button>
               <button class="btn btn-default btn-now" @click="buyNow(true, commodity)">立即购买</button>
             </div>
+            <div class="warn-area" v-if="commodity.status === 602 || commodity.status === 612" v-text="commodity.status === 602 ? '此产品已售罄':'此产品已下架'"></div>
           </div>
           <div class="price-block">
             <div class="commodity-price">
@@ -237,7 +240,7 @@
         if (prices && prices.length) {
           let _this = this
           for (let i = 0; i < prices.length; i++) {
-            if (_this.fragment.num >= prices[i].start && _this.fragment.num < prices[i].end) {
+            if (_this.fragment.num >= prices[i].start && _this.fragment.num <= prices[i].end) {
               _this.fragment.price = _this.fragment.currency === 'RMB' ? prices[i].rMBPrice : prices[i].uSDPrice
               break
             }
@@ -327,6 +330,7 @@
         }
         this.changeNum(newNum)
         getFragment(this.commodity, this.fragment)
+        this.onInput()
       },
       addNum () {
         let pack = this.commodity.perQty || this.commodity.minPackQty
@@ -338,6 +342,7 @@
         }
         this.changeNum(newNum)
         getFragment(this.commodity, this.fragment)
+        this.onInput()
       },
       inputNum () {
         if ((/^[\d]*$/).test(this.fragment.num)) {
@@ -531,12 +536,18 @@
     height: 320px;
   }
 
-  .commodity-detail .img img {
-    border: 1px solid #D6D3CE;
+  .commodity-detail .img >img {
+      border: 1px solid #D6D3CE;
   }
 
   .commodity-detail .img  .box {
     height: 62px;
+    position: relative;
+  }
+  .commodity-detail .img  .box img {
+    position: absolute;
+    right: 3px;
+    bottom: 64px;
   }
 
   .commodity-detail .content {
@@ -557,22 +568,26 @@
     line-height: 40px;
   }
 
-  .commodity-detail .content .com-info {
+	.commodity-detail .content .com-info {
+		font-size: 14px;
+		line-height: 26px;
+	}
+  .commodity-detail .content .com-info em {
     font-size: 14px;
     line-height: 26px;
-  }
-
-  .input-group .input-group-operate {
-    padding: 6px 12px;
-    font-size: 14px;
-    font-weight: 400;
-    line-height: 1;
-    color: #555;
-    text-align: center;
-    background-color: #eee;
-    border: 1px solid #ccc;
-    border-radius: 4px;
-  }
+    font-style: normal;
+  }
+	.input-group .input-group-operate {
+		padding: 6px 12px;
+		font-size: 14px;
+		font-weight: 400;
+		line-height: 1;
+		color: #555;
+		text-align: center;
+		background-color: #eee;
+		border: 1px solid #ccc;
+		border-radius: 4px;
+	}
 
   .input-group .input-group-operate:last-child {
     border-bottom-left-radius: 0;
@@ -593,6 +608,12 @@
   .content .com-info:hover a{
     color: #23527c;
   }
+  .content .warn-area {
+    font-size: 16px;
+    font-weight: bold;
+    color: #333;
+    margin-top: 15px;
+  }
   .commodity-info-detail {
     float: left;
     padding-top: 10px;
@@ -663,17 +684,17 @@
   }
 
   ul.list-inline {
-    margin: 0px;
+    margin: 0;
   }
 
   .commodity-price ul.list-inline li {
-    padding-left: 0px;
-    padding-right: 0px;
+    padding-left: 0;
+    padding-right: 0;
     border-bottom: 1px dashed #D6D3CE;
   }
 
   .commodity-price .table {
-    margin-bottom: 0px;
+    margin-bottom: 0;
   }
 
   .commodity-price ul>li:last-child {

+ 73 - 31
components/store/CommodityList.vue

@@ -6,7 +6,7 @@
           <span style="line-height: 34px;">产品分类</span>
         </div>
         <div class="category-content">
-          <el-tree :data="kinds" :props="defaultProps" accordion :highlight-current="true" @current-change="handlerCurrentNode"></el-tree>
+          <el-tree :data="kinds" :props="defaultProps" :default-expanded-keys="[0]" node-key="level" accordion :highlight-current="true" @current-change="handlerCurrentNode"></el-tree>
         </div>
       </div>
       <!-- 产品列表 -->
@@ -30,27 +30,29 @@
         <table class="goodslist" style="width: 970px">
           <thead>
           <tr style="height: 40px;">
-            <th width="90"></th>
+            <!--<th width="90"></th>-->
             <th width="150">品牌/型号</th>
             <th width="100">包装/生产日期</th>
             <th width="90">库存</th>
             <th width="90">梯度/pcs</th>
-            <th width="90">香港交货<span style="font-size: 12px;">($)</span></th>
-            <th width="100">大陆交货<span style="font-size: 12px;">(¥)</span></th>
+            <!--<th width="90">香港交货<span style="font-size: 12px;">($)</span></th>-->
+            <!--<th width="100">大陆交货<span style="font-size: 12px;">(¥)</span></th>-->
+            <th width="100">单价</th>
             <th width="100">交期(天)</th>
+            <th width="100">规格书</th>
             <th width="100">操作</th>
           </tr>
           </thead>
           <tbody id="goodslist-content">
-          <tr v-for="commodity in commodities.content">
-            <td class="commodity-icon">
-              <a :href="'/store/' + commodity.storeid + '/' + commodity.batchCode" target="_blank">
-                <div class="img"><img :src="commodity.img || '/images/store/common/default.png'"/></div>
-              </a>
-            </td>
+          <tr v-for="commodity in commodities.content" @click="goBatchDetail(storeInfo.uuid, commodity.batchCode)">
             <td class="brand-code">
-              <div class="brand" v-if="commodity.brandNameEn" v-text="commodity.brandNameEn"></div>
-              <div class="brand" v-if="!commodity.brandNameEn">—</div>
+              <img class="sellout-store-commodity" v-if="commodity.status === 602" src="/images/search/sellout-search.png" alt="">
+              <div class="brand" v-if="commodity.brandNameEn || commodity.brandEn">
+                <a v-if="commodity.brandNameEn && commodity.branduuid" @click="goBrandDetail('/product/brand/' + commodity.branduuid, $event)" v-text="commodity.brandNameEn"></a>
+                <span v-if="commodity.brandNameEn && !commodity.branduuid" v-text="commodity.brandNameEn"></span>
+                <span v-if="commodity.brandEn">{{commodity.brandEn}}</span>
+              </div>
+              <div class="brand" v-if="!commodity.brandNameEn && !commodity.brandEn">—</div>
               <div class="code" v-if="commodity.code" v-text="commodity.code"></div>
               <div class="code" v-if="!commodity.code">—</div>
             </td>
@@ -60,35 +62,39 @@
               <div class="date" v-if='commodity.produceDate' v-text="commodity.produceDate">2016-12-01</div>
             </td>
             <td style="text-align: left;vertical-align: middle;">
-              <div class="goods" v-if="commodity.reserve">
-                库存:<span v-text="commodity.reserve">31500</span>
+              <div class="goods" v-if="commodity.reserve || commodity.status === 602">
+                库存:<span v-text="commodity.reserve"></span>
               </div>
-              <div v-if="!commodity.reserve" style="text-align: center;margin-left: 0;"><span>—</span></div>
-              <div class="from" v-if="commodity.reserve && commodity.reserve>0">
-                起:<span v-if="commodity.minBuyQty" v-text="commodity.minBuyQty">300</span>
+              <div v-if="!commodity.reserve && commodity.status !== 602" style="text-align: center;margin-left: 0;"><span>—</span></div>
+              <div class="from" v-if="commodity.reserve && commodity.reserve>0 || commodity.status === 602">
+                起:<span v-if="commodity.minBuyQty" v-text="commodity.minBuyQty">300</span>
               </div>
               <!--<div class="multiple">
                 倍数:<span>1</span>
               </div>-->
-              <div class="can-div-sell" v-if="commodity.reserve" v-text="commodity.breakUp?'可拆卖':'不可拆卖'"></div>
+              <div class="can-div-sell" v-if="commodity.reserve || commodity.status === 602" v-text="commodity.breakUp?'可拆卖':'不可拆卖'"></div>
             </td>
             <td>
               <div v-for="price in commodity.prices" v-text="price.start + '+'"></div>
             </td>
+            <!--<td>-->
+              <!--<div v-show="commodity.currencyName.indexOf('USD')==-1 || !commodity.prices">-->
+                <!--<span>—</span>-->
+              <!--</div>-->
+              <!--<div v-for="price in commodity.prices">{{price.uSDPrice | currency}}</div>-->
+            <!--</td>-->
+            <!--<td>-->
+              <!--<div v-show="commodity.currencyName.indexOf('RMB')==-1 || !commodity.prices">-->
+                <!--<span>—</span>-->
+              <!--</div>-->
+              <!--<div v-for="price in commodity.prices" >{{price.rMBPrice | currency}}</div>-->
+            <!--</td>-->
             <td>
-              <div v-show="commodity.currencyName.indexOf('USD')==-1 || !commodity.prices">
-                <span>—</span>
-              </div>
-              <div v-for="price in commodity.prices">{{price.uSDPrice | currency}}</div>
+              <div v-for="price in commodity.prices">{{commodity.currencyName.indexOf('USD')!=-1?'$':'¥'}}{{commodity.currencyName.indexOf('USD')!=-1?price.uSDPrice:price.rMBPrice | currency}}</div>
+              <div v-if="commodity.currencyName.indexOf('RMB')==-1 || !commodity.prices && commodity.currencyName.indexOf('USD')==-1 || !commodity.prices"></div>
             </td>
             <td>
-              <div v-show="commodity.currencyName.indexOf('RMB')==-1 || !commodity.prices">
-                <span>—</span>
-              </div>
-              <div v-for="price in commodity.prices" >{{price.rMBPrice | currency}}</div>
-            </td>
-            <td>
-              <div v-if="commodity.b2cMinDelivery">交期:
+              <div v-if="commodity.b2cMinDelivery">
                 <!--{{commodity.b2cMinDelivery || 0}}-{{commodity.b2cMaxDelivery || 0}}天-->
                 <span v-if="commodity.b2cMinDelivery != commodity.b2cMaxDelivery" v-text="commodity.b2cMinDelivery + '-' + commodity.b2cMaxDelivery"></span>
                 <span v-if="commodity.b2cMinDelivery == commodity.b2cMaxDelivery" v-text="commodity.b2cMinDelivery"></span>
@@ -96,7 +102,13 @@
               <div v-if="!commodity.b2cMinDelivery"><span>—</span></div>
             </td>
             <td>
-              <buy :item="commodity"></buy>
+              <div v-if="commodity.attach">
+                <a :href="commodity.attach && commodity.attach !== '1'" target="_blank"><img src="/images/store/common/pdf.png" alt=""/></a>
+              </div>
+              <div v-show="!commodity.attach || commodity.attach == '1'">—</div>
+            </td>
+            <td>
+              <buy :item="commodity" :disabledFlag="commodity.status === 602"></buy>
             </td>
           </tr>
           <tr v-if="!commodities.content || commodities.content.length == 0">
@@ -128,6 +140,9 @@ function getAllLeafIds (kind) {
     return null
   }
   if (kind.isLeaf === 1) {
+    if (kind.nameCn === '其他') {
+      return '其他'
+    }
     return kind.id
   } else {
     if (!kind.children || kind.children.length === 0) {
@@ -193,6 +208,9 @@ export default {
   computed: {
     commodities () {
       return this.$store.state.shop.storeInfo.storeCommodity.data
+    },
+    storeInfo () {
+      return this.$store.state.shop.storeInfo.store.data
     }
   },
   methods: {
@@ -236,6 +254,13 @@ export default {
     handleCurrentChange (page) {
       this.pageParams.page = page
       this.pageCommodity(this.pageParams, this.ids, this.searchCode)
+    },
+    goBatchDetail (storeId, batchCode) {
+      this.$router.push('/store/' + storeId + '/' + batchCode)
+    },
+    goBrandDetail (url, event) {
+      event.stopPropagation()
+      this.$router.push(url)
     }
 //    goBack () {
 //      this.$router.back(-1)
@@ -393,6 +418,7 @@ export default {
 	#goods-list-fragment .goodslist .brand-code {
 		font-size: 14px;
 		text-align: center;
+    position: relative;
 	}
 
 	#goods-list-fragment #search_btn {
@@ -407,6 +433,9 @@ export default {
 	#goods-list-fragment .brand-code .code {
 		font-weight: 600;
 	}
+#goods-list-fragment .brand-code .brand a:hover {
+  color: #f39801;
+}
 
 	#goods-list-fragment .goodslist th {
 		color: rgb(50,50,50);
@@ -428,7 +457,14 @@ export default {
 
 	#goods-list-fragment .goodslist tbody>tr {
 		border: 1px solid #e8e8e8;
+    cursor: pointer;
 	}
+#goods-list-fragment .goodslist tbody>tr:hover{
+  background: #ecf2fd;
+}
+  #goods-list-fragment .goodslist tbody>tr td.commodity-icon {
+    position: relative;
+  }
 	#goods-list-fragment .goodslist tbody>tr td.commodity-icon .img{
 		border: 1px solid #e8e8e8;
 		margin: 10px;
@@ -441,6 +477,11 @@ export default {
 		width: 80px;
 		height: 80px;
 	}
+  #goods-list-fragment .goodslist tbody>tr td.brand-code .sellout-store-commodity {
+    position: absolute;
+    right: 0;
+    bottom: 0;
+  }
 	#goods-list-fragment .goodslist td {
 		font-size: 12px;
 		color: #333;
@@ -453,6 +494,7 @@ export default {
 
 	/* 物品列表按钮 */
 	#goods-list-fragment .btn-buy-now {
+    margin: 5px 0;
 		background-color: #5078CB;
 		color: #fff;
 		width: 80px;
@@ -462,7 +504,7 @@ export default {
 	}
 
 	#goods-list-fragment .btn-add-cart {
-		margin-top: 10px;
+    margin: 10px 0 5px 0;
 		color: #214797;
 		width: 80px;
 		height: 30px;

+ 20 - 4
components/store/ComponentInfo.vue

@@ -4,15 +4,16 @@
       <div class="head">
         <span class="tab">产品参数<b class="tip">(仅供参考,以实际产品为准)</b></span>
       </div>
-      <ul class="list-unstyled list-inline" style="margin-left: 0px;" v-if="component.properties">
-        <li v-for="property in component.properties">
+      <ul class="list-unstyled list-inline" style="margin-left: 0px;">
+        <li v-for="property in component.properties" v-if="property.value">
           <div class="property-name">
             <span v-text="property.property.labelCn"></span>:
           </div>
           <div class="property-value">{{property.value ? property.value : '-'}}</div>
         </li>
-        <li v-if="!component.properties || component.properties.length === 0" class="text-center" style="display:block;margin-top:0;">
-          暂无参数信息
+        <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>
         </li>
       </ul>
     </div>
@@ -25,6 +26,9 @@ export default {
   computed: {
     component () {
       return this.$store.state.shop.storeInfo.component.data
+    },
+    commodity () {
+      return this.$store.state.shop.storeInfo.commodity.data
     }
   }
 }
@@ -52,6 +56,18 @@ export default {
 		line-height: 30px;
 	}
 
+  .component-info ul li.text-info span.info{
+    padding-left: 270px;
+    font-size: 14px;
+    color: #333;
+  }
+  .component-info ul li.text-info span.info a{
+    font-size: 14px;
+    color: #5078cb;
+  }
+  .component-info ul li.text-info span.info a:hover{
+    text-decoration: underline!important ;
+  }
 	.component-info .head {
 		font-size: 14px;
 		font-weight: 600;

+ 11 - 1
components/store/RecommendProduct.vue

@@ -3,7 +3,11 @@
     <div class="recommend-list">
       <ul>
         <li v-for="commodity in commodities">
-          <div class="img"><a href="javascript:void(0);"><img :src="commodity.comImg.startsWith('static')?'/'+commodity.comImg:commodity.comImg"/></a></div>
+          <div class="img">
+            <a href="javascript:void(0);">
+              <img :src="commodity.comImg.startsWith('static')?'/'+commodity.comImg:commodity.comImg"/>
+            </a>
+          </div>
           <div class="content">
             <p v-text="commodity.comCode">MRFE6S9045NF001</p>
             <p class="color666" v-text="commodity.brandNameCn">PANFAEFQ</p>
@@ -21,6 +25,7 @@
             <div class="by-cart"><button title="加入购物车" @click="buyNow(false, commodity)"><img src="/images/store/icon/cart-blue.png"/></button></div>
             <div class="buy-now"><button title="立即购买" @click="buyNow(true, commodity)">立即购买</button></div>
           </div>
+          <img class="recommend-sellout" v-if="commodity.status == 602" src="/images/store/isSellOut.png" alt="">
         </li>
       </ul>
     </div>
@@ -395,4 +400,9 @@
     text-align: center;
     height: 260px;
   }
+  #recommend-fragment ul li .recommend-sellout {
+    position: absolute;
+    right: 0;
+    bottom: 0;
+  }
 </style>

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

@@ -14,7 +14,7 @@
                   </a>
                 </div>
                 <div class="icon-style">
-                  <!--<button class="btn btn-xs btn-danger btn-nav" v-if="!isFocus"><span class="watch">关注</span></button>-->
+                  <button class="btn btn-xs btn-danger btn-nav" v-if="!isFocus"><span class="watch">关注</span></button>
                   <span v-if="isFocus == 'false' || typeof isFocus == 'object'"><button type="text" @click="focus(storeInfo.id, storeInfo.storeName)" class="btn btn-xs btn-danger btn-nav"><span class="watch">关注</span></button></span>
                   <span v-if="isFocus == 'true'" ><button class="btn btn-xs btn-default btn-nav" style="width:50px"><span>已关注</span></button></span>
                   <span v-if="storeInfo.type == 'ORIGINAL_FACTORY'">&nbsp;<img src="/images/store/icon/icon-factory.png"/></span>

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

@@ -27,7 +27,8 @@
               uuid: route.params.uuid,
               ignoreUMall: false,
               ignoreStore: false,
-              storeIds: ''
+              storeIds: '',
+              status: 601
             }}),
         store.dispatch('getUmallStoreId'),
         store.dispatch('product/saveStores')

BIN
static/images/search/sellout-search.png


BIN
static/images/store/common/pdf.png


BIN
static/images/store/isSellOut.png