Index: ssts-web/src/main/webapp/disinfectsystem/basedatamanager/tousse/tousseForm.js =================================================================== diff -u -r40302 -r40758 --- ssts-web/src/main/webapp/disinfectsystem/basedatamanager/tousse/tousseForm.js (.../tousseForm.js) (revision 40302) +++ ssts-web/src/main/webapp/disinfectsystem/basedatamanager/tousse/tousseForm.js (.../tousseForm.js) (revision 40758) @@ -3759,6 +3759,31 @@ anchor: '100%' }] }, { + columnWidth: colWidth, + layout: 'form', + labelWidth: 120, + hidden: !sstsConfig.enableCleaningInstructionsAlertRequiredWhenRecycling, + labelAlign: "right", + items: [{ + xtype: 'combo', + fieldLabel: '回收弹出清洗指引', + id: 'recyclingAlertWashGuide', + name: 'recyclingAlertWashGuide', + valueField: 'value', + displayField: 'value', + store: new Ext.data.SimpleStore({ + fields: ['value'], + data: [['是'], ['否']] + }), + editable: false, + forceSelection: true, + allowBlank: false, + value: '否', + mode: 'local', + triggerAction: 'all', + anchor: '100%' + }] + }, { xtype:'hidden', id:'hiddenNoteValue' }] Index: ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/recycleForTouchScreen.js =================================================================== diff -u -r40598 -r40758 --- ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/recycleForTouchScreen.js (.../recycleForTouchScreen.js) (revision 40598) +++ ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/recycleForTouchScreen.js (.../recycleForTouchScreen.js) (revision 40758) @@ -45,70 +45,70 @@ var pendinSsecondaryRecyclingName = '待二次回收'; var expandFieldsConfigOfRecycling = sstsConfig.expandFieldsConfigOfRecycling || []; -if(expandFieldsConfigOfRecycling.length > 0){ - for(var i=0;i 0) { + for (var i = 0; i < expandFieldsConfigOfRecycling.length; i++) { + if (expandFieldsConfigOfRecycling[i].fieldName == 'totalRecycleAmount') { totalRecycleAmountHidden = false; } - if(expandFieldsConfigOfRecycling[i].fieldName == 'serialNumber'){ + if (expandFieldsConfigOfRecycling[i].fieldName == 'serialNumber') { serialNumberHidden = false; } - if(expandFieldsConfigOfRecycling[i].fieldName == 'tousseRemark'){ + if (expandFieldsConfigOfRecycling[i].fieldName == 'tousseRemark') { tousseRemarkHidden = false; tousseRemarkName = expandFieldsConfigOfRecycling[i].displayText; } - if(expandFieldsConfigOfRecycling[i].fieldName == 'lastRecyclingTime'){ + if (expandFieldsConfigOfRecycling[i].fieldName == 'lastRecyclingTime') { lastRecyclingTimeHidden = false; lastRecyclingTimeName = expandFieldsConfigOfRecycling[i].displayText; } - if(expandFieldsConfigOfRecycling[i].fieldName == 'packageTypeSplit'){ + if (expandFieldsConfigOfRecycling[i].fieldName == 'packageTypeSplit') { packageTypeSplitHidden = false; packageTypeSplitName = expandFieldsConfigOfRecycling[i].displayText; } - if(expandFieldsConfigOfRecycling[i].fieldName == 'pendinSsecondaryRecycling'){ + if (expandFieldsConfigOfRecycling[i].fieldName == 'pendinSsecondaryRecycling') { pendinSsecondaryRecyclingHidden = false; pendinSsecondaryRecyclingName = expandFieldsConfigOfRecycling[i].displayText; } } } //SZSDSRMYY-195:新增扩展字段配置 -function setListTab(tab){ +function setListTab(tab) { var row = $('#listRow').val(); - if(tab == 0){ + if (tab == 0) { document.getElementById('listTab0').classList.add('tabClass'); document.getElementById('listTab1').classList.remove('tabClass'); document.getElementById('listTable0').style.display = 'table'; document.getElementById('listTable1').style.display = 'none'; var html = ''; var recyclingDateDetails = $('#recyclingDateDetails' + row).val() || ''; - if(recyclingDateDetails !== ''){ + if (recyclingDateDetails !== '') { recyclingDateDetails = JSON.parse(recyclingDateDetails); var tousseName = $('#tousseName' + row).val(); - for(var i=0;i'; - html += ''+tousseName+''; - html += ''+recyclingDateDetails[i].amount+''; - html += ''+recyclingDateDetails[i].recyclingUser+''; - html += ''+recyclingDateDetails[i].operator+''; + html += '' + recyclingDateDetails[i].recyclingDate + ''; + html += '' + tousseName + ''; + html += '' + recyclingDateDetails[i].amount + ''; + html += '' + recyclingDateDetails[i].recyclingUser + ''; + html += '' + recyclingDateDetails[i].operator + ''; html += ''; } $("#recycleTimeListTbody").html(html) } - }else { + } else { document.getElementById('listTab0').classList.remove('tabClass'); document.getElementById('listTab1').classList.add('tabClass'); document.getElementById('listTable1').style.display = 'table'; document.getElementById('listTable0').style.display = 'none'; var html = ''; var tousseRemarkArr = $('#tousseRemarkArr' + row).val() || ''; - if(tousseRemarkArr !== ''){ + if (tousseRemarkArr !== '') { tousseRemarkArr = JSON.parse(tousseRemarkArr); - for(var i=0;i'; - html += ''+tousseRemarkArr[i].barcode+''; - html += ''+tousseRemarkArr[i].remark+''; + html += '' + tousseRemarkArr[i].idBarcode + ''; + html += '' + tousseRemarkArr[i].barcode + ''; + html += '' + tousseRemarkArr[i].remark + ''; html += ''; } $("#tousseRemarkTbody").html(html) @@ -120,7 +120,7 @@ function openLoadTemplateByUnit() { $("#departmentTemplate").change(function () { var requestParms = {}; - if($('#departmentTemplate').val() !== 0 && $('#departmentTemplate').val() !== '0'){ + if ($('#departmentTemplate').val() !== 0 && $('#departmentTemplate').val() !== '0') { requestParms.templateIds = $('#departmentTemplate').val(); } requestParms.orgUnitCoding = $("#departCode").val(); @@ -229,7 +229,7 @@ } //SSZXYY-19:加急按钮的背景色更改为跟随加急等级变化 -function getUrgentColorName(urgentColorVal){ +function getUrgentColorName(urgentColorVal) { if (urgentColorVal == "#ff0000") { return 'urgent_red_color'; } else if (urgentColorVal == "#ff3300") { @@ -421,7 +421,7 @@ // 打开不同申请科室或者不同资产归属的器械包 function openApplicationTousseSplitByOrgUnit(newTousseArray, tousseArray) { var depart = $('#depart').text(); - var table = '
该申请单中以下物品不属于当前回收科室"'+depart+'",请确认需要拆单回收的物品以及所属科室:
'; + var table = '
该申请单中以下物品不属于当前回收科室"' + depart + '",请确认需要拆单回收的物品以及所属科室:
'; var name = (sstsConfig.methodOfSplitRecyclingApplication == 2) ? '资产归属' : '所属科室'; table += ''; table += ''; @@ -454,33 +454,33 @@ var tousseName = $(this).parent().find('td').eq(0).text(); var amount = parseInt($(this).parent().find('td').eq(1).text()); if (isSplit == 'true') { - if(sumAmountMap[tousseName]){ + if (sumAmountMap[tousseName]) { sumAmountMap[tousseName] += amount; - }else { + } else { sumAmountMap[tousseName] = amount; } } }) for (var j = 0; j < tousseArray.length; j++) { var tousseName = tousseArray[j].tousseName; var amount = tousseArray[j].amount; - if(tousseArrayMap[tousseName]){ + if (tousseArrayMap[tousseName]) { tousseArrayMap[tousseName] += amount; - }else { + } else { tousseArrayMap[tousseName] = amount; } } var isAlert = false; var showTousseName = ''; - for(var item in sumAmountMap){ + for (var item in sumAmountMap) { var amount = sumAmountMap[item]; - if(tousseArrayMap[item] && tousseArrayMap[item] < amount){ + if (tousseArrayMap[item] && tousseArrayMap[item] < amount) { showTousseName = item; isAlert = true; continue } } - if(isAlert){ + if (isAlert) { layer.closeAll(); alertDiv(showTousseName + '拆分数量不能大于回收数量'); return @@ -572,9 +572,9 @@ } sigle = false; } - if(item.tousseRemark !== '' && $('#tousseDefinitionID' + i).val() == item.tousseDefinitionID){ - var tousseRemarkLabel = $('#tousseRemarkLabel'+i).text(); - $('#tousseRemarkLabel'+i).text(tousseRemarkLabel.replace(item.tousseRemark+';','')); + if (item.tousseRemark !== '' && $('#tousseDefinitionID' + i).val() == item.tousseDefinitionID) { + var tousseRemarkLabel = $('#tousseRemarkLabel' + i).text(); + $('#tousseRemarkLabel' + i).text(tousseRemarkLabel.replace(item.tousseRemark + ';', '')); } } for (var i = 0; i < deleteIndex.length; ++i) { @@ -655,6 +655,146 @@ function closeDiv() { ab.close(); } + +//DGSETYY-116:新增回收时强制提醒清洗指引功能 +function alertWashGuideImgOrVideo() { + lock = true; + var tousseDefinitionID = $('#pageTousseDefinitionID').val(); + var imgAndVideoType = $('#imgAndVideoType').val(); + var tousseName = $('#pageTousseName').val(); + document.getElementById("idBoxForImgTitle").innerHTML = '【' + tousseName + '】清洗操作指引'; + ab = new AlertBox("idBoxForImg"); + ab.onShow = function () { + if (lock) { + var videoIds = $('#videoIds').val(); + var videoIdArr = videoIds.split(';'); + if (imgAndVideoType == 'img') { + var url = WWWROOT + '/disinfectSystem/baseData/showImageAction!getToussePic.do?id=' + tousseDefinitionID + '&imageType=清洗操作指引图片&isOriginalPic=false&page=1'; + var html = '' + document.getElementById('idBoxForContent').innerHTML = html; + } else { + var url = WWWROOT + '/disinfectSystem/baseData/uploadImageAndVideoAction!getVideoPartById.do?videoId=' + videoIdArr[0] + '&original=true'; + var html = '' + document.getElementById('idBoxForContent').innerHTML = html; + } + } + }; + ab.onClose = function () { + var row = $('#pageRow').val(); + var recycleAmountNew = $('#pageRecycleAmountNew').val(); + putTousseInTheBasket(row, recycleAmountNew); + lock = false; + }; + + ab.center = true; + ab.show(); +} + +//DGSETYY-116:上一页 +function pageLast() { + var imgAndVideoType = $('#imgAndVideoType').val(); + if (imgAndVideoType == 'video') { + var videoIds = $('#videoIds').val(); + var videoIdArr = videoIds.split(';'); + var pageNum = parseInt($('#pageNum').val()); + if (pageNum > 1) { + var url = WWWROOT + '/disinfectSystem/baseData/uploadImageAndVideoAction!getVideoPartById.do?videoId=' + videoIdArr[pageNum - 2] + '&original=true'; + var html = '' + document.getElementById('idBoxForContent').innerHTML = html; + $('#pageNum').val(pageNum - 1); + } + } else { + var pageNum = parseInt($('#pageNum').val()); + var pageTousseDefinitionID = $('#pageTousseDefinitionID').val(); + if (pageNum > 1) { + var url = WWWROOT + '/disinfectSystem/baseData/showImageAction!getToussePic.do?id=' + pageTousseDefinitionID + '&imageType=清洗操作指引图片&isOriginalPic=false&page=' + (pageNum - 1); + var html = '' + document.getElementById('idBoxForContent').innerHTML = html; + $('#pageNum').val(pageNum - 1); + } + } +} + +//DGSETYY-116:下一页 +function pageNext() { + var imgAndVideoType = $('#imgAndVideoType').val(); + if (imgAndVideoType == 'video') { + var videoIds = $('#videoIds').val(); + var videoIdArr = videoIds.split(';'); + var pageNum = parseInt($('#pageNum').val()); + var pageAmount = parseInt($('#pageAmount').val()); + if (pageNum < pageAmount) { + var url = WWWROOT + '/disinfectSystem/baseData/uploadImageAndVideoAction!getVideoPartById.do?videoId=' + videoIdArr[pageNum] + '&original=true'; + var html = '' + document.getElementById('idBoxForContent').innerHTML = html; + $('#pageNum').val(pageNum + 1); + } + } else { + var pageNum = parseInt($('#pageNum').val()); + var pageAmount = parseInt($('#pageAmount').val()); + var pageTousseDefinitionID = $('#pageTousseDefinitionID').val(); + if (pageNum < pageAmount) { + var url = WWWROOT + '/disinfectSystem/baseData/showImageAction!getToussePic.do?id=' + pageTousseDefinitionID + '&imageType=清洗操作指引图片&isOriginalPic=false&page=' + (pageNum + 1); + var html = '' + document.getElementById('idBoxForContent').innerHTML = html; + $('#pageNum').val(pageNum + 1); + } + } +} + +//DGSETYY-116:视频指引 +function getTousseVideo() { + var tousseDefinitionID = $('#pageTousseDefinitionID').val(); + $.ajax({ + type: 'post', + url: WWWROOT + '/disinfectSystem/baseData/videoFileAction!loadTousseTeachingVideo.do', + data: { objectId: tousseDefinitionID, videoType: '清洗教学视频', time: new Date().getTime() }, + dataType: 'json', + cache: false, + async: false, + success: function (result) { + if (result.success) { + var videoCount = result.data.length; + var videoIds = ''; + for (var i = 0; i < videoCount; i++) { + if (videoIds == '') { + videoIds = result.data[i].id; + } else { + videoIds += ';' + result.data[i].id + } + } + $('#pageAmount').val(videoCount); + $('#pageNum').val(1); + $('#videoIds').val(videoIds); + $('#imgAndVideoType').val('video'); + alertWashGuideImgOrVideo(); + } + } + }); +} + +//DGSETYY-116:图片指引 +function getToussePic() { + var tousseDefinitionID = $('#pageTousseDefinitionID').val(); + $.ajax({ + type: 'post', + url: WWWROOT + '/disinfectSystem/baseData/showImageAction!getToussePictureAmount.do', + data: { id: tousseDefinitionID, imageType: '清洗操作指引图片', time: new Date().getTime() }, + dataType: 'json', + cache: false, + async: false, + success: function (result) { + if (result.success) { + var imgCount = result.count; + $('#pageAmount').val(imgCount); + $('#pageNum').val(1); + $('#imgAndVideoType').val('img'); + alertWashGuideImgOrVideo(); + } + } + }); +} + // 器械包类型 var applicationType = null; // 条形码对应的用户名 @@ -687,65 +827,65 @@ } // 增加物品(即点击左边的“+”图标) -function add(row,isPlayAudio) { +function add(row, isPlayAudio) { var recycleAmount = $('#recycleAmount' + row).val() == '' ? 0 : parseInt($('#recycleAmount' + row).val(), 10); //是否整包申请 var isApplyEntireTousse = $('#isApplyEntireTousse' + row).val(); var tousseType = $('#tousseType' + row).val(); if (recycleAmount >= 1) { if (tousseType == '外来器械包') { - alertDiv(tousseType+"回收数量不能大于1,请点击器械包名修改材料数量!"); + alertDiv(tousseType + "回收数量不能大于1,请点击器械包名修改材料数量!"); return; } if (tousseType == '外来器械拆分小包') { - alertDiv(tousseType+"回收数量不能大于1!"); + alertDiv(tousseType + "回收数量不能大于1!"); return; } if (tousseType == '消毒物品' && '是' != isApplyEntireTousse) { alertDiv("拆包申请的消毒物品回收包数不能大于1,请点击回收数量单元格修改材料数量!"); return; } } - if (recycleAmount+1 <= 9999){ - $('#recycleAmount'+row).val(recycleAmount+1); + if (recycleAmount + 1 <= 9999) { + $('#recycleAmount' + row).val(recycleAmount + 1); var currentlyToBeRecycled = parseInt($('#currentlyToBeRecycled').html()); - $('#currentlyToBeRecycled').html(currentlyToBeRecycled+1); - }else{ + $('#currentlyToBeRecycled').html(currentlyToBeRecycled + 1); + } else { alertDiv("最大回收数量为9999,不能大于该数量!"); return } setTousseItemLoadedAmountCss(row); updateBindGoods(row); var recycleAmountChange = recycleAmount + 1; - if(isPlayAudio){ + if (isPlayAudio) { playAudioAndTts(recycleAmountChange, 'recycleAudioAmount'); - }else { - mouseDown(row,0); + } else { + mouseDown(row, 0); } } -function setTimeOutForAmount(row,type){ - if(type == 0){ - add(row,false); - }else { - reduce(row,false); +function setTimeOutForAmount(row, type) { + if (type == 0) { + add(row, false); + } else { + reduce(row, false); } } var downTimeOut = null; var downTimes = 0; -function mouseDown(row,type){ - downTimeOut = setTimeout(function(){ +function mouseDown(row, type) { + downTimeOut = setTimeout(function () { downTimes++ - if(downTimes > 20){ - setTimeOutForAmount(row,type) - }else { - mouseDown(row,type); + if (downTimes > 20) { + setTimeOutForAmount(row, type) + } else { + mouseDown(row, type); } - },50) + }, 50) } -function mouseUp(){ +function mouseUp() { downTimes = 0; clearTimeout(downTimeOut); } @@ -794,7 +934,7 @@ } // 减少物品(即点击左边的“-”图标) -function reduce(row,isPlayAudio) { +function reduce(row, isPlayAudio) { var recycleAmount = $('#recycleAmount' + row).val() == '' ? 0 : parseInt($('#recycleAmount' + row).val(), 10) - 1; if (validateReduceAmount(recycleAmount, row).length > 0) { var arr = validateReduceAmount(recycleAmount, row); @@ -803,7 +943,7 @@ } var tousseType = $('#tousseType' + row).val(); if (tousseType == '外来器械拆分小包') { - alertDiv(tousseType+"不能修改回收数量!"); + alertDiv(tousseType + "不能修改回收数量!"); return; } if (recycleAmount >= 0) { @@ -812,17 +952,17 @@ } $('#recycleAmount' + row).val(recycleAmount); var currentlyToBeRecycled = parseInt($('#currentlyToBeRecycled').html()); - $('#currentlyToBeRecycled').html(currentlyToBeRecycled-1); + $('#currentlyToBeRecycled').html(currentlyToBeRecycled - 1); updateBindGoods(row); } setTousseItemLoadedAmountCss(row); if (recycleAmount <= 0) { recycleAmount = "0"; } - if(isPlayAudio){ + if (isPlayAudio) { playAudioAndTts(recycleAmount, 'recycleAudioAmount'); - }else { - mouseDown(row,1); + } else { + mouseDown(row, 1); } } @@ -853,8 +993,8 @@ } //SZSDSRMYY-195:显示备注信息 -function showIDCardRemarks(remark, tousseRemarkObj, row){ - if(tousseRemarkHidden){ +function showIDCardRemarks(remark, tousseRemarkObj, row) { + if (tousseRemarkHidden) { return; } $('#tousseRemarkTr' + row).show(); @@ -982,7 +1122,7 @@ var idCardInstanceBarcodes = $('#idCardInstanceBarcodes' + row).val() || ''; delInfo = [{ classifyBasketId: '', - tousseArr: [{"tdId":tousseDefinitionID,"idCardInstanceBarcode":idCardInstanceBarcodes}] + tousseArr: [{ "tdId": tousseDefinitionID, "idCardInstanceBarcode": idCardInstanceBarcodes }] }]; } else if (actionFunction == 'deleteBasketItem') { var hideElement = $(deleteButton).parent().prev().prev().prev().prev(); @@ -1000,7 +1140,7 @@ } else { delInfo = [{ classifyBasketId: classifyBasketId, - tousseArr: [{"tdId":tousseDefinitionID,"idCardInstanceBarcode":idCardBarcode}] + tousseArr: [{ "tdId": tousseDefinitionID, "idCardInstanceBarcode": idCardBarcode }] }]; } } else { @@ -1014,8 +1154,8 @@ ids.push(item.classifiedItemId) } tousseArr.push({ - tdId:tousseDefinitionID, - idCardInstanceBarcode:idCardBarcode + tdId: tousseDefinitionID, + idCardInstanceBarcode: idCardBarcode }) }); if (ids.length > 0) { @@ -1158,15 +1298,15 @@ //SSTS-646:如果主绑物品被删除了,那么也删除对应的次绑物品 if (unrecycleTousseItemArray.length > 0) { for (var k = 0; k < unrecycleTousseItemArray.length; k++) { - if(unrecycleTousseItemArray[k].mainBindGoodIdArr.length == 1){ - if(unrecycleTousseItemArray[k].mainBindGoodIdArr[0].goodId == tousseDefinitionID){ + if (unrecycleTousseItemArray[k].mainBindGoodIdArr.length == 1) { + if (unrecycleTousseItemArray[k].mainBindGoodIdArr[0].goodId == tousseDefinitionID) { unrecycleTousseItemArray.splice(k, 1); } - } else if(unrecycleTousseItemArray[k].mainBindGoodIdArr.length > 1){ - for(var j=0;j 1) { + for (var j = 0; j < unrecycleTousseItemArray[k].mainBindGoodIdArr.length; j++) { + if (unrecycleTousseItemArray[k].mainBindGoodIdArr[j].goodId == tousseDefinitionID) { unrecycleTousseItemArray[k].count -= unrecycleTousseItemArray[k].mainBindGoodIdArr[j].count || 0; - unrecycleTousseItemArray[k].mainBindGoodIdArr.splice(j,1); + unrecycleTousseItemArray[k].mainBindGoodIdArr.splice(j, 1); } } } @@ -1223,22 +1363,22 @@ $('#loadedAmount' + i).val(parseInt($('#loadedAmount' + i).val(), 10) - parseInt(amount, 10)); var tousseRemarkArr = $('#tousseRemarkArr' + i).val(); tousseRemarkArr = JSON.parse(tousseRemarkArr); - if(tousseRemarkArr.length > 0){ + if (tousseRemarkArr.length > 0) { var newArr = []; - tousseRemarkArr.forEach(function(item){ + tousseRemarkArr.forEach(function (item) { if (item.idBarcode !== idCardBarcode) { newArr.push(item); } }); var html = ''; - if(newArr.length == 0){ + if (newArr.length == 0) { $('#tousseRemarkTr' + i).hide(); - }else { - for(var k=0;k 0) { for (var k = 0; k < unrecycleTousseItemArray.length; k++) { - if(unrecycleTousseItemArray[k].mainBindGoodIdArr.length == 1){ - if(unrecycleTousseItemArray[k].mainBindGoodIdArr[0].goodId == item.tousseDefinitionID){ + if (unrecycleTousseItemArray[k].mainBindGoodIdArr.length == 1) { + if (unrecycleTousseItemArray[k].mainBindGoodIdArr[0].goodId == item.tousseDefinitionID) { unrecycleTousseItemArray.splice(k, 1); } - } else if(unrecycleTousseItemArray[k].mainBindGoodIdArr.length > 1){ - for(var j=0;j 1) { + for (var j = 0; j < unrecycleTousseItemArray[k].mainBindGoodIdArr.length; j++) { + if (unrecycleTousseItemArray[k].mainBindGoodIdArr[j].goodId == item.tousseDefinitionID) { unrecycleTousseItemArray[k].count -= unrecycleTousseItemArray[k].mainBindGoodIdArr[j].count || 0; - unrecycleTousseItemArray[k].mainBindGoodIdArr.splice(j,1); + unrecycleTousseItemArray[k].mainBindGoodIdArr.splice(j, 1); } } } @@ -1491,7 +1631,7 @@ itemType: type, tousseNameForMaterial: tousseNameForMaterial, idCardBarcode: idCardBarcode, - tousseRemark:oldBasket.tousseRemark || '', + tousseRemark: oldBasket.tousseRemark || '', basketGroupBarcodes: basketGroupBarcodes, lastTousseInstanceId: item.lastTousseInstanceId, tousseInstanceBarcode: item.tousseInstanceBarcode @@ -1552,7 +1692,7 @@ idCardBarcode: idCardBarcode, basketGroupBarcodes: basketGroupBarcodes, lastTousseInstanceId: item.lastTousseInstanceId, - tousseRemark:oldBasket.tousseRemark || '', + tousseRemark: oldBasket.tousseRemark || '', tousseInstanceBarcode: item.tousseInstanceBarcode } addOrDelTousse(tousse); @@ -1600,13 +1740,13 @@ loadBarcodeDevice(barcodeGloble, false); } } else { - if(sstsConfig.enbaleThirdPartyIdCard){ + if (sstsConfig.enbaleThirdPartyIdCard) { if (eventObj.key && eventObj.key.length == 1 && eventObj.keyCode !== 13) { barcodeGloble += eventObj.key; } else if (eventObj.keyCode == 13) { loadBarcodeDevice(barcodeGloble, true); } - }else { + } else { if (event.keyCode == 48 || event.keyCode == 96) { barcodeGloble += '0'; } else if (event.keyCode == 49 || event.keyCode == 97) { @@ -1844,7 +1984,7 @@ } //GDSFYBJY-6:新增待装载篮筐数据汇总 -function statisticBasketAndTousseAmount(){ +function statisticBasketAndTousseAmount() { var basketAmount = 0; var tousseAmount = 0; var tousseDefinitionIDArr = []; @@ -1858,11 +1998,11 @@ var hideValue = $(this).val(); if (!isUndefinedOrNullOrEmpty(hideValue)) { var hiddenjson = JSON.parse(hideValue); - if(hiddenjson.type == '器械包'){ + if (hiddenjson.type == '器械包') { tousseAmount += parseInt(hiddenjson.amount); - }else { + } else { var tousseDefinitionID = hiddenjson.tousseDefinitionID; - if(tousseDefinitionIDArr.indexOf(tousseDefinitionID) == -1){ + if (tousseDefinitionIDArr.indexOf(tousseDefinitionID) == -1) { tousseDefinitionIDArr.push(tousseDefinitionID); tousseAmount += 1; } @@ -2003,7 +2143,7 @@ // 提示标识牌的使用次数 function noticeIdCardUseAmount(msgObj) { if (sstsConfig && sstsConfig.idCardUseAmountNoticeType && msgObj.idCardInstance) { - var msg = msgObj.idCardInstance.tousseName + msgObj.idCardInstance.barcode +'已使用' + msgObj.idCardUseAmount + '次'; + var msg = msgObj.idCardInstance.tousseName + msgObj.idCardInstance.barcode + '已使用' + msgObj.idCardUseAmount + '次'; if (1 == sstsConfig.idCardUseAmountNoticeType) { showResultWithoutSpeak(msg); } else if (2 == sstsConfig.idCardUseAmountNoticeType) { @@ -2441,28 +2581,28 @@ //var barcode = barcodeTemp.substring(barcodeTemp.length-9,barcodeTemp.length); //由于条码可能超过9位,所以取全部 var barcode = barcodeTemp; - if(barcode == '999999999'){ + if (barcode == '999999999') { doSaveAction(); return - }else if(barcode == '888888888'){ - location.href = 'awaitForRecycleList.jsp?resolution=' + resolution + '&source=' + source; + } else if (barcode == '888888888') { + location.href = 'awaitForRecycleList.jsp?resolution=' + resolution + '&source=' + source; return } //ZSYY-419:外来器械入筐 var tousseIntoBasketInfo = getTousseIntoBasketInfo(); - if(tousseIntoBasketInfo.length > 0){ + if (tousseIntoBasketInfo.length > 0) { var msg = ''; - for(var i=0;i= 0){ - msg = '“'+ tousseName +'”整包已入筐,无法进行外来器械拆分小包二次回收。'; + if (splitToussesString !== '') { + if (splitToussesString.indexOf(barcodeTemp) >= 0) { + msg = '“' + tousseName + '”整包已入筐,无法进行外来器械拆分小包二次回收。'; break } } } - if(msg !== ''){ + if (msg !== '') { showResult(msg); return; } @@ -2474,9 +2614,9 @@ dataType: 'json', data: { barcode: barcode, - recyclingRecordId:$('#id').val(), - formType:$('#appType').val(), - invoicePlanId:params_appId + recyclingRecordId: $('#id').val(), + formType: $('#appType').val(), + invoicePlanId: params_appId }, success: function (msg) { var speakBasket = new SpeakBasket(); @@ -2692,7 +2832,7 @@ } }); } else { - alert('输入为【'+ barcodeTemp +'】,该条码长度不符合规范。'); + alert('输入为【' + barcodeTemp + '】,该条码长度不符合规范。'); } } @@ -2731,7 +2871,7 @@ var tousseType = $('#tousseType' + row).val(); var foreignComTousse = $('#foreignComTousse' + row).val(); //SZSZYY-34:外来器械通用包不能丢失报损 - if(sstsConfig.enableThirdPartySystemApplyUnnamedForeignTousse && foreignComTousse == '是'){ + if (sstsConfig.enableThirdPartySystemApplyUnnamedForeignTousse && foreignComTousse == '是') { showResult('外来器械通用包无法操作,请转换后再操作。'); return; } @@ -2828,7 +2968,7 @@ var tousseType = $('#tousseType' + row).val(); var foreignComTousse = $('#foreignComTousse' + row).val(); //SZSZYY-34:外来器械通用包不能丢失报损 - if(sstsConfig.enableThirdPartySystemApplyUnnamedForeignTousse && foreignComTousse == '是'){ + if (sstsConfig.enableThirdPartySystemApplyUnnamedForeignTousse && foreignComTousse == '是') { showResult('外来器械通用包无法操作,请转换后再操作。'); return; } @@ -2887,7 +3027,7 @@ } //SZSDSRMYY-128:显示对应物品的所有已回收物品的回收时间 -function openRecyclingTimeList(row){ +function openRecyclingTimeList(row) { $("#recycleTimeList").dialog({ resizable: false, height: 530, @@ -2898,9 +3038,9 @@ $('#listRow').val(row); $("#recycleTimeListBox").show() - if(!lastRecyclingTimeHidden){ + if (!lastRecyclingTimeHidden) { setListTab(0) - }else if(!tousseRemarkHidden){ + } else if (!tousseRemarkHidden) { setListTab(1) } }, @@ -2926,7 +3066,7 @@ var itemJson = []; for (var i = rowArr.length - 1; i >= 0; i--) { var isIDCard = false; - if($('#idCardInstanceBarcodes' + rowArr[i]).val() !== '' || $('#tousseOrIDCardInstanceBarcodes' + rowArr[i]).val() !== ''){ + if ($('#idCardInstanceBarcodes' + rowArr[i]).val() !== '' || $('#tousseOrIDCardInstanceBarcodes' + rowArr[i]).val() !== '') { isIDCard = true; } var tousseType = $('#tousseType' + rowArr[i]).val(); @@ -2935,23 +3075,23 @@ break } itemJson.push({ - tousseItemId:$('#tousseItemId' + rowArr[i]).val(), - recyclingItemId:$('#recyclingItemId' + rowArr[i]).val(), + tousseItemId: $('#tousseItemId' + rowArr[i]).val(), + recyclingItemId: $('#recyclingItemId' + rowArr[i]).val(), tousseName: $('#tousseName' + rowArr[i]).val(), applyAmount: $('#applicationAmount' + rowArr[i]).val(), recycleAmount: $('#recycleAmount' + rowArr[i]).val(), urgentAmount: $('#urgentAmount' + rowArr[i]).val(), hiddenUrgentAmount: $('#hiddenUrgentAmount' + rowArr[i]).val(), urgentName: $('#urgentLevel' + rowArr[i]).val(), - isIDCard:isIDCard, + isIDCard: isIDCard, row: rowArr[i] }) } - if(msg !== ''){ + if (msg !== '') { alertDiv(msg); return; } - sessionStorage.setItem('itemJson',JSON.stringify(itemJson)); + sessionStorage.setItem('itemJson', JSON.stringify(itemJson)); var width = 740; var height = 400; var designedTousseWidth = 980; @@ -3269,8 +3409,8 @@ $('#urgentLevel' + row).val(urgentLevel); if (urgentAmount > 0) { var urgentColorVal = getUrgentColorName(colorCode); - var urgentBg = './1980/urgentLevelButton/'+urgentColorVal+'.png'; - $('#urgentAmountDiv' + row).css("background-image", "url("+urgentBg+")"); + var urgentBg = './1980/urgentLevelButton/' + urgentColorVal + '.png'; + $('#urgentAmountDiv' + row).css("background-image", "url(" + urgentBg + ")"); if (sstsConfig.enableUrgentFunction) { $('#urgentAmountDiv' + row).html(urgentLevel); } else { @@ -3291,18 +3431,18 @@ dataType: 'json', success: function (msg) { alert(msg.message); - if(foreignTousseInfo !== ''){ + if (foreignTousseInfo !== '') { var obj = JSON.parse(foreignTousseInfo); var sumAmount = 0; - if(obj[0] && obj[0].materials){ - for(var i=0;i 0){ - for(var j=0;j 0) { + for (var j = 0; j < arr.length; j++) { var has = false; - for(var i=0;i 0){ + if (tousseIntoBasketInfo.length > 0) { var tousseOrIDCardInstanceBarcodes = $('#tousseOrIDCardInstanceBarcodes' + row).val(); var msg = ''; - for(var i=0;i= 0){ - msg = '“'+ tousseName +'”已经进行过外来器械拆分小包二次回收,无法再进行整包二次回收。'; + if (splitTousses.indexOf(tousseName) >= 0) { + msg = '“' + tousseName + '”已经进行过外来器械拆分小包二次回收,无法再进行整包二次回收。'; break } - if(splitToussesString !== '' && tousseOrIDCardInstanceBarcodes !== ''){ - if(splitToussesString.indexOf(tousseOrIDCardInstanceBarcodes) >= 0){ - msg = '“'+ tousseName +'”整包已入筐,无法进行外来器械拆分小包二次回收。'; + if (splitToussesString !== '' && tousseOrIDCardInstanceBarcodes !== '') { + if (splitToussesString.indexOf(tousseOrIDCardInstanceBarcodes) >= 0) { + msg = '“' + tousseName + '”整包已入筐,无法进行外来器械拆分小包二次回收。'; break } } } - if(msg !== ''){ + if (msg !== '') { showResult(msg); return; } } - if(splitTousses !== ''){ - if(!isSplitTousses){ + if (splitTousses !== '') { + if (!isSplitTousses) { $("#dialogConfirm").dialog({ resizable: false, height: 300, @@ -4298,6 +4438,68 @@ if (amount == 0) { alertDiv('没有可以放入篮筐的器械包。'); } else { + if (sstsConfig.enableCleaningInstructionsAlertRequiredWhenRecycling && !lock) { + var videoCount = 0; + var imgCount = 0; + var videoIds = ''; + $.ajax({ + type: 'post', + url: WWWROOT + '/disinfectSystem/baseData/videoFileAction!loadTousseTeachingVideo.do', + data: { objectId: tousseDefinitionID, videoType: '清洗教学视频', time: new Date().getTime() }, + dataType: 'json', + cache: false, + async: false, + success: function (result) { + if (result.success) { + videoCount = result.data.length; + for (var i = 0; i < videoCount; i++) { + if (videoIds == '') { + videoIds = result.data[i].id; + } else { + videoIds += ';' + result.data[i].id + } + } + } + } + }); + $.ajax({ + type: 'post', + url: WWWROOT + '/disinfectSystem/baseData/showImageAction!getToussePictureAmount.do', + data: { id: tousseDefinitionID, imageType: '清洗操作指引图片', time: new Date().getTime() }, + dataType: 'json', + cache: false, + async: false, + success: function (result) { + if (result.success) { + imgCount = result.count; + } + } + }); + $('#pageNum').val(1); + $('#pageRow').val(row); + $('#pageRecycleAmountNew').val(recycleAmountNew); + $('#pageTousseDefinitionID').val(tousseDefinitionID); + $('#pageTousseName').val(tousseName); + if (videoCount > 0 && imgCount > 0) { + $('#pageAmount').val(videoCount); + $('#videoIds').val(videoIds); + $('#imgAndVideoType').val('video'); + alertWashGuideImgOrVideo(); + $('#videoAndImgBtn').show(); + return + } else if (videoCount > 0 && imgCount == 0) { + $('#pageAmount').val(videoCount); + $('#videoIds').val(videoIds); + $('#imgAndVideoType').val('video'); + alertWashGuideImgOrVideo(); + return + } else if (videoCount == 0 && imgCount > 0) { + $('#pageAmount').val(imgCount); + $('#imgAndVideoType').val('img'); + alertWashGuideImgOrVideo(); + return + } + } var idsLen = 0; for (var item in sessionTousseInstance) { if (item == tousseDefinitionID) { @@ -4429,14 +4631,14 @@ //SSTS-646:绑定相同的次绑定物品,数量要累加 existItem.count += record.count; existItem.mainBindGoodIdArr.push({ - goodId:params.goodId, - count:record.count + goodId: params.goodId, + count: record.count }); } else { record.mainBindGoodId = params.goodId; record.mainBindGoodIdArr = [{ - goodId:params.goodId, - count:record.count + goodId: params.goodId, + count: record.count }]; unrecycleTousseItemArray.push(record); } @@ -4519,8 +4721,8 @@ } //ZSYY-385:更新序号 -function updateTousseIndex(){ - if(!serialNumberHidden || !totalRecycleAmountHidden){ +function updateTousseIndex() { + if (!serialNumberHidden || !totalRecycleAmountHidden) { var sumRecycleAmount = 0; var tousseIndexArr = []; $('#tousseItemTable').children().first().children().each(function (row, element) { @@ -4530,13 +4732,13 @@ } }) - if(!totalRecycleAmountHidden){ + if (!totalRecycleAmountHidden) { $('#currentlyToBeRecycled').html(sumRecycleAmount); } - if(!serialNumberHidden){ - for(var i=0;i+'; - var reduceButton = ''; + var addButton = ''; + var reduceButton = ''; var onclickFun = 'onclick="clickAmount(this,' + row + ');"'; var urgentAmountElement = ""; if (!isUndefinedOrNull(urgentAmount) && urgentAmount > 0) { @@ -4693,12 +4895,12 @@ } } var fontColor = '#FFFFFF'; - if(sstsConfig.tousseNameShowsTheUrgentColor){ + if (sstsConfig.tousseNameShowsTheUrgentColor) { fontColor = '#555'; } var arr = [row]; - var urgentBg = './1980/urgentLevelButton/'+urgentColorVal+'.png'; - urgentAmountElement += '
' + msg + '
'; + var urgentBg = './1980/urgentLevelButton/' + urgentColorVal + '.png'; + urgentAmountElement += '
' + msg + '
'; } else { //ZSWY-180 packed = false; @@ -4726,11 +4928,11 @@ urgentAmountElement += '
' + msg + '
'; } - if(lastRecyclingTimeHidden){ + if (lastRecyclingTimeHidden) { document.getElementById('listTab0').style.display = 'none'; } - if(tousseRemarkHidden){ + if (tousseRemarkHidden) { document.getElementById('listTab1').style.display = 'none'; } @@ -4749,13 +4951,13 @@ errorRemark = isUndefinedOrNullOrEmpty(errorRemark) ? '' : errorRemark; damageRemark = isUndefinedOrNullOrEmpty(damageRemark) ? '' : damageRemark; var tousseNamecolor = '#000'; - if(foreignComTousse == '是'){ + if (foreignComTousse == '是') { tousseNamecolor = '#ccc'; } var trStr = ''; trStr += ''; trStr += '
-
+
-
'; - if(!serialNumberHidden){ + if (!serialNumberHidden) { trStr += ''; } var splitToussesString = ''; @@ -4789,12 +4991,12 @@ '' + '
' - }else { - trStr += '' - } - trStr += '' + + if (sstsConfig.tousseNameShowsTheUrgentColor) { + trStr += '' + } else { + trStr += '' + } + trStr += '' + addButton + '' + reduceButton + @@ -4807,20 +5009,20 @@ trStr += ''; trStr += ''; trStr += ''; - if(splitTousses.length > 0){ + if (splitTousses.length > 0) { trStr += ''; @@ -4843,17 +5045,17 @@ deleteTousseItemArray.splice(i, 1); } } - if(lastRecyclingTimeHidden || lastRecyclingDate == ''){ - $('#recycleTimeTr'+row).hide(); + if (lastRecyclingTimeHidden || lastRecyclingDate == '') { + $('#recycleTimeTr' + row).hide(); } - if(tousseRemarkHidden || tousseRemark == ''){ - $('#tousseRemarkTr'+row).hide(); + if (tousseRemarkHidden || tousseRemark == '') { + $('#tousseRemarkTr' + row).hide(); } - if((!lastRecyclingTimeHidden && lastRecyclingDate !== '') && (!tousseRemarkHidden && tousseRemark !== '')){ - $('#recycleTime'+row + ' .btn').hide(); + if ((!lastRecyclingTimeHidden && lastRecyclingDate !== '') && (!tousseRemarkHidden && tousseRemark !== '')) { + $('#recycleTime' + row + ' .btn').hide(); } - if(!sstsConfig.enablePackageTypeSplitPartialSecondaryRecyclingAndReturn || !sstsConfig.allowForeignToussePartiallyPacking || !sstsConfig.enableForeignToussePartRecycle){ - $('#splitToussesTr'+row +' .btn').hide(); + if (!sstsConfig.enablePackageTypeSplitPartialSecondaryRecyclingAndReturn || !sstsConfig.allowForeignToussePartiallyPacking || !sstsConfig.enableForeignToussePartRecycle) { + $('#splitToussesTr' + row + ' .btn').hide(); } refreshErrorRemarkView(row); refreshDamageRemarkView(row); @@ -5011,44 +5213,44 @@ var timeoutAmount = null; -function clickAmount(obj, row){ +function clickAmount(obj, row) { clearTimeout(timeoutAmount); //执行延时 - timeoutAmount = setTimeout( function () { + timeoutAmount = setTimeout(function () { openUpdateAmount(obj, row) }, 200); } -function changeShowAmountType(obj, row){ +function changeShowAmountType(obj, row) { lock = true; - ab = new AlertBox("changeAmount"); - ab.onShow = function(){ + ab = new AlertBox("changeAmount"); + ab.onShow = function () { if (lock) { $$E.addEvent(document, "keydown", lockup); $$E.addEvent(this.box, "keydown", lockout); OverLay.show(); - $('#updateTousseAmount').on('click',function(){ + $('#updateTousseAmount').on('click', function () { closeLayer(); obj.blur(); openElement = obj; openUpdateAmountWin(row); closeDiv(); }) - $('#updateMaterialsAmount').on('click',function(){ + $('#updateMaterialsAmount').on('click', function () { closeLayer(); - amendDisinfectionTousse(row,'updateAmount'); + amendDisinfectionTousse(row, 'updateAmount'); closeDiv(); }) } - }; + }; ab.onClose = function () { $$E.removeEvent(document, "keydown", lockup); $$E.removeEvent(this.box, "keydown", lockout); OverLay.close(); }; - - ab.center = true; - ab.show(); + + ab.center = true; + ab.show(); } // 打开编辑数量的窗口 @@ -5062,21 +5264,21 @@ return; } if (tousseType == '消毒物品') { - if(isApplyEntireTousse == '是'){ - if(sstsConfig.respondModeWhenClickRecycleAmounCellOfDisinfectedItem == 1){ + if (isApplyEntireTousse == '是') { + if (sstsConfig.respondModeWhenClickRecycleAmounCellOfDisinfectedItem == 1) { obj.blur(); openElement = obj; openUpdateAmountWin(row); return; - }else if(sstsConfig.respondModeWhenClickRecycleAmounCellOfDisinfectedItem == 2){ + } else if (sstsConfig.respondModeWhenClickRecycleAmounCellOfDisinfectedItem == 2) { changeShowAmountType(obj, row) return - }else { - amendDisinfectionTousse(row,'updateAmount'); + } else { + amendDisinfectionTousse(row, 'updateAmount'); return; } - }else { - amendDisinfectionTousse(row,'updateAmount'); + } else { + amendDisinfectionTousse(row, 'updateAmount'); return; } } @@ -5087,7 +5289,7 @@ } // 打开修改数量的窗口 -function openUpdateAmountWin(row){ +function openUpdateAmountWin(row) { var width = 750; var height = 400; var boxHeight = window.screen.height; @@ -5423,16 +5625,16 @@ var idCardInstanceBarcode = splitTousseArray2[j].splitTousseBarcodes[0].idCardInstanceBarcode || ''; for (var i = 0; i < tousseArray.length; i++) { if (tousseArray[i].tousseName == tousseName) { - if(idCardInstanceBarcode !== ''){ - if(idCardInstanceBarcode == tousseArray[i].idCardBarcode){ + if (idCardInstanceBarcode !== '') { + if (idCardInstanceBarcode == tousseArray[i].idCardBarcode) { newTousseArray[k] = { tousseName: tousseName, amount: amount, depart: depart } k++ } - }else { + } else { newTousseArray[k] = { tousseName: tousseName, amount: amount, @@ -5534,8 +5736,8 @@ var tousseName = $('#tousseName' + index).val(); var materials = $('#materials' + index).val() !== '' ? JSON.parse($('#materials' + index).val()) : []; tousseMaterials.push({ - tousseName:tousseName, - materials:materials + tousseName: tousseName, + materials: materials }) } }); @@ -5566,25 +5768,25 @@ }, 800, 500); } else { //ZSYY-335:外来器械发货后可以二次回收 - if(sstsConfig.enableSecondRecyclingAfterInvoiceFunction && foreignTousseInvoicedAndNoUseInfo.length > 0){ + if (sstsConfig.enableSecondRecyclingAfterInvoiceFunction && foreignTousseInvoicedAndNoUseInfo.length > 0) { var html = ''; - for(var i=0;i= 0){ - html += name+"("+barcode+")为"+status+"状态," + if (lastTousseNames.indexOf(name) >= 0) { + html += name + "(" + barcode + ")为" + status + "状态," } } - if(html == ''){ - submitFormFunction(confirmation, saveAndNew, false, print, recyclingAmountConfirm,false, '否'); - }else { + if (html == '') { + submitFormFunction(confirmation, saveAndNew, false, print, recyclingAmountConfirm, false, '否'); + } else { dialogConfirm(html + "是否直接进行二次回收?", function () { - submitFormFunction(confirmation, saveAndNew, false, print, recyclingAmountConfirm,false, '否'); + submitFormFunction(confirmation, saveAndNew, false, print, recyclingAmountConfirm, false, '否'); }); } - }else { + } else { submitFormFunction(confirmation, saveAndNew, false, print, recyclingAmountConfirm); } } @@ -5618,8 +5820,8 @@ var tousseName = $('#tousseName' + index).val(); var materials = $('#materials' + index).val() !== '' ? JSON.parse($('#materials' + index).val()) : []; tousseMaterials.push({ - tousseName:tousseName, - materials:materials + tousseName: tousseName, + materials: materials }) } }); @@ -5709,7 +5911,7 @@ var loadedAmount = parseInt($('#loadedAmount' + index).val(), 10); var tousseType = $('#tousseType' + index).val(); var splitToussesString = $('#splitToussesString' + index).val(); - if(splitToussesString !== ''){ + if (splitToussesString !== '') { splitToussesStrings += splitToussesString } if (recyclingAmount > 0) { @@ -5729,7 +5931,7 @@ //部分入筐提示 if (isPartIntheBasket) { if (sstsConfig.enablePartRecycle == true) { - if(tousseTypeName !== "外来器械包"){ + if (tousseTypeName !== "外来器械包") { dialogConfirm("还有部分器械包未装入篮筐,是否继续保存?", function () { if (sstsConfig.showRecyclingDetail && recyclingTousses.length > 0) { showRecyclingDetail(recyclingTousses, function () { @@ -5739,16 +5941,16 @@ checkAutoReturnBorrowing(confirmation, saveAndNew, print, recyclingAmountConfirm); } }); - }else { - if(!packageTypeSplitHidden && splitToussesStrings !== ''){ + } else { + if (!packageTypeSplitHidden && splitToussesStrings !== '') { var tousseIntoBasketInfo = getTousseIntoBasketInfo(); - for(var i=0;i 0) { showRecyclingDetail(recyclingTousses, function () { @@ -5759,20 +5961,20 @@ } }); } - }else { + } else { alertDiv('还有部分器械包未装入容器,不能保存。'); } } } else if (tousseTypeisForeignTousseDefinition == true && (recyclingStatus == '部分接收' || recyclingStatus == '待接收' || recyclingStatus == '待回收' || recyclingStatus == '已接收')) { - if(!packageTypeSplitHidden && splitToussesStrings !== ''){ + if (!packageTypeSplitHidden && splitToussesStrings !== '') { var tousseIntoBasketInfo = getTousseIntoBasketInfo(); - for(var i=0;i 0) { showRecyclingDetail(recyclingTousses, function () { @@ -5783,7 +5985,7 @@ } }); } - }else { + } else { dialogConfirm("还有部分器械包未装入篮筐,是否继续保存?", function () { if (sstsConfig.showRecyclingDetail && recyclingTousses.length > 0) { showRecyclingDetail(recyclingTousses, function () { @@ -5795,15 +5997,15 @@ }); } } else { - if(!packageTypeSplitHidden && splitToussesStrings !== ''){ + if (!packageTypeSplitHidden && splitToussesStrings !== '') { var tousseIntoBasketInfo = getTousseIntoBasketInfo(); - for(var i=0;i 0) { showRecyclingDetail(recyclingTousses, function () { @@ -5814,7 +6016,7 @@ } }); } - }else { + } else { alertDiv('还有部分器械包未装入容器,不能保存。'); } } @@ -5857,7 +6059,7 @@ } else { jSONe.tally = false; } - + var id = document.getElementById('id').value; var app_id = document.getElementById('recyclingApplicationId').value; var departCode = document.getElementById('departCode').value; @@ -5903,7 +6105,7 @@ remark: $('#remarkText').text(), communicationUserName: $('#communicationUserName').val(), communicationUserCode: $('#communicationUserCode').val(), - continueRecycleItemsthatLessThanSendAmount:continueRecycleItemsthatLessThanSendAmount || '否', + continueRecycleItemsthatLessThanSendAmount: continueRecycleItemsthatLessThanSendAmount || '否', needPrint: print }, success: function (result) { @@ -6001,10 +6203,10 @@ } } else { //BJ309YY-21:回收数量允许设置为少于已发货数量 - if(sstsConfig.enableSetRecycleAmountLessThanSendAmount && result.recyAmountNoMatchException){ + if (sstsConfig.enableSetRecycleAmountLessThanSendAmount && result.recyAmountNoMatchException) { closeDiv(); var msg = ''; - if(result.message !== ''){ + if (result.message !== '') { msg = result.message.split(',')[0] + ',' + result.message.split(',')[1] + ',' + '可能导致数据出现误差,是否继续操作?'; } dialogConfirm(msg, function () { @@ -6184,7 +6386,7 @@ if (saveAndNew) { location.href = "recycleForTouchScreen.jsp?resolution=" + resolution + "&rememberRecycleUser=" + rememberRecycleUser; } else { - location.href = "awaitForRecycleList.jsp?resolution=" + resolution + '&source=' + source; + location.href = "awaitForRecycleList.jsp?resolution=" + resolution + '&source=' + source; } } else { alertDiv(result.message); @@ -6469,7 +6671,7 @@ var result = JSON.parse(resultStr); alertDiv(result.message); if (result.success) { - location.href = 'awaitForRecycleList.jsp?resolution=' + resolution + '&source=' + source; + location.href = 'awaitForRecycleList.jsp?resolution=' + resolution + '&source=' + source; } }, error: function (XMLHttpRequest, textStatus, errorThrown) { @@ -6501,7 +6703,7 @@ btn: ['确定', '取消'] }, function (index, layero) { // 确定按钮的回调 - location.href = 'awaitForRecycleList.jsp?resolution=' + resolution + '&source=' + source; + location.href = 'awaitForRecycleList.jsp?resolution=' + resolution + '&source=' + source; }, function (index) { //取消按钮 }); @@ -6523,9 +6725,9 @@ //ZSYY-419:外来器械入筐 var splitTousses = $('#splitTousses' + i).text(); var tousseName = $('#showTousseName' + i).text(); - if(splitTousses !== ''){ - if(splitTousses.indexOf(tousseName) >= 0){ - result = '“'+ tousseName +'”已经进行过外来器械拆分小包二次回收,无法再进行整包二次回收。'; + if (splitTousses !== '') { + if (splitTousses.indexOf(tousseName) >= 0) { + result = '“' + tousseName + '”已经进行过外来器械拆分小包二次回收,无法再进行整包二次回收。'; return result; } } @@ -6607,7 +6809,7 @@ if (!isUndefinedOrNullOrEmpty(params_id)) { isRecycling = false; } - if(data.indexOf('无法再进行整包二次回收') >= 0){ + if (data.indexOf('无法再进行整包二次回收') >= 0) { showResult(data); return } @@ -7418,12 +7620,12 @@ } } - } else if (((application.recyclingRecordId != null && application.recyclingStatus == "部分接收") || (application.recyclingRecordId2 !=null && application.recyclingStatus == "部分回收")) && application.type == TYPE_FOREIGNTOUSSEAPPLIACTION) { - if(application.recyclingStatus == "部分回收"){ - if(application.recyclingRecordId2){ + } else if (((application.recyclingRecordId != null && application.recyclingStatus == "部分接收") || (application.recyclingRecordId2 != null && application.recyclingStatus == "部分回收")) && application.type == TYPE_FOREIGNTOUSSEAPPLIACTION) { + if (application.recyclingStatus == "部分回收") { + if (application.recyclingRecordId2) { loadRecyclingRecordById(application.recyclingRecordId2); } - }else { + } else { loadRecyclingRecordById(application.recyclingRecordId); } findMaterialErrorDamageByTousseBarcode(application.tousseBarcodes); @@ -7448,15 +7650,15 @@ $('#tousseItemTable').children().first().children().each(function (row, element) { // 判断是否被删除,为0代表没有被删除 if ($('#deleted' + row).val() == '0') { - var tousseDefinitionID = $('#tousseDefinitionID'+row).val(); + var tousseDefinitionID = $('#tousseDefinitionID' + row).val(); ids += ',' + tousseDefinitionID; len++; } }); if (application.applicationItems != null) { var row = len; canTerminateTousseItemIds = []; - + for (var i = 0; i < application.applicationItems.length; ++i) { //申请项 var item = application.applicationItems[i]; @@ -7542,7 +7744,7 @@ if (application.applicationItems != null) { var row = 0; canTerminateTousseItemIds = []; - + for (var i = 0; i < application.applicationItems.length; ++i) { //申请项 var item = application.applicationItems[i]; @@ -8094,7 +8296,7 @@ recyclingAmount = 0; } var colorCode = ''; - if(applicationitems[i].urgentLevelObj){ + if (applicationitems[i].urgentLevelObj) { colorCode = applicationitems[i].urgentLevelObj.colorCode } var toussItem = { @@ -8117,7 +8319,7 @@ spelling: applicationitems[i].spelling, taskGroup: applicationitems[i].taskGroup, remarkOfApplyGoods: applicationitems[i].remarkOfApplyGoods, - colorCode:colorCode, + colorCode: colorCode, splitTousses: applicationitems[i].splitTousses, packed: applicationitems[i].packed }; @@ -8443,31 +8645,31 @@ }) } } - $('body').mouseup( function( e ) { + $('body').mouseup(function (e) { downTimes = 0; clearTimeout(downTimeOut); }); - $('#tousseItemBox').mousedown( function( e ) { + $('#tousseItemBox').mousedown(function (e) { e.preventDefault && e.preventDefault(); - if(e.target.className == 'add addButton'){ + if (e.target.className == 'add addButton') { var dataset = getDataset(e.target); - mouseDown(dataset.row,0) + mouseDown(dataset.row, 0) } }); - $('#tousseItemBox').mousedown( function( e ) { + $('#tousseItemBox').mousedown(function (e) { e.preventDefault && e.preventDefault(); - if(e.target.className == 'minus minusButton'){ + if (e.target.className == 'minus minusButton') { var dataset = getDataset(e.target); - mouseDown(dataset.row,1) + mouseDown(dataset.row, 1) } }); //DGZYY-215:加载预绑定篮筐 - if(sstsConfig.enablePreBoundBasketsOfForeignTousseApplicationFunction){ - setTimeout(function(){ - if(cleanBasketBarcodes !== ''){ + if (sstsConfig.enablePreBoundBasketsOfForeignTousseApplicationFunction) { + setTimeout(function () { + if (cleanBasketBarcodes !== '') { var basketsArray = cleanBasketBarcodes.split(';'); basketsArray.forEach(function (e) { loadBarcodeDevice(e, false); @@ -8476,33 +8678,33 @@ }, 1000); } - if(!totalRecycleAmountHidden){ + if (!totalRecycleAmountHidden) { $('.currentlyToBeRecycled').show(); } }) -function getDataset(ele){ - if(ele.dataset){ +function getDataset(ele) { + if (ele.dataset) { return ele.dataset; - }else{ + } else { var attrs = ele.attributes,//元素的属性集合 - dataset = {}, - name, - matchStr; + dataset = {}, + name, + matchStr; - for(var i = 0;i
' + urgentAmountElement + ''; - if(sstsConfig.tousseNameShowsTheUrgentColor){ - trStr += '
 '; trStr += '
'; - trStr += ''+ lastRecyclingTimeName +'' + lastRecyclingDate + '查看详细'; + trStr += '' + lastRecyclingTimeName + '' + lastRecyclingDate + '查看详细'; trStr += '
 '; trStr += '
'; - trStr += ''+ tousseRemarkName +'' + tousseRemark + '查看详细'; + trStr += '' + tousseRemarkName + '' + tousseRemark + '查看详细'; trStr += '
 '; trStr += '
'; trStr += '外来器械拆分小包:'; - for(var k=0;k' + tousseDefinitionName + '('+barcode+')' + '入筐; '; + trStr += '' + tousseDefinitionName + '(' + barcode + ')' + '入筐; '; splitToussesString += barcode + ','; } trStr += '