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

@ -130,7 +130,7 @@
</view> </view>
</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 @refreshCartNum="refreshCartNum" :specificationList="specificationList" @close="close">
</cart-choose> </cart-choose>
@ -321,13 +321,14 @@
let params = { let params = {
goodsId: id goodsId: id
}; };
console.log(params) // console.log(params)
findGoodsSkuByGoodsId(params).then(res => { findGoodsSkuByGoodsId(params).then(res => {
if (res.return_code == '000000') { if (res.return_code == '000000') {
if (res.return_data && res.return_data.length > 0) { if (res.return_data && res.return_data.length > 0) {
this.specificationList = res.return_data; this.specificationList = res.return_data;
this.$refs.popup.show(); this.$refs.popup.show();
// console.log(this.specificationList)
} else { } else {
this.specificationList = []; this.specificationList = [];
} }

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

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

@ -60,7 +60,7 @@
</view> </view>
<view class="btn-contain backcolorfff"> <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>
</view> </view>
@ -271,6 +271,8 @@
if (that.paytype == '2') { if (that.paytype == '2') {
// console.log(app.globalData)
// #ifdef H5 // #ifdef H5
let params = { let params = {
"orderNo": that.orderNo, "orderNo": that.orderNo,
@ -285,6 +287,7 @@
"openIdType": 1 "openIdType": 1
} }
// #endif // #endif
console.log(params)
wechatPay(params).then(res => { wechatPay(params).then(res => {
if (res.return_code == '000000') { if (res.return_code == '000000') {
// #ifdef MP // #ifdef MP

@ -1,5 +1,5 @@
<template> <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="pd-main wuliupop backcor9">
<view class="pop-title fontwig6 backcor9"><text>物流信息</text></view> <view class="pop-title fontwig6 backcor9"><text>物流信息</text></view>
<view class="pd-main backcolorfff border-8r font14" @touchmove.stop> <view class="pd-main backcolorfff border-8r font14" @touchmove.stop>
@ -233,13 +233,15 @@
return return
} }
uni.showModal({ //
title: '确定拨打电话', this.phoneNumber = [...new Set(this.phoneNumber)];
content: this.phoneNumber[0], let that = this;
success: function(res) { uni.showActionSheet({
if (res.confirm) { itemList: that.phoneNumber,
success: function (res) {
// console.log('' + (res.tapIndex + 1) + '');
uni.makePhoneCall({ uni.makePhoneCall({
phoneNumber: this.phoneNumber[0], // phoneNumber:String(that.phoneNumber[res.tapIndex]), //
success: function(e) { success: function(e) {
console.log(e); console.log(e);
}, },
@ -248,9 +250,16 @@
} }
}) })
},
fail: function (res) {
// console.log("");
} }
} });
})
}, },

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

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

Loading…
Cancel
Save