瀏覽代碼

是否使用积分抵扣前端逻辑修改

lhm 3 年之前
父節點
當前提交
531d6a7c50
共有 2 個文件被更改,包括 18 次插入13 次删除
  1. 9 9
      kmall-admin/src/main/webapp/WEB-INF/page/sale/sale.html
  2. 9 4
      kmall-admin/src/main/webapp/js/sale/sale.js

+ 9 - 9
kmall-admin/src/main/webapp/WEB-INF/page/sale/sale.html

@@ -314,11 +314,11 @@
                                     <div class="modal-body">
                                         <div>
                                             <label for="customPhone" class="control-label">会员码:</label>
-                                            <input autocomplete="off" type="text" v-model="couponBarCode" ref="couponBarCode" size="60%" id="couponBarCode" @on-enter="calculateOrderPriceSubmit" />
+                                            <input autocomplete="off" type="text" v-model="memberCode" ref="couponBarCode" size="60%" id="couponBarCode" @on-enter="calculateOrderPriceSubmit" />
                                         </div>
                                         <div style="margin-top: 30px">
-                                            <label class="control-label" >是否用积分进行抵扣:</label>
-                                            <i-switch v-model="switch1" />
+                                            <label class="control-label" >是否使用积分进行抵扣:</label>
+                                            <i-switch v-model="switch1" on />
                                         </div>
                                     </div>
                                     <div class="modal-footer">
@@ -340,14 +340,14 @@
                                     <div class="modal-body">
                                         <div style="margin-bottom: 50px">
                                             <ul style="display: inline-block">
-                                                <li><h5 style="border: white;padding: 8px;">总件数:{{totalCount}}</h5></li>
-                                                <li><h5 style="border: white;padding: 8px;">总价:{{totalPrice}}</h5></li>
-                                                <li><h5 style="border: white;padding: 8px;color: red;">实际支付价:{{actualPrice}}</h5></li>
+                                                <li><h3 style="border: white;padding: 8px;">总件数:{{totalCount}}</h3></li>
+                                                <li><h3 style="border: white;padding: 8px;">总价:{{totalPrice}}</h3></li>
+                                                <li><h3 style="border: white;padding: 8px;color: red;">实际支付价:{{actualPrice}}</h3></li>
                                             </ul>
                                             <ul style="display: inline-block">
-                                                <li><h5 style="border: white;padding: 8px">会员等级:{{levelName}}</h5></li>
-                                                <li><h5 style="border: white;padding: 8px">会员当前积分:{{memberCurrentAvailableScore}}</h5></li>
-                                                <li><h5 style="border: white;padding: 8px">抵扣积分:{{deductionScore}}</h5></li>
+                                                <li><h3 style="border: white;padding: 8px">会员等级:{{levelName}}</h3></li>
+                                                <li><h3 style="border: white;padding: 8px">会员当前积分:{{memberCurrentAvailableScore}}</h3></li>
+                                                <li><h3 style="border: white;padding: 8px">抵扣积分:{{deductionScore}}</h3></li>
                                             </ul>
                                         </div>
                                         <form>

+ 9 - 4
kmall-admin/src/main/webapp/js/sale/sale.js

@@ -699,6 +699,10 @@ let vm = new Vue({
         query: function () {
             vm.storeId = sessionStorage.getItem("storeId");
             var thisGoods = {};
+            // 挂起后的新订单默认开启
+            if (vm.pendingOrderMap != null || vm.pendingOrderMap.size > 0) {
+                vm.switch1 = true;
+            }
             var overflowLi = this.$refs.overflowLi;
             // console.log("vm.$refs.saomiao.value===>" + vm.$refs.saomiao.value);
             let scanSellVolume = calScanSellVolume(vm.$refs.saomiao.value);
@@ -945,7 +949,7 @@ let vm = new Vue({
             vm.levelName = '';
             vm.deductionScore = '';
             vm.memberCurrentAvailableScore = '';
-            vm.$refs.couponBarCode.value = '';
+            vm.memberCode = '';
             vm.switch1 = true;
             vm.clickFlag = true;
             vm.calActivityFlag = false;
@@ -959,7 +963,7 @@ let vm = new Vue({
             vm.levelName = '';
             vm.deductionScore = '';
             vm.memberCurrentAvailableScore = '';
-            vm.$refs.couponBarCode.value = '';
+            vm.memberCode = '';
             vm.clickFlag = true;
             vm.switch1 = true;
             vm.calActivityFlag = false;
@@ -985,7 +989,7 @@ let vm = new Vue({
             vm.pendingOrderMap.delete(key);
 
             vm.clickFlag = true;
-            vm.$refs.couponBarCode.value = '';
+            vm.memberCode = '';
             vm.switch1 = true;
             vm.calActivityFlag = false;
             removeByValue(vm.pendingOrderKeys,key);
@@ -2099,7 +2103,8 @@ function toPayOrder(payCode){
                     vm.levelName = '';
                     vm.deductionScore = '';
                     vm.memberCurrentAvailableScore = '';
-                    vm.$refs.couponBarCode.value = "";
+                    vm.memberCode = "";
+                    vm.switch1 = true;
                     vm.clickFlag = false;
                     vm.customClearData();