| | |
| | | </script> |
| | | <script type="text/html" id="tableToolBar"> |
| | | <div class="layui-btn-container"> |
| | | <button class="layui-btn layui-btn-sm layui-btn-primary febs-button-blue-plain" lay-event="exportDeliverOne">导出未发货订单(自提)</button> |
| | | <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> |
| | | <button class="layui-btn layui-btn-sm layui-btn-primary febs-button-blue-plain" lay-event="exportDeliverOne">导出待发货订单,系统自动发货</button> |
| | | <!-- <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> |
| | | <!-- 表格操作栏 end --> |
| | |
| | | table.on('tool(orderTable)', function (obj) { |
| | | var data = obj.data, |
| | | layEvent = obj.event; |
| | | // if (layEvent === 'deliverGoods') { |
| | | // febs.modal.open('发货', 'modules/order/deliverGoods/' + data.id, { |
| | | // btn: ['确认', '取消'], |
| | | // yes: function (index, layero) { |
| | | // $('#deliver-update').find('#submit').trigger('click'); |
| | | // }, |
| | | // btn2: function () { |
| | | // layer.closeAll(); |
| | | // } |
| | | // }); |
| | | // } |
| | | if (layEvent === 'deliverGoods') { |
| | | febs.modal.open('发货', 'modules/order/deliverGoods/' + data.id, { |
| | | btn: ['确认', '取消'], |
| | |
| | | cols: [[ |
| | | {field: 'orderNo', title: '订单编号', minWidth: 200,align:'left'}, |
| | | {field: 'memberName', title: '购买人', minWidth: 120,align:'left'}, |
| | | {field: 'memberPhone', title: '账号', minWidth: 120,align:'left'}, |
| | | {field: 'memberBindPhone', title: '联系方式', minWidth: 120,align:'left'}, |
| | | {field: 'memberPhone', title: '联系方式', minWidth: 120,align:'left'}, |
| | | // {field: 'memberBindPhone', title: '联系方式', minWidth: 120,align:'left'}, |
| | | {field: 'amount', title: '订单金额', minWidth: 120,align:'left'}, |
| | | {field: 'carriage', title: '运费', minWidth: 120,align:'left'}, |
| | | // {field: 'carriage', title: '运费', minWidth: 120,align:'left'}, |
| | | {field: 'orderTime', title: '下单时间', minWidth: 200,align:'left'}, |
| | | {field: 'deliveryType', title: '配送方式', |
| | | templet: function (d) { |
| | |
| | | return '' |
| | | } |
| | | }, minWidth: 80,align:'center'}, |
| | | {field: 'deliveryState', title: '配送状态', |
| | | templet: function (d) { |
| | | if (d.deliveryState === 1) { |
| | | return '<span style="color:dodgerblue;">待配送</span>' |
| | | } else if (d.deliveryState === 2) { |
| | | return '<span style="color:forestgreen;">配送中</span>' |
| | | } else if (d.deliveryState === 3) { |
| | | return '<span style="color:forestgreen;">已送达</span>' |
| | | }else{ |
| | | return '' |
| | | } |
| | | }, minWidth: 120,align:'center'}, |
| | | {field: 'payMethod', title: '支付方式', minWidth: 120,align:'left'}, |
| | | {field: 'payTime', title: '支付时间', minWidth: 200,align:'left'}, |
| | | {field: 'payOrderNo', title: '支付订单号', minWidth: 200,align:'left'}, |
| | | {field: 'wxOrderNo', title: '支付订单号', minWidth: 200,align:'left'}, |
| | | {title: '操作', |
| | | templet: function (d) { |
| | | if (d.status === 2 && d.deliveryType === 2) { |
| | | return '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="deliverGoods" shiro:hasPermission="user:update">发货</button>' |
| | | +'<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="seeOrder" 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>' |
| | | } |
| | | // } |
| | | },minWidth: 200,align:'center', fixed:'right'} |
| | | ]] |
| | | }); |