|
|
@@ -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;
|