123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8">
- <title>任务设置</title>
- <style>
- .wrap {
- display: none;
- }
- </style>
- </head>
- <body class="laytp-container">
- <div class="layui-card">
- <div class="layui-card-body">
- <form class="layui-form" lay-filter="layui-form">
- <div class="table-container">
- </div>
- <div class="bottom">
- <div class="button-container">
- <button type="submit" class="laytp-btn laytp-btn-primary laytp-btn-sm" lay-submit="" lay-filter="add">
- <i class="layui-icon layui-icon-ok"></i>
- 保存配置
- </button>
- <button type="reset" class="laytp-btn laytp-btn-sm">
- <i class="layui-icon layui-icon-refresh"></i>
- 重置
- </button>
- </div>
- </div>
- </form>
- </div>
- </div>
- <script id="confTableHtml" type="text/html">
- <input type="hidden" name="group" id="group" value="{{=d.group}}" />
- <div class="layui-card">
- <div class="layui-card-body">
- <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
- <ul class="layui-tab-title">
- <li lay-id="1" class="layui-this">分销模式</li>
- <li lay-id="2">返佣设置</li>
- <li lay-id="3">提现设置</li>
- </ul>
- <div class="layui-tab-content" style="height: 30px;">
- <!-- 基础配置 -->
- <div class="layui-tab-item layui-show">
- <table class="layui-table" style="margin: 0;" lay-skin="nob">
- <colgroup>
- <col width="15%">
- <col width="70%">
- <col width="15%">
- </colgroup>
- <tbody>
- <tr>
- <td style="text-align:right;">
- 分销功能开关
- </td>
- <td>
- <!-- 隐藏域设置开关未选中时需要传递的参数值 -->
- <input type="hidden" name="is_commission" value="2" />
- <input type="checkbox" name="is_commission" lay-skin="switch" lay-text="打开|关闭" value="1" {{# if(d.is_commission == 1){ }}checked="checked" {{# } }} />
- <input type="hidden" name="form_type[is_commission]" value="switch" />
- </td>
- <td>
- <div class="conf-des layui-form-mid layui-word-aux">
- <label title="配置说明">分销功能</label>
- <br />
- <code title="{{=d.group}}.is_commission">{{=d.group}}.is_commission</code>
- </div>
- </td>
- </tr>
- <tr>
- <td style="text-align:right;">
- 分销级别
- </td>
- <td>
- <input type="radio" name="level" value="1" {{#if (d.level == 1 || !d.level){ }}checked="checked"{{# } }} title="一级"/>
- <input type="radio" name="level" value="2" {{#if (d.level == 2){ }}checked="checked"{{# } }} title="二级" />
- <input type="radio" name="level" value="3" {{#if (d.level == 3){ }}checked="checked"{{# } }} title="三级"/>
- <input type="hidden" name="form_type[level]" value="radio" />
- <div class="layui-form-mid layui-word-aux">
- 最多可达三级分销,对设置保存后产生的绑定生效
- </div>
- </td>
- <td>
- <div class="conf-des layui-form-mid layui-word-aux">
- <label title="配置说明">分销级别</label>
- <br />
- <code title="{{=d.group}}.extract_rate">{{=d.group}}.level</code>
- </div>
- </td>
- </tr>
- <tr>
- <td style="text-align:right;">
- 入驻分销商费用
- </td>
- <td>
- <input type="hidden" name="commission_price" value="0" />
- <input autocomplete="off" type="text" name="commission_price" id="commission_price" value="{{d.commission_price?d.commission_price:0}}"
- placeholder="请输入金额" class="layui-input">
- <input type="hidden" name="form_type[commission_price]" value="input" />
- <div class="layui-form-mid layui-word-aux">
- 单位:元
- </div>
- </td>
- <td>
- <div class="conf-des layui-form-mid layui-word-aux">
- <label title="配置说明">入驻分销商费用</label>
- <br />
- <code title="{{=d.group}}.commission_price">{{=d.group}}.commission_price</code>
- </div>
- </td>
- </tr>
- <tr>
- <td style="text-align:right;">
- 分销中心别名
- </td>
- <td>
- <input autocomplete="off" type="text" name="commission_alias" id="input" value="{{=d.commission_alias}}" placeholder="请输入单行文本输入框" class="layui-input" lay-verify="">
- <input type="hidden" name="form_type[commission_alias]" value="input" />
- </td>
- <td>
- <div class="conf-des layui-form-mid layui-word-aux">
- <label title="名称">名称</label>
- <br />
- <code title="{{=d.group}}.input">{{=d.group}}.commission_alias</code>
- </div>
- </td>
- </tr>
- <!-- <tr>
- <td style="text-align:right;">
- 分销商付费入驻是否奖励
- </td>
- <td>
- <input type="radio" name="level" value="1" {{#if (d.level == 1 || !d.level){ }}checked="checked"{{# } }} title="不奖励"/>
- <input type="radio" name="level" value="2" {{#if (d.level == 2){ }}checked="checked"{{# } }} title="奖励点数" />
- <input type="radio" name="level" value="3" {{#if (d.level == 3){ }}checked="checked"{{# } }} title="奖励会员卡"/>
- <input type="hidden" name="form_type[level]" value="radio" />
- </td>
- <td>
- <div class="conf-des layui-form-mid layui-word-aux">
- <label title="配置说明">分销级别</label>
- <br />
- <code title="{{=d.group}}.extract_rate">{{=d.group}}.level</code>
- </div>
- </td>
- </tr>
- <tr>
- <td style="text-align:right;">
- 分销商付费入驻是否奖励
- </td>
- <td>
- <div class="layui-form-item">
- <label class="layui-form-label" title="类别">类别</label>
- <div class="layui-input-block">
- <div class="xmSelect"
- data-name="pid"
- data-sourceType="route"
- data-source="/admin.template/index?is_tree=true"
- data-sourceTree="true"
- data-paging="false"
- data-radio="true"
- data-valueField="id"
- data-selected="{{=d.pid}}"
- data-textField ='title'
- data-subTextField="sub_title"
- data-placeholder="请选择类别"
- ></div>
- </div>
- </div>
- </td>
- <td>
- <div class="conf-des layui-form-mid layui-word-aux">
- <label title="配置说明">分销级别</label>
- <br />
- <code title="{{=d.group}}.extract_rate">{{=d.group}}.level</code>
- </div>
- </td>
- </tr> -->
- <tr>
- <td style="text-align:right;">
- 是否开启分销商审核(仅限免费入驻的)
- </td>
- <td>
- <!-- 隐藏域设置开关未选中时需要传递的参数值 -->
- <input type="hidden" name="is_examine" value="2" />
- <input type="checkbox" name="is_examine" lay-skin="switch" lay-text="打开|关闭" value="1" {{# if(d.is_examine == 1){ }}checked="checked" {{# } }} />
- <input type="hidden" name="form_type[is_examine]" value="switch" />
- </td>
- <td>
- <div class="conf-des layui-form-mid layui-word-aux">
- <label title="配置说明">分销商审核</label>
- <br />
- <code title="{{=d.group}}.is_examine">{{=d.group}}.is_examine</code>
- </div>
- </td>
- </tr>
- <tr>
- <td style="text-align:right;">
- 是否展示排行榜
- </td>
- <td>
- <!-- 隐藏域设置开关未选中时需要传递的参数值 -->
- <input type="hidden" name="is_ranking" value="2" />
- <input type="checkbox" name="is_ranking" lay-skin="switch" lay-text="打开|关闭" value="1" {{# if(d.is_ranking == 1){ }}checked="checked" {{# } }} />
- <input type="hidden" name="form_type[is_ranking]" value="switch" />
- </td>
- <td>
- <div class="conf-des layui-form-mid layui-word-aux">
- <label title="配置说明">排行榜</label>
- <br />
- <code title="{{=d.group}}.is_ranking">{{=d.group}}.is_ranking</code>
- </div>
- </td>
- </tr>
- <tr>
- <td style="text-align:right;">
- 入驻说明
- </td>
- <td>
- <iframe src='{{=localStorage.getItem("adminDomain")}}/admin/ueditor.html?id=intro'
- class="editor" data-type="intro"
- data-id="intro" style="width:100%;height:530px;border: 0"></iframe>
- <textarea class="editorContent" data-id="intro"
- style="display:none;">{{=d.intro}}</textarea>
- </td>
- <td>
- <div class="conf-des layui-form-mid layui-word-aux">
- <label title="配置说明">配置说明</label>
- <br />
- <code title="{{=d.group}}.intro">{{=d.group}}.intro</code>
- </div>
- </td>
- <input type="hidden" name="form_type[intro]" value="intro" />
- </tr>
- </tbody>
- </table>
- </div>
- <!-- 返佣设置 -->
- <div class="layui-tab-item">
- <table class="layui-table" style="margin: 0;" lay-skin="nob">
- <colgroup>
- <col width="15%">
- <col width="70%">
- <col width="15%">
- </colgroup>
- <tbody>
- <tr>
- <td style="text-align:right;">
- 自购返佣
- </td>
- <td>
- <!-- 隐藏域设置开关未选中时需要传递的参数值 -->
- <input type="hidden" name="is_self_buy" value="2" />
- <input type="checkbox" name="is_self_buy" lay-skin="switch" lay-text="打开|关闭" value="1" {{# if(d.is_self_buy == 1){ }}checked="checked" {{# } }} />
- <input type="hidden" name="form_type[is_self_buy]" value="switch" />
- </td>
- <td>
- <div class="conf-des layui-form-mid layui-word-aux">
- <label title="配置说明">是否开启自购返佣(开启:分销员自己购买商品,享受直推返佣,上级享受间推返佣,上上级享受再间推返佣; 关闭:分销员自己购买商品没有返佣)</label>
- <br />
- <code title="{{=d.group}}.is_self_buy">{{=d.group}}.is_self_buy</code>
- </div>
- </td>
- </tr>
- <tr>
- <td style="text-align:right;">
- 分销商入驻费是否返佣
- </td>
- <td>
- <!-- 隐藏域设置开关未选中时需要传递的参数值 -->
- <input type="hidden" name="is_self_buy_commission" value="2" />
- <input type="checkbox" name="is_self_buy_commission" lay-skin="switch" lay-text="打开|关闭" value="1" {{# if(d.is_self_buy_commission == 1){ }}checked="checked" {{# } }} />
- <input type="hidden" name="form_type[is_self_buy_commission]" value="switch" />
- </td>
- <td>
- <div class="conf-des layui-form-mid layui-word-aux">
- <label title="配置说明">分销商入驻费是否返佣</label>
- <br />
- <code title="{{=d.group}}.is_self_buy_commission">{{=d.group}}.is_self_buy_commission</code>
- </div>
- </td>
- </tr>
- <tr>
- <td style="text-align:right;">
- 直推佣金比例
- </td>
- <td>
- <input autocomplete="off" type="text" name="first" id="first" value="{{=d.first}}"
- placeholder="请输入数字" class="layui-input">
- <input type="hidden" name="form_type[first]" value="input" />
- <div class="layui-form-mid layui-word-aux">
- 请填写数字,单位:%
- </div>
- </td>
- <td>
- <div class="conf-des layui-form-mid layui-word-aux">
- <label title="配置说明">a->b->c->d(消费者)中的c</label>
- <br />
- <code title="{{=d.group}}.first">{{=d.group}}.first</code>
- </div>
- </td>
- </tr>
- <tr>
- <td style="text-align:right;">
- 间推佣金比例
- </td>
- <td>
- <input autocomplete="off" type="text" name="second" id="second" value="{{=d.second}}"
- placeholder="请输入数字" class="layui-input">
- <input type="hidden" name="form_type[second]" value="input" />
- <div class="layui-form-mid layui-word-aux">
- 请填写数字,单位:%
- </div>
- </td>
- <td>
- <div class="conf-des layui-form-mid layui-word-aux">
- <label title="配置说明">a->b->c->d(消费者)中的b</label>
- <br />
- <code title="{{=d.group}}.second">{{=d.group}}.second</code>
- </div>
- </td>
- </tr>
- <tr>
- <td style="text-align:right;">
- 再间推佣金比例
- </td>
- <td>
- <input autocomplete="off" type="text" name="third" id="third" value="{{=d.third}}"
- placeholder="请输入数字" class="layui-input">
- <input type="hidden" name="form_type[third]" value="input" />
- <div class="layui-form-mid layui-word-aux">
- 请填写数字,单位:%
- </div>
- </td>
- <td>
- <div class="conf-des layui-form-mid layui-word-aux">
- <label title="配置说明">a->b->c->d(消费者)中的a</label>
- <br />
- <code title="{{=d.group}}.third">{{=d.group}}.third</code>
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!-- 提现设置 -->
- <div class="layui-tab-item">
- <table class="layui-table" style="margin: 0;" lay-skin="nob">
- <colgroup>
- <col width="15%">
- <col width="70%">
- <col width="15%">
- </colgroup>
- <tbody>
- <tr>
- <td style="text-align:right;">
- 分销提现说明
- </td>
- <td>
- <textarea name="instructions" class="layui-textarea">{{=d.instructions}}</textarea>
- <input type="hidden" name="form_type[instructions]" value="textarea" />
- </td>
- <td>
- <div class="conf-des layui-form-mid layui-word-aux">
- <label title="网站名称">分销提现说明</label>
- <br />
- <code title="{{=d.group}}.input">{{=d.group}}.instructions</code>
- </div>
- </td>
- </tr>
- <tr>
- <td style="text-align:right;">
- 最低提现金额
- </td>
- <td>
- <input autocomplete="off" type="text" name="extract_min_price" id="extract_min_price" value="{{=d.extract_min_price}}"
- placeholder="请输入最低提现金额" class="layui-input">
- <input type="hidden" name="form_type[extract_min_price]" value="input" />
- <div class="layui-form-mid layui-word-aux">
- 单位:元
- </div>
- </td>
- <td>
- <div class="conf-des layui-form-mid layui-word-aux">
- <label title="最低提现金额">最低提现金额</label>
- <br />
- <code title="{{=d.group}}.extract_min_price">{{=d.group}}.extract_min_price</code>
- </div>
- </td>
- </tr>
- <!-- <tr>
- <td style="text-align:right;">
- 提现手续费率
- </td>
- <td>
- <input autocomplete="off" type="text" name="extract_rate" id="extract_rate" value="{{=d.extract_rate}}"
- placeholder="请输入提现手续费率" class="layui-input">
- <input type="hidden" name="form_type[extract_rate]" value="input" />
- <div class="layui-form-mid layui-word-aux">
- 单位:%
- </div>
- </td>
- <td>
- <div class="conf-des layui-form-mid layui-word-aux">
- <label title="提现时的手续费">提现手续费</label>
- <br />
- <code title="{{=d.group}}.extract_rate">{{=d.group}}.extract_rate</code>
- </div>
- </td>
- </tr> -->
- </tbody>
- </table>
- </div>
- </div>
- </div>
- </div>
- </div>
- </script>
- <script type="application/javascript">
- document.write("<link rel='stylesheet' href='" + localStorage.getItem("staticDomain") +
- "/component/layui/css/layui.css?v=" + localStorage.getItem("version") + "'>");
- document.write("<script src='" + localStorage.getItem("staticDomain") + "/component/layui/layui.js?v=" +
- localStorage.getItem("version") + "'><\/script>");
- document.write("<script src='" + localStorage.getItem("staticDomain") + "/component/laytp/layuiConfig.js?v=" +
- localStorage.getItem("version") + "'><\/script>");
- document.write("<script src='" + localStorage.getItem("staticDomain") + "/component/jquery_3.3.1.js?v=" +
- localStorage.getItem("version") + "'><\/script>");
- document.write("<script src='" + localStorage.getItem("staticDomain") + "/component/jquery.tablednd.js?v=" +
- localStorage.getItem("version") + "'><\/script>");
- </script>
- <script>
- let dom;
- layui.use(['laytp', 'drawer','element'], function() {
- var group = "system.commission";
- var drawer = layui.drawer;
- var element = layui.element;
- // 先获取数据,渲染表单
- // 渲染完表单之后,设置滚动条
- facade.ajax({
- route: "/admin.conf/getGroupConf",
- data: {
- "group": group
- },
- successAlert: false,
- showLoading: true
- }).done(function(res) {
- if (res.code === 0) {
- res.data.group = group;
- layui.laytpl($("#confTableHtml").html()).render(res.data, function(string) {
- $(".table-container").html(string);
- layui.laytpForm.render();
- var windowHeight = $(window).height();
- var maxHeight = parseInt(windowHeight) - 86;
- var minHeight = parseInt(windowHeight) - 86;
- // 设置table-container的最大高度和超过高度后展示滚动条
- $(".table-container").css("margin-bottom", '40px');
- $(".table-container").css("max-height", maxHeight + 'px');
- $(".table-container").css("min-height", minHeight + 'px');
- $(".table-container").css("overflow-y", "auto");
- $('.bottom').css("background-color", "#f6f6f6");
- });
- }
- });
- // 选项卡
- var layid = location.hash.replace(/^#docDemoTabBrief=/, '');
- element.tabChange('test1', layid);
- element.on('tab(docDemoTabBrief)', function(data) {
- location.hash = 'test1=' + this.getAttribute('lay-id');
- });
- layui.form.on('submit(add)', function(data) {
- var btnAnim = layui.button.load({
- elem: $(this)
- });
- try {
- data = facade.setEditorField(data);
- } catch (e) {
- facade.error(e);
- return false;
- }
- data.field.group = group;
- facade.ajax({
- route: '/admin.conf/saveGroupConf',
- data: data.field
- }).done(function() {
- btnAnim.stop();
- }).fail(function() {
- btnAnim.stop();
- });
- return false;
- });
- $('#btnClose').on('click',function(){
- dom.close();
- })
- })
- </script>
- <script type="text/javascript">
- function drawer(){
- layui.use(['drawer'], function() {
- var drawer = layui.drawer;
- dom = drawer.open({
- direction: "right",
- dom: ".layer-right",
- distance: "30%"
- });
- });
- }
- </script>
- </body>
- </html>
|