From bac072f518a357363ae3f201beb665021cd75efc Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Mon, 03 Apr 2023 18:13:51 +0800
Subject: [PATCH] 关于积分凭证
---
src/main/resources/templates/febs/views/modules/system/hlmVoucherButton.html | 43 +++++++++++++++++++++++++++++++++++--------
1 files changed, 35 insertions(+), 8 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 d47f681..5f441f9 100644
--- a/src/main/resources/templates/febs/views/modules/system/hlmVoucherButton.html
+++ b/src/main/resources/templates/febs/views/modules/system/hlmVoucherButton.html
@@ -9,16 +9,25 @@
<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>
@@ -38,12 +47,15 @@
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({
@@ -53,18 +65,33 @@
]
});
- 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 ;
});
--
Gitblit v1.9.1