|  |  |  | 
|---|
|  |  |  | printSelect(checkStatus.data) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | let statisticIds = 0; | 
|---|
|  |  |  | if(event === 'goodsStatistics'){ | 
|---|
|  |  |  | var data = checkStatus.data; | 
|---|
|  |  |  | let statistics = 0; | 
|---|
|  |  |  | for(let i = 0;i < data.length;i++){ | 
|---|
|  |  |  | statistics = statistics+ "," + data[i].id; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | console.log(statistics); | 
|---|
|  |  |  | if(statistics == null || statistics == ""){ | 
|---|
|  |  |  | febs.alert.warn('请选择需要统计的订单'); | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | let statisticIds = statistics; | 
|---|
|  |  |  | statisticIds = statistics; | 
|---|
|  |  |  | console.log(statisticIds); | 
|---|
|  |  |  | febs.modal.open( '商品数量统计', 'modules/order/goodsStatistics/'+statisticIds, { | 
|---|
|  |  |  | maxmin: true, | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | 
|---|
|  |  |  | layEvent = obj.event; | 
|---|
|  |  |  | if (layEvent === 'deliverGoods') { | 
|---|
|  |  |  | febs.modal.open('发货', 'modules/order/deliverGoods/' + data.id, { | 
|---|
|  |  |  | btn: ['确认', '取消'], | 
|---|
|  |  |  | btn: ['确认','取消'], | 
|---|
|  |  |  | yes: function (index, layero) { | 
|---|
|  |  |  | $('#deliver-update').find('#submit').trigger('click'); | 
|---|
|  |  |  | // $query.click(); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | btn2: function () { | 
|---|
|  |  |  | layer.closeAll(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (layEvent === 'updateDeliver') { | 
|---|
|  |  |  | febs.modal.open('修改物流信息', 'modules/order/deliverGoods/' + data.id, { | 
|---|
|  |  |  | btn: ['确认','取消'], | 
|---|
|  |  |  | yes: function (index, layero) { | 
|---|
|  |  |  | $('#deliver-update').find('#deliverInfoSubmit').trigger('click'); | 
|---|
|  |  |  | // $query.click(); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | btn2: function () { | 
|---|
|  |  |  | layer.closeAll(); | 
|---|
|  |  |  | 
|---|
|  |  |  | url: ctx + 'admin/order/orderList?orderType=1', | 
|---|
|  |  |  | // defaultToolbar: [], | 
|---|
|  |  |  | //系统自带打印导出 | 
|---|
|  |  |  | totalRow : true, | 
|---|
|  |  |  | toolbar: '#tableToolBarOrder', | 
|---|
|  |  |  | cols: [[ | 
|---|
|  |  |  | {type: 'checkbox', fixed: 'left'}, | 
|---|
|  |  |  | {field: 'orderNo', title: '订单编号', minWidth: 200,align:'left'}, | 
|---|
|  |  |  | {field: 'orderNo', title: '订单编号', minWidth: 200,align:'left' ,totalRowText:"合计"}, | 
|---|
|  |  |  | {field: 'memberName', title: '购买人', minWidth: 100,align:'left'}, | 
|---|
|  |  |  | {field: 'memberPhone', title: '联系方式', minWidth: 120,align:'left'}, | 
|---|
|  |  |  | {field: 'goodsName', title: '商品', minWidth: 160,align:'left'}, | 
|---|
|  |  |  | {field: 'goodsAmount', title: '价格', minWidth: 80,align:'left'}, | 
|---|
|  |  |  | {field: 'carriage', title: '邮费', minWidth: 80,align:'left'}, | 
|---|
|  |  |  | {field: 'amount', title: '总金额', minWidth: 100,align:'left'}, | 
|---|
|  |  |  | {field: 'remark', title: '备注', minWidth: 160,align:'left'}, | 
|---|
|  |  |  | {field: 'goodsAmount', title: '价格', minWidth: 80,align:'left', totalRow:true}, | 
|---|
|  |  |  | {field: 'carriage', title: '邮费', minWidth: 80,align:'left', totalRow:true}, | 
|---|
|  |  |  | {field: 'amount', title: '总金额', minWidth: 100,align:'left', totalRow:true}, | 
|---|
|  |  |  | {field: 'orderTime', title: '下单时间', minWidth: 200,align:'left'}, | 
|---|
|  |  |  | {field: 'status', title: '状态', | 
|---|
|  |  |  | templet: function (d) { | 
|---|
|  |  |  | 
|---|
|  |  |  | if(d.status === 2){ | 
|---|
|  |  |  | return '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="seeOrder" shiro:hasPermission="user:update">详情</button>' | 
|---|
|  |  |  | +'<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="deliverGoods" shiro:hasPermission="user:update">发货</button>' | 
|---|
|  |  |  | }else if(d.status === 3){ | 
|---|
|  |  |  | return '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="seeOrder" shiro:hasPermission="user:update">详情</button>' | 
|---|
|  |  |  | +'<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="updateDeliver" shiro:hasPermission="user:update">修改物流信息</button>' | 
|---|
|  |  |  | }else{ | 
|---|
|  |  |  | return '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="seeOrder" shiro:hasPermission="user:update">详情</button>' | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | //用于包含内容 | 
|---|
|  |  |  | var v = document.createElement("div"); | 
|---|
|  |  |  | //页面头部,导入css  ,media="print"表示打印时使用该样式 | 
|---|
|  |  |  | var f = ["<head>", "<style>", "div{font-size:8px;}", ".main{width:100%;height:10%}", | 
|---|
|  |  |  | var f = ["<head>", "<style>", "div{font-size:8px;}", ".main{width:100%;}", | 
|---|
|  |  |  | ".main div{width:100%;display:inline-block;}", "</style>", "</head>" | 
|---|
|  |  |  | ].join(""); | 
|---|
|  |  |  | var contentHtml = ""; | 
|---|
|  |  |  | 
|---|
|  |  |  | var template = | 
|---|
|  |  |  | "<div class='main'>" + | 
|---|
|  |  |  | "<div style='text-align: center;font-size: 10px;font-weight: bold;margin-bottom: 10px'>订单编号:" + data.orderNo + "</div>" + | 
|---|
|  |  |  | "<div>收货人:" + data.name + ",电话:" + data.phone + ",地址:" + data.address + "</div><br><br>" + | 
|---|
|  |  |  | // "<div>电话:" + data.phone + "</div><br><br>" + | 
|---|
|  |  |  | // "<div>地址:" + data.address + "</div><br><br>" + | 
|---|
|  |  |  | // "<div>编号:" + data.orderNo + "</div><br><br>" + | 
|---|
|  |  |  | "<div>商品:" + data.goodsName + "</div><br><br>" + | 
|---|
|  |  |  | "<span style='font-size: 10px;font-weight: bold;'>收货人:</span><span>" + data.name + ",</span>" + | 
|---|
|  |  |  | "<span style='font-size: 10px;font-weight: bold;'>电话:</span><span>" + data.phone + ",</span>" + | 
|---|
|  |  |  | "<span style='font-size: 10px;font-weight: bold;'>地址:</span><span>" + data.address + "</span><br>" + | 
|---|
|  |  |  | "<span style='font-size: 10px;font-weight: bold;'>商品:</span><span>" + data.goodsName + "</span><br>" + | 
|---|
|  |  |  | "<span style='font-size: 10px;font-weight: bold;'>备注:</span><span>" + data.remark + "</span><br>" + | 
|---|
|  |  |  | "</div>" | 
|---|
|  |  |  |  | 
|---|
|  |  |  | contentHtml += template; | 
|---|