carSelect.jsp 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
  2. <%@include file="/context/mytags.jsp"%>
  3. <t:base type="jquery,easyui,tools,DatePicker"></t:base>
  4. <%--update-start--Author:wangkun Date:20160327 TASK #956 【UI标签】封装选择用户标签--%>
  5. <script type="text/javascript">
  6. //编写自定义JS代码获得输入框中的值等父级页面调用取值
  7. function getReason(){
  8. var strId="";
  9. var strName="";
  10. var selectRows = $("#carList").datagrid('getSelections');
  11. for(var i=0;i<selectRows.length;i++){
  12. for(var key in selectRows[i]){
  13. //console.log(key+"======="+selectRows[i][key]);
  14. if(key=="id"){
  15. if(strId.length>0){
  16. strId+=","+selectRows[i][key];
  17. }else{
  18. strId=selectRows[i][key];
  19. }
  20. }
  21. if(key=="realName"){
  22. if(strName.length>0){
  23. strName+=","+selectRows[i][key];
  24. }else{
  25. strName=selectRows[i][key];
  26. }
  27. }
  28. }
  29. }
  30. //var strData='[{"strShiftid":"'+strShiftid+'","strShiftName":"'+strShiftName+'","strShiftType":"'+strShiftType+'"}]';
  31. var strData='[{"strId":"'+strId+'","strName":"'+strName+'"}]';
  32. return strData;
  33. }
  34. function getSelectedRow(){
  35. var selectRows = $("#carList").datagrid('getSelections');
  36. return selectRows;
  37. }
  38. </script>
  39. <t:datagrid checkbox="${checkbox}" name="carList" title="common.user.select" actionUrl="carController.do?datagrid1"
  40. fit="true" fitColumns="true" idField="id" queryMode="group" sortName="id" sortOrder="desc">
  41. <t:dgCol title="主键" field="id" hidden="true" queryMode="single" width="120"></t:dgCol>
  42. <t:dgCol title="车牌号" field="plate" query="true" queryMode="single" width="120"></t:dgCol>
  43. <t:dgCol title="车辆类型" field="type" dictionary="cartype" query="true" queryMode="single" width="120"></t:dgCol>
  44. <t:dgCol title="车架号" field="framenumber" query="true" queryMode="single" width="200"></t:dgCol>
  45. <t:dgCol title="车辆品牌" field="brand" dictionary="brand" width="120"></t:dgCol>
  46. <t:dgCol title="智能设备厂家" field="gpsType" dictionary="gpsType" queryMode="single" width="120"></t:dgCol>
  47. <t:dgCol title="智能设备序列号1" field="deviceNo1" query="true" queryMode="single" width="120"></t:dgCol>
  48. <t:dgCol title="智能设备序列号2" field="deviceNo2" queryMode="single" width="120"></t:dgCol>
  49. <t:dgCol title="智能设备序列号3" field="deviceNo3" queryMode="single" width="120"></t:dgCol>
  50. <t:dgCol title="所属车队" field="fleetid" query="true" queryMode="single" dictionary="t_b_car_fleet,id,name,and id in ${fleetIds}" width="200"></t:dgCol>
  51. <t:dgToolBar title="新建" icon="icon-add" operationCode="add" url="carController.do?goNadd" funname="add" width="700" height="500"></t:dgToolBar>
  52. <t:dgToolBar title="修改" icon="icon-edit" operationCode="edit" url="carController.do?goNupdate" funname="update" width="700" height="500"></t:dgToolBar>
  53. <t:dgToolBar title="删除" icon="icon-remove" operationCode="remove" url="carController.do?doBatchDel" funname="deleteALLSelect"></t:dgToolBar>
  54. <t:dgToolBar title="导入" icon="icon-putout" operationCode="put" url="carController.do?nupload" funname="add"></t:dgToolBar>
  55. </t:datagrid>
  56. <script type="text/javascript">
  57. </script>