|
|
|
@ -71,26 +71,29 @@ |
|
|
|
:class="itemTag.isChecked ? 'checkedText' : '' "> {{itemTag.value}}</text> |
|
|
|
</view> |
|
|
|
</li> |
|
|
|
</ul> |
|
|
|
<view style="padding-bottom: 100rpx;"> |
|
|
|
</ul> |
|
|
|
<view style="padding-bottom: 100rpx;"> |
|
|
|
<view class="checkList" v-for="item in temporaryList"> |
|
|
|
<view class="checkList-box"> |
|
|
|
{{item.name}} |
|
|
|
</view> |
|
|
|
<uni-number-box max="100000" v-model="item.productCount" @change="temporaryChange" /> |
|
|
|
</view> |
|
|
|
<view @tap.stop="delCarData(index)" style="margin-right: 20rpx"> |
|
|
|
<uni-icons color="red" type="minus" size="26"></uni-icons> |
|
|
|
</view> |
|
|
|
<view class="checkList-box"> |
|
|
|
{{item.name}} |
|
|
|
</view> |
|
|
|
<uni-number-box max="100000" v-model="item.productCount" @change="temporaryChange" /> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
<view class="popup-bottom" v-for="item in temporaryList"> |
|
|
|
<view class="popup-bottom-left"> |
|
|
|
<text>{{zNum}} 件</text> |
|
|
|
<text>¥{{zPrice}}</text> |
|
|
|
</view> |
|
|
|
<view class="popup-bottom-right"> |
|
|
|
<view class="bottom-btn" @tap="temporaryCheck">选好了</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
<view class="popup-bottom" v-for="item in temporaryList"> |
|
|
|
<view class="popup-bottom-left"> |
|
|
|
<text>{{zNum}} 件</text> |
|
|
|
<text>¥{{zPrice}}</text> |
|
|
|
</view> |
|
|
|
<view class="popup-bottom-right"> |
|
|
|
<view class="bottom-btn" @tap="temporaryCheck">选好了</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</uni-popup> |
|
|
|
</view> |
|
|
|
@ -140,29 +143,31 @@ |
|
|
|
</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view style="padding-bottom: 100rpx;"> |
|
|
|
<view class="popup-container" v-for="(item1,index1) in item.stockLogList1"> |
|
|
|
<view class="checkList" > |
|
|
|
<view style="margin-right:5%;" @tap="delShopSpec(item.productId,item1.attributeList)" :key="index1"> |
|
|
|
<uni-icons color="red" type="minus" size="26"></uni-icons> |
|
|
|
</view> |
|
|
|
<view class="checkList-box"> |
|
|
|
{{item1.name}} |
|
|
|
</view> |
|
|
|
<uni-number-box max="100000" v-model="item1.productCount" @change="carChange($event,index,index1)" /> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view style="padding-bottom: 100rpx;"> |
|
|
|
<view class="popup-container" v-for="(item1,index1) in item.stockLogList1"> |
|
|
|
<view class="checkList"> |
|
|
|
<view style="margin-right:5%;" @tap="delShopSpec(item.productId,item1.attributeList)" |
|
|
|
:key="index1"> |
|
|
|
<uni-icons color="red" type="minus" size="26"></uni-icons> |
|
|
|
</view> |
|
|
|
<view class="checkList-box"> |
|
|
|
{{item1.name}} |
|
|
|
</view> |
|
|
|
<uni-number-box max="100000" v-model="item1.productCount" |
|
|
|
@change="carChange($event,index,index1)" /> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="popup-bottom"> |
|
|
|
<view class="popup-bottom-left"> |
|
|
|
<text>{{carType}} 款 {{carNum}} 件</text> |
|
|
|
</view> |
|
|
|
<view class="popup-bottom-right"> |
|
|
|
<view class="bottom-btn" @tap="this.$refs.carPopup.close()">关闭</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="popup-bottom"> |
|
|
|
<view class="popup-bottom-left"> |
|
|
|
<text>{{carType}} 款 {{carNum}} 件</text> |
|
|
|
</view> |
|
|
|
<view class="popup-bottom-right"> |
|
|
|
<view class="bottom-btn" @tap="this.$refs.carPopup.close()">关闭</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</uni-popup> |
|
|
|
</view> |
|
|
|
@ -181,8 +186,8 @@ |
|
|
|
searchName: '', //搜索框输入值 |
|
|
|
shopId: '', //店铺id, |
|
|
|
checkbox: [], //需要分享的商品id |
|
|
|
temporaryNum: 0, |
|
|
|
priceType:'', |
|
|
|
temporaryNum: 0, |
|
|
|
priceType: '', |
|
|
|
goodsDetail: [], |
|
|
|
attrNameList: [], |
|
|
|
temporaryList: [], |
|
|
|
@ -264,8 +269,8 @@ |
|
|
|
} |
|
|
|
this.keyList.map((item, index) => { |
|
|
|
obj[item] = evalue[index] |
|
|
|
}) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
let jishuqi = 0; |
|
|
|
for (var i = 0; i < this.goodsDetail.attributeList.length; i++) { |
|
|
|
if (this.goodsDetail.attributeList[i].isChecked == true) { |
|
|
|
@ -290,25 +295,26 @@ |
|
|
|
if (this.temporaryList.length == 0) { |
|
|
|
this.temporaryList.push(this.attributeList); |
|
|
|
} else { |
|
|
|
for (var i = 0; i < this.temporaryList.length; i++) { |
|
|
|
if (this.temporaryList[i].name.indexOf(this.attributeList.name) == -1 || this.temporaryList[i].name.indexOf(this.attributeList.name) == 1) { |
|
|
|
if (this.temporaryList.length == (i + 1)) { |
|
|
|
this.temporaryList.push(this.attributeList); |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
}else{ |
|
|
|
return |
|
|
|
} |
|
|
|
for (var i = 0; i < this.temporaryList.length; i++) { |
|
|
|
if (this.temporaryList[i].name.indexOf(this.attributeList.name) == -1 || this.temporaryList[i] |
|
|
|
.name.indexOf(this.attributeList.name) == 1) { |
|
|
|
if (this.temporaryList.length == (i + 1)) { |
|
|
|
this.temporaryList.push(this.attributeList); |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
temporaryChange(val) { |
|
|
|
this.zNum = 0 |
|
|
|
for (var i = 0; i < this.temporaryList.length; i++) { |
|
|
|
this.zNum += this.temporaryList[i].productCount |
|
|
|
this.zNum += this.temporaryList[i].productCount || 0 |
|
|
|
} |
|
|
|
this.zPrice = this.zNum * this.purchasePrice |
|
|
|
}, |
|
|
|
@ -318,18 +324,18 @@ |
|
|
|
}, |
|
|
|
//获取弹出层状态 |
|
|
|
change(e) { |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
//弹出购物车或者商品规格选择弹窗 |
|
|
|
toggle(type, item) { |
|
|
|
|
|
|
|
this.type = type |
|
|
|
if (type == 'carPopup') { |
|
|
|
this.carNum = 0 |
|
|
|
for (let i = 0; i < this.carList.length; i++) { |
|
|
|
this.carNum += this.carList[i].num |
|
|
|
} |
|
|
|
this.$refs.carPopup.open('bottom') |
|
|
|
if (type == 'carPopup') { |
|
|
|
this.carNum = 0 |
|
|
|
for (let i = 0; i < this.carList.length; i++) { |
|
|
|
this.carNum += this.carList[i].num |
|
|
|
} |
|
|
|
this.$refs.carPopup.open('bottom') |
|
|
|
this.carType = this.carList.length |
|
|
|
} else { |
|
|
|
this.checkGoods(item); |
|
|
|
@ -338,90 +344,90 @@ |
|
|
|
|
|
|
|
}, |
|
|
|
//选择商品查询商品规格 |
|
|
|
checkGoods(item) { |
|
|
|
if(this.priceType == 1){ //批发价 |
|
|
|
this.purchasePrice = item.wholesalePrice; |
|
|
|
}else{ |
|
|
|
this.purchasePrice = item.price; |
|
|
|
checkGoods(item) { |
|
|
|
if (this.priceType == 1) { //批发价 |
|
|
|
this.purchasePrice = item.wholesalePrice; |
|
|
|
} else { |
|
|
|
this.purchasePrice = item.price; |
|
|
|
} |
|
|
|
|
|
|
|
this.goodsDetail = item; |
|
|
|
this.temporaryList = [] |
|
|
|
this.columns = [] |
|
|
|
this.keyList = [] |
|
|
|
if(this.carList != ''){ |
|
|
|
this.zNum = 0 |
|
|
|
for(let i=0;i<this.carList.length;i++){ |
|
|
|
|
|
|
|
if(item.id == this.carList[i].productId){ |
|
|
|
this.zNum = this.carList[i].num |
|
|
|
this.temporaryList = this.carList[i].stockLogList1 |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
this.tui.request("/app/productAttribute/selectAttributeAndValueByCategoryId", "POST", { |
|
|
|
categoryId: this.goodsDetail.categoryId |
|
|
|
}, false, true).then((res1) => { |
|
|
|
if (res1.code == 200) { |
|
|
|
if (typeof(res1.result) == 'string') { |
|
|
|
let newObj = JSON.parse(res1.result) |
|
|
|
let newArr = [] |
|
|
|
for (let val in newObj) { |
|
|
|
let valueObj = []; |
|
|
|
for (var i = 0; i < newObj[val].length; i++) { |
|
|
|
valueObj.push({ |
|
|
|
value: newObj[val][i], |
|
|
|
isChecked: false |
|
|
|
}) |
|
|
|
} |
|
|
|
newArr.push({ |
|
|
|
name: val, |
|
|
|
value: valueObj |
|
|
|
}) |
|
|
|
} |
|
|
|
this.goodsDetail.attributeList = newArr; |
|
|
|
this.goodsDetail.attributeList.forEach((item, index) => { |
|
|
|
this.columns[index] = item.value; |
|
|
|
this.keyList[index] = item.name; |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
this.tui.toast(res.message) |
|
|
|
} |
|
|
|
|
|
|
|
this.goodsDetail = item; |
|
|
|
this.temporaryList = [] |
|
|
|
this.columns = [] |
|
|
|
this.keyList = [] |
|
|
|
if (this.carList != '') { |
|
|
|
this.zNum = 0 |
|
|
|
for (let i = 0; i < this.carList.length; i++) { |
|
|
|
|
|
|
|
if (item.id == this.carList[i].productId) { |
|
|
|
this.zNum = this.carList[i].num |
|
|
|
this.temporaryList = this.carList[i].stockLogList1 |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
this.tui.request("/app/productAttribute/selectAttributeAndValueByCategoryId", "POST", { |
|
|
|
categoryId: this.goodsDetail.categoryId |
|
|
|
}, false, true).then((res1) => { |
|
|
|
if (res1.code == 200) { |
|
|
|
if (typeof(res1.result) == 'string') { |
|
|
|
let newObj = JSON.parse(res1.result) |
|
|
|
let newArr = [] |
|
|
|
for (let val in newObj) { |
|
|
|
let valueObj = []; |
|
|
|
for (var i = 0; i < newObj[val].length; i++) { |
|
|
|
valueObj.push({ |
|
|
|
value: newObj[val][i], |
|
|
|
isChecked: false |
|
|
|
}) |
|
|
|
} |
|
|
|
newArr.push({ |
|
|
|
name: val, |
|
|
|
value: valueObj |
|
|
|
}) |
|
|
|
} |
|
|
|
this.goodsDetail.attributeList = newArr; |
|
|
|
this.goodsDetail.attributeList.forEach((item, index) => { |
|
|
|
this.columns[index] = item.value; |
|
|
|
this.keyList[index] = item.name; |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
this.tui.toast(res.message) |
|
|
|
} |
|
|
|
}).catch((res) => {}) |
|
|
|
}, |
|
|
|
//顶部搜索框 |
|
|
|
search(res) { |
|
|
|
this.searchName = res.value |
|
|
|
this.searchName = res.value |
|
|
|
this.getShareList() |
|
|
|
}, |
|
|
|
inputDialogToggle() { |
|
|
|
this.$refs.inputDialog.open() |
|
|
|
}, |
|
|
|
carChange(e,index,index1) { |
|
|
|
this.carNum = 0 |
|
|
|
for (let i = 0; i < this.carList.length; i++) { |
|
|
|
this.carList[i].num = 0 |
|
|
|
for (let m = 0; m < this.carList[i].stockLogList1.length; m++) { |
|
|
|
this.carList[i].num += this.carList[i].stockLogList1[m].productCount |
|
|
|
} |
|
|
|
this.carNum += this.carList[i].num |
|
|
|
} |
|
|
|
}, |
|
|
|
carChange(e, index, index1) { |
|
|
|
this.carNum = 0 |
|
|
|
for (let i = 0; i < this.carList.length; i++) { |
|
|
|
this.carList[i].num = 0 |
|
|
|
for (let m = 0; m < this.carList[i].stockLogList1.length; m++) { |
|
|
|
this.carList[i].num += this.carList[i].stockLogList1[m].productCount |
|
|
|
} |
|
|
|
this.carNum += this.carList[i].num |
|
|
|
} |
|
|
|
}, |
|
|
|
//弹窗选择规格后,点击弹窗中选好了按钮 |
|
|
|
temporaryCheck() { |
|
|
|
for (var i = 0; i < this.temporaryList.length; i++) { |
|
|
|
if(this.temporaryList[i].productCount <= 0){ |
|
|
|
this.tui.toast("商品数量不能为零!") |
|
|
|
return; |
|
|
|
} |
|
|
|
temporaryCheck() { |
|
|
|
for (var i = 0; i < this.temporaryList.length; i++) { |
|
|
|
if (this.temporaryList[i].productCount <= 0) { |
|
|
|
this.tui.toast("商品数量不能为零!") |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
let data = { |
|
|
|
productId: this.goodsDetail.id, |
|
|
|
price: this.zPrice, |
|
|
|
num: this.zNum, |
|
|
|
realPrice:this.priceType == 0?this.goodsDetail.price:this.goodsDetail.wholesalePrice, |
|
|
|
num: this.zNum, |
|
|
|
realPrice: this.priceType == 0 ? this.goodsDetail.price : this.goodsDetail.wholesalePrice, |
|
|
|
productName: this.goodsDetail.productName, |
|
|
|
productSn: this.goodsDetail.productSn, |
|
|
|
productPicture: this.goodsDetail.productPicture, |
|
|
|
@ -429,30 +435,30 @@ |
|
|
|
stockLogList1: this.temporaryList, |
|
|
|
wholesalePrice: this.goodsDetail.wholesalePrice, |
|
|
|
lsprice: this.goodsDetail.price |
|
|
|
} |
|
|
|
|
|
|
|
if(this.carList.length == 0){ |
|
|
|
this.carList.push(data) |
|
|
|
}else{ |
|
|
|
let aa = true; |
|
|
|
for(let i = 0; i < this.carList.length; i++){ |
|
|
|
if(this.carList[i].productId == data.productId){ |
|
|
|
this.carList[i] = data |
|
|
|
aa = false |
|
|
|
} |
|
|
|
} |
|
|
|
if(aa){ |
|
|
|
this.carList.push(data) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
for (let i = 0; i < this.carList.length; i++) { |
|
|
|
this.carList[i].num = 0 |
|
|
|
for (let m = 0; m < this.carList[i].stockLogList1.length; m++) { |
|
|
|
this.carList[i].num += this.carList[i].stockLogList1[m].productCount |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (this.carList.length == 0) { |
|
|
|
this.carList.push(data) |
|
|
|
} else { |
|
|
|
let aa = true; |
|
|
|
for (let i = 0; i < this.carList.length; i++) { |
|
|
|
if (this.carList[i].productId == data.productId) { |
|
|
|
this.carList[i] = data |
|
|
|
aa = false |
|
|
|
} |
|
|
|
} |
|
|
|
if (aa) { |
|
|
|
this.carList.push(data) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
for (let i = 0; i < this.carList.length; i++) { |
|
|
|
this.carList[i].num = 0 |
|
|
|
for (let m = 0; m < this.carList[i].stockLogList1.length; m++) { |
|
|
|
this.carList[i].num += this.carList[i].stockLogList1[m].productCount |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
this.temporaryList = [] |
|
|
|
this.purchasePrice = '' |
|
|
|
this.zPrice = '' |
|
|
|
@ -466,57 +472,81 @@ |
|
|
|
this.$refs.popup.close() |
|
|
|
|
|
|
|
}, |
|
|
|
//删除整条商品 |
|
|
|
delShop(item) { |
|
|
|
var that = this; |
|
|
|
uni.showModal({ |
|
|
|
title: "提示", |
|
|
|
content: "确定删除此条商品吗?", |
|
|
|
success: function(res) { |
|
|
|
if (res.confirm) { |
|
|
|
for(let i=0;i<that.carList.length;i++){ |
|
|
|
if(that.carList[i].productId == item.productId){ |
|
|
|
that.carNum -= that.carList[i].num |
|
|
|
that.carList.splice(i, 1) |
|
|
|
} |
|
|
|
} |
|
|
|
that.carType = that.carList.length |
|
|
|
} |
|
|
|
that.$forceUpdate() |
|
|
|
} |
|
|
|
}) |
|
|
|
//删除整条商品 |
|
|
|
delShop(item) { |
|
|
|
var that = this; |
|
|
|
uni.showModal({ |
|
|
|
title: "提示", |
|
|
|
content: "确定删除此条商品吗?", |
|
|
|
success: function(res) { |
|
|
|
if (res.confirm) { |
|
|
|
for (let i = 0; i < that.carList.length; i++) { |
|
|
|
if (that.carList[i].productId == item.productId) { |
|
|
|
that.carNum -= that.carList[i].num |
|
|
|
that.carList.splice(i, 1) |
|
|
|
} |
|
|
|
} |
|
|
|
that.carType = that.carList.length |
|
|
|
} |
|
|
|
that.$forceUpdate() |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
//删除商品下的某一个规格 |
|
|
|
delShopSpec(index,index1) { |
|
|
|
var that = this; |
|
|
|
uni.showModal({ |
|
|
|
title: "提示", |
|
|
|
content: "确定删除此条商品吗?", |
|
|
|
success: function(res) { |
|
|
|
if (res.confirm) { |
|
|
|
for(let i=0;i<that.carList.length;i++){ |
|
|
|
if(that.carList[i].productId == index){ |
|
|
|
for(let m=0;m<that.carList[i].stockLogList1.length;m++){ |
|
|
|
|
|
|
|
if(that.carList[i].stockLogList1[m].attributeList == index1){ |
|
|
|
that.carList[i].num -= that.carList[i].stockLogList1[m].productCount |
|
|
|
that.carNum -= that.carList[i].stockLogList1[m].productCount |
|
|
|
that.carList[i].stockLogList1.splice(m, 1) |
|
|
|
continue; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
if(that.carList[i].stockLogList1.length == 0){ |
|
|
|
that.carList.splice(i, 1) |
|
|
|
} |
|
|
|
} |
|
|
|
that.carType = that.carList.length |
|
|
|
} |
|
|
|
that.$forceUpdate() |
|
|
|
} |
|
|
|
}) |
|
|
|
//选商品的时候能删除规格 |
|
|
|
delCarData(index) { |
|
|
|
this.temporaryList.splice(index, 1); |
|
|
|
this.temporaryChange() |
|
|
|
// uni.showModal({ |
|
|
|
// title: "提示", |
|
|
|
// content: "确定删除此条商品吗?", |
|
|
|
// success: function(res) { |
|
|
|
// if(res.confirm){ |
|
|
|
// that.carList.get(id).productCount -= that.carList.get(id).stockLogList.get(name); |
|
|
|
// that.carList.get(id).stockLogList.delete(name) |
|
|
|
// that.carList.get(id).price = that.carList.get(id).productCount * that.carList.get(id).purchasePrice |
|
|
|
// if(that.carList.get(id).stockLogList.size == 0){ |
|
|
|
// that.carList.delete(id) |
|
|
|
// } |
|
|
|
|
|
|
|
// that.getAllPrice() |
|
|
|
// } |
|
|
|
// that.$forceUpdate() |
|
|
|
// } |
|
|
|
// }) |
|
|
|
|
|
|
|
}, |
|
|
|
//删除商品下的某一个规格 |
|
|
|
delShopSpec(index, index1) { |
|
|
|
var that = this; |
|
|
|
uni.showModal({ |
|
|
|
title: "提示", |
|
|
|
content: "确定删除此条商品吗?", |
|
|
|
success: function(res) { |
|
|
|
if (res.confirm) { |
|
|
|
for (let i = 0; i < that.carList.length; i++) { |
|
|
|
if (that.carList[i].productId == index) { |
|
|
|
for (let m = 0; m < that.carList[i].stockLogList1.length; m++) { |
|
|
|
|
|
|
|
if (that.carList[i].stockLogList1[m].attributeList == index1) { |
|
|
|
that.carList[i].num -= that.carList[i].stockLogList1[m] |
|
|
|
.productCount |
|
|
|
that.carNum -= that.carList[i].stockLogList1[m].productCount |
|
|
|
that.carList[i].stockLogList1.splice(m, 1) |
|
|
|
continue; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
if (that.carList[i].stockLogList1.length == 0) { |
|
|
|
that.carList.splice(i, 1) |
|
|
|
} |
|
|
|
} |
|
|
|
that.carType = that.carList.length |
|
|
|
} |
|
|
|
that.$forceUpdate() |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
//点击底部下单按钮 |
|
|
|
backPrevPage() { |
|
|
|
@ -524,8 +554,8 @@ |
|
|
|
this.$refs.form.validate().then(res => { |
|
|
|
let obj = { |
|
|
|
mobile: that.formData.consigneeMobile, |
|
|
|
username: that.formData.consigneeName, |
|
|
|
oldSaleId:this.khid, |
|
|
|
username: that.formData.consigneeName, |
|
|
|
oldSaleId: this.khid, |
|
|
|
sale: { |
|
|
|
area: this.addressObj.area, |
|
|
|
city: this.addressObj.city, |
|
|
|
@ -539,28 +569,24 @@ |
|
|
|
this.tui.request("/app/sale/savePresale", "post", obj, false, false).then((res) => { |
|
|
|
if (res.code == 200) { |
|
|
|
this.tui.toast("下单成功,待商家配货") |
|
|
|
setTimeout(() => { |
|
|
|
uni.reLaunch({ |
|
|
|
url:`/pages/login/login` |
|
|
|
}) |
|
|
|
},2000) |
|
|
|
setTimeout(() => { |
|
|
|
uni.reLaunch({ |
|
|
|
url: `/pages/login/login` |
|
|
|
}) |
|
|
|
}, 2000) |
|
|
|
} else { |
|
|
|
this.tui.toast(res.message) |
|
|
|
} |
|
|
|
}) |
|
|
|
}).catch(err => { |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}) |
|
|
|
}, |
|
|
|
openPicker() { |
|
|
|
|
|
|
|
this.show = true |
|
|
|
}, |
|
|
|
|
|
|
|
onhideShow() { |
|
|
|
this.show = false |
|
|
|
|
|
|
|
}, |
|
|
|
//选中省市区 |
|
|
|
onsetCity(e) { |
|
|
|
@ -573,8 +599,6 @@ |
|
|
|
city: data.city, |
|
|
|
area: data.area, |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
//点击分类获取商品列表 |
|
|
|
getShareList(id) { |
|
|
|
@ -585,17 +609,17 @@ |
|
|
|
pageSize: '10' |
|
|
|
}, false, true).then((res) => { |
|
|
|
if (res.code == 200) { |
|
|
|
this.shopList = res.result.shareList.records |
|
|
|
this.shopList = res.result.shareList.records |
|
|
|
this.priceType = res.result.share.priceType |
|
|
|
this.shopId = res.result.shareList.records[0].shopId |
|
|
|
for(var i= 0;i<this.shopList.length;i++){ |
|
|
|
if(res.result.share.priceType == 1){ //批发价 |
|
|
|
this.shopList[i].discountAmount = this.shopList[i].wholesalePrice |
|
|
|
}else{ //零售 |
|
|
|
this.shopList[i].discountAmount = this.shopList[i].price |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
this.shopId = res.result.shareList.records[0].shopId |
|
|
|
for (var i = 0; i < this.shopList.length; i++) { |
|
|
|
if (res.result.share.priceType == 1) { //批发价 |
|
|
|
this.shopList[i].discountAmount = this.shopList[i].wholesalePrice |
|
|
|
} else { //零售 |
|
|
|
this.shopList[i].discountAmount = this.shopList[i].price |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
this.tui.toast(res.message) |
|
|
|
} |
|
|
|
@ -637,13 +661,13 @@ |
|
|
|
border-radius: 10px; |
|
|
|
} |
|
|
|
|
|
|
|
.popup-content { |
|
|
|
align-items: center; |
|
|
|
justify-content: center; |
|
|
|
padding: 15px; |
|
|
|
height: 1200rpx; |
|
|
|
background-color: #fff; |
|
|
|
margin-bottom: 30rpx; |
|
|
|
.popup-content { |
|
|
|
align-items: center; |
|
|
|
justify-content: center; |
|
|
|
padding: 15px; |
|
|
|
height: 1200rpx; |
|
|
|
background-color: #fff; |
|
|
|
margin-bottom: 30rpx; |
|
|
|
overflow: scroll; |
|
|
|
} |
|
|
|
|
|
|
|
@ -699,22 +723,22 @@ |
|
|
|
} |
|
|
|
|
|
|
|
.popup-pay-content { |
|
|
|
align-items: center; |
|
|
|
justify-content: center; |
|
|
|
padding: 0 15px 15px 15px; |
|
|
|
width: 95%; |
|
|
|
margin: 0 auto; |
|
|
|
height: auto; |
|
|
|
background-color: #fff; |
|
|
|
align-items: center; |
|
|
|
justify-content: center; |
|
|
|
padding: 0 15px 15px 15px; |
|
|
|
width: 95%; |
|
|
|
margin: 0 auto; |
|
|
|
height: auto; |
|
|
|
background-color: #fff; |
|
|
|
} |
|
|
|
|
|
|
|
.bottom-box { |
|
|
|
width: 100%; |
|
|
|
height: 120rpx; |
|
|
|
position: fixed; |
|
|
|
bottom: 0; |
|
|
|
display: flex; |
|
|
|
background: #fff; |
|
|
|
width: 100%; |
|
|
|
height: 120rpx; |
|
|
|
position: fixed; |
|
|
|
bottom: 0; |
|
|
|
display: flex; |
|
|
|
background: #fff; |
|
|
|
z-index: 99; |
|
|
|
} |
|
|
|
|
|
|
|
@ -783,7 +807,7 @@ |
|
|
|
|
|
|
|
.content-right { |
|
|
|
width: 100%; |
|
|
|
overflow-y: scroll; |
|
|
|
overflow-y: scroll; |
|
|
|
margin-bottom: 150rpx; |
|
|
|
} |
|
|
|
|
|
|
|
@ -909,13 +933,13 @@ |
|
|
|
} |
|
|
|
|
|
|
|
.popup-bottom { |
|
|
|
width: 95%; |
|
|
|
height: 100rpx; |
|
|
|
position: fixed; |
|
|
|
bottom: 0; |
|
|
|
left: 2.5%; |
|
|
|
display: flex; |
|
|
|
z-index: 99; |
|
|
|
width: 95%; |
|
|
|
height: 100rpx; |
|
|
|
position: fixed; |
|
|
|
bottom: 0; |
|
|
|
left: 2.5%; |
|
|
|
display: flex; |
|
|
|
z-index: 99; |
|
|
|
background: #fff; |
|
|
|
} |
|
|
|
|
|
|
|
|