Index: ssts-web/src/main/webapp/disinfectsystem/basedatamanager/qualityControlIndicator/qualityControlIndicatorView.jsp =================================================================== diff -u --- ssts-web/src/main/webapp/disinfectsystem/basedatamanager/qualityControlIndicator/qualityControlIndicatorView.jsp (revision 0) +++ ssts-web/src/main/webapp/disinfectsystem/basedatamanager/qualityControlIndicator/qualityControlIndicatorView.jsp (revision 40968) @@ -0,0 +1,26 @@ +<%@ page contentType="text/html; charset=UTF-8"%> +<%@ include file="/common/taglibs.jsp"%> +<%@page import="com.forgon.systemsetting.model.HttpOption"%> +<%@page import="com.forgon.disinfectsystem.common.CssdUtils"%> + + + +<%@ include file="/common/includeExtJsAndCss.jsp"%> +<%@ include file="/common/includeExtJs4_2.jsp"%> + +质控指标 + + + + + + + + + \ No newline at end of file Index: ssts-web/src/main/webapp/disinfectsystem/reportforms/qualityControlReportView.js =================================================================== diff -u --- ssts-web/src/main/webapp/disinfectsystem/reportforms/qualityControlReportView.js (revision 0) +++ ssts-web/src/main/webapp/disinfectsystem/reportforms/qualityControlReportView.js (revision 40968) @@ -0,0 +1,348 @@ +//护理质量质控指标报表 +var entityName = "护理质量质控指标报表"; +var grid; +var myMask; +var widthArr = []; + +function getTableHtml(result) { + var length = result.data.length > 1 ? 2 : result.data.length; + var html = "

" + result.parametMap.title + "

