Browse Source

话费详情价格显示处理

DaMowang 2 năm trước cách đây
mục cha
commit
0536ef1d68

+ 9 - 2
src/pagesB/hotel/hotelDetail.vue

@@ -38,7 +38,7 @@
             </div>
             <div class="p flex_r flex_jb flex_ac">
                 <span class="label">住客姓名</span>
-                <input v-model="qda.contactName" placeholder="请填写住客真实姓名" placeholder-class="inp_pl"/>
+                <input v-model="qda.contactName" @input="guestF" placeholder="请填写住客真实姓名" placeholder-class="inp_pl"/>
             </div>
             <div class="p flex_r flex_jb flex_ac">
                 <span class="label">联系电话</span>
@@ -148,8 +148,15 @@ export default {
             return this.$day(va).format("M月DD日")
         },
         roomNumf(va) {
-            this.qda.roomNum = va
             this.computef();
+            this.qda.roomNum = va
+            this.guestNames = []
+            for (let a = 0; a < va; a++) {
+                this.guestNames.push(this.qda.contactName)
+            }
+        },
+        guestF(){
+            let va = this.qda.roomNum;
             this.guestNames = []
             for (let a = 0; a < va; a++) {
                 this.guestNames.push(this.qda.contactName)

+ 2 - 1
src/pagesB/prepaidRefill/index.vue

@@ -85,7 +85,8 @@ export default {
         },
         selectMoney(va){
             this.selectItem = va
-            this.qda.cardnum = va.money;
+            this.qda.cardnum = va.money
+            this.qda.attachment = JSON.stringify(va)
         },
         getCallingList() {
             post("local/ofpay/getMoney").then((res) => {

+ 24 - 15
src/pagesB/prepaidRefill/orderDetail.vue

@@ -6,17 +6,23 @@
         <div class="money card">
             <div class="li flex_r flex_jb">
                 <span>消费金额</span>
-                <span>¥{{ order.order_amount || 0 }}</span>
+                <span>¥{{ order.attachment.custom_price || 0 }}</span>
             </div>
             <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">-¥{{ order.attachment.custom_integral || 0 }}</span>
             </div>
             <div class="li flex_r flex_jb">
                 <span>实付金额</span>
                 <span>¥{{ order.pay_amount || 0 }}</span>
             </div>
         </div>
+        <div class="money card">
+            <div class="li flex_r flex_jb">
+                <span>赠送茶宝</span>
+                <span>{{ order.attachment.chabao || 0 }}</span>
+            </div>
+        </div>
         <div class="info card">
             <p>产品品牌:{{ order.restaurant_name }}</p>
             <p>产品名称:{{ order.product_name }}</p>
@@ -41,8 +47,8 @@ export default {
             order: {},
             orders: [],
             pda: {},
-            Integral: 0,
-            deduction: 0,
+            // Integral: 0,
+            // deduction: 0,
         };
     },
     methods: {
@@ -51,21 +57,24 @@ export default {
                 if (res.code == 0) {
                     let da = res.data.order
                     da.product_name = da.orderGoods[0].product_name;
+                    if(da.orderGoods[0]?.attachment){
+                        da.attachment = JSON.parse(da.orderGoods[0].attachment);
+                    }
                     delete da.orderGoods;
                     this.order = da;
-                    this.getIntegral()
-                }
-            })
-        },
-        getIntegral() {
-            post("local/getIntegral", { type: 6 }).then(res => {
-                if (res.code == 0) {
-                    let i1 = res.data.integral;
-                    this.Integral = this.$h.Mul(i1, 100);
-                    this.deduction = this.$h.Mul(this.order.order_amount, i1).toFixed(2);
+                    // this.getIntegral()
                 }
             })
         },
+        // getIntegral() {
+        //     post("local/getIntegral", { type: 6 }).then(res => {
+        //         if (res.code == 0) {
+        //             let i1 = res.data.integral;
+        //             this.Integral = this.$h.Mul(i1, 100);
+        //             this.deduction = this.$h.Mul(this.order.order_amount, i1).toFixed(2);
+        //         }
+        //     })
+        // },
         pay() {
             post("local/goOrderPay", { trade_no: this.order.trade_no }).then(res => {
                 if (res.code == 0 && res.data.data.prepayid) {

+ 2 - 2
src/request/config.js

@@ -15,6 +15,6 @@ if (process.env.UNI_PLATFORM === "h5") {
 export default apis == 1 ? {
 	Hhost: "https://shop-api.haocha13.cn/",
 } : {
-	Hhost: "https://shop-api.haocha13.cn/",  //正式接口
-	// Hhost: "https://test-api.haocha13.cn/",
+	// Hhost: "https://shop-api.haocha13.cn/",  //正式接口
+	Hhost: "https://test-api.haocha13.cn/",
 }