Index: ssts-web/src/main/webapp/disinfectsystem/reportforms/js/setUnqualifiedSourceForm.jsp
===================================================================
diff -u
--- ssts-web/src/main/webapp/disinfectsystem/reportforms/js/setUnqualifiedSourceForm.jsp (revision 0)
+++ ssts-web/src/main/webapp/disinfectsystem/reportforms/js/setUnqualifiedSourceForm.jsp (revision 33613)
@@ -0,0 +1,24 @@
+<%@ page contentType="text/html; charset=UTF-8"%>
+<%@ include file="/common/taglibs.jsp"%>
+
+
+
+
+<%@ include file="/common/includeExtJsAndCss.jsp"%>
+
+
+
+
+
+
+
+设置不合格数来源
+
+
+
+
+
\ No newline at end of file
Index: ssts-web/src/main/webapp/disinfectsystem/reportforms/js/setUnqualifiedSourceForm.js
===================================================================
diff -u
--- ssts-web/src/main/webapp/disinfectsystem/reportforms/js/setUnqualifiedSourceForm.js (revision 0)
+++ ssts-web/src/main/webapp/disinfectsystem/reportforms/js/setUnqualifiedSourceForm.js (revision 33613)
@@ -0,0 +1,166 @@
+var formWindow;
+var formObj;
+
+/**
+ * 质量监测的名称
+ */
+var commonData = [];
+DWREngine.setAsync(false);
+JasperreportsTableManager.getQualityMonitoringDefinitionName(true, function (config) {
+ if (config) {
+ var result = Ext.decode(config);
+ if (result.data) {
+ var data = result.data;
+ for (var i = 0; i < data.length; i++) {
+ var obj = data[i];
+ commonData.push([obj.name]);
+ }
+ }
+ }
+});
+DWREngine.setAsync(true);
+
+
+/**
+ * 创建多选框
+ * @param config 多选框的配置
+ * @returns {Ext.data.Store}
+ */
+function buildMultiSelectCombo(config) {
+ var multiSelectCombo = {
+ xtype: 'multiSelect',
+ fieldLabel: config.fieldLabel,
+ valueField: 'name',
+ displayField: 'name',
+ store: new Ext.data.SimpleStore({
+ fields: ['name'],
+ data: commonData
+ }),
+ triggerAction: 'all',
+ id: config.id,
+ name: config.name,
+ allowBlank: true,
+ readOnly: true,
+ mode: 'local',
+ anchor: '95%',
+ listeners: {
+ select: function (combo, record, index) {
+ if (record.get('name') == '全部') {
+ if (record.get('checked')) {
+ combo.selectAll();
+ } else {
+ combo.deselectAll();
+ }
+ }
+ }
+ }
+ };
+ return multiSelectCombo;
+}
+
+/**
+ * 初始化已经配置的不合格数来源数据
+ * @param id combo的id
+ * @param value 数据(格式:a;b;c)
+ */
+function setMultiSelectCombo(id, value) {
+ if (id && value) {
+ value = ';' + value + ';';
+ var multiSelectCombo = Ext.getCmp(id);
+ multiSelectCombo.store.each(function (record) {
+ var name = ';' + record.get('name') + ';';
+ if (value.indexOf(name) != -1) {
+ record.set(this.checkField, true);
+ }
+ }, multiSelectCombo);
+ multiSelectCombo.setValue(multiSelectCombo.getCheckedValue());
+ }
+}
+
+Ext.onReady(function () {
+ Ext.QuickTips.init();
+ var sterilePercentOfPassMultiSelectCombo = buildMultiSelectCombo({ fieldLabel: '复用性物品', id: 'sterilePercentOfPass', name: 'sterilePercentOfPass' });
+ var washPercentOfPassMultiSelectCombo = buildMultiSelectCombo({ fieldLabel: '器械清洗', id: 'washPercentOfPass', name: 'washPercentOfPass' });
+ var packingPercentOfPassMultiSelectCombo = buildMultiSelectCombo({ fieldLabel: '灭菌物品', id: 'packingPercentOfPass', name: 'packingPercentOfPass' });
+ var percentOfWetPacketsMultiSelectCombo = buildMultiSelectCombo({ fieldLabel: '湿包', id: 'percentOfWetPackets', name: 'percentOfWetPackets' });
+ var onlyPackingPercentOfWetPacketsMultiSelectCombo = buildMultiSelectCombo({ fieldLabel: '包装', id: 'onlyPackingPercentOfWetPackets', name: 'onlyPackingPercentOfWetPackets' });
+ var height = Ext.getBody().dom.clientHeight;
+ var top = (height - 200) / 2;
+ document.getElementById('main').style.paddingTop = top + 'px';
+ var formObj = new Ext.FormPanel({
+ labelAlign: 'left',
+ frame: true,
+ labelSeparator: ':',
+ title: '不合格数来源设置',
+ bodyStyle: 'padding:5px 5px 0px 25px',
+ width: 600,
+ labelWidth: 80,
+ items: [{
+ layout: 'column',
+ items: [{
+ columnWidth: 1,
+ layout: 'form',
+ items: [sterilePercentOfPassMultiSelectCombo]
+ }, {
+ columnWidth: 1,
+ layout: 'form',
+ items: [washPercentOfPassMultiSelectCombo]
+ }, {
+ columnWidth: 1,
+ layout: 'form',
+ items: [packingPercentOfPassMultiSelectCombo]
+ }, {
+ columnWidth: 1,
+ layout: 'form',
+ items: [percentOfWetPacketsMultiSelectCombo]
+ }, {
+ columnWidth: 1,
+ layout: 'form',
+ items: [onlyPackingPercentOfWetPacketsMultiSelectCombo]
+ }]
+ }],
+ buttons: [{
+ id: 'saveBtn',
+ text: '确定',
+ handler: function (thiz) {
+ thiz.disable();
+ formObj.form.submit({
+ url: WWWROOT + '/jasperreports/jasperreportsAction!saveUnqualifiedSource.do',
+ method: 'POST',
+ waitMsg: '正在保存数据,请稍候',
+ waitTitle: '提交表单',
+ success: function (form, action) {
+ if (action.result.success == true) {
+ showResult(action.result.message);
+ }
+ thiz.enable();
+ },
+ failure: function (form, action) {
+ showResult(action.result.message);
+ thiz.enable();
+ }
+ });
+ }
+ }]
+ });
+
+ formObj.form.load({
+ url: WWWROOT + '/jasperreports/jasperreportsAction!loadUnqualifiedSource.do',
+ method: 'GET',
+ waitMsg: '正在加载数据,请稍候',
+ success: function (form, action) {
+ if (action.result && action.result.data) {
+ var data = action.result.data;
+ setMultiSelectCombo('sterilePercentOfPass', data.sterilePercentOfPass);
+ setMultiSelectCombo('washPercentOfPass', data.washPercentOfPass);
+ setMultiSelectCombo('packingPercentOfPass', data.packingPercentOfPass);
+ setMultiSelectCombo('percentOfWetPackets', data.percentOfWetPackets);
+ setMultiSelectCombo('onlyPackingPercentOfWetPackets', data.onlyPackingPercentOfWetPackets);
+ }
+ },
+ failure: function (form, action) {
+ }
+ });
+
+ formObj.render("formDiv");
+})
\ No newline at end of file
Index: ssts-web/src/main/webapp/disinfectsystem/reportforms/supplyRoomQualityQuota.jsp
===================================================================
diff -u -r29513 -r33613
--- ssts-web/src/main/webapp/disinfectsystem/reportforms/supplyRoomQualityQuota.jsp (.../supplyRoomQualityQuota.jsp) (revision 29513)
+++ ssts-web/src/main/webapp/disinfectsystem/reportforms/supplyRoomQualityQuota.jsp (.../supplyRoomQualityQuota.jsp) (revision 33613)
@@ -1,7 +1,12 @@
<%@page contentType="text/html; charset=UTF-8"%>
<%@include file="/common/taglibs.jsp"%>
+<%@page import="java.util.Date"%>
+<%@page import="java.text.SimpleDateFormat"%>
<%@include file="/common/includeExtJsAndCss.jsp"%>
-
+<%
+ SimpleDateFormat dateFormat =new SimpleDateFormat("yyyy-MM-dd");
+ request.setAttribute("newDate", dateFormat.format(new Date()));
+ %>
@@ -16,15 +21,15 @@
<%-- 年份时间控件 --%>
-
+
<%-- 月份时间控件 --%>
<%--多选下拉框--%>
-
-
供应室护理质量指标统计表
Index: ssts-web/src/main/webapp/disinfectsystem/reportforms/supplyRoomQualityQuota.js
===================================================================
diff -u -r30854 -r33613
--- ssts-web/src/main/webapp/disinfectsystem/reportforms/supplyRoomQualityQuota.js (.../supplyRoomQualityQuota.js) (revision 30854)
+++ ssts-web/src/main/webapp/disinfectsystem/reportforms/supplyRoomQualityQuota.js (.../supplyRoomQualityQuota.js) (revision 33613)
@@ -32,11 +32,24 @@
showResult('请正确填写表单各值');
return false;
}
-
- var queryYear = $Id('yearSearch').value;
- var queryMonth = $Id('monthSearch').value;
+ var timeType = Ext.getCmp('timeType').getRawValue();
+ var yearStr = '';
+ var queryScope = '月';
+ var monthStr = '';
+ if ('年份' == timeType) {
+ yearStr = $Id('year').value;
+ queryScope = '月';
+ } else {
+ var monthSearch = $Id('month').value;
+ var arr = new Array();
+ arr = monthSearch.split('-');
+ if (arr.length > 1) {
+ yearStr = arr[0];
+ monthStr = arr[1];
+ }
+ queryScope = '天';
+ }
var departCoding = Ext.getCmp('querySupplyRoom').getValue();
- var queryScope = Ext.getCmp('queryScope').getValue(); //查询范围
myMask = new Ext.LoadMask(Ext.getBody(), {
msg: '正在加载,请稍候!',
removeMask: true
@@ -47,9 +60,9 @@
var params = {
jasperreportName : 'supplyRoomQualityQuota.jasper',
departCoding : departCoding,
- queryYear : queryYear,
- queryMonth : queryMonth,
- queryScope : queryScope,
+ queryYear : yearStr,
+ queryMonth : monthStr,
+ queryScope:queryScope,
reportName:'supplyRoomQualityQuota'
}
@@ -60,6 +73,10 @@
Ext.onReady(function() {
Ext.QuickTips.init();
// 记录cookie(3步)
+ var timeTypeStore = new Ext.data.SimpleStore({
+ fields: ['value'],
+ data: [['年份'], ['年月']]
+ });
form = new Ext.form.FormPanel({
title : entityName,
@@ -79,42 +96,73 @@
height : 40,
labelWidth : 70,
items : [{
- width : 150,
- layout : 'form',
- labelWidth : 60,
- items : [
- new Ext.form.DateField({
- id:'yearSearch',
- name : 'yearSearch',
- fieldLabel : '年分',
- readOnly : true,
- allowBlank : false,
- format:'Y',
- value : new Date(),
- anchor : '95%'
- })
- ]
+ columnWidth: .2,
+ layout: 'form',
+ items: [{
+ xtype: 'combo',
+ fieldLabel: "日期类型",
+ valueField: 'value',
+ displayField: 'value',
+ store: timeTypeStore,
+ triggerAction: 'all',
+ editable: false,
+ mode: 'local',
+ forceSelection: false,
+ name: "timeType",
+ id: "timeType",
+ anchor: '95%',
+ value: '年份',
+ listeners: {
+ select: function () {
+ if ('年份' == this.value) {
+ Ext.getCmp('yearSearch_id').show();
+ Ext.getCmp('monthSearch_id').hide();
+ } else {
+ Ext.getCmp('yearSearch_id').hide();
+ Ext.getCmp('monthSearch_id').show();
+ }
+ }
+ }
+ }]
+ }, {
+ columnWidth: .2,
+ layout: 'form',
+ id: 'yearSearch_id',
+ items: [
+ new Ext.ux.MonthField({
+ id: 'year',
+ name: 'year',
+ fieldLabel: '年份',
+ readOnly: true,
+ anchor: '95%',
+ format: 'Y',
+ value: newDate
+ })]
+ }, {
+ columnWidth: .2,
+ layout: 'form',
+ id: 'monthSearch_id',
+ hidden: false,
+ items: [
+ new Ext.ux.MonthField({
+ id: 'month',
+ name: 'month',
+ fieldLabel: '年月',
+ readOnly: true,
+ anchor: '95%',
+ format: 'Y-m',
+ value: newDate,
+ listeners: {
+ render: function () {
+ setTimeout(function () {
+ Ext.getCmp('monthSearch_id').hide();
+ }, 100);
+ }
+ }
+ })]
},{
- width : 160,
- layout : 'form',
- labelWidth : 60,
- items : [
- new Ext.form.DateField({
- id:'monthSearch',
- name : 'monthSearch',
- fieldLabel : '月份',
- readOnly : true,
- allowBlank : false,
- format:'Y-m',
- value : new Date(),
- disabled: true,
- anchor : '95%'
- })
- ]
- },{
- width : 240,
- layout : 'form',
- labelWidth : 80,
+ columnWidth: .2,
+ layout: 'form',
labelSeparator : '选择供应室:',
items : [{
xtype : 'combo',
@@ -130,41 +178,6 @@
triggerAction : 'all',
anchor : '95%'
}]
- },{
- width : 150,
- layout : 'form',
- labelWidth : 70,
- items : [{
- xtype : 'combo',
- fieldLabel : '统计范围',
- id : 'queryScope',
- name : 'queryScope',
- valueField : 'value',
- displayField : 'value',
- mode : 'local',
- triggerAction : 'all',
- value: '月',
- store : new Ext.data.SimpleStore({
- data:[['月'],['天']],
- fields:['value']
- }),
- forceSelection : false,
- allowBlank : false,
- editable:false,
- anchor : '95%',
- listeners: {
- select : function(combo, record, index) {
- var value = record.get('value');
- if (value == '月') {
- Ext.getCmp('yearSearch').enable();
- Ext.getCmp('monthSearch').disable();
- } else {
- Ext.getCmp('yearSearch').disable();
- Ext.getCmp('monthSearch').enable();
- }
- }
- }
- }]
}]
}],
buttons:[{
@@ -182,17 +195,7 @@
iconCls : 'icon_set',
handler : function() {
$Id('querySupplyRoom').value = "";
- $Id('yearSearch').value = "";
- $Id('monthSearch').value = "";
}
- },{
- xtype : 'button',
- text : '设置不合格数来源',
- minWidth : 70,
- iconCls : 'icon_set',
- handler : function() {
- setUnqualifiedSource();
- }
}]
});