From 57d138cddcd5a26eb0c5dcc2b9dccfdc6875cbef Mon Sep 17 00:00:00 2001
From: KKSU <15274802129@163.com>
Date: Thu, 28 Dec 2023 09:59:38 +0800
Subject: [PATCH] 直推奖励,冻结的用户,则直推奖励销毁,用户未冻结才能领取成功

---
 src/main/resources/templates/febs/views/modules/system/hlmVoucherButton.html |   24 ++++++++++++++++++++++--
 1 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/src/main/resources/templates/febs/views/modules/system/hlmVoucherButton.html b/src/main/resources/templates/febs/views/modules/system/hlmVoucherButton.html
index 5f441f9..bb73368 100644
--- a/src/main/resources/templates/febs/views/modules/system/hlmVoucherButton.html
+++ b/src/main/resources/templates/febs/views/modules/system/hlmVoucherButton.html
@@ -17,8 +17,15 @@
                     <div class="layui-col-lg6">
                         <label class="layui-form-label febs-form-item-require">需要凭证:</label>
                         <div class="layui-input-block">
-                            <input type="radio" name="voucherOnOff" value="1" title="是"  />
-                            <input type="radio" name="voucherOnOff" value="2" title="否"  checked />
+                            <input type="radio" name="voucherOnOff" value="1" title="是"  lay-filter="hasVoucher"/>
+                            <input type="radio" name="voucherOnOff" value="2" title="否"  lay-filter="hasVoucher" checked />
+                        </div>
+                    </div>
+
+                    <div class="layui-form-item voucher-percent-input febs-hide">
+                        <label class="layui-form-label">凭证比例:</label>
+                        <div class="layui-input-block">
+                            <input type="text" name="voucherPercent" placeholder="" autocomplete="off" class="layui-input">
                         </div>
                     </div>
                     <div class="layui-card-footer">
@@ -81,13 +88,26 @@
             });
         }
 
+        form.on('radio(hasVoucher)', function(data){
+            if (data.value == 2) {
+                $('.voucher-percent-input').hide();
+            } else {
+                $('.voucher-percent-input').show();
+            }
+        });
+
         form.render();
 
         function initHlmVoucherButtonValue() {
             form.val("hlm-voucher-button-form", {
                 "scorePrice": hlmVoucherButton.scorePrice,
                 "voucherOnOff": hlmVoucherButton.voucherOnOff,
+                "voucherPercent": hlmVoucherButton.voucherPercent,
             });
+
+            if (hlmVoucherButton.voucherOnOff == 1) {
+                $(".voucher-percent-input").show();
+            }
         }
 
         form.on('submit(hlm-voucher-button-submit)', function (data) {

--
Gitblit v1.9.1