| | |
| | | }}, |
| | | {title: '操作', visible: true, align: 'center', valign: 'middle',width:150, |
| | | formatter: function (value, row) { |
| | | if (row.status === 1){ |
| | | return '<a href="#" onclick="TAgent.updateStatus('+row.id+','+row.status+')" style="color:red">停用</a>' +' ' + |
| | | '<a href="#" onclick="TAgent.searchTAgentDetail('+row.id+')" style="color:green">详情</a>' |
| | | }else if (row.status === 2){ |
| | | return '<a href="#" onclick="TAgent.updateStatus('+row.id+','+row.status+')" style="color:green">解冻</a>' +' ' + |
| | | '<a href="#" onclick="TAgent.searchTAgentDetail('+row.id+')" style="color:green">详情</a>' |
| | | } |
| | | return '<a href="#" onclick="TAgent.searchTAgentDetail('+row.id+')" style="color:green">详情</a>' |
| | | } |
| | | } |
| | | ]; |
| | |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | |
| | | TAgent.openUpdateTAgent = function(){ |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '编辑', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tAgent/tAgent_update/' + TAgent.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | TAgent.stop = function(){ |
| | | if(this.check()){ |
| | | var ajax = new $ax(Feng.ctxPath + "/tAgent/update-status", function (data) { |
| | | Feng.success("修改成功!"); |
| | | TAgent.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error("修改失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("id", TAgent.seItem.id); |
| | | ajax.set("status", 1); |
| | | ajax.start(); |
| | | } |
| | | } |
| | | |
| | | |
| | | TAgent.start = function(){ |
| | | if(this.check()){ |
| | | var ajax = new $ax(Feng.ctxPath + "/tAgent/update-status", function (data) { |
| | | Feng.success("修改成功!"); |
| | | TAgent.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error("修改失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("id", TAgent.seItem.id); |
| | | ajax.set("status", 2); |
| | | ajax.start(); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 提交启用冻结 |
| | | */ |
| | |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | /** |
| | | * 打开查看详情 |
| | | */ |
| | | TAgent.openTAgentDetail = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '详情', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tAgent/tAgent_update/' + TAgent.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 打开区域选择页面 |