Index: ssts-web/src/main/webapp/disinfectsystem/packing/directPacking.js =================================================================== diff -u -r21658 -r21673 --- ssts-web/src/main/webapp/disinfectsystem/packing/directPacking.js (.../directPacking.js) (revision 21658) +++ ssts-web/src/main/webapp/disinfectsystem/packing/directPacking.js (.../directPacking.js) (revision 21673) @@ -130,6 +130,23 @@ barcodeField.setValue(); } + function loadIdCardByScanBarcode(barcode ,isNeedIdCard){ + + IDCardDefinitionTableManager.getAvailableDefinitionByBarcode(barcode,function(resultJsonStr){ + var tousseInfo = JSON.parse(resultJsonStr); + if(isUndefinedOrNullOrEmpty(tousseInfo.errorMsg)){ + var tousseName = tousseInfo.idCard.tousseDefinition.name; + Ext.getCmp('idCardBarcode').setValue(tousseInfo.idCard.id); + Ext.getCmp('idCardDefinitionId').setValue(tousseInfo.idCard.idCardDefinitionId); + Ext.getCmp('idCardName').setValue(tousseName); + } + else + { + if(isNeedIdCard == "是"){showResult("请给该包添加标识牌");} + } + }); + } + function directPacking_autoPacking(){ if(sstsConfig.autoPackingAfterScanIdCard){ submitPacking(''); @@ -180,6 +197,10 @@ PackingTableManager.loadTousseByBarcodeForRepacking(barcode,function(resultJsonStr){ var tousseInfo = JSON.parse(resultJsonStr); if(tousseInfo.success){ + if(Ext.getCmp('packingMode_id').getValue() == "directPacking" && !tousseInfo.isTousseFixedBarcode){ + showResult("自定义装配模式下,只能扫器械包固定条码"); + return false; + } var tousseId = tousseInfo.tousseDefinitionId; var tousseName = tousseInfo.tousseName; var tousseType = tousseInfo.tousseType; @@ -188,15 +209,22 @@ // Ext.getCmp('idCardName').setValue(tousseName); Ext.getCmp('tousseName').setValue(tousseName); Ext.getCmp('tousseBarcode').setValue(barcode); - Ext.getCmp('operator').setValue(tousseInfo.operator); - Ext.getCmp('reviewer').setValue(tousseInfo.reviewer); + if(typeof(tousseInfo.operator) != "undefined"){ + Ext.getCmp('operator').setValue(tousseInfo.operator); + } + if(typeof(tousseInfo.reviewer) != "undefined"){ + Ext.getCmp('reviewer').setValue(tousseInfo.reviewer); + } + Ext.getCmp('packageType').setValue(tousseInfo.packageType); Ext.getCmp('sterilingType1').setValue(tousseInfo.sterilingType); // Ext.getCmp('disinfectionDate').setValue(tousseInfo.sterileStartDate); Ext.getCmp('packAmount').setValue(1); -// Ext.getCmp('isThereIdentificationCard').setValue('是'); + Ext.getCmp('isThereIdentificationCard').setValue(tousseInfo.isThereIdentificationCard); + loadIdCardByScanBarcode(tousseInfo.idCardInstanceBarcode,tousseInfo.isThereIdentificationCard); + Ext.getCmp('tempTousseType').setValue(tousseType); loadImage(tousseId,tousseName); loadMaterials(tousseId); Index: ssts-packing/src/main/java/com/forgon/disinfectsystem/packing/dwr/table/PackingTableManager.java =================================================================== diff -u -r21552 -r21673 --- ssts-packing/src/main/java/com/forgon/disinfectsystem/packing/dwr/table/PackingTableManager.java (.../PackingTableManager.java) (revision 21552) +++ ssts-packing/src/main/java/com/forgon/disinfectsystem/packing/dwr/table/PackingTableManager.java (.../PackingTableManager.java) (revision 21673) @@ -658,6 +658,7 @@ TousseInstance tousseInstance = (TousseInstance) barcodeDevice; TousseDefinition tousseDefinition = tousseInstance.getTousseDefinition(); + boolean haveIDCard = tousseDefinitionManager.isThereIDCard(tousseDefinition); obj.put("barcode", tousseInstance.getBarcode()); obj.put("tousseDefinitionId", tousseDefinition.getId()); obj.put("tousseName", tousseDefinition.getName()); @@ -669,6 +670,12 @@ obj.put("packageType", tousseInstance.getPackageType()); obj.put("sterilingType", tousseInstance.getSterilingType()); obj.put("sterileStartDate", tousseInstance.getSterileStartDate()); + if(haveIDCard){ + obj.put("isThereIdentificationCard", "是"); + } + obj.put("idCardInstanceBarcode", tousseInstance.getIdCardInstanceBarcode()); + obj.put("isTousseFixedBarcode",tousseInstance.getTousseFixedBarcode()); + JSONUtil.addSuccess(obj, true); } catch (Exception e) { e.printStackTrace();