Index: ssts-web/src/main/webapp/disinfectsystem/sterilizationmanager/sterilizationrecord/sterilizationRecordForm.js =================================================================== diff -u -r36179 -r36189 --- ssts-web/src/main/webapp/disinfectsystem/sterilizationmanager/sterilizationrecord/sterilizationRecordForm.js (.../sterilizationRecordForm.js) (revision 36179) +++ ssts-web/src/main/webapp/disinfectsystem/sterilizationmanager/sterilizationrecord/sterilizationRecordForm.js (.../sterilizationRecordForm.js) (revision 36189) @@ -1737,10 +1737,12 @@ * @param {条码} barcodeStr (器械包、灭菌篮筐、虚拟篮筐) * @param {灭菌记录id} sterilizationRecordId */ -function loadTousseInstance(barcodeStr, sterilizationRecordId, isTimeout) { - if (barcodeStr == '' || barcodeStr.length <= 0) { - showMultipleResult("请输入条码!", null, sstsConfig.messagePauseTimeOnSterilizationRecordPage); - return; +function loadTousseInstance(barcodeStr, sterilizationRecordId, isTimeout, setCode) { + if(!setCode){ + if (barcodeStr == '' || barcodeStr.length <= 0) { + showMultipleResult("请输入条码!", null, sstsConfig.messagePauseTimeOnSterilizationRecordPage); + return; + } } if (checkRepeat(barcodeStr)) {//已有,并且不是固定条码 showMultipleResult("输入的条码已存在!", null, sstsConfig.messagePauseTimeOnSterilizationRecordPage); @@ -1754,16 +1756,20 @@ } var position = top.Ext.getCmp('position').getValue(); sterilizationRecordWin.getEl().mask("正在加载中.请稍等...", "x-mask-loading"); + var params = { + sterilizationRecordId: top.Ext.getCmp('id').getValue(), + barcode: barcodeStr, + loadTousseNamesInBasket: true, //是否要加载篮筐里的器械包名称 + sterilizationRecordId: sterilizationRecordId, //灭菌记录id + checkProxyDisinfection: 'yes', //是否需要检查代理灭菌是否已录入代理灭菌单 + saveBarcode: getAlreadyScanBarcodes() //此次扫描之前已经扫描的条码集合,通过节点获取 + } + if(setCode){ + params.setCode = setCode; + } Ext.Ajax.request({ url: WWWROOT + '/disinfectSystem/sterilization/sterilizationRecordAction!loadTousseInstanceInfo.do', - params: { - sterilizationRecordId: top.Ext.getCmp('id').getValue(), - barcode: barcodeStr, - loadTousseNamesInBasket: true, //是否要加载篮筐里的器械包名称 - sterilizationRecordId: sterilizationRecordId, //灭菌记录id - checkProxyDisinfection: 'yes', //是否需要检查代理灭菌是否已录入代理灭菌单 - saveBarcode: getAlreadyScanBarcodes() //此次扫描之前已经扫描的条码集合,通过节点获取 - }, + params: params, success: function (response, options) { var result = response.responseText; var speakContent = null; @@ -1777,7 +1783,9 @@ } var resultData = Ext.decode(result); var success = resultData.success; - reloadRightGrid(resultData.tousseBarcode, 'delete'); + if(resultData.tousseBarcode){ + reloadRightGrid(resultData.tousseBarcode, 'delete'); + } if (success == 0) { if (resultData.message) { showMultipleResult(resultData.message); @@ -2296,6 +2304,88 @@ } else if (success == -1) { sterilizationRecordWin.getEl().unmask(); showMultipleResult(resultData.failureCause, null, sstsConfig.messagePauseTimeOnSterilizationRecordPage); + } else if(resultData.length && resultData.length > 0){ + for(var i=0;i' + packingBtnText + '', handler: function () { + packingForCode = false; packingTousseBtnClick0(this, true); } + },{ + xtype: 'button', + margin: '0 0 0 10', + id: "save_print2", + hidden: !sstsConfig.enableTousseNumberCollectionCodeFunction, + text: '' + packingBtnText + '(含集合码)', + handler: function () { + packingForCode = true; + packingTousseBtnClick0(this, true); + } }, { xtype: 'button', @@ -3285,6 +3298,7 @@ function showPackButton(isPrint, isReview, tousseType, showOrHidePrintBtn) { var packButton = Ext4.getCmp('save_print'); packButton.show(); + Ext4.getCmp('save_print2').show(); if (sstsConfig.showPackingGoodsBtn) { var packingLableBtn = Ext4.getCmp('packingLableBtn'); @@ -4035,11 +4049,13 @@ if (sstsConfig.autoPackingAfterScanIdCard) { packing = true; Ext4.getCmp('save_print').disable(); + Ext4.getCmp('save_print2').disable(); packingTousseBtnClick(); } } function onPackingTousseBtnClickComplete() { Ext4.getCmp('save_print').enable(); + Ext4.getCmp('save_print2').enable(); Ext4.getCmp('packingLableBtn').enable(); hidePackingTousseBtnClick_mask(); @@ -4185,10 +4201,12 @@ if (selLength > 0) { var delBasketItems = new Array(); var map = {}, dest = []; + var departmentArr = []; Ext4.each(selNodes, function (pNode) { if (pNode.childNodes.length == 0) { var ai = pNode; var tousseName = ai.get('tousseName') + var department = ai.get('department'); if (!map[tousseName]) { if (ai.get('idCardBarcode') !== '') { dest.push(ai); @@ -4197,8 +4215,16 @@ } map[tousseName] = ai; } + if(departmentArr.indexOf(department) == -1){ + departmentArr.push(department); + } } }); + if(departmentArr.length > 1){ + onPackingTousseBtnClickComplete(); + showMultipleResult('只支持同科室物品合并生成器械包集合码,请检查物品后重新操作。'); + return + } if (dest.length == 1 && isConfirm == '否') { var sterilingType = Ext4.getCmp('sterilingType').getValue(); if (packingPageAutoSetSterilizationProgramAfterSelectTousse || !sstsConfig.hideSterilingType) { @@ -4813,6 +4839,7 @@ websocketSessionId: getWebsocketSessionId(), tousseName: tousseName, tousseType: tousseType, + department:department, printImmediately: printImmediately, tousseID: tousseID } @@ -4826,6 +4853,24 @@ //装配调接口 function requestPackingTousse(params, index, isTrue) { var par = params[index]; + if(packingForCode){ + var createSetCode = false; + var lastTime = false; + var tousseInstanceIds = ''; + if(noCreateSetCode !== ''){ + createSetCode = false; + tousseInstanceIds = ''; + }else { + createSetCode = true; + tousseInstanceIds = oldTousseInstanceIds; + } + par.createSetCode = createSetCode; + par.tousseInstanceIds = tousseInstanceIds; + if(index == (params.length - 1)){ + lastTime = true; + } + par.lastTime = lastTime; + } Ext4.Ajax.request({ async: false, dataType: "json", @@ -4838,6 +4883,14 @@ getPackingMaterialsForCheck.remove(par.tousseID); materialStore.reload(); } + noCreateSetCode = result.noCreateSetCode || ''; + oldTousseInstanceIds = result.tousseInstanceIds || ''; + var errorOfCreateSetCode = result.errorOfCreateSetCode || ''; + if(errorOfCreateSetCode !== ''){ + showMultipleResult(errorOfCreateSetCode); + uncheck(); + return + } if (result.success) { var taskIdToAmountMapInfo = par.taskIdToAmountMapInfo; var obj = JSON.parse(taskIdToAmountMapInfo); @@ -4857,6 +4910,14 @@ setVideoWhenAddPackingRecord(packingRecordIdArray); } } + if(packingForCode){ + var setCode = result.setCode || ''; + var setCodeSize = result.setCodeSize || ''; + if(setCode !== ''){ + var department = result.tousses[0].department; + printSetCode(setCode,setCodeSize,department); + } + } } else { //如果返回失败的结果类型为stockNotEnough(即库存不足,则进行提示) if (result.type && (result.type == 'virtualBasketNotEnough')) { @@ -4927,6 +4988,32 @@ }); } + //打印集合码 + function printSetCode(setCode, setCodeSize, department) { + doGetLodop(); + LODOP.PRINT_INIT(""); + var tableHtml = ""; + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + + tableHtml += ""; + tableHtml += ""; + + tableHtml += ""; + tableHtml += ""; + tableHtml += ""; + + tableHtml += "
" + department + "
"; + tableHtml += "
"; + tableHtml += ""; + tableHtml += "
" + setCode; + tableHtml += "
总包数:" + setCodeSize + "
"; + LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", "" + tableHtml + ""); + LODOP.SET_PRINT_MODE("PRINT_PAGE_PERCENT", "Full-Page"); + LODOP.PRINT(); + }; + //取消勾选 function uncheck() { var basketTree = Ext4.getCmp('basketTreeGrid'); @@ -5678,6 +5765,7 @@ showPackButton(isPrint, isReview, tousseType); } else { Ext4.getCmp('save_print').hide(); + Ext4.getCmp('save_print2').hide(); Ext4.getCmp('packingLableBtn').hide(); } } @@ -5827,10 +5915,12 @@ showPackButton(isPrint, isReview, tousseType, printBOMwhenPrintLabel); } else { Ext4.getCmp('save_print').hide(); + Ext4.getCmp('save_print2').hide(); Ext4.getCmp('packingLableBtn').hide(); } } else { Ext4.getCmp('save_print').hide(); + Ext4.getCmp('save_print2').hide(); Ext4.getCmp('packingLableBtn').hide(); } } Index: ssts-web/src/main/webapp/disinfectsystem/config/qysrmyy/config.js =================================================================== diff -u -r35541 -r36189 --- ssts-web/src/main/webapp/disinfectsystem/config/qysrmyy/config.js (.../config.js) (revision 35541) +++ ssts-web/src/main/webapp/disinfectsystem/config/qysrmyy/config.js (.../config.js) (revision 36189) @@ -100,6 +100,8 @@ enableRealTimeDashboardsForDataFunction:true, //是否启用手写签名功能 enableHandwrittenSignatureFunction:true, + //是否启用器械包集合码功能 + enableTousseNumberCollectionCodeFunction:true, //外来器械申请单默认科室配置 foreignTousseAppliationDefaultDepartment:{ '0316':{// 登录人所在的科室编码