"; + html += "
" + for (var k = 0; k < length; k++) { + html += ""; + html += ""; + html += ''; + for (var i = 0; i < result.parametMap.titleColumnArr.length; i++) { + var width = 100; + var colspan = 1; + if (result.parametMap.titleColumnArr[i] == '质控项目') { + width = 300; + colspan = 2; + } + html += getHeadTd(result.parametMap.titleColumnArr[i], width, 1, colspan); + widthArr.push(width); + } + html += ''; + html += ""; + html += ""; + html += getTableBodyHtml(result, k); + html += ""; + html += "
"; + } + html += "
"; + return html; +} + +function getTableBodyHtml(result, index) { + var data = result.data; + var html = ''; + for (var i = index; i < data.length; i += 2) { + var qualityControlSecondVoList = data[i].qualityControlSecondVoList || []; + for (var j = 0; j < qualityControlSecondVoList.length; j++) { + html += ''; + if (j == 0) { + html += getBodyTd(data[i].qtName, qualityControlSecondVoList.length); + } + html += getBodyTd(qualityControlSecondVoList[j].QName, '', ''); + html += getBodyTd(qualityControlSecondVoList[j].sumQuantity, '', ''); + if (j == 0) { + html += getBodyTd(data[i].totalAmount, qualityControlSecondVoList.length); + html += getBodyTd(data[i].targetValue, qualityControlSecondVoList.length); + } + html += ''; + } + + } + return html; +} + +//获取表头的td +function getHeadTd(name, width, rowspan, colspan) { + rowspan = rowspan || ''; + colspan = colspan || ''; + var html = '' + name + ''; + return html; +} + +//获取表格的td +function getBodyTd(value, rowspan, colspan, height) { + rowspan = rowspan || ''; + colspan = colspan || ''; + var html = '' + value + ''; + return html; +} + +Ext.onReady(function () { + Ext.QuickTips.init(); + var queryTypeStore = new Ext.data.SimpleStore({ + fields: ['value'], + data: [['按年份'], ['按季度']] + }); + + var defaultQueryDateType = '按年份'; + + var typeRecord = Ext.data.Record.create([ + { name: 'id', type: 'string' }, + { name: 'name', type: 'string' } + ]); + + //质检指标 + var qualityControlIndicatorTypeStore = new Ext.data.Store({ + proxy: new Ext.data.HttpProxy({ + url: WWWROOT + '/disinfectSystem/baseData/qualityControlIndicatorTypeController/loadQualityControlIndicatorTypeList.mhtml', + method: 'POST' + }), + reader: new Ext.data.JsonReader({ + root: 'data.list', + totalProperty: 'data.count' + }, [ + { name: 'id' }, + { name: 'name' } + ]), + listeners: { + load: function (thiz, records, options) { + if (qualityControlIndicatorTypeStore.getCount() > 1) { + qualityControlIndicatorTypeStore.insert(0, new typeRecord({ 'id': '-1', 'name': ALL })); + } + } + } + }); + + function reloadReport() { + var queryType = Ext.getCmp('queryType').getRawValue(); + var year = Ext.getCmp('year').getRawValue(); + var qualityControlItemParameterNames = Ext.getCmp('qualityControlItemParameterNames').getValue(); + if (qualityControlItemParameterNames.indexOf(ALL) == 0) { + qualityControlItemParameterNames = ""; + } + var quarter = ''; + if (queryType == '按季度') { + quarter = Ext.getCmp('quarter').getRawValue(); + } + myMask = new Ext.LoadMask(Ext.getBody(), { + msg: '正在加载,请稍候!', + removeMask: true + }); + myMask.show(); + + var url = WWWROOT + "/jasperreports/jasperreportsAction!queryDataSourceList.do"; + var params = { + queryType: queryType, + year: year, + quarter: quarter, + qualityControlItemParameterNames: qualityControlItemParameterNames, + reportName: 'qualityControlReport' + } + + Ext.Ajax.request({ + url: url, + async: false, + params: params, + timeout: 300 * 1000, + success: function (response) { + var result = Ext.decode(response.responseText); + result.parametMap.titleColumnArr = ['质控项目', '例数', '总计', '目标值']//['质控项目', '例数', '总计', '目标值'] + var tableHtml = getTableHtml(result); + document.getElementById('thisIframe').contentWindow.document.getElementById('table').innerHTML = tableHtml; + document.getElementById('thisIframe').contentWindow.document.getElementById('is2Column').value = true; + document.getElementById('thisIframe').contentWindow.document.getElementById('widthStr').value = widthArr.join(','); + myMask.hide(); + }, + failure: function (response, options) { + showResult(response.responseText); + } + }); + } + + var form = new Ext.form.FormPanel({ + title: entityName, + region: 'north', + labelAlign: 'right', + buttonAlign: 'center', + collapsible: true, + collapseMode: 'mini', + split: true, + border: 0, + frame: true, + bodyStyle: 'padding:0px auto;margin:0px',// padding:1px;padding-top:5px; + height: 110, + labelWidth: 90, + items: [{ + layout: 'column', + height: 40, + items: [{ + columnWidth: .2, + layout: 'form', + items: [{ + xtype: 'combo', + fieldLabel: "查询方式", + valueField: 'value', + displayField: 'value', + store: queryTypeStore, + triggerAction: 'all', + editable: false, + mode: 'local', + forceSelection: false, + name: "queryType", + id: "queryType", + anchor: '95%', + value: defaultQueryDateType, + listeners: { + select: function () { + if ('按年份' == this.value) { + Ext.getCmp('yearSearch_id').show(); + Ext.getCmp('quarterSearch_id').hide(); + } else if ('按季度' == this.value) { + Ext.getCmp('yearSearch_id').show(); + Ext.getCmp('quarterSearch_id').show(); + } + } + } + }] + }, { + columnWidth: .2, + layout: 'form', + id: 'yearSearch_id', + labelWidth: 40, + items: [ + new Ext.ux.MonthField({ + id: 'year', + name: 'year', + fieldLabel: '年份', + readOnly: true, + anchor: '95%', + format: 'Y', + value: newDate + }) + ] + }, { + columnWidth: .2, + layout: 'form', + id: 'quarterSearch_id', + labelWidth: 40, + items: [{ + xtype: 'combo', + fieldLabel: "季度", + name: "quarter", + id: "quarter", + valueField: 'value', + displayField: 'value', + allowBlank: true, + editable: false, + store: new Ext.data.SimpleStore({ + fields: ['value'], + data: [['第1季度'], ['第2季度'], ['第3季度'], ['第4季度']] + }), + value: '第1季度', + mode: 'local', + triggerAction: 'all', + anchor: '95%' + }] + }, { + columnWidth: .2, + layout: 'form', + items: [{ + xtype: 'multiSelect', + fieldLabel: '质检指标', + id: 'qualityControlItemParameterNames', + name: 'qualityControlItemParameterNames', + minChars: 0, + valueField: 'name', + displayField: 'name', + matchFieldWidth: false, + store: qualityControlIndicatorTypeStore, + forceSelection: false, + lazyInit: true, + triggerAction: 'all', + hideTrigger: false, + separator: ';', + typeAhead: false, + editable: false, + allowBlank: true, + anchor: '95%', + listeners: { + select: function (combo, record, index) { + //1、如果选中“全部”的项,则把所有的项选中,反之全部取消选择 + if (record.get('name') == ALL) { + if (record.get('checked')) { + combo.selectAll(); + } else { + combo.deselectAll(); + } + } + + //2、如果已经选中所有的项,则把“全部”项选中,反之把“全部”项取消选择 + var selectAll = true; + combo.store.each(function (record) { + if (record.get('name') != ALL && !record.get(this.checkField)) { + selectAll = false; + return; + } + }, combo); + + var all = combo.store.getAt(0); + if (selectAll) { + all.set(combo.checkField, true); + } else { + all.set(combo.checkField, false); + } + combo.setValue(combo.getCheckedValue()); + } + } + }] + }] + }], + buttons: [{ + xtype: 'button', + text: '查询', + minWidth: 70, + iconCls: 'icon_search', + handler: function () { + reloadReport(); + } + }, { + xtype: 'button', + text: '重置', + minWidth: 70, + iconCls: 'icon_set', + handler: function () { + $Id('queryType').value = '按年份'; + Ext.getCmp('year').setValue(new Date(newDate)) + Ext.getCmp('quarterSearch_id').hide(); + $Id('qualityControlItemParameterNames').value = ''; + } + }] + }); + + + var reportForm = new Ext.Panel({ + frame: false,//渲染面板 + autoScroll: true,//自动显示滚动条 + collapsible: true,//允许展开和收缩 + bodyPadding: 5, + tbar: [{ + text: '打印', + handler: function () { + var html = document.getElementById('thisIframe').contentWindow.document.getElementById('table').innerHTML; + if (html !== '') { + document.getElementById('thisIframe').contentWindow.document.getElementById('printWindow').click(); + } + } + }], + html: '' + }); + + + var viewport = new Ext.Viewport({ + layout: 'border', + items: [form, { + id: 'reportPanel', + region: 'center', + margins: '0 0 0 0', + layout: 'fit', + items: reportForm + }] + }); + + Ext.getCmp('quarterSearch_id').hide(); +}); \ No newline at end of file Index: ssts-web/src/main/webapp/disinfectsystem/basedatamanager/qualityControlIndicator/qualityControlIndicatorView.js =================================================================== diff -u --- ssts-web/src/main/webapp/disinfectsystem/basedatamanager/qualityControlIndicator/qualityControlIndicatorView.js (revision 0) +++ ssts-web/src/main/webapp/disinfectsystem/basedatamanager/qualityControlIndicator/qualityControlIndicatorView.js (revision 40968) @@ -0,0 +1,108 @@ +var listStore; +var listGrid; +var title = ''; +var listUrl = ''; + +Ext4.onReady(function () { + Ext4.QuickTips.init(); + if (optionListId == 'type') { + title = '质控指标'; + listUrl = WWWROOT + '/disinfectSystem/baseData/qualityControlIndicatorTypeController/loadQualityControlIndicatorTypeList.mhtml' + } else if (optionListId == 'parameter') { + title = '质控项目参数'; + listUrl = WWWROOT + '/disinfectSystem/baseData/qualityControlItemParameterController/loadQualityControlItemParameterList.mhtml' + } + var columns = [ + { header: "id", dataIndex: 'id', hidden: true }, + { header: "名称", dataIndex: 'name', width: 150 }, + { header: '目标值', dataIndex: 'targetValue', width: 150, hidden: optionListId !== 'type' }, + { header: '所属质检指标类', dataIndex: 'qualityControlIndicatorType.name', width: 150, hidden: optionListId !== 'parameter' }, + { + header: "排序", dataIndex: 'serialNumber', width: 100, renderer: function (v, p, record) { + var str = "" + + ""; + return str; + } + } + ]; + var tbar = [{ + text: '添加', + iconCls: 'btn_ext_application_add', + handler: function () { + showAddOrEditWindow(''); + } + }, '-', { + text: '修改', + iconCls: 'btn_ext_application_edit', + handler: function () { + var selectedRecords = listGrid.getSelectionModel().getSelection(); + var selectedCount = listGrid.getSelectionModel().getCount(); + if (selectedCount < 1) { + showResult("请选择要修改的数据"); + } else if (selectedCount > 1) { + showResult("只能修改一条数据"); + } else { + var id = selectedRecords[0].data['id']; + var name = selectedRecords[0].data['name']; + var targetValue = selectedRecords[0].data['targetValue']; + showAddOrEditWindow(id, name, targetValue); + } + } + }, '-', { + text: '删除', + iconCls: 'btn_ext_application_del', + handler: function () { + deleteConfig(listGrid); + } + }]; + + listStore = new Ext4.data.JsonStore({ + proxy: { + type: 'ajax', + url: listUrl, + reader: { + root: 'data.list', + totalProperty: 'data.count' + }, + extraParams: {} + }, + fields: [ + { name: 'id' }, + { name: 'name' }, + { name: 'qualityControlIndicatorType.name' }, + { name: 'qualityControlIndicatorType' }, + { name: 'targetValue' } + ] + }); + + listStore.loadPage(1); + + listGrid = new Ext4.grid.GridPanel({ + title: title + '设置', + columns: columns, + frame: false, + autoScroll: false, + store: listStore, + tbar: tbar, + dockedItems: [{ + xtype: 'pagingtoolbar', + store: listStore, // same store GridPanel is using + dock: 'bottom', + displayInfo: true + }], + viewConfig: { + autoFill: true + }, + selModel: new Ext4.selection.CheckboxModel() + }); + + new Ext4.container.Viewport({ + layout: 'border', + items: [{ + region: 'center', + layout: 'fit', + items: [listGrid] + }] + }); + +}); \ No newline at end of file Index: ssts-web/src/main/webapp/disinfectsystem/basedatamanager/qualityControlIndicator/qualityControlIndicatorForm.js =================================================================== diff -u --- ssts-web/src/main/webapp/disinfectsystem/basedatamanager/qualityControlIndicator/qualityControlIndicatorForm.js (revision 0) +++ ssts-web/src/main/webapp/disinfectsystem/basedatamanager/qualityControlIndicator/qualityControlIndicatorForm.js (revision 40968) @@ -0,0 +1,283 @@ +var configWin; +var formPanel; + +function cancel() { + configWin.close(); +} + +//排序 +function moveMaterial(orderType) { + var url = ''; + if (optionListId == 'type') { + url = WWWROOT + '/disinfectSystem/baseData/qualityControlIndicatorTypeController/sortQualityControlIndicatorType.mhtml'; + } else if (optionListId == 'parameter') { + url = WWWROOT + '/disinfectSystem/baseData/qualityControlItemParameterController/sortQualityControlItemParameter.mhtml' + } + setTimeout(function () { + var selectedRecords = listGrid.getSelectionModel().getSelection(); + var id = selectedRecords[0].data.id; + Ext4.Ajax.request({ + url: url, + params: { id: id, orderType: orderType }, + success: function (response, options) { + var result = Ext4.JSON.decode(response.responseText); + var success = result.success; + if (true != success) { + showResult(result.message); + return; + } else { + showResult('排序成功!'); + listStore.load(); + } + }, + failure: function (response, options) { + var result = Ext4.JSON.decode(response.responseText); + showResult(result.message); + } + }); + }, 500); +} + +//删除 +function deleteConfig(grid) { + var url = ''; + if (optionListId == 'type') { + url = WWWROOT + '/disinfectSystem/baseData/qualityControlIndicatorTypeController/batchDeleteQualityControlIndicatorType.mhtml'; + } else if (optionListId == 'parameter') { + url = WWWROOT + '/disinfectSystem/baseData/qualityControlItemParameterController/batchDeleteQualityControlItemParameter.mhtml'; + } + var selectedRecords = grid.getSelectionModel().getSelection(); + var selectedCount = grid.getSelectionModel().getCount(); + var ids = []; + if (selectedCount < 1) { + showResult("请选择要删除的数据"); + } else { + for (var i = 0, len = selectedRecords.length; i < len; i++) { + ids[i] = selectedRecords[i].data['id']; + } + Ext4.MessageBox.confirm("请确认", "确定要删除选中的信息吗?", function (button, text) { + if ("yes" == button) { + Ext4.Ajax.request({ + url: url, + params: { ids: ids.join(';') }, + success: function (response, options) { + var result = Ext4.JSON.decode(response.responseText); + var success = result.success; + if (true != success) { + showResult(result.message); + return; + } else { + showResult('删除成功!'); + listStore.load(); + } + }, + failure: function (response, options) { + var result = Ext4.JSON.decode(response.responseText); + showResult(result.message); + } + }); + } + }); + } +} + +//保存 +function saveConfig(id) { + var name = top.Ext4.getCmp('name').getValue(); + var mask = new Ext4.LoadMask({ + msg: '正在保存,请稍候...', + target: formPanel + }); + var params = { + id: id, + name: name + } + var url = ''; + if (optionListId == 'type') { + url = WWWROOT + '/disinfectSystem/baseData/qualityControlIndicatorTypeController/saveQualityControlIndicatorType.mhtml' + var targetOption = top.Ext4.getCmp('targetOption').getValue(); + var targetValue = top.Ext4.getCmp('targetValue').getValue(); + if (targetValue !== null) { + targetValue = targetOption + ' ' + targetValue; + } + params.targetValue = targetValue || ''; + } else { + url = WWWROOT + '/disinfectSystem/baseData/qualityControlItemParameterController/saveQualityControlItemParameter.mhtml' + var qcIndicatorType_id = top.Ext4.getCmp('qcIndicatorType_id').getValue(); + if (qcIndicatorType_id == '') { + showResult('请选择所属质检指标类'); + return + } + params.qcIndicatorType_id = qcIndicatorType_id || ''; + } + mask.show(); + Ext4.Ajax.request({ + url: url, + params: params, + success: function (response, options) { + var result = Ext4.decode(response.responseText); + if (result.success) { + configWin.close(); + listStore.load(); + showResult('保存成功'); + } else { + showResult(result.message); + } + mask.hide(); + }, + failure: function (response, options) { + showResult('保存失败!'); + } + }); +} + +//显示窗口 +function showAddOrEditWindow(id, name, targetValue) { + formPanel = new top.Ext4.form.Panel({ + id: 'configForm', + frame: true, + labelSeparator: ':', + bodyStyle: 'padding:5px 5px 0px 5px;', + width: 400, + buttonAlign: 'center', + fieldDefaults: { + labelAlign: 'right', + labelWidth: optionListId == 'type' ? 70 : 100 + }, + items: [{ + layout: 'column', + border: 0, + items: [{ + columnWidth: 0.98, + layout: 'form', + border: 0, + style: 'margin-bottom:10px', + items: [{ + xtype: 'textfield', + fieldLabel: '名称', + id: 'name', + name: 'name', + allowBlank: false, + value: name || '', + anchor: '95%' + }] + }] + }, { + layout: 'column', + border: 0, + hidden: optionListId !== 'type', + items: [{ + columnWidth: 0.4, + layout: 'form', + border: 0, + style: 'margin-bottom:10px', + items: [{ + xtype: 'combo', + fieldLabel: '目标值', + valueField: 'value', + displayField: 'value', + id: 'targetOption', + name: 'targetOption', + mode: 'local', + triggerAction: 'all', + forceSelection: true, + editable: false, + value: targetValue ? targetValue.split(' ')[0] : '≤', + store: new Ext4.data.Store({ + fields: [{ name: 'value' }], + data: [{ value: '≤' }, { value: '=' }, { value: '≥' }] + }), + anchor: '95%' + }] + }, { + columnWidth: 0.58, + layout: 'form', + border: 0, + style: 'margin-bottom:10px', + items: [{ + xtype: 'numberfield', + id: 'targetValue', + name: 'targetValue', + allowBlank: true, + allowDecimals: false, + minValue: 0, + value: targetValue ? targetValue.split(' ')[1] : '', + anchor: '95%' + }] + }] + }, { + layout: 'column', + border: 0, + hidden: optionListId !== 'parameter', + items: [{ + columnWidth: 0.98, + layout: 'form', + border: 0, + style: 'margin-bottom:10px', + items: [, { + xtype: 'combo', + id: 'qcIndicatorType_id', + name: 'qcIndicatorType_id', + fieldLabel: '所属质检指标类', + minChars: 0, + valueField: 'id', + displayField: 'name', + store: new Ext4.data.Store({ + proxy: { + type: 'ajax', + url: WWWROOT + '/disinfectSystem/baseData/qualityControlIndicatorTypeController/loadQualityControlIndicatorTypeList.mhtml', + reader: { + root: 'data.list', + totalProperty: 'data.count' + }, + }, + fields: [ + { name: 'id' }, + { name: 'name' }, + { name: 'targetValue' } + ] + }), + forceSelection: true, + lazyInit: true, + triggerAction: 'all', + typeAhead: false, + editable: false, + anchor: '95%' + }] + }] + }], + buttons: [{ + id: 'saveBtn', + text: '保存', + handler: function () { + if (formPanel.getForm().isValid()) { + saveConfig(id); + } else { + showResult('请正确填写表单!'); + return false; + } + } + }, { + text: '取消', + handler: cancel + }] + }); + configWin = new top.Ext4.window.Window({ + id: 'configWin', + layout: 'column', + title: title + '信息设置', + width: 400, + height: 150, + border: false, + plain: true, + modal: true, + items: [{ + region: 'center', + width: 400, + layout: 'fit', + items: [formPanel] + }] + }); + configWin.show(); +} + Index: ssts-web/src/main/webapp/disinfectsystem/reportforms/qualityControlReportView.jsp =================================================================== diff -u --- ssts-web/src/main/webapp/disinfectsystem/reportforms/qualityControlReportView.jsp (revision 0) +++ ssts-web/src/main/webapp/disinfectsystem/reportforms/qualityControlReportView.jsp (revision 40968) @@ -0,0 +1,41 @@ +<%@ page contentType="text/html; charset=UTF-8"%> +<%@page import="java.util.Date"%> +<%@page import="java.text.SimpleDateFormat"%> +<%@ include file="/common/taglibs.jsp"%> +<% + SimpleDateFormat dateFormat =new SimpleDateFormat("yyyy-MM-dd"); + request.setAttribute("newDate", dateFormat.format(new Date())); + %> + + + +<%@ include file="/common/includeExtJsAndCss.jsp"%> + + + + + + +护理质量质控指标报表 + + + + + + + +
+
+
+ + + + + + + + \ No newline at end of file Index: ssts-web/src/main/webapp/disinfectsystem/basedatamanager/qualitymonitoringConfig/qualityMonitoringDefinitionView.js =================================================================== diff -u -r38483 -r40968 --- ssts-web/src/main/webapp/disinfectsystem/basedatamanager/qualitymonitoringConfig/qualityMonitoringDefinitionView.js (.../qualityMonitoringDefinitionView.js) (revision 38483) +++ ssts-web/src/main/webapp/disinfectsystem/basedatamanager/qualitymonitoringConfig/qualityMonitoringDefinitionView.js (.../qualityMonitoringDefinitionView.js) (revision 40968) @@ -304,6 +304,9 @@ { name: 'name' }, { name: 'isStatisticsItem' }, { name: 'orderNumber' }, + { name: 'fillQuantity' }, + { name: 'qcItemParameter_id' }, + { name: 'qcItemParameter_name' }, { name: 'recordMaterialDetails' }, { name: 'valueTriggerItemNames' } ]); @@ -316,6 +319,9 @@ { name: 'name' }, { name: 'isStatisticsItem' }, { name: 'orderNumber' }, + { name: 'fillQuantity' }, + { name: 'qcItemParameter_id' }, + { name: 'qcItemParameter_name' }, { name: 'recordMaterialDetails' }, { name: 'valueTriggerItemNames' } ] @@ -332,6 +338,9 @@ name: optionsJson[i].name, isStatisticsItem: optionsJson[i].isStatisticsItem, orderNumber: optionsJson[i].orderNumber, + fillQuantity: optionsJson[i].fillQuantity || '', + qcItemParameter_id: optionsJson[i].qcItemParameter_id || '', + qcItemParameter_name: optionsJson[i].qcItemParameter_name || '', valueTriggerItemNames: optionsJson[i].valueTriggerItemNames, recordMaterialDetails : optionsJson[i].recordMaterialDetails || '否' }); @@ -368,6 +377,24 @@ triggerItemStore.add(record); } + //FSEYEQ-22:关联质控指标 + var qualityControlItemParameterStroe = new Ext.data.Store({ + proxy: new Ext.data.HttpProxy({ + url: WWWROOT + '/disinfectSystem/baseData/qualityControlItemParameterController/loadQualityControlItemParameterList.mhtml', + method: 'POST' + }), + reader: new Ext.data.JsonReader({ + root: 'data.list', + totalProperty: 'data.count' + }, [ + { name: 'id' }, + { name: 'name' }, + { name: 'qualityControlIndicatorType.name' }, + { name: 'qualityControlIndicatorType' }, + { name: 'targetValue' } + ]) + }); + var cm = new top.Ext.grid.ColumnModel([{ id: 'id', name: 'id', @@ -401,6 +428,47 @@ width: 150, dataIndex: 'valueTriggerItemNames' }, { + header: "填写数量", + width: 100, + dataIndex: 'fillQuantity', + hidden: !sstsConfig.enableCSSDNursingQualityControlReport, + editor: new top.Ext.form.ComboBox({ + valueField: 'value', + displayField: 'value', + width: 80, + editable: false, + store: new top.Ext.data.SimpleStore({ + fields: ['value'], + data: [['是'], ['否']] + }), + forceSelection: true, + mode: 'local', + triggerAction: 'all' + }) + }, { + header: "关联质控指标", + width: 100, + dataIndex: 'qcItemParameter_name', + hidden: !sstsConfig.enableCSSDNursingQualityControlReport, + editor: new top.Ext.form.ComboBox({ + valueField: 'name', + displayField: 'name', + queryParam: 'spell', + minChars: 0, + store: qualityControlItemParameterStroe, + forceSelection: true, + triggerAction: 'all', + anchor: '95%', + listeners: { + select: function (combo, record, index) { + var records = top.Ext.getCmp('itemOptionsGrid').getSelectionModel().getSelections(); + if (records[0]) { + records[0].set('qcItemParameter_id', record.data.id) + } + } + } + }) + }, { header: "排序", width: 80, renderer: optionsMoveUpDown, @@ -438,6 +506,9 @@ name: goodsName, isStatisticsItem: "", orderNumber: 0, + fillQuantity: "", + qcItemParameter_name: "", + qcItemParameter_id: "", valueTriggerItemNames: '', recordMaterialDetails:'否' }); @@ -517,7 +588,7 @@ store: optionStore, tbar: tbar, cm: cm, - width: 240, + width: 340, height: 240, isCheckboxSelectionModel: true, frame: false, @@ -554,6 +625,9 @@ name: record.get("name"), isStatisticsItem: record.get("isStatisticsItem"), orderNumber: (i + 1), + fillQuantity: record.get("fillQuantity"), + qcItemParameter_name: record.get("qcItemParameter_name"), + qcItemParameter_id: record.get("qcItemParameter_id"), recordMaterialDetails : recordMaterialDetails, valueTriggerItemNames: record.get("valueTriggerItemNames") }); @@ -577,7 +651,7 @@ id: 'setOptionsWindow', layout: 'fit', title: '参数值设置', - width: 600, + width: 700, modal: true, autoHeight: true, border: false, @@ -691,6 +765,7 @@ } } }); + var formPanel = new top.Ext.FormPanel({ id: 'formDefinitionForm', frame: true, Index: ssts-web/src/main/webapp/disinfectsystem/qualitymonitoring/qualitymonitoringInstanceForm.js =================================================================== diff -u -r40818 -r40968 --- ssts-web/src/main/webapp/disinfectsystem/qualitymonitoring/qualitymonitoringInstanceForm.js (.../qualitymonitoringInstanceForm.js) (revision 40818) +++ ssts-web/src/main/webapp/disinfectsystem/qualitymonitoring/qualitymonitoringInstanceForm.js (.../qualitymonitoringInstanceForm.js) (revision 40968) @@ -1516,20 +1516,19 @@ for (var j = 0; j < optionsJson.length; j++) { var optionsArray = new Array(); optionsArray.push(optionsJson[j].name); - optionsArray.push(optionsJson[j].valueTriggerItemIds); + optionsArray.push(optionsJson[j].valueTriggerItemIds || ''); + optionsArray.push(optionsJson[j].fillQuantity); + optionsArray.push(optionsJson[j].id); optionsArrays.push(optionsArray); if (value == optionsJson[j].name) { hideTriggerItemIdsValue = optionsJson[j].valueTriggerItemIds; } } } - return { - columnWidth: .5, + var optionItems = [{ + columnWidth: sstsConfig.enableCSSDNursingQualityControlReport ? 0.4 : 0.5, layout: 'form', labelWidth: 90, - style: 'margin-top:10px', - hidden: hideElement, - id: 'hideElement' + id, items: [{ xtype: 'hidden', id: 'triggerItemIds' + id, @@ -1544,9 +1543,8 @@ displayField: 'value', allowBlank: allowBlank, editable: false, - listWidth: 400, store: new top.Ext.data.SimpleStore({ - fields: ['value', 'valueTriggerItemIds'], + fields: ['value', 'valueTriggerItemIds', 'fillQuantity', 'id'], data: optionsArrays }), forceSelection: true, @@ -1560,10 +1558,44 @@ var oldTriggerItemIds = top.Ext.getCmp("triggerItemIds" + id).getValue(); triggerItemAction(oldTriggerItemIds, "hide"); triggerItemAction(valueTriggerItemIds, "show"); + var fillQuantity = record.get("fillQuantity"); + if(fillQuantity == '是'){ + top.Ext.getCmp("quantityBox" + id).show(); + top.Ext.getCmp('quantity'+id).setValue(1); + }else { + top.Ext.getCmp("quantityBox" + id).hide(); + top.Ext.getCmp('quantity'+id).setValue(''); + } top.Ext.getCmp("triggerItemIds" + id).setValue(valueTriggerItemIds); } } }] + }] + if(sstsConfig.enableCSSDNursingQualityControlReport){ + optionItems.push({ + columnWidth: 0.08, + layout: 'form', + style: 'margin-left:2%', + id:'quantityBox'+id, + items: [{ + xtype:'numberfield', + allowDecimals :false, + hideLabel: true, + minValue:0, + anchor: '100%', + id: 'quantity' + id, + name: 'quantity' + id, + value: optionValues ? (optionValues[0].quantity || '') : '' + }] + }) + } + return { + layout: 'column', + columnWidth: 1, + id: 'hideElement' + id, + style: 'margin-top:10px', + hidden: hideElement, + items: optionItems }; } else if (type == '多选') { if (value == null || value == '') { @@ -1575,29 +1607,47 @@ name: 'configItemOption' + id, xtype: 'hidden', hidden: allowBlank, - value: value + value: '' }, { id: 'recordMaterialDetails' + id, name: 'recordMaterialDetails' + id, xtype: 'hidden', hidden: true, value: '' }); + var columnWidth = 0.5; + var columnFormWidth = 1; + if(sstsConfig.enableRecordMaterialDetailsOfQualityMonitoring){ + columnWidth = 1; + columnFormWidth = 0.5; + }else if(sstsConfig.enableCSSDNursingQualityControlReport){ + columnFormWidth = 0.5; + } if (options != "") { var optionsJson = JSON.parse(options); + var optionNames = []; + if(value != null && value !== ''){ + var newValue = value.substring(1); + newValue = '['+newValue+']'; + var valueObj = JSON.parse(newValue); + for(var k=0;k 0) { + for (var i = 0; i < optionValues.length; i++) { + if(top.Ext.getCmp('configItemOptionQuantity' + id + optionValues[i].answer)){ + top.Ext.getCmp('configItemOptionQuantity' + id + optionValues[i].answer).setValue(optionValues[i].quantity || '') + } + } + } } else { var newValue = oldElementValue.replace("," + thiz.getRawValue(), ''); elementObj.setValue(newValue); @@ -1746,6 +1803,22 @@ layout: 'form', columnWidth: 0.2, style: 'margin-top:10px', + id: 'quantityBox' + id + '_' + j, + hidden: optionsJson[j].fillQuantity !== '是', + items: [{ + xtype:'numberfield', + allowDecimals :false, + minValue:0, + hideLabel: true, + anchor: '100%', + id: 'configItemOptionQuantity' + id + optionsJson[j].name, + name: 'configItemOptionQuantity' + id + optionsJson[j].name, + value:optionsJson[j].quantity || '' + }] + }, { + layout: 'form', + columnWidth: 0.2, + style: 'margin-top:10px', id: 'hideButton' + id + '_' + j, hidden: !(id == '' && sstsConfig.enableRecordMaterialDetailsOfQualityMonitoring), items: [{ @@ -5626,16 +5699,11 @@ configItemVal = wrapperItemsFieldSet[x].items.items[0].value; configItemOption[configItemKey] = configItemVal; } else { - for (var j = 0; j < 2; j++) { - configItemKey = wrapperItemsFieldSet[x].items.items[0].id; + var recordMaterialDetailsId = wrapperItemsFieldSet[x].items.items[1]; + if (recordMaterialDetailsId && recordMaterialDetailsId.id.indexOf('recordMaterialDetails') >= 0) { + configItemKey = wrapperItemsFieldSet[x].items.items[1].id; configItemVal = top.Ext.getCmp(configItemKey).getValue(); configItemOption[configItemKey] = configItemVal; - var recordMaterialDetailsId = wrapperItemsFieldSet[x].items.items[1]; - if (recordMaterialDetailsId && recordMaterialDetailsId.id.indexOf('recordMaterialDetails') >= 0) { - configItemKey = wrapperItemsFieldSet[x].items.items[1].id; - configItemVal = top.Ext.getCmp(configItemKey).getValue(); - configItemOption[configItemKey] = configItemVal; - } } } }