shish 2 月之前
父節點
當前提交
0f91957fc6
共有 1 個文件被更改,包括 7 次插入0 次删除
  1. 7 0
      hdPad/src/pages/home/components/selectPrice.vue

+ 7 - 0
hdPad/src/pages/home/components/selectPrice.vue

@@ -378,6 +378,11 @@ export default {
                 console.warn('[selectPrice] persistCustomDiscountList', e)
             }
         },
+        /** 当前结算恢复为无折扣(不删除自定义折扣列表) */
+        resetActiveDiscountToNone() {
+            this.discountZhe = 10
+            this.persistDiscountSelected()
+        },
         formatDiscountZheLabel(z) {
             const n = Number(z)
             if (isNaN(n) || n >= 10 - 1e-6) {
@@ -810,6 +815,7 @@ export default {
         clearStack() {
             this.tokens = []
             this.calcInput = ''
+            this.resetActiveDiscountToNone()
         },
         applyHistoryRow(row) {
             if (!row) {
@@ -997,6 +1003,7 @@ export default {
             this.cash = 0
             this.tokens = []
             this.calcInput = ''
+            this.resetActiveDiscountToNone()
         },
     },
 }