| | |
| | | text-overflow: ellipsis; /*省略号显示*/ |
| | | } |
| | | .layui-table img{ |
| | | max-width:200px |
| | | max-width:100px |
| | | } |
| | | </style> |
| | | </div> |
| | |
| | | maxmin: true, |
| | | }); |
| | | } |
| | | |
| | | if (layEvent === 'cancelOrder') { |
| | | febs.modal.confirm('取消订单', '确认取消订单?', function () { |
| | | cancelOrder(data.id); |
| | | }); |
| | | } |
| | | if (layEvent === 'seePayImage') { |
| | | var t = $view.find('#seePayImage'+data.id+''); |
| | | //页面层 |
| | |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | function cancelOrder(id) { |
| | | febs.get(ctx + 'admin/order/cancelOrder/' + id, null, function () { |
| | | febs.alert.success('操作成功'); |
| | | $query.click(); |
| | | }); |
| | | } |
| | | |
| | | // 查询按钮 |
| | | $query.on('click', function () { |
| | |
| | | {field: 'memberPhone', title: '联系方式', minWidth: 120,align:'left'}, |
| | | {field: 'amount', title: '订单金额', minWidth: 120,align:'left'}, |
| | | {field: 'orderTime', title: '下单时间', minWidth: 120,align:'left'}, |
| | | {field: 'payMethod', title: '支付方式', minWidth: 120,align:'left'}, |
| | | {field: 'payTime', title: '支付时间', minWidth: 120,align:'left'}, |
| | | {field: 'payOrderNo', title: '支付订单号', minWidth: 120,align:'left'}, |
| | | {field: 'payImage', title: '支付凭证', |
| | | templet: function (d) { |
| | | return '<a lay-event="seePayImage"><img id="seePayImage'+d.id+'" src="'+d.payImage+'" alt=""></a>'; |
| | | }, minWidth: 200,align:'center'}, |
| | | }, minWidth: 100,align:'center'}, |
| | | {field: 'status', title: '状态', |
| | | templet: function (d) { |
| | | if (d.status === 1) { |
| | |
| | | }, minWidth: 80,align:'center'}, |
| | | {title: '操作', |
| | | templet: function (d) { |
| | | if (d.status === 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>' |
| | | } |
| | | if(d.payMethod === '支付宝支付' || d.payMethod === '微信支付'){ |
| | | if (d.status === 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="cancelOrder" 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>' |
| | | } |
| | | }else{ |
| | | if (d.status === 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: 300,align:'center'} |
| | | ]] |
| | | }); |