|
|
@@ -3,11 +3,11 @@
|
|
|
<div class="form-group">
|
|
|
<div class="storeIns">
|
|
|
<div class="sign">选择商家:</div>
|
|
|
- <div class="storeInList" v-for="item in store">
|
|
|
- <div :class="{'storeIn-active' : item.isSelected, 'item' : !item.isSelected}">
|
|
|
- <a>
|
|
|
- <img :src="item.logoUrl || '/images/component/default.png'" :alt="item.storeName" :title="item.storeName">
|
|
|
- </a>
|
|
|
+ <div class="storeInList" v-for="storeIn in store">
|
|
|
+ <div class="choose" :class="{'storeIn-active' : storeIn.isSelected, 'storeIn' : !storeIn.isSelected}" @click="addStore(storeIn)">
|
|
|
+ <a class="storeLogo">
|
|
|
+ <img :src="storeIn.logoUrl || '/images/component/default.png'" :alt="storeIn.storeName" :title="storeIn.storeName">
|
|
|
+ </a>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="storeInList" style="font-size: 14px" v-if="!store || store.length == 0">
|
|
|
@@ -20,12 +20,12 @@
|
|
|
<div style="font-size: 14px">
|
|
|
<span>产品匹配:</span>
|
|
|
<span v-if="store && store.length > 0">
|
|
|
- <input type="checkbox">
|
|
|
- <span> 库存寄售</span>
|
|
|
- <input type="checkbox">
|
|
|
- <span> 店铺自营</span>
|
|
|
+ <input type="checkbox" v-if="storeExist && UmallExist">
|
|
|
+ <span v-if="UmallExist"> 库存寄售</span>
|
|
|
+ <input type="checkbox" v-if="storeExist && UmallExist">
|
|
|
+ <span v-if="storeExist"> 店铺自营</span>
|
|
|
</span>
|
|
|
- <span v-if="!store || store.length == 0">暂无可匹配的信息</span>
|
|
|
+ <span v-if="!store || store.length == 0">暂无可匹配的信息 </span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -117,6 +117,13 @@
|
|
|
import Buy from '~components/common/buyOrCar/buyComponent.vue'
|
|
|
export default {
|
|
|
name: 'StoreInfo',
|
|
|
+ data () {
|
|
|
+ return {
|
|
|
+ storeIds: [],
|
|
|
+ UmallExist: false,
|
|
|
+ storeExist: false
|
|
|
+ }
|
|
|
+ },
|
|
|
components: {
|
|
|
Buy
|
|
|
},
|
|
|
@@ -137,31 +144,62 @@
|
|
|
store () {
|
|
|
return this.stores.data
|
|
|
},
|
|
|
- storeLists () {
|
|
|
- return this.$store.state.componentInformation.information
|
|
|
- },
|
|
|
storeList () {
|
|
|
- return this.storeLists.data
|
|
|
+ let storeList = this.$store.state.componentInformation.information.data
|
|
|
+ if (storeList.storeid && storeList.storeid !== '') {
|
|
|
+ this.storeIds = storeList.storeid
|
|
|
+ }
|
|
|
+ this.storeId
|
|
|
+ if (this.storeIds.length > 0) {
|
|
|
+ if (this.storeIds.indexOf(this.storeId) === -1) {
|
|
|
+ this.storeExist = true
|
|
|
+ } else {
|
|
|
+ this.storeIds.splice(this.storeIds.indexOf(this.storeId), 1)
|
|
|
+ if (this.storeIds.length > 0) {
|
|
|
+ this.storeExist = true
|
|
|
+ }
|
|
|
+ this.UmallExist = true
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return storeList
|
|
|
+ },
|
|
|
+ storeId () {
|
|
|
+ let UmallStoreId = this.$store.state.componentUmallStoreId.storeId.data
|
|
|
+ return UmallStoreId
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ addStore (storeIn) {
|
|
|
+ if (this.storeIds.indexOf(storeIn.uuid) !== -1) {
|
|
|
+ this.storeIds.splice(this.storeIds.indexOf(storeIn.uuid), 1)
|
|
|
+ storeIn.isSelected = false
|
|
|
+ } else {
|
|
|
+ this.storeIds.push(storeIn.uuid)
|
|
|
+ storeIn.isSelected = true
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
<style scoped>
|
|
|
- .container .storeIns{
|
|
|
+ .storeInfo .storeIns{
|
|
|
margin-top: 20px;
|
|
|
width: 1190px;
|
|
|
height: 48px;
|
|
|
line-height: 48px;
|
|
|
}
|
|
|
- .container .storeIns .sign {
|
|
|
+ .storeInfo .storeIns .sign {
|
|
|
display: table-cell;
|
|
|
vertical-align: middle;
|
|
|
font-size: 14px;
|
|
|
}
|
|
|
- .container .storeIns .storeInList {
|
|
|
+ .storeInfo .storeIns .storeInList {
|
|
|
display: table-cell;
|
|
|
}
|
|
|
- .container .storeIn {
|
|
|
+ .storeInfo .choose {
|
|
|
+ border: 1px solid #ccc;
|
|
|
+ }
|
|
|
+ .storeInfo .storeIn {
|
|
|
width: 98px;
|
|
|
height: 49px;
|
|
|
line-height: 30px;
|
|
|
@@ -172,7 +210,7 @@
|
|
|
margin-right: 15px;
|
|
|
cursor: pointer;
|
|
|
}
|
|
|
- .container .storeIn-active {
|
|
|
+ .storeInfo .storeIn-active {
|
|
|
width: 98px;
|
|
|
float: left;
|
|
|
border: 1px solid #5078cb;
|
|
|
@@ -181,22 +219,22 @@
|
|
|
margin-right: 15px;
|
|
|
cursor: pointer;
|
|
|
}
|
|
|
- .container .storeIn a,.componentDetail .storeIn-active a {
|
|
|
+ .storeInfo .storeIn a,.componentDetail .storeIn-active a {
|
|
|
display: table-cell;
|
|
|
height: 46px;
|
|
|
width: 98px;
|
|
|
text-align: center;
|
|
|
vertical-align: middle;
|
|
|
}
|
|
|
- .storeIn a>img,.storeIn-active a>img {
|
|
|
+ a.storeLogo>img,.storeIn-active a.storeLogo>img {
|
|
|
max-width: 95px;
|
|
|
max-height: 46px;
|
|
|
}
|
|
|
- .container .goodsList {
|
|
|
+ .storeInfo .goodsList {
|
|
|
clear: both;
|
|
|
font-size: 14px;
|
|
|
}
|
|
|
- .container .goodsList .goods-item {
|
|
|
+ .storeInfo .goodsList .goods-item {
|
|
|
height: 30px;
|
|
|
width: 120px;
|
|
|
background-color: #5078cb;
|
|
|
@@ -205,68 +243,68 @@
|
|
|
vertical-align: middle;
|
|
|
line-height: 30px;
|
|
|
}
|
|
|
- .container .goodsList thead {
|
|
|
+ .storeInfo .goodsList thead {
|
|
|
background-color: #F7F7F7;
|
|
|
}
|
|
|
- .container .goodsList tbody tr td{
|
|
|
+ .storeInfo .goodsList tbody tr td{
|
|
|
vertical-align: middle;
|
|
|
text-align: center;
|
|
|
}
|
|
|
- .container .goodsList tbody tr td:hover a{
|
|
|
+ .storeInfo .goodsList tbody tr td:hover a{
|
|
|
color: #474443;
|
|
|
}
|
|
|
-/* .container .goodsList .btn{
|
|
|
- border-radius: 4px;
|
|
|
- width: 80px;
|
|
|
- height: 30px;
|
|
|
- color: #214797;
|
|
|
- font-size: 14px;
|
|
|
- line-height: 14px;
|
|
|
- text-align: center;
|
|
|
- margin: 5px 0;
|
|
|
- padding: 0;
|
|
|
- user-select: none;
|
|
|
- background-image: none;
|
|
|
- border: 1px solid transparent;
|
|
|
- font-weight: 400;
|
|
|
- }
|
|
|
- .container .goodsList .btn-buyNow {
|
|
|
- color: #fff;
|
|
|
- background-color: #5078cb;
|
|
|
- }
|
|
|
- .container .goodsList .btn-default{
|
|
|
- background-color: #fff;
|
|
|
- border-color: #ccc;
|
|
|
- }*/
|
|
|
- .container .form-group input{
|
|
|
+ /*.storeInfo .goodsList .btn{*/
|
|
|
+ /*border-radius: 4px;*/
|
|
|
+ /*width: 80px;*/
|
|
|
+ /*height: 30px;*/
|
|
|
+ /*color: #214797;*/
|
|
|
+ /*font-size: 14px;*/
|
|
|
+ /*line-height: 14px;*/
|
|
|
+ /*text-align: center;*/
|
|
|
+ /*margin: 5px 0;*/
|
|
|
+ /*padding: 0;*/
|
|
|
+ /*user-select: none;*/
|
|
|
+ /*background-image: none;*/
|
|
|
+ /*border: 1px solid transparent;*/
|
|
|
+ /*font-weight: 400;*/
|
|
|
+ /*}*/
|
|
|
+ /*.storeInfo .goodsList .btn-buyNow {*/
|
|
|
+ /*color: #fff;*/
|
|
|
+ /*background-color: #5078cb;*/
|
|
|
+ /*}*/
|
|
|
+ /*.storeInfo .goodsList .btn-default{*/
|
|
|
+ /*background-color: #fff;*/
|
|
|
+ /*border-color: #ccc;*/
|
|
|
+ /*}*/
|
|
|
+ .storeInfo .form-group input{
|
|
|
vertical-align: sub;
|
|
|
}
|
|
|
- .container .height54{
|
|
|
+ .storeInfo .height54{
|
|
|
height: 54px;
|
|
|
background: none;
|
|
|
color: #333;
|
|
|
}
|
|
|
- .container .height54 th{
|
|
|
+ .storeInfo .height54 th{
|
|
|
line-height: 54px;
|
|
|
border-bottom: none;
|
|
|
padding: 0;
|
|
|
}
|
|
|
- .container .table tbody td{
|
|
|
+ .storeInfo .table tbody td{
|
|
|
border-bottom: #ddd 1px solid;
|
|
|
border-top: none;
|
|
|
}
|
|
|
- .container .table tbody{
|
|
|
+ .storeInfo .table tbody{
|
|
|
border-left: #ddd 1px solid;
|
|
|
border-right: #ddd 1px solid;
|
|
|
}
|
|
|
- .container .table tbody td div{
|
|
|
+ .storeInfo .table tbody td div{
|
|
|
text-align: center;
|
|
|
margin-left: 10%;
|
|
|
}
|
|
|
- .container .table tbody tr:hover{
|
|
|
+ .storeInfo .table tbody tr:hover{
|
|
|
background: #f5f5f5;
|
|
|
}
|
|
|
- .container .table tbody tr:hover{
|
|
|
+ .storeInfo .table tbody tr:hover{
|
|
|
background: #f5f5f5;
|
|
|
}
|
|
|
</style>
|