Index: ssts-web/src/main/webapp/disinfectsystem/satisfactionsurvey/satisfactionSurveyTableView.js
===================================================================
diff -u -r22783 -r39071
--- ssts-web/src/main/webapp/disinfectsystem/satisfactionsurvey/satisfactionSurveyTableView.js (.../satisfactionSurveyTableView.js) (revision 22783)
+++ ssts-web/src/main/webapp/disinfectsystem/satisfactionsurvey/satisfactionSurveyTableView.js (.../satisfactionSurveyTableView.js) (revision 39071)
@@ -11,142 +11,143 @@
return false;
}
var ids = "";
- for ( var i = 0, len = records.length; i < len; i++) {
+ for (var i = 0, len = records.length; i < len; i++) {
if (ids == "") {
ids = records[i].data['id'];
} else {
ids = ids + ';' + records[i].data['id'];
}
}
top.Ext.MessageBox
- .confirm("请确认",
- "是否确定要删除选中的"+entityName+"信息?",
- function(button, text) {
- if ("yes" == button){
- Ext.Ajax.request({
- url : WWWROOT + '/disinfectSystem/satisfactionsurvey/satisfactionSurveyTableAction!deleteSatisfactionSurveyTable.do',
- params : {
- ids : ids
- },success : function(response, options) {
- var result = Ext.decode(response.responseText);
- var success = result.success;
- if (true != success) {
- MsgTip.msg('提示', '删除失败',true,3);
- return;
- } else {
- MsgTip.msg('提示','删除成功',true,3);
- grid.dwrReload();
- }
- },
- failure : function(response, options) {
- var result = Ext.decode(response.responseText);
- MsgTip.msg('提示', '删除失败',true,3);
- }
- });}
+ .confirm("请确认",
+ "是否确定要删除选中的" + entityName + "信息?",
+ function (button, text) {
+ if ("yes" == button) {
+ Ext.Ajax.request({
+ url: WWWROOT + '/disinfectSystem/satisfactionsurvey/satisfactionSurveyTableAction!deleteSatisfactionSurveyTable.do',
+ params: {
+ ids: ids
+ }, success: function (response, options) {
+ var result = Ext.decode(response.responseText);
+ var success = result.success;
+ if (true != success) {
+ MsgTip.msg('提示', '删除失败', true, 3);
+ return;
+ } else {
+ MsgTip.msg('提示', '删除成功', true, 3);
+ grid.dwrReload();
+ }
+ },
+ failure: function (response, options) {
+ var result = Ext.decode(response.responseText);
+ MsgTip.msg('提示', '删除失败', true, 3);
+ }
+ });
+ }
});
}
-function renderCallModifyFunction(v, p, record){
+function renderCallModifyFunction(v, p, record) {
var data = record.data;
- return "" + v + "";
+ return "" + v + "";
}
-Ext.onReady(function() {
+Ext.onReady(function () {
Ext.QuickTips.init();
// 记录cookie(3步)
var columns = [
- {header : "满意度调查表名称",width : 240,dataIndex : 'satisfactionSurveyTemplateName', renderer : renderCallModifyFunction},
- {header : "员工号",width : 80,dataIndex : 'staffNum'},
- {header : "姓名",width : 80,dataIndex : 'userName'},
- {header : "填表时间",width : 120,dataIndex : 'surveyDate',renderer : myDateFormatByMinute},
- {header : "所属科室",width : 150,dataIndex : 'depart'},
- {header : "意见或建议",width : 120,dataIndex : 'remark',id:'autoWidth'}
+ { header: "满意度调查表名称", width: 240, dataIndex: 'satisfactionSurveyTemplateName', renderer: renderCallModifyFunction },
+ { header: "员工号", width: 80, dataIndex: 'staffNum' },
+ { header: "姓名", width: 80, dataIndex: 'userName' },
+ { header: "填表时间", width: 120, dataIndex: 'surveyDate', renderer: myDateFormatByMinute },
+ { header: "所属科室", width: 150, dataIndex: 'depart' },
+ { header: "意见或建议", width: 120, dataIndex: 'remark', id: 'autoWidth' }
];
-
+
var filters = new Ext.grid.GridFilters({
- filters : [
- {type : 'string',dataIndex : 'satisfactionSurveyTemplateName'},
- {type : 'date',dataIndex : 'surveyDate'},
- {type : 'string',dataIndex : 'remark'},
- {type : 'string',dataIndex : 'staffNum'},
- {type : 'string',dataIndex : 'userName'},
- {type : 'string',dataIndex : 'instructions'},
- {type : 'string',dataIndex : 'depart'}
+ filters: [
+ { type: 'string', dataIndex: 'satisfactionSurveyTemplateName' },
+ { type: 'date', dataIndex: 'surveyDate' },
+ { type: 'string', dataIndex: 'remark' },
+ { type: 'string', dataIndex: 'staffNum' },
+ { type: 'string', dataIndex: 'userName' },
+ { type: 'string', dataIndex: 'instructions' },
+ { type: 'string', dataIndex: 'depart' }
]
});
-
+
var readerDetail = [
- {name : 'id'},
- {name : 'satisfactionSurveyTemplateName'},
- {name : 'surveyDate'},
- {name : 'remark'},
- {name : 'depart'},
- {name : 'userName'},
- {name : 'instructions'},
- {name : 'staffNum'}
+ { name: 'id' },
+ { name: 'satisfactionSurveyTemplateName' },
+ { name: 'surveyDate' },
+ { name: 'remark' },
+ { name: 'depart' },
+ { name: 'userName' },
+ { name: 'instructions' },
+ { name: 'staffNum' }
];
var tbar = [{
- text : '修改',
- hidden : SSTS_SatisfactionSurveyTable_Update,
- iconCls : 'btn_ext_application_edit',
- id : 'editTbar',
- handler : function() {
+ text: '修改',
+ hidden: SSTS_SatisfactionSurveyTable_Update,
+ iconCls: 'btn_ext_application_edit',
+ id: 'editTbar',
+ handler: function () {
var records = grid.getSelectionModel().getSelections();
if (records.length == 0) {
- showResult("请选择需要修改的"+entityName+"信息!");
+ showResult("请选择需要修改的" + entityName + "信息!");
return false;
}
if (records.length > 1) {
- showResult("一次只能修改一个"+entityName+"信息!");
+ showResult("一次只能修改一个" + entityName + "信息!");
return false;
}
var d = records[0];
- addSatisfactionSurveyTable(d.data['id'], true, null, null);
+ addSatisfactionSurveyTable(d.data['id'], true, d.json.satisfactionSurveyTemplateId, null);
}
}, '-', {
- text : '删除',
- hidden : SSTS_SatisfactionSurveyTable_Delete,
- iconCls : 'btn_ext_application_del',
- handler : function() {
+ text: '删除',
+ hidden: SSTS_SatisfactionSurveyTable_Delete,
+ iconCls: 'btn_ext_application_del',
+ handler: function () {
deleteSatisfactionSurveyTable(grid);
}
}];
var dwrCallParams = null;
- Ext.ux.ForgonPageGrid.prototype.getGridParameterMap = function() {
+ Ext.ux.ForgonPageGrid.prototype.getGridParameterMap = function () {
};
- grid = new Ext.ux.ForgonPageGrid( {
- tbar : tbar,
- pageSize : 20,
- defaultSortField : 'id',
- title : entityName+'列表',
- defaultSortDirection : 'DESC',
- isCheckboxSelectionModel : true,
- rememberSelected : false,
- isShowSearchField : true,
- columns : columns,
- plugins : filters,
- autoExpandColumn : 'autoWidth',
- renderTo : 'gridDiv',
- frame : false
+ grid = new Ext.ux.ForgonPageGrid({
+ tbar: tbar,
+ pageSize: 20,
+ defaultSortField: 'id',
+ title: entityName + '列表',
+ defaultSortDirection: 'DESC',
+ isCheckboxSelectionModel: true,
+ rememberSelected: false,
+ isShowSearchField: true,
+ columns: columns,
+ plugins: filters,
+ autoExpandColumn: 'autoWidth',
+ renderTo: 'gridDiv',
+ frame: false
}, readerDetail,
SatisfactionSurveyTableTableManager.findList,
dwrCallParams // 这个参数只是占位作用
);
-
+
var viewport = new Ext.Viewport({
- layout : 'border',
- items : [{
- region : 'center',
- margins : '0 0 0 0',
- layout : 'fit',
- items : grid
+ layout: 'border',
+ items: [{
+ region: 'center',
+ margins: '0 0 0 0',
+ layout: 'fit',
+ items: grid
}]
});
});
\ No newline at end of file