Index: ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/recycleForTouchScreen.js =================================================================== diff -u -r37693 -r37814 --- ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/recycleForTouchScreen.js (.../recycleForTouchScreen.js) (revision 37693) +++ ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/recycleForTouchScreen.js (.../recycleForTouchScreen.js) (revision 37814) @@ -3270,7 +3270,7 @@ var recyclingApplicationId = $('#recyclingApplicationId').val(); var materials = $('#materials' + row).val(); DWREngine.setAsync(false); - RecyclingRecordTableManager.getTousseIntoBasketAmount(materials, tousseDefinitionID, recycleAmount, idCardBarcode, JSON.stringify(params), JSON.stringify(getTousseIntoBasketInfo()), recyclingApplicationId, function (result) { + RecyclingRecordTableManager.getTousseIntoBasketAmount(materials, tousseDefinitionID, recycleAmount, idCardBarcode, JSON.stringify(params), JSON.stringify(getTousseIntoBasketInfo()), recyclingApplicationId, foreignTousseInvoicedAndNoUse, function (result) { var jsonObj = JSON.parse(result); if (!jsonObj.success) { alertDiv(jsonObj.message); @@ -4973,7 +4973,14 @@ submitFormFunction(confirmation, saveAndNew, false, print, recyclingAmountConfirm); }, 800, 500); } else { - submitFormFunction(confirmation, saveAndNew, false, print, recyclingAmountConfirm); + //ZSYY-335:外来器械发货后可以二次回收 + if(sstsConfig.enableSecondRecyclingAfterInvoiceFunction && foreignTousseInvoicedAndNoUse == 'true'){ + dialogConfirm(lastTousseNames+"("+params_barcode+")为已发货状态,是否直接进行二次回收?", function () { + submitFormFunction(confirmation, saveAndNew, false, print, recyclingAmountConfirm,false, '否', foreignTousseInvoicedAndNoUse); + }); + }else { + submitFormFunction(confirmation, saveAndNew, false, print, recyclingAmountConfirm); + } } } @@ -5109,7 +5116,7 @@ checkAutoReturnBorrowing(confirmation, saveAndNew, print, recyclingAmountConfirm); } }); - } else if (tousseTypeisForeignTousseDefinition == true && (recyclingStatus == '部分接收' || recyclingStatus == '待接收' || recyclingStatus == '待回收')) { + } else if (tousseTypeisForeignTousseDefinition == true && (recyclingStatus == '部分接收' || recyclingStatus == '待接收' || recyclingStatus == '待回收' || recyclingStatus == '已接收')) { dialogConfirm("还有部分器械包未装入篮筐,是否继续保存?", function () { if (sstsConfig.showRecyclingDetail && recyclingTousses.length > 0) { showRecyclingDetail(recyclingTousses, function () { @@ -5141,11 +5148,12 @@ * @param saveAndNew 保存并新建回收记录操作 * @param autoReturnTheBorrowingTousse 自动归还借物单 * @param print 保存并打印回收记录操作 + * @param foreignTousseInvoicedAndNoUse true表示外来器械发货后可以二次回收 * Annie 如果tally为true是清点确认 否则就是false */ //是否进行清点确认 false 为保存,true 为清点确认 var IntheBoxState = false; -function submitFormFunction(confirmation, saveAndNew, autoReturnTheBorrowingTousse, print, recyclingAmountConfirm, isConfirm, continueRecycleItemsthatLessThanSendAmount) { +function submitFormFunction(confirmation, saveAndNew, autoReturnTheBorrowingTousse, print, recyclingAmountConfirm, isConfirm, continueRecycleItemsthatLessThanSendAmount, foreignTousseInvoicedAndNoUse) { isConfirm = isConfirm || false; var basketSize = getBasketSizeObject('array'); if (typeof basketSize == 'string') { @@ -5209,6 +5217,7 @@ communicationUserName: $('#communicationUserName').val(), communicationUserCode: $('#communicationUserCode').val(), continueRecycleItemsthatLessThanSendAmount:continueRecycleItemsthatLessThanSendAmount || '否', + foreignTousseInvoicedAndNoUse:foreignTousseInvoicedAndNoUse || '', needPrint: print }, success: function (result) { @@ -6668,13 +6677,14 @@ var recyclingStatus = null; if (!isUndefinedOrNullOrEmpty(recyclingApplicationId)) { DWREngine.setAsync(false); - RecyclingApplicationTableManager.getRecyclingApplicationForRecycle(recyclingApplicationId, function (application) { + RecyclingApplicationTableManager.getRecyclingApplicationForRecycle(recyclingApplicationId,foreignTousseInvoicedAndNoUse, function (application) { if (application == null) return; recyclingStatus = application.recyclingStatus; if (application.useRecordId != null) { $("#useRecordId").val(application.useRecordId); } + console.log(application) var specialInfection = application.specialInfection || ''; var specialInfectionColorCode = application.specialInfectionColorCode || ''; if (specialInfection !== '') { @@ -6703,6 +6713,7 @@ } } } + } else if (application.recyclingRecordId != null && application.type == TYPE_FOREIGNTOUSSEAPPLIACTION && (application.recyclingStatus == "部分接收" || application.recyclingStatus == "部分回收")) { loadRecyclingRecordById(application.recyclingRecordId); findMaterialErrorDamageByTousseBarcode(application.tousseBarcodes); @@ -6722,6 +6733,75 @@ } } } + var ids = ''; + var len = 0; + $('#tousseItemTable').children().first().children().each(function (row, element) { + // 判断是否被删除,为0代表没有被删除 + if ($('#deleted' + row).val() == '0') { + var tousseDefinitionID = $('#tousseDefinitionID'+row).val(); + ids += ',' + tousseDefinitionID; + len++; + } + }); + if (application.applicationItems != null && foreignTousseInvoicedAndNoUse == 'true') { + var row = len; + canTerminateTousseItemIds = []; + + for (var i = 0; i < application.applicationItems.length; ++i) { + //申请项 + var item = application.applicationItems[i]; + if (item.diposable == '否' && item.isRecycling != '否' && item.tousseType != '敷料包' && item.tousseType != '自制物品' && ids.indexOf(item.tousseDefinitionId) == -1) { + var recycleAmount = item.prepareRecycleAmount; + if (recycleAmount == null) { + recycleAmount = item.amount; + } + var appType = $("#appType").val(); + if (appType == "通用申请单" && sstsConfig.defaultRecycleAmountOfComboFormIsZero) {//通用申请单并且配置为true,回收数量默认为0 + recycleAmount = 0; + } else if (appType == "器械包申请单" && sstsConfig.defaultRecycleAmountOfTousseFormIsZero) {//器械包申请单并且配置为true,回收数量默认为0 + recycleAmount = 0; + } + + var errorDamageQmKey = item.errorDamageQmKey; + if (isUndefinedOrNullOrEmpty(errorDamageQmKey)) { + var timeStr = new Date().getTime(); + errorDamageQmKey = item.tousseDefinitionId + "_" + timeStr; + } + var circuitNurse = item.circuitNurse || ''; + var operationRoom = item.operationRoom || ''; + var toussItem = { + row: row, + tousseItemId: item.id || '', + tousseName: item.tousseName, + tousseDefinitionID: item.tousseDefinitionId, + applicationAmount: item.amount, + recycleAmount: recycleAmount, + loadedAmount: 0, + isCleanedEntirely: item.isCleanedEntirely, + tousseType: item.tousseType, + isThereIdentificationCard: item.isThereIdentificationCard, + isApplyEntireTousse: item.isApplyEntireTousse, + urgentAmount: item.urgentAmount, + hiddenUrgentAmount: item.hiddenUrgentAmount, + errorRemark: item.errorRemark, + damageRemark: item.damageRemark, + urgentLevel: item.urgentLevel, + tousseRemark: '', + errorDamageQmKey: errorDamageQmKey, + spelling: item.spelling, + circuitNurse: circuitNurse, + operationRoom: operationRoom, + remarkOfApplyGoods: item.remarkOfApplyGoods, + taskGroup: item.taskGroup, + colorCode: item.colorCode, + packed: item.packed + }; + addToussItem(toussItem, false); + canTerminateTousseItemIds.push(item.id); + row++; + } + } + } } else { $("#depart").text(application.depart); $("#departCode").val(application.departCoding); Index: ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseApplicationView.jsp =================================================================== diff -u -r37721 -r37814 --- ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseApplicationView.jsp (.../foreignTousseApplicationView.jsp) (revision 37721) +++ ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseApplicationView.jsp (.../foreignTousseApplicationView.jsp) (revision 37814) @@ -26,7 +26,7 @@ request.setAttribute("fontSize",AcegiHelper.getLoginUser().getFontSize() == null?"12":AcegiHelper.getLoginUser().getFontSize()); boolean isBeApplication = AcegiHelper.getLoginUser().isBeApplication(); request.setAttribute("isBeApplication",isBeApplication); - SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm"); + SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd"); request.setAttribute("today", dateFormat.format(new Date())); SupplyRoomConfigManager supplyRoomConfigManager = (SupplyRoomConfigManager)SpringBeanManger.getBean("supplyRoomConfigManager"); @@ -202,6 +202,7 @@ + @@ -246,6 +247,11 @@
+ + + + +
Index: ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/recycleForTouchScreen.jsp =================================================================== diff -u -r37120 -r37814 --- ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/recycleForTouchScreen.jsp (.../recycleForTouchScreen.jsp) (revision 37120) +++ ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/recycleForTouchScreen.jsp (.../recycleForTouchScreen.jsp) (revision 37814) @@ -237,6 +237,7 @@ var secondOrgUnitName = '<%=request.getAttribute("orgUnitName")%>'; var fromLogin = '${fromLogin}'; var cleanBasketBarcodes = '${param.cleanBasketBarcodes}'; +var foreignTousseInvoicedAndNoUse = '${param.foreignTousseInvoicedAndNoUse}'; if(fromLogin == 'true'){ welcome(departName,userName); <%session.removeAttribute("fromLogin");%> Index: ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/awaitForRecycleList.js =================================================================== diff -u -r37345 -r37814 --- ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/awaitForRecycleList.js (.../awaitForRecycleList.js) (revision 37345) +++ ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/awaitForRecycleList.js (.../awaitForRecycleList.js) (revision 37814) @@ -102,12 +102,12 @@ return addZero(parseInt(v.month, 10) + 1) + "-" + addZero(v.date) + " " + addZero(v.hours) + ":" + addZero(v.minutes); } } -function recycleTheApplication(id, barcode, cleanBasketBarcodes) { +function recycleTheApplication(id, barcode, cleanBasketBarcodes, foreignTousseInvoicedAndNoUse) { var rememberRecycleUser = CookieManager.getCookie("rememberRecycleUser"); if(cleanBasketBarcodes){ - location.href = "recycleForTouchScreen.jsp?resolution=" + resolution + "&recyclingApplicationId=" + id + "&barcode=" + barcode + "&rememberRecycleUser=" + rememberRecycleUser + '&source=' + source + '&cleanBasketBarcodes=' + cleanBasketBarcodes; + location.href = "recycleForTouchScreen.jsp?resolution=" + resolution + "&recyclingApplicationId=" + id + "&barcode=" + barcode + "&rememberRecycleUser=" + rememberRecycleUser + '&source=' + source + '&cleanBasketBarcodes=' + cleanBasketBarcodes + '&foreignTousseInvoicedAndNoUse=' + foreignTousseInvoicedAndNoUse; }else { - location.href = "recycleForTouchScreen.jsp?resolution=" + resolution + "&recyclingApplicationId=" + id + "&barcode=" + barcode + "&rememberRecycleUser=" + rememberRecycleUser + '&source=' + source + location.href = "recycleForTouchScreen.jsp?resolution=" + resolution + "&recyclingApplicationId=" + id + "&barcode=" + barcode + "&rememberRecycleUser=" + rememberRecycleUser + '&source=' + source + '&foreignTousseInvoicedAndNoUse=' + foreignTousseInvoicedAndNoUse; } } @@ -952,7 +952,7 @@ if(msg.cleanBasketBarcodes && msg.cleanBasketBarcodes.length > 0){ cleanBasketBarcodes = msg.cleanBasketBarcodes.join(';'); } - recycleTheApplication(id, barcode, cleanBasketBarcodes); + recycleTheApplication(id, barcode, cleanBasketBarcodes, msg.foreignTousseInvoicedAndNoUse); } else if (msg.departMent != "" && msg.orgUnitCoding != "") { var id = $("#inputselect").val(); var appType = $("#appTypeSelect").val(); Index: ssts-web/src/main/webapp/disinfectsystem/config/zsyy/config.js =================================================================== diff -u -r35713 -r37814 --- ssts-web/src/main/webapp/disinfectsystem/config/zsyy/config.js (.../config.js) (revision 35713) +++ ssts-web/src/main/webapp/disinfectsystem/config/zsyy/config.js (.../config.js) (revision 37814) @@ -311,6 +311,8 @@ enablePackagingRecordFunction:true, //明细核算月报是否显示材料数量列 showMaterialsAmountColumnOfDetailMonthReport : true, + //启用外来器械包发货后可直接二次回收的功能 + enableSecondRecyclingAfterInvoiceFunction:true, //外来器械包申请单扩展列 extendedColumnConfigOfForeignTousseApplicationForm:["packingState", "sterilizationState"] } \ No newline at end of file Index: ssts-web/src/main/webapp/disinfectsystem/useRecord/tabs/tousseInstanceInfoTab.js =================================================================== diff -u -r37610 -r37814 --- ssts-web/src/main/webapp/disinfectsystem/useRecord/tabs/tousseInstanceInfoTab.js (.../tousseInstanceInfoTab.js) (revision 37610) +++ ssts-web/src/main/webapp/disinfectsystem/useRecord/tabs/tousseInstanceInfoTab.js (.../tousseInstanceInfoTab.js) (revision 37814) @@ -2259,6 +2259,20 @@ readOnly : true, cls : 'fieldReadOnlyNoRemove' }] + },{ + layout : 'form', + columnWidth : 1, + cls:'edit-part2-labelwidth', + hidden : !sstsConfig.enableSecondRecyclingAfterInvoiceFunction, + items : [{ + id : 'userRemark', + name : 'userRemark', + xtype : 'textfield', + fieldLabel :'备注', + anchor : '100%', + readOnly : true, + cls : 'fieldReadOnlyNoRemove' + }] }] }], buttons : [this.cancelButton] @@ -2891,7 +2905,10 @@ top.Ext.getCmp('operatorForTab').setValue(useRecord.operator); //使用记录_操作员 top.Ext.getCmp('circuitNurseForTab').setValue(useRecord.circuitNurse); //使用记录_巡回护士 top.Ext.getCmp('washHandNurseForTab').setValue(useRecord.washHandNurse); //使用记录_洗手护士 - + //ZSYY-335:使用记录备注 + if(sstsConfig.enableSecondRecyclingAfterInvoiceFunction){ + top.Ext.getCmp('userRemark').setValue(useRecord.remark); + } } //质量记录 Index: ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseApplicationView.js =================================================================== diff -u -r37813 -r37814 --- ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseApplicationView.js (.../foreignTousseApplicationView.js) (revision 37813) +++ ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseApplicationView.js (.../foreignTousseApplicationView.js) (revision 37814) @@ -718,6 +718,93 @@ defaultSortField = "expression case when reviewStatus = '待审核' then 0 when reviewStatus = '已通过' then 1 when reviewStatus = '已否决' then 2 else 1 end, applicationTime desc "; } + var tbarItems = [{ + text: '申请开始时间:' + }, { + xtype: 'datefieldWithMin', + id: 'applicationStartTime', + name: 'applicationStartTime', + width: 130, + 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', + selectOnFocus: true, + format: 'Y-m-d H:i', + theHours: 0, + theMinutes: 0, + value:new Date(today + ' 00:00') + }, { + text: '申请结束时间:' + }, { + xtype: 'datefieldWithMin', + width: 130, + id: 'applicationEndTime', + name: 'applicationEndTime', + 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', + selectOnFocus: true, + format: 'Y-m-d H:i', + theHours: 23, + theMinutes: 59, + value:new Date(today + ' 23:59') + }, { + text: '回收状态:' + }, { + xtype: 'multiSelect', + triggerAction: 'all', + id: 'queryRecyclingStatus', + name: 'queryRecyclingStatus', + valueField: 'value', + displayField: 'value', + store: new Ext.data.SimpleStore({ + fields: ['value'], + data: [ + ['待接收'], ['部分接收'], ['已接收'], ['待回收'], ['部分回收'], ['二次回收'], ['已提前归还'], ['已废弃'] + ] + }), + mode: 'local', + forceSelection: false, + editable: false + }, { + text: '病人姓名:' + }, { + xtype: 'textfield', + id: 'queryPatient', + name: 'queryPatient' + }, { + text: '外来器械包名称:' + }, { + xtype: 'textfield', + id: 'queryTousseName', + name: 'queryTousseName' + }, { + text: '查询', + minWidth: 50, + iconCls: 'icon_search', + handler: function () { + var applicationStartTime = Ext.getCmp("applicationStartTime").getRawValue(); + var applicationEndTime = Ext.getCmp("applicationEndTime").getRawValue(); + if (isUndefinedOrNullOrEmpty(applicationStartTime) || isUndefinedOrNullOrEmpty(applicationEndTime)){ + Ext.Msg.alert('警告', '时间不能为空!'); + return; + } + var value1 = Date.parse(applicationStartTime); + var value2 = Date.parse(applicationEndTime); + if (value1 > value2) { + Ext.Msg.alert('警告', '开始时间不能大于结束时间!'); + return; + } + + document.getElementById('parm_s_applicationStartTime').value = applicationStartTime + ':00'; + document.getElementById('parm_s_applicationEndTime').value = applicationEndTime + ':59'; + document.getElementById('parm_s_queryRecyclingStatus').value = Ext.getCmp('queryRecyclingStatus').getValue(); + document.getElementById('parm_s_queryPatient').value = Ext.getCmp('queryPatient').getValue(); + document.getElementById('parm_s_queryTousseName').value = Ext.getCmp('queryTousseName').getValue(); + grid.dwrReload(); + } + }]; + + var requestTbar = new Ext.Toolbar({ + items: tbarItems + }); + grid = new Ext.ux.ForgonPageGrid({ title: entityName + '列表', tbar: tbar, @@ -732,7 +819,14 @@ plugins: filters, renderTo: 'gridDiv', pageSizeDateStore: [['10'], ['15'], ['20'], ['30'], ['50'], ['100']], - frame: false + frame: false, + listeners: { + render: function (thisGrid) { + if (sstsConfig.enableSecondRecyclingAfterInvoiceFunction) { + requestTbar.render(thisGrid.tbar); + } + } + } }, readerDetail, ForeignTousseApplicationTableManager.findForeignTousseApplicationTableList,