db59ff4cea58de58046c29d6b94c0ed78254c527.svn-base 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. var grid = null;
  2. //var params = { "listId" :'414',"condition" : " IS_DEL=0 AND WAREHOUSESPACE = '3' "} ;
  3. var params = {} ;
  4. function initComplete(){
  5. if((window.location.href).indexOf('?')>-1){
  6. var str = (window.location.href).split('?')[1];
  7. var fd_id = str.split("&")[0] ;
  8. var title = str.split("&")[1] ;
  9. $("#titleShow").html(title + "库存信息") ;
  10. params = {
  11. "listId" : '414',
  12. "condition" : "IS_DEL=0 AND WAREHOUSESPACE = '" + fd_id + "'"
  13. };
  14. }
  15. grid = $("#stockInfo").quiGrid({
  16. columns:[
  17. {name: 'FD_OBJECTID414', hide : true,width:"0%"},
  18. {display:"名称", name:"NAME_414", align:"center", width:"10%",
  19. render : function(rowdata, rowindex, value, column){
  20. return "<span style='color:#FFFFFF;'>" + value + "</span>" ;
  21. }
  22. },
  23. {display:"物料用途", name:"MATERIALUSES_414", align:"center", width:"20%",
  24. render : function(rowdata, rowindex, value, column){
  25. return "<span style='color:#FFFFFF;'>" + value + "</span>" ;
  26. }
  27. },
  28. {display:"规格型号", name:"MODEL_414", align:"center", width:"10%",
  29. render : function(rowdata, rowindex, value, column){
  30. return "<span style='color:#FFFFFF;'>" + value + "</span>" ;
  31. }
  32. },
  33. {display:"计量单位", name:"MEASUREMENTUNIT_414", align:"center", width:"5%",
  34. render : function(rowdata, rowindex, value, column){
  35. return "<span style='color:#FFFFFF;'>" + value + "</span>" ;
  36. }
  37. },
  38. {display:"数量", name:"AMOUT_414", align:"center", width:"10%",
  39. render : function(rowdata, rowindex, value, column){
  40. return "<span style='color:#FFFFFF;'>" + value + "</span>" ;
  41. }
  42. },
  43. {display:"管理单位", name:"ADMINISTRATIVEDEPT_414", align:"center", width:"20%",
  44. render : function(rowdata, rowindex, value, column){
  45. return "<span style='color:#FFFFFF;'>" + value + "</span>" ;
  46. }
  47. },
  48. {display:"供应商", name:"SUPPLIERS_414", align:"center", width:"15%",
  49. render : function(rowdata, rowindex, value, column){
  50. return "<span style='color:#FFFFFF;'>" + value + "</span>" ;
  51. }
  52. },
  53. /*{display:"仓库仓位信息", name:"WAREHOUSESPACE_414_SHOW", align:"center", width:"10%",
  54. render : function(rowdata, rowindex, value, column){
  55. return "<span style='color:#FFFFFF;'>" + value + "</span>" ;
  56. }*/
  57. {display:"仓库仓位信息", name:"WAREHOUSESPACE_414_SHOW", align:"center", width:"10%",
  58. render : function(rowdata, rowindex, value, column){
  59. return "<span style='color:#FFFFFF;'>" + "</span>" ;
  60. }
  61. }] ,
  62. url: $.pathname() + '/ws/crud/CRUDService/queryQui',
  63. "params":params,
  64. pageSize: 15,
  65. width:"100%",
  66. height:"100%",
  67. showTitle:true,
  68. showPageInfo:false,
  69. fixedCellHeight:true,
  70. alternatingRow: false,
  71. rowHeight:35,
  72. pageSizeOptions:[5,10,15,20,25,30,35,40,45,50],
  73. rowAttrRender: function(rowdata, rowindex, rowid){
  74. return rowdata["__index"] % 2 == 0 ? "style='background-color:#212749;'" : "style='background-color:#2C3A54;'" ;
  75. }
  76. });
  77. };