| | |
| | | var insTb; |
| | | layui.config({ |
| | | base: baseUrl + "/static/layui/lay/modules/" // 配置模块所在的目录 |
| | | }).use(['table','laydate', 'form', 'admin'], function() { |
| | |
| | | |
| | | /****************************************** 左边表 *************************************************/ |
| | | |
| | | var insTb = table.render({ |
| | | insTb = table.render({ |
| | | elem: '#originTable', |
| | | url: baseUrl + '/order/nav/list/auth', |
| | | height: 'full-100', |
| | | height: 'full-120', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | request: { |
| | | pageName: 'curr', |
| | |
| | | // '</p>'].join(''), |
| | | defaultToolbar: [], |
| | | cols: [[ |
| | | // {type: 'number', title: '#'}, |
| | | // {type: 'numbers', title: '#'}, |
| | | {field: 'orderTime', title: '日期'}, |
| | | {field: 'orderNo', title: '编号', align: 'center'} |
| | | {field: 'orderNo', title: '单据编号', align: 'center'} |
| | | ]], |
| | | done: function (res, curr, count) { |
| | | console.log(res) |
| | | $('#dictTable+.layui-table-view .layui-table-body tbody>tr:first').trigger('click'); |
| | | } |
| | | }); |
| | |
| | | /* 表格重置 */ |
| | | form.on('submit(originTbReset)', function (data) { |
| | | insTb.reload({where: null}); |
| | | insTb2.reload({where: {host_id: null}, page: {curr: 1}}); |
| | | insTb2.reload({where: null, page: {curr: 1}}); |
| | | return false; |
| | | }); |
| | | |
| | |
| | | table.on('row(originTable)', function (obj) { |
| | | selObj = obj; |
| | | obj.tr.addClass('layui-table-click').siblings().removeClass('layui-table-click'); |
| | | insTb2.reload({where: {host_id: obj.data.id}, page: {curr: 1}}); |
| | | insTb2.reload({where: {order_id: obj.data.id}, page: {curr: 1}}); |
| | | }); |
| | | |
| | | /* 显示表单弹窗 */ |