admin/addon/store/shop/view/config/index.html

61 lines
2.3 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{extend name="app/shop/view/base.html"/}
{block name="resources"}
<style>
.layui-form-radio{margin-top: 0;}
</style>
{/block}
{block name="main"}
<div class="layui-form">
<!-- 基础上传 -->
<div class="layui-card card-common card-brief">
<div class="layui-card-header">
<span class="card-title">结算周期设置</span>
</div>
<div class="layui-card-body">
<div class="layui-form-item">
<label class="layui-form-label">结算周期类型:</label>
<div class="layui-input-block">
<div class="layui-input-inline">
<input type="radio" name="period_type" value="1" lay-filter="period_type" title="按天" {$config_info.value.period_type == 1 ? 'checked' : ''} />
<input type="radio" name="period_type" value="2" lay-filter="period_type" title="按周" {$config_info.value.period_type == 2 ? 'checked' : ''} />
<input type="radio" name="period_type" value="3" lay-filter="period_type" title="按月" {$config_info.value.period_type == 3 ? 'checked' : ''} />
</div>
</div>
<div class="word-aux">按天是指每天0点开始按周是指每周一0点开始按月是指每月一号0点开始</div>
</div>
<div class="form-row">
<button class="layui-btn" lay-submit lay-filter="save">保存</button>
</div>
</div>
</div>
</div>
{/block}
{block name="script"}
<script>
var form,repeat_flag = false; //防重复标识
layui.use(['form'], function() {
form = layui.form;
form.render();
form.on('submit(save)', function(data) {
if (repeat_flag) return;
repeat_flag = true;
field = data.field;
$.ajax({
type: 'POST',
dataType: 'JSON',
url: ns.url("store://shop/config/index"),
data: field,
success: function(res) {
layer.msg(res.message);
repeat_flag = false;
if (res.code == 0) {
location.reload();
}
}
});
});
});
</script>
{/block}