Index: ssts-web/src/main/webapp/forgon4/css/icon.css =================================================================== diff -u -r17181 -r21864 --- ssts-web/src/main/webapp/forgon4/css/icon.css (.../icon.css) (revision 17181) +++ ssts-web/src/main/webapp/forgon4/css/icon.css (.../icon.css) (revision 21864) @@ -4,6 +4,9 @@ .icon-add{ background:url('icons/edit_add.png') no-repeat; } +.icon-add2{ + background:url('icons/drop-add.gif') no-repeat; +} .icon-edit{ background:url('icons/pencil.png') no-repeat; } Index: ssts-web/src/main/webapp/forgon4/css/icons/drop-add.gif =================================================================== diff -u Binary files differ Index: ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/expensiveGoodsApplication/expensiveGoodsApplicationFormForApproval.js =================================================================== diff -u -r21813 -r21864 --- ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/expensiveGoodsApplication/expensiveGoodsApplicationFormForApproval.js (.../expensiveGoodsApplicationFormForApproval.js) (revision 21813) +++ ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/expensiveGoodsApplication/expensiveGoodsApplicationFormForApproval.js (.../expensiveGoodsApplicationFormForApproval.js) (revision 21864) @@ -1,11 +1,15 @@ -var windowObj = null; var formObj = null; //高值耗材的store var expensiveGoodsStore = null; -//高值耗材申请项top.Ext4.tree.Panel的数据仓库 +//高值耗材申请项Ext4.tree.Panel的数据仓库 var treePanelStore = null; +Ext4.onReady(function() { + eidtExpensiveGoodsApplicationForApproval(expensiveGoodsApplicationId); +}); + + /** * 审批高值耗材申请单时对申请单的修改. * @param id 高值耗材申请单id @@ -19,8 +23,8 @@ /** * 申请的物品模型 */ - top.Ext4.define('ExpensiveGoodsModel', { - extend : 'top.Ext4.data.Model', + Ext4.define('ExpensiveGoodsModel', { + extend : 'Ext4.data.Model', idProperty: 'expensiveGoodsId', //指定id属性 fields: [ {name : 'id'}, //申请项的id @@ -33,7 +37,7 @@ {name : 'referencePrice'} //高值耗材的参考价 ]}); - expensiveGoodsStore = new top.Ext4.data.Store({ + expensiveGoodsStore = new Ext4.data.Store({ pageSize: 100, fields: [ {name : 'id'}, //高值耗材id @@ -53,8 +57,8 @@ }, listeners: { beforeload : function(store, operation, eOpts){ - var rawValue = top.Ext4.getCmp('expensiveGoodsSupplier').getRawValue(); - var value = top.Ext4.getCmp('expensiveGoodsSupplier').getValue(); + var rawValue = Ext4.getCmp('expensiveGoodsSupplier').getRawValue(); + var value = Ext4.getCmp('expensiveGoodsSupplier').getValue(); if (rawValue && value) { store.proxy.extraParams.supplierId = value; } else { @@ -66,24 +70,24 @@ }); //高值耗材生产厂家的store - var expensiveGoodsSupplierStore = new top.Ext4.data.Store({ + var expensiveGoodsSupplierStore = new Ext4.data.Store({ fields: [ {name : 'id'}, //高值耗材生产厂家的id {name : 'name'} //高值耗材生产厂家的名称 - ], - proxy : { - extraParams : {supplierType : '生产厂家'}, - type : 'ajax', - url : WWWROOT + '/disinfectSystem/baseData/expensiveGoodsSupplierAction!getSupplierData.do', - reader : { - type : 'json', - totalProperty : 'totalCount', - root : 'data' - } - } + ], + proxy : { + extraParams : {supplierType : '生产厂家'}, + type : 'ajax', + url : WWWROOT + '/disinfectSystem/baseData/expensiveGoodsSupplierAction!getSupplierData.do', + reader : { + type : 'json', + totalProperty : 'totalCount', + root : 'data' + } + } }); - treePanelStore = top.Ext4.create('top.Ext4.data.TreeStore', { + treePanelStore = Ext4.create('Ext4.data.TreeStore', { autoLoad : true, clearOnLoad : true, model : 'ExpensiveGoodsModel', @@ -97,75 +101,79 @@ }); /** - * 高值耗材申请项top.Ext4.tree.Panel + * 高值耗材申请项Ext4.tree.Panel */ - top.Ext4.define('expensiveGoodsApplicationTreeGrid', { - extend: 'top.Ext4.tree.Panel', - xtype: 'tree-grid', - useArrows: true, - rootVisible: false, - multiSelect: false, - columnLines: true, - rowLines: true, - cls: 'no-leaf-icons', - columns : [{ - dataIndex: 'id', hidden: true - },{ - dataIndex: 'expensiveGoodsId', hidden: true - },{ - dataIndex: 'name', hidden: true - },{ - dataIndex: 'specification', hidden: true - },{ - header: '生产厂家',dataIndex: 'supplierName', width: 200 - },{ - header: '名称', dataIndex: 'showName', width: 250 - },{ - header: '申请数量', dataIndex : 'amount', width: 100, align: 'center', sortable: false, - editor: { - xtype: 'numberfield', - allowBlank: true, - allowDecimals :false, - minValue: 0, - maxValue: 9999, - listeners: { - specialkey: function(field, event, eOpts) { - if (event.getKey() === event.TAB) { - //阻止按Tab,因为这里的CellEditing按了tab会有bug - event.stopEvent(); - } - } - } - } - },{ - header: '价格',dataIndex: 'referencePrice', width: 70 - }], - viewConfig : { - toggleOnDblClick: false, - markDirty:false - }, - initComponent: function() { - this.cellEditing = new top.Ext4.grid.plugin.CellEditing({ - clicksToEdit: 2, - listeners: { - beforeedit: function(editor, context, eOpts){ - var record = context.record; - - }, - edit:function(editor, context, eOpts){ - - } - } - }); - top.Ext4.apply(this, { - plugins: [this.cellEditing] - }); - this.superclass.initComponent.call(this); - } - }); + Ext4.define('expensiveGoodsApplicationTreeGrid', { + extend: 'Ext4.tree.Panel', + xtype: 'tree-grid', + useArrows: true, + rootVisible: false, + multiSelect: false, + columnLines: true, + rowLines: true, + cls: 'no-leaf-icons', + columns : [{ + dataIndex: 'id', hidden: true + },{ + dataIndex: 'expensiveGoodsId', hidden: true + },{ + dataIndex: 'name', hidden: true + },{ + dataIndex: 'specification', hidden: true + },{ + header: '生产厂家',dataIndex: 'supplierName', width: 200 + },{ + header: '名称', dataIndex: 'showName', width: 250 + },{ + header: '申请数量', dataIndex : 'amount', width: 100, align: 'center', sortable: false, + editor: { + xtype: 'numberfield', + allowBlank: true, + allowDecimals :false, + minValue: 0, + maxValue: 9999, + listeners: { + specialkey: function(field, event, eOpts) { + if (event.getKey() === event.TAB) { + //阻止按Tab,因为这里的CellEditing按了tab会有bug + event.stopEvent(); + } + } + } + } + },{ + header: '价格',dataIndex: 'referencePrice', width: 70 + }], + viewConfig : { + toggleOnDblClick: false, + markDirty:false + }, + initComponent: function() { + this.cellEditing = new Ext4.grid.plugin.CellEditing({ + clicksToEdit: 2, + listeners: { + beforeedit: function(editor, context, eOpts){ + var record = context.record; + + }, + edit:function(editor, context, eOpts){ + + } + } + }); + Ext4.apply(this, { + plugins: [this.cellEditing] + }); + this.superclass.initComponent.call(this); + } + }); - formObj = new top.Ext4.form.Panel({ + formObj = Ext4.create('Ext4.form.Panel', { + title: '高值耗材申请单', + width : 900, + height : 600, frame : true, + renderTo: Ext4.getBody(), border : 0, labelSeparator : ':', bodyPadding : '5 5 0', @@ -174,9 +182,6 @@ fieldDefaults : { labelAlign : 'right' }, - layout : { - type : 'vbox' - }, items : [ {xtype: 'hidden', name: 'id', id : 'id', value: id}, {xtype: 'hidden', name: 'tousseItems', id : 'tousseItems'}, @@ -185,210 +190,152 @@ xtype: 'fieldset', title: '基本信息', layout: 'column', - height : 200, width: '100%', - items: [{ //流水号、申请人、时间 - xtype : 'container', - layout : {type : 'hbox'}, - height: 25, - items : [{ - xtype : 'textfield', - fieldLabel : '流水号', - maxLength : '41', - flex : 1, - id : 'serialNumber', - name : 'serialNumber', - allowBlank : true, - readOnly : true, - fieldCls : 'fieldReadOnlyNoRemoveAndTop' - },{ - xtype : 'textfield', - fieldLabel : '申请人', - maxLength : '255', - flex : 1, - id : 'applicant', - name : 'applicant', - allowBlank : false, - readOnly : true, - fieldCls : 'fieldReadOnlyNoRemoveAndTop' - },{ - xtype : 'textfield', - fieldLabel : '时间', - flex : 1, - id : 'applicationTimeStr', - name : 'applicationTimeStr', - allowBlank : false, - readOnly : true, - fieldCls : 'fieldReadOnlyNoRemoveAndTop' - }] - },{ //申请科室、结算科室、处理科室 - xtype : 'container', - layout : {type : 'hbox'}, - height: 25, - items : [{ - xtype : 'textfield', - fieldLabel : '申请科室', - flex : 1, - id : 'depart', - name : 'depart', - allowBlank : false, - readOnly : true - },{ - xtype : 'textfield', - fieldLabel : '结算科室', - flex : 1, - id : 'settleAccountsDepart', - name : 'settleAccountsDepart', - allowBlank : false, - readOnly : true - },{ - xtype : 'textfield', - fieldLabel : '处理科室', - flex : 1, - id : 'handleDepart', - name : 'handleDepart', - allowBlank : false, - readOnly : true - }] - },{ //住院号、诊疗号、病人姓名 - xtype : 'container', - layout : {type : 'hbox'}, - height: 25, - items : [{ - xtype : 'textfield', - fieldLabel : '住院号', - flex : 1, - id : 'hospitalNumber', - name : 'hospitalNumber', - readOnly : true - },{ - xtype : 'textfield', - fieldLabel : '诊疗号', - flex : 1, - id : 'clinicNumber', - name : 'clinicNumber', - readOnly : true - },{ - xtype : 'textfield', - fieldLabel : '病人姓名', - flex : 1, - id : 'patient', - name : 'patient', - readOnly : true - }] - },{ //病区、病室、床位 - xtype : 'container', - layout : {type : 'hbox'}, - height: 25, - hidden : sstsConfig.hidePatientArea, - flex : 1, - height: 25, - items : [{ - xtype : 'textfield', - fieldLabel : '病区', - maxLength : '50', - id : 'patientArea', - name : 'patientArea', - flex : 1, - readOnly : true - },{ - xtype : 'textfield', - fieldLabel : '病室', - maxLength : '50', - id : 'roomNumber', - name : 'roomNumber', - hidden : sstsConfig.hideRoomNumber, - flex : 1, - readOnly : true - },{ - xtype : 'textfield', - fieldLabel : '床位', - maxLength : '50', - id : 'bedNumber', - name : 'bedNumber', - hidden : sstsConfig.hideRoomNumber, - flex : 1, - readOnly : true - }] - },{ //年龄、性别、病人所属科室 - xtype : 'container', - layout : {type : 'hbox'}, - height: 25, - items : [{ - xtype : 'textfield', - fieldLabel : '年龄', - id : 'patientAge', - name : 'patientAge', - flex : 1, - readOnly : true - },{ - xtype : 'textfield', - fieldLabel : '性别', - id : 'patientSex', - name : 'patientSex', - flex : 1, - readOnly : true - },{ - xtype : 'textfield', - fieldLabel : '病人所属科室', - maxLength : '16', - id : 'ascriptionDepartment', - name : 'ascriptionDepartment', - flex : 1, - readOnly : true - }] - },{ //手术名称、手术时间、医生 - xtype : 'container', - layout : {type : 'hbox'}, - height: 25, - items : [{ - xtype : 'textfield', - fieldLabel : '手术名称', - id : 'surgery', - name : 'surgery', - flex : 1, - readOnly : true - },{ - xtype : 'datefield', - fieldLabel : '手术时间', - id : 'operationTime', - name : 'operationTime', - selectOnFocus :true, - format : 'Y-m-d H:i', - flex : 1, - readOnly : true - },{ - xtype : 'textfield', - fieldLabel : '医生', - id : 'doctor', - name : 'doctor', - flex : 1, - readOnly : true - }] - },{ //手术间、备注 - xtype : 'container', - layout : {type : 'hbox'}, - width:790, - height: 25, - items : [{ - xtype : 'textfield', - fieldLabel : '手术间', - id : 'operationRoom', - name : 'operationRoom', - flex : 1.3, - readOnly : true - },{ - xtype : 'textfield', - fieldLabel : '备注', - id : 'remark', - name : 'remark', - flex : 3 - }] + height: 190, + items: [{ + xtype : 'textfield', + fieldLabel : '流水号', + maxLength : '41', + id : 'serialNumber', + name : 'serialNumber', + allowBlank : true, + readOnly : true, + fieldCls : 'fieldReadOnlyNoRemoveAndTop' + },{ + xtype : 'textfield', + fieldLabel : '申请人', + maxLength : '255', + id : 'applicant', + name : 'applicant', + allowBlank : false, + readOnly : true, + fieldCls : 'fieldReadOnlyNoRemoveAndTop' + },{ + xtype : 'textfield', + fieldLabel : '时间', + id : 'applicationTimeStr', + name : 'applicationTimeStr', + allowBlank : false, + readOnly : true, + fieldCls : 'fieldReadOnlyNoRemoveAndTop' + },{ + xtype : 'textfield', + fieldLabel : '申请科室', + id : 'depart', + name : 'depart', + allowBlank : false, + readOnly : true + },{ + xtype : 'textfield', + fieldLabel : '结算科室', + id : 'settleAccountsDepart', + name : 'settleAccountsDepart', + allowBlank : false, + readOnly : true + },{ + xtype : 'textfield', + fieldLabel : '处理科室', + id : 'handleDepart', + name : 'handleDepart', + allowBlank : false, + readOnly : true + },{ + xtype : 'textfield', + fieldLabel : '住院号', + id : 'hospitalNumber', + name : 'hospitalNumber', + readOnly : true + },{ + xtype : 'textfield', + fieldLabel : '诊疗号', + id : 'clinicNumber', + name : 'clinicNumber', + readOnly : true + },{ + xtype : 'textfield', + fieldLabel : '病人姓名', + id : 'patient', + name : 'patient', + readOnly : true + },{ + xtype : 'textfield', + fieldLabel : '病区', + maxLength : '50', + id : 'patientArea', + name : 'patientArea', + readOnly : true + },{ + xtype : 'textfield', + fieldLabel : '病室', + maxLength : '50', + id : 'roomNumber', + name : 'roomNumber', + hidden : sstsConfig.hideRoomNumber, + readOnly : true + },{ + xtype : 'textfield', + fieldLabel : '床位', + maxLength : '50', + id : 'bedNumber', + name : 'bedNumber', + hidden : sstsConfig.hideRoomNumber, + readOnly : true + },{ + xtype : 'textfield', + fieldLabel : '年龄', + id : 'patientAge', + name : 'patientAge', + readOnly : true + },{ + xtype : 'textfield', + fieldLabel : '性别', + id : 'patientSex', + name : 'patientSex', + readOnly : true + },{ + xtype : 'textfield', + fieldLabel : '病人所属科室', + maxLength : '16', + id : 'ascriptionDepartment', + name : 'ascriptionDepartment', + readOnly : true + },{ + xtype : 'textfield', + fieldLabel : '手术名称', + id : 'surgery', + name : 'surgery', + readOnly : true + },{ + xtype : 'datefield', + fieldLabel : '手术时间', + id : 'operationTime', + name : 'operationTime', + selectOnFocus :true, + format : 'Y-m-d H:i', + readOnly : true + },{ + xtype : 'textfield', + fieldLabel : '医生', + id : 'doctor', + name : 'doctor', + readOnly : true + },{ + xtype : 'textfield', + fieldLabel : '手术间', + id : 'operationRoom', + name : 'operationRoom', + readOnly : true + },{ + xtype : 'textfield', + width: 507, + fieldLabel : '备注', + id : 'remark', + name : 'remark' }] },{ xtype: 'container', width: '100%', - height: 350, + height: 340, layout: 'fit', items: { xtype : 'tree-grid', @@ -415,7 +362,7 @@ listeners: { select: function(combo, records, index) { expensiveGoodsStore.load(); - top.Ext4.getCmp('expensiveGoods').setValue('') + Ext4.getCmp('expensiveGoods').setValue(''); } } },{ @@ -440,10 +387,10 @@ pageSize:100, listeners: { focus: function(thiz, the, eOpts) { - var rawValue = top.Ext4.getCmp('expensiveGoodsSupplier').getRawValue(); + var rawValue = Ext4.getCmp('expensiveGoodsSupplier').getRawValue(); if (!rawValue) { showResult('请先选择生产厂家!'); - top.Ext4.getCmp('expensiveGoodsSupplier').focus(); + Ext4.getCmp('expensiveGoodsSupplier').focus(); } } } @@ -461,48 +408,31 @@ allowDecimals : false, listeners : { specialkey : function(field, ee) { - if (ee.getKey() == top.Ext4.EventObject.ENTER) { + if (ee.getKey() == Ext4.EventObject.ENTER) { addExpensiveGoods(); } } } },{ xtype:'button', id : 'addTousseBt', - iconCls : 'btn_ext_add', + iconCls : 'icon-add2', handler : function() { addExpensiveGoods(); } }] } - }], - buttons : [{ - id : 'saveBtn', - text : '提交', - handler : function() { - submitSaveExpensiveGoodsApplication(); - } - },{ - text : '取消', - handler : function() { - windowObj.close(); - } }] +// , //此按钮测试可以打开 +// buttons : [{ +// id : 'saveBtn', +// text : '提交', +// handler : function() { +// submitSaveExpensiveGoodsApplication(); +// } +// }] }); - windowObj = new top.Ext4.window.Window({ - layout : 'fit', - title : '申请高值耗材', - width : 900, - height : 600, - resizable :false, - modal : true, - border : false, - plain : true, - items : [formObj] - }); - windowObj.show(); - if (id) { formObj.form.load({ url : WWWROOT + '/disinfectSystem/expensivegoodsapplication/expensiveGoodsApplicationAction!loadExpensiveGoodsApplication.do', @@ -515,15 +445,13 @@ //1、“手术时间” var operationTime = data.operationTime; if(operationTime){ - top.Ext4.getCmp("operationTime").setValue(operationTime); + Ext4.getCmp("operationTime").setValue(operationTime); } //2、设置申请项 treePanelStore.proxy.data = {children: data.tousseItems}; treePanelStore.load(); }, - failure : function(form, action) { - }, params : { id : id } @@ -537,10 +465,10 @@ * @returns {Boolean} */ function addExpensiveGoods() { - var amount = top.Ext4.getCmp('amount').getValue(); - var id = top.Ext4.getCmp('expensiveGoods').getValue(); - var showName = top.Ext4.getCmp('expensiveGoods').getRawValue(); - var expensiveGoodsSupplier = top.Ext4.getCmp('expensiveGoodsSupplier').getRawValue(); + var amount = Ext4.getCmp('amount').getValue(); + var id = Ext4.getCmp('expensiveGoods').getValue(); + var showName = Ext4.getCmp('expensiveGoods').getRawValue(); + var expensiveGoodsSupplier = Ext4.getCmp('expensiveGoodsSupplier').getRawValue(); //1、先校验物品和数量 if (!id || !showName) { @@ -567,7 +495,7 @@ findNode.set('amount', amount); } else { var selectRecord = expensiveGoodsStore.findRecord('id', id); - var node = top.Ext4.create('ExpensiveGoodsModel', { + var node = Ext4.create('ExpensiveGoodsModel', { id : 0, amount: amount, expensiveGoodsId : selectRecord.get('id'), @@ -579,9 +507,9 @@ }); treePanelStore.getRootNode().appendChild(node); } - top.Ext4.getCmp('expensiveGoodsSupplier').setValue(); - top.Ext4.getCmp('expensiveGoods').setValue(); - top.Ext4.getCmp('amount').setValue(); + Ext4.getCmp('expensiveGoodsSupplier').setValue(); + Ext4.getCmp('expensiveGoods').setValue(); + Ext4.getCmp('amount').setValue(); } } @@ -599,7 +527,6 @@ waitMsg : '正在保存数据,请稍候', waitTitle : '提交表单', success : function(form, action) { - windowObj.close(); showResult(action.result.message); }, failure : function(form, action) { @@ -640,7 +567,7 @@ } if (items.length > 0) { - top.Ext4.getCmp('tousseItems').setValue(JSON.stringify(items)); + Ext4.getCmp('tousseItems').setValue(JSON.stringify(items)); return true; } else { return false; Index: ssts-web/src/main/webapp/common/include_ForgonGrid4.2.5_Js.jsp =================================================================== diff -u -r17181 -r21864 --- ssts-web/src/main/webapp/common/include_ForgonGrid4.2.5_Js.jsp (.../include_ForgonGrid4.2.5_Js.jsp) (revision 17181) +++ ssts-web/src/main/webapp/common/include_ForgonGrid4.2.5_Js.jsp (.../include_ForgonGrid4.2.5_Js.jsp) (revision 21864) @@ -2,9 +2,8 @@ -<%----%> -<%----%> -<%-- 高值耗材申请单审批 - + \ No newline at end of file