tBusUserTechangList.jsp 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. <%@ page language="java" contentType="text/html; charset=UTF-8"
  2. pageEncoding="UTF-8"%>
  3. <%@include file="/context/mytags.jsp"%>
  4. <t:base type="jquery,easyui,tools,DatePicker"></t:base>
  5. <link rel="stylesheet" type="text/css" href="css/commoncss.css" />
  6. <style>
  7. .seachdiv {
  8. padding: 15px 30px;
  9. background-color: #ffffff;
  10. box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.05);
  11. border: solid 1px #dcdcdc;
  12. margin: 10px 10px 0px 10px;
  13. margin-bottom: 1px;
  14. }
  15. </style>
  16. <div class="easyui-layout" fit="true">
  17. <div region="center" style="padding: 0px; border: 0px">
  18. <t:datagrid name="tBusUserTechangList" fitColumns="true" title="专业特长"
  19. actionUrl="tBusUserTechangController.do?datagrid" idField="id"
  20. fit="true" queryMode="group">
  21. <t:dgCol title="主键" field="id" hidden="true" queryMode="single"
  22. width="120"></t:dgCol>
  23. <t:dgCol title="创建人名称" field="createName" hidden="true"
  24. queryMode="single" width="120"></t:dgCol>
  25. <t:dgCol title="创建人登录名称" field="createBy" hidden="true"
  26. queryMode="single" width="120"></t:dgCol>
  27. <t:dgCol title="创建日期" field="createDate" formatter="yyyy-MM-dd"
  28. hidden="true" queryMode="single" width="120"></t:dgCol>
  29. <t:dgCol title="更新人名称" field="updateName" hidden="true"
  30. queryMode="single" width="120"></t:dgCol>
  31. <t:dgCol title="更新人登录名称" field="updateBy" hidden="true"
  32. queryMode="single" width="120"></t:dgCol>
  33. <t:dgCol title="更新日期" field="updateDate" formatter="yyyy-MM-dd"
  34. hidden="true" queryMode="single" width="120"></t:dgCol>
  35. <t:dgCol title="所属部门" field="sysOrgCode" hidden="true"
  36. queryMode="single" width="120"></t:dgCol>
  37. <t:dgCol title="所属公司" field="sysCompanyCode" hidden="true"
  38. queryMode="single" width="120"></t:dgCol>
  39. <t:dgCol title="流程状态" field="bpmStatus" queryMode="single" hidden="true"
  40. dictionary="bpm_status" width="120"></t:dgCol>
  41. <t:dgCol title="专业特长" field="techangType" queryMode="single"
  42. dictionary="techangType" width="120"></t:dgCol>
  43. <t:dgCol title="用户" field="userId" hidden="true" queryMode="single"
  44. width="120"></t:dgCol>
  45. <t:dgCol title="说明" field="description" queryMode="single"
  46. width="520"></t:dgCol>
  47. <t:dgCol title="操作" field="opt"></t:dgCol>
  48. <t:dgDelOpt title="删除" url="tBusUserTechangController.do?doDel&id={id}" urlclass="ace_button" urlfont="fa-trash-o"/>
  49. <t:dgToolBar title="录入" icon="icon-add" operationCode="add" url="tBusUserTechangController.do?goAdd&userId=${userId}" funname="add"></t:dgToolBar>
  50. <t:dgToolBar title="修改" icon="icon-edit" operationCode="edit" url="tBusUserTechangController.do?goUpdate" funname="update"></t:dgToolBar>
  51. <%-- <t:dgToolBar title="删除" icon="icon-remove" operationCode="remove" --%>
  52. <%-- url="tBusUserTechangController.do?doDel" funname="doDel"></t:dgToolBar> --%>
  53. <%-- <t:dgToolBar title="查看" icon="icon-search" url="tBusUserTechangController.do?goUpdate" funname="detail"></t:dgToolBar> --%>
  54. <%-- <t:dgToolBar title="导入" icon="icon-putout" operationCode="put" funname="ImportXls"></t:dgToolBar> --%>
  55. <%-- <t:dgToolBar title="导出" icon="icon-put" operationCode="put" funname="ExportXls"></t:dgToolBar> --%>
  56. <%-- <t:dgToolBar title="模板下载" icon="icon-putout" operationCode="putout" funname="ExportXlsByT"></t:dgToolBar> --%>
  57. </t:datagrid>
  58. <input name="userid" id="userid" type="hidden" value="${userId}" />
  59. </div>
  60. </div>
  61. <script src="webpage/cn/com/lzt/techang/tBusUserTechangList.js"></script>
  62. <script type="text/javascript">
  63. // $(function() {
  64. // $("#tBusUserTechangList").datagrid({
  65. // onClickRow : function(rowIndex, rowData) {
  66. // fillData(rowData);
  67. // }
  68. // });
  69. // var datagrid = $("#tBusUserTechangList");
  70. // datagrid.prepend($("#pinjie1 div[name='pinjie2']").html());
  71. // $("#pinjie1").html('');
  72. // })
  73. function doDel() {
  74. var ids = [];
  75. var rows = $("#tBusUserTechangList").datagrid('getSelections');
  76. if (rows.length > 0) {
  77. $.messager.confirm("确认", "确定要删除这条数据?", function(r) {
  78. if (r) {
  79. for (var i = 0; i < rows.length; i++) {
  80. ids.push(rows[i].id);
  81. }
  82. $.ajax({
  83. url : "tBusUserTechangController.do?doDel",
  84. type : 'post',
  85. data : {
  86. ids : ids.join(',')
  87. },
  88. cache : false,
  89. success : function(data) {
  90. var d = data; // ------ $.parseJSON(data);
  91. if (d.success) {
  92. var msg = d.msg;
  93. tip(msg);
  94. $("#tBusUserTechangList").datagrid('reload');
  95. clearData();
  96. ids = '';
  97. } else {
  98. layer.alert(d.msg);
  99. }
  100. }
  101. });
  102. }
  103. });
  104. } else {
  105. layer.alert("请选择需要删除的数据");
  106. }
  107. }
  108. function fillData(rowData) {
  109. //清空表单
  110. $("#formobj").form('clear');
  111. $("#userid").val($("#useridTemp").val());
  112. //填充数据
  113. for ( var d in rowData) {
  114. $("#" + d).val(rowData[d]);
  115. }
  116. }
  117. //保存数据
  118. function saveData() {
  119. console.log($("#tBusUserTechangList").datagrid());
  120. $("#btnsub").click();
  121. }
  122. function callback(data) {
  123. if (data.success) {
  124. clearData();
  125. $("#tBusUserTechangList").datagrid('reload');
  126. top.tip(data.msg);
  127. } else {
  128. layer.alert(data.msg);
  129. }
  130. }
  131. function cancelEdit() {
  132. var rowData = $("#tBusUserTechangList").datagrid("getSelected");
  133. if (rowData != null) {
  134. fillData(rowData);
  135. } else {
  136. clearData();
  137. }
  138. }
  139. function clearData() {
  140. var rowData = {};
  141. fillData(rowData);
  142. $("#tBusUserTechangList").datagrid('clearChecked');
  143. $("#tBusUserTechangList").datagrid('unselectAll');
  144. }
  145. //导入
  146. function ImportXls() {
  147. openuploadwin('Excel导入', 'tBusUserTechangController.do?upload',
  148. "tBusUserTechangList");
  149. }
  150. //导出
  151. function ExportXls() {
  152. JeecgExcelExport("tBusUserTechangController.do?exportXls",
  153. "tBusUserTechangList");
  154. }
  155. //模板下载
  156. function ExportXlsByT() {
  157. JeecgExcelExport("tBusUserTechangController.do?exportXlsByT",
  158. "tBusUserTechangList");
  159. }
  160. // //新增
  161. // function add(title, url, id) {
  162. // window.location.href = url
  163. // }
  164. // //修改
  165. // function update(title, url, id) {
  166. // updateNotCreateWin("修改", url, "tBusUserTechangList", false);
  167. // }
  168. // //查看
  169. // function view(title, url, id) {
  170. // viewNotCreateWin("查看", url, "tBusUserTechangList", false)
  171. // }
  172. </script>