|
@@ -63,6 +63,10 @@
|
|
|
<input type='checkbox' name='id' lay-skin='switch' value="{{d.id}}" lay-filter='is_show'
|
|
|
lay-text='显示|隐藏' {{ d.is_show== 1 ? 'checked' : '' }}>
|
|
|
</script>
|
|
|
+ <script type="text/html" id="period">
|
|
|
+ <input type='checkbox' name='id' lay-skin='switch' value="{{d.id}}" lay-filter='period'
|
|
|
+ lay-text='是|否' {{ d.period== 1 ? 'checked' : '' }}>
|
|
|
+ </script>
|
|
|
<script type="text/html" id="act">
|
|
|
<button type="button" class="layui-btn layui-btn-xs layui-btn-normal" lay-event='edit'>
|
|
|
编辑门店
|
|
@@ -100,6 +104,7 @@
|
|
|
{field: 'day_time', title: '营业时间', width: '15%'},
|
|
|
|
|
|
{field: 'status', title: '是否显示', templet: "#checkboxstatus", width: '8%'},
|
|
|
+ {field: 'period', title: '本期推荐', templet: "#period", width: '8%'},
|
|
|
{field: 'right', title: '操作', align: 'center', toolbar: '#act', width: '14%'},
|
|
|
];
|
|
|
});
|
|
@@ -136,6 +141,30 @@
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
+
|
|
|
+ layList.switch('period', function (odj, value) {
|
|
|
+ if (odj.elem.checked == true) {
|
|
|
+ layList.baseGet(layList.Url({
|
|
|
+ c: 'system.system_store',
|
|
|
+ a: 'set_period',
|
|
|
+ p: {period: 1, id: value}
|
|
|
+ }), function (res) {
|
|
|
+ layList.msg(res.msg, function () {
|
|
|
+ layList.reload();
|
|
|
+ });
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ layList.baseGet(layList.Url({
|
|
|
+ c: 'system.system_store',
|
|
|
+ a: 'set_period',
|
|
|
+ p: {period: 0, id: value}
|
|
|
+ }), function (res) {
|
|
|
+ layList.msg(res.msg, function () {
|
|
|
+ layList.reload();
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
|
|
|
layList.tool(function (event, data, obj) {
|
|
|
switch (event) {
|