"
+ +" " + 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;