| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkCharge/truncate/charge/auth") |
| | | @ManagerAuth |
| | | public R truncateCharge() { |
| | | wrkChargeService.delete(new EntityWrapper<WrkCharge>().eq("memo", "charge")); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkCharge/truncate/demo/auth") |
| | | @ManagerAuth |
| | | public R truncateMemo() { |
| | | wrkChargeService.delete(new EntityWrapper<WrkCharge>().eq("memo", "demo")); |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | cols: [[ |
| | | {type: 'checkbox'} |
| | | ,{field: 'wrkNo', align: 'center',title: '工作号'} |
| | | ,{field: 'mk', align: 'center',title: '标记'} |
| | | ,{align: 'center',title: '任务类型', templet: '#memoTpl'} |
| | | // ,{field: 'mk', align: 'center',title: '标记'} |
| | | ,{field: 'wrkSts$', align: 'center',title: '工作状态'} |
| | | ,{field: 'ioType$', align: 'center',title: '入出库类型'} |
| | | // ,{field: 'ioType$', align: 'center',title: '入出库类型'} |
| | | ,{field: 'crnNo$', align: 'center',title: '堆垛机'} |
| | | ,{field: 'steNo$', align: 'center',title: '穿梭车'} |
| | | ,{field: 'outMost', align: 'center',title: '巷道口'} |
| | | ,{field: 'ioPri', align: 'center',title: '优先级'} |
| | | // ,{field: 'outMost', align: 'center',title: '巷道口'} |
| | | // ,{field: 'ioPri', align: 'center',title: '优先级'} |
| | | ,{field: 'locNo$', align: 'center',title: '目标库位'} |
| | | ,{field: 'staNo$', align: 'center',title: '目标站'} |
| | | ,{field: 'sourceStaNo$', align: 'center',title: '源站'} |
| | | // ,{field: 'staNo$', align: 'center',title: '目标站'} |
| | | // ,{field: 'sourceStaNo$', align: 'center',title: '源站'} |
| | | ,{field: 'sourceLocNo$', align: 'center',title: '源库位'} |
| | | ,{field: 'emptyMk', align: 'center',title: '空板(checkBox)'} |
| | | ,{field: 'ioTime$', align: 'center',title: '工作时间'} |
| | | ,{field: 'crnStrTime$', align: 'center',title: '堆垛机启动时间'} |
| | | ,{field: 'crnEndTime$', align: 'center',title: '堆垛机停止时间'} |
| | | // ,{field: 'emptyMk', align: 'center',title: '空板(checkBox)'} |
| | | // ,{field: 'ioTime$', align: 'center',title: '工作时间'} |
| | | // ,{field: 'crnStrTime$', align: 'center',title: '堆垛机启动时间'} |
| | | // ,{field: 'crnEndTime$', align: 'center',title: '堆垛机停止时间'} |
| | | ,{field: 'modiUser$', align: 'center',title: '修改人员'} |
| | | ,{field: 'modiTime$', align: 'center',title: '修改时间'} |
| | | ,{field: 'appeUser$', align: 'center',title: '创建者'} |
| | | ,{field: 'appeTime$', align: 'center',title: '添加时间'} |
| | | ,{field: 'memo', align: 'center',title: '备注'} |
| | | ,{field: 'barcode', align: 'center',title: '条码'} |
| | | // ,{field: 'appeUser$', align: 'center',title: '创建者'} |
| | | // ,{field: 'appeTime$', align: 'center',title: '添加时间'} |
| | | ,{field: 'barcode', align: 'center',title: '条码', hide: true} |
| | | |
| | | ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:120} |
| | | ]], |
| | |
| | | table.on('toolbar(wrkCharge)', function (obj) { |
| | | var checkStatus = table.checkStatus(obj.config.id).data; |
| | | switch(obj.event) { |
| | | case 'clearCharge': |
| | | layer.confirm('确定重置充电任务吗?', { |
| | | skin: 'layui-layer-admin', |
| | | shade: .1 |
| | | }, function (i) { |
| | | layer.close(i); |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/wrkCharge/truncate/charge/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | layer.msg(res.msg, {icon: 1}); |
| | | tableReload(); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | break; |
| | | case 'clearMemo': |
| | | layer.confirm('确定重置演示任务吗?', { |
| | | skin: 'layui-layer-admin', |
| | | shade: .1 |
| | | }, function (i) { |
| | | layer.close(i); |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/wrkCharge/truncate/demo/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | layer.msg(res.msg, {icon: 1}); |
| | | tableReload(); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | break; |
| | | case 'addData': |
| | | showEditModel(); |
| | | break; |
| | |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="id" placeholder="编号" autocomplete="off"> |
| | | <input class="layui-input" type="text" name="wrk_no" placeholder="任务号" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="ste_no" placeholder="穿梭车" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <select name="memo"> |
| | | <option value="">选择类型</option> |
| | | <option value="charge">充电任务</option> |
| | | <option value="memo">演示任务</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width: 300px"> |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | <script type="text/html" id="memoTpl"> |
| | | {{# if(d.memo === "charge"){ }} |
| | | <span name="memo" class="layui-badge layui-badge-red" >充电任务</span> |
| | | {{# } }} |
| | | {{# if(d.memo === "memo"){ }} |
| | | <span name="memo" class="layui-badge layui-badge-red" >演示任务</span> |
| | | {{# } }} |
| | | </script> |
| | | |
| | | <script type="text/html" id="toolbar"> |
| | | <div class="layui-btn-container"> |
| | | <button class="layui-btn layui-btn-sm" id="btn-add" lay-event="addData">新增</button> |
| | | <button class="layui-btn layui-btn-sm layui-btn-normal" id="btn-clear-charge" lay-event="clearCharge">重置充电任务</button> |
| | | <button class="layui-btn layui-btn-sm " id="btn-clear-memo" lay-event="clearMemo">重置演示任务</button> |
| | | <button class="layui-btn layui-btn-sm layui-btn-danger" id="btn-delete" lay-event="deleteData">删除</button> |
| | | <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData" style="float: right">导出</button> |
| | | </div> |
| | | </script> |
| | | |
| | | <script type="text/html" id="operate"> |
| | | <a class="layui-btn layui-btn-primary layui-btn-xs btn-edit" lay-event="edit">修改</a> |
| | | <a class="layui-btn layui-btn-danger layui-btn-xs btn-edit" lay-event="del">删除</a> |
| | | </script> |
| | | |