Index: ssts-web/src/main/webapp/disinfectsystem/config/gzzyyfy/menu/menuconfigure.js =================================================================== diff -u -r26603 -r26636 --- ssts-web/src/main/webapp/disinfectsystem/config/gzzyyfy/menu/menuconfigure.js (.../menuconfigure.js) (revision 26603) +++ ssts-web/src/main/webapp/disinfectsystem/config/gzzyyfy/menu/menuconfigure.js (.../menuconfigure.js) (revision 26636) @@ -170,7 +170,14 @@ {hidden :SSTS_TrainingManage_Menu,text:"培训管理",href:WWWROOT+'/knowledge/view.do?moduleId=trainingManage',hrefTarget:linkTarget,leaf:true} ] }; - +DisinfectsystemTreeData[14] = { + text:"收费记录管理", + singleClickExpand:singleClickExpandTree, + hidden:SSTS_chargeRecordManage_MENU, + children:[ + {hidden :SSTS_chargeRecordManage_MENU,text:"收费记录管理",href:WWWROOT+'/disinfectsystem/chargeRecord/chargeRecord.jsp',hrefTarget:linkTarget,leaf:true} + ] + }; DWREngine.setAsync(false); PackingTableManager.getAllTaskGroup(setTaskGroup); function setTaskGroup(taskGroup){ @@ -699,9 +706,10 @@ {hidden :SSTS_Handover_manager,text:"交接模块管理",href:WWWROOT+'/disinfectsystem/basedatamanager/handover/handoverView.jsp',hrefTarget:linkTarget,leaf:true}, {hidden :SSTS_ResponsibilityPart_manager,text:"责任环节",href:WWWROOT+'/systemmanage/httpOption.mhtml?listId=responsibilityPart',hrefTarget:linkTarget,leaf:true}, {hidden :SSTS_DefectiveMessageRegisterType_manager,text:"缺陷信息登记类型分组",href:WWWROOT+'/systemmanage/httpOption.mhtml?listId=defectiveMessageRegisterType',hrefTarget:linkTarget,leaf:true}, + {hidden :SSTS_chargeRecordManage_MENU,text:"收费项目设置",href:encodeURI(WWWROOT+'/systemmanage/httpOption.mhtml?listId=chargeItem&optionName=收费项目设置'),hrefTarget:linkTarget,leaf:true}, {hidden :SSTS_SupplyRoomType_manager,text:"供应室处理器械包配置",href:WWWROOT+'/disinfectsystem/basedatamanager/supplyroomtype/cssdHandleToussesView.jsp?editMode=true',hrefTarget:linkTarget,leaf:true}, {hidden :SSTS_SupplyRoomType_manager,text:"供应室服务临床科室配置",href:WWWROOT+'/disinfectsystem/basedatamanager/supplyroomtype/cssdServiceDeptsView.jsp?editMode=true',hrefTarget:linkTarget,leaf:true}, - {hidden :SSTS_SupplyRoomType_manager,text:"科室供应室设置",href:WWWROOT+'/disinfectsystem/basedatamanager/supplyroomtype/supplyRoomTypeView.jsp?editMode=true',hrefTarget:linkTarget,leaf:true} + {hidden :SSTS_SupplyRoomType_manager,text:"科室供应室设置",href:WWWROOT+'/disinfectsystem/basedatamanager/supplyroomtype/supplyRoomTypeView.jsp?editMode=true',hrefTarget:linkTarget,leaf:true} ] },{ text:"个人设置", Index: ssts-web/src/main/resources/systemset/operationDefine.xml =================================================================== diff -u -r26350 -r26636 --- ssts-web/src/main/resources/systemset/operationDefine.xml (.../operationDefine.xml) (revision 26350) +++ ssts-web/src/main/resources/systemset/operationDefine.xml (.../operationDefine.xml) (revision 26636) @@ -497,6 +497,13 @@ + + + + + + + Index: ssts-web/src/main/webapp/disinfectsystem/config/gzzyyfy/config.js =================================================================== diff -u -r26490 -r26636 --- ssts-web/src/main/webapp/disinfectsystem/config/gzzyyfy/config.js (.../config.js) (revision 26490) +++ ssts-web/src/main/webapp/disinfectsystem/config/gzzyyfy/config.js (.../config.js) (revision 26636) @@ -183,5 +183,7 @@ //显示一次性物品的生产日期,值为true时,在相关界面会显示生产日期;值为false或者没有配置时,相关界面不显示一次性物品的生产日期 showProduceDateOfDisposableGoods : true, //一次性物品的生产日期字段是否允许为空,值为true时,生产日期可以为空;值为false或者没有配置时,生产日期不允许为空。只有当显示一次性物品的生产日期字段时,此配置项才有意义。 - produceDateOfDisposableGoodsAllowBlank : true + produceDateOfDisposableGoodsAllowBlank : true, + //是否开启收费项目、收费记录管理,true开启,false不开启 + isEnableChargeFunction:true } \ No newline at end of file Index: ssts-web/src/main/webapp/homepage/menuconfigure.js =================================================================== diff -u -r26603 -r26636 --- ssts-web/src/main/webapp/homepage/menuconfigure.js (.../menuconfigure.js) (revision 26603) +++ ssts-web/src/main/webapp/homepage/menuconfigure.js (.../menuconfigure.js) (revision 26636) @@ -170,7 +170,14 @@ {hidden :SSTS_TrainingManage_Menu,text:"培训管理",href:WWWROOT+'/knowledge/view.do?moduleId=trainingManage',hrefTarget:linkTarget,leaf:true} ] }; - +DisinfectsystemTreeData[14] = { + text:"收费记录管理", + singleClickExpand:singleClickExpandTree, + hidden:SSTS_chargeRecordManage_MENU, + children:[ + {hidden :SSTS_chargeRecordManage_MENU,text:"收费记录管理",href:WWWROOT+'/disinfectsystem/chargeRecord/chargeRecord.jsp',hrefTarget:linkTarget,leaf:true} + ] + }; DWREngine.setAsync(false); PackingTableManager.getAllTaskGroup(setTaskGroup); function setTaskGroup(taskGroup){ @@ -741,6 +748,7 @@ {hidden :SSTS_ResponsibilityPart_manager,text:"责任环节",href:WWWROOT+'/systemmanage/httpOption.mhtml?listId=responsibilityPart',hrefTarget:linkTarget,leaf:true}, {hidden :SSTS_DefectiveMessageRegisterType_manager,text:"缺陷信息登记类型分组",href:WWWROOT+'/systemmanage/httpOption.mhtml?listId=defectiveMessageRegisterType',hrefTarget:linkTarget,leaf:true}, {hidden :(!sstsConfig.hasOwnProperty('hideStaffArchive')) || sstsConfig.hideStaffArchive,text:"职称设置",href:WWWROOT+'/systemmanage/httpOption.mhtml?listId=positionalTitle',hrefTarget:linkTarget,leaf:true}, + {hidden :SSTS_chargeRecordManage_MENU,text:"收费项目设置",href:encodeURI(WWWROOT+'/systemmanage/httpOption.mhtml?listId=chargeItem&optionName=收费项目设置'),hrefTarget:linkTarget,leaf:true}, {hidden :SSTS_SupplyRoomType_manager,text:"供应室处理器械包配置",href:WWWROOT+'/disinfectsystem/basedatamanager/supplyroomtype/cssdHandleToussesView.jsp?editMode=true',hrefTarget:linkTarget,leaf:true}, {hidden :SSTS_SupplyRoomType_manager,text:"供应室服务临床科室配置",href:WWWROOT+'/disinfectsystem/basedatamanager/supplyroomtype/cssdServiceDeptsView.jsp?editMode=true',hrefTarget:linkTarget,leaf:true}, {hidden :SSTS_SupplyRoomType_manager,text:"科室供应室设置",href:WWWROOT+'/disinfectsystem/basedatamanager/supplyroomtype/supplyRoomTypeView.jsp?editMode=true',hrefTarget:linkTarget,leaf:true} Index: ssts-web/src/main/webapp/disinfectsystem/chargeRecord/chargeRecord.js =================================================================== diff -u --- ssts-web/src/main/webapp/disinfectsystem/chargeRecord/chargeRecord.js (revision 0) +++ ssts-web/src/main/webapp/disinfectsystem/chargeRecord/chargeRecord.js (revision 26636) @@ -0,0 +1,393 @@ +var grid; + +function queryChargeRecord(){ + var orgUnitName = Ext.getCmp('payDepartment2').getRawValue(); + var chargeItem = Ext.getCmp('chargeItem3').getRawValue(); + var startDate = Ext.getCmp('startDate2').getRawValue(); + var endDate = Ext.getCmp('endDate2').getRawValue(); + + if(startDate || endDate){ + if(!compareDate(startDate,endDate)){ + showResult("开始时间不能大于结束时间"); + return; + } + } + + $Id('parm_s_startDate').value = startDate; + $Id('parm_s_endDate').value = endDate; + $Id('parm_s_orgUnitName').value = orgUnitName; + $Id('parm_s_chargeItem').value = chargeItem; + grid.dwrReload(); + + $Id('parm_s_orgUnitName').value =""; + $Id('parm_s_chargeItem').value = ""; + Ext.getCmp('payDepartment2').setValue(); + Ext.getCmp('payDepartment2').setRawValue(); + Ext.getCmp('chargeItem3').setValue(); + Ext.getCmp('chargeItem3').setRawValue(); + +} +/** + * 修改记录 + * modifyRecord函数 触发modify函数调用,并传入当前列的值以及record.data对象 + * 页面中需要定义 modify(v,data) 函数 + */ +function modify(v,data){ + loadFormData(grid); +} + +function deleteChargeItem(grid){ + var records = grid.getSelectionModel().getSelections(); + + if (records.length == 0) { + showResult("请选择要删除的收费单!"); + return false; + } + var ids = null; + for ( var i = 0, len = records.length; i < len; i++) { + if (ids == null) { + ids = records[i].data['id']; + } else { + ids = ids + ';' + records[i].data['id']; + } + } + top.Ext.MessageBox.confirm("请确认","是否确定要删除选中的收费单信息?", + function(button, text) { + if ("yes" == button){ + Ext.Ajax.request({ + url : WWWROOT + '/disinfectSystem/chargeRecordAction!deleteChargeRecordByIds.do', + params : {ids : ids}, + success : function(response, options) { + var result = Ext.decode(response.responseText); + var success = result.success; + if (success) { + grid.dwrReload(); + showResult(result.message); + } + }, + failure : function(response, options) { + showResult(response.responseText); + } + }); + } + } + ); +} + +Ext.onReady(function() { + Ext.QuickTips.init(); + + var payDepartmentStrore2 = new Ext.data.Store({ + proxy : new Ext.data.HttpProxy({ + url : WWWROOT + '/disinfectSystem/baseData/supplyRoomConfigAction!getApplicationDepartJson.do', + method : 'POST' + }), + reader : new Ext.data.JsonReader({ + totalProperty : 'totalCount', + root : 'data' + }, [ + {name : 'id',mapping : 'id'}, + {name : 'name',mapping : 'name'} + ]) + }); + var chargeItemStrore2= new Ext.data.Store({ + proxy : new Ext.data.HttpProxy({ + url : WWWROOT + '/disinfectSystem/core/httpOptionAction!getHttpOptionTextAndValueById.do?optionId=chargeItem', + method : 'POST' + }), + reader : new Ext.data.JsonReader({ + }, [ + {name : 'id',mapping : 'id'}, + {name : 'name',mapping : 'name'} + ]) + }); + var filters = new Ext.grid.GridFilters({ + filters : [ + {type : 'string',dataIndex : 'serialNumber'}, + {type : 'date',dataIndex : 'chargeTime'}, + {type : 'string',dataIndex : 'operator'}, + {type : 'string',dataIndex : 'orgUnitName'} + ] + }); + var form = new Ext.Panel({ + id : 'northPanel', + layout : 'table', + frame : true, + region : 'north', + border : false, + bodyBorder : false, + buttonAlign : 'center', + layoutConfig : {columns : 2}, + height :110, + items : [{ + width :900, + layout : 'column', + items:[{ + columnWidth : .35, + layout : 'form', + labelWidth : 70, + labelAlign: "right", + items : [{ + xtype : 'combo', + fieldLabel : '交费科室', + id : 'payDepartment2', + name : 'payDepartment2', + maxLength : '60', + queryParam : 'supplierName', + minChars : 0, + valueField : 'id', + displayField : 'name', + store : payDepartmentStrore2, + forceSelection : true, + lazyInit : false, + triggerAction : 'all', + hideTrigger : false, + typeAhead : false, + allowBlank : true, + selectOnFocus :true, + width : 140, + tabIndex : 10, + listeners : { + specialkey : function(field, e) { + var key = e.getKey(); + if (key == Ext.EventObject.ENTER) { + Ext.getCmp('chargeItem3').focus(); + } + } + } + }] + },{ + columnWidth : .35, + layout : 'form', + labelWidth : 60, + labelAlign: "right", + items : [{ + xtype : 'combo', + fieldLabel : '收费项目', + id : 'chargeItem3', + name : 'chargeItem3', + valueField : 'id', + displayField : 'name', + store : chargeItemStrore2, + forceSelection : true, + lazyInit : false, + triggerAction : 'all', + hideTrigger : false, + typeAhead : false, + allowBlank : true, + selectOnFocus :true, + width : 140, + tabIndex : 10 + }] + },{ + columnWidth : .35, + layout : 'form', + labelWidth :70, + labelAlign: "right", + items : [{ + xtype : 'datefield', + fieldLabel : '开始日期', + name : 'startDate2', + id : 'startDate2', + readOnly : false, + altFormats:'Y-m-d|Y-n-j|y-n-j|y-m-j|y-m-d|y-n-d|Y-n-d|Y-m-j|Ymd|Ynj|ynj|ymj|ymd|ynd|Ynd|Ymj|Y/m/d|Y/n/j|y/n/j|y/m/j|y/m/d|y/n/d|Y/n/d|Y/m/j', + editable : false, + format : 'Y-m-d', + value:new Date(), + width : 140 + }] + },{ + columnWidth : .35, + layout : 'form', + labelWidth : 60, + labelAlign: "right", + items : [{ + xtype : 'datefield', + fieldLabel : '结束日期', + name : 'endDate2', + id : 'endDate2', + readOnly : false, + altFormats:'Y-m-d|Y-n-j|y-n-j|y-m-j|y-m-d|y-n-d|Y-n-d|Y-m-j|Ymd|Ynj|ynj|ymj|ymd|ynd|Ynd|Ymj|Y/m/d|Y/n/j|y/n/j|y/m/j|y/m/d|y/n/d|Y/n/d|Y/m/j', + editable : false, + format : 'Y-m-d', + value:new Date(), + width : 140 + }] + }] + }], + buttons:[{ + xtype : 'button', + text : '查询', + minWidth : 70, + iconCls : 'icon_search', + handler : function() { + queryChargeRecord(); + } + },{ + xtype : 'button', + text : '重置', + minWidth : 70, + iconCls : 'icon_set', + handler : function() { + Ext.getCmp('payDepartment2').focus(false, 100); + Ext.getCmp('payDepartment2').setValue(); + Ext.getCmp('payDepartment2').setRawValue(); + Ext.getCmp('chargeItem3').setValue(); + Ext.getCmp('chargeItem3').setRawValue(); + $Id('parm_s_orgUnitName').value =""; + $Id('parm_s_chargeItem').value = ""; + + } + }] + }); + var columns = [ + new Ext.grid.RowNumberer(), + {header : "收费单号",width : 200,dataIndex : 'serialNumber',renderer : function(v,p,record){ + return modifyRecord(v,p,record); + } + }, + {header : "收费时间",width : 200,dataIndex : 'chargeTime'}, + {header : "收费金额",width : 150,dataIndex : 'totalPrice',menuDisabled : true}, + {header : "操作员",width : 150,dataIndex : 'operator'}, + {header : "收费科室",width : 150,dataIndex : 'orgUnitName',id:"orgUnitName2"} + ]; + + var readerDetail = [ + {name : 'id'}, + {name : 'serialNumber'}, + {name : 'operator'}, + {name : 'totalPrice'}, + {name : 'orgUnitName'}, + {name : 'chargeTime'} + ]; + + + //grid顶部工具栏,通过权限项判定是否需要显示 + var tbar = []; + //添加 + if(!SSTS_chargeRecordManage_Add){ + tbar.push({ + text : '添加', + iconCls : 'btn_ext_application_add', + handler : function() { + addChargeInvoices(""); + } + }); + tbar.push('-'); + } + + + //修改 + if(!SSTS_chargeRecordgManage_Update){ + tbar.push({ + text : '修改', + iconCls : 'btn_ext_application_edit', + handler : function() { + loadFormData(grid); + } + }); + tbar.push('-'); + } + + //删除 + if(!SSTS_chargeRecordgManage_Delete){ + tbar.push({ + text : '删除', + iconCls : 'btn_ext_application_del', + handler : function() { + deleteChargeItem(grid); + } + }); + tbar.push('-'); + } + + grid = new Ext.ux.ForgonPageGrid( { + tbar : tbar, + pageSize : 20, + defaultSortField : 'id', + defaultSortDirection : 'DESC', + isCheckboxSelectionModel : true, + rememberSelected : false, + isShowSearchField : true, + columns : columns, + autoExpandColumn : 'orgUnitName2', + renderTo : 'gridDiv', + frame : false, + plugins : filters + }, readerDetail, + ChargeRecordTableManager.findChargeRecordTableList, + null + ); + + var viewport = new Ext.Viewport({ + layout : 'border', + items : [form,{ + region : 'center', + margins : '0 0 0 0', + layout : 'fit', + items : grid + }] + }); + + Ext.getCmp('payDepartment2').focus(); + /* + * 鼠标悬停预览表格功能 + */ + Ext4.tip.QuickTipManager.init(); + Ext4.apply(Ext4.tip.QuickTipManager.getQuickTip(), { + dismissDelay: 0, + showDelay: 0 + }); + grid.on('mouseover',function(e){// 添加mouseover事件 + var index = grid.getView().findRowIndex(e.getTarget());// 根据mouse所在的target可以取到列的位置 + if (index !== false) {// 当取到了正确的列时,(因为如果传入的target列没有取到的时候会返回false) + var record = this.getStore().getAt(index);//获得当前列的数据 + var tableContent = record.data['htmlContent'];//预览内容 + if(!tableContent){//若为unfinished + var content = ""; + var id = record.data['id']; + Ext.Ajax.request({ + url: WWWROOT + '/disinfectSystem/chargeRecordAction!getChargeRecordItemById.do', + params : { + id : id + }, + success: function(response, options) {//请求成功的回调函数 + var result = Ext.decode(response.responseText); + if(result!=null){ + var itemsList = result.data; + for(var i=0;i " + itemsList[i].orgUnitName + +""+ itemsList[i].chargeItem + +""+ itemsList[i].price + +""; + } + } + //预览表格行 + tableContent = ("" + +"" + +"" + +""); + tableContent +="" + content + "

交费科室

收费项目

金额


"; + if(grid.getStore().getCount() > index){ + record = grid.getStore().getAt(index); + if(id == record.data['id']){ + record.set("htmlContent",tableContent); + } + } + }, + failure : function(response, options) {//请求失败的回调函数 + } + }); + } + var rowEl = Ext4.fly(e.getTarget()); + rowEl.set({ + 'data-qtip' :tableContent, + 'data-qwidth': 365, + 'data-qtitle':' 收费单信息表:'}); + } + }); +}); \ No newline at end of file Index: ssts-web/src/main/webapp/disinfectsystem/chargeRecord/chargeRecord.jsp =================================================================== diff -u --- ssts-web/src/main/webapp/disinfectsystem/chargeRecord/chargeRecord.jsp (revision 0) +++ ssts-web/src/main/webapp/disinfectsystem/chargeRecord/chargeRecord.jsp (revision 26636) @@ -0,0 +1,74 @@ +<%@page import="com.forgon.tools.Constants"%> +<%@page import="com.forgon.disinfectsystem.entity.assestmanagement.GodownEntryItem"%> +<%@page import="com.forgon.disinfectsystem.entity.basedatamanager.supplier.Supplier,com.forgon.disinfectsystem.entity.assestmanagement.GodownEntry "%> +<%@ page contentType="text/html; charset=UTF-8"%> +<%@ include file="/common/taglibs.jsp"%> +<%@ include file="/common/includeExtJsAndCss.jsp"%> +<%@ include file="/common/include_Ext42_Css.jsp"%> +<%@ page import="com.forgon.tools.SpringBeanManger" %> +<% + String userName = AcegiHelper.getLoginUser().getUserFullName(); + request.setAttribute("userName",userName); +%> + +<%@ include file="/common/includeExtJs4_2.jsp"%> + + + +收费记录管理 + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+ + + + +
+ + + \ No newline at end of file Index: ssts-web/src/main/webapp/disinfectsystem/chargeRecord/chargeRecordForm.js =================================================================== diff -u --- ssts-web/src/main/webapp/disinfectsystem/chargeRecord/chargeRecordForm.js (revision 0) +++ ssts-web/src/main/webapp/disinfectsystem/chargeRecord/chargeRecordForm.js (revision 26636) @@ -0,0 +1,488 @@ +var chargeInvoiceWin; +var formObj; + +var ChargeInvoiceItem = Ext.data.Record.create([ + {name : 'id'}, + {name : 'httpOptionId'}, + {name : 'orgUnitCode'}, + {name : 'orgUnitName'}, + {name : 'chargeItem'}, + {name : 'price'} +]); + +var chargeItemStrore = new Ext.data.Store({ + proxy : new Ext.data.HttpProxy({ + url : WWWROOT + '/disinfectSystem/core/httpOptionAction!getHttpOptionTextAndValueById.do?optionId=chargeItem', + method : 'POST' + }), + reader : new Ext.data.JsonReader({ + }, [ + {name : 'id',mapping : 'id'}, + {name : 'name',mapping : 'name'} + ]) +}); + +var payDepartmentStrore = new Ext.data.Store({ + proxy : new Ext.data.HttpProxy({ + url : WWWROOT + '/disinfectSystem/baseData/supplyRoomConfigAction!getApplicationDepartJson.do', + method : 'POST' + }), + reader : new Ext.data.JsonReader({ + totalProperty : 'totalCount', + root : 'data' + }, [ + {name : 'id',mapping : 'id'}, + {name : 'name',mapping : 'name'} + ]) +}); + +function removeChargeInvoiceGridItem(){ + var chargeInvoiceGridStore = top.Ext.getCmp('chargeInvoiceGrid').getStore(); + var rows = top.Ext.getCmp('chargeInvoiceGrid').getSelectionModel().getSelections();// 返回值为 + if (rows) { + for ( var i = 0; i < rows.length; i++) { + chargeInvoiceGridStore.remove(rows[i]); + } + } + setTotalMoney(top.Ext.getCmp('chargeInvoiceGrid')); +} + +function setTotalMoney(grid) { + var totalMoney = 0.0; + grid.getStore().each(function(record){ + var amount = Number(record.data.price); + totalMoney = add(amount,totalMoney);//计算精度 + }); + top.Ext.getCmp("chargeTotalPrice").setValue(totalMoney); + //top.Ext.getCmp("chargeTotalPrice").setValue(Ext.util.Format.usMoney(totalMoney)); +} + +function addChargeInvoiceItemGrid(){ + var orgUnitName = top.Ext.getCmp('payDepartment').getRawValue(); + var orgUnitCode = top.Ext.getCmp('payDepartment').getValue(); + var chargeItem = top.Ext.getCmp('chargeItem').getRawValue(); + var httpOptionId = top.Ext.getCmp('chargeItem').getValue(); + var price = top.Ext.getCmp('price').getValue(); + var addId = ""; + + if(!orgUnitName) { + showResult("请选择交费科室!" , null); + return; + } + if(!chargeItem) { + showResult("请选择收费项目!" , null); + return; + } + if(!price) { + showResult("请输入价格!" , null); + return; + } + if(!top.Ext.getCmp('price').isValid()){ + showResult("请正确填写价格!"); + top.Ext.getCmp('price').setValue(""); + return false; + } + + + addChargeInvoiceItemGrid2(addId,httpOptionId,orgUnitCode,orgUnitName,chargeItem,price); + top.Ext.getCmp('payDepartment').setValue(""); + top.Ext.getCmp('payDepartment').setRawValue(""); + top.Ext.getCmp('chargeItem').setValue(""); + top.Ext.getCmp('chargeItem').setRawValue(""); + top.Ext.getCmp('price').setValue(""); + top.Ext.getCmp('payDepartment').focus(); +} + +function addChargeInvoiceItemGrid2(addId,httpOptionId,orgUnitCode,orgUnitName,chargeItem,price){ + top.Ext.getCmp('chargeInvoiceGrid').getStore().add( + new ChargeInvoiceItem({ + id : addId, + httpOptionId:httpOptionId, + orgUnitCode :orgUnitCode, + orgUnitName : orgUnitName, + chargeItem : chargeItem, + price : price + }) + ); + setTotalMoney(top.Ext.getCmp('chargeInvoiceGrid')); +} + +var loadFormData = function(grid) { + var records = grid.getSelectionModel().getSelections(); + if (records.length == 0) { + showResult("请选择一条记录!"); + return false; + } + if (records.length > 1) { + showResult("一次只能修改一个记录!"); + return false; + } + id = records[0].data['id']; + + addChargeInvoices(id); + top.Ext.getCmp('chargeForm').form.load({ + url : WWWROOT + '/disinfectSystem/chargeRecordAction!getChargeRecordById.do', + method: 'GET', + waitMsg: '正在加载数据,请稍候', + params: { + id: id + }, + success: function(form, action) { + top.Ext.getCmp('chargeDepartment').setValue(action.result.data.orgUnitName); + top.Ext.getCmp('chargeTotalPrice').setValue(action.result.data.totalPrice); + }, + failure : function(form, action) { + + } + }) + +}; + +function saveChargeInvoiceMsg(id){ + var store = top.Ext.getCmp('chargeInvoiceGrid').getStore(); + var len = store.getCount(); + var items = []; + for (var i = 0; i < len; i++) { + var record = store.getAt(i); + items.push({ + chargeItem:record.data.chargeItem, + httpOptionId: record.data.httpOptionId, + id:record.data.id, + orgUnitCode: record.data.orgUnitCode, + orgUnitName: record.data.orgUnitName, + price:record.data.price + }); + } + + //top.Ext.getCmp("values").setValue(JSON.stringify(items)); + //var values = top.Ext.getCmp("values").getValue(); + // items为json数组字符串,不会为null + if(items.length == 0){ + showResult('收费单信息不能为空!'); + return false; + } + + formObj.form.submit({ + url:WWWROOT + '/disinfectSystem/chargeRecordAction!saveOfUpdateChargeRecordAction.do', + method : 'POST', + waitMsg : '正在保存数据,请稍候', + waitTitle : '提交表单', + params : { + id : id, + items:JSON.stringify(items) + }, + success : function(form, action) { + showResult(action.result.message); + chargeInvoiceWin.close(); + grid.dwrReload(); + }, + failure : function(form, action) { + } + }); +} + +function addChargeInvoices(id){ + this.id = id; + var chargeInvoiceGridStore = new top.Ext.data.Store({ + proxy : new top.Ext.data.HttpProxy({ + url : WWWROOT + '/disinfectSystem/chargeRecordAction!getChargeRecordItemById.do?id=' + id, + method : 'POST' + }), + reader : new top.Ext.data.JsonReader({ + root : 'data', + fields : [ + {name : 'id'}, + {name : 'httpOptionId'}, + {name : 'orgUnitCode'}, + {name : 'orgUnitName'}, + {name : 'chargeItem'}, + {name : 'price'} + ] + }) + }) + + var chargeCm = new top.Ext.grid.ColumnModel([ + new Ext.grid.RowNumberer(), + {header : "id",dataIndex : 'id',hidden : true}, + {header : "httpOptionId",dataIndex : 'httpOptionId',hidden : true}, + {header : "交费科室编码",dataIndex : 'orgUnitCode',width :150,hidden : true}, + {header : "交费科室",dataIndex : 'orgUnitName',width :150,menuDisabled : true}, + {header : "收费项目",dataIndex : 'chargeItem',width : 100,menuDisabled : true, + editor: new top.Ext.form.ComboBox({ + xtype: 'combo', + id: 'chargeItem1', + name: 'chargeItem1', + valueField: 'id', + displayField: 'name', + listWidth: 350, + store: new Ext.data.Store({ + proxy: new Ext.data.HttpProxy({ + url : WWWROOT + '/disinfectSystem/core/httpOptionAction!getHttpOptionTextAndValueById.do?optionId=chargeItem', + method : 'POST' + }), + reader: new Ext.data.JsonReader({ + }, [ + {name : 'id',mapping : 'id'}, + {name : 'name',mapping : 'name'} + ]) + }), + forceSelection : true, + lazyInit : false, + triggerAction : 'all', + hideTrigger : false, + typeAhead : false, + allowBlank : true, + selectOnFocus :true, + width : 140, + tabIndex : 10, + listeners : { + select : function(combo, record, index) { + combo.setValue(record.data.name); + } + } + }) + }, + {header : "金额",width : 80,dataIndex : 'price',menuDisabled : true,align:'right', + editor: new top.Ext.form.TextField({ + // regex: /^(([1-9]+[0-9]*.{1}[0-9]+)|([0].{1}[1-9]+[0-9]*)|([1-9][0-9]*)|([0][.][0-9]+[1-9]*))$/, + regex:/^(?:0|\-?(?:0\.\d*[1-9]|[1-9]\d*(?:\.\d*[1-9])?))$/, + allowBlank : false, + listeners : { + change: function(v,n,o) { + setTotalMoney(top.Ext.getCmp('chargeInvoiceGrid')); + + } + } + }) + }, + {header : "操作",width : 50,dataIndex : 'button',menuDisabled : true,align:'center', + renderer: function(v,p,record){ + var str = ""; + return str; + } + } + ]) + + formObj = new top.Ext.FormPanel({ + id : 'chargeForm', + frame : true, + labelSeparator : ':', + bodyStyle : 'padding:5px 0px 0px 5px', + width : 850, + autoScroll : true, + labelAlign : 'center', + items:[{ + layout : 'column', + items : [ + { + columnWidth : .28, + layout : 'form', + labelAlign: "right", + labelWidth : 60, + height:30, + items : [{ + xtype : 'combo', + fieldLabel : '交费科室', + id : 'payDepartment', + name : 'payDepartment', + maxLength : '60', + queryParam : 'spell', + minChars : 0, + valueField : 'id', + displayField : 'name', + store : payDepartmentStrore, + forceSelection : true, + lazyInit : false, + triggerAction : 'all', + hideTrigger : false, + typeAhead : false, + //allowBlank: false, + selectOnFocus :true, + width : 150, + tabIndex : 10, + listeners : { + specialkey : function(field, e) { + var key = e.getKey(); + if (key == Ext.EventObject.ENTER) { + top.Ext.getCmp('chargeItem').focus(); + } + } + } + }] + },{ + columnWidth : .28, + layout : 'form', + labelAlign: "right", + labelWidth : 60, + height:30, + items : [{ + xtype : 'combo', + fieldLabel : '收费项目', + id : 'chargeItem', + name : 'chargeItem', + valueField : 'id', + displayField : 'name', + store : chargeItemStrore, + forceSelection : true, + lazyInit : false, + triggerAction : 'all', + hideTrigger : false, + typeAhead : false, + // allowBlank: false, + selectOnFocus :true, + width : 140, + tabIndex : 10, + listeners : { + specialkey : function(field, e) { + var key = e.getKey(); + if (key == Ext.EventObject.ENTER) { + top.Ext.getCmp('price').focus(); + } + } + } + }] + },{ + columnWidth : .24, + layout : 'form', + labelWidth : 60, + height:30, + items : [{ + xtype: 'textfield', + fieldLabel : '收费科室', + id : 'chargeDepartment', + name : 'chargeDepartment', + cls : 'fieldReadOnlyNoRemove', + width : 130, + readOnly : true, + value:"" + }] + },{ + columnWidth : .28, + layout : 'form', + labelAlign: "right", + labelWidth : 60, + height:30, + items : [{ + xtype : 'datefieldWithMin', + fieldLabel : '收费时间', + id : 'time', + name : 'time', + format : 'Y-m-d H:i:s', + altFormats:'Y-m-d|Y-n-j|y-n-j|y-m-j|y-m-d|y-n-d|Y-n-d|Y-m-j|Ymd|Ynj|ynj|ymj|ymd|ynd|Ynd|Ymj|Y/m/d|Y/n/j|y/n/j|y/m/j|y/m/d|y/n/d|Y/n/d|Y/m/j', + width : 150, + listeners : { + render : function() { + setStartDate(top.Ext, 'yyyy/MM/dd HH:mm:ss', 'time'); //(入库时间,取服务器时间 cjr) + } + } + }] + },{ + columnWidth : .28, + layout : 'form', + labelWidth : 60, + labelAlign: "right", + height:30, + items : [{ + xtype : 'textfield', + fieldLabel: "价格", + id : 'price', + name : 'price', + width : 140, + tabIndex : 7, + regex:/^(?:0|\-?(?:0\.\d*[1-9]|[1-9]\d*(?:\.\d*[1-9])?))$/, + //regex: /^(([1-9]+[0-9]*.{1}[0-9]+)|([0].{1}[1-9]+[0-9]*)|([1-9][0-9]*)|([0][.][0-9]+[1-9]*))$/, + //regexText:'只能输入正数', + allowBlank:true, + listeners : { + specialkey : function(field, e) { + var key = e.getKey(); + if (key == Ext.EventObject.ENTER) { + addChargeInvoiceItemGrid(); + top.Ext.getCmp('price').setValue(""); + } + } + } + }] + },{ + columnWidth : .24, + layout : 'form', + labelWidth : 60, + height:30, + items : [{ + xtype : 'textfield', + fieldLabel : '收费总价', + cls : 'fieldReadOnlyNoRemove', + name: 'chargeTotalPrice', + id: 'chargeTotalPrice', + readOnly:true, + width : 130 + }] + },{ + columnWidth : .08, + layout : 'form', + labelAlign: "right", + height:30, + items : [{ + xtype : 'button', + text : '添加', + iconCls : 'btn_ext_add', + handler : function() { + addChargeInvoiceItemGrid(); + } + }] + } + ] + },new top.Ext.grid.EditorGridPanel({ + id : 'chargeInvoiceGrid', + bodyStyle : 'border:1px solid #afd7af', + frame :false, + height :420, + viewConfig: { + forceFit:true + }, + store : chargeInvoiceGridStore, + cm : chargeCm, + width :820, + selModel : new top.Ext.grid.RowSelectionModel({ + singleSelect : false + }), + clicksToEdit: 1//设置点击几次才可编辑 + })], + buttons : [ + { + text : '保存', + hidden:false, + handler : function() { + saveChargeInvoiceMsg(id); + } + },{ + text : '取消', + handler : function() { + chargeInvoiceWin.close(); + } + } + ] + }); + chargeInvoiceWin = new top.Ext.Window({ + id : 'chargeInvoiceWin', + layout : 'fit', + title : '收费单信息', + width : 850, + height :570, + modal : true, + border :false, + plain : true, + items : [ formObj ] + }); + + chargeInvoiceWin.show(); + top.Ext.getCmp('payDepartment').focus(false, 100); + if(id != 0){ + chargeInvoiceGridStore.load(); + } + + +} + + + Index: ssts-web/src/main/webapp/homepage/menu.jsp =================================================================== diff -u -r26240 -r26636 --- ssts-web/src/main/webapp/homepage/menu.jsp (.../menu.jsp) (revision 26240) +++ ssts-web/src/main/webapp/homepage/menu.jsp (.../menu.jsp) (revision 26636) @@ -1202,6 +1202,16 @@ /** + * 《收费记录管理》《收费项目设置》菜单 + */ +var SSTS_chargeRecordManage_MENU = true; + +if(sstsConfig.isEnableChargeFunction){ + SSTS_chargeRecordManage_MENU = false; +} + + +/** * 《消毒供应中心运作监控》《消毒供应中心未完成工作列表》菜单 */ var SSTS_supplyRoomOperate_Menu = true;