| | |
| | | <div class="layui-input-inline"> |
| | | <select name="state"> |
| | | <option value="">请选择</option> |
| | | <option value="0">未开票</option> |
| | | <option value="1">开票中</option> |
| | | <option value="0">待申请</option> |
| | | <option value="1">待开票</option> |
| | | <option value="2">已开票</option> |
| | | </select> |
| | | </div> |
| | |
| | | // 表格初始化 |
| | | initInvoiceTable(); |
| | | |
| | | upload.render({ |
| | | elem: '#importDeliver' |
| | | ,url: 'admin/order/importDeliver' //此处配置你自己的上传接口即可 |
| | | ,accept: 'file' //普通文件 |
| | | ,done: function(res){ |
| | | console.log("123"); |
| | | febs.alert.success('操作成功'); |
| | | $query.click(); |
| | | } |
| | | }); |
| | | |
| | | // 初始化表格操作栏各个按钮功能 |
| | | table.on('tool(invoiceTable)', 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'); |
| | | // $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(); |
| | | } |
| | | }); |
| | | } |
| | | if (layEvent === 'seeOrder') { |
| | | febs.modal.open( '订单详情', 'modules/order/orderDetail/' + data.id, { |
| | | maxmin: true, |
| | | }); |
| | | } |
| | | if (layEvent === 'cancelOrder') { |
| | | febs.modal.confirm('取消订单', '确认取消订单?', function () { |
| | | cancelOrder(data.id); |
| | | }); |
| | | } |
| | | if (layEvent === 'seePayImage') { |
| | | var t = $view.find('#seePayImage'+data.id+''); |
| | | //页面层 |
| | | layer.open({ |
| | | type: 1, |
| | | title: "支付凭证", |
| | | skin: 'layui-layer-rim', //加上边框 |
| | | area: ['80%', '80%'], //宽高 |
| | | shadeClose: true, //开启遮罩关闭 |
| | | end: function (index, layero) { |
| | | return false; |
| | | }, |
| | | content: '<div style="text-align:center"><img src="' + $(t).attr('src') + '" /></div>' |
| | | if (layEvent === 'seeInvoiceDetail') { |
| | | febs.modal.open('开票信息', 'modules/order/invoiceDetail/'+ data.id, { |
| | | area:['100%','100%'], |
| | | }); |
| | | } |
| | | }); |
| | |
| | | templet: function (d) { |
| | | if (d.type === 'INDIVIDUAL') { |
| | | return '<span style="color:red;">个人</span>' |
| | | } else if (d.status === 'ORGANIZATION') { |
| | | } else if (d.type === 'ORGANIZATION') { |
| | | return '<span style="color:green;">单位</span>' |
| | | }else{ |
| | | return '' |
| | |
| | | }, minWidth: 100,align:'center'}, |
| | | {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>' |
| | | if(d.status === 4){ |
| | | return '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="seeInvoiceDetail" 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>' |
| | | return '' |
| | | } |
| | | |
| | | },minWidth: 200,align:'center', fixed:'right'} |
| | | },minWidth: 300,align:'center', fixed:'right'} |
| | | ]] |
| | | }); |
| | | } |