Index: ssts-web/src/main/webapp/disinfectsystem/washanddisinfectmanager/washanddisinfectrecord/washAndDisinfectForm.js =================================================================== diff -u -r38353 -r39269 --- ssts-web/src/main/webapp/disinfectsystem/washanddisinfectmanager/washanddisinfectrecord/washAndDisinfectForm.js (.../washAndDisinfectForm.js) (revision 38353) +++ ssts-web/src/main/webapp/disinfectsystem/washanddisinfectmanager/washanddisinfectrecord/washAndDisinfectForm.js (.../washAndDisinfectForm.js) (revision 39269) @@ -1016,6 +1016,14 @@ } } + if(sstsConfig.enableOperatorAndResponsibleOfficerScanOfwashanddisinfectrecord){ + if (fontSize == 12) { + fieldsetHeight += 40; + } else { + fieldsetHeight += 60; + } + } + formObj = new top.Ext.FormPanel({ id: 'washForm', frame: true, @@ -1090,26 +1098,64 @@ }, { columnWidth: 0.5, layout: 'form', + hidden:!sstsConfig.enableOperatorAndResponsibleOfficerScanOfwashanddisinfectrecord, items: [{ xtype: 'textfield', + fieldLabel: "操作员条码", + name: "scanOperatorCode", + id: "scanOperatorCode", + anchor: '99%', + listeners: { + specialkey: function (field, ee) { + if (ee.getKey() == Ext.EventObject.ENTER) { + loadUserByBarcode(field, 'operator','', 'scanPersonInChargeCode'); + } + } + } + }] + }, { + columnWidth: 0.5, + layout: 'form', + items: [{ + xtype: 'textfield', fieldLabel: "操作员", name: "operator", readOnly: true, id: "operator", anchor: '99%', + height: 22, cls: 'fieldReadOnlyNoRemove' }] }, { columnWidth: 0.5, layout: 'form', + hidden:!sstsConfig.enableOperatorAndResponsibleOfficerScanOfwashanddisinfectrecord, items: [{ xtype: 'textfield', + fieldLabel: "责任人条码", + name: "scanPersonInChargeCode", + id: "scanPersonInChargeCode", + anchor: '99%', + listeners: { + specialkey: function (field, ee) { + if (ee.getKey() == Ext.EventObject.ENTER) { + loadUserByBarcode(field, 'personInCharge','personInChargeCode', 'inputText'); + } + } + } + }] + }, { + columnWidth: 0.5, + layout: 'form', + items: [{ + xtype: 'textfield', fieldLabel: "责任人", name: "personInCharge", readOnly: true, id: "personInCharge", anchor: '99%', cls: 'fieldReadOnlyNoRemove', + height: 22, listeners: { focus: function () { //获取焦点 @@ -1204,7 +1250,11 @@ } else if (result.returnType == 'cleanmethod') { loadWashProgramByBarcode(barcode); } else if (result.returnType == 'user') { - loadUserByBarcode(barcode); + if(sstsConfig.enableOperatorAndResponsibleOfficerScanOfwashanddisinfectrecord){ + showResult("找不到该条码所对应的信息!"); + }else { + loadUserByBarcode(field,'personInCharge','personInChargeCode','basketTreePanel'); + } } else if (result.returnType == 'position') { loadPositionByBarcode(barcode); } else if (result.returnType == 'tousseInstance') { //扫描的是标识牌或者是固定条码 @@ -1711,6 +1761,12 @@ } } + //HZSRMYY-86:责任人操作人 + if(sstsConfig.enableOperatorAndResponsibleOfficerScanOfwashanddisinfectrecord){ + top.Ext.getCmp('scanOperatorCode').disable(); + top.Ext.getCmp('scanPersonInChargeCode').disable(); + } + //初始化日期大小 top.Ext.getCmp('startDateStr').setValue(action.result.data.startDateStr); top.Ext.getCmp('endDateStr').setValue(action.result.data.endDateStr); @@ -2238,56 +2294,70 @@ top.Ext.getCmp('inputText').setValue(''); } // 根据条码获取用户 -function loadUserByBarcode(barcode) { - top.Ext.getCmp('inputText').setValue(''); - var setComBoVal = ''; - var cleanMinutes = 0; +function loadUserByBarcode(thiz, userNameField, userCodeField, focusField) { + var barcode = thiz.getValue(); + thiz.setValue(''); if (isUndefinedOrNullOrEmpty(barcode)) { showResult('条码不能为空!'); } UserTableManager.getUserByBarcode(barcode, function (responseText) { if (!isUndefinedOrNullOrEmpty(responseText)) { var result = top.Ext.decode(responseText); if (!result.success) { - showResult(result.message || "不允许登记非本科室人员,请扫描本科室人员条码!"); + result.isNotSameOrgUnit ? showMultipleResult(result.message || "不允许登记非本科室人员,请扫描本科室人员条码!") : showMultipleResult(result.message || "输入的条码有误!", null, sstsConfig.messagePauseTimeOnPackingPage); //(cjr) return; } - top.Ext.getCmp('personInCharge').setValue(result.fullName); - top.Ext.getCmp('personInChargeCode').setValue(result.name); - var selNode = top.Ext.getCmp('basketTreePanel').getSelectionModel().getSelectedNode(); - var root = top.Ext.getCmp('basketTreePanel').getRootNode(); - if (selNode != null && !selNode.isLeaf()) { - selNode.attributes.personInCharge = result.fullName; - selNode.attributes.personInChargeCode = result.name; + if(sstsConfig.enableOperatorAndResponsibleOfficerScanOfwashanddisinfectrecord){ + if(focusField !== 'basketTreePanel'){ + if(userCodeField !== ''){ + top.Ext.getCmp(userCodeField).setValue(result.name); + } + top.Ext.getCmp(userNameField).setValue(result.fullName); + focusExtJSField(top.Ext.getCmp(focusField)); + } + }else { + top.Ext.getCmp(userNameField).setValue(result.fullName); + top.Ext.getCmp(userCodeField).setValue(result.name); + } - var newBasket = cloneBasket(selNode); - var curIndex = root.indexOf(selNode); - var nextNode = selNode.nextSibling; - root.removeChild(selNode); - if (nextNode != null) { - root.insertBefore(newBasket, nextNode); + if(focusField == 'basketTreePanel' || focusField == 'inputText'){ + var selNode = top.Ext.getCmp('basketTreePanel').getSelectionModel().getSelectedNode(); + var root = top.Ext.getCmp('basketTreePanel').getRootNode(); + if (selNode != null && !selNode.isLeaf()) { + selNode.attributes.personInCharge = result.fullName; + selNode.attributes.personInChargeCode = result.name; + + var newBasket = cloneBasket(selNode); + var curIndex = root.indexOf(selNode); + var nextNode = selNode.nextSibling; + root.removeChild(selNode); + if (nextNode != null) { + root.insertBefore(newBasket, nextNode); + } else { + root.appendChild(newBasket); + } } else { - root.appendChild(newBasket); - } - } else { - root.eachChild(function (child) { - var personInCharge = child.attributes.personInCharge; - if (child.attributes.personInCharge == null || child.attributes.personInCharge == '') { - child.attributes.personInCharge = result.fullName; - child.attributes.personInChargeCode = result.name; - var newBasket = cloneBasket(child); - var curIndex = root.indexOf(child); - var nextNode = child.nextSibling; - root.removeChild(child); - if (nextNode != null) { - root.insertBefore(newBasket, nextNode); - } else { - root.appendChild(newBasket); + root.eachChild(function (child) { + var personInCharge = child.attributes.personInCharge; + if (child.attributes.personInCharge == null || child.attributes.personInCharge == '') { + child.attributes.personInCharge = result.fullName; + child.attributes.personInChargeCode = result.name; + var newBasket = cloneBasket(child); + var curIndex = root.indexOf(child); + var nextNode = child.nextSibling; + root.removeChild(child); + if (nextNode != null) { + root.insertBefore(newBasket, nextNode); + } else { + root.appendChild(newBasket); + } } - } - }); + }); + } + return; } + } else { showResult('找不到该条码所对应的人员信息'); } Index: ssts-web/src/main/webapp/disinfectsystem/config/hzszxrmyy/config.js =================================================================== diff -u -r38987 -r39269 --- ssts-web/src/main/webapp/disinfectsystem/config/hzszxrmyy/config.js (.../config.js) (revision 38987) +++ ssts-web/src/main/webapp/disinfectsystem/config/hzszxrmyy/config.js (.../config.js) (revision 39269) @@ -122,6 +122,8 @@ enableTraceableToussesShippedBackToTheOriginalApplyInfoFunction:true, //启用质量监测登记材料明细功能 enableRecordMaterialDetailsOfQualityMonitoring:true, + //启用清洗消毒操作员和责任员扫码功能 + enableOperatorAndResponsibleOfficerScanOfwashanddisinfectrecord:true, //启用可登记合格的质量监测功能 enableRecordsQualifiedOfQualityMonitoringFunction:true //质量监测单的表单字段必填项配置