Index: ssts-web/src/main/webapp/disinfectsystem/qualitymonitoring/qualitymonitoringInstanceFormForExt.js =================================================================== diff -u --- ssts-web/src/main/webapp/disinfectsystem/qualitymonitoring/qualitymonitoringInstanceFormForExt.js (revision 0) +++ ssts-web/src/main/webapp/disinfectsystem/qualitymonitoring/qualitymonitoringInstanceFormForExt.js (revision 36027) @@ -0,0 +1,5482 @@ +var qualityMonitoringWin = null; +//是否禁用“预览”按钮 +var disableShowImageButton = false; +//抽检器械的store +var materialDefinitionStore; +// 添加抽检器械的材料store +var materialDefinitionAddStore; +var tousseDefinitionStore; +var materialItemCount = 0; +var tousseItemCount = 0; +var tousseWrapperCount = 0; +var tousseAndMaterialWrapperCount = 0; +var formPanel; +var qualityMonitoringSterilizationID; +var qualityMonitoringWRRecordID = 0; +var responPartName = ''; +//监测项的combo +var formDefinitionStore; +var frequencyStore; +var materialCountRecords; +var materialMsg = null; +var tousseInstanceInfo = ""; +var recycleQM = false; +var otherPartAddQM = false; +var setH = 28; +var widthSet; //控制样式 +var widthSetTousse;//控制样式 +var addExtractClick;//抽检器械后面添加按钮的显示与隐藏 +var addTousseClick;//器械包条码后面添加按钮的显示与隐藏 +var labelWidthLeft = 135; +var currentOrgUnitName = currentOrgUnitName || ''; +var currentOrgUnitCoding = currentOrgUnitCoding || ''; +var newTousseItems = [] +if(Ext.getCmp("tousseInfoFieldSet")){ + var getWidth = Ext.getCmp("tousseInfoFieldSet").items.items[0].el.dom.clientWidth; +} + +function cancelQualityMonitoring() { + closeQMWindow(); +} + +function closeQMWindow(){ + if(recycleQM == true){ + // 回收页面进来 + closeQMLayer(); + }else{ + qualityMonitoringWin.close(); + } +} + +function triggerItemAction(valueTriggerItemIds,action){ + if(valueTriggerItemIds != null && valueTriggerItemIds != ""){ + var itemIdArray = valueTriggerItemIds.split(","); + if(itemIdArray.length > 0){ + for(var n = 0 ; n < itemIdArray.length ; n++){ + var triggerItemId = itemIdArray[n]; + if(triggerItemId != null && triggerItemId != ""){ + var hideElement = Ext.getCmp("hideElement" + triggerItemId); + if(hideElement){ + if("show" == action){ + hideElement.show(); + }else{ + var xtype = hideElement.getXType(); + if(xtype == 'fieldset'){ + var length = hideElement.items.each(function(fsItem){ + var itemType = fsItem.getXType(); + if(itemType == "panel"){ + fsItem.items.each(function(item,index,length){ + item.setValue(false); + }); + }else if(itemType == "hidden"){ + fsItem.setValue(""); + } + }); + }else if(xtype == 'panel'){ + hideElement.items.each(function(item,index,length){ + item.setValue(""); + }); + } + hideElement.hide(); + } + } + } + } + } + } +} + +/** + * 创建监测项的表单元素. + * @param type 表单元素的类型 + * @param id 监测项元素id + * @param name 监测项元素名称 + * @param allowBlank 是否允许为空 + * @param options 单选或者多选的配置项 + * @param value 默认值 + * @param isTriggerItem 触发项 + * @returns + */ +function createQualityMonitoringItemElement(type,id,name,allowBlank,options,value,isTriggerItem){ + var hideElement = false; + if('是' == isTriggerItem && (value == null || value == "")){ + setTimeout(function() { + Ext.getCmp('hideElement'+id).hide(); + }, 100); + } + if(type == '文本'){ + return { + columnWidth : .5, + layout : 'form', + labelWidth : 90, + hidden:hideElement, + id:'hideElement'+id, + items : [{ + xtype : 'textfield', + fieldLabel : name, + maxLength : '30', + id : 'configItemOption'+id, + name : 'configItemOption'+id, + allowBlank : allowBlank, + value : value, + anchor : '95%' + }] + }; + }else if(type == '文本框'){ + return { + columnWidth : .9, + layout : 'form', + labelWidth : 90, + hidden:hideElement, + id:'hideElement'+id, + items : [{ + xtype : 'textarea', + fieldLabel : name, + maxLength : '300', + id : 'configItemOption'+id, + name : 'configItemOption'+id, + allowBlank : allowBlank, + value : value, + anchor : '95%' + }] + }; + + }else if(type == '数字'){ + return { + columnWidth : .5, + layout : 'form', + labelWidth : 90, + hidden:hideElement, + id:'hideElement'+id, + items : [{ + xtype : 'numberfield', + fieldLabel : name, + id : 'configItemOption'+id, + name : 'configItemOption'+id, + allowBlank : allowBlank, + allowDecimals : true, + value : value, + maxLength:8, + anchor : '95%' + }] + }; + }else if(type == '时间'){ + return { + columnWidth : .5, + layout : 'form', + labelWidth : 90, + hidden:hideElement, + id:'hideElement'+id, + items : [{ + xtype : 'datefieldWithMin', + fieldLabel : name, + id : 'configItemOption'+id, + name : 'configItemOption'+id, + format : 'Y-m-d H:i', + value : value, + editable : false, + allowBlank : allowBlank, + anchor : '95%' + }] + }; + }else if(type == '时间段'){ + if(value == null || value == ''){ + value = '00:00'; + } + return { + columnWidth : .5, + layout : 'form', + labelWidth : 90, + hidden:hideElement, + id:'hideElement'+id, + items : [{ + xtype : 'textfield', + fieldLabel : name, + maxLength : '16', + id : 'configItemOption'+id, + name : 'configItemOption'+id, + regex : /^\d*:\d\d$/, + regexText : '请按照"小时:分钟"的格式填写', + allowBlank : allowBlank, + value : value, + anchor : '95%' + }] + }; + }else if(type == '日期'){ + return { + columnWidth : .5, + layout : 'form', + labelWidth : 90, + hidden:hideElement, + id:'hideElement'+id, + items : [{ + xtype : 'datefieldWithMin', + fieldLabel : name, + id : 'configItemOption'+id, + name : 'configItemOption'+id, + format : 'Y-m-d', + value : value, + editable : false, + allowBlank : allowBlank, + anchor : '95%' + }] + }; + }else if(type == '单选'){ + var optionsArrays = new Array(); + if(options != ""){ + var optionsJson = JSON.parse(options); + var hideTriggerItemIdsValue = ""; + for(var j = 0 ; j < optionsJson.length ; j++){ + var optionsArray = new Array(); + optionsArray.push(optionsJson[j].name); + optionsArray.push(optionsJson[j].valueTriggerItemIds); + optionsArrays.push(optionsArray); + if(value == optionsJson[j].name){ + hideTriggerItemIdsValue = optionsJson[j].valueTriggerItemIds; + } + } + } + return { + columnWidth : .5, + layout : 'form', + labelWidth : 90, + style:'margin-top:10px', + hidden:hideElement, + id:'hideElement'+id, + items : [{ + xtype:'hidden', + id:'triggerItemIds' + id, + name:'triggerItemIds' + id, + value : hideTriggerItemIdsValue + },{ + xtype : 'combo', + fieldLabel : name, + id : 'configItemOption'+id, + name : 'configItemOption'+id, + valueField : 'value', + displayField : 'value', + allowBlank : allowBlank, + editable : false, + listWidth: 400, + store : new Ext.data.SimpleStore({ + fields : [ 'value', 'valueTriggerItemIds'], + data : optionsArrays + }), + forceSelection : true, + value : value, + mode : 'local', + triggerAction : 'all', + anchor : '100%', + listeners:{ + select : function(combo, record, index) { + var valueTriggerItemIds = record.get("valueTriggerItemIds"); + var oldTriggerItemIds = Ext.getCmp("triggerItemIds" + id).getValue(); + triggerItemAction(oldTriggerItemIds,"hide"); + triggerItemAction(valueTriggerItemIds,"show"); + Ext.getCmp("triggerItemIds" + id).setValue(valueTriggerItemIds); + } + } + }] + }; + }else if(type == '多选'){ + if(value == null || value == ''){ + value = ''; + } + var optionsArray = new Array(); + optionsArray.push({ + id : 'configItemOption'+id, + name : 'configItemOption'+id, + xtype : 'hidden', + hidden : allowBlank, + value : value + }); + if(options != ""){ + var optionsJson = JSON.parse(options); + for(var j = 0 ; j < optionsJson.length ; j++){ + var checked = false; + if(value != null && value.indexOf(JSON.stringify(optionsJson[j])) != -1){ + checked = true; + } + optionsArray.push({ + layout : 'form', + columnWidth : 0.5, + labelWidth : 200, + style:'margin-top:10px', + items:[{ + name : 'cconfigItemOption'+id, + fieldLabel : optionsJson[j].name, + xtype : 'checkbox', + checked : checked, + columnWidth : .5, + inputValue : JSON.stringify(optionsJson[j]), + listeners : { + check : function(thiz, checked){ + var elementId = thiz.getName().substring(1); + var elementObj = Ext.getCmp(elementId); + if(elementObj != undefined && elementObj != null){ + var oldElementValue = elementObj.getValue(); + var checkedValue = JSON.parse(thiz.getRawValue()); + if(checked){ + if(oldElementValue.indexOf(thiz.getRawValue()) == -1){ + oldElementValue += ","; + oldElementValue += thiz.getRawValue() + elementObj.setValue(oldElementValue); + } + if(checkedValue != null){ + var valueTriggerItemIds = checkedValue.valueTriggerItemIds; + triggerItemAction(valueTriggerItemIds,"show"); + } + }else{ + var newValue = oldElementValue.replace("," + thiz.getRawValue(),''); + elementObj.setValue(newValue); + + if(checkedValue != null){ + var valueTriggerItemIds = checkedValue.valueTriggerItemIds; + triggerItemAction(valueTriggerItemIds,"hide"); + } + } + } + } + } + }] + }); + } + } + return { + columnWidth : 1, + xtype : "fieldset", + title: name, + cls:(textSize("12px","宋体",name).width > 835)?'fieldset-element':'', + allowBlank: allowBlank, + id:'hideElement'+id, + layout : 'column', + hidden:hideElement, + autoHeight : true, + items : optionsArray + }; + } +} +/** + * 返回炉次显示框 + * isAdd 是本来就有,还是点添加按钮产生的 + * amount 点击添加按钮的次数 + */ +function createQualityMonitoringElementSterName(value,isAdd,amount){ + return { + columnWidth : .5, + layout : 'form', + labelWidth : 90, + items : [{ + xtype : 'textfield', + fieldLabel : '炉号', + maxLength : '30', + id : isAdd ? 'configItemOptionSterName'+'_'+amount :'configItemOptionSterName', + name : 'configItemOptionSterName', + allowBlank : true, + disabled : true, + value : value, + anchor : '95%' + }] + }; +} +/** + * 返回炉号显示框 + * @param value + * @returns + */ +function createQualityMonitoringElementSterFre(value,isAdd,amount){ + return { + columnWidth : .5, + layout : 'form', + labelWidth : 90, + items : [{ + xtype : 'textfield', + fieldLabel : '炉次', + maxLength : '30', + id : isAdd ? 'configItemOptionSterFre'+'_'+amount :'configItemOptionSterFre', + name : 'configItemOptionSterFre', + allowBlank : true, + disabled: true, + value : value, + anchor : '95%' + }] + }; +} + +/** + * 获取所有选择重新装配的器械包条码(用逗号分隔). + * @returns {String} + */ +function getScanRepacingTiBarcodes(){ + tiBarcodes = ""; + var tousseName = Ext.getCmp('tousseName').getRawValue(); + var isRepacking = Ext.getCmp('isRepacking').getValue(); + if(tousseName != null && tousseName != "" && isRepacking == "是"){ + var barcode = Ext.getCmp('barcode').getValue(); + tiBarcodes += barcode ; + } + var addTousseInstanceAmount = tousseItemCount; + for(var i =1; i <= addTousseInstanceAmount; i++){ + var tousseBarcode = Ext.getCmp('tempBarcodeHidden'+i+"_"+1).getValue(); + //var tousseBarcode = Ext.getCmp('tempBarcode'+i+"_"+1).getValue(); + var tousseName = Ext.getCmp('tempBarcode'+i+"_"+3).getValue(); + var tousseAmount = Ext.getCmp('tempBarcode'+i+"_"+6).getValue(); + var tousseRePacking = Ext.getCmp('tempBarcode'+i+"_"+8).getValue(); + if((tousseName != null && tousseName != "") && (tousseAmount != null && tousseAmount != "") && tousseRePacking == "是"){ + if(tiBarcodes != null && tiBarcodes != ""){ + tiBarcodes += "," + tousseBarcode ; + }else{ + tiBarcodes += tousseBarcode ; + } + + } + } + return tiBarcodes; +} + + +function submitFormNew2(tousseAndMaterialAll,saveAndCreate){ + //1、启用责任人文本框,如果有灭菌状态 + Ext.getCmp('responsiblePerson').setDisabled(false); + var sterilizationStatus = ''; + if(typeof(sterilizerStatus) != 'undefined' && sterilizerStatus != null && sterilizerStatus != ""){ + sterilizationStatus = sterilizerStatus; + } + var washStatus = ''; + if(typeof(washAndDisinfectStatus) != 'undefined' && washAndDisinfectStatus != null && washAndDisinfectStatus != ""){ + washStatus = washAndDisinfectStatus; + } + + //2、提交 + setQmSubmitResult(0); + Ext.getCmp('addQualityMonitoringForm').form.submit({ + url : WWWROOT + '/disinfectSystem/qualityMonitoringInstanceAction!bathSaveQualityMonitoringInstance.do', + params : { + tousseMaterialInstanceInfo:tousseAndMaterialAll,//器械包和材料信息 + sterilizationStatus:sterilizationStatus, //灭菌状态 + washStatus:washStatus, + qualityMonitoringSterilizationID : qualityMonitoringSterilizationID, //灭菌记录id + qualityMonitoringWRRecordID : qualityMonitoringWRRecordID //清洗记录id + }, + method : 'POST', + waitMsg : '正在保存数据,请稍候', + waitTitle : '提交表单', + success : function(form, action) { + var result = Ext.decode(action.response.responseText); + if(!result.success){ + showResultQM(result.message); + } + showResultQM(result.message); + setQmSubmitResult(1); + if(saveAndCreate){ + tempFormDefintionId = Ext.getCmp("formDefinitionId").getValue(); + tempFormDefinitionName = Ext.getCmp("name").getValue(); + closeQMWindow(); + qualityMonitoringSterilizationID = 0; + qualityMonitoringWRRecordID = 0; + materialCountRecords = null; + materialMsg = null; + if(recycleQM == true){ + addQMAgain(); + }else{ + addQualityMonitoring("",tempFormDefintionId,tempFormDefinitionName);/* */ + if(typeof(grid) != 'undefined' && grid != null){ + grid.getStore().reload(); + } + } + }else{ + closeQMWindow(); + if(recycleQM == false){ + if(typeof(grid) != 'undefined' && grid != null){ + grid.getStore().reload(); + } + } + } + }, + failure : function(form, action) { + if(action.response != null && action.response.responseText != null){ + var result = Ext.decode(action.response.responseText); + showResultQM(result.message); + }else{ + alert('failure = ' + action.failureType); + } + setQmSubmitResult(-1); + } + }); +} + +/** + * 设置“qmSubmitResult”的值(1、0或者空=提交前 2、1=提交成功 3、-1=提交失败). + * @param value + */ +function setQmSubmitResult(value){ + if(!isUndefinedOrNullOrEmpty(Ext.getCmp('qmSubmitResult'))){ + Ext.getCmp('qmSubmitResult').setValue(value); + } +} +function showAllTousseOfSterileCheckBox(show){ + if(!isUndefinedOrNullOrEmpty(qualityMonitoringSterilizationID) && show){ + Ext.getCmp('allTousseOfSterile').setVisible(true); + Ext.getCmp('allTousseOfSterile').getEl().up('.x-form-item').setDisplayed(true); + }else{ + Ext.getCmp('allTousseOfSterile').setVisible(false); + Ext.getCmp('allTousseOfSterile').getEl().up('.x-form-item').setDisplayed(false); + } +} + +function selectEmptyDo(){ + Ext.getCmp('scope').setValue("无"); + Ext.getCmp('optionAmount').setValue(''); + Ext.getCmp('sterilizationRecordInfo').setVisible(false); + Ext.getCmp('tousseInfoFieldSet').setVisible(true); + hideFirstTousse(); + showFirstMaterial(); + Ext.getCmp('recycleC').setVisible(false); + Ext.getCmp('repackingC').setVisible(false); + Ext.getCmp('disabledBarcodeC').setVisible(false); + showAllTousseOfSterileCheckBox(true); + Ext.getCmp('addBtnAll').setVisible(true); + //Ext.getCmp('addExtractCheckTousse').setVisible(false); + //Ext.getCmp('addExtractCheckMaterial').setVisible(true); + Ext.getCmp('addExtractCheckMaterialBtnC').setVisible(true); + Ext.getCmp('addExtractCheckTousseBtnC').setVisible(false); + Ext.getCmp('sterilizationRecordInfo').setVisible(false); + //FSSDERMYY-18:隐藏器械包信息 + Ext.getCmp('tousseInfoFieldSet').setVisible(false); + Ext.getCmp("insertBasket").hide(); + Ext.getCmp("containerNameItem").hide(); + Ext.getCmp('containerName').setVisible(false); + Ext.getCmp('containerName').getEl().up('.x-form-item').setDisplayed(false); + Ext.getCmp('addQualityMonitoringForm').remove('itemsFieldSet'); + hideExtractCheckMaterial(); + Ext.getCmp('addQualityMonitoringForm').doLayout(); +} + +/** + * 构建监测细则的fieldset. + * @param formId 监测项id + * @param configName 监测项名称 + */ +function addQualityMonitoringItem(formId,configName){ + // 质量监测添加‘无’这个项. + if(configName == '无'){ + selectEmptyDo(); + return; + } + Ext.Ajax.request({ + url : WWWROOT + '/disinfectSystem/formDefinitionAction!loadFormDefinition.do', + params : {id : formId}, + success : function(response,options){ + var result = Ext.decode(response.responseText); + if(result.success){ + Ext.getCmp('scope').setValue(result.data.scope); + if(result.data.scope == '无'){ + //FSSDERMYY-18:隐藏器械包信息 + Ext.getCmp('tousseInfoFieldSet').setVisible(false); + } + Ext.getCmp('optionAmount').setValue(''); + var baseInfoPanel = Ext.getCmp('baseInfoPanel'); + if("是" == result.data.isInsertBasket){ + Ext.getCmp("insertBasket").show(); + Ext.getCmp("containerNameItem").show(); + + Ext.getCmp('containerName').setVisible(true); + Ext.getCmp('containerName').getEl().up('.x-form-item').setDisplayed(true); + }else{ + Ext.getCmp("insertBasket").hide(); + Ext.getCmp("containerNameItem").hide(); + + Ext.getCmp('containerName').setVisible(false); + Ext.getCmp('containerName').getEl().up('.x-form-item').setDisplayed(false); + } + Ext.getCmp('responsibilityPart').setValue(result.data.responsibilityPart); + //东莞中医院DGZYY-161 + if(result.data.responsibilityPart == "回收清点" && result.data.recordRecycleInformation == "是"){//责任环节选择的为回收清点,并且录入回收信为是 + showRecyclingInventoryItem();//显示回收清点对应的 + hideCleanAndDisinfectionItem();//隐藏清洗消毒点对应的 + hideSterilizationItem();//隐藏灭菌管理对应的 + }else if(result.data.responsibilityPart == "清洗消毒" && result.data.recordRinseInformation == "是"){//责任环节选择的为清洗消毒,监测项的录入清洗信息为是 + showCleanAndDisinfectionItem();//显示清洗消毒对应的 + hideRecyclingInventoryItem();//隐藏回收清点对应的 + hideSterilizationItem();//隐藏灭菌管理对应的 + }else if(result.data.responsibilityPart == "灭菌管理" && result.data.recordSterilizatioInformation == "是"){//监测项的录入灭菌信息为是,并且责任环节选择的为灭菌管理 + showSterilizationItem(); + hideRecyclingInventoryItem();//隐藏回收清点对应的 + hideCleanAndDisinfectionItem();//隐藏清洗消毒点对应的 + }else{ + hideRecyclingInventoryItem();//隐藏回收清点对应的 + hideCleanAndDisinfectionItem();//隐藏清洗消毒点对应的 + hideSterilizationItem();//隐藏灭菌管理对应的 + } + + var items = new Array(); + // 如果显示炉次炉号,添加表单 + if(result.data.showSterilizerNumFrequency == '是'){ + items.push(createQualityMonitoringElementSterName('',false,"")); + items.push(createQualityMonitoringElementSterFre('',false,"")); + } + for(var i = 0 ; i< result.data.items.length ; i++){ + var item = result.data.items[i]; + if(Ext.getCmp('optionAmount').getValue() == null || Ext.getCmp('optionAmount').getValue() == ''){ + Ext.getCmp('optionAmount').setValue(item.id); + }else{ + Ext.getCmp('optionAmount').setValue(Ext.getCmp('optionAmount').getValue()+';'+item.id); + } + var allowBlank = result.data.items[i].requirement == '必填'?false:true; + items.push(createQualityMonitoringItemElement(item.type,item.id,item.name,allowBlank,item.optionsJson,null,item.isTriggerItem)); + if(result.data.items[i].type == '多选'){ + items.push({ + columnWidth : 1, + xtype : "label", + html : ' ', + anchor : '95%' + }); + } + } + + Ext.getCmp('addQualityMonitoringForm').remove('itemsFieldSet'); + if(items.length > 0){ + Ext.getCmp('addQualityMonitoringForm').add({ + id : 'itemsFieldSet', + xtype:"fieldset", + labelAlign :'left', + title:"监测项", + layout:'column', + autoHeight:true, + items:items + }); + } + Ext.getCmp('addQualityMonitoringForm').doLayout(); + if(Ext.getCmp('itemsFieldSet')){ + Ext.getCmp('itemsFieldSet').doLayout(); + } + Ext.getCmp('material').setValue(""); + Ext.getCmp('materialAmount').setValue(""); + if(materialItemCount > 0){ + for(var j=0;j<=tousseItemCount;j++){ + for(var i=1;i<=materialItemCount;i++){ + if(Ext.getCmp('material'+j+'_'+i)){ + Ext.getCmp('material'+j+'_'+i).setValue(""); + } + Ext.getCmp('materialAmount'+i).setValue(""); + } + if(Ext.getCmp('tempBarcode'+j+'_3')){ + Ext.getCmp('tempBarcode'+j+'_3').setValue(""); + Ext.getCmp('tousseDefinitionId'+j).setValue(''); + } + } + } + Ext.getCmp('tousseDefinitionId').setValue(''); + if(materialDefinitionStore){ + materialDefinitionStore.reload(); + } + //Ext.getCmp('inspectType').setValue(result.data.scope); + + Ext.getCmp('disabledBarcodeC').setVisible(false); + Ext.getCmp('disabledBarcode').disable(); + Ext.getCmp('isDiscard').setValue(''); + + if(result.data.scope == "器械包"){ + Ext.getCmp('sterilizationRecordInfo').setVisible(false); + Ext.getCmp('tousseInfoFieldSet').setVisible(true); + // 隐藏第一个材料和添加的材料信息 + hideFirstMaterial(); + hideExtractCheckMaterial();//要 隐藏的添加的 + //隐藏器械包信息块材料 + hideExtractCheckMaterialWrapper(); + hideMaterialOrTousseOrTousseMaterial(); + // 显示器械包输入框 + showFirstTousse(); + if((qualityMonitoringWRRecordID > 0 && (sstsConfig.hasOwnProperty('haveRinserPosition')) && sstsConfig.haveRinserPosition)){ + hideBasketBarcodeAndPosition(); + } + Ext.getCmp('recycleC').setVisible(true); + Ext.getCmp('repackingC').setVisible(true); + Ext.getCmp('disabledBarcodeC').setVisible(true); + showAllTousseOfSterileCheckBox(true); + Ext.getCmp('addBtnAll').setVisible(true); + //Ext.getCmp('addExtractCheckTousse').setVisible(true); + //Ext.getCmp('addExtractCheckMaterial').setVisible(false); + // 清除材料数据 + //Ext.getCmp('materialAmount').setValue(""); + //隐藏监测项 + hideInspectItem(); + resetRecycleAndRepackingValue(); + }else if(result.data.scope == "材料"){ + Ext.getCmp('sterilizationRecordInfo').setVisible(false); + Ext.getCmp('tousseInfoFieldSet').setVisible(true); + hideFirstTousse(); + //hideMaterialOrTousseOrTousseMaterial(); + hideExtractCheckTousse();//要 + showFirstMaterial(); + hideMaterialOrTousseOrTousseMaterial(); + Ext.getCmp('recycleC').setVisible(false); + Ext.getCmp('repackingC').setVisible(false); + Ext.getCmp('disabledBarcodeC').setVisible(false); + showAllTousseOfSterileCheckBox(false); + +// Ext.getCmp('material').getEl().up('.x-form-item').setDisplayed(true); + //showExtractCheckMaterial(); + Ext.getCmp('addBtnAll').setVisible(true); + //Ext.getCmp('addExtractCheckTousse').setVisible(false); + //Ext.getCmp('addExtractCheckMaterial').setVisible(true); + addMaterialAndAmount(); + addMaterialMsg(); + //隐藏监测项 + hideInspectItem(); + //当前选择的监测项的监测范围是“器械包”,如果重新选择的监测项的监测范围是“材料”,之前已输入的抽检器械包名称不用显示; + /* if(inspectType == "器械包"){ + //隐藏器械包信息块包 + hideExtractCheckTousseWrapper(); + hideMaterialOrTousseOrTousseMaterial(); + } */ + }else if(result.data.scope == "灭菌炉记录"){ + Ext.getCmp('sterilizationRecordInfo').setVisible(true); + // 如果监测范围为灭菌炉记录,隐藏器械包信息 + Ext.getCmp('tousseInfoFieldSet').setVisible(false); + Ext.getCmp('addBtnAll').setVisible(true); + //Ext.getCmp('addExtractCheckTousse').setVisible(false); + //Ext.getCmp('addExtractCheckMaterial').setVisible(false); + hideExtractCheckMaterial(); + //隐藏器械包信息块材料 + hideExtractCheckMaterialWrapper(); + //隐藏器械包信息块包 + hideExtractCheckTousseWrapper(); + //隐藏器械包信息块材料和包 + hideExtractCheckTousseAndMaterialWrapper(); + hideMaterialOrTousseOrTousseMaterial(); + //隐藏监测项 + hideInspectItem(); + resetRecycleAndRepackingValue(); + }else if(result.data.scope == "材料和器械包"){ + Ext.getCmp('sterilizationRecordInfo').setVisible(false); + Ext.getCmp('tousseInfoFieldSet').setVisible(true); + //showExtractCheckTousseAndMaterialWrapper(); + showFirstTousse(); + showFirstMaterial(); + //hideExtractCheckMaterial();//要 + //隐藏器械包信息块材料 + hideExtractCheckMaterialWrapper(); + hideExtractCheckTousse();//要 + hideExtractCheckTousseWrapper(); + if((qualityMonitoringWRRecordID > 0 && (sstsConfig.hasOwnProperty('haveRinserPosition')) && sstsConfig.haveRinserPosition)){ + showBasketBarcodeAndPosition(); + } +// Ext.getCmp('material').getEl().up('.x-form-item').setDisplayed(true); + Ext.getCmp('recycleC').setVisible(true); + Ext.getCmp('repackingC').setVisible(true); + Ext.getCmp('disabledBarcodeC').setVisible(true); + showAllTousseOfSterileCheckBox(true); + Ext.getCmp('addBtnAll').setVisible(true); + //Ext.getCmp('addExtractCheckTousse').setVisible(true); + //Ext.getCmp('addExtractCheckMaterial').setVisible(true); + // 添加抽检器械和数量 + addMaterialAndAmount(); + addMaterialMsg(); + //隐藏监测项 + hideInspectItem(); + resetRecycleAndRepackingValue(); + }else if(result.data.scope == "无"){ + Ext.getCmp('sterilizationRecordInfo').setVisible(false); + Ext.getCmp('tousseInfoFieldSet').setVisible(true); + hideFirstTousse(); + showFirstMaterial(); +// Ext.getCmp('material').getEl().up('.x-form-item').setDisplayed(true); + Ext.getCmp('recycleC').setVisible(false); + Ext.getCmp('repackingC').setVisible(false); + Ext.getCmp('disabledBarcodeC').setVisible(false); + showAllTousseOfSterileCheckBox(true); + Ext.getCmp('addBtnAll').setVisible(true); + //Ext.getCmp('addExtractCheckTousse').setVisible(false); + //Ext.getCmp('addExtractCheckMaterial').setVisible(true); + Ext.getCmp('sterilizationRecordInfo').setVisible(false); + //FSSDERMYY-18:隐藏器械包信息 + Ext.getCmp('tousseInfoFieldSet').setVisible(false); + resetRecycleAndRepackingValue(); + } + // 新建质量监测单,数量默认为1 + var tAmount = Ext.getCmp('tousseAmount').getValue(); + var mAmount = Ext.getCmp('materialAmount').getValue(); + if(isUndefinedOrNullOrEmpty(tAmount) || tAmount <= 0){ + // 没有值,设置默认值为1 + Ext.getCmp('tousseAmount').setValue(1); + } + if(isUndefinedOrNullOrEmpty(mAmount) || mAmount <= 0){ + // 没有值,设置默认值为1 + Ext.getCmp('materialAmount').setValue(1); + } + Ext.getCmp('handleDepart').setValue(result.data.handleDepart); + } + }, + failure : function(response, options) { + showResultQM('系统加载出错,请稍候再试'); + } + }); +} +// 装配页面进来,添加材料和数量 +function addMaterialAndAmount(){ + if(materialCountRecords != null && materialCountRecords != 'undefined' && materialCountRecords.length > 0){ + var maerialName = Ext.getCmp('material').getValue(); + if( !isUndefinedOrNullOrEmpty(maerialName) ){ + // 如果已经打开了,再选择其他的监测项,不再添加材料数据 + return ; + } + + for(var i = 0 ; i < materialCountRecords.length ; i++){ + var materialName = materialCountRecords[i].data["name"]; + if( i == 0 ){ + // 第一条记录 + Ext.getCmp('material').setValue(materialName); + }else{ + addExtractCheckMaterial(false,materialName,1,"","","","","","","","",""); + } + } + } +} + +//回收页面进来,添加材料和数量 +function addMaterialMsg(){ + if(materialMsg != null && materialMsg != 'undefined' && materialMsg.length > 0){ + var maerialName = Ext.getCmp('material').getValue(); + if( !isUndefinedOrNullOrEmpty(maerialName) ){ + // 如果已经打开了,再选择其他的监测项,不再添加材料数据 + return ; + } + for(var i = 0 ; i < materialMsg.length ; i++){ + var materialName = materialMsg[i].materialName; + var count = materialMsg[i].amount; + if( i == 0 ){ + // 第一条记录 + Ext.getCmp('material').setValue(materialName); + Ext.getCmp('materialAmount').setValue(count); + }else{ + addExtractCheckMaterial(false,materialName,count,"","","","","","","","",""); + } + } + } +} + +/** + * 判断是否整炉. + * @returns {Boolean} + */ +function allTousseOfSterileChecked(){ + var isAll = Ext.getCmp('isAllTousseOfSterile').getValue(); //是否整炉 + if(isAll == '是'){ + return true; + } + return false; +} + +/** + * 控制“重新回收”和“重新装配”的复选框的是否可用. + */ +function updateControlStatus(){ + if(allTousseOfSterileChecked()){ + enableRecycleAndRepacking(); + }else{ + var tousseType = Ext.getCmp('tousseType').getValue(); + var tousseInstanceId = Ext.getCmp('tousseInstanceId').getValue(); + var toussedefRecycling = Ext.getCmp('tousseDefRecycling').getValue(); + + if (isUndefinedOrNullOrEmpty(tousseInstanceId)) { + disableRecycleAndRepacking(); + } else if (tousseType==PACKAGE_TYPE_FOREIGN + || tousseType==PACKAGE_TYPE_SPLIT + || tousseType == '敷料包' || toussedefRecycling == '否') { + disableRecycleCanRepacking(); + } else { + enableRecycleAndRepacking(); + } + } +} + +/* +*ZJJSRM-30勾选是否整炉后,器械包条码和器械包名称设置为禁止输入状态 +*/ +function updateDisaplay(isCheck){ + if(isCheck){ + Ext.getCmp('tempBarcode').disable(); + Ext.getCmp('tousseName').disable(); + Ext.getCmp('addExtractCheckTousseBtnC').setVisible(false); + disabledExtractCheckTousse(); + if(!isUndefinedOrNullOrEmpty(qualityMonitoringSterilizationID) && parseInt(qualityMonitoringSterilizationID) !== 0){ + Ext.Ajax.request({ + url : WWWROOT + '/disinfectSystem/qualityMonitoringInstanceAction!getGoodsAmountBySterilizationRecord.do', + params : {sterilizationRecordId : qualityMonitoringSterilizationID}, + success : function(response,options){ + var result = Ext.decode(response.responseText); + if(result.success){ + Ext.getCmp('tousseAmount').setValue(result.data.goodsAmount || 0); + Ext.getCmp('tousseName').setValue(result.data.tousseName); + } + } + }) + } + }else { + Ext.getCmp('tempBarcode').enable(); + Ext.getCmp('tousseName').enable(); + Ext.getCmp('addExtractCheckTousseBtnC').setVisible(true); + enableExtractCheckTousse(); + } +} + +/** + * 将“重新回收”和“重新装配”及“是否整炉”设置为未选中状态. + */ +function resetRecycleAndRepackingValue(){ + Ext.getCmp('isRecycle').setValue(''); + Ext.getCmp('isRepacking').setValue(''); + Ext.getCmp('isDiscard').setValue(''); + Ext.getCmp('isAllTousseOfSterile').setValue(''); + Ext.getCmp('recycle').setValue(false); + Ext.getCmp('repacking').setValue(false); + Ext.getCmp('disabledBarcode').setValue(false); + Ext.getCmp('allTousseOfSterile').setValue(false); +} + +/** + * 禁用“重新回收”和“重新装配”的复选框. + */ +function disableRecycleAndRepacking(){ + Ext.getCmp('isRecycle').setValue(''); + Ext.getCmp('isRepacking').setValue(''); + Ext.getCmp('isDiscard').setValue(''); + Ext.getCmp('recycle').disable(); + Ext.getCmp('repacking').disable(); + Ext.getCmp('disabledBarcode').disable(); + Ext.getCmp('repacking').setValue(false); + Ext.getCmp('recycle').setValue(false); + Ext.getCmp('disabledBarcode').setValue(false); +} + +/** + * 不能重新回收,可以重新装配. + */ +function disableRecycleCanRepacking(){ + Ext.getCmp('isRecycle').setValue(''); + Ext.getCmp('isRepacking').setValue(''); + Ext.getCmp('recycle').disable(); + Ext.getCmp('repacking').enable(); + Ext.getCmp('recycle').setValue(false); + Ext.getCmp('repacking').setValue(false); +} + +/** + * 启用“重新回收”和“重新装配”的复选框. + */ +function enableRecycleAndRepacking(){ + Ext.getCmp('recycle').enable(); + Ext.getCmp('repacking').enable(); +} + +//SZSDSRMYY-76:获取条码的备注 +function getBarcodeRemark(result){ + if(result.remark !== ''){ + var remark = '【' + result.tousseName + '('+ result.barcode +'):' + result.remark + '】'; + var oldRemark = Ext.getCmp('remark').getValue(); + if(oldRemark == ''){ + var resultRemark = '装配备注:' + remark; + Ext.getCmp('remark').setValue(resultRemark); + }else { + if(oldRemark.indexOf('装配备注:') == -1){ + var resultRemark = '装配备注:' + remark; + Ext.getCmp('remark').setValue(oldRemark + resultRemark); + }else { + Ext.getCmp('remark').setValue(oldRemark + remark); + } + } + } +} + +/** + * 根据“器械包条码”以及“监测项定义id”,获取器械包名字以及监测环节的责任人. + * @param tempBarcode 器械包条码 + * @param qmDefinitionId 监测项定义id + * @param materialDefinitionStore 抽检器械的store + */ +function getTousseInstanceNameAndResponsiblePerson(tempBarcode, qmDefinitionId, materialDefinitionStore,isScan){ + if(tempBarcode){ + Ext.Ajax.request({ + url : WWWROOT + '/disinfectSystem/qualityMonitoringDefinitionAction!getTousseInstanceNameAndResponsiblePerson.do', + params : {barcode : tempBarcode,qmDefinitionId : qmDefinitionId}, + success : function(response,options){ + var result = Ext.decode(response.responseText); + if(result.success){ + //1、设置“器械包名称”、“器械包实例条码”、“器械包实例id”、“器械包类型”、“是否需要回收”、“责任人” + if(tempBarcode != null && tempBarcode != ''){ + if(isScan == true){ + var isScanned = tousseBarcodeIsScanned(tousseAndMaterialWrapperCount,tempBarcode); + if(isScanned){ + //field.setValue(""); + return; + } + } + Ext.getCmp('tousseName').setValue(result.tousseName + "(" + tempBarcode + ")"); + }else{ + Ext.getCmp('tousseName').setValue(result.tousseName); + } + Ext.getCmp('barcode').setValue(tempBarcode); + Ext.getCmp('tousseInstanceId').setValue(result.tousseInstanceId); + Ext.getCmp('tousseType').setValue(result.tousseType); + Ext.getCmp('tousseDefRecycling').setValue(result.isRecycle); + if((result.responsiblePerson || '') !== ''){ + Ext.getCmp('responsiblePerson').setValue(result.responsiblePerson); + } + + //2、如果有炉号炉次,则需要设值 + if(!isUndefinedOrNullOrEmpty(Ext.getCmp('configItemOptionSterName'))){ + Ext.getCmp('configItemOptionSterName').setValue(result.sterilizerName); + Ext.getCmp('configItemOptionSterFre').setValue(result.sterileFrequency); + } + + + //3、设值包定义id,并且材料要与此包定义关联 + if(result.tousseDefinitionId){ + Ext.getCmp('tousseDefinitionId').setValue(result.tousseDefinitionId); + if(materialDefinitionStore){ + materialDefinitionStore.reload(); + } + }else if(materialDefinitionStore){ + Ext.getCmp('tousseDefinitionId').setValue(''); + } + if(isScan){ + getBarcodeRemark(result); + } + + //4、控制“重新回收”和“重新装配”的复选框的是否可用. + updateControlStatus(); + Ext.getCmp('disabledBarcode').enable(); + Ext.getCmp('disabledBarcode').setValue(false); + Ext.getCmp('isDiscard').setValue(''); + }else{ + if(result.message){ + showResultQM(result.message); + }else{ + showResultQM("找不到该条码所对应的器械包实例"); + } + } + }, + failure : function(response, options) { + var result = Ext.decode(response.responseText); + if(result.message){ + showResultQM(result.message); + }else{ + showResultQM('系统加载出错,请稍候再试'); + } + } + }); + } +} +function getPostionByBasketBarcode(tempBarcode,positionId){ + if(tempBarcode){ + Ext.Ajax.request({ + url : WWWROOT + '/disinfectSystem/qualityMonitoringDefinitionAction!getPostionMsg.do', + params : {barcode : tempBarcode,qualityMonitoringWRRecordID : qualityMonitoringWRRecordID}, + success : function(response,options){ + var result = Ext.decode(response.responseText); + if(result.success){ + if(result.positionMsg){ + Ext.getCmp(positionId).setValue(result.positionMsg); + } + }else{ + if(result.message){ + showResultQM(result.message); + }else{ + showResultQM("找不到该条码所对应的篮筐实例"); + } + } + }, + failure : function(response, options) { + var result = Ext.decode(response.responseText); + if(result == null || result.message == null){ + showResultQM('系统加载出错,请稍候再试'); + }else{ + showResultQM(result.message); + } + } + }); + } +} + +function getShowBtn(addExtractClick,btnShowOrHide){ + if(addExtractClick == true || btnShowOrHide == true){ + return true; + }else{ + return false; + } +} + +function addMaterialItems(id,showBtn,items,items5,items1,items2,items3,items4){ + Ext.getCmp(id).add(items); + if(showBtn){ + Ext.getCmp(id).add(items5); + } + Ext.getCmp(id).add(items1); + Ext.getCmp(id).add(items2); + Ext.getCmp(id).add(items3); + Ext.getCmp(id).add(items4); +} + +/* + 添加抽检器械和数量 + isWrapper 是否是监测项后面的按钮 + isTousseAndMaterial 监测是否是器械包和材料 true是,false不是 + amount 当前点击的是哪一个器械包信息块的编号 + tosseAndMaterialId 材料和器械包的id + btnShowOrHide 如果监测项是材料和器械包的话要在抽检器械后面显示添加按钮 + amountChild 当前在信息块里面是第几个 + isLoad 是否是加载 + */ +function addExtractCheckMaterial(isOpenRecord,mateialName,count,basketPosition,orderNumber,isWrapper,isTousseAndMaterial,amount,tosseAndMaterialId,btnShowOrHide,amountChild,isLoad,tousseItemCount){ + materialItemCount++; + var tousseAndMaterial = Ext.getCmp('tosseAndMaterial'); + var mCount = 1; + if(count != null && count != 'undefined'){ + mCount = count; + } + + var rememberNum = tousseAndMaterialWrapperCount;//记住当前在哪一个器械包信息块 + var rememberChildCurNum = materialItemCount; //记住当前在信息块里面是第几个 + + var items = new Array(); + var items1 = new Array(); + var items2 = new Array(); + var items3 = new Array(); + var items5 = new Array(); + + materialDefinitionAddStore = new Ext.data.Store({ + proxy : new Ext.data.HttpProxy({ + url : WWWROOT + '/disinfectSystem/baseData/materialDefinitionAction!getMaterialDefinitionDataIncludeForeignMD.do?selectType=material', + method : 'POST' + }), + reader : new Ext.data.JsonReader({ + totalProperty : 'totalCount', + root : 'data' + }, [ + {name : 'id',mapping : 'id'}, + {name : 'spelling',mapping : 'spelling'}, + {name : 'name',mapping : 'name'}, + {name : 'count',mapping : 'count'} + ]), + listeners : { + beforeload : function(thiz, options){ + if(tousseItemCount == 0){ + thiz.baseParams['tousseDefinitionId'] = Ext.getCmp('tousseDefinitionId').getValue(); + }else if(tousseItemCount !== undefined){ + thiz.baseParams['tousseDefinitionId'] = Ext.getCmp('tousseDefinitionId'+tousseItemCount).getValue(); + } + } + } + }); + + items = { + layout : 'form', + id : 'materialC'+materialItemCount, + columnWidth : .36, + labelWidth : 90, + height:setH, + items : [{ + xtype : 'combo', + id : 'material'+tousseItemCount+'_'+materialItemCount, + name : 'material'+tousseItemCount+'_'+materialItemCount, + fieldLabel : '抽检器械', + queryParam : 'spell', + minChars : 0, + valueField : 'id', + displayField : 'name', + store : materialDefinitionAddStore, + value : mateialName, + forceSelection : true, + lazyInit : true, + triggerAction : 'all', + hideTrigger : true, + typeAhead : false, + anchor : '95%', + listeners : { + select : function(combo, record, index) { + combo.setValue(record.data.name); + } + } + }] + }; + + if(addExtractClick == true || btnShowOrHide == true){ + items5 = { + layout : 'form', + columnWidth:.04, + labelWidth : 90, + height:setH, + id:"addExtractCheckMaterialBtnC"+materialItemCount,//materialItemCount这里必须取这个,不然id会重复 + items : [{ + xtype:'button', + tooltip : '添加抽检器械', + iconCls : 'btn_ext_add', + handler : function(){ + widthSet = true; + var amountClick = rememberNum; + var rememberChildCurNum2 = rememberChildCurNum; + var isTousseAndMaterialVal = ""; + if(isTousseAndMaterial){ + isTousseAndMaterialVal = true; + } + addExtractCheckMaterial("","",1,"","",true,isTousseAndMaterialVal,amountClick,"","",rememberChildCurNum2,"",tousseItemCount); + widthSet = false; + } + }] + }; + } + + var columnW = 0.32; + var labelW = 91; + var positionlabelW = 123; + if(widthSet == true){ + columnW = 0.36; + if(recycleQM == true){ + labelW = 129; + }else{ + labelW = 124; + } + + }else if(isLoad == true){ + positionlabelW = 92; + } + + items1 = { + layout : 'form', + id : 'materialAmountC'+materialItemCount, + columnWidth :columnW, + labelWidth : labelW, + height:setH, + items : [{ + xtype : 'numberfield', + allowDecimals : false, + name : 'materialAmount'+materialItemCount, + id : 'materialAmount'+materialItemCount, + fieldLabel : "器械数量", + value : mCount, + allowBlank : true, + blankText : '数量不能为空', + anchor : '95%' + }] + }; + items2 = { + layout : 'form', + hidden : !(qualityMonitoringWRRecordID > 0 && (sstsConfig.hasOwnProperty('haveRinserPosition')) && sstsConfig.haveRinserPosition), + id : 'basketBarcodeC'+materialItemCount, + columnWidth : .36, + labelWidth : 90, + height:setH, + items : [{ + xtype : 'textfield', + name : 'basketBarcode'+materialItemCount, + id : 'basketBarcode'+materialItemCount, + fieldLabel : "篮筐条码", + anchor : '95%', + listeners : { + specialkey : function(field,e){ + if(e.getKey() == 13){ + var idName = field.getId().replace("basketBarcode","position"); + getPostionByBasketBarcode(field.getValue(),idName); + field.setValue(''); + } + } + } + }] + }; + + items3 = { + layout : 'form', + hidden : !(qualityMonitoringWRRecordID > 0 && (sstsConfig.hasOwnProperty('haveRinserPosition')) && sstsConfig.haveRinserPosition), + id : 'positionC'+materialItemCount, + columnWidth : .36, + labelWidth : positionlabelW, + height:setH, + items : [{ + xtype : 'textfield', + name : 'position'+materialItemCount, + id : 'position'+materialItemCount, + editable : false, + fieldLabel : "位置", + anchor : '95%' + }] + }; + var items4 = new Array(); + items4 = { + xtype : 'hidden', + name : 'materialOrder'+materialItemCount, + id : 'materialOrder'+materialItemCount + }; + if(isWrapper){//整块 + var setLayoutVal; + var setLayoutList; + var tosseAndMaterialVal; + if(isTousseAndMaterial){//器械包和材料 + if(amount){//里面点击器械包条码添加的器械包和材料 + if(tousseAndMaterialWrapperCount > 0){ + for(var i=1;i 0){ + for(var i=1;i 0){ + if(Ext.getCmp('materialOrder'+materialItemCount)){ + Ext.getCmp('materialOrder'+materialItemCount).setValue(orderNumber); + } + } + if(isOpenRecord == true && mateialName != null && mateialName != ''){ + //打开记录,不允许修改 + Ext.getCmp('material'+tousseItemCount+'_'+materialItemCount).disable(); + Ext.getCmp('materialAmount'+materialItemCount).disable(); + Ext.getCmp('basketBarcode'+materialItemCount).disable(); + Ext.getCmp('position'+materialItemCount).disable(); + } +} + +// 隐藏第一个器械包信息,包括器械包条码,数量 +function hideFirstTousse(){ + Ext.getCmp('tousseBarcodeC').setVisible(false); + Ext.getCmp('tousseNameC').setVisible(false); + Ext.getCmp('tousseAmountC').setVisible(false); + Ext.getCmp('addExtractCheckTousseBtnC').setVisible(false); +} + +//显示第一个器械包信息,包括器械包条码,数量 +function showFirstTousse(){ + Ext.getCmp('tousseBarcodeC').setVisible(true); + Ext.getCmp('tousseNameC').setVisible(true); + if(Ext.getCmp('barcode').getValue() != ""){ + Ext.getCmp('barcode').setValue(""); + } + + if(Ext.getCmp('tousseInstanceId').getValue() != ""){ + Ext.getCmp('tousseInstanceId').setValue(""); + } + if(Ext.getCmp('tousseType').getValue() != ""){ + Ext.getCmp('tousseType').setValue(""); + } + if(Ext.getCmp('tousseDefRecycling').getValue() != ""){ + Ext.getCmp('tousseDefRecycling').setValue(""); + } + if(newTousseItems.length > 0){ + Ext.getCmp('tousseDefinitionId').setValue(newTousseItems[0].tousseID); + Ext.getCmp('tousseName').setValue(newTousseItems[0].tousseName); + var responsibilityPart = Ext.getCmp('responsibilityPart').getValue(); + if(responsibilityPart == '装配管理'){ + Ext.getCmp('responsiblePerson').setValue(newTousseItems[0].data['operator']); + Ext.getCmp('tousseDefinitionId').setValue(newTousseItems[0].data['tousseDefinition.id']); + var barcode = newTousseItems[0].data['barcode'] || '' + if(barcode == ''){ + Ext.getCmp('tousseName').setValue(newTousseItems[0].data['tousseDefinition.name']); + }else { + getTousseInstanceNameAndResponsiblePerson(barcode, newTousseItems[0].data['tousseDefinition.id'], materialDefinitionStore,true); + } + } + newTousseItems = []; + }else { + if(Ext.getCmp('tousseDefinitionId').getValue() != ""){ + Ext.getCmp('tousseDefinitionId').setValue(""); + } + + if(Ext.getCmp('tousseName').getValue() != ""){ + Ext.getCmp('tousseName').setValue(""); + } + } + + //2、如果有炉号炉次,则需要设值 + if(!isUndefinedOrNullOrEmpty(Ext.getCmp('configItemOptionSterName'))){ + Ext.getCmp('configItemOptionSterName').setValue(""); + Ext.getCmp('configItemOptionSterFre').setValue(""); + } + Ext.getCmp('tousseAmountC').setVisible(true); + //Ext.getCmp('addExtractCheckMaterialBtnC').setVisible(true); + Ext.getCmp('addExtractCheckTousseBtnC').setVisible(true); +} + +//隐藏第一个材料信息,包括器械包条码,数量 +function hideFirstMaterial(){ + Ext.getCmp('materialC').setVisible(false); + Ext.getCmp('materialAmountC').setVisible(false); + Ext.getCmp('addExtractCheckMaterialBtnC').setVisible(false); +} +//显示第一个材料信息,包括器械包条码,数量 +function showFirstMaterial(){ + Ext.getCmp('materialC').setVisible(true); + Ext.getCmp('materialAmountC').setVisible(true); + Ext.getCmp('addExtractCheckMaterialBtnC').setVisible(true); +} + +function hideExtractCheckMaterial(){ + if(materialItemCount > 0){ + for(var m =1;m 0){ + for(var i=1;i 0){ + for(var i=1;i 0){ + for(var i=1;i 0){ + for(var i=1;i 0){ + for(var i=1;i 0){ + for(var i=1;i 0){ + for(var i=1;i 0){ + for(var i=1;i 0){ + for(var j=1;j 0){ + for(var k=1;k 0){ + for(var i=1;i 0){ + for(var k=1;k 0){ + for(var k=1;k 0){ + for(var k = 1;k <= tousseAndMaterialWrapperCount;k++){//先找到每一个块 + if(Ext.getCmp("scope").getValue() == "材料和器械包"){ + if(Ext.getCmp('tousseInfoFieldSet'+ k +'_TMP')){ + var tousseAndMaterialWrpperItems = Ext.getCmp('tosseAndMaterial'+k+'_TMP').items.items; + for(var z = 0; z < tousseAndMaterialWrpperItems.length;z++){ + var otherParentId = tousseAndMaterialWrpperItems[z].id; + if(otherParentId.indexOf("tousseBarcodeC") != -1){//找到器械包条码的input + if(tousseAndMaterialWrpperItems[z].items.items[0].fieldLabel == "器械包条码"){ + arr.push(tousseAndMaterialWrpperItems[z].items.items[0].id);//拿到所有的器械包条码的id + } + } + } + } + }else if(Ext.getCmp("scope").getValue() == "器械包"){ + if(Ext.getCmp('tosseAndMaterial'+k+'_TP')){ + var tousseWrpperItems = Ext.getCmp('tosseAndMaterial'+k+'_TP').items.items; + for(var j = 0; j < tousseWrpperItems.length;j++){ + var otherParentId = tousseWrpperItems[j].id; + if(otherParentId.indexOf("tousseBarcodeC") != -1){//找到器械包条码的input + if(tousseWrpperItems[j].items.items[0].fieldLabel == "器械包条码"){ + arr.push(tousseWrpperItems[j].items.items[0].id);//拿到所有的器械包条码的id + } + } + } + } + } + } + } + + for(var t = 0; t < arr.length;t++){ + if(field.id == arr[t]){//如果所有的器械包条码的id和当前输入的这个相等,那么就让当前的下一个获取焦点 + var nextField = arr[t+1];//下一个 + if(Ext.getCmp(nextField)){ + Ext.getCmp(nextField).focus(false, 100);//获取下一个焦点 + break; + } + } + } +} + +/* + 判断器械包条码是否已经扫描过了,扫描过了不允许在扫描,给出提示 + tousseAndMaterialWrapperCount 增加的块的个数 + curBarcode 当前扫的条码 + */ +function tousseBarcodeIsScanned(tousseAndMaterialWrapperCount,curBarcode){ + var isScanned = false;//是否已经扫描 + var addNum = tousseAndMaterialWrapperCount;//获取添加的块数量 + var scannedBarcodeArr = null; + //先获取写死的第一个 + if(Ext.getCmp("scope").getValue() == "材料和器械包" || Ext.getCmp("scope").getValue() == "器械包"){ + var barcode = Ext.getCmp('barcode').getValue(); + if(barcode !=""){ + scannedBarcodeArr = barcode.split(","); + } + + //获取第一块添加的 + var firstArr = []; + var firstItems = Ext.getCmp('tosseAndMaterial').items.items; + for(var y = 0; y < firstItems.length;y++){ + var firstParentId = firstItems[y].id; + if(firstParentId.indexOf("tempBarcodeHidden") != -1){ + firstArr.push(firstItems[y].id); + } + } + + var firstBarcode = null; + if(firstArr.length > 0){ + for(var f = 0;f < firstArr.length;f++){ + if(firstBarcode == null){ + firstBarcode= Ext.getCmp(firstArr[f]).getValue(); + if(scannedBarcodeArr == null){ + scannedBarcodeArr = firstBarcode.split(","); + }else{ + scannedBarcodeArr = scannedBarcodeArr.concat(firstBarcode.split(",")); + } + }else{ + firstBarcode = firstBarcode + ","+Ext.getCmp(firstArr[f]).getValue(); + if(scannedBarcodeArr == null){ + scannedBarcodeArr = firstBarcode.split(","); + }else{ + scannedBarcodeArr = scannedBarcodeArr.concat(firstBarcode.split(",")); + } + } + + } + } + + if(addNum > 0){//增加的每块 + for(var k = 1;k <= addNum;k++){//先找到每一个块 + var wrapper; + var scannedBarcode; + if(Ext.getCmp("scope").getValue() == "材料和器械包"){ + if(Ext.getCmp('tousseInfoFieldSet'+ k +'_TMP')){ + var wrapperParent = Ext.getCmp('tousseInfoFieldSet'+ k +'_TMP');//最外层 //包和材料 + wrapper = Ext.getCmp('tosseAndMaterial'+k+'_TMP').items.items; + scannedBarcode = getTousseBarcode(wrapper); + if(scannedBarcodeArr == null){ + scannedBarcodeArr = scannedBarcode.split(","); + }else{ + scannedBarcodeArr = scannedBarcodeArr.concat(scannedBarcode.split(",")); + } + } + }else if(Ext.getCmp("scope").getValue() == "器械包"){ + if(Ext.getCmp('tosseAndMaterial'+k+'_TP')){ + wrapper = Ext.getCmp('tosseAndMaterial'+k+'_TP').items.items; + scannedBarcode = getTousseBarcode(wrapper); + if(scannedBarcodeArr == null){ + scannedBarcodeArr = scannedBarcode.split(","); + }else{ + scannedBarcodeArr = scannedBarcodeArr.concat(scannedBarcode.split(",")); + } + } + + } + } + } + if(scannedBarcodeArr && scannedBarcodeArr.length > 0){ + var uniqueScannedBarcode = unique(scannedBarcodeArr); + for(var q = 0;q 0){ + for(var i=1;i<=materialItemCount;i++){ + if(Ext.getCmp('material'+index+'_'+i)){ + Ext.getCmp('material'+index+'_'+i).store.reload(); + } + } + } + } + } + }, + anchor : '95%' + }] + }; + + if(addTousseClick){ + items10 = { + layout : 'form', + columnWidth:.04, + labelWidth : 90, + height:setH, + id:"addExtractCheckTousseBtnC"+tousseAndMaterialWrapperCount, + items : [{ + xtype:'button', + tooltip : '添加抽检器械包', + iconCls : 'btn_ext_add', + id:'addButton', + handler : function(field,e){ + widthSetTousse = true; + var rememberNum2 = rememberNum; + var isTousseAndMaterialVal = ""; + if(isTousseAndMaterial){ + isTousseAndMaterialVal = true; + } + + addExtractCheckTousse("","","","","","","","",true,isTousseAndMaterialVal,rememberNum2,"",""); + widthSetTousse = false; + var addBtn = ""; + if(Ext.getCmp("scope").getValue() == "材料和器械包"){ + widthSetTousse = false; + widthSet = false; + addBtn = true; + addExtractCheckMaterial("","",1,"","",true,isTousseAndMaterialVal,rememberNum2,"",addBtn,"","",tousseItemCount); + widthSetTousse = false; + } + + Ext.getCmp('addQualityMonitoringForm').doLayout(); + + } + }] + }; + } + + var columnW = 0.4; + var labelW = 90; + if(widthSetTousse == true){ + if(recycleQM == true){ + columnW = 0.439; + labelW = 129; + }else{ + columnW = 0.44; + labelW = 123; + } + }else if(widthSetTousse == false ){ + if(addTousseClick == true){ + columnW = 0.4; + labelW = 90; + }else{ + columnW = 0.44; + labelW = 123; + if(isLoad){ + columnW = 0.4; + labelW = 90; + } + } + }else if(isLoad == true){ + columnW = 0.44; + labelW = 126; + } + items4 = { + layout : 'form', + id : 'tousseBarcodeC'+tousseItemCount+"_"+3, + labelWidth : labelW, + columnWidth : columnW, + height:setH, + items : [{ + xtype : 'combo', + id : 'tempBarcode'+tousseItemCount+"_"+3, + name : 'tempBarcode'+tousseItemCount+"_"+3, + fieldLabel : '器械包名称', + queryParam : 'spell', + minChars : 0, + valueField : 'name', + displayField : 'name', + store : tousseDefinitionStore, + forceSelection : true, + lazyInit : true, + triggerAction : 'all', + hideTrigger : true, + typeAhead : false, + anchor : '95%', + listeners : { + select : function(combo, record,index) { + combo.setValue(record.data.name); + var z = combo.id.split('_')[0].replace('tempBarcode',''); + Ext.getCmp('tousseDefinitionId'+z).setValue(record.data.id); + }, + blur : function(field){ + var index = field.id.split('_')[0].replace('tempBarcode',''); + if(!Ext.getCmp('tempBarcode'+index+'_3').getRawValue()){ + Ext.getCmp('tousseDefinitionId'+index).setValue(''); + } + //重新加载包内的材料 + if(materialItemCount > 0){ + for(var i=1;i<=materialItemCount;i++){ + if(Ext.getCmp('material'+index+'_'+i)){ + Ext.getCmp('material'+index+'_'+i).store.reload(); + } + } + } + } + } + },{ + xtype:'hidden', + fieldLabel : '器械包ID', + id:'tousseDefinitionId'+tousseItemCount, + name:'tousseDefinitionId'+tousseItemCount + }] + }; + var items5 = new Array(); + items5 = { + layout : 'form', + id : 'tousseBarcodeC'+tousseItemCount+"_"+6, + labelWidth : 90, + columnWidth : .2, + height:setH, + items : [{ + xtype : 'textfield', + name : 'tempBarcode'+tousseItemCount+"_"+6, + id : 'tempBarcode'+tousseItemCount+"_"+6, + fieldLabel : "器械包数量", + value : 1, + anchor : '95%' + }] + }; + // 包实例id + var items6 = new Array(); + items6 = { + id : 'tempBarcode'+tousseItemCount+"_"+5, + name : 'tempBarcode'+tousseItemCount+"_"+5, + xtype : 'hidden' + }; + + // 重新回收的值 + var items7 = new Array(); + items7 = { + xtype : 'hidden', + name : 'tempBarcode'+tousseItemCount+"_"+7, + id : 'tempBarcode'+tousseItemCount+"_"+7 + }; + //重新装配的值 + var items8 = new Array(); + items8 = { + xtype : 'hidden', + name : 'tempBarcode'+tousseItemCount+"_"+8, + id : 'tempBarcode'+tousseItemCount+"_"+8 + }; + //废弃条码的值 + var items13 = new Array(); + items13 = { + xtype : 'hidden', + name : 'tempBarcode'+tousseItemCount+"_"+13, + id : 'tempBarcode'+tousseItemCount+"_"+13 + }; + var items9 = new Array(); + items9 = { + xtype : 'hidden', + name : 'tousseOrder'+tousseItemCount, + id : 'tousseOrder'+tousseItemCount + }; + //器械包条码 + var items11 = new Array(); + items11 = { + xtype : 'hidden', + name : 'tempBarcodeHidden'+tousseItemCount+"_"+1, + id : 'tempBarcodeHidden'+tousseItemCount+"_"+1 + }; + + if(isWrapper){//器械包信息整块 + var setLayoutVal; + var setLayoutList; + var tosseAndMaterialVal; + if(isTousseAndMaterial){//监测项是器械包和材料 + if(amount){//点击器械包条码后的添加按钮添加的器械包和材料,就是添加里面 + if(tousseAndMaterialWrapperCount > 0){ + for(var i=1;i 0){ + for(var i=1;i 1280) ? 182 : labelWidthLeft, + height:setH, + items : [{ + xtype : 'combo', + fieldLabel : "责任环节", + valueField : 'value', + displayField : 'value', + store : new Ext.data.SimpleStore({ + fields : [ 'value' ], + data : [[moduleNameArr[0]],[moduleNameArr[1]],[moduleNameArr[2]],[moduleNameArr[3]],[moduleNameArr[4]],[moduleNameArr[5]],[moduleNameArr[8]],[moduleNameArr[9]],['全部环节']] + }), + value : '', + triggerAction : 'all', + editable : false, + forceSelection : false, + mode : 'local', + name : "responsibilityPart", + id : "responsibilityPart", + listeners : { + beforequery:function(queryEvent){ + + if(id != "" && id != 0){ + return false; + } + }, + select : function(combo,record,index){ + responPartName = combo.getValue(); + if('全部环节' == responPartName){ + formDefinitionStore.baseParams.responsiblePerson = ""; + }else{ + formDefinitionStore.baseParams.responsiblePerson = responPartName; + } + formDefinitionStore.load(); + // 置空监测项 + Ext.getCmp('formName').setValue(""); + Ext.getCmp("formDefinitionId").setValue(""); + Ext.getCmp("name").setValue(""); + } + }, + anchor : '95%' + }] + }; +} +// 监测项带出责任环节的配置 +function getResponsibilityPartContent1(){ + return { + layout : 'form', + columnWidth : .5, + labelWidth : 90, + items : [{ + xtype : 'textfield', + anchor : '95%', + disabled : true, + fieldLabel : "责任环节", + editable : false, + name : "responsibilityPart", + id : "responsibilityPart", + anchor : '95%' + }] + }; +} + +/* + 添加器械信息和重复填写的监测项 + * formId 监测项id + * formVal 监测项名称 +*/ + +function addQualityMonitoringAndTousselMsg(formId,formVal){ + tousseAndMaterialWrapperCount++; + // 质量监测添加‘无’这个项. + if(formVal == '无'){ + addExtractCheckMaterial(); + return; + } + Ext.Ajax.request({ + url : WWWROOT + '/disinfectSystem/formDefinitionAction!loadFormDefinitionWithRepeateItem.do',//后台接口可能需要重写,需要返回监测项的类型和重复填写的监测项信息 + params : { + id : formId, + clickAmount:tousseAndMaterialWrapperCount + }, + success : function(response,options){ + var result = Ext.decode(response.responseText); + if(result.success){ + if(result.data.scope == "器械包"){ + addTousseClick = true; + addExtractCheckTousse("","","","","","","","",true,"","","",""); + addTousseClick = false; + }else if(result.data.scope== "材料"){ + addExtractClick = true; + addExtractCheckMaterial("","",1,"","",true,"","","","","","",tousseItemCount); + addExtractClick = false; + }/* else if(result.data.scope == "灭菌炉记录"){ + showResultQM('监测项为灭菌炉记录不能添加器械和器械包!'); + } */else if(result.data.scope == "材料和器械包"){ + widthSet = ""; + addTousseClick = true; + addExtractClick = true; + Ext.getCmp('addQualityMonitoringForm').add({ + id : 'tousseInfoFieldSet'+tousseAndMaterialWrapperCount+'_TMP', + xtype:"fieldset", + labelAlign :'left', + title:"器械包信息", + autoHeight:true, + items:[{ + layout : 'column', + columnWidth : .5, + labelWidth : 90, + width:recycleQM ? getWidth : "", + id:'setLayout'+tousseAndMaterialWrapperCount+'_TMP' + }] + }); + tosseAndMaterialWrapper = { + layout : 'column', + columnWidth : 1, + labelWidth : 90, + id: 'tosseAndMaterial'+tousseAndMaterialWrapperCount+'_TMP' + }; + + var setLayoutVal = 'setLayout'+tousseAndMaterialWrapperCount+'_TMP'; + var setLayoutList = tosseAndMaterialWrapper; + var tosseAndMaterialId = 'tosseAndMaterial'+tousseAndMaterialWrapperCount+'_TMP'; + + Ext.getCmp(setLayoutVal).add(setLayoutList); + Ext.getCmp('setLayout'+tousseAndMaterialWrapperCount+'_TMP').doLayout(); + addExtractCheckTousse("","","","","","","","",true,true,"",tosseAndMaterialId,""); + addTousseClick = false; + addExtractCheckMaterial("","",1,"","",true,true,"",tosseAndMaterialId,"","","",tousseItemCount); + addExtractClick = false; + Ext.getCmp('addQualityMonitoringForm').doLayout(); + + }else if(result.data.scope == "无"){ + addExtractClick = true; + addExtractCheckMaterial("","",1,"","",true,"","","","","","",tousseItemCount); + addExtractClick = false; + } + + if(result.data.items.length > 0){ + var items = new Array(); + // 如果显示炉次炉号,添加表单 + if(result.data.showSterilizerNumFrequency == '是'){ + items.push(createQualityMonitoringElementSterName('',true,tousseAndMaterialWrapperCount)); + items.push(createQualityMonitoringElementSterFre('',true,tousseAndMaterialWrapperCount)); + } + for(var i = 0 ; i< result.data.items.length ; i++){ + var item = result.data.items[i]; + if(Ext.getCmp('optionAmount').getValue() == null || Ext.getCmp('optionAmount').getValue() == ''){ + Ext.getCmp('optionAmount').setValue(item.id); + }else{ + Ext.getCmp('optionAmount').setValue(Ext.getCmp('optionAmount').getValue()+';'+item.id); + } + var allowBlank = result.data.items[i].requirement == '必填'?false:true; + items.push(createQualityMonitoringItemElement(item.type,item.id,item.name,allowBlank,item.optionsJson,null,item.isTriggerItem)); + if(result.data.items[i].type == '多选'){ + items.push({ + columnWidth : 1, + xtype : "label", + html : ' ', + anchor : '95%' + }); + } + } + + if(items.length > 0){ + Ext.getCmp('addQualityMonitoringForm').add({ + id :'itemsFieldSet'+"_"+tousseAndMaterialWrapperCount, + xtype:"fieldset", + labelAlign :'left', + title:"监测项", + layout:'column', + autoHeight:true, + width:recycleQM ? getWidth : "", + items:items + }); + } + } + + Ext.getCmp('addQualityMonitoringForm').doLayout(); + if(Ext.getCmp('itemsFieldSet'+"_"+tousseAndMaterialWrapperCount)){ + Ext.getCmp('itemsFieldSet'+"_"+tousseAndMaterialWrapperCount).doLayout(); + } + + if(Ext.getCmp('tousseInfoFieldSet')){ + Ext.getCmp('tousseInfoFieldSet').doLayout(); + } + } + }, + failure : function(response, options) { + showResultQM('系统加载出错,请稍候再试'); + } + }); +} + + +function showRecyclingInventoryItem(){ + Ext.getCmp("idCardAndTousseBarcodeWrapper").show(); + Ext.getCmp("tousseNameBasicsWrapper").show() + Ext.getCmp("recyclePersonWrapper").show(); + Ext.getCmp("recycleDepartmentsWrapper").show(); + Ext.getCmp("operationRoomWrapper").show(); + Ext.getCmp("nurseWrapper").show(); + Ext.getCmp("recycleTimeWrapper").show(); +} + +function hideRecyclingInventoryItem(){ + Ext.getCmp("idCardAndTousseBarcodeWrapper").hide(); + Ext.getCmp("tousseNameBasicsWrapper").hide(); + Ext.getCmp("recyclePersonWrapper").hide(); + Ext.getCmp("recycleDepartmentsWrapper").hide(); + Ext.getCmp("operationRoomWrapper").hide(); + Ext.getCmp("nurseWrapper").hide(); + Ext.getCmp("recycleTimeWrapper").hide(); +} + +function showCleanAndDisinfectionItem(){ + Ext.getCmp("rinseBasketsBarcodeWrapper").show();//显示清洗篮筐条码和名称 + Ext.getCmp("rinseBasketsNameWrapper").show(); + Ext.getCmp("cleaningMachinePositionWrapper").show(); + Ext.getCmp("cleaningMachineDateWrapper").show(); + Ext.getCmp("cleaningMachineNameWrapper").show(); + Ext.getCmp("cleaningMachineProgramNameWrapper").show(); + Ext.getCmp("cleaningStartTimeWrapper").show(); + Ext.getCmp("cleaningEndTimeWrapper").show(); +} + +function hideCleanAndDisinfectionItem(){ + Ext.getCmp("rinseBasketsBarcodeWrapper").hide();//显示清洗篮筐条码和名称 + Ext.getCmp("rinseBasketsNameWrapper").hide(); + Ext.getCmp("cleaningMachinePositionWrapper").hide(); + Ext.getCmp("cleaningMachineDateWrapper").hide(); + Ext.getCmp("cleaningMachineNameWrapper").hide(); + Ext.getCmp("cleaningMachineProgramNameWrapper").hide(); + Ext.getCmp("cleaningStartTimeWrapper").hide(); + Ext.getCmp("cleaningEndTimeWrapper").hide(); +} + +function showSterilizationItem(){ + Ext.getCmp("tousseBarcodeWrapper").show(); + Ext.getCmp("sterilizationNameWrapper").show(); + Ext.getCmp("sterilizationProgramNameWrapper").show(); + Ext.getCmp("heatWrapper").show(); + Ext.getCmp("sterilizationStartTimeWrapper").show(); + Ext.getCmp("sterilizationEndTimeWrapper").show(); +} + +function hideSterilizationItem(){ + Ext.getCmp("tousseBarcodeWrapper").hide(); + Ext.getCmp("sterilizationNameWrapper").hide(); + Ext.getCmp("sterilizationProgramNameWrapper").hide(); + Ext.getCmp("heatWrapper").hide(); + Ext.getCmp("sterilizationStartTimeWrapper").hide(); + Ext.getCmp("sterilizationEndTimeWrapper").hide(); +} + +var tosseAndMaterialWrapper; +/** + * 获取监测项的combo. + * @param id 质量监测实例id + * @returns + */ + +function getInspectItemContent(id){ + return { + layout : 'form', + columnWidth : .5, + labelWidth : (recycleQM && top.screen.width > 1280) ? 182 : labelWidthLeft, + height:setH, + items : [{ + layout: 'column', + columnWidth:1, + //height:25, + items:[{ + layout : 'form', + columnWidth: .88, + items:[{ + xtype : 'combo', + id : 'formName', + name : 'formName', + queryParam : 'spell', + fieldLabel : '监测项', + minChars : 0, + valueField : 'id', + displayField : 'name', + anchor : '95%', + store : formDefinitionStore, + lazyInit : true, + forceSelection : true, + triggerAction : 'all', + hideTrigger : false, + typeAhead : false, + allowBlank : false, + listeners : { + beforequery:function(queryEvent){ + if(id != "" && id != 0){ + return false; + } + }, + beforeselect : function(combo, record, index) { + if(record.data.name != combo.getValue()){ + if(Ext.getCmp('barcode').getValue()){ + getTousseInstanceNameAndResponsiblePerson(Ext.getCmp('barcode').getValue(), combo.getValue(), null,false); + } + } + }, + select : function(combo,record,index){ + // tousseAndMaterialWrapperCount = 0; + Ext.getCmp("formDefinitionId").setValue(combo.getValue()); + Ext.getCmp("name").setValue(combo.getRawValue()); + addQualityMonitoringItem(combo.getValue(),combo.getRawValue()); + } + } + }] + + }, + { + layout : 'form', + columnWidth:.12, + id:"addBtnAll", + items : [{ + xtype:'button', + tooltip : '添加监测元素信息', + iconCls : 'btn_ext_add', + handler : function(){ + var formId = Ext.getCmp("formDefinitionId").getValue(); + var formVal = Ext.getCmp("name").getValue(); + if(formVal== ""){ + showResultQM("监测项为空时不能添加监测元素信息!"); + return; + } + addQualityMonitoringAndTousselMsg(formId,formVal); + } + }] + }] + }] + }; +} + +/** + * 添加或者修改质量监测实例(各个生产环节填写的质量监测也是会调用这里的) + * @param {质量监测实例id} id + * @param {质量监测定义id} formDefinitionId + * @param {质量监测定义名称} formDefinitionName + * @param {清洗记录的ID} washRecordId + * @param {选中的器械包数组} tousseItems + */ +function addQualityMonitoring(id,formDefinitionId,formDefinitionName,washRecordId,tousseItems) { + if(id==null||id=='undentified'){ + id=""; + } + materialItemCount=0; + tousseItemCount=0; + tousseAndMaterialWrapperCount=0; + if(id==undefined || id == "" || id < 0){ + disableShowImageButton = true; + }else{ + disableShowImageButton = false; + } + + formPanel = getFormPanelContent(id); + qualityMonitoringWin = new Ext.Window({ + id : 'qualityMonitoringWin', + layout : 'fit', + title : '质量监测信息', + width : 900, + modal : true, + autoHeight : true, + border : false, + plain : true, + draggable:false, + items : [ formPanel ] + }); + qualityMonitoringWin.show(); + if(id != null && id != ''){ + Ext.getCmp('formName').addClass("fieldReadOnlyNoRemove"); + Ext.getCmp('responsibilityPart').addClass("fieldReadOnlyNoRemove"); + Ext.Ajax.request({ + url : WWWROOT + '/disinfectSystem/qualityMonitoringInstanceAction!loadQualityMonitoringInstance.do', + params : {id : id}, + success : function(response,options){ + var result = Ext.decode(response.responseText); + if(result.success){ + if(result.data.status == '已审核'){ + Ext.getCmp('saveAndCreateBtn').hide(); + Ext.getCmp('saveBtn').hide(); + }else { + Ext.getCmp('saveAndCreateBtn').show(); + Ext.getCmp('saveBtn').show(); + } + Ext.getCmp('id').setValue(result.data.id); + Ext.getCmp('formName').setValue(result.data.name); + Ext.getCmp('formName').setEditable(false); + Ext.getCmp('name').setValue(result.data.name); + Ext.getCmp('type').setValue(result.data.type); + Ext.getCmp('srDateTime').setValue(result.data.sterilizerDate); + //Ext.getCmp('sterilizerName').setValue(result.data.sterilizerName);//DGZYY-161不要了 + //Ext.getCmp('sterilizerFre').setValue(result.data.sterilizerFrequency);//DGZYY-161不要了 + Ext.getCmp('errorDamageQmKey').setValue(result.data.errorDamageQmKey); + //Ext.getCmp('inspectType').setValue(result.data.scope); + if(result.data.name == "无"){ + Ext.getCmp("formDefinitionId").setValue(0); + }else{ + Ext.getCmp("formDefinitionId").setValue(result.data.formDefinition.id); + Ext.getCmp('handleDepart').setValue(result.data.formDefinition.handleDepart); + } + if(result.data.scope == '无'){ + //FSSDERMYY-18:隐藏器械包信息 + Ext.getCmp('tousseInfoFieldSet').setVisible(false); + } + Ext.getCmp('responsibilityPart').setValue(result.data.responsibilityPart); + Ext.getCmp('dateTime').setValue(Ext.util.Format.date(new Date(result.data.dateTime.time),"Y-m-d H:i")); + + Ext.getCmp('scope').setValue(result.data.scope); + Ext.getCmp('responsiblePerson').setValue(result.data.responsiblePerson); + Ext.getCmp('createUserName').setValue(result.data.createUserName); + Ext.getCmp('tousseDefinitionId').setValue(result.data.tousseDefinitionId); + + Ext.getCmp('orgUnitCoding').setValue(result.data.orgUnitCoding); + Ext.getCmp('orgUnit').setValue(result.data.orgUnit); + + qualityMonitoringWRRecordID = result.data.washAndDisinfectRecordId; + qualityMonitoringSterilizationID = result.data.sterilizationRecordId; + if('是'==result.data.isAllTousseOfSterile){ + Ext.getCmp('isAllTousseOfSterile').setValue(result.data.isAllTousseOfSterile); + Ext.getCmp('allTousseOfSterile').setValue(true); + } + + if(result.data.responsibilityPart == "回收清点" && result.data.recordRecycleInformation == "是"){//要显示对应的输入框并赋值 + showRecyclingInventoryItem();//显示回收清点对应的 + Ext.getCmp("idCardAndTousseBarcode").setValue(result.data.scanTousseInstance.tousseInstanceBarcode); + Ext.getCmp('tousseNameBasics').setValue(result.data.scanTousseInstance.tousseInstanceName); + Ext.getCmp("scanTousseInstance_id").setValue(result.data.scanTousseInstance.tousseInstanceId); + if(result.data.scanTousseInstance.recyclingRecordJSON != undefined){ + Ext.getCmp("recyclePerson").setValue(result.data.scanTousseInstance.recyclingRecordJSON.reUser); + Ext.getCmp("recycleDepartments").setValue(result.data.scanTousseInstance.recyclingRecordJSON.reDept); + Ext.getCmp("operationRoom").setValue(result.data.scanTousseInstance.recyclingRecordJSON.lastUseRecordOperationRoom); + Ext.getCmp("nurse").setValue(result.data.scanTousseInstance.recyclingRecordJSON.lastUseRecordCircuitNurse); + Ext.getCmp("recycleTime").setValue(result.data.scanTousseInstance.recyclingRecordJSON.reTime); + } + + }else if(result.data.responsibilityPart == "清洗消毒" && result.data.recordRinseInformation == "是"){//要显示对应的输入框并赋值 + showCleanAndDisinfectionItem(); + Ext.getCmp("rinseBasketsName").setValue(result.data.scanWashAndDisinfectRecord.washBasketName); + Ext.getCmp("cleaningMachinePosition").setValue(result.data.scanWashAndDisinfectRecord.position); + Ext.getCmp("cleaningMachineDate").setValue(result.data.scanWashAndDisinfectRecord.washDate); + Ext.getCmp("cleaningMachineName").setValue(result.data.scanWashAndDisinfectRecord.disinfectIdentification); + Ext.getCmp("cleaningMachineProgramName").setValue(result.data.scanWashAndDisinfectRecord.disinfectProgram); + Ext.getCmp("cleaningStartTime").setValue(result.data.scanWashAndDisinfectRecord.startDate); + Ext.getCmp("cleaningEndTime").setValue(result.data.scanWashAndDisinfectRecord.endDate); + Ext.getCmp("scanWashRecord_id").setValue(result.data.scanWashAndDisinfectRecord.washRecordID); + } else if(result.data.responsibilityPart == "灭菌管理" && result.data.recordSterilizatioInformation == "是"){//要显示对应的输入框并赋值 + showSterilizationItem(); + Ext.getCmp('tousseBarcode').setValue(result.data.scanTousseInstance.tousseInstanceBarcode); + Ext.getCmp("scanTousseInstance_id").setValue(result.data.scanTousseInstance.tousseInstanceId); + if(result.data.scanTousseInstance.sterilizationRecordJSON != undefined){ + Ext.getCmp("sterilizationName").setValue(result.data.scanTousseInstance.sterilizationRecordJSON.sterilizerName); + Ext.getCmp("sterilizationProgramName").setValue(result.data.scanTousseInstance.sterilizationRecordJSON.sterilizationType); + Ext.getCmp("heat").setValue(result.data.scanTousseInstance.sterilizationRecordJSON.frequency); + Ext.getCmp("sterilizationStartTime").setValue(result.data.scanTousseInstance.sterilizationRecordJSON.startDate); + Ext.getCmp("sterilizationEndTime").setValue(result.data.scanTousseInstance.sterilizationRecordJSON.endDate); + } + } + + if(result.data.basketName!=null && result.data.basketName != ""){ + Ext.getCmp('containerName').setValue(result.data.basketName); + }else{ + Ext.getCmp("insertBasket").hide(); + Ext.getCmp("containerNameItem").hide(); + Ext.getCmp('containerName').setVisible(false); + Ext.getCmp('containerName').getEl().up('.x-form-item').setDisplayed(false); + } + materialDefinitionStore.baseParams['spell'] = ""; + materialDefinitionStore.reload(); + + if(qualityMonitoringWRRecordID > 0 && (sstsConfig.hasOwnProperty('haveRinserPosition')) && sstsConfig.haveRinserPosition){ + Ext.getCmp('basketBarcodeC').setVisible(true); + Ext.getCmp('positionC').setVisible(true); + }else{ + Ext.getCmp('basketBarcodeC').setVisible(false); + Ext.getCmp('positionC').setVisible(false); + } + + if("材料" == result.data.scope){ + hideFirstTousse(); + showFirstMaterial(); + Ext.getCmp('recycleC').setVisible(false); + Ext.getCmp('repackingC').setVisible(false); + Ext.getCmp('disabledBarcodeC').setVisible(false); + Ext.getCmp('allTousseOfSterile').setVisible(false); + Ext.getCmp('allTousseOfSterile').getEl().up('.x-form-item').setDisplayed(false); + //Ext.getCmp('addExtractCheckTousse').setVisible(false); + loadMaterialMsg(result.data.qualityMonitoringGoodsList); + }else if("器械包" == result.data.scope){ + hideFirstMaterial(); + showFirstTousse(); + loadTousseMsg(result.data,result.data.qualityMonitoringGoodsList); + }else if("材料和器械包" == result.data.scope){ + showFirstTousse(); + showFirstMaterial(); + loadMateriaAndTousselMsg(result.data,result.data.qualityMonitoringGoodsList); + } + if(result.data.name == "无" || result.data.scope == '无'){ + // 监测项名称,监测范围是无时,加载材料,隐藏器械包 + hideFirstTousse(); + showFirstMaterial(); + Ext.getCmp('recycleC').setVisible(false); + Ext.getCmp('repackingC').setVisible(false); + Ext.getCmp('disabledBarcodeC').setVisible(false); + Ext.getCmp('allTousseOfSterile').setVisible(false); + Ext.getCmp('allTousseOfSterile').getEl().up('.x-form-item').setDisplayed(false); + //Ext.getCmp('addExtractCheckTousse').setVisible(false); + loadMaterialMsg(result.data.qualityMonitoringGoodsList); + } + // 重新打开,不能再加器械包和材料 + Ext.getCmp('addBtnAll').setVisible(false) + Ext.getCmp('addExtractCheckMaterialBtnC').setVisible(false); + Ext.getCmp('addExtractCheckTousseBtnC').setVisible(false); + //Ext.getCmp('addExtractCheckTousse').setVisible(false); + //Ext.getCmp('addExtractCheckMaterial').setVisible(false); + // 不能选是否整炉 + showAllTousseOfSterileCheckBox(false); + Ext.getCmp('remark').setValue(result.data.remark); + Ext.getCmp('optionAmount').setValue(''); + var items = new Array(); + // 如果显示炉次炉号,添加表单 + if(result.showSterNameAndFre == '是'){ + items.push(createQualityMonitoringElementSterName(result.data.sterilizerName,"","")); + items.push(createQualityMonitoringElementSterFre(result.data.sterilizerFrequency,"","")); + } + if(result.data.scope == "灭菌炉记录"){ + Ext.getCmp('sterilizationRecordInfo').setVisible(true); + // 如果监测范围为灭菌炉记录,隐藏器械包信息 + Ext.getCmp('tousseInfoFieldSet').setVisible(false); + }else{ + Ext.getCmp('sterilizationRecordInfo').setVisible(false); + } + + for(var i = 0 ;i < result.data.items.length ;i++){ + var item = result.data.items[i].definitionItem; + if(Ext.getCmp('optionAmount').getValue() == null || Ext.getCmp('optionAmount').getValue() == ''){ + Ext.getCmp('optionAmount').setValue(item.id); + }else{ + Ext.getCmp('optionAmount').setValue(Ext.getCmp('optionAmount').getValue()+';'+item.id); + } + var allowBlank = item.requirement == '必填' ? false:true; + items.push(createQualityMonitoringItemElement(item.type,item.id,item.name,allowBlank,item.optionsJson,result.data.items[i].showAnswer,item.isTriggerItem)); + if(item.type == '多选'){ + items.push({ + columnWidth : 1, + xtype : "label", + html : ' ', + anchor : '95%' + }); + } + } + + Ext.getCmp('addQualityMonitoringForm').remove('itemsFieldSet'); + if(items.length > 0){ + Ext.getCmp('addQualityMonitoringForm').add({ + id : 'itemsFieldSet', + xtype:"fieldset", + labelWidth :400, + labelAlign :'left', + title:"监测项", + layout:'column', + autoHeight:true, + items:items + }); + } + Ext.getCmp('addQualityMonitoringForm').doLayout(); + if(Ext.getCmp('itemsFieldSet')){ + Ext.getCmp('itemsFieldSet').doLayout(); + } + //打开已有质量监测记录,器械包条码,器械包名称,重新回收和重新装配都禁用掉,不能再修改 + Ext.getCmp('recycle').disable(); + Ext.getCmp('repacking').disable(); + Ext.getCmp('disabledBarcode').disable(); + Ext.getCmp('tempBarcode').disable(); + Ext.getCmp('tousseName').disable(); + Ext.getCmp('tousseAmount').disable(); + Ext.getCmp('material').disable(); + Ext.getCmp('materialAmount').disable(); + Ext.getCmp('basketBarcode').disable(); + Ext.getCmp('position').disable(); + Ext.getCmp('allTousseOfSterile').disable(); + }else{ + showResultQM("找不到该条码所对应的器械包实例"); + } + }, + failure : function(response, options) { + showResultQM('系统加载出错,请稍候再试'); + } + }); + }else{ + if(qualityMonitoringWRRecordID > 0 && (sstsConfig.hasOwnProperty('haveRinserPosition')) && sstsConfig.haveRinserPosition){ + Ext.getCmp('basketBarcodeC').setVisible(true); + Ext.getCmp('positionC').setVisible(true); + }else{ + Ext.getCmp('basketBarcodeC').setVisible(false); + Ext.getCmp('positionC').setVisible(false); + } + setStartDate(Ext, 'yyyy/MM/dd HH:mm', 'dateTime'); //(设置抽检时间,取服务器时间 cjr) + disableRecycleAndRepacking(); + var resonPart = Ext.getCmp('responsibilityPart').getValue(); + if(resonPart != null && resonPart != '') { + if(resonPart == '全部环节'){ + formDefinitionStore.baseParams.responsiblePerson = ""; + }else{ + formDefinitionStore.baseParams.responsiblePerson = resonPart; + } + }else{ + Ext.getCmp('responsibilityPart').setValue('全部环节'); + formDefinitionStore.baseParams.responsiblePerson = ""; + } + if( !isUndefinedOrNullOrEmpty(formDefinitionId) && !isUndefinedOrNullOrEmpty(formDefinitionName) ){ + Ext.getCmp('formName').setValue(formDefinitionName); + addQualityMonitoringItem(formDefinitionId,formDefinitionName); + Ext.getCmp("formDefinitionId").setValue(formDefinitionId); + Ext.getCmp("name").setValue(formDefinitionName); + }else{ + formDefinitionStore.load(); + } + } + if(washRecordId){ + Ext.Ajax.request({ + url : WWWROOT + '/disinfectSystem/qualityMonitoringInstanceAction!loadWashRecordInfoById.do', + params : { + washRecordId : washRecordId + }, + success : function(response,options){ + var result = Ext.decode(response.responseText); + if(result.success == true){ + var record = result.data; + Ext.getCmp('rinseBasketsName').setValue(record.washBasketName); + Ext.getCmp('cleaningMachinePosition').setValue(record.position); + Ext.getCmp('cleaningMachineDate').setValue(record.washDate); + Ext.getCmp('cleaningMachineName').setValue(record.disinfectIdentification); + Ext.getCmp('cleaningMachineProgramName').setValue(record.disinfectProgram); + Ext.getCmp('cleaningStartTime').setValue(record.startDate); + Ext.getCmp('cleaningEndTime').setValue(record.endDate); + Ext.getCmp('scanWashRecord_id').setValue(record.washRecordID); + Ext.getCmp('responsiblePerson').setValue(record.personInCharge); + }else{ + showResultQM(result.message); + } + } + }); + } + if(tousseItems && tousseItems.length > 0){ + newTousseItems = tousseItems; + } +} + +function uploadWindowA(imageType,id){ + var onUploadComplete = function(dialog){ + disableShowImageButton = false; + dialog.hide(); + }; + //文件上传成功后的回调函数 + var onUploadSuccess = function(dialog, filename, resp_data, record){ + disableShowImageButton = false; + dialog.hide(); + }; +// //文件上传失败后的回调函数 + var onUploadFailed = function(dialog, filename, resp_data, record){ + showResultQM(resp_data.message);//resp_data是json格式的数据 + disableShowImageButton = true; + }; + var dialog = new Ext.ux.UploadDialog.Dialog({ + title: "上传" + imageType, + url:WWWROOT + '/disinfectSystem/baseData/uploadImageFileAction!uploadImage.do?imageType='+encodeURI(imageType)+'&objectId='+id , //这里我用struts2做后台处理 + post_var_name:'uploadFiles',//这里是自己定义的,默认的名字叫file + width : 450, + height : 300, + minWidth : 450, + minHeight : 300, + draggable : true , + resizable : true , + constraintoviewport: true , + permitted_extensions:['JPG','jpg','jpeg','JPEG','GIF','gif','png','PNG'], + modal: true , + reset_on_hide: false , + allow_close_on_upload: false , //关闭上传窗口是否仍然上传文件 + upload_autostart: false + }); + dialog.show(); + dialog.on('uploadsuccess',onUploadSuccess); //定义上传成功回调函数 + dialog.on('uploadfailed',onUploadFailed); //定义上传失败回调函数 +// dialog.on('uploadcomplete',onUploadComplete); //定义上传完成回调函数 + + +} + +//数组去重 +function unique(arr) { + for (var i = 0, len = arr.length; i < len; i++) { + for (var j = i + 1, len = arr.length; j < len; j++) { + if (arr[i] === arr[j]) { + arr.splice(j, 1); + j--; // 每删除一个数j的值就减1 + len--; // j值减小时len也要相应减1(减少循环次数,节省性能) + } + } + } + return arr; +} + +function getTousseBarcode(wrapper){ + var arrBarcode = null; + var tousseArrHidden2 = []; + for(var j = 0; j < wrapper.length;j++){ + var parentId = wrapper[j].id; + if(wrapper[j].items == undefined){ + var tousseRecycleOrRePacking = Ext.getCmp(parentId).getValue(); + tousseArrHidden2.push(tousseRecycleOrRePacking); + if(Ext.getCmp("scope").getValue() == "器械包" && tousseArrHidden2.length == 5){ + if(arrBarcode == null){ + arrBarcode = tousseArrHidden2[4]; + }else{ + if(tousseArrHidden2[4] != ""){ + //arrBarcode = arrBarcode.concat(tousseArrHidden[4]); + arrBarcode = arrBarcode + ","+tousseArrHidden2[4]; + } + + } + tousseArrHidden2 = []; + } + }else if(parentId.indexOf("tosseAndMaterialList") != -1 ){//是抽检器械 + if(arrBarcode == null){ + arrBarcode = tousseArrHidden2[4]; + }else{ + if(tousseArrHidden2[4] != ""){ + //arrBarcode = arrBarcode.concat(tousseArrHidden[4]); + arrBarcode = arrBarcode + ","+tousseArrHidden2[4]; + } + + } + tousseArrHidden2 = []; + }else{ + continue; + } + } + return arrBarcode; +} + +function setTousseArgument(wrapper){ + var tousseBagsList = {}; + var tousseArrHidden = []; + var tousseBags = []; + for(var j = 0; j < wrapper.length;j++){ + var parentId = wrapper[j].id; + if(parentId.indexOf("addExtractCheckTousseBtn") != -1){//如果是添加按钮,不用做什么 + + }else if(parentId.indexOf("tosseAndMaterialList") != -1 ){//是抽检器械,往下找items + tousseBagsList.tousseInstanceId = tousseArrHidden[0]; + tousseBagsList.tousseRecycle = tousseArrHidden[1]; + tousseBagsList.tousseRePacking = tousseArrHidden[2]; + tousseBagsList.order = tousseArrHidden[3]; + tousseBagsList.tousseBarcode = tousseArrHidden[4];//器械包条码隐藏域值 + var materialInfos = []; + var materialArrHidden = []; + //抽检器械数据 + var materiaItems = wrapper[j].items.items; + for(var m = 0; m < materiaItems.length; m++){ + var materiaItemsId = materiaItems[m].id; + //不是按钮或者不是位置,位置不传是看原先的代码没有传 + if(materiaItemsId.indexOf("addExtractCheckMaterialBtnC") == -1 && materiaItemsId.indexOf("basketBarcodeC") == -1 ){ + if(materiaItems[m].items == undefined){ + materialArrHidden.push(Ext.getCmp(materiaItemsId).getValue()); + }else{ + if(materiaItems[m].items.items[0].fieldLabel == "抽检器械" && m > 1){ + + materialInfos.push({ + "material":materialArrHidden[0], + "amount":materialArrHidden[1], + "position":materialArrHidden[2], + "order":materialArrHidden[3] + }) + materialArrHidden = []; + } + materialArrHidden.push(materiaItems[m].items.items[0].el.dom.value); + } + } + } + + materialInfos.push({ + "material":materialArrHidden[0], + "amount":materialArrHidden[1], + "position":materialArrHidden[2], + "order":materialArrHidden[3] + }) + materialArrHidden = []; + + tousseBagsList.materialInfos = materialInfos; + tousseBags.push(tousseBagsList); + tousseArrHidden = []; + tousseBagsList = {}; + }else if(wrapper[j].items == undefined){//隐藏域的情况 + var tousseRecycleOrRePacking = Ext.getCmp(parentId).getValue(); + var index = parentId.split('_')[1]; + if(index == '5'){ + tousseArrHidden[0] = tousseRecycleOrRePacking; + }else if(index == '7'){ + tousseArrHidden[1] = tousseRecycleOrRePacking; + }else if(index == '8'){ + tousseArrHidden[2] = tousseRecycleOrRePacking; + }else if(index == undefined || index == 'undefined'){ + tousseArrHidden[3] = tousseRecycleOrRePacking; + }else if(index == '1'){ + tousseArrHidden[4] = tousseRecycleOrRePacking; + }else if(index == '13'){ + tousseArrHidden[5] = tousseRecycleOrRePacking; + } + if(Ext.getCmp("scope").getValue() == "器械包" && tousseArrHidden.length == 6){ + tousseBagsList.tousseInstanceId = tousseArrHidden[0]; + tousseBagsList.tousseRecycle = tousseArrHidden[1]; + tousseBagsList.tousseRePacking = tousseArrHidden[2]; + tousseBagsList.order = tousseArrHidden[3]; + tousseBagsList.tousseBarcode = tousseArrHidden[4];//器械包条码隐藏域值 + tousseBagsList.tousseDiscard = tousseArrHidden[5]; + tousseBags.push(tousseBagsList); + tousseArrHidden = []; + tousseBagsList = {}; + }else if(Ext.getCmp("scope").getValue() == "材料和器械包"){ + tousseBagsList.tousseDiscard = tousseArrHidden[5]; + } + }else if(wrapper[j].items.items[0].fieldLabel == "重新回收" || wrapper[j].items.items[0].fieldLabel == "重新装配"){ + continue; + }else{//器械包名称,器械包数量 + var tousseBarcode = wrapper[j].items.items[0].el.dom.value; + if(wrapper[j].items.items[0].fieldLabel == "器械包条码"){ + //tousseBagsList.tousseBarcode = tousseBarcode;已经被清空了 + }else if(wrapper[j].items.items[0].fieldLabel == "器械包名称"){ + tousseBagsList.tousseName = tousseBarcode; + tousseBagsList.tousseDefinitionId = wrapper[j].items.items[1].el.dom.value; + }else if(wrapper[j].items.items[0].fieldLabel == "器械包数量"){ + tousseBagsList.tousseAmount = tousseBarcode; + } + } + } + return tousseBags; +} + + +function setMaterialArgument(materialWrapper){ + var materialWrapperHidden = []; + var materialInfos = []; + var tousseBags2 = []; + for(var p = 0; p < materialWrapper.length;p ++){ + var materialParentId = materialWrapper[p].id; + if(materialParentId.indexOf("addExtractCheckMaterialBtnC") == -1 && materialParentId.indexOf("basketBarcodeC") == -1){//除开添加按钮 + if(materialWrapper[p].items == undefined){ + materialWrapperHidden.push(Ext.getCmp(materialParentId).getValue()); + + var tempMaterialInfo = { + "material":materialWrapperHidden[0], + "amount":materialWrapperHidden[1], + "position":materialWrapperHidden[2], + "order":materialWrapperHidden[3] + }; + materialInfos.push(tempMaterialInfo); + var materialInfosObj = {}; + materialInfosObj.materialInfos = materialInfos; + tousseBags2.push(materialInfosObj); + materialWrapperHidden = []; + materialInfos = []; + + }else{ + materialWrapperHidden.push(materialWrapper[p].items.items[0].el.dom.value); + } + } + } + return tousseBags2; +} + + +function setConfigItemOptionArgument(wrapperItemsFieldSet){ + var configItemOption = {}; + var configItemOptionArr = []; + for(var x = 0; x < wrapperItemsFieldSet.length; x++){ + if((wrapperItemsFieldSet[x].xtype) != "label"){ + var configItemKey; + var configItemVal; + if(((wrapperItemsFieldSet[x].items.items[0].id)).indexOf("triggerItemIds") != -1){ + configItemKey = wrapperItemsFieldSet[x].items.items[1].id; + configItemVal = Ext.getCmp(configItemKey).getValue(); + }else if((wrapperItemsFieldSet[x].items.items[0].xtype) == "datefieldWithMin"){ + configItemKey = wrapperItemsFieldSet[x].items.items[0].id; + configItemVal = wrapperItemsFieldSet[x].items.items[0].value; + }else{ + configItemKey = wrapperItemsFieldSet[x].items.items[0].id; + configItemVal = Ext.getCmp(configItemKey).getValue(); + + } + configItemOption[configItemKey] = configItemVal; + } + } + + configItemOptionArr.push(configItemOption); + return configItemOptionArr; +} + +/** + * 保存质量监测实例. + * @param thiz 按钮对象 + * @param materialDefinitionStore 抽检器械的store + * @param saveAndCreate 是否为“保存并新建”操作 + * @returns {Boolean} + */ +function saveQualityMonitoringNew(thiz,materialDefinitionStore,saveAndCreate) { + //1、验证所有的监测细则的填写是否合法 + var optionAmount = Ext.getCmp('optionAmount').getValue(); //监测细则的表单元素id集合(用分号分隔) + if (optionAmount) { + var optionAmountArr = optionAmount.split(';'); + for(var i = 0 ; i < optionAmountArr.length ; i++){ + var itemId = optionAmountArr[i]; + if(!Ext.getCmp('hideElement'+itemId).hidden){ + if(!Ext.getCmp('configItemOption'+itemId).isValid()){ + showResultQM("请正确填写表单各值。"); + return false; + } + }else{ + if(!Ext.getCmp('hideElement'+itemId).hidden && Ext.getCmp('configItemOption'+itemId).getValue() == '#@'){ + showResultQM("请正确填写表单各值。"); + return false; + } + } + + //如果是多选,并且必填,需要单独校验 + var extElement = Ext.getCmp('hideElement' + itemId); + if (extElement.getXType() == 'fieldset' && !extElement.allowBlank) { + var checkboxArr = extElement.findByType('checkbox'); + var checked = false; + for (var int = 0; int < checkboxArr.length; int ++) { + if (checkboxArr[int].checked) { + checked = checkboxArr[int].checked; + continue; + } + } + if (!checked) { + showResultQM(extElement.title + "是必填项"); + return false; + } + } + } + } + + //2、验证是否选择监测项 + var inspecItemName = Ext.getCmp("formName") ; + if(inspecItemName == null || inspecItemName.getValue() == ''){ + showResultQM("请选择监测项!"); + return false; + } + + //登记人不能为空 + var createUserName = Ext.getCmp("createUserName").getValue(); + if(createUserName == ''){ + showResultQM("登记人不能为空!"); + return false; + } + //5、如果是(整炉 or 监测项=无 or 监测范围=无 or 监测范围=灭菌炉记录)则可以不用填写器械包信息,否则强制要登记器械包信息 + var barcode = Ext.getCmp('barcode').getValue(); //第一组的器械包条码 + var tousseName = Ext.getCmp('tousseName').getRawValue(); //第一组的器械包名称 + var material = Ext.getCmp('material').getValue(); //第一组的材料名称 + var inspectName = Ext.getCmp('formName').getRawValue(); //监测项 + var scope = Ext.getCmp('scope').getValue(); //监测范围 + if(!allTousseOfSterileChecked()){ + if(inspectName != '无' && scope != '无' && scope != '灭菌炉记录'){ + // 质量检测项为'无',强制登记器械包信息 + if(!material && !tousseName){ + showResultQM("请录入抽验器械或器械包名称"); + return false; + } + } + } + + + //7、如果有显示“清洗篮筐名称”则需要填写 + var container = Ext.getCmp("containerName") ; + if(container != null && container.isVisible() && container.getValue() == ""){ + showResultQM("请扫描回收篮筐条码!"); + return false; + } + + var tousseAndMaterialAll = {}; + var tousseInstanceInfos = []; + var tousseAndMaterialWrapperCountNum = tousseAndMaterialWrapperCount;//获取添加的块数量 + + //针对第一个块,过滤出需要的数据 + if(Ext.getCmp("tosseAndMaterial")){ + var tosseAndMaterialFirstWrapper = Ext.getCmp("tosseAndMaterial").items.items;//获取默认显示的第一个器械包信息,就是第一个块 + for(var n = 0; n < tosseAndMaterialFirstWrapper.length; n++){ + var firstId = tosseAndMaterialFirstWrapper[n].id; + if(firstId == "tousseBarcodeC" /* || firstId == "addExtractCheckTousseBtnC" || firstId == "tousseNameC" || firstId == "tousseAmountC" */ ){ + tosseAndMaterialFirstWrapper.splice(0, 4);//先删除前面写死的器械包信息,器械包条码,按钮,器械包名称,数量 + } + + if(tosseAndMaterialFirstWrapper[0].id == "materialWrapper"){ + var firstAddMaterial = tosseAndMaterialFirstWrapper[0].items.items; + for(var w = 0;w < firstAddMaterial.length;w++){ + if(firstAddMaterial[w].id == "materialC" /* || firstId == "addExtractCheckMaterialBtnC" || firstId == "materialAmountC" */){ + firstAddMaterial.splice(0, 5);//是材料的话,把材料里面的写死删除,抽检器械,按钮,数量 + } + } + //tosseAndMaterialFirstWrapper.splice(0, 5);////删除前面写死的器械包和数量等 + + tosseAndMaterialFirstWrapper.splice(0, 1);//再删除材料,写死的篮筐条码,位置 + break; + } + + } + } + + //获取第一块材料写死的数据 + var firstAddMaterialArr = []; + var firstMaterialInfos = []; + var material = Ext.getCmp('material').getValue(); + var amount = ""; + var position = ""; + //6、如果是重新打开的记录,不再校验材料和包的关系 + var qid = Ext.getCmp('id').getValue(); + if(isUndefinedOrNullOrEmpty(qid)){ + if(material){ + amount = Ext.getCmp('materialAmount').getValue(); + if(!amount || amount < 0){ + showResultQM('输入的“'+material+'”的数量且不能小于1'); + return false; + } + position = Ext.getCmp("position").getValue(); + if(tousseName){ + var tousseDefinitionId = Ext.getCmp('tousseDefinitionId').getValue(); + var isContain = false; + // 判断材料是否在包里面 + DWREngine.setAsync(false); + TousseInstanceTableManager.isTiContainsMaterial(tousseDefinitionId,material,function(responseText){ + result = Ext.decode(responseText); + isContain = result.isContain; + }); + DWREngine.setAsync(true); + if(isContain == false){ + showResultQM('器械包' + tousseName +'中找不到材料“'+material+'”'); + Ext.getCmp('material').setValue(''); + Ext.getCmp('materialAmount').setValue(); + return false; + } + } + } + }else{ + if(material){ + amount = Ext.getCmp('materialAmount').getValue(); + position = Ext.getCmp("position").getValue(); + }else{ + material = ""; + } + } + + firstMaterialInfos.push({ + "material":material, + "amount":amount, + "position":position, + "order":"" + }); + + //获取第一块器械包写死的数据 + var firstTousseBagsList = {}; + //if(Ext.getCmp("scope").getValue() != "材料" || Ext.getCmp("scope").getValue() != "无" || Ext.getCmp("scope").getValue() != "灭菌炉记录"){ + if(Ext.getCmp("scope").getValue() == "材料和器械包" || Ext.getCmp("scope").getValue() == "器械包"){ + var tousseName = Ext.getCmp('tousseName').getRawValue(); + var barcode = Ext.getCmp('barcode').getValue(); + var tousseInstanceId = Ext.getCmp('tousseInstanceId').getValue(); + var tousseDefinitionId = Ext.getCmp('tousseDefinitionId').getValue(); + var amount = Ext.getCmp('tousseAmount').getValue(); + var isRecycle = Ext.getCmp('isRecycle').getValue(); + var isRepacking = Ext.getCmp('isRepacking').getValue(); + var isDiscard = Ext.getCmp('isDiscard').getValue(); + + firstTousseBagsList.tousseBarcode = barcode; + firstTousseBagsList.tousseName = tousseName; + firstTousseBagsList.tousseAmount = amount; + firstTousseBagsList.tousseInstanceId = tousseInstanceId; + firstTousseBagsList.tousseDefinitionId = tousseDefinitionId; + firstTousseBagsList.tousseRecycle = isRecycle; + firstTousseBagsList.tousseRePacking = isRepacking; + firstTousseBagsList.tousseDiscard = (isDiscard == '')?'否':isDiscard; + firstTousseBagsList.order = ""; + } + + + var getTousseArgument2; + if(Ext.getCmp("scope").getValue() == "材料和器械包" || Ext.getCmp("scope").getValue() == "材料" || Ext.getCmp("scope").getValue() == "无"){ + if(firstAddMaterial != undefined){//点击第一个抽检器械按钮增加在第一个下面的 + for(var v = 0; v < firstAddMaterial.length; v++){ + if((firstAddMaterial[v].id).indexOf("basketBarcodeC") == -1){//除了篮筐条码 + if(firstAddMaterial[v].items == undefined){ + firstAddMaterialArr.push(Ext.getCmp(firstAddMaterial[v].id).getValue()); + if(firstAddMaterialArr.length > 0){ + firstMaterialInfos.push({ + "material":firstAddMaterialArr[0], + "amount":firstAddMaterialArr[1], + "position":firstAddMaterialArr[2], + "order":firstAddMaterialArr[3] + }); + firstAddMaterialArr = []; + } + }else{ + firstAddMaterialArr.push(firstAddMaterial[v].items.items[0].el.dom.value); + } + + } + } + } + + firstTousseBagsList.materialInfos = firstMaterialInfos; + } + + getTousseArgument2 = setTousseArgument(tosseAndMaterialFirstWrapper); + getTousseArgument2.unshift(firstTousseBagsList); + //获取第一个监测项 + var configItemOptionFirst; + if(Ext.getCmp('itemsFieldSet')){ + var firstItemsFieldSet = Ext.getCmp('itemsFieldSet').items.items; + var getFirstConfigItemOptionArgument = setConfigItemOptionArgument(firstItemsFieldSet); + configItemOptionFirst = getFirstConfigItemOptionArgument[0]; + } + + if(Ext.getCmp("scope").getValue() == "灭菌炉记录"){//只有监测项传值,没有器械包和抽检器械 + tousseInstanceInfos.push({ + "configItemOption":configItemOptionFirst + }); + }else{ + tousseInstanceInfos.push({ + "tousseBags":getTousseArgument2, + "configItemOption":configItemOptionFirst + }); + } + + //获取增加的块 + if(tousseAndMaterialWrapperCountNum > 0){//增加的块 + for(var k = 1;k <= tousseAndMaterialWrapperCountNum;k++){//先找到每一个块 + var wrapper; + var getTousseArgument; + var configItemOption; + if(Ext.getCmp("scope").getValue() == "材料和器械包"){ + if(Ext.getCmp('tousseInfoFieldSet'+ k +'_TMP')){ + var wrapperParent = Ext.getCmp('tousseInfoFieldSet'+ k +'_TMP');//最外层 //包和材料 + wrapper = Ext.getCmp('tosseAndMaterial'+k+'_TMP').items.items; + getTousseArgument = setTousseArgument(wrapper); + //监测项 + if(Ext.getCmp('itemsFieldSet_'+ k)){ + var wrapperItemsFieldSet = Ext.getCmp('itemsFieldSet_'+ k).items.items; + var getConfigItemOptionArgument = setConfigItemOptionArgument(wrapperItemsFieldSet); + configItemOption = getConfigItemOptionArgument[0]; + } + tousseInstanceInfos.push({ + "tousseBags":getTousseArgument, + "configItemOption":configItemOption + }); + } + }else if(Ext.getCmp("scope").getValue() == "器械包"){ + if(Ext.getCmp('tosseAndMaterial'+k+'_TP')){ + wrapper = Ext.getCmp('tosseAndMaterial'+k+'_TP').items.items; + getTousseArgument = setTousseArgument(wrapper); + //监测项 + if(Ext.getCmp('itemsFieldSet_'+ k)){ + var wrapperItemsFieldSet = Ext.getCmp('itemsFieldSet_'+ k).items.items; + var getConfigItemOptionArgument = setConfigItemOptionArgument(wrapperItemsFieldSet); + configItemOption = getConfigItemOptionArgument[0]; + } + tousseInstanceInfos.push({ + "tousseBags":getTousseArgument, + "configItemOption":configItemOption + }); + } + + }else if(Ext.getCmp("scope").getValue() == "材料" || Ext.getCmp("scope").getValue() == "无"){ + if(Ext.getCmp('tosseAndMaterial'+k+'_MP')){ + var materialWrapper = Ext.getCmp('tosseAndMaterial'+k+'_MP').items.items; + var getMaterialArgument = setMaterialArgument(materialWrapper); + getTousseArgument = getMaterialArgument; + //监测项 + if(Ext.getCmp('itemsFieldSet_'+ k)){ + var wrapperItemsFieldSet = Ext.getCmp('itemsFieldSet_'+ k).items.items; + var getConfigItemOptionArgument = setConfigItemOptionArgument(wrapperItemsFieldSet); + configItemOption = getConfigItemOptionArgument[0]; + } + tousseInstanceInfos.push({ + "tousseBags":getTousseArgument, + "configItemOption":configItemOption + }); + } + }else if(Ext.getCmp("scope").getValue() == "灭菌炉记录"){ + //监测项 + if(Ext.getCmp('itemsFieldSet_'+ k)){ + var wrapperItemsFieldSet = Ext.getCmp('itemsFieldSet_'+ k).items.items; + var getConfigItemOptionArgument = setConfigItemOptionArgument(wrapperItemsFieldSet); + configItemOption = getConfigItemOptionArgument[0]; + } + tousseInstanceInfos.push({ + "configItemOption":configItemOption + }); + } + } + } + tousseAndMaterialAll.tousseInstanceInfos = tousseInstanceInfos; + //传参tousseAndMaterialAll + checkIsTousseInstanceRepackingAndSubmitFormNew(thiz,JSON.stringify(tousseAndMaterialAll),saveAndCreate); +} + +function loadResponPersonByBarcode(barcode,domId){ + if(isUndefinedOrNullOrEmpty(barcode)){ + showResultQM('条码不能为空!'); + return ; + } + UserTableManager.getUserByBarcode(barcode,function(responseText){ + if(!isUndefinedOrNullOrEmpty(responseText)){ + var result = Ext.decode(responseText); + if(domId == 'responsiblePerson'){ + if(!result.success){ + showResultQM("请输入正确的人员条码!"); + return; + } + if((result.fullName || '') !== ''){ + Ext.getCmp('responsiblePerson').disable(); + } + }else { + if(!result.success){ + if(result.isNotSameOrgUnit){ + showResultQM("登记人需为当前科室用户!"); + }else { + showResultQM("请输入正确的人员条码!"); + } + return; + } + } + Ext.getCmp(domId).setValue(result.fullName); + }else{ + showResultQM('找不到该条码所对应的人员信息'); + } + }); +} + +//扫描标识牌/器械包条码 +function loadRecyclePersonByBarcode(barcode){ + if(isUndefinedOrNullOrEmpty(barcode)){ + showResultQM('条码不能为空!'); + return ; + } + + Ext.Ajax.request({ + url : WWWROOT + '/disinfectSystem/qualityMonitoringInstanceAction!scanBarcodeForTousseInfo.do', + params : { + barcode : barcode + }, + success : function(response,options){ + var result = Ext.decode(response.responseText); + if(result.success == true){//赋值 + Ext.getCmp("tousseNameBasics").setValue(result.data.tousseInstanceName); + Ext.getCmp("scanTousseInstance_id").setValue(result.data.tousseInstanceId); + Ext.getCmp("recyclePerson").setValue(result.data.recyclingRecordJSON.reUser); + Ext.getCmp("recycleDepartments").setValue(result.data.recyclingRecordJSON.reDept); + Ext.getCmp("operationRoom").setValue(result.data.recyclingRecordJSON.lastUseRecordOperationRoom); + Ext.getCmp("nurse").setValue(result.data.recyclingRecordJSON.lastUseRecordCircuitNurse); + Ext.getCmp("recycleTime").setValue(result.data.recyclingRecordJSON.reTime); + + if((result.data.tousseInstanceName || '') !== ''){ + Ext.getCmp("tousseNameBasics").disable(); + } + if((result.data.recyclingRecordJSON.reUser || '') !== ''){ + Ext.getCmp("recyclePerson").disable(); + } + if((result.data.recyclingRecordJSON.reDept || '') !== ''){ + Ext.getCmp("recycleDepartments").disable(); + } + if((result.data.recyclingRecordJSON.lastUseRecordOperationRoom || '') !== ''){ + Ext.getCmp("operationRoom").disable(); + } + if((result.data.recyclingRecordJSON.lastUseRecordCircuitNurse || '') !== ''){ + Ext.getCmp("nurse").disable(); + } + if((result.data.recyclingRecordJSON.reTime || '') !== ''){ + Ext.getCmp("recycleTime").disable(); + } + }else{ + showResultQM(result.message); + Ext.getCmp("tousseNameBasics").setValue(""); + Ext.getCmp("recyclePerson").setValue(""); + Ext.getCmp("recycleDepartments").setValue(""); + Ext.getCmp("operationRoom").setValue(""); + Ext.getCmp("nurse").setValue(""); + Ext.getCmp("scanTousseInstance_id").setValue(""); + Ext.getCmp("recycleTime").setValue(""); + } + }, + failure : function(response, options) { + //showResultQM("该条码不是标识牌/器械包条码,请扫描标识牌/器械包条码"); + } + }); +} + + +function loadSterilizationByBarcode(barcode){ + if(isUndefinedOrNullOrEmpty(barcode)){ + showResultQM('条码不能为空!'); + return ; + } + + Ext.Ajax.request({ + url : WWWROOT + '/disinfectSystem/qualityMonitoringInstanceAction!scanBarcodeForTousseInfo.do', + params : { + barcode : barcode + }, + success : function(response,options){ + var result = Ext.decode(response.responseText); + if(result.success == true){//赋值 + Ext.getCmp("sterilizationName").setValue(result.data.sterilizationRecordJSON.sterilizerName); + Ext.getCmp("scanTousseInstance_id").setValue(result.data.tousseInstanceId); + Ext.getCmp("sterilizationProgramName").setValue(result.data.sterilizationRecordJSON.sterilizationType); + Ext.getCmp("heat").setValue(result.data.sterilizationRecordJSON.frequency); + Ext.getCmp("sterilizationStartTime").setValue(result.data.sterilizationRecordJSON.startDate); + Ext.getCmp("sterilizationEndTime").setValue(result.data.sterilizationRecordJSON.endDate); + }else{ + showResultQM(result.message); + Ext.getCmp("sterilizationName").setValue(""); + Ext.getCmp("sterilizationProgramName").setValue(""); + Ext.getCmp("heat").setValue(""); + Ext.getCmp("sterilizationStartTime").setValue(""); + Ext.getCmp("sterilizationEndTime").setValue(""); + Ext.getCmp("scanTousseInstance_id").setValue(""); + } + }, + failure : function(response, options) { + + } + }); +} +function checkIsUniqueWithBarcodeAndInspectItemAndSubmitForm(thiz,id,barcode,formDefinitionId,materialInfo,saveAndCreate){ + if(barcode && formDefinitionId){ + Ext.Ajax.request({ + url : WWWROOT + '/disinfectSystem/qualityMonitoringInstanceAction!checkIsUniqueWithBarcodeAndInspectItem.do', + params : { + id : id, + barcode : barcode, + formDefinitionId : formDefinitionId + }, + success : function(response,options){ + var result = Ext.decode(response.responseText); + if(!result.isUnique){ + showResultQM("当前器械包所对应的检测项已存在"); + thiz.enable(); + return false; + } + submitForm2(materialInfo,saveAndCreate); + }, + failure : function(response, options) { + showResultQM('系统加载出错,请稍候再试'); + } + }); + }else{ + submitForm2(materialInfo,saveAndCreate); + } +} + +/** + * 校验是否有包实例已经重新装配过,如果已经装配过则不允许再次装配了,如果校验通过则提交. + * @param thiz 按钮对象 + * @param materialInfo 材料信息 + * @param saveAndCreate 是否为“保存并新建”操作 + */ + +function checkIsTousseInstanceRepackingAndSubmitForm(thiz,materialInfo,saveAndCreate){ + var barcodes = getScanRepacingTiBarcodes(); + Ext.Ajax.request({ + url : WWWROOT + '/disinfectSystem/qualityMonitoringInstanceAction!checkIsTousseInstanceRepacking.do', + params : { + barcodes : barcodes + }, + success : function(response,options){ + var result = Ext.decode(response.responseText); + if(result.haveRepacking){ + showResultQM(result.message); + thiz.enable(); + return false; + } + submitForm2(materialInfo,saveAndCreate); + }, + failure : function(response, options) { + showResultQM('系统加载出错,请稍候再试'); + } + }); +} + + +function checkIsTousseInstanceRepackingAndSubmitFormNew(thiz,tousseAndMaterialAll,saveAndCreate){ + var barcodes = getScanRepacingTiBarcodes(); + Ext.Ajax.request({ + url : WWWROOT + '/disinfectSystem/qualityMonitoringInstanceAction!checkIsTousseInstanceRepacking.do', + params : { + barcodes : barcodes + }, + success : function(response,options){ + var result = Ext.decode(response.responseText); + if(result.haveRepacking){ + showResultQM(result.message); + thiz.enable(); + return false; + } + submitFormNew2(tousseAndMaterialAll,saveAndCreate); + }, + failure : function(response, options) { + showResultQM('系统加载出错,请稍候再试'); + } + }); +} + + + +// 监测范围是器械包,加载器械包 +function loadTousseMsg(qualityMonitoringInstance, qualityMonitoringGoodsList){ + setIsRecycleAndIsRepackingForWholeFurnace(qualityMonitoringInstance); + var scope; + if(Ext.getCmp('scope')){ + scope = Ext.getCmp('scope').getValue(); + } + if(qualityMonitoringGoodsList == null || qualityMonitoringGoodsList == '' || qualityMonitoringGoodsList.length == 0){ + return ; + } + for(var i = 0 ;i < qualityMonitoringGoodsList.length ;i++){ + if(i == 0){ + var barcode = qualityMonitoringGoodsList[i].barcode; + var tousseInstanceId = qualityMonitoringGoodsList[i].tousseInstanceId; + var tousseName = qualityMonitoringGoodsList[i].tousseName; + var amount = qualityMonitoringGoodsList[i].amount; + Ext.getCmp('tousseInstanceId').setValue(tousseInstanceId); + Ext.getCmp('tempBarcode').setValue(barcode); + Ext.getCmp('tousseName').setValue(tousseName); + Ext.getCmp('tousseAmount').setValue(amount); + if('是'==qualityMonitoringGoodsList[i].isRecycle){ + Ext.getCmp('isRecycle').setValue(qualityMonitoringGoodsList[i].isRecycle); + Ext.getCmp('isRepacking').setValue('否'); + Ext.getCmp('isDiscard').setValue('否'); + Ext.getCmp('recycle').setValue(true); + Ext.getCmp('repacking').setValue(false); + Ext.getCmp('disabledBarcode').setValue(false); + }else if('是'==qualityMonitoringGoodsList[i].isRepacking){ + Ext.getCmp('isRecycle').setValue('否'); + Ext.getCmp('isRepacking').setValue(qualityMonitoringGoodsList[i].isRepacking); + Ext.getCmp('isDiscard').setValue('否'); + Ext.getCmp('recycle').setValue(false); + Ext.getCmp('repacking').setValue(true); + Ext.getCmp('disabledBarcode').setValue(false); + }else if('是'==qualityMonitoringGoodsList[i].isDiscard){ + Ext.getCmp('isRecycle').setValue('否'); + Ext.getCmp('isRepacking').setValue('否'); + Ext.getCmp('isDiscard').setValue(qualityMonitoringGoodsList[i].isDiscard); + Ext.getCmp('recycle').setValue(false); + Ext.getCmp('repacking').setValue(false); + Ext.getCmp('disabledBarcode').setValue(true); + }else{ + Ext.getCmp('isRecycle').setValue('否'); + Ext.getCmp('isRepacking').setValue('否'); + Ext.getCmp('isDiscard').setValue('否'); + Ext.getCmp('recycle').setValue(false); + Ext.getCmp('repacking').setValue(false); + Ext.getCmp('disabledBarcode').setValue(false); + } + }else{ + var barcode = qualityMonitoringGoodsList[i].barcode; + var tousseInstanceId = qualityMonitoringGoodsList[i].tousseInstanceId; + var tousseName = qualityMonitoringGoodsList[i].tousseName; + var amount = qualityMonitoringGoodsList[i].amount; + var orderNumber = qualityMonitoringGoodsList[i].orderNumber; + var isRecycle = qualityMonitoringGoodsList[i].isRecycle; + var isRePacking = qualityMonitoringGoodsList[i].isRepacking; + var isDiscard = qualityMonitoringGoodsList[i].isDiscard; + var showInput = qualityMonitoringGoodsList[i].showInput; + if(!showInput){ + addExtractCheckTousse(tousseName,barcode,tousseInstanceId,amount,orderNumber,isRecycle,isRePacking,isDiscard,"","","","",true); + }else if(scope == '器械包' || scope == '材料和器械包'){ + addExtractCheckTousse(tousseName,barcode,tousseInstanceId,amount,orderNumber,isRecycle,isRePacking,isDiscard,"","","","",true,showInput); + } + } + } +} + +//监测范围是材料,加载材料信息 +function loadMaterialMsg(qualityMonitoringGoodsList){ + if(qualityMonitoringGoodsList == null || qualityMonitoringGoodsList == '' || qualityMonitoringGoodsList.length == 0){ + return ; + } + for(var i = 0 ;i < qualityMonitoringGoodsList.length ;i++){ + if(i == 0){ + var mateialName = qualityMonitoringGoodsList[i].material; + var amount = qualityMonitoringGoodsList[i].amount; + var position = qualityMonitoringGoodsList[i].position; + Ext.getCmp('material').setValue(mateialName); + Ext.getCmp('materialAmount').setValue(amount); + Ext.getCmp('position').setValue(position); + }else{ + var mateialName = qualityMonitoringGoodsList[i].material; + var amount = qualityMonitoringGoodsList[i].amount; + var orderNumber = qualityMonitoringGoodsList[i].orderNumber; + var position = qualityMonitoringGoodsList[i].position; + // 添加抽检器械和数量 + addExtractCheckMaterial(true,mateialName,amount,position,orderNumber,"","","","","","",true,tousseItemCount); + } + } +} + +/** + * 整炉的时候设置“重新回收”和“重新装配”两个选项. + * @param qualityMonitoringInstance 质量监测记录对象 + */ +function setIsRecycleAndIsRepackingForWholeFurnace(qualityMonitoringInstance) { + if (qualityMonitoringInstance.isAllTousseOfSterile == '是') { //是整炉 + if('是'==qualityMonitoringInstance.isRecycle){ + Ext.getCmp('isRecycle').setValue(qualityMonitoringInstance.isRecycle); + Ext.getCmp('isRepacking').setValue('否'); + + Ext.getCmp('recycle').setValue(true); + Ext.getCmp('repacking').setValue(false); + }else if('是'==qualityMonitoringInstance.isRepacking){ + Ext.getCmp('isRecycle').setValue('否'); + Ext.getCmp('isRepacking').setValue(qualityMonitoringInstance.isRepacking); + + Ext.getCmp('recycle').setValue(false); + Ext.getCmp('repacking').setValue(true); + }else{ + Ext.getCmp('isRecycle').setValue('否'); + Ext.getCmp('isRepacking').setValue('否'); + Ext.getCmp('recycle').setValue(false); + Ext.getCmp('repacking').setValue(false); + } + } +} + + +//监测范围是器械包和材料,加载器械包和材料信息 +function loadMateriaAndTousselMsg(qualityMonitoringInstance, qualityMonitoringGoodsList){ + setIsRecycleAndIsRepackingForWholeFurnace(qualityMonitoringInstance); + if(qualityMonitoringGoodsList == null || qualityMonitoringGoodsList == '' || qualityMonitoringGoodsList.length == 0){ + return ; + } + for(var i = 0 ;i < qualityMonitoringGoodsList.length ;i++){ + var orderNumber = qualityMonitoringGoodsList[i].orderNumber; + if(orderNumber == 1){ + var tousseName = qualityMonitoringGoodsList[i].tousseName; + if(tousseName){ + // 第一个是器械包 + var barcode = qualityMonitoringGoodsList[i].barcode; + var tousseInstanceId = qualityMonitoringGoodsList[i].tousseInstanceId; + var amount = qualityMonitoringGoodsList[i].amount; + Ext.getCmp('tousseInstanceId').setValue(tousseInstanceId); + Ext.getCmp('tempBarcode').setValue(barcode); + Ext.getCmp('tousseName').setValue(tousseName); + Ext.getCmp('tousseAmount').setValue(amount); + if('是'==qualityMonitoringGoodsList[i].isRecycle){ + Ext.getCmp('isRecycle').setValue(qualityMonitoringGoodsList[i].isRecycle); + Ext.getCmp('isRepacking').setValue('否'); + Ext.getCmp('isDiscard').setValue('否'); + + Ext.getCmp('recycle').setValue(true); + Ext.getCmp('repacking').setValue(false); + Ext.getCmp('disabledBarcode').setValue(false); + }else if('是'==qualityMonitoringGoodsList[i].isRepacking){ + Ext.getCmp('isRecycle').setValue('否'); + Ext.getCmp('isRepacking').setValue(qualityMonitoringGoodsList[i].isRepacking); + Ext.getCmp('isDiscard').setValue('否'); + + Ext.getCmp('recycle').setValue(false); + Ext.getCmp('repacking').setValue(true); + Ext.getCmp('disabledBarcode').setValue(false); + }else if('是'==qualityMonitoringGoodsList[i].isDiscard){ + Ext.getCmp('isRecycle').setValue('否'); + Ext.getCmp('isRepacking').setValue('否'); + Ext.getCmp('isDiscard').setValue(qualityMonitoringGoodsList[i].isDiscard); + + Ext.getCmp('recycle').setValue(false); + Ext.getCmp('repacking').setValue(false); + Ext.getCmp('disabledBarcode').setValue(true); + }else{ + Ext.getCmp('isRecycle').setValue('否'); + Ext.getCmp('isRepacking').setValue('否'); + Ext.getCmp('isDiscard').setValue('否'); + Ext.getCmp('recycle').setValue(false); + Ext.getCmp('repacking').setValue(false); + Ext.getCmp('disabledBarcode').setValue(false); + } + }else{ + var mateialName = qualityMonitoringGoodsList[i].material; + var amount = qualityMonitoringGoodsList[i].amount; + var position = qualityMonitoringGoodsList[i].position; + Ext.getCmp('material').setValue(mateialName); + Ext.getCmp('materialAmount').setValue(amount); + Ext.getCmp('position').setValue(position); + } + + }else if(orderNumber == 2){ + var mateialName = qualityMonitoringGoodsList[i].material; + var tousseName = qualityMonitoringGoodsList[i].tousseName; + var amount = qualityMonitoringGoodsList[i].amount; + var position = qualityMonitoringGoodsList[i].position; + if(Ext.getCmp('material').getValue() != "" && mateialName != null && mateialName != ''){ + addExtractCheckMaterial(true,mateialName,amount,position,orderNumber,"","","","","","",true,tousseItemCount); + }else if(Ext.getCmp('tousseName').getValue() != "" && tousseName != null && tousseName != ''){ + var barcode = qualityMonitoringGoodsList[i].barcode; + var tousseInstanceId = qualityMonitoringGoodsList[i].tousseInstanceId; + var amount = qualityMonitoringGoodsList[i].amount; + var orderNumber = qualityMonitoringGoodsList[i].orderNumber; + var isRecycle = qualityMonitoringGoodsList[i].isRecycle; + var isRePacking = qualityMonitoringGoodsList[i].isRepacking; + var isDiscard = qualityMonitoringGoodsList[i].isDiscard; + addExtractCheckTousse(tousseName,barcode,tousseInstanceId,amount,orderNumber,isRecycle,isRePacking,isDiscard,"","","","",true); + }else{ + Ext.getCmp('material').setValue(mateialName); + Ext.getCmp('materialAmount').setValue(amount); + Ext.getCmp('position').setValue(position); + } + }else { + var tousseName = qualityMonitoringGoodsList[i].tousseName; + var mateialName = qualityMonitoringGoodsList[i].material; + if(tousseName != null && tousseName != ''){ + // 添加器械包 + var barcode = qualityMonitoringGoodsList[i].barcode; + var tousseInstanceId = qualityMonitoringGoodsList[i].tousseInstanceId; + var amount = qualityMonitoringGoodsList[i].amount; + var orderNumber = qualityMonitoringGoodsList[i].orderNumber; + var isRecycle = qualityMonitoringGoodsList[i].isRecycle; + var isRePacking = qualityMonitoringGoodsList[i].isRepacking; + var isDiscard = qualityMonitoringGoodsList[i].isDiscard; + addExtractCheckTousse(tousseName,barcode,tousseInstanceId,amount,orderNumber,isRecycle,isRePacking,isDiscard,"","","","",true); + }else if(mateialName != null && mateialName != ''){ + var amount = qualityMonitoringGoodsList[i].amount; + var orderNumber = qualityMonitoringGoodsList[i].orderNumber; + var position = qualityMonitoringGoodsList[i].position; + // 添加抽检器械和数量 + addExtractCheckMaterial(true,mateialName,amount,position,orderNumber,"","","","","","",true,tousseItemCount); + } + } + } +} + +/** + * 初始化Store. + */ +function initStore(){ + materialDefinitionStore = new Ext.data.Store({ + proxy : new Ext.data.HttpProxy({ + url : WWWROOT + '/disinfectSystem/baseData/materialDefinitionAction!getMaterialDefinitionDataIncludeForeignMD.do?selectType=material', + method : 'POST' + }), + reader : new Ext.data.JsonReader({ + totalProperty : 'totalCount', + root : 'data' + }, [ + {name : 'id',mapping : 'id'}, + {name : 'spelling',mapping : 'spelling'}, + {name : 'name',mapping : 'name'}, + {name : 'count',mapping : 'count'} + ]), + listeners : { + beforeload : function(thiz, options){ + thiz.baseParams['tousseDefinitionId'] = Ext.getCmp('tousseDefinitionId').getValue(); + } + } + }); + + tousseDefinitionStore = new Ext.data.Store({ + proxy : new Ext.data.HttpProxy({ + url : WWWROOT + '/disinfectSystem/baseData/tousseDefinitionAction!getTousseAndDiposableGoodsData.do?type='+encodeURI('器械包和外来器械包'), + method : 'POST' + }), + reader : new Ext.data.JsonReader({ + totalProperty : 'totalCount', + root : 'data' + }, [ + {name : 'id',mapping : 'id'}, + {name : 'spelling',mapping : 'spelling'}, + {name : 'name',mapping : 'name'}, + {name : 'displayName',mapping : 'displayName'}, + {name : 'amount',mapping : 'amount'}] + ) + }); + + formDefinitionStore = new Ext.data.Store({ + proxy : new Ext.data.HttpProxy({ + url : WWWROOT + '/disinfectSystem/qualityMonitoringDefinitionAction!loadLastDeployFormDefinitionGroupByFormName.do', + method : 'POST' + }), + baseParams:{formType : qmFormType}, + reader : new Ext.data.JsonReader({ + root : 'data' + },[ + {name : 'id'}, + {name : 'name'} + ] + ), + listeners:{ + load:function(store,records) { + if( otherPartAddQM == true ){ + if(records.length>0) { + if(Ext.getCmp('responsibilityPart').getValue() == '装配管理'){ + var formName = ''; + var formDefinitionId = ''; + for(var i=0;i 6){ + return false; + } + var letterNumber = /^[0-9a-zA-Z]+$/; + var atLeastOneNumber = /.*[0-9].*/; + if(text.match(letterNumber) && text.match(atLeastOneNumber)){ + return true; + } + else + { + return false; + } +} + +/** + * 创建质量监测实例的表单. + * @param id 质量监测实例id + * @returns {Ext.FormPanel} + * 材料丢失或报损添加质量监测后进入 + */ +function getFormPanelContent(id){ + initStore(); + if(recycleQM == true){ + + disableShowImageButton = true; + } + var labelWidthPosition = 123; + if(id != null && id != ''){ + labelWidthPosition = 91; + } + var userReader = new Ext.data.JsonReader({ + fields: [ + { name: 'id' }, + { name: 'fullName' }, + { name: 'orgUnitName' } + ] + }); + // 查找某科室的人员的store + var departUsersStore = new Ext.data.Store({ + proxy: new Ext.data.HttpProxy({ + url: WWWROOT + '/systemmanage/user/userAction!loadUsersBySearchString.do', + method: 'POST' + }), + reader: userReader + }); + var varibaleContent1; + var varibaleContent2; + // 责任环节带出监测项 + if(sstsConfig.hasOwnProperty('responsibilityPartBringInspectItem') && sstsConfig.responsibilityPartBringInspectItem){ + varibaleContent1 = getResponsibilityPartContent(id); + varibaleContent2 = getInspectItemContent(id); + }else{ + varibaleContent1 = getInspectItemContent(id); + varibaleContent2 = getResponsibilityPartContent(id); + } + formPanel = new Ext.FormPanel({ + id : 'addQualityMonitoringForm', + frame : true, + labelSeparator : ':', + bodyStyle : 'padding:5px 5px 0px 5px', + width : 630, + height : 500, + labelAlign : 'right', + buttonAlign : 'center', + //autoScroll : true, + bodyStyle : 'overflow-x:hidden; overflow-y:scroll', + items : [{ + id:'baseInfoPanel', + layout : 'column', + xtype:"fieldset", //定义类别为fieldset + title:"基本信息", + autoHeight:true, + items : [ + {xtype: 'hidden',name: 'id',id: 'id'}, //质量监测实例id + {xtype: 'hidden',name: 'tousseInstanceId',id: 'tousseInstanceId'}, //第一个包实例id + {xtype: 'hidden',name: 'tousseDefinitionId',id: 'tousseDefinitionId'}, //第一个包定义id + {xtype: 'hidden',name: 'tousseType',id: 'tousseType'}, //第一个器械包类型 + {xtype: 'hidden',name: 'barcode',id: 'barcode'}, //第一个器械包条码 + {xtype: 'hidden',name: 'isRecycle',id: 'isRecycle'}, //第一个是否重新回收 + {xtype: 'hidden',name: 'isRepacking',id: 'isRepacking'}, //第一个是否重新装配 + {xtype: 'hidden',name: 'isDiscard',id: 'isDiscard'}, //第一个是否废弃条码 + {xtype: 'hidden',name: 'scope',id: 'scope'}, //监测范围 + {xtype: 'hidden',name: 'type',id: 'type',value : parm_s_type}, //监测类型:“质量监测” + {xtype: 'hidden',name: 'name',id: 'name'}, //质量监测实例名称 + {xtype: 'hidden',name: 'optionAmount',id: 'optionAmount'}, //监测项元素id集合(用分号分隔) + {xtype: 'hidden',name: 'uploadImgIds',id: 'uploadImgIds'}, + {xtype: 'hidden',name: 'containerBarcode',id: 'containerBarcode'}, + {xtype: 'hidden',name: 'tousseDefRecycling',id: 'tousseDefRecycling'}, //第一个器械包是否需要回收 + {xtype: 'hidden',name: 'formDefinitionId',id: 'formDefinitionId'}, //质量监测定义id + {xtype: 'hidden',name: 'isAllTousseOfSterile',id: 'isAllTousseOfSterile'}, //是否整炉 + {xtype: 'hidden',name: 'errorDamageQmKey',id: 'errorDamageQmKey'}, + //{xtype: 'hidden',name: 'inspectType',id: 'inspectType'}, //记住上一次的监测项类型 + {xtype: 'hidden',name: 'scanWashRecord_id',id: 'scanWashRecord_id'}, //清洗记录的id + {xtype: 'hidden',name: 'scanTousseInstance_id',id: 'scanTousseInstance_id'}, //回收或灭菌扫描条码的id + varibaleContent1, + varibaleContent2, + { + layout : 'form', + columnWidth : .5, + labelWidth : (recycleQM && top.screen.width > 1280) ? 182 : labelWidthLeft, + height:setH, + items : [{ + xtype : 'datefieldWithMin', + fieldLabel : '抽检时间', + id : 'dateTime', + name : 'dateTime', +// value : new Date(), + editable : false, + format : 'Y-m-d H:i', + 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%' + }] + }, { + layout : 'form', + columnWidth : .5, + labelWidth : (recycleQM && top.screen.width > 1280) ? 182 : labelWidthLeft, + height:setH, + items : [{ + xtype : 'combo', + fieldLabel : '登记人', + id : 'createUserName', + name : 'createUserName', + queryParam : 'spell', + minChars : 0, + displayField : 'fullName', + store : departUsersStore, + forceSelection : false, + lazyInit : true, + triggerAction : 'all', + hideTrigger : false, + typeAhead : false, + allowBlank : false, + anchor : '95%', + value : userName, + listeners:{ + specialkey : function(field,e){ + if(e.getKey() == 13){ + var createUserNameBox = Ext.getCmp('createUserName'); + var text = createUserNameBox.getValue(); + if (isValidBarcode(text)) { + loadResponPersonByBarcode(text, 'createUserName'); + } else if (isValidStaffNumber(text)) { + UserTableManager.getUserByLoginName(text, function (responseText) { + if(!isUndefinedOrNullOrEmpty(responseText)){ + var result = Ext.decode(responseText); + if(result.isBelongsToCurrentLoginUserOrgs == false){ + showResultQM("登记人需为当前科室用户!"); + return + } + Ext.getCmp('createUserName').setValue(result.fullName); + }else{ + showResultQM('找不到该工号对应的人员信息'); + } + }); + }else { + showResult('该工号或条码不存在!'); + } + } + } + } + }] + }, { + layout : 'form', + columnWidth : .5, + labelWidth : (recycleQM && top.screen.width > 1280) ? 182 : labelWidthLeft, + height:setH, + items : [{ + xtype : 'textfield', + fieldLabel : "录入科室", + name : "orgUnit", + id : "orgUnit", + disabled:true, + anchor : '95%', + value:currentOrgUnitName + }] + },{ + xtype:'hidden', + id:'orgUnitCoding', + name:'orgUnitCoding', + value:currentOrgUnitCoding + },{ + layout : 'form', + columnWidth : .5, + labelWidth : (recycleQM && top.screen.width > 1280) ? 182 : labelWidthLeft, + height:setH, + items:[{ + xtype : 'textfield', + fieldLabel : "处理科室", + id : "handleDepart", + disabled:true, + anchor : '95%' + }] + },{ + layout : 'form', + columnWidth : .5, + labelWidth : (recycleQM && top.screen.width > 1280) ? 182 : labelWidthLeft, + height:setH, + items : [{ + xtype : 'textfield', + name : 'responsiblePersonBarcode', + id : 'responsiblePersonBarcode', + fieldLabel : "扫描责任人条码", + listeners : { + specialkey : function(field,e){ + if(e.getKey() == 13){ + var barcodeValue = field.getValue(); + Ext.getCmp("responsiblePersonBarcode").setValue(''); + loadResponPersonByBarcode(barcodeValue,'responsiblePerson'); + } + } + }, + anchor : '95%' + }] + },{ + layout : 'form', + columnWidth : .5, + labelWidth : (recycleQM && top.screen.width > 1280) ? 182 : labelWidthLeft, + height:setH, + items : [{ + xtype : 'textfield', + name : 'responsiblePerson', + id : 'responsiblePerson', + fieldLabel : "责任人", + disabled:true, + anchor : '95%' + }] + },{ + id:'insertBasket', + name:'insertBasket', + layout : 'form', + columnWidth : .5, + labelWidth : (recycleQM && top.screen.width > 1280) ? 182 : labelWidthLeft, + height:setH, + items : [{ + xtype : 'textfield', + name : 'scanBarcode', + id : 'scanBarcode', + fieldLabel : "重新回收篮筐条码", + listeners : { + specialkey : function(field,e){ + if(e.getKey() == 13){ + var barcodeValue = field.getValue(); + Ext.getCmp("scanBarcode").setValue(''); + ContainerTableManager.getBasketByBarcodeAndProcedures(barcodeValue,basketAllowProcedure,function(jsonStr){ + var obj = Ext.util.JSON.decode(jsonStr); + if(obj.success){ + Ext.getCmp('containerName').setValue(obj.containerName); + if(obj.containerName !== ''){ + Ext.getCmp('containerName').disable(); + } + }else{ + showResultQM(obj.message); + } + Ext.getCmp("containerBarcode").setValue(barcodeValue); + }); + } + } + }, + anchor : '95%' + }] + },{ + id:'containerNameItem', + name:'containerNameItem', + layout : 'form', + columnWidth : .5, + height:setH, + labelWidth : (recycleQM && top.screen.width > 1280) ? 182 : labelWidthLeft, + items : [{ + xtype : 'textfield', + name : 'containerName', + id : 'containerName', + fieldLabel : "重新回收篮筐名称", + disabled:true, + allowBlank:true, + anchor : '95%' + }] + },{ + id:'rinseBasketsBarcodeWrapper', + name:'rinseBasketsBarcodeWrapper', + layout : 'form', + columnWidth : .5, + labelWidth : (recycleQM && top.screen.width > 1280) ? 182 : labelWidthLeft, + height:setH, + hidden:true, + items : [{ + xtype : 'textfield', + name : 'rinseBasketsBarcode', + id : 'rinseBasketsBarcode', + fieldLabel : "清洗篮筐条码", + listeners : { + specialkey : function(field,e){ + if(e.getKey() == 13){ + var barcodeValue = field.getValue(); + Ext.getCmp("rinseBasketsBarcode").setValue(''); + Ext.Ajax.request( { + url : WWWROOT + '/disinfectSystem/qualityMonitoringInstanceAction!scanBarcodeForWashRecord.do', + params : {basketBarcode : barcodeValue}, + success : function(response, options) { + var result = Ext.decode(response.responseText); + if(result.success == false){ + showResult(result.message); + }else{ + if(result.data.length > 1){ + loadScanBarcodeMsg('rinseBasketsName','cleaningMachinePosition','cleaningMachineDate','cleaningMachineName','cleaningMachineProgramName','cleaningStartTime','cleaningEndTime','scanWashRecord_id',barcodeValue); + }else if(result.data.length == 1){ + var record = result.data[0]; + Ext.getCmp('rinseBasketsName').setValue(record.washBasketName); + Ext.getCmp('cleaningMachinePosition').setValue(record.position); + Ext.getCmp('cleaningMachineDate').setValue(record.washDate); + Ext.getCmp('cleaningMachineName').setValue(record.disinfectIdentification); + Ext.getCmp('cleaningMachineProgramName').setValue(record.disinfectProgram); + Ext.getCmp('cleaningStartTime').setValue(record.startDate); + Ext.getCmp('cleaningEndTime').setValue(record.endDate); + Ext.getCmp('scanWashRecord_id').setValue(record.washRecordID); + Ext.getCmp('responsiblePerson').setValue(record.personInCharge); + Ext.getCmp('tousseDefinitionId').setValue(record.tousseDefinitionId || ''); + Ext.getCmp('tousseName').setValue(record.tousseName || ''); + materialDefinitionStore.load() + } + } + }, + failure : function(response, options) { + + } + }); + + } + } + }, + anchor : '95%' + }] + },{ + id:'rinseBasketsNameWrapper', + name:'rinseBasketsNameWrapper', + layout : 'form', + columnWidth : .5, + height:setH, + labelWidth : (recycleQM && top.screen.width > 1280) ? 182 : labelWidthLeft, + hidden:true, + items : [{ + xtype : 'textfield', + name : 'rinseBasketsName', + id : 'rinseBasketsName', + fieldLabel : "清洗篮筐名称", + disabled:true, + allowBlank:true, + anchor : '95%' + }] + },{ + id:'cleaningMachinePositionWrapper', + name:'cleaningMachinePositionWrapper', + layout : 'form', + columnWidth : .5, + hidden:true, + height:setH, + labelWidth : (recycleQM && top.screen.width > 1280) ? 182 : labelWidthLeft, + items : [{ + xtype : 'textfield', + name : 'cleaningMachinePosition', + id : 'cleaningMachinePosition', + fieldLabel : "位置", + disabled:true, + anchor : '95%' + }] + },{ + id:'cleaningMachineDateWrapper', + name:'cleaningMachineDateWrapper', + layout : 'form', + columnWidth : .5, + height:setH, + labelWidth : (recycleQM && top.screen.width > 1280) ? 182 : labelWidthLeft, + hidden:true, + items : [{ + xtype : 'textfield', + name : 'cleaningMachineDate', + id : 'cleaningMachineDate', + fieldLabel : "日期", + disabled:true, + anchor : '95%' + }] + },{ + id:'cleaningMachineNameWrapper', + name:'cleaningMachineNameWrapper', + layout : 'form', + columnWidth : .5, + height:setH, + labelWidth : (recycleQM && top.screen.width > 1280) ? 182 : labelWidthLeft, + hidden:true, + items : [{ + xtype : 'textfield', + name : 'cleaningMachineName', + id : 'cleaningMachineName', + fieldLabel : "清洗机名称", + disabled:true, + anchor : '95%' + }] + },{ + id:'cleaningMachineProgramNameWrapper', + name:'cleaningMachineProgramNameWrapper', + layout : 'form', + columnWidth : .5, + height:setH, + labelWidth : (recycleQM && top.screen.width > 1280) ? 182 : labelWidthLeft, + hidden:true, + items : [{ + xtype : 'textfield', + name : 'cleaningMachineProgramName', + id : 'cleaningMachineProgramName', + fieldLabel : "清洗机程序名称", + disabled:true, + anchor : '95%' + }] + },{ + id:'cleaningStartTimeWrapper', + name:'cleaningStartTimeWrapper', + layout : 'form', + columnWidth : .5, + height:setH, + labelWidth : (recycleQM && top.screen.width > 1280) ? 182 : labelWidthLeft, + hidden:true, + items : [{ + xtype : 'textfield', + name : 'cleaningStartTime', + id : 'cleaningStartTime', + fieldLabel : "清洗机开始时间", + disabled:true, + anchor : '95%' + }] + },{ + id:'cleaningEndTimeWrapper', + name:'cleaningEndTimeWrapper', + layout : 'form', + columnWidth : .5, + height:setH, + labelWidth : (recycleQM && top.screen.width > 1280) ? 182 : labelWidthLeft, + hidden:true, + items : [{ + xtype : 'textfield', + name : 'cleaningEndTime', + id : 'cleaningEndTime', + fieldLabel : "清洗机结束时间", + disabled:true, + anchor : '95%' + }] + } ,{ + layout : 'form', + columnWidth : .5, + labelWidth : recycleQM ? 182 : labelWidthLeft, + hidden:true, + height:setH, + id:"idCardAndTousseBarcodeWrapper", + items : [{ + xtype : 'textfield', + name : 'idCardAndTousseBarcode', + id : 'idCardAndTousseBarcode', + fieldLabel : "扫描标识牌/器械包条码", + listeners : { + specialkey : function(field,e){ + if(e.getKey() == 13){ + var barcodeValue = field.getValue(); + Ext.getCmp("idCardAndTousseBarcode").setValue(''); + loadRecyclePersonByBarcode(barcodeValue); + } + } + }, + anchor : '95%' + }] + },{ + layout : 'form', + columnWidth : .5, + labelWidth : (recycleQM && top.screen.width > 1280) ? 182 : labelWidthLeft, + hidden:true, + height:setH, + id:"tousseNameBasicsWrapper", + items : [{ + xtype : 'textfield', + name : 'tousseNameBasics', + id : 'tousseNameBasics', + fieldLabel : "器械包名称", + disabled:true, + anchor : '95%' + }] + },{ + layout : 'form', + columnWidth : .5, + labelWidth : (recycleQM && top.screen.width > 1280) ? 182 : labelWidthLeft, + hidden:true, + height:setH, + id:"recyclePersonWrapper", + items : [{ + xtype : 'textfield', + name : 'recyclePerson', + id : 'recyclePerson', + fieldLabel : "回收员", + disabled:true, + anchor : '95%' + }] + } ,{ + layout : 'form', + columnWidth : .5, + labelWidth : (recycleQM && top.screen.width > 1280) ? 182 : labelWidthLeft, + hidden:true, + height:setH, + id:"recycleDepartmentsWrapper", + items : [{ + xtype : 'textfield', + name : 'recycleDepartments', + id : 'recycleDepartments', + fieldLabel : "回收科室", + disabled:true, + anchor : '95%' + }] + },{ + layout : 'form', + columnWidth : .5, + labelWidth : (recycleQM && top.screen.width > 1280) ? 182 : labelWidthLeft, + hidden:true, + height:setH, + id:"operationRoomWrapper", + items : [{ + xtype : 'textfield', + name : 'operationRoom', + id : 'operationRoom', + fieldLabel : "手术间", + disabled:true, + anchor : '95%' + }] + },{ + layout : 'form', + columnWidth : .5, + labelWidth : (recycleQM && top.screen.width > 1280) ? 182 : labelWidthLeft, + hidden:true, + height:setH, + id:"nurseWrapper", + items : [{ + xtype : 'textfield', + name : 'nurse', + id : 'nurse', + fieldLabel : "巡回护士", + disabled:true, + anchor : '95%' + }] + },{ + layout : 'form', + columnWidth : .5, + labelWidth : (recycleQM && top.screen.width > 1280) ? 182 : labelWidthLeft, + hidden:true, + height:setH, + id:"recycleTimeWrapper", + items : [{ + xtype : 'datefieldWithMin', + fieldLabel : '回收时间', + id : 'recycleTime', + name : 'recycleTime', +// value : new Date(), + editable : false, + height:setH, + disabled:true, + format : 'Y-m-d H:i', + 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', + anchor : '95%' + }] + },{ + layout : 'form', + columnWidth : .5, + labelWidth : (recycleQM && top.screen.width > 1280) ? 182 : labelWidthLeft, + hidden:true, + height:setH, + id:"tousseBarcodeWrapper", + items : [{ + xtype : 'textfield', + name : 'tousseBarcode', + id : 'tousseBarcode', + fieldLabel : "器械包条码", + listeners : { + specialkey : function(field,e){ + if(e.getKey() == 13){ + var barcodeValue = field.getValue(); + Ext.getCmp("tousseBarcode").setValue(''); + //后台接口赋值 + loadSterilizationByBarcode(barcodeValue); + } + } + }, + anchor : '95%' + }] + } ,{ + layout : 'form', + columnWidth : .5, + labelWidth : (recycleQM && top.screen.width > 1280) ? 182 : labelWidthLeft, + hidden:true, + height:setH, + id:"sterilizationNameWrapper", + items : [{ + xtype : 'textfield', + name : 'sterilizationName', + id : 'sterilizationName', + fieldLabel : "灭菌炉名称", + disabled:true, + anchor : '95%' + }] + },{ + layout : 'form', + columnWidth : .5, + labelWidth : (recycleQM && top.screen.width > 1280) ? 182 : labelWidthLeft, + hidden:true, + height:setH, + id:"sterilizationProgramNameWrapper", + items : [{ + xtype : 'textfield', + name : 'sterilizationProgramName', + id : 'sterilizationProgramName', + fieldLabel : "灭菌程序名称", + disabled:true, + anchor : '95%' + }] + },{ + layout : 'form', + columnWidth : .5, + labelWidth : (recycleQM && top.screen.width > 1280) ? 182 : labelWidthLeft, + hidden:true, + height:setH, + id:"heatWrapper", + items : [{ + xtype : 'textfield', + name : 'heat', + id : 'heat', + fieldLabel : "炉次", + disabled:true, + anchor : '95%' + }] + },{ + layout : 'form', + columnWidth : .5, + labelWidth : (recycleQM && top.screen.width > 1280) ? 182 : labelWidthLeft, + hidden:true, + height:setH, + id:"sterilizationStartTimeWrapper", + items : [{ + xtype : 'textfield', + name : 'sterilizationStartTime', + id : 'sterilizationStartTime', + fieldLabel : "灭菌开始时间", + disabled:true, + anchor : '95%' + }] + } ,{ + layout : 'form', + columnWidth : .5, + labelWidth : (recycleQM && top.screen.width > 1280) ? 182 : labelWidthLeft, + hidden:true, + height:setH, + id:"sterilizationEndTimeWrapper", + items : [{ + xtype : 'textfield', + name : 'sterilizationEndTime', + id : 'sterilizationEndTime', + fieldLabel : "灭菌结束时间", + disabled:true, + anchor : '95%' + }] + },{ + layout : 'form', + columnWidth : 1, + labelWidth : (recycleQM && top.screen.width > 1280) ? 182 : labelWidthLeft, + items : [ { + xtype : 'textarea', + name : 'remark', + id : 'remark', + width : 150, + height : 50, + fieldLabel : "备注", + anchor : '97%' + }] + },{ + layout : 'column', + columnWidth : 1, + labelWidth : (recycleQM && top.screen.width > 1280) ? 182 : labelWidthLeft, + height:setH, + items : [ + { + layout : 'form', + columnWidth : 0.8, + labelWidth : (recycleQM && top.screen.width > 1280) ? 182 : labelWidthLeft, + items : [ + { + xtype : 'textfield', + name : 'uploadImage', + id : 'uploadImage', + fieldLabel : "上传图片", + anchor : '100%' + } + ] + }, + { + layout : 'form', + columnWidth : 0.08, + labelWidth : (recycleQM && top.screen.width > 1280) ? 182 : labelWidthLeft, + items : [ + { xtype:'button', + text : '上传', + handler : function(){ + if(id == null || id == ''){ + showResultQM("请先保存后再上传图片!"); + }else{ + uploadWindowA(imageType_qualitymonitoring,id); + } + } + } + ] + }, + { + layout : 'form', + columnWidth : 0.12, + labelWidth : (recycleQM && top.screen.width > 1280) ? 182 : labelWidthLeft, + items : [ + { xtype:'button', + text : '预览', + disabled:disableShowImageButton, + iconCls : 'btn_ext_application_search', + handler : function(){ + top.showUploadImagesForWin(id,'质量监测图片'); + } + } + ] + } + ] + }] + }], + buttons : [/* { + id : 'addExtractCheckTousse', + text : '添加抽检器械包', + handler : function(){ + addExtractCheckTousse(); + } + },{ + id : 'addExtractCheckMaterial', + text : '添加抽检器械', + handler : function(){ + addExtractCheckMaterial(); + } + }, */{ + id : 'saveBtn', + text : '   保存    ', + handler : function(){ + //saveQualityMonitoring(this,materialDefinitionStore,false); + saveQualityMonitoringNew(this,materialDefinitionStore,false); + } + },{ + id : 'saveAndCreateBtn', + text : '保存并新建', + handler : function(){ + saveQualityMonitoringNew(this,materialDefinitionStore,true); + } + }, { + text : '   取消    ', + id : 'saveAndNewBtn', + handler : cancelQualityMonitoring + }] + }); + formPanel.add({ + id : 'tousseInfoFieldSet', + xtype:"fieldset", + labelAlign :'left', + title:"器械包信息", +// layout:'column', + autoHeight:true, + items:[{ + layout : 'column', + columnWidth : .5, + labelWidth : 90, + id:'tousseInfoSetLayout', + items : [{ + layout : 'form', + columnWidth : 1, + labelWidth : 90, + items : [{ + id : 'allTousseOfSterile', + name : 'allTousseOfSterile', + fieldLabel : '是否整炉', + xtype : 'checkbox', + inputValue : '是否整炉', + listeners:{ + check:function( thiz, checked ){ + if(Ext.getCmp('allTousseOfSterile').hidden == false){ + if(checked){ + Ext.getCmp('isAllTousseOfSterile').setValue('是'); + }else{ + Ext.getCmp('isAllTousseOfSterile').setValue('否'); + } + updateControlStatus(); + updateDisaplay(checked); + } + } + } + }] + },{ + layout : 'form', + columnWidth : .3, + id : 'recycleC', + labelWidth : 90, + items : [{ + id : 'recycle', + name : 'recycle', + fieldLabel : '重新回收', + xtype : 'checkbox', + inputValue : '重新回收', + listeners:{ + check:function( thiz, checked ){ + if(checked){ + Ext.getCmp('isRecycle').setValue('是'); + Ext.getCmp('disabledBarcode').setValue(false); + Ext.getCmp('repacking').setValue(false); + }else{ + Ext.getCmp('isRecycle').setValue('否'); + } + } + } + }] + },{ + layout : 'form', + columnWidth : .3, + id : 'repackingC', + labelWidth : 90, + items : [{ + id : 'repacking', + name : 'repacking', + fieldLabel : '重新装配', + xtype : 'checkbox', + inputValue : '重新装配', + listeners:{ + check:function( thiz, checked ){ + if(checked){ + Ext.getCmp('isRepacking').setValue('是'); + Ext.getCmp('disabledBarcode').setValue(false); + Ext.getCmp('recycle').setValue(false); + }else{ + Ext.getCmp('isRepacking').setValue('否'); + } + } + } + }] + + },{ + layout : 'form', + columnWidth : .3, + id : 'disabledBarcodeC', + labelWidth : 90, + items : [{ + id : 'disabledBarcode', + name : 'disabledBarcode', + fieldLabel : '废弃条码', + xtype : 'checkbox', + inputValue : '废弃条码', + listeners:{ + check:function( thiz, checked ){ + if(checked){ + Ext.getCmp('isDiscard').setValue('是'); + Ext.getCmp('recycle').setValue(false); + Ext.getCmp('repacking').setValue(false); + }else{ + Ext.getCmp('isDiscard').setValue('否'); + } + } + } + }] + + },{ + layout : 'column', + columnWidth : 1, + labelWidth : 90, + id: 'tosseAndMaterial', + items : [{ + layout : 'form', + id : 'tousseBarcodeC', + labelWidth : 90, + columnWidth : .36, + height:28, + items : [{ + xtype : 'textfield', + name : 'tempBarcode', + id : 'tempBarcode', + fieldLabel : "器械包条码", + listeners : { + specialkey : function(field,e){ + if(e.getKey() == 13){ + getTousseInstanceNameAndResponsiblePerson(field.getValue(), Ext.getCmp('formDefinitionId').getValue(), materialDefinitionStore,true); + getNextFocus(field); + field.setValue(''); + } + } + }, + anchor : '95%' + }] + },{ + layout : 'form', + columnWidth:.04, + labelWidth : 90, + id:"addExtractCheckTousseBtnC", + height:setH, + items : [{ + xtype:'button', + tooltip : '添加抽检器械包', + iconCls : 'btn_ext_add', + handler : function(){ + widthSetTousse = true; + widthSet = false; + addExtractCheckTousse(); + widthSetTousse = false; + var scope = Ext.getCmp("scope").getValue(); + if(Ext.getCmp("scope").getValue() == "材料和器械包"){//如果监测范围是材料和包的话 + //widthSet = true; + addExtractCheckMaterial("","",1,"","","",true,"","",true,"","",tousseItemCount); + //widthSet = false; + } + + } + }] + },{ + layout : 'form', + id : 'tousseNameC', + labelWidth : 90, + columnWidth : .4, + height:setH, + items : [{ + xtype : 'combo', + id : 'tousseName', + name : 'tousseName', + fieldLabel : '器械包名称', + queryParam : 'spell', + minChars : 0, + valueField : 'name', + displayField : 'name', + store : tousseDefinitionStore, + forceSelection : true, + lazyInit : true, + triggerAction : 'all', + hideTrigger : true, + typeAhead : false, + anchor : '95%', + listeners : { + select : function(combo, record, index) { + combo.setValue(record.data.name); + Ext.getCmp('tousseDefinitionId').setValue(record.data.id); + //加载责任人 + }, + blur : function(field){ + if(!Ext.getCmp('tousseName').getRawValue()){ + Ext.getCmp('tousseDefinitionId').setValue(''); + } + //重新加载包内的材料 + materialDefinitionStore.reload(); + if(materialItemCount > 0){ + for(var i=1;i<=materialItemCount;i++){ + if(Ext.getCmp('material0'+'_'+i)){ + Ext.getCmp('material0'+'_'+i).store.reload(); + } + } + } + } + } + }] + },{ + layout : 'form', + id : 'tousseAmountC', + labelWidth : 90, + columnWidth : .2, + items : [{ + xtype : 'numberfield', + allowDecimals : false, + name : 'tousseAmount', + id : 'tousseAmount', + fieldLabel : "器械包数量", + allowBlank : true, + blankText : '数量不能为空', + anchor : '95%' + }] + },{ + layout : 'column', + columnWidth : 1, + labelWidth : 90, + id: 'materialWrapper', + items:[{ + layout : 'form', + id : 'materialC', + columnWidth : .36, + height:setH, + labelWidth : 90, + items : [{ + xtype : 'combo', + id : 'material', + name : 'material', + fieldLabel : '抽检器械', + queryParam : 'spell', + minChars : 0, + valueField : 'id', + displayField : 'name', + store : materialDefinitionStore, + forceSelection : true, + lazyInit : true, + triggerAction : 'all', + hideTrigger : true, + typeAhead : false, + anchor : '95%', + listeners : { + select : function(combo, record, index) { + combo.setValue(record.data.name); + } + } + }] + },{ + layout : 'form', + columnWidth:.04, + labelWidth : 90, + height:setH, + id:"addExtractCheckMaterialBtnC", + items : [{ + xtype:'button', + tooltip : '添加抽检器械', + iconCls : 'btn_ext_add', + handler : function(){ + var firstChildNum = ""; + widthSet = true; + if(Ext.getCmp("scope").getValue() == "材料和器械包"){//如果监测范围是材料和包的话 + firstChildNum = 001;//这里是自己写死的,因为这个本身是第一个 + + } + addExtractCheckMaterial("","",1,"","","","","","","",firstChildNum,"",0); + widthSet = false; + } + }] + },{ + layout : 'form', + id : 'materialAmountC', + columnWidth : 0.32, + labelWidth :91, + height:setH, + items : [{ + xtype : 'numberfield', + allowDecimals : false, + name : 'materialAmount', + id : 'materialAmount', + fieldLabel : "器械数量", + allowBlank : true, + blankText : '数量不能为空', + anchor : '95%' + }] + },{ + layout : 'form', + //hidden : !(qualityMonitoringWRRecordID > 0 && (sstsConfig.hasOwnProperty('haveRinserPosition')) && sstsConfig.haveRinserPosition), + id : 'basketBarcodeC', + columnWidth : .36, + labelWidth : 90, + items : [{ + xtype : 'textfield', + name : 'basketBarcode', + id : 'basketBarcode', + fieldLabel : "篮筐条码", + anchor : '95%', + listeners : { + specialkey : function(field,e){ + if(e.getKey() == 13){ + var idName = field.getId().replace("basketBarcode","position"); + getPostionByBasketBarcode(field.getValue(),idName); + field.setValue(''); + } + } + } + }] + },{ + layout : 'form', + //hidden : !(qualityMonitoringWRRecordID > 0 && (sstsConfig.hasOwnProperty('haveRinserPosition')) && sstsConfig.haveRinserPosition), + id : 'positionC', + columnWidth : .36, + labelWidth :labelWidthPosition, + items : [{ + xtype : 'textfield', + name : 'position', + id : 'position', + editable : false, + fieldLabel : "位置", + anchor : '95%' + }] + }] + }] + }] + }] + }); + formPanel.add({ + id : 'sterilizationRecordInfo', + xtype:"fieldset", + labelAlign :'left', + title:"灭菌记录信息", + autoHeight:true, + items:[{ + layout : 'column', + columnWidth : .5, + labelWidth : 90, + id:'setLayout', + items : [{ + layout : 'form', + columnWidth : .5, + labelWidth : 90, + items : [{ + xtype : 'datefieldWithMin', + fieldLabel : '灭菌日期', + id : 'srDateTime', + name : 'srDateTime', + 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 : true, + anchor : '95%', + listeners : { + select : function() { + // this.value 2017-2-2 + //Ext.getCmp('sterilizerFre').setValue(""); + //frequencyStore.baseParams.sterilizerDate = this.value; + //var name = Ext.getCmp('sterilizerName').getValue(); + //frequencyStore.baseParams.sterilizerName = name; + //frequencyStore.load(); + } + } + }] + }/* ,{ + layout : 'form', + columnWidth : .5, + labelWidth : 90, + items : [{ + xtype : 'combo', + id : 'sterilizerName', + name : 'sterilizerName', + fieldLabel : '灭菌炉号', + queryParam : 'spell', + minChars : 0, + valueField : 'name', + displayField : 'name', + store : new Ext.data.SimpleStore({ + fields : [ 'name' ], + url : WWWROOT + '/disinfectSystem/baseData/sterilizerAction!getAllSterilizer.do?' + }), + forceSelection : true, + lazyInit : true, + triggerAction : 'all', + hideTrigger : false, + typeAhead : false, + anchor : '95%', + listeners : { + select : function(combo, record, index) { + // record.data.name 选择的值 + Ext.getCmp('sterilizerFre').setValue(""); + frequencyStore.baseParams.sterilizerName = record.data.name; + var date = Ext.getCmp('srDateTime').getRawValue(); + frequencyStore.baseParams.sterilizerDate = date; + frequencyStore.load(); + } + } + }] + },{ + layout : 'form', + columnWidth : .5, + labelWidth : 90, + items : [{ + xtype : 'combo', + id : 'sterilizerFre', + name : 'sterilizerFre', + fieldLabel : '炉次', + queryParam : 'spell', + minChars : 0, + valueField : 'value', + displayField : 'value', + store : frequencyStore, + forceSelection : true, + lazyInit : true, + triggerAction : 'all', + hideTrigger : false, + typeAhead : false, + anchor : '95%' + }] + } */] + }] + }); + return formPanel; +} +function recycleAddQualityMonitoringDo(errorDamageQmKey,tousseName,recyclingUser,depart,circuitNurse,operationRoom){ + setStartDate(Ext, 'yyyy/MM/dd HH:mm', 'dateTime'); //(设置抽检时间,取服务器时间 cjr) + disableRecycleAndRepacking(); + var responPartName = "回收清点"; + Ext.getCmp('responsibilityPart').setValue(responPartName); + if(sstsConfig.hasOwnProperty('responsibilityPartNotLimitInspect') && sstsConfig.responsibilityPartNotLimitInspect){ + formDefinitionStore.baseParams.responsiblePerson = responPartName; + //formDefinitionStore.baseParams.isNotLimitInspect = "是"; + formDefinitionStore.load(); + }else{ + formDefinitionStore.baseParams.responsiblePerson = responPartName; + formDefinitionStore.load(); + } + if(!isUndefinedOrNullOrEmpty(errorDamageQmKey)){ + Ext.getCmp("errorDamageQmKey").setValue(errorDamageQmKey); + }else{ + Ext.getCmp("errorDamageQmKey").setValue(""); + } + if((tousseName || '') !== ''){ + Ext.getCmp("tousseNameBasics").setValue(tousseName); + Ext.getCmp("tousseNameBasics").disable(); + } + if((recyclingUser || '') !== ''){ + Ext.getCmp("recyclePerson").setValue(recyclingUser); + Ext.getCmp("recyclePerson").disable(); + } + if((depart || '') !== ''){ + Ext.getCmp("recycleDepartments").setValue(depart); + Ext.getCmp("recycleDepartments").disable(); + } + if((userName || '') !== ''){ + Ext.getCmp("responsiblePerson").setValue(userName); + Ext.getCmp("responsiblePerson").disable(); + } + if((circuitNurse || '') !== ''){ + Ext.getCmp("nurse").setValue(circuitNurse); + Ext.getCmp("nurse").disable(); + } + if((operationRoom || '') !== ''){ + Ext.getCmp("operationRoom").setValue(operationRoom); + Ext.getCmp("operationRoom").disable(); + } +// formDefinitionStore.baseParams.responsiblePerson = "回收清点"; +// formDefinitionStore.load(); +} + +function showResultQM(msg){ + if(recycleQM == true){ + showResultCurPage(msg); + }else{ + showResult(msg); + } +} Index: ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/addQualityMonitoring.jsp =================================================================== diff -u -r30005 -r36027 --- ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/addQualityMonitoring.jsp (.../addQualityMonitoring.jsp) (revision 30005) +++ ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/addQualityMonitoring.jsp (.../addQualityMonitoring.jsp) (revision 36027) @@ -27,7 +27,7 @@ - +