Commit 9dd6248f by gongyang

提交代码

parent 16f5bc5b
......@@ -33,6 +33,7 @@ layui.use(['jquery','element', 'layer', 'form','table','laypage','laydate','laye
limit: 20,
id:'table',
cols: [[ //表头
{ type: 'checkbox', width: 50, align: 'center', fixed: 'left' },
{field: 'smue_id', title: '序号',align:'center',width:100},
{field: 'update_time', title: '更新日期',align:'center',width:150},
{field: 'system_name', title: '更新系统',align:'center',width:150},
......@@ -67,6 +68,38 @@ layui.use(['jquery','element', 'layer', 'form','table','laypage','laydate','laye
});
//监听头工具栏事件
table.on('toolbar(systemUpdateList)', function (obj) {
var checkStatus = table.checkStatus(obj.config.id);
var data = checkStatus.data;
console.log(data);
switch (obj.event) {
//禁用
case 'disable':
if (data.length == 0) {
layer.msg('请至少勾选一条数据!');
return;
}
var order_ids = data.map(item => item.order_id);
Request('/api/order/auditOrder', 'POST', { order_id: order_ids.join(','), status: -3, dis_reason: reason }, function (res) {
if (res.code == 0) {
layer.msg('操作成功', { shift: 0, time: 2000 }, function () {
layer.closeAll();
table.reload('list');
});
} else {
layer.msg(res.msg);
}
});
break;
}
});
form.on('select(system_id)', function (data) {
$.ajax({
......@@ -224,5 +257,7 @@ layui.use(['jquery','element', 'layer', 'form','table','laypage','laydate','laye
});
......@@ -80,6 +80,7 @@
<div class="layui-btn-container" style="text-align: center; margin-top: 10px;">
<button lay-submit lay-filter="load" class="layui-btn">搜索</button>
<button type="button" class="layui-btn layui-btn-normal" id="addData">新增</button>
<button class="layui-btn-sm layui-btn-warm" id="createNotice">生成公告</button>
</div>
</div>
</form>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment