Index: ssts-web/src/main/webapp/disinfectsystem/packing/packingView.js =================================================================== diff -u -r15243 -r15249 --- ssts-web/src/main/webapp/disinfectsystem/packing/packingView.js (.../packingView.js) (revision 15243) +++ ssts-web/src/main/webapp/disinfectsystem/packing/packingView.js (.../packingView.js) (revision 15249) @@ -936,7 +936,8 @@ var materialId = Ext4.getCmp('materialId').getValue(); var vedioName = Ext4.getCmp('vedioName').getValue(); var td_id = Ext4.getCmp('td_id').getValue(); - if(currentPage == 1){ + if(currentPage <= 1){ + Ext4.getCmp('currentPage').setValue(1); showResult("已是第一页!"); }else{ loadGoodsImage(imageName,imageType,materialId,parseInt(currentPage)-1,vedioName,td_id); @@ -951,15 +952,16 @@ var td_id = Ext4.getCmp('td_id').getValue(); Ext4.Ajax.request({ - url : WWWROOT + '/disinfectSystem/packingAction!getUploadPicTotalPage.do', + url : WWWROOT + '/disinfectSystem/baseData/showImageAction!getToussePictureAmount.do', params : { - td_id : td_id, - imageType:imageType + id : td_id, + imageType:imageType }, success : function(result){ - var pageStr = result.responseText; - var totalPage = parseInt(pageStr); - if(currentPage == totalPage){ + var pageCount = Ext.decode(result.responseText); + var totalPage = parseInt(pageCount.count); + if(currentPage >= totalPage){ + Ext4.getCmp('currentPage').setValue(totalPage); showResult("已是最后一页!"); }else{ loadGoodsImage(imageName,imageType,materialId,parseInt(currentPage)+1,vedioName,td_id); @@ -1704,7 +1706,7 @@ }); function loadGoodsImage(tousseName,type,materialId,currentPage,vedioName,td_id){ - var url = WWWROOT + "/disinfectSystem/recyclingApplicationAction!getImage.do?imageType=" + type +'&materialId='+materialId+'&tousseId='+td_id+'&page='+currentPage + '&name='+encodeURIComponent(tousseName); + var url = WWWROOT + "/disinfectSystem/baseData/showImageAction!getToussePic.do?imageType=" + type +'&materialId='+materialId+'&tousseId='+td_id+'&page='+currentPage + '&name='+encodeURIComponent(tousseName); // var image = Ext4.getCmp('browseImage'); // image.setSrc(''); // image.setSrc(url);// 覆盖原来的图片