| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">提货方式:</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="deliverType"> |
| | | <option value="">请选择</option> |
| | | <option value="1">快递寄送</option> |
| | | <option value="2">到店自提</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">订单状态:</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="status"> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">支付状态:</label> |
| | | <label class="layui-form-label">发货状态:</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="payResult"> |
| | | <select name="deliverState"> |
| | | <option value="">请选择</option> |
| | | <option value="1">成功</option> |
| | | <option value="2">未成功</option> |
| | | <option value="1">待发货</option> |
| | | <option value="2">已发货</option> |
| | | <option value="3">已签收</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | </form> |
| | | <table lay-filter="orderTable" lay-data="{id: 'orderTable'}"></table> |
| | | <style type="text/css"> |
| | | .layui-table-cell{ |
| | | text-align:center; |
| | | height: auto; |
| | | white-space: nowrap; /*文本不会换行,在同一行显示*/ |
| | | overflow: hidden; /*超出隐藏*/ |
| | | text-overflow: ellipsis; /*省略号显示*/ |
| | | } |
| | | .layui-table img{ |
| | | max-width:100px |
| | | } |
| | | </style> |
| | | <!-- <style type="text/css">--> |
| | | <!-- .layui-table-cell{--> |
| | | <!-- text-align:center;--> |
| | | <!-- height: auto;--> |
| | | <!-- white-space: nowrap; /*文本不会换行,在同一行显示*/--> |
| | | <!-- overflow: hidden; /*超出隐藏*/--> |
| | | <!-- text-overflow: ellipsis; /*省略号显示*/--> |
| | | <!-- }--> |
| | | <!-- .layui-table img{--> |
| | | <!-- max-width:100px--> |
| | | <!-- }--> |
| | | <!-- </style>--> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!-- 表格操作栏 start --> |
| | | <script type="text/html" id="mall-order-option"> |
| | | {{# if(d.status === 2) { }} |
| | | <button class="layui-btn layui-btn-normal layui-btn-xs" type="button" shiro:hasPermission="orderMoneyFlow:update" lay-event="orderMoneyFlow">资金流水</button> |
| | | {{# } else if(d.status === 3) { }} |
| | | <button class="layui-btn layui-btn-normal layui-btn-xs" type="button" shiro:hasPermission="orderMoneyFlow:update" lay-event="delOrder">删除</button> |
| | | {{# } else { }} |
| | | {{# } }} |
| | | <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"> |
| | |
| | | // 表格初始化 |
| | | 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) { |
| | | var data = obj.data, |
| | |
| | | maxmin: true, |
| | | }); |
| | | } |
| | | if (layEvent === 'deliverGoods') { |
| | | febs.modal.open('发货', 'goodsView/deliverGoods/' + data.id, { |
| | | btn: ['确认', '取消'], |
| | | yes: function (index, layero) { |
| | | $('#deliver-update').find('#submit').trigger('click'); |
| | | }, |
| | | btn2: function () { |
| | | layer.closeAll(); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | function delOrder(id) { |
| | | febs.get(ctx + 'admin/order/delOrder/' + id, null, function () { |
| | | febs.get(ctx + 'admin/goods/delOrder/' + id, null, function () { |
| | | febs.alert.success('操作成功'); |
| | | $query.click(); |
| | | }); |
| | |
| | | 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'}, |
| | | {field: 'amount', title: '订单金额', minWidth: 120,align:'left',totalRow: '{{= parseInt(d.amount) }}'}, |
| | | {field: 'status', title: '状态', |
| | | {field: 'deliverType', title: '提货方式', |
| | | templet: function (d) { |
| | | if (d.deliverType === 1) { |
| | | return '<span style="color:blue;">快递寄送</span>' |
| | | } else if (d.deliverType === 2) { |
| | | return '<span style="color:green;">到店自提</span>' |
| | | }else{ |
| | | return '' |
| | | } |
| | | }, minWidth: 80,align:'center'}, |
| | | {field: 'status', title: '订单状态', |
| | | templet: function (d) { |
| | | if (d.status === 1) { |
| | | return '<span style="color:blue;">待支付</span>' |
| | |
| | | return '' |
| | | } |
| | | }, minWidth: 80,align:'center'}, |
| | | {field: 'deliverState', title: '发货状态', |
| | | templet: function (d) { |
| | | if (d.deliverState === 1) { |
| | | return '<span style="color:red;">待发货</span>' |
| | | } else if (d.deliverState === 2) { |
| | | return '<span style="color:green;">已发货</span>' |
| | | }else if (d.deliverState === 3) { |
| | | return '<span style="color:blue;">已签收</span>' |
| | | }else{ |
| | | return '' |
| | | } |
| | | }, minWidth: 80,align:'center'}, |
| | | {field: 'orderTime', title: '下单时间', minWidth: 200,align:'left'}, |
| | | {field: 'payMethod', title: '支付方式', minWidth: 120,align:'left'}, |
| | | {field: 'payTime', title: '支付时间', minWidth: 200,align:'left'}, |
| | | {field: 'payOrderNo', title: '支付订单号', minWidth: 200,align:'left'}, |
| | | |
| | | {title: '操作', minWidth: 200 ,toolbar: '#mall-order-option',hide:mallOrderOption,align:'left', fixed:'right'}, |
| | | {title: '操作', |
| | | templet: function (d) { |
| | | if (d.status === 2) { |
| | | if(d.deliverType === 1){ |
| | | if(d.deliverState === 1){ |
| | | return '<button class="layui-btn layui-btn-normal layui-btn-xs" type="button" shiro:hasPermission="orderMoneyFlow:update" lay-event="deliverGoods">发货</button>' |
| | | +'<button class="layui-btn layui-btn-normal layui-btn-xs" type="button" shiro:hasPermission="orderMoneyFlow:update" lay-event="orderMoneyFlow">资金流水</button>' |
| | | }else{ |
| | | return '<button class="layui-btn layui-btn-normal layui-btn-xs" type="button" shiro:hasPermission="orderMoneyFlow:update" lay-event="orderMoneyFlow">资金流水</button>' |
| | | } |
| | | }else{ |
| | | return '<button class="layui-btn layui-btn-normal layui-btn-xs" type="button" shiro:hasPermission="orderMoneyFlow:update" lay-event="orderMoneyFlow">资金流水</button>' |
| | | } |
| | | }else if(d.status === 3){ |
| | | return '<button class="layui-btn layui-btn-warm layui-btn-xs" type="button" shiro:hasPermission="orderMoneyFlow:update" lay-event="delOrder">删除</button>' |
| | | }else{ |
| | | return '<button class="layui-btn layui-btn-warm layui-btn-xs" type="button" shiro:hasPermission="orderMoneyFlow:update" lay-event="delOrder">删除</button>' |
| | | } |
| | | },minWidth: 200,align:'center', fixed:'right'} |
| | | ]] |
| | | }); |
| | | } |
| | |
| | | name: $searchForm.find('input[name="name"]').val().trim(), |
| | | orderNo: $searchForm.find('input[name="orderNo"]').val().trim(), |
| | | goodsName: $searchForm.find('input[name="goodsName"]').val().trim(), |
| | | payResult: $searchForm.find("select[name='payResult']").val(), |
| | | deliverState: $searchForm.find("select[name='deliverState']").val(), |
| | | deliverType: $searchForm.find("select[name='deliverType']").val(), |
| | | status: $searchForm.find("select[name='status']").val(), |
| | | }; |
| | | } |