leave-update.jsp 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604
  1. <%@ page language="java" import="java.util.*" 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,DatePicker"></t:base>
  8. <link rel="stylesheet" href="plug-in/uploadify/css/uploadify.css" type="text/css" />
  9. <script type="text/javascript" src="plug-in/uploadify/jquery.uploadify-3.1.js"></script>
  10. <script src="plug-in/layer/layer.js"></script>
  11. <script>
  12. var selfSubmit='${selfSubmit}';
  13. function btn_ok(){
  14. var bpmStatus=$('#bpmStatus').val();
  15. if(bpmStatus>1){
  16. layer.alert('申请处理中不可修改');
  17. return;
  18. }
  19. var userid = $("#userid").val();
  20. var id = $("#id").val();
  21. if(userid && id){
  22. $.ajax({
  23. url:"activitiLeaveController.do?isLeave",
  24. data:{id:id,userid:userid},
  25. dataType:"json",
  26. type:"POST",
  27. success:function(result){
  28. if(result.success){
  29. $("#btnsub").click();
  30. }else{
  31. layer.alert(result.msg);
  32. }
  33. }
  34. });
  35. }else{
  36. $("#btnsub").click();
  37. }
  38. }
  39. function callback(data){
  40. jeecgFormFileCallBack(data);
  41. if(data.success){
  42. layer.alert(data.msg,{ icon: 0 , closeBtn: 0 } , function(index){
  43. if(selfSubmit=='0'){//非主动提交
  44. window.location.href="activitiLeaveController.do?list"
  45. layer.close(index);
  46. }else{
  47. $('#id').val(data.obj.id);
  48. layer.close(index);
  49. }
  50. });
  51. }
  52. else{
  53. layer.alert(data.msg);
  54. }
  55. }
  56. </script>
  57. <script type="text/javascript">
  58. //编写自定义JS代码
  59. $(function(){
  60. $.Datatype.checkLeave = function (val, obj, frm) {
  61. var msg = true;
  62. var leaveType=$('select[name="leaveType"]').val();
  63. if(!leaveType) return msg;
  64. var userid = $('#userid').val();
  65. $.ajax({
  66. url: 'activitiLeaveController.do?checkLeave'
  67. , data: {userid: userid,leaveType:leaveType}
  68. , dataType: 'json'
  69. , method: "POST"
  70. , async: false
  71. , success: function (d) {
  72. if (!d.success) {
  73. msg = d.msg
  74. }
  75. }
  76. }
  77. )
  78. return msg;
  79. }
  80. })
  81. </script>
  82. <style type="text/css">
  83. .fixed-h{
  84. float:left;
  85. width:100%;
  86. min-height:630px;
  87. overflow:auto;
  88. background:#ffffff;
  89. }
  90. </style>
  91. </head>
  92. <body>
  93. <t:formvalid formid="formobj" dialog="false" tipSweep="true" usePlugin="password" layout="table" action="activitiLeaveController.do?doUpdate" tiptype="1" callback="callback">
  94. <input id="id" name="id" type="hidden" value="${leavePage.id }"/>
  95. <input type="hidden" name="selfSubmit" value="${selfSubmit}"/>
  96. <div class="fixed-h">
  97. <table style="width: 100%;" cellpadding="0" cellspacing="1" class="formtable">
  98. <c:if test="${selfSubmit=='0'}">
  99. <tr>
  100. <td align="right"><label class="Validform_label"><span color="red" class="requiredIcon">*</span>离职员工:</label></td>
  101. <td class="value">
  102. <input id="userid" name="userid" type="hidden" value="${user.id}" datatype="checkLeave"/>
  103. <input name="realName" class="inputxt" value="${user.realName}" id="realName" readonly="readonly" datatype="*" />
  104. <c:if test="${projectUser}">
  105. <t:choose hiddenName="userid" hiddenid="id"
  106. width="670" height="450" url="correctionController.do?userWorkflow&type=leave" name="userList1"
  107. icon="icon-select" title="选择离职员工" textname="realName" isclear="true" fun="linkage" isInit="true"></t:choose>
  108. </c:if>
  109. <c:if test="${not projectUser}">
  110. <t:choose hiddenName="userid" hiddenid="id"
  111. width="670" height="450" url="activitiLeaveController.do?userWorkflow" name="userList1"
  112. icon="icon-select" title="选择离职员工" textname="realName" isclear="true" fun="linkage" isInit="true"></t:choose>
  113. </c:if>
  114. <span class="Validform_checktip"></span>
  115. </td>
  116. </tr>
  117. </c:if>
  118. <c:if test="${selfSubmit=='1'}">
  119. <input type="hidden" id="bpmStatus" value="${leavePage.bpmStatus}"/>
  120. <input type="hidden" id="procInstId" value="${leavePage.procInstId}"/>
  121. <input id="userid" name="userid" type="hidden" value="${submitUser.id}"/>
  122. <input name="realName" class="inputxt" value="${submitUser.realName}" id="realName" readonly="readonly" datatype="*" type="hidden"/>
  123. </c:if>
  124. <tr>
  125. <td align="right">
  126. <label class="Validform_label">
  127. 职务:
  128. </label>
  129. </td>
  130. <td class="value">
  131. <input id="duties" name="duties" value="${dto.dutiesName}" disabled="disabled" type="text"/>
  132. </td>
  133. </tr>
  134. <tr>
  135. <td align="right">
  136. <label class="Validform_label">
  137. 岗位:
  138. </label>
  139. </td>
  140. <td class="value">
  141. <input id="station" name="station" value="${dto.postName}" disabled="disabled" type="text"/>
  142. </td>
  143. </tr>
  144. <tr>
  145. <td align="right">
  146. <label class="Validform_label">
  147. 项目:
  148. </label>
  149. </td>
  150. <td class="value">
  151. <input id="project" name="project" value="${dto.depName}" disabled="disabled" type="text"/>
  152. </td>
  153. </tr>
  154. <tr>
  155. <td align="right">
  156. <label class="Validform_label">
  157. <span color="red" class="requiredIcon">*</span>
  158. 离职日期:
  159. </label>
  160. </td>
  161. <td class="value">
  162. <input id="leaveDate" name="leaveDate" readonly="readonly" type="text" style="width: 150px" class="Wdate" onClick="WdatePicker()" datatype="*" nullmsg="离职日期不可为空!" value='<fmt:formatDate value='${leavePage.leaveDate}' type="date" pattern="yyyy-MM-dd"/>'/>
  163. <span class="Validform_checktip"></span>
  164. <label class="Validform_label" style="display: none;">离职日期</label>
  165. </td>
  166. </tr>
  167. <c:if test="${selfSubmit=='0'}">
  168. <tr>
  169. <td align="right">
  170. <label class="Validform_label">
  171. <span color="red" class="requiredIcon">*</span>
  172. 离职类型:
  173. </label>
  174. </td>
  175. <td class="value">
  176. <t:dictSelect field="leaveType" type="list" typeGroupCode="outType" datatype="*" defaultVal="${leavePage.leaveType}" hasLabel="false" title="离职类型"></t:dictSelect>
  177. <span class="Validform_checktip"></span>
  178. <label class="Validform_label" style="display: none;">离职类型</label>
  179. </td>
  180. </tr>
  181. </c:if>
  182. <c:if test="${selfSubmit=='1'}">
  183. <input type="hidden" name="leaveType" value="zidonglizhi"/>
  184. </c:if>
  185. <tr>
  186. <td align="right">
  187. <label class="Validform_label">
  188. <span color="red" class="requiredIcon">*</span>
  189. 离职原因:
  190. </label>
  191. </td>
  192. <td class="value" colspan="2" >
  193. <textarea style="width:600px;height: 80px;" class="inputxt" rows="6" id="leaveCause" maxlength="200" name="leaveCause" datatype="*" placeholder="请输入离职原因(最多输入文字数200)">${ leavePage.leaveCause}</textarea>
  194. <label class="Validform_label" style="display: none;">离职原因</label>
  195. </td>
  196. </tr>
  197. <tr>
  198. <td align="right">
  199. <label class="Validform_label">
  200. <span color="red" class="requiredIcon">*</span>
  201. 离职报告:
  202. </label>
  203. </td>
  204. <td class="value">
  205. <t:webUploader auto="true" busiTable="jeecg_demo"
  206. busiId="${leavePage.id}" bizType="departurefile" remark="test"
  207. extensions="doc,docx"
  208. name="departurefile" duplicate="true" fileNumLimit="1" singlemode = 'true'
  209. nullMsg="离职报告不可为空"></t:webUploader>
  210. <span class="Validform_checktip Validform_right" style="display: none;">文件已上传</span>
  211. </td>
  212. </tr>
  213. <tr>
  214. <td align="right">
  215. <label class="Validform_label">
  216. 是否交接:
  217. </label>
  218. </td>
  219. <td class="value">
  220. <t:dictSelect field="istransfer" type="radio" typeGroupCode="isTransfer" datatype="*" defaultVal="${leavePage.istransfer}" hasLabel="false" title="是否交接"></t:dictSelect>
  221. <span class="Validform_checktip"></span>
  222. <label class="Validform_label" style="display: none;">是否交接</label>
  223. </td>
  224. </tr>
  225. <tr>
  226. <td align="right">
  227. <label class="Validform_label">
  228. 工资是否结算:
  229. </label>
  230. </td>
  231. <td class="value">
  232. <t:dictSelect field="issettlement" type="radio" typeGroupCode="is_balance" datatype="*" defaultVal="${leavePage.issettlement}" hasLabel="false" title="工资是否结算"></t:dictSelect>
  233. <span class="Validform_checktip"></span>
  234. <label class="Validform_label" style="display: none;">工资是否结算</label>
  235. </td>
  236. </tr>
  237. <%--新增--%>
  238. <tr>
  239. <td align="right">
  240. <label class="Validform_label">
  241. <span color="red" class="requiredIcon">*</span>
  242. 服装归还情况:
  243. </label>
  244. </td>
  245. <td class="value" colspan="2" >
  246. <textarea style="width:600px;height: 80px;" class="inputxt" rows="6" id="clothesInfo" maxlength="500" name="clothesInfo" datatype="*" placeholder="请输入服装归还情况(最多输入文字数500)">${ leavePage.clothesInfo}</textarea>
  247. <label class="Validform_label" style="display: none;">服装归还情况</label>
  248. </td>
  249. </tr>
  250. <tr>
  251. <td align="right">
  252. <label class="Validform_label">
  253. <span color="red" class="requiredIcon">*</span>
  254. 工具用品归还情况:
  255. </label>
  256. </td>
  257. <td class="value" colspan="2" >
  258. <textarea style="width:600px;height: 80px;" class="inputxt" rows="6" id="toolInfo" maxlength="500" name="toolInfo" datatype="*" placeholder="请输入工具用品归还情况(最多输入文字数500)">${ leavePage.toolInfo}</textarea>
  259. <label class="Validform_label" style="display: none;">工具用品归还情况</label>
  260. </td>
  261. </tr>
  262. <tr>
  263. <td align="right">
  264. <label class="Validform_label">
  265. <span color="red" class="requiredIcon">*</span>
  266. 工作交接人:
  267. </label>
  268. </td>
  269. <td class="value" colspan="2" >
  270. <input type="hidden" name="transferUser" id="transferUser" value="${ leavePage.transferUser}"/>
  271. <input type="text" readonly="readonly" name="transferUserName" id="transferUserName" value="${ leavePage.transferUserName}"/>
  272. <c:if test="${empty param.load}">
  273. <a href="#" class="easyui-linkbutton" plain="true" icon="icon-select" id="dutiesSearch" onclick="openSameDepartUserSelect()">选择</a>
  274. <a href="#" class="easyui-linkbutton" plain="true" icon="icon-clean" id="dutiesRedo" onclick="sameDepartUserClean()">清空</a>
  275. </c:if>
  276. <label class="Validform_label" style="display: none;">工作交接人</label>
  277. </td>
  278. </tr>
  279. <tr>
  280. <td align="right">
  281. <label class="Validform_label">
  282. <span color="red" class="requiredIcon">*</span>
  283. 工作交接情况说明:
  284. </label>
  285. </td>
  286. <td class="value" colspan="2" >
  287. <textarea style="width:600px;height: 80px;" class="inputxt" rows="6" id="transferInfo" maxlength="500" name="transferInfo" datatype="*" placeholder="请输入工作交接情况说明(最多输入文字数500)">${ leavePage.transferInfo}</textarea>
  288. <label class="Validform_label" style="display: none;">工作交接情况说明</label>
  289. </td>
  290. </tr>
  291. <%--新增--%>
  292. <tr>
  293. <td height="50px" align="center" colspan="2" >
  294. <a href="javascript:void(0)" class="easyui-linkbutton l-btn" iconcls="icon-confirm" onclick="btn_ok()">确定</a>
  295. <div style="display:none"><input type="submit" id ="btnsub" value=""/></div>
  296. <c:if test="${selfSubmit=='0'}">
  297. <a style="margin-left:0px" href="javascript:void(0)" class="easyui-linkbutton l-btn" plain="true" iconcls="icon-return" onclick="cal();">返回</a>
  298. </c:if>
  299. <c:if test="${selfSubmit=='1'}">
  300. <span id="startProcessButtons" style="display:none">
  301. <a href="javascript:void(0)" class="easyui-linkbutton l-btn" onclick="startUserDefinedProcess()"><i class="fa fa-cog"></i>&nbsp;提交流程</a>
  302. </span>
  303. <span id="revertProcessButtons" style="display:none">
  304. <a href="javascript:void(0)" class="easyui-linkbutton l-btn" onclick="startus()"><i class="fa fa-cog"></i>&nbsp;查看流程</a>
  305. <a style="margin-left:0px" href="javascript:void(0)" class="easyui-linkbutton l-btn" plain="true" iconcls="icon-return" onclick="startusr();">撤回流程</a>
  306. </span>
  307. <script>
  308. $(function(){
  309. var bpmStatus=$('#bpmStatus').val();
  310. if(bpmStatus=='' || bpmStatus==1){
  311. $('#startProcessButtons').show();
  312. }else {
  313. $('#revertProcessButtons').show();
  314. }
  315. })
  316. </script>
  317. </c:if>
  318. </td>
  319. </tr>
  320. </table>
  321. </div>
  322. </t:formvalid>
  323. </body>
  324. <script src = "webpage/cn/com/lzt/leave/leave.js"></script>
  325. <script type="text/javascript">
  326. function linkage(){
  327. var userid = $('#userid').val();
  328. $.post('activitiLeaveController.do?userLinkage', {"userid" : userid}, function (data) {
  329. $('#duties').val(data.obj.dutiesName);
  330. $('#station').val(data.obj.postName);
  331. $('#project').val(data.obj.depName);
  332. }, "json");
  333. }
  334. function cal(){
  335. window.location.href="activitiLeaveController.do?list";
  336. // history.go(-1);
  337. }
  338. function callbackTable(msg){
  339. window.parent.callbackTable(msg);
  340. }
  341. //加载 已存在的 文件
  342. $(function(){
  343. $(".btns").children("input").after("&nbsp;&nbsp;&nbsp;<span>(支持的离职报告格式为:word,pdf,png,jpg)</span>");
  344. $("#userid").next("input").next("a").next("a").attr("icon","icon-clean");
  345. $("#userid").next("input").next("a").next("a").children("span").children("span").attr("class","l-btn-text icon-clean l-btn-icon-left");
  346. var cgFormId=$("input[name='id']").val();
  347. $.ajax({
  348. type: "post",
  349. url: "activitiLeaveController.do?getFiles&id=" + cgFormId,
  350. success: function(data){
  351. var arrayFileObj = jQuery.parseJSON(data).obj;
  352. $.each(arrayFileObj,function(n,file){
  353. var fieldName = file.field.toLowerCase();
  354. var table = $("#"+fieldName+"_fileTable");
  355. var tr = $("<tr style=\"height:34px;\"></tr>");
  356. var td_title = $("<td>" + file.title + "</td>")
  357. var td_download = $("<td><a href=\"commonController.do?viewFile&fileid=" + file.fileKey + "&subclassname=org.jeecgframework.web.cgform.entity.upload.CgUploadEntity\" title=\"下载\">下载</a></td>")
  358. var td_view = $("<td><a href=\"javascript:void(0);\" onclick=\"openwindow('预览','commonController.do?openViewFile&fileid=" + file.fileKey + "&subclassname=org.jeecgframework.web.cgform.entity.upload.CgUploadEntity','fList',700,500)\">预览</a></td>");
  359. var td_del = $("<td><a href=\"javascript:void(0)\" class=\"jeecgDetail\" onclick=\"del('cgUploadController.do?delFile&id=" + file.fileKey + "',this)\">删除</a></td>");
  360. tr.appendTo(table);
  361. td_title.appendTo(tr);
  362. td_download.appendTo(tr);
  363. td_view.appendTo(tr);
  364. td_del.appendTo(tr);
  365. });
  366. }
  367. });
  368. });
  369. /**
  370. * 删除图片数据资源
  371. */
  372. function del(url,obj){
  373. var content = "请问是否要删除该资源";
  374. var navigatorName = "Microsoft Internet Explorer";
  375. if( navigator.appName == navigatorName ){
  376. $.dialog.confirm(content, function(){
  377. submit(url,obj);
  378. }, function(){
  379. });
  380. }else{
  381. layer.open({
  382. title:"提示",
  383. content:content,
  384. icon:7,
  385. yes:function(index){
  386. submit(url,obj);
  387. },
  388. btn:['确定','取消'],
  389. btn2:function(index){
  390. layer.close(index);
  391. }
  392. });
  393. }
  394. }
  395. function submit(url,obj){
  396. $.ajax({
  397. async : false,
  398. cache : false,
  399. type : 'POST',
  400. url : url,// 请求的action路径
  401. error : function() {// 请求失败处理函数
  402. },
  403. success : function(data) {
  404. var d = data; // ------ $.parseJSON(data);
  405. if (d.success) {
  406. var msg = d.msg;
  407. tip(msg);
  408. obj.parentNode.parentNode.parentNode.deleteRow(obj.parentNode.parentNode);
  409. } else {
  410. tip(d.msg);
  411. }
  412. }
  413. });
  414. }
  415. function jeecgFormFileCallBack(data){
  416. if (data.success == true) {
  417. uploadFile(data);
  418. } else {
  419. if (data.responseText == '' || data.responseText == undefined) {
  420. $.messager.alert('错误', data.msg);
  421. $.Hidemsg();
  422. } else {
  423. try {
  424. var emsg = data.responseText.substring(data.responseText.indexOf('错误描述'), data.responseText.indexOf('错误信息'));
  425. $.messager.alert('错误', emsg);
  426. $.Hidemsg();
  427. } catch(ex) {
  428. $.messager.alert('错误', data.responseText + '');
  429. }
  430. }
  431. return false;
  432. }
  433. }
  434. function upload() {
  435. $('#departurefile').uploadify('upload', '*');
  436. }
  437. var neibuClickFlag = false;
  438. function neibuClick() {
  439. neibuClickFlag = true;
  440. $('#btn_sub').trigger('click');
  441. }
  442. function cancel() {
  443. $('#departurefile').uploadify('cancel', '*');
  444. }
  445. function uploadFile(data){
  446. if(!$("input[name='id']").val()){
  447. if(data.obj!=null && data.obj!='undefined'){
  448. $("input[name='id']").val(data.obj.id);
  449. }
  450. }
  451. if($(".uploadify-queue-item").length>0){
  452. upload();
  453. }else{
  454. if (neibuClickFlag){
  455. alert(data.msg);
  456. neibuClickFlag = false;
  457. }
  458. }
  459. }
  460. function openSameDepartUserSelect() {
  461. $.dialog.setting.zIndex = getzIndex();
  462. var transferUser = $("#transferUser").val();
  463. var userid = $('#userid').val();
  464. if(!userid){
  465. $.messager.alert('提示','请选择离职员工');
  466. return;
  467. }
  468. $.post('activitiLeaveController.do?getUserDepart',{userid:userid},function(data){
  469. $.dialog({content: 'url:publicpageController.do?userSelectSameDepart&departid='+data.departid
  470. , zIndex: getzIndex()
  471. , title: '选择交接人', lock: true, width: '400px', height: '350px', opacity: 0.4, button: [
  472. {name: '<t:mutiLang langKey="common.confirm"/>', callback: callbacSameDepartUserSelect, focus: true},
  473. {name: '<t:mutiLang langKey="common.cancel"/>', callback: function (){}}
  474. ]}).zindex();
  475. },'json');
  476. }
  477. function sameDepartUserClean(){
  478. $('#transferUser').val('');
  479. $('#transferUserName').val('');
  480. }
  481. function callbacSameDepartUserSelect(){
  482. var iframe = this.iframe.contentWindow;
  483. var selectedRows = iframe.getSelectedRow();
  484. var row = selectedRows[0];
  485. var id = row.id;
  486. var name = row.realName;
  487. $('#transferUser').val(id);
  488. $('#transferUserName').val(name);
  489. }
  490. //启动流程
  491. function startUserDefinedProcess(){
  492. var id = $('#id').val();
  493. if(!id){
  494. layer.alert('请先保存');
  495. return;
  496. }
  497. var bpmStatus=$('#bpmStatus').val();
  498. if(bpmStatus == 2){
  499. layer.alert('<t:mutiLang langKey="申请处理中不可再次提交流程"/>');
  500. return;
  501. }else if(bpmStatus == 3){
  502. layer.alert('<t:mutiLang langKey="申请已完成不可再次提交流程"/>');
  503. return;
  504. }
  505. /* if(applicantId != $("#user").val()){
  506. layer.alert('您无权限操作该数据!');
  507. return;
  508. } */
  509. //业务表名
  510. var tableName = 't_bus_activiti_leave';
  511. //流程对应表单 URL
  512. var formUrl = 'activitiLeaveController.do?goView';
  513. layer.open({
  514. title:'提示信息',
  515. content:'确认提交流程吗?',
  516. icon:7,
  517. yes:function(index){
  518. doSubmit('activitiController.do?startUserDefinedProcess&id='+id+'&tableName='+tableName+'&formUrl='+formUrl,'');
  519. location.reload();
  520. },
  521. btn:['确定','取消'],
  522. btn2:function(index){
  523. layer.close(index);
  524. }
  525. });
  526. /*confirm('activitiController.do?startUserDefinedProcess&id='+id+'&tableName='+tableName+'&formUrl='+formUrl,'确定提交流程吗?','leaveList',function(){
  527. });*/
  528. }
  529. function startusr(){
  530. var id = $('#id').val();
  531. var processInstanceId =$('#procInstId').val();
  532. var tableName="t_bus_activiti_leave";
  533. // retractProcess(id,"t_bus_activiti_leave",processInstanceId,"leaveList");
  534. if (typeof id == "undefined"||null ==id||'' ==id ) {
  535. $.messager.alert("error","传入参数错误",'error');
  536. return ;
  537. }
  538. if (typeof tableName == "undefined"||null ==tableName||'' ==tableName ) {
  539. $.messager.alert("error","传入参数错误",'error');
  540. return ;
  541. }
  542. $.ajax({
  543. url : 'pubController.do?checkRetractable&procInstId='+ processInstanceId,
  544. type : 'POST',
  545. cache : false,
  546. success : function(data) {
  547. var d = data; // ------ $.parseJSON(data);
  548. if (d.success) {
  549. confirm1('activitiController.do?retractProcess&id='+id+'&tableName='+tableName+'&processInstanceId='+processInstanceId,'确定撤回流程吗?',function(){
  550. /*$('#startProcessButtons').show();
  551. $('#revertProcessButtons').hide();*/
  552. location.reload();
  553. });
  554. }else{
  555. tip(d.msg);
  556. try{
  557. reloadTable();
  558. }catch(e){
  559. }
  560. }
  561. }
  562. });
  563. }
  564. function startus(){
  565. var id = $('#id').val();
  566. var processInstanceId =$('#procInstId').val();
  567. processtracking(id,processInstanceId);
  568. }
  569. function confirm1(url,content,cb){
  570. layer.open({
  571. title:'提示信息',
  572. content:content,
  573. icon:7,
  574. yes:function(index){
  575. doSubmit(url,'');
  576. if(cb){
  577. cb();
  578. }
  579. },
  580. btn:['确定','取消'],
  581. btn2:function(index){
  582. layer.close(index);
  583. }
  584. });
  585. }
  586. function reloadTable(){};
  587. </script>