clothingSelectByUser.jsp 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
  2. <%@include file="/context/mytags.jsp"%>
  3. <!DOCTYPE html >
  4. <html>
  5. <head>
  6. <title>所有项目列表</title>
  7. <t:base type="jquery,easyui,tools"></t:base>
  8. </head>
  9. <body style="overflow-y: hidden" scroll="no">
  10. <!-- <input id="ids" type="hidden" value=${ids} > -->
  11. <input id="userid" type="hidden" value=${userid} >
  12. <t:datagrid name="selectList" checkbox="false" pagination="true" fitColumns="true" title="服装档案" actionUrl="clothingOnhandController.do?datagrid&userid=${userid}" idField="id" fit="true" queryMode="group">
  13. <t:dgCol title="主键" field="id" hidden="true" queryMode="single" width="120"></t:dgCol>
  14. <t:dgCol title="领料点名称" field="warehousename" query="true" queryMode="single" width="120"></t:dgCol>
  15. <t:dgCol title="领料点id" field="warehouseid" hidden="true" queryMode="single" width="120"></t:dgCol>
  16. <t:dgCol title="服装id" field="clothingid" hidden="true" queryMode="single" width="120"></t:dgCol>
  17. <t:dgCol title="服装名称" field="clothingname" query="true" queryMode="single" dictionary="t_b_clothing,id,name,clothingid,clothingname" popup="true" width="120"></t:dgCol>
  18. <t:dgCol title="款式" field="type" queryMode="single" dictionary="clothingtype" width="120"></t:dgCol>
  19. <t:dgCol title="单位" field="unit" queryMode="single" dictionary="metering_calcu_unit" width="120"></t:dgCol>
  20. <t:dgCol title="数量" field="quantity" queryMode="single" width="120"></t:dgCol>
  21. <t:dgCol title="使用状态" field="usingstatus" queryMode="single" dictionary="usingstatus" width="120"></t:dgCol>
  22. <t:dgCol title="启用日期" field="startdate" formatter="yyyy-MM-dd" width="120"></t:dgCol>
  23. <t:dgCol title="预计更换日期" field="exchangedate" formatter="yyyy-MM-dd" queryMode="single" width="120"></t:dgCol>
  24. </t:datagrid>
  25. </body>
  26. </html>
  27. <script type="text/javascript">
  28. //默认选中
  29. /* function initCheck(data){
  30. var ids = "${ids}";
  31. var idArr = ids.split(",");
  32. for(var i=0;i<idArr.length;i++){
  33. if(idArr[i]!=""){
  34. $("#selectList").datagrid("selectRecord",idArr[i]);
  35. }
  36. }
  37. } */
  38. //编写自定义JS代码获得输入框中的值等父级页面调用取值
  39. function getReason(){
  40. var strId="";
  41. var strName="";
  42. var strType="";
  43. var strUnit="";
  44. var strStartdate="";
  45. var strWid="";
  46. var strWname="";
  47. var selectRows = $("#selectList").datagrid('getSelections');
  48. for(var i=0;i<selectRows.length;i++){
  49. for(var key in selectRows[i]){
  50. //console.log(key+"======="+selectRows[i][key]);
  51. if(key=="clothingid"){
  52. if(strId.length>0){
  53. strId+=","+selectRows[i][key];
  54. }else{
  55. strId=selectRows[i][key];
  56. }
  57. }
  58. if(key=="clothingname"){
  59. if(strName.length>0){
  60. strName+=","+selectRows[i][key];
  61. }else{
  62. strName=selectRows[i][key];
  63. }
  64. }
  65. if(key=="type"){
  66. if(strType.length>0){
  67. strType+=","+selectRows[i][key];
  68. }else{
  69. strType=selectRows[i][key];
  70. }
  71. }
  72. if(key=="unit"){
  73. if(strUnit.length>0){
  74. strUnit+=","+selectRows[i][key];
  75. }else{
  76. strUnit=selectRows[i][key];
  77. }
  78. }
  79. if(key=="startdate"){
  80. if(strStartdate.length>0){
  81. strStartdate+=","+selectRows[i][key];
  82. }else{
  83. strStartdate=selectRows[i][key];
  84. }
  85. }
  86. if(key=="warehouseid"){
  87. if(strWid.length>0){
  88. strWid+=","+selectRows[i][key];
  89. }else{
  90. strWid=selectRows[i][key];
  91. }
  92. }
  93. if(key=="warehousename"){
  94. if(strWname.length>0){
  95. strWname+=","+selectRows[i][key];
  96. }else{
  97. strWname=selectRows[i][key];
  98. }
  99. }
  100. }
  101. }
  102. //var strData='[{"strShiftid":"'+strShiftid+'","strShiftName":"'+strShiftName+'","strShiftType":"'+strShiftType+'"}]';
  103. var strData='[{"strId":"'+strId+'","strName":"'+strName+'","strType":"'+strType+'","strUnit":"'+strUnit+'","strStartdate":"'+strStartdate+'","strWid":"'+strWid+'","strWname":"'+strWname+'"}]';
  104. return strData;
  105. }
  106. </script>