| | |
| | | @Autowired |
| | | private OrderService orderService; |
| | | |
| | | |
| | | @RequestMapping(value = "/order/head/page/auth") |
| | | @ManagerAuth |
| | | public R head(@RequestParam(defaultValue = "1")Integer curr, |
| | | @RequestParam(defaultValue = "10")Integer limit, |
| | | @RequestParam(required = false)String orderByField, |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam Map<String, Object> param){ |
| | | EntityWrapper<Order> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | return R.ok(orderService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | |
| | | |
| | |
| | | |
| | | // 渲染表格 |
| | | var insTb = table.render({ |
| | | elem: '#waitMatin', |
| | | url: baseUrl+'/waitMatin/head/page/auth', |
| | | elem: '#order', |
| | | url: baseUrl+'/order/head/page/auth', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | page: true, |
| | | cellMinWidth: 100, |
| | | cols: [[ |
| | | {type: 'numbers'}, |
| | | {field: 'billNo', title: '单据编号', sort: true}, |
| | | {field: 'billType$', align: 'center', title: '类型', minWidth: 160, width: 160}, |
| | | {field: 'orderNo', title: '单据编号', sort: true}, |
| | | {field: 'docType$', align: 'center', title: '类型', minWidth: 160, width: 160}, |
| | | {align: 'center', title: '明细', toolbar: '#tbLook', minWidth: 160, width: 160}, |
| | | {field: 'appeTime$', title: '创建时间', minWidth: 200, width: 200}, |
| | | {field: 'createTime$', title: '创建时间', minWidth: 200, width: 200}, |
| | | {field: 'settle$', align: 'center', title: '状态', templet: '#settleTpl', minWidth: 160, width: 160}, |
| | | {field: 'memo', align: 'center',title: '备注', hide: true}, |
| | | {align: 'center', title: '操作', toolbar: '#operate', minWidth: 130, width: 130} |
| | | ]], |
| | | request: { |
| | |
| | | }); |
| | | |
| | | // 搜索 |
| | | form.on('submit(waitMatinSearch)', function (data) { |
| | | form.on('submit(tbSearch)', function (data) { |
| | | insTb.reload({where: data.field, page: {curr: 1}}); |
| | | }); |
| | | |
| | | // 添加 |
| | | $("#waitMatinAddBtn").click(function () { |
| | | $("#orderAddBtn").click(function () { |
| | | showEditModel(); |
| | | }); |
| | | |
| | | // 工具条点击事件 |
| | | table.on('tool(waitMatin)', function (obj) { |
| | | table.on('tool(order)', function (obj) { |
| | | var data = obj.data; |
| | | var layEvent = obj.event; |
| | | if (layEvent === 'edit') { |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <button class="layui-btn icon-btn" lay-filter="waitMatinSearch" lay-submit> |
| | | <button class="layui-btn icon-btn" lay-filter="tbSearch" lay-submit> |
| | | <i class="layui-icon"></i>搜索 |
| | | </button> |
| | | <button id="waitMatinAddBtn" class="layui-btn icon-btn"><i class="layui-icon"></i>添加 |
| | | <button id="orderAddBtn" class="layui-btn icon-btn"><i class="layui-icon"></i>添加 |
| | | </button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <table id="waitMatin" lay-filter="waitMatin"></table> |
| | | <table id="order" lay-filter="order"></table> |
| | | </div> |
| | | </div> |
| | | <div class="layui-card"> |
| | |
| | | <i class="layui-icon" style="font-size: 12px;"></i> 查看单据明细 |
| | | </a> |
| | | </span> |
| | | </script> |
| | | <script type="text/html" id="settleTpl"> |
| | | <span name="settle" class="layui-badge layui-badge-gray">{{d.settle$}}</span> |
| | | </script> |
| | | <!-- 表单弹窗 --> |
| | | <script type="text/html" id="editDialog"> |
| | |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/waitMatin/waitMatin.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/order/order.js" charset="utf-8"></script> |
| | | </body> |
| | | </html> |
| | | |