Index: ssts-web/src/main/webapp/disinfectsystem/invoice/invoiceDepartmentView.js =================================================================== diff -u -r28930 -r40459 --- ssts-web/src/main/webapp/disinfectsystem/invoice/invoiceDepartmentView.js (.../invoiceDepartmentView.js) (revision 28930) +++ ssts-web/src/main/webapp/disinfectsystem/invoice/invoiceDepartmentView.js (.../invoiceDepartmentView.js) (revision 40459) @@ -1,69 +1,78 @@ var grid; + +//FSEYEQ-19:数据隔离 +var invoiceDepartmentView = false; +if (sstsConfig.supplyRoomDataIsolationModule && sstsConfig.supplyRoomDataIsolationModule.indexOf('invoiceDepartmentView') >= 0) { + invoiceDepartmentView = true; +} + /** * 修改记录 * modifyRecord函数 触发modify函数调用,并传入当前列的值以及record.data对象 * 页面中需要定义 modify(v,data) 函数 */ -function modify(v,data){ +function modify(v, data) { editConfig(data.id); } -function moveUp(number){ - if(number>1){ - InvoiceDepartmentTableManage.moveUpRecord(number,function(){ +function moveUp(number) { + if (number > 1) { + InvoiceDepartmentTableManage.moveUpRecord(number, function () { grid.getStore().reload(); }); } } -function moveDown(number){ - InvoiceDepartmentTableManage.moveDownRecord(number,function(){ +function moveDown(number) { + InvoiceDepartmentTableManage.moveDownRecord(number, function () { grid.getStore().reload(); }); } -Ext.onReady(function() { +Ext.onReady(function () { Ext.QuickTips.init(); - - function moveUpDown(v, p, record){ - var html = ''; - html += '向上移动     '; - html += ''; - html += '向下移动'; - return html; - } - + + function moveUpDown(v, p, record) { + var html = ''; + html += '向上移动     '; + html += ''; + html += '向下移动'; + return html; + } + var columns = [ - {header : "标识号",dataIndex : 'id',hidden :true}, - {header : "分组",dataIndex : 'shift',width:100,renderer : modifyRecord}, - {header : "科室名称",dataIndex : 'departNames',width:900}, - {header : "科室代码",dataIndex : 'departCodes',hidden : true}, - {header : "排序操作",dataIndex : 'orderNum', renderer : moveUpDown, sortable: false, menuDisabled: true} - ]; + { header: "标识号", dataIndex: 'id', hidden: true }, + { header: "分组", dataIndex: 'shift', width: 100, renderer: modifyRecord }, + { header: "处理科室", dataIndex: 'handlerDepartName', sortable: false, hidden: !invoiceDepartmentView }, + { header: "科室名称", dataIndex: 'departNames', width: 900 }, + { header: "科室代码", dataIndex: 'departCodes', hidden: true }, + { header: "排序操作", dataIndex: 'orderNum', renderer: moveUpDown, sortable: false, menuDisabled: true } + ]; var filters = new Ext.grid.GridFilters({ - filters : [ - {type:'string',dataIndex:'name'} + filters: [ + { type: 'string', dataIndex: 'name' } ] }); var readerDetail = [ - {name : 'id'}, - {name : 'shift'}, - {name : 'departNames'}, - {name : 'departCodes'}, - {name : 'orderNum'} + { name: 'id' }, + { name: 'shift' }, + { name: 'handlerDepartName' }, + { name: 'departNames' }, + { name: 'departCodes' }, + { name: 'orderNum' } ]; - + var tbar = [{ - text : '添加', - hidden : false, - iconCls : 'btn_ext_application_add', - handler : function() { + text: '添加', + hidden: false, + iconCls: 'btn_ext_application_add', + handler: function () { showWindow(); } - },'-',{ - text : '修改', - hidden : false, - iconCls : 'btn_ext_application_edit', - handler : function() { + }, '-', { + text: '修改', + hidden: false, + iconCls: 'btn_ext_application_edit', + handler: function () { var records = grid.getSelectionModel().getSelections(); if (records.length == 0) { showResult("请选择要修改的数据!"); @@ -77,40 +86,40 @@ editConfig(id); } }, '-', { - text : '删除', - hidden : false, - iconCls : 'btn_ext_application_del', - handler : function() { + text: '删除', + hidden: false, + iconCls: 'btn_ext_application_del', + handler: function () { deleteConfig(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 : 'orderNum', - defaultSortDirection : 'ASC', - title : '发货科室分组设置', - isCheckboxSelectionModel : true, - rememberSelected : false, - isShowSearchField : true, - columns : columns, - plugins : filters, -// autoExpandColumn : 'departNames', - renderTo : 'gridDiv', - frame : false + tbar: tbar, + pageSize: 20, + defaultSortField: 'orderNum', + defaultSortDirection: 'ASC', + title: '发货科室分组设置', + isCheckboxSelectionModel: true, + rememberSelected: false, + isShowSearchField: true, + columns: columns, + plugins: filters, + searchDisableIndexes: ["id", "handlerDepartName"], + renderTo: 'gridDiv', + frame: false }, readerDetail, - InvoiceDepartmentTableManage.findInvoiceDepartmentTableList, + InvoiceDepartmentTableManage.findInvoiceDepartmentTableList, 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