| | |
| | | TQuestion.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', checkbox: true}, |
| | | {title: 'id', field: 'id', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '序号', field: 'id', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '分类名称', field: 'name', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '所在位置', field: 'position', visible: true, align: 'center', valign: 'middle', |
| | | formatter:function (data) { |
| | |
| | | }} |
| | | ]; |
| | | }; |
| | | |
| | | /** |
| | | * 关闭此对话框 |
| | | */ |
| | | TQuestion.close = function() { |
| | | parent.layer.close(window.parent.TQuestion.layerIndex); |
| | | } |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | |
| | | data: JSON.stringify(data), |
| | | contentType: "application/json", |
| | | success: function (response) { |
| | | window.parent.TQuestion.table.refresh(); |
| | | TQuestion.close(); |
| | | Feng.success("添加成功"); |
| | | |
| | | }, |
| | |
| | | Feng.error("添加失败!" + error); |
| | | } |
| | | }); |
| | | TSite.search(); |
| | | |
| | | }; |
| | | TQuestion.updateSubmit = function(){ |
| | | var data = { |
| | |
| | | data: JSON.stringify(data), |
| | | contentType: "application/json", |
| | | success: function (response) { |
| | | window.parent.TQuestion.table.refresh(); |
| | | TQuestion.close(); |
| | | Feng.success("添加成功"); |
| | | }, |
| | | error: function (xhr, status, error) { |
| | | Feng.error("添加失败!" + error); |
| | | } |
| | | }); |
| | | TSite.search(); |
| | | |
| | | }; |
| | | |
| | | /** |
| | | * 查询列表 |
| | | */ |