From 4fcfe5e7ca9557f41d65c0a9bbc45ae9f599e672 Mon Sep 17 00:00:00 2001
From: KKSU <15274802129@163.com>
Date: Tue, 02 Jan 2024 13:14:18 +0800
Subject: [PATCH] 修改推荐人
---
src/main/resources/templates/febs/views/modules/goods/goodsCouponUpdate.html | 52 +++++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 51 insertions(+), 1 deletions(-)
diff --git a/src/main/resources/templates/febs/views/modules/goods/goodsCouponUpdate.html b/src/main/resources/templates/febs/views/modules/goods/goodsCouponUpdate.html
index fbf9a2c..5f29717 100644
--- a/src/main/resources/templates/febs/views/modules/goods/goodsCouponUpdate.html
+++ b/src/main/resources/templates/febs/views/modules/goods/goodsCouponUpdate.html
@@ -45,6 +45,17 @@
<div class="layui-form-mid">(元)金额。</div>
<div class="layui-form-mid layui-word-aux">满足0元减免100元,则代表100元无门槛优惠卷。</div>
</div>
+
+ <blockquote class="layui-elem-quote blue-border">商品设置</blockquote>
+ <div class="layui-form-item coupon-rule">
+ <div class="layui-col-lg6">
+ <label class="layui-form-label febs-form-item-require">商品:</label>
+ <div class="layui-input-block">
+ <div id="coupon-rule"></div>
+ </div>
+ </div>
+ </div>
+
</div>
</div>
</div>
@@ -88,7 +99,37 @@
form.render();
- initValue();
+ var couponRuleGoodsIds = xmSelect.render({
+ el: '#coupon-rule',
+ language: 'zn',
+ prop : {
+ value : 'id',
+ children : 'child'
+ },
+ iconfont: {
+ parent: 'hidden',
+ },
+ toolbar: {
+ show: true,
+ },
+ // radio: true,
+ clickClose: true,
+ tree: {
+ show: true,
+ //非严格模式
+ strict: false,
+ },
+ data: []
+ })
+
+ febs.get(ctx + 'admin/goods/goodsTreeSet', null, function(res) {
+ couponRuleGoodsIds.update({
+ data : res.data,
+ autoRow: true,
+ });
+ initValue();
+ })
+
function initValue() {
form.val("coupon-rule-update-form", {
@@ -98,9 +139,18 @@
"costAmount": couponRule.costAmount,
"realAmount": couponRule.realAmount
});
+ couponRuleGoodsIds.setValue(couponRule.goodsIds);
}
form.on('submit(coupon-rule-update-form-submit)', function (data) {
+ let couponRuleList = couponRuleGoodsIds.getValue();
+ if (couponRuleList.length > 0) {
+ var couponIds = [];
+ layui.each(couponRuleList, function (key, item) {
+ couponIds.push(item.id)
+ });
+ data.field.goodsIds=couponIds;
+ }
$.ajax({
'url':ctx + 'admin/goods/couponUpdate',
'type':'post',
--
Gitblit v1.9.1