| 1234567891011121314151617181920212223242526272829303132333435363738 | 
							- /**
 
-  * Created by Zhong on 2017/12/22.
 
-  */
 
- let compleRationMain = {
 
-     getRationLibs: function () {
 
-         let scFunc = function (rstData) {
 
-             $("#comple_ration_table").empty();
 
-             for(let i = 0; i < rstData.length; i++){
 
-                 storageUtil.setSessionCache("RationGrp","repositoryID_" + rstData[i].ID, rstData[i].dispName);
 
-                 if(rstData[i].gljLib !== undefined && rstData[i].gljLib && rstData[i].gljLib != -1){
 
-                     storageUtil.setSessionCache("gljLib","repositoryID_" + rstData[i].ID, rstData[i].gljLib);
 
-                     let id = rstData[i].ID;
 
-                     let libName = rstData[i].dispName;
 
-                     $("#comple_ration_table").append(
 
-                         "<tr id='tempId'>" +
 
-                         "<td><a href='/stdGljRepository/glj'>"+libName+"</a></td></tr>"
 
-                     );
 
-                     var newHref = "/complementaryRation/ration?repository="+id;
 
-                     $("#tempId td:first a").attr("href", newHref);
 
-                     $("#tempId").attr("id", id);
 
-                 }
 
-             }
 
-         };
 
-         let ration_lib = projectInfoObj.projectInfo.engineeringInfo.ration_lib;
 
-         let ids = [];
 
-         for(lib of ration_lib){
 
-             ids.push(parseInt(lib.id));
 
-         }
 
-         CommonAjax.post('/complementaryRation/api/getRationLibs', {user_id: userID, ids: ids}, scFunc);
 
-     }
 
- };
 
- $(document).ready(function () {
 
-     $('#comple-ration').on('shown.bs.modal', function () {
 
-         compleRationMain.getRationLibs();
 
-     });
 
- });
 
 
  |