调整实物h5-5/5

master
游梦婷 2 years ago
parent f611781b44
commit 70e6143b5d
  1. 37
      components/cart-choose/cart-choose.vue
  2. 5
      components/goods-list/goods-list.vue
  3. 29
      physical-merchants/classify/cart/cart.vue
  4. 2
      physical-merchants/classify/goodsDetail/goodsDetail.vue
  5. 58
      physical-merchants/classify/order/orderDetail.vue
  6. 5
      physical-merchants/classify/order/pay.vue
  7. 43
      physical-merchants/classify/order/wuliuPupup/wuliuPupup.vue
  8. 13
      physical-merchants/settleAccounts/settleAccounts.vue
  9. 4
      uni_modules/uni-number-box/components/uni-number-box/uni-number-box.vue

@ -57,7 +57,7 @@
<!-- 数量分类 -->
<view class="choose-bottom-title paddbotm10 fontwig6 font14 mart15 choose-num">
<view class="">购买数量</view>
<uni-number-box v-model="chooseNumber" :min="1" :max="specificationList[chooseIndex].stock || 9999999" @noMoreLess="noMoreLess" @change="changeNumValue" />
<uni-number-box v-model="chooseNumber" :disabled="specificationList[chooseIndex].stock==0" :min="1" :max="specificationList[chooseIndex].stock || 9999999" @noMoreLess="noMoreLess" @noMore="noMore" @change="changeNumValue" />
</view>
</view>
@ -114,7 +114,9 @@
props:{
specificationList:{
type:Array,
default:[],
default() {
return []
},
},
// 0,1
status:{
@ -132,22 +134,22 @@
specificationList:{
handler(n,o){
this.chooseNumber = 1;
this.isAllFailure = false;
this.chooseIndex = 0;
for(let i=0;i<n.length;i++){
if(n[i].stock>0){
this.chooseIndex = i;
// console.log(this.chooseIndex,"this.chooseIndex")
return
}
// if(i == n.length-1){
// this.isAllFailure = true;
// this.chooseIndex = 0
// }
}
},
deep:true,
immediate: true, //
}
},
components:{
@ -193,7 +195,14 @@
noMoreLess(){
uni.showToast({
icon: 'none',
title: "低于最少购买件数",
title: "低于最少购买数量",
duration: 1000
});
},
noMore(){
uni.showToast({
icon: 'none',
title: "超出最大购买数量",
duration: 1000
});
},
@ -209,7 +218,7 @@
insertShoppingCart(params).then(async res=>{
let title ;
if (res.return_code == '000000') {
title = res.return_data;
title = "加入购物车成功";
this.$emit("refreshCartNum")
}else{
@ -254,11 +263,13 @@
// this.$emit("close")
},
//
//change
select(index){
this.chooseIndex = index;
if(this.chooseNumber>this.specificationList[this.chooseIndex].stock){
this.chooseNumber = this.specificationList[this.chooseIndex].stock
if(this.specificationList[this.chooseIndex].stock==0){
this.chooseNumber = 0;
}else{
this.chooseNumber = 1;
}
},

@ -130,7 +130,7 @@
</view>
</view>
<!-- 选择类别 -->
<wybPopup ref="popup" type="bottom" height="500" width="500" :scrollY="true" radius="6" :showCloseIcon="true">
<wybPopup ref="popup" zIndex="999" type="bottom" height="500" width="500" :scrollY="true" radius="6" :showCloseIcon="true">
<cart-choose @refreshCartNum="refreshCartNum" :specificationList="specificationList" @close="close">
</cart-choose>
@ -321,13 +321,14 @@
let params = {
goodsId: id
};
console.log(params)
// console.log(params)
findGoodsSkuByGoodsId(params).then(res => {
if (res.return_code == '000000') {
if (res.return_data && res.return_data.length > 0) {
this.specificationList = res.return_data;
this.$refs.popup.show();
// console.log(this.specificationList)
} else {
this.specificationList = [];
}

@ -10,7 +10,7 @@
<!-- :disabled="item.loseEfficacy" -->
<uni-swipe-action-item :auto-close="autoClose" :right-options="swipe_options"
@click.stop="swipe_opt_event($event,item.id)" @change="swipe_change($event, item.id)">
@click="swipe_opt_event($event,item.id)" @change="swipe_change($event, item.id)">
<view class="cart-container2">
<checkbox-group @change="checkClick(item)">
@ -425,16 +425,11 @@
content: '确定把该商品移除购物车吗?',
success: function(res) {
if (res.confirm) {
console.log('用户点击确定,要删除的id', ids);
// console.log(',id', ids);
let params = {
ids: ids
};
uni.showLoading({
title: '加载中',
mask:true,
});
deleteShoppingCart(params).then(res => {
uni.hideLoading();
let title;
if (res.return_code == '000000') {
title = res.return_data;
@ -475,24 +470,12 @@
}
goodsEditNum(params).then(res => {
if (res.return_code == '000000') {
// uni.showToast({
// title: res.return_data,
// icon: 'none',
// duration: 2000
// })
} else {
//
// this.cartList.map(item=>{
// if(item.id == id){
// item.num = 1;
// }
// })
//
this.initData();
if (res.return_code == '000000') {
} else {
//
uni.showToast({
title: res.return_msg,
icon: 'none',
@ -500,6 +483,8 @@
})
}
//
this.initData();
})

@ -89,7 +89,7 @@
<!-- 选择类别 -->
<wybPopup ref="popup" height="500" type="bottom" width="500" :scrollY="true" radius="6" :showCloseIcon="true">
<wybPopup ref="popup" zIndex="999" height="500" type="bottom" width="500" :scrollY="true" radius="6" :showCloseIcon="true">
<cart-choose :goodsDetail="goodsDetail" :status="status" @refreshCartNum="refreshCartNum"
:specificationList="specificationList" @close="close"></cart-choose>

@ -40,7 +40,7 @@
<view class=" pd-main backcolorfff border-8r">
<!-- 商品信息 -->
<view v-for="(item,index) in goodsList" :key="index" class="marb10 flex-center-sp">
<view v-for="(item,index) in goodsList" :key="index" class="paddbotm10 flex-center-sp">
<view class="">
<image class="st-img" :src="imageUrl+item.goodsImg" mode="aspectFill"></image>
</view>
@ -63,7 +63,7 @@
还有{{goodsList2.length}}种商品<text class="icon-ymt to-down"></text>
</view>
<block v-if="moreThanThree">
<view v-for="(item,index) in goodsList2" :key="index" class="marb10 flex-center-sp">
<view v-for="(item,index) in goodsList2" :key="index" class="paddbotm10 flex-center-sp">
<view class="">
<image class="st-img" :src="imageUrl+item.goodsImg" mode="aspectFill"></image>
</view>
@ -164,8 +164,8 @@
<!-- 收货信息 -->
<view v-if="recinfo.goodsDeliveryAddress" class="flex-center-sp pd-tb10 bordert">
<view class="fcor666 align-fs width80px">收货信息</view>
<view class="flex-1 tr">
<view class=" align-fs width80px">收货信息</view>
<view class="fcor666 flex-1 tr font16">
<view class=" ">
{{recinfo.goodsDeliveryAddress.regionName +' '+recinfo.goodsDeliveryAddress.address}}</view>
<view class=" ">{{recinfo.goodsDeliveryAddress.consignee +' '+recinfo.goodsDeliveryAddress.phone}}
@ -174,42 +174,42 @@
</view>
<!-- 物流信息 -->
<view class="flex-center-sp pd-tb10 ">
<view class="fcor666 width80px">物流信息</view>
<view class=" " @click="checkWuliu">
<view class=" width80px">物流信息</view>
<view class="fcor666 font16 " @click="checkWuliu">
查看物流信息<text class="icon-ymt to-right fcor666 font16 paddleft5"></text>
</view>
</view>
<!-- 订单编号 -->
<view class="flex-center-sp pd-tb10 ">
<view class="fcor666 width80px">订单编号</view>
<view class=" flex-center-sp font16">
<view class=" width80px">订单编号</view>
<view class="fcor666 flex-center-sp font16">
<text class="tr flex-1">{{orderId}}</text>
<text class=" margle10 font12 copy-num fcor666" @click="copyText(orderId)">复制</text>
</view>
</view>
<!-- 下单时间 -->
<view class="flex-center-sp pd-tb10 ">
<view class="fcor666 width80px">下单时间</view>
<view class=" ">
<view class=" width80px">下单时间</view>
<view class="font16 fcor666">
{{recinfo.createTime | formatDate('-')}}
</view>
</view>
<!-- 支付方式 -->
<view class="flex-center-sp pd-tb10 ">
<view class="fcor666 width80px">支付方式</view>
<view class=" ">
<view class=" fotrt fcor333" v-if="recinfo.payType == 1">支付宝</view>
<view class=" fotrt fcor333" v-if="recinfo.payType == 2">微信支付</view>
<view class=" fotrt fcor333" v-if="recinfo.payType == 3">积分兑换</view>
<view class=" fotrt fcor333" v-if="recinfo.payType == 4">汇联通工会卡</view>
<view class=" fotrt fcor333" v-if="recinfo.payType == 5">银联</view>
<view class=" width80px">支付方式</view>
<view class="font16 fcor666">
<view class=" fotrt " v-if="recinfo.payType == 1">支付宝</view>
<view class=" fotrt " v-if="recinfo.payType == 2">微信支付</view>
<view class=" fotrt " v-if="recinfo.payType == 3">积分兑换</view>
<view class=" fotrt " v-if="recinfo.payType == 4">汇联通工会卡</view>
<view class=" fotrt " v-if="recinfo.payType == 5">银联</view>
</view>
</view>
<!-- 备注 -->
<view class="flex-center-sp pd-tb10 ">
<view class="fcor666 width80px">备注</view>
<view class="fcor666 font13 ">
{{recinfo.remarks || "数据"}}
<view class=" width80px">备注</view>
<view class="fcor666 font16 ">
{{recinfo.remarks || "无"}}
</view>
</view>
</view>
@ -218,8 +218,8 @@
<!-- 收货信息 -->
<view v-if="recinfo.goodsDeliveryAddress" class="flex-center-sp pd-tb10 bordert">
<view class="fcor666 align-fs width80px">收货信息</view>
<view class="flex-1 tr">
<view class=" align-fs width80px">收货信息</view>
<view class="flex-1 tr fcor666 font16">
<view class=" ">
{{recinfo.goodsDeliveryAddress.regionName +' '+recinfo.goodsDeliveryAddress.address}}</view>
<view class=" ">{{recinfo.goodsDeliveryAddress.consignee +' '+recinfo.goodsDeliveryAddress.phone}}
@ -228,24 +228,24 @@
</view>
<!-- 订单编号 -->
<view class="flex-center-sp pd-tb10 ">
<view class="fcor666 width80px">订单编号</view>
<view class=" flex-center-sp font16">
<view class=" width80px">订单编号</view>
<view class="fcor666 flex-center-sp font16">
<text class="tr flex-1">{{orderId}}</text>
<text class=" margle10 font12 copy-num fcor666" @click="copyText(orderId)">复制</text>
</view>
</view>
<!-- 下单时间 -->
<view class="flex-center-sp pd-tb10 ">
<view class="fcor666 width80px">下单时间</view>
<view class=" ">
<view class=" width80px ">下单时间</view>
<view class="font16 fcor666">
{{recinfo.createTime | formatDate('-')}}
</view>
</view>
<!-- 备注 -->
<view class="flex-center-sp pd-tb10 ">
<view class="fcor666 width80px ">备注</view>
<view class="fcor666 font13 ">
{{recinfo.remarks || "数据"}}
<view class=" width80px ">备注</view>
<view class="fcor666 font13 font16">
{{recinfo.remarks || "无"}}
</view>
</view>
</view>

@ -60,7 +60,7 @@
</view>
<view class="btn-contain backcolorfff">
<view class="btn-edit fotct fcorfff font18" @click="payMoney()">确认支付<text class="paddleft5">¥{{payPrice}}</text>
<view class="btn-edit fotct fcorfff font18" @click="payMoney()">确认支付<text class="paddleft5">¥{{payPrice | numFormat}}</text>
</view>
</view>
@ -271,6 +271,8 @@
if (that.paytype == '2') {
// console.log(app.globalData)
// #ifdef H5
let params = {
"orderNo": that.orderNo,
@ -285,6 +287,7 @@
"openIdType": 1
}
// #endif
console.log(params)
wechatPay(params).then(res => {
if (res.return_code == '000000') {
// #ifdef MP

@ -1,5 +1,5 @@
<template>
<wybPopup ref="popup" zIndex="100" type="bottom" width="500" height="500" :scrollY="true" radius="0" :showCloseIcon="true">
<wybPopup ref="popup" type="bottom" width="500" height="500" :scrollY="true" radius="0" :showCloseIcon="true">
<view class="pd-main wuliupop backcor9">
<view class="pop-title fontwig6 backcor9"><text>物流信息</text></view>
<view class="pd-main backcolorfff border-8r font14" @touchmove.stop>
@ -233,24 +233,33 @@
return
}
uni.showModal({
title: '确定拨打电话',
content: this.phoneNumber[0],
success: function(res) {
if (res.confirm) {
uni.makePhoneCall({
phoneNumber: this.phoneNumber[0], //
success: function(e) {
console.log(e);
},
fail: function(e) {
console.log(e);
//
this.phoneNumber = [...new Set(this.phoneNumber)];
let that = this;
uni.showActionSheet({
itemList: that.phoneNumber,
success: function (res) {
// console.log('' + (res.tapIndex + 1) + '');
uni.makePhoneCall({
phoneNumber:String(that.phoneNumber[res.tapIndex]), //
success: function(e) {
console.log(e);
},
fail: function(e) {
console.log(e);
}
})
}
})
}
},
fail: function (res) {
// console.log("");
}
})
});
},

@ -45,8 +45,9 @@
</view>
</scroll-view>
<view class="fix-soon fcor666">
{{getNumberAll}}<text class="icon-ymt to-right font14 fcor666"></text>
<view class="fix-soon font16 fcor666">
<text class="verc">{{getNumberAll}}</text>
<text class="icon-ymt verc to-right font14 fcor666"></text>
</view>
</view>
</view>
@ -62,15 +63,15 @@
</view>
<view class="settle-msg">
<view class="settle-title marb5">
<text class="flex-1">{{goodsList[0].title}}</text>
<text class="flex-1 font18">{{goodsList[0].title}}</text>
<view class="font14 fcor666">{{getNumberAll}}</view>
</view>
<view v-if="yhqId == 0" class="settle-title">
<text >¥{{goodsList[0].price}}</text>
<text class="font16">¥{{goodsList[0].price}}</text>
<text class="font14 fcor666">×{{goodsList[0].num}}</text>
</view>
<view v-else class="settle-title">
<text>¥{{goodsList[0].originalPrice}}</text>
<text class="font16">¥{{goodsList[0].originalPrice}}</text>
<text class="font14 fcor666">×{{goodsList[0].num}}</text>
</view>
@ -181,7 +182,7 @@
<!-- 底部结算按钮 -->
<view class="tool-contain">
<view v-if="addressDetail" class="adressConfirm">
<view v-if="addressDetail" class="adressConfirm font16">
送至: {{addressDetail.regionName+" "+addressDetail.address}}
</view>
<view class="tool-right backcolorfff">

@ -100,6 +100,7 @@
return;
}
if (value > (this.max * scale)) {
value = this.max * scale
}
}
@ -107,6 +108,7 @@
if (type === "plus") {
value += step;
if (value > (this.max * scale)) {
this.$emit("noMore")
return;
}
if (value < (this.min * scale)) {
@ -139,8 +141,10 @@
}
value = +value;
if (value > this.max) {
this.$emit("noMore")
value = this.max;
} else if (value < this.min) {
this.$emit("noMoreLess")
value = this.min;
}
const scale = this._getDecimalScale();

Loading…
Cancel
Save