Index: ssts-web/src/main/webapp/disinfectsystem/printInvoiceConfig/printInvoiceConfigForm.js =================================================================== diff -u -r35013 -r40445 --- ssts-web/src/main/webapp/disinfectsystem/printInvoiceConfig/printInvoiceConfigForm.js (.../printInvoiceConfigForm.js) (revision 35013) +++ ssts-web/src/main/webapp/disinfectsystem/printInvoiceConfig/printInvoiceConfigForm.js (.../printInvoiceConfigForm.js) (revision 40445) @@ -6,183 +6,175 @@ configWin.close(); } -function editConfig(id){ +function editConfig(id) { showWindow(id); - if(!Ext4.isEmpty(id)){ + if (!Ext4.isEmpty(id)) { var mask = new Ext4.LoadMask({ - msg : '正在加载,请稍候...', - target : formPanel + msg: '正在加载,请稍候...', + target: formPanel }); mask.show(); - + Ext4.Ajax.request({ - url : WWWROOT + '/disinfectSystem/printInvoiceConfigAction!loadConfigData.do', - params : {id : id}, - success : function(response,options){ -// mask.hide(); + url: WWWROOT + '/disinfectSystem/printInvoiceConfigAction!loadConfigData.do', + params: { id: id }, + success: function (response, options) { mask.destroy(); var result = Ext4.JSON.decode(response.responseText); - if(result.success && result.data){ - Ext4.ComponentQuery.query("#configForm #id")[0].setValue(result.data.id); - Ext4.ComponentQuery.query("#configForm #shift")[0].setValue(result.data.shift); - var cmp1 = Ext4.ComponentQuery.query("#configForm #mergePrintType")[0]; - - cmp1.setValue(result.data.mergePrintType); - - - Ext4.ComponentQuery.query("#configForm #departCodes")[0].setValue(result.data.departCodes); - Ext4.ComponentQuery.query("#configForm #departNames")[0].setValue(result.data.departNames); - + if (result.success && result.data) { + Ext4.getCmp('departNames').setValue(result.data.departNames); + Ext4.getCmp('departCodes').setValue(result.data.departCodes); Ext4.getCmp('tousseGroupConfig').setValue(result.data.tousseGroupConfig); + Ext4.getCmp('mergePrintType').setValue(result.data.mergePrintType); + Ext4.getCmp('id').setValue(result.data.id); + Ext4.getCmp('shift').setValue(result.data.shift); + if (printInvoiceConfig) { + Ext4.getCmp('handlerDepartCode').setValue(result.data.handlerDepartCode); + Ext4.getCmp('handlerDepartId').setValue(result.data.handlerDepartId); + Ext4.getCmp('handlerDepartName').setRawValue(result.data.handlerDepartName); + } initTousseGroupConfigGrid(); - - }else{ + + } else { showResult('系统加载出错,请稍候再试'); } }, - failure : function(response, options) { -// mask.hide(); + failure: function (response, options) { mask.destroy(); showResult('系统加载出错,请稍候再试'); } }); } } -function deleteConfig(grid){ +function deleteConfig(grid) { var selectedRecords = grid.getSelectionModel().getSelections(); var selectedCount = grid.getSelectionModel().getCount(); var ids = ""; - if(selectedCount < 1){ + if (selectedCount < 1) { showResult("请选择要删除的行"); - }else{ - for ( var i = 0, len = selectedRecords.length; i < len; i++) { + } else { + for (var i = 0, len = selectedRecords.length; i < len; i++) { if (ids == "") { ids = selectedRecords[i].data['id']; } else { ids = ids + ';' + selectedRecords[i].data['id']; } } - Ext4.MessageBox.confirm("请确认","确定要删除选中的信息吗?", - function(button, text) { - if ("yes" == button){ - Ext4.Ajax.request({ - url : WWWROOT + '/disinfectSystem/printInvoiceConfigAction!delete.do', - params : {ids : ids}, - success : function(response, options) { - var result = Ext4.JSON.decode(response.responseText); - var success = result.success; - if (true != success) { - showResult("删除失败"); - return; - } else { - showResult('删除成功!'); - grid.dwrReload(); - } - }, - failure : function(response, options) { - showResult("删除失败"); - } - }); + Ext4.MessageBox.confirm("请确认", "确定要删除选中的信息吗?", function (button, text) { + if ("yes" == button) { + Ext4.Ajax.request({ + url: WWWROOT + '/disinfectSystem/printInvoiceConfigAction!delete.do', + params: { ids: ids }, + success: function (response, options) { + var result = Ext4.JSON.decode(response.responseText); + var success = result.success; + if (true != success) { + showResult("删除失败"); + return; + } else { + showResult('删除成功!'); + grid.dwrReload(); + } + }, + failure: function (response, options) { + showResult("删除失败"); } }); + } + }); } } -function saveConfig(){ +function saveConfig() { settousseGroupConfigParamsForSave(); formPanel.form.submit({ - url : WWWROOT + '/disinfectSystem/printInvoiceConfigAction!save.do', - method : 'POST', - waitMsg : '正在保存数据,请稍候', - timeout : 600000, - waitTitle : '提交表单', - success : function(form, action) { + url: WWWROOT + '/disinfectSystem/printInvoiceConfigAction!save.do', + method: 'POST', + waitMsg: '正在保存数据,请稍候', + timeout: 600000, + waitTitle: '提交表单', + success: function (form, action) { configWin.close(); showResult('保存成功'); grid.dwrReload(); }, - failure : function(form, action) { + failure: function (form, action) { showResult('failure = ' + action.failureType); } }); } -function istousseGroupConfigValid(){ +function istousseGroupConfigValid() { var sheetsGridStore = sheetsGrid.getStore(); - if(sheetsGridStore.getCount() == 0){ + if (sheetsGridStore.getCount() == 0) { showResult('打印类型列表不能为空 !'); return false; } - for(var i=0;i 1){ + if (sheetRecords.length > 1) { showResult('一次只能选择一个设置项!'); return; } @@ -191,352 +183,383 @@ var curAvailableTousseTypeRecord = availableTousseTypeesGrid.getStore().getAt(rowIndex); var store = availableTousseTypeesGrid.getStore(); var tousseTypes = sheetRecord.data.tousseTypes; - if(checked){ + if (checked) { tousseTypes.push({ type: curAvailableTousseTypeRecord.data.type, tousseGroupName: curAvailableTousseTypeRecord.data.tousseGroupName, tousseGroupID: curAvailableTousseTypeRecord.data.tousseGroupID }); - }else{ + } else { var newTousseTypes = []; - for(var i=0;i 0){ + if (selected.length > 0) { sheetRecord = selected[0]; } var availableTousseTypeStore = availableTousseTypeesGrid.getStore(); - for(var i=0;i <% PrintInvoiceConfigManager printInvoiceConfigManager = (PrintInvoiceConfigManager) SpringBeanManger.getBean("printInvoiceConfigManager"); -List list = printInvoiceConfigManager.getAll(); +List list = printInvoiceConfigManager.getPrintInvoiceConfigForBatchPrint(); %> <%@ include file="/common/clearCache.jsp"%> Index: ssts-web/src/main/webapp/disinfectsystem/printInvoiceConfig/printInvoiceConfigView.jsp =================================================================== diff -u -r35013 -r40445 --- ssts-web/src/main/webapp/disinfectsystem/printInvoiceConfig/printInvoiceConfigView.jsp (.../printInvoiceConfigView.jsp) (revision 35013) +++ ssts-web/src/main/webapp/disinfectsystem/printInvoiceConfig/printInvoiceConfigView.jsp (.../printInvoiceConfigView.jsp) (revision 40445) @@ -22,6 +22,7 @@ + Index: ssts-web/src/main/webapp/disinfectsystem/invoice/selectInvoiceConfig.jsp =================================================================== diff -u -r39652 -r40445 --- ssts-web/src/main/webapp/disinfectsystem/invoice/selectInvoiceConfig.jsp (.../selectInvoiceConfig.jsp) (revision 39652) +++ ssts-web/src/main/webapp/disinfectsystem/invoice/selectInvoiceConfig.jsp (.../selectInvoiceConfig.jsp) (revision 40445) @@ -7,7 +7,7 @@ <% PrintInvoiceConfigManager printInvoiceConfigManager = (PrintInvoiceConfigManager) SpringBeanManger.getBean("printInvoiceConfigManager"); -List list = printInvoiceConfigManager.getAll(); +List list = printInvoiceConfigManager.getPrintInvoiceConfigForBatchPrint(); %> <%@ include file="/common/clearCache.jsp"%> 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