Index: ssts-web/src/main/webapp/disinfectsystem/printInvoiceConfig/printInvoiceConfigView.js
===================================================================
diff -u -r16206 -r40445
--- ssts-web/src/main/webapp/disinfectsystem/printInvoiceConfig/printInvoiceConfigView.js (.../printInvoiceConfigView.js) (revision 16206)
+++ ssts-web/src/main/webapp/disinfectsystem/printInvoiceConfig/printInvoiceConfigView.js (.../printInvoiceConfigView.js) (revision 40445)
@@ -1,74 +1,82 @@
var grid;
+
+//FSEYEQ-18:数据隔离
+var printInvoiceConfig = false;
+if (sstsConfig.supplyRoomDataIsolationModule && sstsConfig.supplyRoomDataIsolationModule.indexOf('printInvoiceConfig') >= 0) {
+ printInvoiceConfig = 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){
- PrintInvoiceConfigTableManager.moveUpRecord(number,function(){
+function moveUp(number) {
+ if (number > 1) {
+ PrintInvoiceConfigTableManager.moveUpRecord(number, function () {
grid.getStore().reload();
});
}
}
-function moveDown(number){
- PrintInvoiceConfigTableManager.moveDownRecord(number,function(){
+function moveDown(number) {
+ PrintInvoiceConfigTableManager.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 : 150, renderer : modifyRecord},
- {header : "发货单合并方式",dataIndex : 'mergePrintType',width : 170},
- {id : 'departNames',header : "科室名称",dataIndex : 'departNames'},
- {header : "排序操作",dataIndex : 'orderNum', renderer : moveUpDown, sortable: false, menuDisabled: true},
- {header : "科室代码",dataIndex : 'departCodes',hidden : true}
- ];
+ { header: "标识号", dataIndex: 'id', hidden: true },
+ { header: "班次", dataIndex: 'shift', width: 150, renderer: modifyRecord },
+ { header: "处理科室", dataIndex: 'handlerDepartName', sortable: false, hidden: !printInvoiceConfig },
+ { header: "发货单合并方式", dataIndex: 'mergePrintType', width: 170 },
+ { id: 'departNames', header: "科室名称", dataIndex: 'departNames' },
+ { header: "排序操作", dataIndex: 'orderNum', renderer: moveUpDown, sortable: false, menuDisabled: true },
+ { header: "科室代码", dataIndex: 'departCodes', hidden: true }
+ ];
var filters = new Ext.grid.GridFilters({
- filters : [
- {type:'string',dataIndex:'name'}
+ filters: [
+ { type: 'string', dataIndex: 'name' }
]
});
var readerDetail = [
- {name : 'id'},
- {name : 'shift'},
- {name : 'mergePrintType'},
- {name : 'mergePrintTousseDisposable'},
- {name : 'printOrder'},
- {name : 'disinfectGoodsPrintMode'},
- {name : 'departNames'},
- {name : 'departCodes'},
- {name : 'orderNum'}
+ { name: 'id' },
+ { name: 'shift' },
+ { name: 'mergePrintType' },
+ { name: 'handlerDepartName' },
+ { name: 'mergePrintTousseDisposable' },
+ { name: 'printOrder' },
+ { name: 'disinfectGoodsPrintMode' },
+ { name: 'departNames' },
+ { name: 'departCodes' },
+ { name: 'orderNum' }
];
-
+
var tbar = [{
- text : '添加',
- hidden : SSTS_printApplication_manager,
- iconCls : 'btn_ext_application_add',
- handler : function() {
+ text: '添加',
+ hidden: SSTS_printApplication_manager,
+ iconCls: 'btn_ext_application_add',
+ handler: function () {
showWindow();
}
- },'-',{
- text : '修改',
- hidden : SSTS_printApplication_manager,
- iconCls : 'btn_ext_application_edit',
- handler : function() {
+ }, '-', {
+ text: '修改',
+ hidden: SSTS_printApplication_manager,
+ iconCls: 'btn_ext_application_edit',
+ handler: function () {
var records = grid.getSelectionModel().getSelections();
if (records.length == 0) {
showResult("请选择要修改的数据!");
@@ -82,40 +90,41 @@
editConfig(id);
}
}, '-', {
- text : '删除',
- hidden : SSTS_printApplication_manager,
- iconCls : 'btn_ext_application_del',
- handler : function() {
+ text: '删除',
+ hidden: SSTS_printApplication_manager,
+ iconCls: 'btn_ext_application_del',
+ handler: function () {
deleteConfig(grid);
}
}];
var dwrCallParams = null;
- 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
+ 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',
+ searchDisableIndexes: ["handlerDepartName"],
+ frame: false
}, readerDetail,
- PrintInvoiceConfigTableManager.findPrintInvoiceConfigTableList,
+ PrintInvoiceConfigTableManager.findPrintInvoiceConfigTableList,
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