00d205c318991e796a738373954642968a7af10b.svn-base 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. var grid_list = null;
  2. var columns=[{ display:"管理单位名称", name: "ADMINISTRATIVE_DEPT_NAME", align: "center", width: "80px"},
  3. { display:"名称", name: "NAME", align: "center", width: "80px"},
  4. { display:"物料用途", name: "MATERIAL_USES", align:"center", width: "80px"},
  5. { display:"规格型号", name: "MODEL",align: "center", width: "80px"},
  6. { display:"计量单位", name: "MEASUREMENT_UNIT",align: "center", width: "70px"},
  7. { display:"数量", name: "AMOUNT",align: "center", width: "80px"},
  8. { display:"仓库仓位信息", name: "WAREHOUSE_SPACE",align: "center", width: "80px"},
  9. { display:"供应商", name: "SUPPLIERS",align: "center", width: "80px"}
  10. // { display:"管理单位", name: "ADMINISTRATIVE_DEPT",align: "center", width: "10%"},
  11. // { display:"所属仓库系统编码", name: "WAREHOUSE_CODE",align: "center", width: "10%"}
  12. ];
  13. $(function(){
  14. $("#close").on("click",function(){
  15. window.parent.window.removeIframeGrid("infoGrid");
  16. });
  17. options = { columns:columns, url:"/nwyj/ws/floods/FloodsGridService/getStockByHouseId",
  18. params:{fd_id:fd_id}, pageSize:7, usePager:false, height:"400px",
  19. method: "post", width:"99.8%", usePager : true, isScroll: true,
  20. percentWidthMode : true, alternatingRow : false };
  21. var url = $.pathname() + "/ws/cockpit/CockpitService/queryMareHouseById";
  22. var params = { fd_id : fd_id };
  23. $.request.query(url,params,function(data){
  24. for(var i in data){
  25. $('#'+i).html(data[i]);
  26. };
  27. });
  28. $(".zb").click(function(){
  29. if($(this).hasClass("oc_close")){
  30. $(this).removeClass("oc_close").addClass("oc_open");
  31. $(this).parent().next().removeClass("show_count");
  32. // alert($(this).parent().next().hasClass("show_count"))
  33. var other_leg = $(this).attr("toggleid");
  34. if($("#" + other_leg).hasClass("oc_open")){
  35. $("#" + other_leg).removeClass("oc_open").addClass("oc_close");
  36. $("#" + other_leg).parent().next().addClass("show_count");
  37. };
  38. }else{
  39. $(this).removeClass("oc_open").addClass("oc_close");
  40. $(this).parent().next().addClass("show_count");
  41. // alert($(this).parent().next().hasClass("show_count"))
  42. };
  43. });
  44. grid_list = $("#maingrid").quiGrid(options);
  45. });