Browse Source

器件选型、器件详情页售罄状态,及页面改动调整。

yangc 8 years ago
parent
commit
bf6ce2f0f5

+ 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>
@@ -306,6 +307,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;

+ 8 - 2
components/product/component/StoreInfo.vue

@@ -47,7 +47,8 @@
         </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>
@@ -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">
@@ -331,6 +332,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;
   }

+ 8 - 5
components/search/GoodList.vue

@@ -63,6 +63,7 @@
             <!--</nuxt-link>-->
           <!--</td>-->
             <td class="brand-code">
+              <img v-if="item.status === 602" class="sellout-flag" src="/images/search/sellout-search.png" alt="">
               <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>
@@ -130,8 +131,8 @@
               </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">—</span>
+              <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">
@@ -407,6 +408,7 @@
   .product-list .brand-code {
     font-size: 14px;
     text-align: center;
+    position: relative;
   }
   .product-list .brand-code .brand{
   font-size: 12px;
@@ -426,6 +428,7 @@
   .product-list tbody>tr {
     border: 1px solid #e8e8e8;
     cursor: pointer ;
+    position: relative;
   }
   .product-list tbody>tr:hover{
    background: #ecf2fd;
@@ -435,10 +438,10 @@
     height: 80px;
     position: relative;
   }
-  .product-list tbody>tr .component-img-box .sellout-flag {
+  .product-list tbody>tr .brand-code .sellout-flag {
     position: absolute;
-    right: -29px;
-    bottom: -55px;
+    right: 0;
+    bottom: 0;
   }
   .product-list tbody>tr .component-img-box .component-img {
     border: 1px solid #e8e8e8;

+ 7 - 11
components/store/CommodityList.vue

@@ -45,13 +45,8 @@
           </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>-->
-                <!--<img class="sellout-store-commodity" v-if="commodity.status === 602" src="/images/search/sellout-search.png" alt="">-->
-              <!--</a>-->
-            <!--</td>-->
             <td class="brand-code">
+              <img class="sellout-store-commodity" v-if="commodity.status === 602" src="/images/search/sellout-search.png" alt="">
               <div class="brand" v-if="commodity.brandNameEn" v-text="commodity.brandNameEn"></div>
               <div class="brand" v-if="!commodity.brandNameEn">—</div>
               <div class="code" v-if="commodity.code" v-text="commodity.code"></div>
@@ -104,9 +99,9 @@
             </td>
             <td>
               <div v-if="commodity.attach">
-                <a :href="commodity.attach && commodity.attach !== 1" target="_blank"><img src="/images/store/common/pdf.png" alt=""/></a>
+                <a :href="commodity.attach && commodity.attach !== '1'" target="_blank"><img src="/images/store/common/pdf.png" alt=""/></a>
               </div>
-              <div v-show="!commodity.attach">—</div>
+              <div v-show="!commodity.attach || commodity.attach == '1'">—</div>
             </td>
             <td>
               <buy :item="commodity" :disabledFlag="commodity.status === 602"></buy>
@@ -406,6 +401,7 @@ export default {
 	#goods-list-fragment .goodslist .brand-code {
 		font-size: 14px;
 		text-align: center;
+    position: relative;
 	}
 
 	#goods-list-fragment #search_btn {
@@ -461,10 +457,10 @@ export default {
 		width: 80px;
 		height: 80px;
 	}
-  #goods-list-fragment .goodslist tbody>tr td.commodity-icon .sellout-store-commodity {
+  #goods-list-fragment .goodslist tbody>tr td.brand-code .sellout-store-commodity {
     position: absolute;
-    right: -16px;
-    bottom: -9px;
+    right: 0;
+    bottom: 0;
   }
 	#goods-list-fragment .goodslist td {
 		font-size: 12px;