| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script type="text/html" id="tableToolBarOrder"> |
| | | <div class="layui-btn-container"> |
| | | <button class="layui-btn layui-btn-sm layui-btn-primary febs-button-blue-plain" lay-event="exportDeliverTwo">导出未发货订单(快递)</button> |
| | | <button class="layui-btn layui-btn-sm layui-btn-primary febs-button-blue-plain" id="importDeliver" lay-event="importDeliver">导入发货</button> |
| | | </div> |
| | | </script> |
| | | <script type="text/html" id="user-option"> |
| | | <span shiro:lacksPermission="user:view,user:update,user:delete"> |
| | | <span class="layui-badge-dot febs-bg-orange"></span> 无权限 |
| | |
| | | |
| | | // 表格初始化 |
| | | initTable(); |
| | | |
| | | table.on('toolbar(orderTable)', function(obj){ |
| | | var event = obj.event; |
| | | var id = obj.config.id; |
| | | var checkStatus = table.checkStatus(id); |
| | | if (event == 'exportDeliverTwo') { |
| | | var data = checkStatus.data; |
| | | let ids = ""; |
| | | for(let i = 0;i < data.length;i++){ |
| | | if(data[i].status != 2){ |
| | | febs.alert.warn('请选择已支付的订单'); |
| | | return; |
| | | }else if(data[i].deliverState != 1){ |
| | | febs.alert.warn('请选择待发货的订单'); |
| | | return; |
| | | }else{ |
| | | ids = ids + data[i].id+","; |
| | | } |
| | | } |
| | | console.log(ids); |
| | | if(ids == null || ids == ""){ |
| | | febs.alert.warn('请选择订单'); |
| | | return; |
| | | } |
| | | window.location.href = ctx + "admin/goods/exportOrderList?orderType=1&status=2&deliveryType=2&orderIds="+ids; |
| | | } |
| | | }); |
| | | |
| | | upload.render({ |
| | | elem: '#importDeliver' |
| | | ,url: 'admin/goods/importDeliver' //此处配置你自己的上传接口即可 |
| | | ,accept: 'file' //普通文件 |
| | | ,done: function(res){ |
| | | console.log("123"); |
| | | febs.alert.success('操作成功'); |
| | | $query.click(); |
| | | } |
| | | }); |
| | | |
| | | // 初始化表格操作栏各个按钮功能 |
| | | table.on('tool(orderTable)', function (obj) { |
| | |
| | | id: 'orderTable', |
| | | url: ctx + 'admin/goods/orderList', |
| | | // defaultToolbar: [], |
| | | toolbar: '#tableToolBar', |
| | | toolbar: '#tableToolBarOrder', |
| | | totalRow: true ,// 开启合计行 |
| | | cols: [[ |
| | | {type: 'checkbox', fixed: 'left'}, |
| | | {field: 'orderNo', title: '订单编号', minWidth: 120,align:'left', totalRowText: '合计:'}, |
| | | {field: 'address', title: '购买人', minWidth: 120,align:'left'}, |
| | | {field: 'goodsName', title: '商品信息', minWidth: 200,align:'left'}, |