Index: ssts-web/src/main/webapp/disinfectsystem/reportforms/js/setUnqualifiedSourceForm.js =================================================================== diff -u -r33613 -r33776 --- ssts-web/src/main/webapp/disinfectsystem/reportforms/js/setUnqualifiedSourceForm.js (.../setUnqualifiedSourceForm.js) (revision 33613) +++ ssts-web/src/main/webapp/disinfectsystem/reportforms/js/setUnqualifiedSourceForm.js (.../setUnqualifiedSourceForm.js) (revision 33776) @@ -80,12 +80,21 @@ Ext.onReady(function () { Ext.QuickTips.init(); var sterilePercentOfPassMultiSelectCombo = buildMultiSelectCombo({ fieldLabel: '复用性物品', id: 'sterilePercentOfPass', name: 'sterilePercentOfPass' }); + var disposablegoodsPPMultiSelectCombo = buildMultiSelectCombo({ fieldLabel: '消毒物品', id: 'disposablegoodsPP', name: 'disposablegoodsPP' }); 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 recyclingTousseErrorPPMultiSelectCombo = buildMultiSelectCombo({ fieldLabel: '回收器械丢失', id: 'recyclingTousseErrorPP', name: 'recyclingTousseErrorPP' }); + var missingInToussePPMultiSelectCombo = buildMultiSelectCombo({ fieldLabel: '包内器械缺失', id: 'missingInToussePP', name: 'missingInToussePP' }); + var insufficiencyInToussePPMultiSelectCombo = buildMultiSelectCombo({ fieldLabel: '包内器械功能不全', id: 'insufficiencyInToussePP', name: 'insufficiencyInToussePP' }); + var typeErrorInToussePPMultiSelectCombo = buildMultiSelectCombo({ fieldLabel: '包内器械种类错误', id: 'typeErrorInToussePP', name: 'typeErrorInToussePP' }); + var chemicaCardInToussePPMultiSelectCombo = buildMultiSelectCombo({ fieldLabel: '包内化学指示卡不合格', id: 'chemicaCardInToussePP', name: 'chemicaCardInToussePP' }); + var itemIDIsIncorrectPPMultiSelectCombo = buildMultiSelectCombo({ fieldLabel: '物品标示不正确', id: 'itemIDIsIncorrectPP', name: 'itemIDIsIncorrectPP' }); + var sterilizationFailurePPMultiSelectCombo = buildMultiSelectCombo({ fieldLabel: '灭菌失败', id: 'sterilizationFailurePP', name: 'sterilizationFailurePP' }); + var itemInvoiceErrorPPMultiSelectCombo = buildMultiSelectCombo({ fieldLabel: '物品发放错误', id: 'itemInvoiceErrorPP', name: 'itemInvoiceErrorPP' }); var height = Ext.getBody().dom.clientHeight; - var top = (height - 200) / 2; + var top = (height - 560) / 2; document.getElementById('main').style.paddingTop = top + 'px'; var formObj = new Ext.FormPanel({ labelAlign: 'left', @@ -104,6 +113,10 @@ }, { columnWidth: 1, layout: 'form', + items: [disposablegoodsPPMultiSelectCombo] + }, { + columnWidth: 1, + layout: 'form', items: [washPercentOfPassMultiSelectCombo] }, { columnWidth: 1, @@ -117,6 +130,38 @@ columnWidth: 1, layout: 'form', items: [onlyPackingPercentOfWetPacketsMultiSelectCombo] + }, { + columnWidth: 1, + layout: 'form', + items: [recyclingTousseErrorPPMultiSelectCombo] + }, { + columnWidth: 1, + layout: 'form', + items: [missingInToussePPMultiSelectCombo] + }, { + columnWidth: 1, + layout: 'form', + items: [insufficiencyInToussePPMultiSelectCombo] + }, { + columnWidth: 1, + layout: 'form', + items: [typeErrorInToussePPMultiSelectCombo] + }, { + columnWidth: 1, + layout: 'form', + items: [chemicaCardInToussePPMultiSelectCombo] + }, { + columnWidth: 1, + layout: 'form', + items: [itemIDIsIncorrectPPMultiSelectCombo] + }, { + columnWidth: 1, + layout: 'form', + items: [sterilizationFailurePPMultiSelectCombo] + }, { + columnWidth: 1, + layout: 'form', + items: [itemInvoiceErrorPPMultiSelectCombo] }] }], buttons: [{ @@ -152,10 +197,19 @@ if (action.result && action.result.data) { var data = action.result.data; setMultiSelectCombo('sterilePercentOfPass', data.sterilePercentOfPass); + setMultiSelectCombo('disposablegoodsPP', data.disposablegoodsPP); setMultiSelectCombo('washPercentOfPass', data.washPercentOfPass); setMultiSelectCombo('packingPercentOfPass', data.packingPercentOfPass); setMultiSelectCombo('percentOfWetPackets', data.percentOfWetPackets); setMultiSelectCombo('onlyPackingPercentOfWetPackets', data.onlyPackingPercentOfWetPackets); + setMultiSelectCombo('recyclingTousseErrorPP', data.recyclingTousseErrorPP); + setMultiSelectCombo('missingInToussePP', data.missingInToussePP); + setMultiSelectCombo('insufficiencyInToussePP', data.insufficiencyInToussePP); + setMultiSelectCombo('typeErrorInToussePP', data.typeErrorInToussePP); + setMultiSelectCombo('chemicaCardInToussePP', data.chemicaCardInToussePP); + setMultiSelectCombo('itemIDIsIncorrectPP', data.itemIDIsIncorrectPP); + setMultiSelectCombo('sterilizationFailurePP', data.sterilizationFailurePP); + setMultiSelectCombo('itemInvoiceErrorPP', data.itemInvoiceErrorPP); } }, failure: function (form, action) { Index: ssts-web/src/main/webapp/disinfectsystem/reportforms/supplyRoomQualityQuota.jsp =================================================================== diff -u -r33613 -r33776 --- ssts-web/src/main/webapp/disinfectsystem/reportforms/supplyRoomQualityQuota.jsp (.../supplyRoomQualityQuota.jsp) (revision 33613) +++ ssts-web/src/main/webapp/disinfectsystem/reportforms/supplyRoomQualityQuota.jsp (.../supplyRoomQualityQuota.jsp) (revision 33776) @@ -24,14 +24,11 @@ -<%-- 月份时间控件 --%> - - <%--多选下拉框--%> - + 供应室护理质量指标统计表 Index: ssts-web/src/main/webapp/disinfectsystem/config/gzsdbrmyy/config.js =================================================================== diff -u -r27538 -r33776 --- ssts-web/src/main/webapp/disinfectsystem/config/gzsdbrmyy/config.js (.../config.js) (revision 27538) +++ ssts-web/src/main/webapp/disinfectsystem/config/gzsdbrmyy/config.js (.../config.js) (revision 33776) @@ -100,5 +100,29 @@ //是否允许回收数量减小的部分超过待装配数量 allowDecreaseRecyclingAmountGreatUnPackingAmount : true, //禁用基数限制 - disableCardinalNumLimit:true + disableCardinalNumLimit:true, + nursingQualityIndexReportConfiguration: { + "defaultQureyDateType" : "日期范围", + "beginDateOfMonth" : 26, + "reportName" : "供应室消毒灭菌工作质量指标项目上报表", + "dataIndexsArray" : [ + { "dataIndexNameForDisplay": "器械清洗不合格件数", "dataIndexSource": "器械清洗不合格件数" }, + { "dataIndexNameForDisplay": "消毒物品不合格件数", "dataIndexSource": "消毒物品不合格件数" }, + { "dataIndexNameForDisplay": "回收器械丢失发生件数", "dataIndexSource": "回收器械丢失件数" }, + { "dataIndexNameForDisplay": "无菌包内器械缺失发生件数", "dataIndexSource": "包内器械缺失件数" }, + { "dataIndexNameForDisplay": "无菌包内器械功能不全发生件数", "dataIndexSource": "包内器械功能不全件数" }, + { "dataIndexNameForDisplay": "无菌包内器械种类错误发生件数", "dataIndexSource": "包内器械种类错误件数" }, + { "dataIndexNameForDisplay": "包内化学指示卡不合格报告数", "dataIndexSource": "包内化学指示卡不合格的包数" }, + { "dataIndexNameForDisplay": "无菌物品包装密闭不合格(包)", "dataIndexSource": "复用性物品包装不合格件数" }, + { "dataIndexNameForDisplay": "无菌包标识不正确发生件数", "dataIndexSource": "包标识不正确件数" }, + { "dataIndexNameForDisplay": "灭菌失败事件发生数", "dataIndexSource": "灭菌失败次数" }, + { "dataIndexNameForDisplay": "无菌物品发放错误发生数", "dataIndexSource": "物品发放错误次数" }, + { "dataIndexNameForDisplay": "器械清洗总件数", "dataIndexSource": "器械清洗总件数" }, + { "dataIndexNameForDisplay": "消毒物品总件数", "dataIndexSource": "消毒物品清洗总件数" }, + { "dataIndexNameForDisplay": "外来手术器械总件数", "dataIndexSource": "处理外来手术器械总件数" }, + { "dataIndexNameForDisplay": "处理敷料总件数", "dataIndexSource": "处理敷料总件数" }, + { "dataIndexNameForDisplay": "灭菌包总数", "dataIndexSource": "复用性灭菌物品总件数" }, + { "dataIndexNameForDisplay": "灭菌器使用炉次(按灭菌炉分组)", "dataIndexSource": "灭菌器使用炉次(按灭菌炉分组)" } + ] + } } \ No newline at end of file Index: ssts-web/src/main/webapp/disinfectsystem/reportforms/supplyRoomQualityQuota.js =================================================================== diff -u -r33625 -r33776 --- ssts-web/src/main/webapp/disinfectsystem/reportforms/supplyRoomQualityQuota.js (.../supplyRoomQualityQuota.js) (revision 33625) +++ ssts-web/src/main/webapp/disinfectsystem/reportforms/supplyRoomQualityQuota.js (.../supplyRoomQualityQuota.js) (revision 33776) @@ -33,51 +33,114 @@ return false; } var timeType = Ext.getCmp('timeType').getRawValue(); + var departCoding = Ext.getCmp('querySupplyRoom').getValue(); var yearStr = ''; - var queryScope = '月'; var monthStr = ''; - if ('年份' == timeType) { + var params = { + jasperreportName : 'supplyRoomQualityQuota.jasper', + departCoding : departCoding, + reportName:'supplyRoomQualityQuota' + } + if (timeType == '日期范围') { + var startTime = $Id('startDate').value; + var endTime = $Id('endDate').value; + params.startTime = startTime; + params.endTime = endTime; + params.queryScope = '日期范围'; + }else if(timeType == '年份'){ yearStr = $Id('year').value; monthStr = $Id('month').value; - queryScope = '月'; + params.queryYear = yearStr; + params.queryMonth = monthStr; + params.queryScope = '月'; } else { var monthStr = $Id('month').value; var arr = new Array(); arr = monthStr.split('-'); if (arr.length > 1) { yearStr = arr[0]; } - queryScope = '天'; + params.queryYear = yearStr; + params.queryMonth = monthStr; + params.queryScope = '天'; } - var departCoding = Ext.getCmp('querySupplyRoom').getValue(); myMask = new Ext.LoadMask(Ext.getBody(), { msg: '正在加载,请稍候!', removeMask: true }); myMask.show(); var url = WWWROOT + '/jasperreports/jasperreportsAction!createReportFromJavaBeanSource.do'; - var params = { - jasperreportName : 'supplyRoomQualityQuota.jasper', - departCoding : departCoding, - queryYear : yearStr, - queryMonth : monthStr, - queryScope:queryScope, - reportName:'supplyRoomQualityQuota' - } searchReport(url,params); } +function getMonthOrDate(date){ + var newDate = parseInt(date)>9?date:'0'+date; + return newDate; +} +function getStartOrEndDate(type,beginDateOfMonth){ + var newYear = newDate.split('-')[0]; + var newMonth = newDate.split('-')[1]; + var dayCount = new Date(newYear, parseInt(newMonth)-1, 0).getDate(); + var startDate; + var endDate; + if(parseInt(newMonth) == 1){ + startDate = (parseInt(newYear)-1) + '-12'; + }else { + startDate = newYear + '-' + getMonthOrDate(parseInt(newMonth)-1); + } + if(parseInt(beginDateOfMonth) > dayCount){ + startDate += '-' + getMonthOrDate(dayCount); + }else { + startDate += '-' + getMonthOrDate(beginDateOfMonth); + } + if(type == 'startDate'){ + return startDate; + }else { + if(parseInt(beginDateOfMonth) > 1){ + var dayCount = new Date(newYear, newMonth, 0).getDate(); + if(parseInt(beginDateOfMonth) > dayCount){ + endDate = newYear + '-' + newMonth + '-' + getMonthOrDate(dayCount); + }else { + endDate = newYear + '-' + newMonth + '-' + getMonthOrDate(parseInt(beginDateOfMonth)-1); + } + }else { + if(parseInt(newMonth) > 1){ + var dayCount = new Date(newYear, parseInt(newMonth)-1, 0).getDate(); + endDate = newYear + '-' + getMonthOrDate(parseInt(newMonth)-1) + '-' + getMonthOrDate(dayCount); + }else { + var dayCount = new Date(parseInt(newYear)-1, parseInt(newMonth)-1, 0).getDate(); + endDate = (parseInt(newYear)-1) + '-' + '12' + '-' + getMonthOrDate(dayCount); + } + } + return endDate; + } +} + Ext.onReady(function() { Ext.QuickTips.init(); // 记录cookie(3步) var timeTypeStore = new Ext.data.SimpleStore({ fields: ['value'], - data: [['年份'], ['年月']] + data: [['年份'], ['月份'], ['日期范围']] }); + var startDate; + var endDate; + var defaultQureyDateType = '年份'; + if(sstsConfig.nursingQualityIndexReportConfiguration){ + var beginDateOfMonth = sstsConfig.nursingQualityIndexReportConfiguration.beginDateOfMonth || '01'; + defaultQureyDateType = sstsConfig.nursingQualityIndexReportConfiguration.defaultQureyDateType || '年份'; + entityName = sstsConfig.nursingQualityIndexReportConfiguration.reportName || '供应室护理质量指标统计表'; + startDate = getStartOrEndDate('startDate',beginDateOfMonth); + endDate = getStartOrEndDate('endDate',beginDateOfMonth); + }else { + startDate = getStartOrEndDate('startDate',1); + endDate = getStartOrEndDate('endDate',1); + } + form = new Ext.form.FormPanel({ title : entityName, region : 'north', @@ -111,15 +174,44 @@ name: "timeType", id: "timeType", anchor: '95%', - value: '年份', + value: defaultQureyDateType, listeners: { + render: function () { + setTimeout(function () { + if (defaultQureyDateType == '日期范围') { + Ext.getCmp('yearSearch_id').hide(); + Ext.getCmp('monthSearch_id').hide(); + Ext.getCmp('startDate_id').show(); + Ext.getCmp('endDate_id').show(); + } else if(defaultQureyDateType == '月份'){ + Ext.getCmp('yearSearch_id').hide(); + Ext.getCmp('monthSearch_id').show(); + Ext.getCmp('startDate_id').hide(); + Ext.getCmp('endDate_id').hide(); + } else { + Ext.getCmp('yearSearch_id').show(); + Ext.getCmp('monthSearch_id').hide(); + Ext.getCmp('startDate_id').hide(); + Ext.getCmp('endDate_id').hide(); + } + }, 200); + }, select: function () { if ('年份' == this.value) { Ext.getCmp('yearSearch_id').show(); Ext.getCmp('monthSearch_id').hide(); - } else { + Ext.getCmp('startDate_id').hide(); + Ext.getCmp('endDate_id').hide(); + } else if('月份' == this.value){ Ext.getCmp('yearSearch_id').hide(); Ext.getCmp('monthSearch_id').show(); + Ext.getCmp('startDate_id').hide(); + Ext.getCmp('endDate_id').hide(); + } else { + Ext.getCmp('yearSearch_id').hide(); + Ext.getCmp('monthSearch_id').hide(); + Ext.getCmp('startDate_id').show(); + Ext.getCmp('endDate_id').show(); } } } @@ -137,7 +229,8 @@ anchor: '95%', format: 'Y', value: newDate - })] + }) + ] }, { columnWidth: .2, layout: 'form', @@ -147,7 +240,7 @@ new Ext.ux.MonthField({ id: 'month', name: 'month', - fieldLabel: '年月', + fieldLabel: '月份', readOnly: true, anchor: '95%', format: 'Y-m', @@ -159,7 +252,58 @@ }, 100); } } - })] + }) + ] + }, { + columnWidth: .2, + layout: 'form', + id: 'startDate_id', + hidden: false, + items: [{ + xtype: 'datefield', + fieldLabel: '开始日期', + labelAlign: 'right', + id: 'startDate', + name: 'startDate', + editable: false, + format: 'Y-m-d', + 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', + allowBlank: false, + anchor: '95%', + value:startDate, + listeners: { + render: function () { + setTimeout(function () { + Ext.getCmp('startDate_id').hide(); + }, 100); + } + } + }] + }, { + columnWidth: .2, + layout: 'form', + id: 'endDate_id', + hidden: false, + items: [{ + xtype: 'datefield', + fieldLabel: '结束时间', + labelAlign: 'right', + id: 'endDate', + name: 'endDate', + editable: false, + format: 'Y-m-d', + 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', + allowBlank: false, + anchor: '95%', + value:endDate, + listeners: { + render: function () { + setTimeout(function () { + Ext.getCmp('endDate_id').hide(); + }, 100); + } + } + }] },{ columnWidth: .2, layout: 'form',