wangfukang 3 years ago
parent
commit
375a37a320
  1. 15
      pages/index/downStearmList.vue
  2. 45
      pages/index/shareStyle.vue

15
pages/index/downStearmList.vue

@ -319,7 +319,7 @@
}, },
//编辑每一个的单价 //编辑每一个的单价
clickPrice() { clickPrice() {
this.$refs.inputDialog.open() this.$refs.inputDialog.open('bottom')
}, },
//获取弹出层状态 //获取弹出层状态
change(e) { change(e) {
@ -631,12 +631,13 @@
} }
.popup-pay-content { .popup-pay-content {
align-items: center; align-items: center;
justify-content: center; justify-content: center;
padding: 0 15px 15px 15px; padding: 0 15px 15px 15px;
width: 500rpx; width: 95%;
height: auto; margin: 0 auto;
background-color: #fff; height: auto;
background-color: #fff;
} }
.bottom-box { .bottom-box {

45
pages/index/shareStyle.vue

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

Loading…
Cancel
Save