| | |
| | | <label class="layui-form-label febs-form-item-require">价格:</label> |
| | | <div class="layui-form-mid layui-word-aux">当前价格:</div> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" name="scorePrice" lay-verify="required|integer" placeholder="请输入数字" autocomplete="off" class="layui-input" readonly> |
| | | <input type="text" name="scorePrice" lay-verify="required" placeholder="请输入数字" autocomplete="off" class="layui-input"> |
| | | </div> |
| | | <div class="layui-form-mid layui-word-aux">剩余:</div> |
| | | </div> |
| | | </div> |
| | | <blockquote class="layui-elem-quote blue-border">提现设置,提现时,是否需要凭证</blockquote> |
| | | <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 /> |
| | | </div> |
| | | </div> |
| | | <div class="layui-card-footer"> |
| | | <button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="hlm-voucher-button-submit" id="submit">保存</button> |
| | | <div class="layui-btn layui-btn-warm table-action" id="voucherButton"> |
| | | 确认一键卖出 |
| | | </div> |
| | | </div> |
| | | <div class="layui-card-footer"> |
| | | <button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="hlm-voucher-button-submit" id="submit">确认一键卖出</button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | margin-bottom: 20px !important; |
| | | } |
| | | </style> |
| | | |
| | | <script data-th-inline="javascript" type="text/javascript"> |
| | | layui.use(['dropdown', 'jquery', 'febs', 'form', 'eleTree'], function () { |
| | | var $ = layui.jquery, |
| | | febs = layui.febs, |
| | | form = layui.form, |
| | | hlmVoucherSet = [[${hlmVoucherSetDto}]], |
| | | $view = $('#hlm-voucher-button'), |
| | | hlmVoucherButton = [[${hlmVoucherButtonDto}]], |
| | | $voucherButton = $view.find('#voucherButton'), |
| | | $view = $('#hlm-voucher-button'); |
| | | |
| | | form.verify({ |
| | |
| | | ] |
| | | }); |
| | | |
| | | initHlmVoucherSetValue(); |
| | | initHlmVoucherButtonValue(); |
| | | |
| | | $voucherButton.on('click', function () { |
| | | febs.modal.confirm('确认一键卖出', '点击【确定】,即强制卖出所有账户的一半积分凭证?', function () { |
| | | selaHalfVoucher(); |
| | | }); |
| | | }); |
| | | |
| | | |
| | | function selaHalfVoucher() { |
| | | febs.post(ctx + 'admin/system/selaHalfVoucher', null, function (res) { |
| | | febs.alert.success('设置成功'); |
| | | return ; |
| | | }); |
| | | } |
| | | |
| | | form.render(); |
| | | |
| | | function initHlmVoucherSetValue() { |
| | | function initHlmVoucherButtonValue() { |
| | | form.val("hlm-voucher-button-form", { |
| | | "roleReleasePercent": hlmVoucherSet.roleReleasePercent |
| | | "scorePrice": hlmVoucherButton.scorePrice, |
| | | "voucherOnOff": hlmVoucherButton.voucherOnOff, |
| | | }); |
| | | } |
| | | |
| | | form.on('submit(hlm-voucher-button-submit)', function (data) { |
| | | febs.post(ctx + 'admin/system/hlmVoucherSet', data.field, function (res) { |
| | | febs.post(ctx + 'admin/system/hlmVoucherButton', data.field, function (res) { |
| | | febs.alert.success('设置成功'); |
| | | return ; |
| | | }); |