Browse Source

批发快递费调整

DaMowang 2 years ago
parent
commit
89043e5f62

+ 18 - 1
src/pages/invi-img/index.vue

@@ -133,6 +133,7 @@ export default {
 
 
         saveImage(path = appEv.parameter("path")) {
         saveImage(path = appEv.parameter("path")) {
             var that = this;
             var that = this;
+            uni.hideLoading();
             uni.getSetting({
             uni.getSetting({
                 success: (res) => {
                 success: (res) => {
                     //如果没有相册权限
                     //如果没有相册权限
@@ -146,7 +147,23 @@ export default {
                                 console.log("授权成功!");
                                 console.log("授权成功!");
                                 that.savefun(path);
                                 that.savefun(path);
                             },
                             },
-                            fail: (res) => {},
+                            fail: (res) => {
+                                uni.showModal({
+                                    content:'检测到您没打开保存到相册功能权限,是否去设置打开?',
+                                    confirmText: "确认",
+                                    cancelText:'取消',
+                                    success: (res) =>{
+                                        if(res.confirm){
+                                            uni.openSetting({
+                                                success: (res) =>{
+                                                    console.log(res);
+                                                    that.savefun(path);
+                                                }
+                                            })
+                                        }
+                                    }
+                                })
+                            },
                         });
                         });
                     } else {
                     } else {
                         console.log("已授权。直接保存");
                         console.log("已授权。直接保存");

+ 1 - 3
src/pages/product/p_details.vue

@@ -73,9 +73,7 @@
                     <image class="goods_img" :src="detail.original_img" mode=""></image>
                     <image class="goods_img" :src="detail.original_img" mode=""></image>
                     <view class="goods_con flex_c flex_jb">
                     <view class="goods_con flex_c flex_jb">
                         <view class="shop_names">{{ detail.goods_name }}</view>
                         <view class="shop_names">{{ detail.goods_name }}</view>
-                        <view class="goods_msg" v-if="type == 2">{{ detail.trade_price }}元+{{ detail.trade_num }}批发券+{{
-                            detail.treasure_price
-                            }}茶宝</view>
+                        <view class="goods_msg" v-if="type == 2">{{ detail.trade_price }}元+{{ detail.trade_num }}批发券+{{ detail.treasure_price }}茶宝</view>
                         <view class="goods_msg" v-else>¥{{ detail.cost_price }}</view>
                         <view class="goods_msg" v-else>¥{{ detail.cost_price }}</view>
                         <view class="num_con flex_r flex_je" v-if="type != 6">
                         <view class="num_con flex_r flex_je" v-if="type != 6">
                             <uni-number-box :min="1" @change="bindChange" :value="buyNum"></uni-number-box>
                             <uni-number-box :min="1" @change="bindChange" :value="buyNum"></uni-number-box>

+ 43 - 14
src/pages/to-pay-list/index.vue

@@ -1,6 +1,7 @@
 <template>
 <template>
     <view class="container">
     <view class="container">
         <template v-if="Data.is_sell != 1">
         <template v-if="Data.is_sell != 1">
+            <!-- shipping_method    发货方式:0邮寄 1自提 2邮寄自提 -->
             <div class="qtmd mar_b20" v-if="goodsInfo.shipping_method == 2">
             <div class="qtmd mar_b20" v-if="goodsInfo.shipping_method == 2">
                 <view class="order_list flex_r flex_ac flex_jb">
                 <view class="order_list flex_r flex_ac flex_jb">
                     <view class="list_name">发货方式</view>
                     <view class="list_name">发货方式</view>
@@ -21,6 +22,8 @@
             </div>
             </div>
         </template>
         </template>
         <!-- 收货地址 -->
         <!-- 收货地址 -->
+        <!-- is_sell    0:邮寄 1:寄售 -->
+        <!-- prom_type    0:邮寄 1:自提 -->
         <view class="address mar_b20" v-if="Data.is_sell != 1 && prom_type != 1">
         <view class="address mar_b20" v-if="Data.is_sell != 1 && prom_type != 1">
             <block v-if="DefaultAddress.name">
             <block v-if="DefaultAddress.name">
                 <view class="add_head flex_r flex_ac flex_jb">
                 <view class="add_head flex_r flex_ac flex_jb">
@@ -50,9 +53,7 @@
                 <image class="goods_img" :src="goodsInfo.original_img" mode=""></image>
                 <image class="goods_img" :src="goodsInfo.original_img" mode=""></image>
                 <view class="goods_con flex_c flex_jc flex_jb">
                 <view class="goods_con flex_c flex_jc flex_jb">
                     <view class="goods_name ellipsis2">{{ goodsInfo.goods_name }}</view>
                     <view class="goods_name ellipsis2">{{ goodsInfo.goods_name }}</view>
-                    <view class="goods_msg" v-if="Data.type == 2">{{ goodsInfo.trade_price }}元+{{ goodsInfo.trade_num }}批发券+{{
-                        goodsInfo.treasure_price
-                        }}茶宝</view>
+                    <view class="goods_msg" v-if="Data.type == 2">{{ goodsInfo.trade_price }}元+{{ goodsInfo.trade_num }}批发券+{{ goodsInfo.treasure_price }}茶宝</view>
                     <view class="goods_msg" v-else>{{ goodsInfo.cost_price }}</view>
                     <view class="goods_msg" v-else>{{ goodsInfo.cost_price }}</view>
                     <view class="goods_num">x {{ Data.num }}</view>
                     <view class="goods_num">x {{ Data.num }}</view>
                 </view>
                 </view>
@@ -65,13 +66,31 @@
                 <view class="list_name">数量</view>
                 <view class="list_name">数量</view>
                 <view class="list_con">{{ Data.num }}</view>
                 <view class="list_con">{{ Data.num }}</view>
             </view>
             </view>
-            <view class="order_list flex_r flex_ac flex_jb" v-if="Data.is_sell != 1 && prom_type != 1">
-                <view class="flex_r flex_ac">
-                    <view class="list_name">运费</view>
-                    <view class="list_con p_color">({{ freight }}元/每套)</view>
+			<template v-if="Data.type==2">
+                <view class="order_list flex_r flex_ac flex_jb" v-if="Data.is_sell == 1">
+                    <view class="flex_r flex_ac">
+                        <view class="list_name">服务费</view>
+                        <view class="list_con p_color">(寄卖,{{ freight.service }}元/每套)</view>
+                    </view>
+                    <view class="list_con">¥{{ $h.Mul(freight.service, Data.num) }}</view>
                 </view>
                 </view>
-                <view class="list_con">¥{{ $h.Mul(freight, Data.num) }}</view>
-            </view>
+                <view class="order_list flex_r flex_ac flex_jb" v-else-if="prom_type != 1">
+                    <view class="flex_r flex_ac">
+                        <view class="list_name">服务费</view>
+                        <view class="list_con p_color">(邮寄,{{ freight.freight }}元/每套)</view>
+                    </view>
+                    <view class="list_con">¥{{ $h.Mul(freight.freight, Data.num) }}</view>
+                </view>
+            </template>
+            <template v-else>
+                <view class="order_list flex_r flex_ac flex_jb" v-if="Data.is_sell != 1 && prom_type != 1">
+                    <view class="flex_r flex_ac">
+                        <view class="list_name">运费</view>
+                        <view class="list_con p_color">({{ freight }}元/每套)</view>
+                    </view>
+                    <view class="list_con">¥{{ $h.Mul(freight, Data.num) }}</view>
+                </view>
+            </template>
             <view class="order_list flex_r flex_ac flex_jb" v-if="Data.type == 2 || Data.type == 5">
             <view class="order_list flex_r flex_ac flex_jb" v-if="Data.type == 2 || Data.type == 5">
                 <view class="flex_r flex_ac">
                 <view class="flex_r flex_ac">
                     <view class="list_name">茶宝</view>
                     <view class="list_name">茶宝</view>
@@ -95,7 +114,7 @@
 				<view class="order_list flex_r flex_ac flex_jb">
 				<view class="order_list flex_r flex_ac flex_jb">
 					<view class="flex_r flex_ac">
 					<view class="flex_r flex_ac">
 						<view class="list_name">消费金抵</view>
 						<view class="list_name">消费金抵</view>
-                    	<view class="list_con p_color">(可用 {{ parseFloat(local_uinfo.integral) }})</view>
+                    	<view class="list_con p_color">(可用 {{ parseFloat(local_uinfo.integral) }})</view>
 					</view>
 					</view>
 					<view class="list_con p_color">-¥{{ goldNum }}</view>
 					<view class="list_con p_color">-¥{{ goldNum }}</view>
 				</view>
 				</view>
@@ -204,7 +223,17 @@ export default {
 						
 						
                         // 计算待支付
                         // 计算待支付
                         let p = this.Data.type == 2 ? this.goodsInfo.trade_price : this.goodsInfo.cost_price; //商品单价
                         let p = this.Data.type == 2 ? this.goodsInfo.trade_price : this.goodsInfo.cost_price; //商品单价
-                        let y = (this.Data.is_sell == 1 || this.prom_type == 1) ? 0 : this.freight; // 运费单价   寄卖、自提 运费为0
+                        let y = 0;  //运费
+                        if(this.Data.type == 2){
+                            if(this.Data.is_sell == 1){
+                                y = this.freight.service
+                            }
+                            else if(this.prom_type != 1 && this.Data.is_sell != 1){
+                                y = this.freight.freight
+                            }
+                        }else{
+                            y = this.prom_type == 1 ? 0 : this.freight; // 运费单价   寄卖、自提 运费为0
+                        }
                         let ps = this.$h.Mul(p, this.Data.num); //商品总价
                         let ps = this.$h.Mul(p, this.Data.num); //商品总价
 						this.originalPrice = ps; this.CommodityPrice = ps;
 						this.originalPrice = ps; this.CommodityPrice = ps;
                         let ys = this.$h.Mul(y, this.Data.num) //运费总价
                         let ys = this.$h.Mul(y, this.Data.num) //运费总价
@@ -508,12 +537,12 @@ page {
 
 
 // 订单信息
 // 订单信息
 .list_name {
 .list_name {
-    width: 112rpx;
-    text-align-last: justify;
+    width: 120rpx;
     font-size: 26rpx;
     font-size: 26rpx;
+    text-align-last: justify;
     color: rgba(0, 0, 0, 0.8);
     color: rgba(0, 0, 0, 0.8);
-    // font-family: SourceHanSansCN-Medium;
     font-weight: bold;
     font-weight: bold;
+    margin-right: 12rpx;
 }
 }
 
 
 .order_list:nth-last-child(1) {
 .order_list:nth-last-child(1) {

+ 45 - 47
src/pagesB/prepaidRefill/index.vue

@@ -2,7 +2,7 @@
     <div class="prepaidRefill">
     <div class="prepaidRefill">
         <div class="input_phone">
         <div class="input_phone">
             <div class="flex_r flex_jb flex_ac">
             <div class="flex_r flex_jb flex_ac">
-                <textarea v-model="qda.phoneno" placeholder="请输入手机号" class="inp dinB" :auto-height="true" @input="inphone" @blur="inphone" @confirm="inphone" placeholder-class="inpc" />
+                <textarea v-model="qda.phoneno" placeholder="请输入手机号" @input="inphone" @confirm="inphone" :auto-height="true" class="inp dinB" placeholder-class="inpc" />
                 <div class="ico iconfont" @click="openContact">&#xe8fb;</div>
                 <div class="ico iconfont" @click="openContact">&#xe8fb;</div>
             </div>
             </div>
             <div class="phonemsg" v-if="gameArea">{{ gameArea }}</div>
             <div class="phonemsg" v-if="gameArea">{{ gameArea }}</div>
@@ -10,27 +10,38 @@
         <div class="items">
         <div class="items">
             <div class="tit">充话费</div>
             <div class="tit">充话费</div>
             <div class="li flex_r">
             <div class="li flex_r">
-                <div :class="{ li_it: 1, active: qda.cardnum == i }" v-for="(i, s) in CallingList" :key="s" @click="qda.cardnum = i" >{{ i }}元</div>
+                <div :class="{ li_it: 1, active: qda.cardnum == i.money }" v-for="(i, s) in CallingList" :key="s" @click="selectMoney(i)" >{{ i.money }}元</div>
             </div>
             </div>
         </div>
         </div>
         <div class="money card">
         <div class="money card">
             <div class="li flex_r flex_jb">
             <div class="li flex_r flex_jb">
                 <span>消费金额</span>
                 <span>消费金额</span>
-                <span>¥{{ cartTotal || 0 }}</span>
+                <span>¥{{ selectItem.custom_price == 0 ? selectItem.money : selectItem.custom_price }}</span>
             </div>
             </div>
             <div class="li flex_r flex_jb">
             <div class="li flex_r flex_jb">
-                <span>消费金抵扣<span class="corg">{{ Integral }}%</span></span>
-                <span class="corg">-¥{{ deduction || 0 }}</span>
+                <span>消费金抵扣</span>
+                <span class="corg">-¥{{ selectItem.custom_integral || 0 }}</span>
             </div>
             </div>
             <div class="li flex_r flex_jb">
             <div class="li flex_r flex_jb">
                 <span>实付金额</span>
                 <span>实付金额</span>
-                <span>¥{{ actuallypaid || 0 }}</span>
+                <span>¥{{ selectItem.actual_price || 0 }}</span>
             </div>
             </div>
         </div>
         </div>
         <div class="money card mar_b60">
         <div class="money card mar_b60">
             <div class="li flex_r flex_jb">
             <div class="li flex_r flex_jb">
                 <span>赠送茶宝</span>
                 <span>赠送茶宝</span>
-                <span>{{ chabao || 0 }}</span>
+                <span>{{ selectItem.chabao || 0 }}</span>
+            </div>
+        </div>
+        <div class="msgbar">
+            <div class="tit">话费充值说明</div>
+            <div class="msg_con">
+                <p>1. 请您仔细核对号码,刷新页面后注意号码是否变动;若充错号码,建议您尽快联系机主自行协商解决。</p>
+                <p>2. 话费充值平均到账时间1-10分钟内,个别订单会因为运营商原因导致时间会长一些。若遇运营商系统维护、充值高峰期等,可能会有部分延迟。</p>
+                <p>3. 162、165、167、 170  、171  等虚拟运营商号码不支持充值,携号转网的手机号码充值失败率较高。</p>
+                <p>4. 若充值失败,系统将自动退还款项。</p>
+                <p>5. 充值发票由运营商提供,您可以到当地营业厅打印发票,或登陆网上营业厅下载电子发票,具体政策请咨询对应运营商客服。</p>
+                <p>6. 如有其他问题,可在“我的”->“我的服务”->“在线客服”联系客服。</p>
             </div>
             </div>
         </div>
         </div>
         <div class="footbtn" @click="onpay">立即支付</div>
         <div class="footbtn" @click="onpay">立即支付</div>
@@ -49,18 +60,12 @@ export default {
         return {
         return {
             CallingList: [], //可充话费列表
             CallingList: [], //可充话费列表
             qda: {
             qda: {
+                phoneno: "",
                 cardnum: 100,
                 cardnum: 100,
             },
             },
-            isvalid: false,
             userinfo: uni.getStorageSync("userinfo"),
             userinfo: uni.getStorageSync("userinfo"),
             gameArea: "",
             gameArea: "",
-
-            ratio: {},
-            cartTotal: 0,
-            Integral: 0,
-            deduction: 0,
-            actuallypaid: 0,
-            chabao: 0,
+            selectItem: {}
         };
         };
     },
     },
     methods: {
     methods: {
@@ -68,18 +73,25 @@ export default {
             let that = this;
             let that = this;
             uni.chooseContact({
             uni.chooseContact({
                 success: (res) => {
                 success: (res) => {
-                    that.qda.phoneno = res.phoneNumber;
+                    setTimeout(() => {
+                        that.qda.phoneno = res.phoneNumber;
+                        that.inphone();
+                    }, 80);
                 },
                 },
                 fail: (err) => {
                 fail: (err) => {
                     console.log("获取通讯录失败:", err);
                     console.log("获取通讯录失败:", err);
                 },
                 },
             });
             });
         },
         },
+        selectMoney(va){
+            this.selectItem = va
+            this.qda.cardnum = va.money;
+        },
         getCallingList() {
         getCallingList() {
             post("local/ofpay/getMoney").then((res) => {
             post("local/ofpay/getMoney").then((res) => {
                 if (res.code == 0) {
                 if (res.code == 0) {
                     this.CallingList = res.data;
                     this.CallingList = res.data;
-                    this.qda.cardnum = res.data[0];
+                    this.selectMoney(res.data[0]);
                     this.inphone();
                     this.inphone();
                 }
                 }
             });
             });
@@ -88,16 +100,14 @@ export default {
             if (this.checkPhone(this.qda.phoneno)) {
             if (this.checkPhone(this.qda.phoneno)) {
                 post("local/ofpay/telCheck", this.qda).then((res) => {
                 post("local/ofpay/telCheck", this.qda).then((res) => {
                     if (res.code == 0) {
                     if (res.code == 0) {
-                        this.isvalid = true;
                         post("local/ofpay/telQuery", this.qda).then((res) => {
                         post("local/ofpay/telQuery", this.qda).then((res) => {
                             if (res.code == 0) {
                             if (res.code == 0) {
                                 if (res.data.error_code == 0) {
                                 if (res.data.error_code == 0) {
                                     this.gameArea = res.data.result.game_area;
                                     this.gameArea = res.data.result.game_area;
-                                    this.getIntegral();
                                 }
                                 }
                             }
                             }
                         });
                         });
-                    } else this.isvalid = false;
+                    }
                 });
                 });
             }
             }
         },
         },
@@ -108,24 +118,6 @@ export default {
                 return false;
                 return false;
             }
             }
         },
         },
-        getIntegral() {
-            post("local/getIntegral", { type: 6 }).then((res) => {
-                if (res.code == 0) {
-                    this.ratio = res.data;
-                    this.computef();
-                }
-            });
-        },
-        computef() {
-            let { integral, chabao } = this.ratio;
-            let i1 = integral,
-                i2 = chabao;
-            this.cartTotal = this.qda.cardnum;
-            this.Integral = this.$h.Mul(i1, 100);
-            this.deduction = this.$h.Mul(this.cartTotal, i1);
-            this.actuallypaid = this.$h.Sub(this.cartTotal, this.deduction);
-            this.chabao = this.$h.Mul(this.actuallypaid, i2).toFixed(2);
-        },
         onpay() {
         onpay() {
             post("local/ofpay/onlineorde", this.qda).then((res) => {
             post("local/ofpay/onlineorde", this.qda).then((res) => {
                 if (res.code == 0) {
                 if (res.code == 0) {
@@ -145,15 +137,7 @@ export default {
         this.qda.phoneno = this.userinfo.mobile;
         this.qda.phoneno = this.userinfo.mobile;
         this.getCallingList();
         this.getCallingList();
     },
     },
-    watch: {
-        'qda.cardnum': {
-            immediate: true,
-            deep: true,
-            handler(va) {
-                this.computef();
-            }
-        }
-    },
+    watch: {},
     onShow() {},
     onShow() {},
     mounted() {},
     mounted() {},
 };
 };
@@ -231,6 +215,20 @@ export default {
         margin-left: 12rpx;
         margin-left: 12rpx;
     }
     }
 }
 }
+.msgbar{
+    padding-bottom: 160rpx;
+    .tit{
+        font-size: 32rpx;
+        font-weight: bold;
+        margin: 80rpx 0 20rpx;
+    }
+    .msg_con{
+        font-size: 26rpx;
+        p{
+            margin-bottom: 10rpx;
+        }
+    }
+}
 .card {
 .card {
     background-color: #fff;
     background-color: #fff;
     border-radius: 16rpx;
     border-radius: 16rpx;