123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193 |
- /**
- * @author Zheng Tengfei
- */
- var bbxx = new Object();
- bbxx.loadSearchModule = function(p) {
- var $div = $("#" + p.id);
- if ($div.length > 0) {
- $div.load('bbxxSearchModule.htm', {
- from : p.from,
- callBackFunName : p.callBackFunName,
- 'bbxxSearchGrid' : $("#bbxxSearchModule").val()
- }, function() {
- });
- }
- };
- /**
- * 加载新闻查询模块
- */
- bbxx.loadSearchModule({
- id : 'bbxxSearchModule',
- from : 'bbxx',
- callBackFunName : 'searchBbxxCallBack'
- });
- /**
- * 搜索条件回调函数
- *
- * @param {搜索条件对象}
- * data
- * @param {分隔符}
- * fgf
- */
- function searchBbxxCallBack(data, fgf) {
- huimv.searchGrid("bbxxGrid", {
- url : 'getBbxxList.htm',
- params : [{
- name : 'param',
- value : data
- }, {
- name : 'fgf',
- value : fgf
- }]
- }, '<b>版本信息搜索结果</b>');
- }
- /**
- * 加载新闻列表数据
- */
- function loadBbxxGrid(bbxxSearchGrid) {
- jQuery("#bbxxGrid").flexigrid({
- url : 'getBbxxList.htm',
- dataType : 'json',
- method : 'post',
- params : [{
- name : 'bbxxSearchGrid',
- value : $('#bbxxSearchGrid').val()
- },{
- name : 'from',
- value : $("#from").val()
- }],
- title : '<b>版本信息浏览</b>',
- usepager : true,
- useRp : true,
- rp : 10,
- singleSelect : true,
- hidehead : false,
- showInputPage : true,
- showSelectRp : false,
- showTableToggleBtn : false,
- width : '790',
- resizable : false,
- nowrap : true,
- height : '335',
- cache : false,// 清除缓存
- colModel : [{
- display : '行号',
- name : 'hh',
- width : 25,
- sortable : false,
- align : 'center',
- process : function(col, record, d) {
- jQuery(col).html(d + 1);
- }
- }, {
- display : '版本号',
- name : 'bbh',
- width : 250,
- sortable : false,
- align : 'center',
- process : function(col, record, postion, pid) {
- jQuery(col).addClass('s');
- jQuery(col).html('<a onclick="viewBbxx(' + record.id + ');">' + record.bbh + '</a>');
- }
- }, {
- display : '发布人',
- name : 'fbrxm',
- width : 100,
- sortable : false,
- align : 'center'
- }, {
- display : '发布时间',
- name : 'fbsj',
- width : 100,
- sortable : true,
- align : 'center'
- }, {
- display : '修改人',
- name : 'xgrxm',
- width : 100,
- sortable : false,
- align : 'center'
- }, {
- display : '修改时间',
- name : 'xgsj',
- width : 100,
- sortable : true,
- align : 'center'
- }]
- });
- }
- loadBbxxGrid($('#xwfbSearchGrid'));
- /**
- * 加载新闻查看页面
- * @param id
- */
- function viewBbxx(id) {
- huimv.loadPage('bbxxRight', 'viewBbxx.htm', {
- "id" : id
- });
- }
- /**
- * 加载新闻编辑页面
- * @param id
- */
- function editBbxx(id, from) {
- huimv.loadPage('bbxxRight', 'editBbxx.htm', {
- "id" : id,
- "from" : from
- });
- }
- /**
- * 作废新闻
- * @param id
- */
- function disableBbxx(id, from) {
- Dialogs.alert("确定作废新闻?", {
- title : '提示信息',
- width : 250,
- height : 80,
- top : 150,
- button : {
- ok : ['确定',function(){
- this.close();
- huimv.showProcessModel('处理数据中');
-
- jQuery.ajax({
- url : 'disableBbxx.htm',
- dataType : 'json',
- type : 'post',
- cache : false,
- data : {"id" : id},
- success : function(data) {
- huimv.hideProcessModel();
- if (data.returnCode > 0) {
- if (from == 'list') {
- huimv.reloadGrid('bbxxGrid');
- } else if (from == 'view') {
- loadBbxxList();
- }
- } else {
- Dialogs.alert("传入参数有误!", {
- width : 300,
- height : 50
- });
- }
- },
- error : function(data) {
- huimv.showError(data.responseText);
- }
- });
- }],
- cancel : ['取消',function(){
- this.close();
- }]
- }
- });
- }
|