|
|
|
@ -5,13 +5,13 @@ |
|
|
|
</view> |
|
|
|
<view class="content-box"> |
|
|
|
<view class="content-left"> |
|
|
|
<view class="left-box" v-for="(item, index) in indexList" :key="item" |
|
|
|
<view class="left-box" v-for="(item, index) in indexList" :key="index" |
|
|
|
:class="item.parentId ? 'left-box-hover':''" @tap="clickLeftBtn(index)"> |
|
|
|
<text style="width: 100%;height: 90rpx;line-height: 90rpx;display: inline-block;overflow: hidden;" :class="item.parentId ? 'red' :''">{{item.categoryName}}</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="content-right"> |
|
|
|
<view class="right-box" v-for="item in shopList" :key="item"> |
|
|
|
<view class="right-box" v-for="(item,index) in goodsList" :key="index"> |
|
|
|
<!-- 当商品的delFlag=0和未入库状态时,显示此遮罩,点击弹出弹窗提示不能操作 --> |
|
|
|
<view class="shop-mask" v-if="item.delFlag == 0" @tap.stop="clickMask(item)"></view> |
|
|
|
<view class="box-left"> |
|
|
|
@ -68,8 +68,8 @@ |
|
|
|
<!-- 购物车弹出层 --> |
|
|
|
<uni-popup ref="carPopup" background-color="#fff"> |
|
|
|
<view class="popup-content"> |
|
|
|
<view v-for="item in shopList" style="position: relative;"> |
|
|
|
<view class="popup-title" v-if="item.checked == true"> |
|
|
|
<view v-for="(item,index) in gwcList" style="position: relative;" :key="index"> |
|
|
|
<view class="popup-title"> |
|
|
|
<view class="popup-title-left"> |
|
|
|
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/c09dfa8c61c949f8b0dbb8f041d5a501.png" alt=""> |
|
|
|
</view> |
|
|
|
@ -106,7 +106,8 @@ |
|
|
|
indexList: [], |
|
|
|
pageNum: 1, //分页的页码 |
|
|
|
shopList: [], |
|
|
|
info: 0, |
|
|
|
info: 0, |
|
|
|
goodsList:[], |
|
|
|
categoryId: '', //分类id |
|
|
|
searchName: '', //搜索框输入值 |
|
|
|
shopId: '', //店铺id, |
|
|
|
@ -115,7 +116,8 @@ |
|
|
|
carList:[], |
|
|
|
carNum:0, |
|
|
|
carType:0, |
|
|
|
type:'' |
|
|
|
type:'', |
|
|
|
gwcList:[] |
|
|
|
} |
|
|
|
}, |
|
|
|
created() { |
|
|
|
@ -144,9 +146,10 @@ |
|
|
|
this.indexList[i].parentId = true |
|
|
|
} else { |
|
|
|
this.indexList[i].parentId = false |
|
|
|
} |
|
|
|
} |
|
|
|
this.getShareList(this.indexList[i].id); |
|
|
|
} |
|
|
|
this.getShareList(this.indexList[0].id); |
|
|
|
|
|
|
|
} else { |
|
|
|
this.tui.toast(res.message) |
|
|
|
} |
|
|
|
@ -158,11 +161,12 @@ |
|
|
|
categoryId: id, |
|
|
|
supplierName: this.searchName, |
|
|
|
pageNum: this.pageNum, |
|
|
|
pageSize: '10' |
|
|
|
pageSize: '100' |
|
|
|
}, false, false).then((res) => { |
|
|
|
if (res.code == 200) { |
|
|
|
console.log(res.result.records) |
|
|
|
this.shopList = res.result.records |
|
|
|
this.shopList.push(res.result.records) |
|
|
|
this.goodsList = this.shopList[0] |
|
|
|
} else { |
|
|
|
this.tui.toast(res.message) |
|
|
|
} |
|
|
|
@ -198,8 +202,9 @@ |
|
|
|
} else { |
|
|
|
this.indexList[i].parentId = false |
|
|
|
} |
|
|
|
} |
|
|
|
this.getShareList(this.indexList[index].id) |
|
|
|
} |
|
|
|
this.goodsList = this.shopList[index] |
|
|
|
// this.getShareList(this.indexList[index].id) |
|
|
|
}, |
|
|
|
//选中商品 |
|
|
|
checkboxChange(e,item) { |
|
|
|
@ -208,20 +213,28 @@ |
|
|
|
this.carList.splice(this.carList.indexOf(item.id),1) |
|
|
|
}else{ |
|
|
|
this.carList.push(item.id) |
|
|
|
} |
|
|
|
} |
|
|
|
for(let i=0;i<this.gwcList.length;i++){ |
|
|
|
if(this.gwcList[i].id==item.id){ |
|
|
|
this.gwcList.splice(this.carList.indexOf(item.id),1) |
|
|
|
}else{ |
|
|
|
this.gwcList.push(item) |
|
|
|
} |
|
|
|
} |
|
|
|
console.log('gwcList',this.gwcList) |
|
|
|
}, |
|
|
|
//点击分享按钮 |
|
|
|
clickShareBtn(e) { |
|
|
|
let data = {} |
|
|
|
if (e == 'all') { |
|
|
|
data = { |
|
|
|
shopId: '002', |
|
|
|
// shopId: , |
|
|
|
shareType: '1', //1 分享全部 |
|
|
|
|
|
|
|
} |
|
|
|
} else { |
|
|
|
data = { |
|
|
|
shopId: '002', |
|
|
|
// shopId: '002', |
|
|
|
shareType: '2', //2 分享勾选商品 |
|
|
|
shareProductId: this.carList //勾选商品的id string类型 中间通过”,“连接 |
|
|
|
} |
|
|
|
@ -330,7 +343,7 @@ |
|
|
|
.bottom-box { |
|
|
|
width: 100%; |
|
|
|
position: fixed; |
|
|
|
bottom: 0; |
|
|
|
bottom: 30rpx; |
|
|
|
display: flex; |
|
|
|
} |
|
|
|
|
|
|
|
|