| | |
| | | {title: '状态', field: 'status', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '操作', visible: true, align: 'center', valign: 'middle',width:150, |
| | | formatter: function (value, row) { |
| | | return '<a href="#" onclick="TOrder.searchTDriverDetail('+row.id+')" style="color:green">详情</a>' |
| | | return '<a href="#" onclick="TOrder.searchTOrderDetail('+row.id+')" style="color:green">详情</a>' |
| | | } |
| | | } |
| | | ]; |
| | |
| | | }; |
| | | |
| | | /** |
| | | * 打开查看详情(使用中) |
| | | */ |
| | | TOrder.searchTOrderDetail = function (id) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '详情', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tOrder/orderDetail?orderId=' + id |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | TOrder.delete = function () { |
| | |
| | | ajax.start(); |
| | | } |
| | | }; |
| | | /** |
| | | * 后台取消订单 |
| | | */ |
| | | TOrder.cancelOrderUpdate = function () { |
| | | if (this.check()) { |
| | | |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | |
| | | var id = selected[0].id |
| | | var state = selected[0].state |
| | | |
| | | console.log(id) |
| | | console.log(state) |
| | | |
| | | if (state != 101 && state != 102 && state != 103 && state != 104 && state != 105 && state != 106 && state != 107) { |
| | | Feng.error("该订单当前状态不可取消!") |
| | | return; |
| | | } |
| | | var ajax = new $ax(Feng.ctxPath + "/tOrder/cancelOrderUpdate", function (data) { |
| | | Feng.success("取消订单成功!"); |
| | | TOrder.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error("取消订单失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("tOrderId", id); |
| | | ajax.start(); |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 订单信息导出 |