Index: ssts-web/src/main/webapp/disinfectsystem/packing/packingView.js
===================================================================
diff -u -r27624 -r27630
--- ssts-web/src/main/webapp/disinfectsystem/packing/packingView.js (.../packingView.js) (revision 27624)
+++ ssts-web/src/main/webapp/disinfectsystem/packing/packingView.js (.../packingView.js) (revision 27630)
@@ -1186,9 +1186,9 @@
var imageName = Ext4.getCmp('imageName').getText();
var materialId = Ext4.getCmp('materialId').getValue();
if(imageName != "" && materialId == ""){
- var td_id = Ext4.getCmp('td_id').getValue();
+ var td_id = Ext4.getCmp('td_id').getValue();
showToussePackingTeachingImage(imageName,td_id);
- }
+ }
}
},
{
@@ -2076,131 +2076,43 @@
function amendDisinfectionTousse(row){
var tousseName = row.tousseName;
var tousseDefinitionID = row.td_id;
- var tousseType = row.type.split('图片')[0];
- var materials = row.materialId;
var currentPage = row.currentPage;
+ var materialId = row.materialId;
var iframeHeight = $('body').height();
-
- if(tousseType == '消毒物品' || tousseType == '灭菌物品'){
- var width = 740;
- var height = 400;
-
- layerIndex=layer.open({
- type : 2,
- title : ['消毒物品明细',true],
- content : 'disinfectionTousseItems.jsp?resolution=1980&row=0&tousseDefinitionID='+tousseDefinitionID+'&materials='+encodeURIComponent(materials),
- area : [ width + 'px' , height + 'px'],
- border : [5, 0.3, '#fff', true],
- closeBtn : [2 , true],
- offset : ['100px','']
- });
- }else if(tousseType == '器械包'){
- $.magnificPopup.open({
- items: [{
- src:WWWROOT+'/disinfectsystem/touchScreen/recycle/tousseImage.jsp?resolution=1980&clientHeight='+iframeHeight+'&parentPageName=packingView&tousseDefinitionID='+tousseDefinitionID+'&tousseName='+encodeURIComponent(tousseName)+'&number='+currentPage,
- type :'iframe'
-
- },{
- //只是为了让箭头出现,如果可以有其他办法,这里可以去掉。因为在tousseImage.jsp内部,修改了下一页和上一页的处理
- src: '
永远看不到我
',
- type: 'inline'
- }],
- tClose: '关闭(Esc)',
- gallery: {
- enabled: true,
- tPrev: '上一页 (左箭头)', // Alt text on left arrow
- tNext: '下一页 (右箭头)'
- },
- image: {
- verticalFit: true
- },
- type: 'image' // this is default type
- });
- var windowScreenH = window.screen.height;
- if(windowScreenH == 1080){
- $(".mfp-iframe-scaler iframe").css({"top":"10px","height":"100%"});
- $(".mfp-iframe-holder .mfp-close").css({"top":"12px"});
- }else if(windowScreenH == 1050){
- $(".mfp-iframe-scaler iframe").css({"top":"10px","height":"100%"});
- $(".mfp-iframe-holder .mfp-close").css({"top":"0px"});
- }else{
- $(".mfp-iframe-scaler iframe").css({"top":"10px","height":"100%"});
- }
- }else if(tousseType == '自定义器械包'){
- var width = 740;
- var height = 400;
- var designedTousseWidth = 980;
- var designedTousseHeight = 700;
- var designedWidth = 1920;
- var designedHeight = 1080;
- var actualWidth = window.screen.availWidth;
- var actualHeight = window.screen.availHeight;
- var offsetTop = 100;
- var heightExtra = 10;
- var zoomRatio = calculateZoomRatio(designedWidth,designedHeight,actualWidth,actualHeight);
- var size = calculateSizeAfterZoom(designedTousseWidth,designedTousseHeight,zoomRatio);
-
- var isLessIE11 = navigator.userAgent.indexOf('compatible') > -1 && navigator.userAgent.indexOf('MSIE') > -1;
-
- if(!isLessIE11){
- document.body.style.zoom = 1;
- documentGetElementsByClassName('mbody')[0].style.zoom = zoomRatio;
- }
-
- width = size.width;
- height = size.height;
-
- offsetTop = offsetTop*zoomRatio;
- layerIndex=layer.open({
- type : 2,
- title : [tousseName + ' 材料信息',true],
- content : 'setMaterialRecycleAmount.jsp?resolution=1980&width='+width+'&height='+height+'&row='+row+'&tousseDefinitionID=' + tousseDefinitionID,
- area : [ width + 'px' , height +heightExtra + 'px'],
- border : [5, 0.3, '#fff', true],
- closeBtn : [2 , true],
- offset : [offsetTop+'px','']
- });
- }else if(tousseType == '外来器械包'){
- var width = 740;
- var height = 400;
- var designedTousseWidth = 980;
- var designedTousseHeight = 700;
- var designedWidth = 1920;
- var designedHeight = 1080;
- var actualWidth = window.screen.availWidth;
- var actualHeight = window.screen.availHeight;
- var offsetTop = 100;
- var heightExtra = 10;
- var zoomRatio = calculateZoomRatio(designedWidth,designedHeight,actualWidth,actualHeight);
- var size = calculateSizeAfterZoom(designedTousseWidth,designedTousseHeight,zoomRatio);
-
- var isLessIE11 = navigator.userAgent.indexOf('compatible') > -1 && navigator.userAgent.indexOf('MSIE') > -1;
-
- if(!isLessIE11){
- document.body.style.zoom = 1;
- documentGetElementsByClassName('mbody')[0].style.zoom = zoomRatio;
- }
-
- width = size.width;
- height = size.height;
-
- offsetTop = offsetTop*zoomRatio;
-
- layerIndex=layer.open({
- type : 2,
- title : [tousseName + ' 信息',true],
- content : 'setForeignTousseDefinition.jsp?resolution=1980&width='+width+'&height='+height+'&row='+row+'&tousseDefinitionID=' + tousseDefinitionID + '&applicationId=' + params_appId + '&recyclingrecordId=' + params_id,
- area : [ width + 'px' , height +heightExtra + 'px'],
- border : [5, 0.3, '#fff', true],
- closeBtn : [2 , true],
- offset : [offsetTop+'px','']
- });
+ $.magnificPopup.open({
+ items: [{
+ src:WWWROOT+'/disinfectsystem/touchScreen/recycle/tousseImage.jsp?resolution=1980&clientHeight='+iframeHeight+'&parentPageName=packingView&tousseDefinitionID='+tousseDefinitionID+'&materialId='+materialId+'&tousseName='+encodeURIComponent(tousseName)+'&number='+currentPage,
+ type :'iframe'
+ },{
+ //只是为了让箭头出现,如果可以有其他办法,这里可以去掉。因为在tousseImage.jsp内部,修改了下一页和上一页的处理
+ src: '永远看不到我
',
+ type: 'inline'
+ }],
+ tClose: '关闭(Esc)',
+ gallery: {
+ enabled: true,
+ tPrev: '上一页 (左箭头)', // Alt text on left arrow
+ tNext: '下一页 (右箭头)'
+ },
+ image: {
+ verticalFit: true
+ },
+ type: 'image' // this is default type
+ });
+ var windowScreenH = window.screen.height;
+ if(windowScreenH == 1080){
+ $(".mfp-iframe-scaler iframe").css({"top":"10px","height":"100%"});
+ $(".mfp-iframe-holder .mfp-close").css({"top":"12px"});
+ }else if(windowScreenH == 1050){
+ $(".mfp-iframe-scaler iframe").css({"top":"10px","height":"100%"});
+ $(".mfp-iframe-holder .mfp-close").css({"top":"0px"});
+ }else{
+ $(".mfp-iframe-scaler iframe").css({"top":"10px","height":"100%"});
}
}
function loadGoodsImage(tousseName,type,materialId,currentPage,vedioName,td_id){
var url = WWWROOT + "/disinfectSystem/baseData/showImageAction!getToussePic.do?imageType=" + type +'&materialId='+materialId+'&tousseId='+td_id+'&page='+currentPage + '&name='+encodeURIComponent(tousseName);
-
- Ext4.getCmp('imageName').setText(tousseName);
+ Ext4.getCmp('imageName').setText(tousseName);
Ext4.getCmp('imageType').setValue(type);
Ext4.getCmp('currentPage').setValue(currentPage);
Ext4.getCmp('materialId').setValue(materialId);
@@ -2435,14 +2347,14 @@
cellclick: function(grid, td, cellIndex, record, tr, rowIndex, e, eOpts ){
curSelMaterialName = record.get('name');
curSelMaterialId = record.get('materialDefinitionId');
- var detachable = record.get('detachable');
+ var detachable = record.get('detachable');
+ var tousseDefinitionId = record.raw.tousseDefinitionId;
showMaterialImgBtns();
-
if(cellIndex == 5 && detachable == '是'){
- loadGoodsImage(curSelMaterialName,IMAGE_TYPE_MATERIAL_DETACHABLE,curSelMaterialId,1,"","");
+ loadGoodsImage(curSelMaterialName,IMAGE_TYPE_MATERIAL_DETACHABLE,curSelMaterialId,1,"",tousseDefinitionId);
return;
}
- loadGoodsImage(curSelMaterialName,imageType_material,curSelMaterialId,1,"","");
+ loadGoodsImage(curSelMaterialName,imageType_material,curSelMaterialId,1,"",tousseDefinitionId);
},
afterrender: function (grid) {
grid.getView().getHeaderAtIndex(0).hide();