forward.html 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328
  1. <!DOCTYPE html>
  2. <html xmlns="http://www.w3.org/1999/xhtml" ng-app="app">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
  6. <title>流转记录</title>
  7. <link href="../../AFrontEnd/css/animate.css" rel="stylesheet" />
  8. <link href="../../AFrontEnd/css/fontawesome/css/font-awesome.css" rel="stylesheet" />
  9. <link href="../../AFrontEnd/css/bootstrap.css" rel="stylesheet" />
  10. <link href="../../AFrontEnd/css/style.css" rel="stylesheet" />
  11. <link href="../../bpmn/css/bpmn-set.css" rel="stylesheet" />
  12. <script>document.write("<link href='../../AFrontEnd/css/special.css?time=" + new Date().getTime() + "' rel='stylesheet'>");</script>
  13. <style>
  14. #routeList td {
  15. border-right: 1px solid #E1E6EB;
  16. }
  17. .opinionclass td {
  18. border:0 !important;
  19. }
  20. .opinionclass tr:hover {
  21. background:inherit !important
  22. }
  23. </style>
  24. </head>
  25. <body>
  26. <div ng-controller="formeditCtrl as ctl" id="app" ng-cloak>
  27. <div class="sp-box sp-bg-white">
  28. <div class="sp-page-col sp-pull-right btn-box">
  29. <a onclick="javascript:window.close()" class="sp-btn-gray sp-radius">
  30. 关 闭
  31. </a>
  32. </div>
  33. </div>
  34. <div class="sp-box" style="position:relative">
  35. <div class="sp-col-10"><strong>流程类型:</strong></div>{{ctl.flow.FLOWNAME}}
  36. <div id="toolbar">
  37. <div class="toolbar-item">
  38. <div class="item-color-wait"></div>
  39. <div class="item-name">待办理</div>
  40. </div>
  41. <div class="toolbar-item">
  42. <div class="item-color-process"></div>
  43. <div class="item-name">正办理</div>
  44. </div>
  45. <div class="toolbar-item">
  46. <div class="item-color-done"></div>
  47. <div class="item-name">已办理</div>
  48. </div>
  49. </div>
  50. </div>
  51. <div class="sp-box">
  52. <div class="sp-col-10"><strong>标&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;题:</strong></div>{{ctl.flow.TITLE}}
  53. </div>
  54. <table class="sp-table" style="width:calc(100%)">
  55. <thead>
  56. <tr>
  57. <th width="150"><div style="width: 133px; font-weight: 600">发送节点</div></th>
  58. <th width="150"><div style="width: 133px; font-weight: 600">发送人</div></th>
  59. <th width="150"><div style="width: 133px; font-weight: 600">发出时间</div></th>
  60. <th width="150"><div style="width: 133px; font-weight: 600">办理节点</div></th>
  61. <th width="100"><div style="width: 84px; font-weight: 600">办理单位</div></th>
  62. <th width="100"><div style="width: 84px; font-weight: 600">办理人</div></th>
  63. <th width="100"><div style="width: 84px; font-weight: 600">办理类型</div></th>
  64. <th width="100"><div style="width: 84px; font-weight: 600">办理状态</div></th>
  65. <th width="100"><div style="width: 134px; font-weight: 600">接件时间</div></th>
  66. <th><div style="font-weight: 600">回复意见</div></th>
  67. <th width="100">补发</th>
  68. </tr>
  69. </thead>
  70. </table>
  71. <div style="overflow-y:auto;max-height:700px">
  72. <table class="sp-table" style="margin-top:-38px;" id="routeList">
  73. <thead>
  74. <tr>
  75. <th width="150"><div style="width: 133px; font-weight: 600">发送节点</div></th>
  76. <th width="150"><div style="width: 133px; font-weight: 600">发送人</div></th>
  77. <th width="150"><div style="width: 133px; font-weight: 600">发出时间</div></th>
  78. <th width="150"><div style="width: 133px; font-weight: 600">办理节点</div></th>
  79. <th width="100"><div style="width: 84px; font-weight: 600">办理单位</div></th>
  80. <th width="100"><div style="width: 84px; font-weight: 600">办理人</div></th>
  81. <th width="100"><div style="width: 84px; font-weight: 600">办理类型</div></th>
  82. <th width="100"><div style="width: 84px; font-weight: 600">办理状态</div></th>
  83. <th width="100"><div style="width: 134px; font-weight: 600">接件时间</div></th>
  84. <th><div style="font-weight: 600">回复意见</div></th>
  85. <th width="100">补发</th>
  86. </tr>
  87. </thead>
  88. <tbody>
  89. <tr ng-repeat="item in ctl.routeList" repeat-finish>
  90. <td ng-bind="item.STARTNODENAME"></td>
  91. <td ng-bind="item.USERNAMEFROM"></td>
  92. <td ng-bind="item.RECEIVEDATE"></td>
  93. <td ng-bind="item.ENDNODENAME" ng-style="item.borderStyle"></td>
  94. <td ng-bind="item.SECTNAME" ng-style="item.borderStyle"></td>
  95. <td ng-bind="item.USERNAME" ng-style="item.borderStyle"></td>
  96. <td ng-bind="item.KIND1" ng-style="item.borderStyle"></td>
  97. <td ng-bind="item.STATUS1" ng-style="item.borderStyle"></td>
  98. <td ng-bind="item.SIGNDATE" ng-style="item.borderStyle"></td>
  99. <td ng-style="item.borderStyle" style="text-align:left; padding:0px;margin:0px">
  100. <table border="0" class="opinionclass" width="100%" style="margin:0px;padding:0px;">
  101. <tr ng-repeat="itemOpinion in item.OPINIONARRAY">
  102. <td ng-bind="itemOpinion.OPINION" style="text-align:left"></td>
  103. <td ng-bind="itemOpinion.CMANNAME" width="160"></td>
  104. <td ng-bind="itemOpinion.CDATE" width="160"></td>
  105. </tr>
  106. </table>
  107. </td>
  108. <td>
  109. <button ng-if="item.STARTNODENAME!='开始'&&item.ENDNODENAME!='结束'&&item.KIND==0&&item.STATUS==4&&item.KINDCOUNT!=0" class="sp-btn-blue sp-btn-sm sp-radius" ng-click="ctl.btnEdit(item)">补发</button>
  110. </td>
  111. </tr>
  112. </tbody>
  113. </table>
  114. </div>
  115. <div class="sp-layer" id="Edit" style="width: 550px;">
  116. <div class="sp-layer-head" style="background:#2176d6">
  117. <div class="sp-page sp-text-center sp-font16">
  118. 人员补发
  119. <div class="sp-layer-close" title="关闭" onclick="sp.closeCenter('.sp-layer')">
  120. ×
  121. </div>
  122. </div>
  123. </div>
  124. <div class="sp-layer-body">
  125. <div class="sp-col-33 sp-text-center" ng-repeat="item in ctl.buttonList">
  126. <button class="sp-btn-blue sp-radius" ng-bind="item.CNAME" ng-click="ctl.buttonClick(item)"></button>
  127. </div>
  128. <div class="sp-page sp-text-center sp-mt-20">
  129. <a class="sp-btn-blue sp-radius" onclick="sp.layerhide()"><i class="fa fa-close sp-mr-5"></i>关 闭</a>
  130. </div>
  131. </div>
  132. </div>
  133. <div class="sp-layer" id="forward" style="width: 1000px;">
  134. <div class="sp-layer-head" style="background:#2176d6">
  135. <div class="sp-page sp-text-center sp-font16">
  136. 转&nbsp;&nbsp;发
  137. <div class="sp-layer-close" title="关闭" onclick="sp.closeCenter('.sp-layer')">
  138. ×
  139. </div>
  140. </div>
  141. </div>
  142. <div class="sp-layer-body" ng-class="{'sp-height-400': '{{ctl.deviceType}}' =='pad'}">
  143. <iframe id="forwardWin" style="width:100%;border:0"></iframe>
  144. </div>
  145. </div>
  146. </div>
  147. <script src="../../AFrontEnd/js/jquery/jquery-2.1.4.min.js"></script>
  148. <script src="../../AFrontEnd/js/laydate/laydate.js"></script>
  149. <script src="../../AFrontEnd/js/angularjs/angular.js"></script>
  150. <script src="../../AFrontEnd/js/angularjs/dirPagination.js"></script>
  151. <script src="../../apiurljs.js"></script>
  152. <script src="../../js/sm4.js"></script>
  153. <script>document.write('<scri' + 'pt src="../../AFrontEnd/js/special/special.js?time=' + new Date().getTime() + '" type="text/javascript"></s' + 'cript>')</script>
  154. <script>
  155. 'use strict';
  156. var app = angular.module('app', [
  157. ]);
  158. app.controller("formeditCtrl", ["$scope", "$http", "$timeout", function ($scope, $http, $timeout) {
  159. var self = this;
  160. var s4 = new SM4Util();
  161. self.userId = $.cookie("GlWorkPlatform-userid");
  162. self.userName = $.cookie("GlWorkPlatform-chineseName");
  163. self.get_AccessToken = localStorage.getItem("GlWorkPlatform-AccessToken");
  164. self.routeid = sp.getUrlName("routeid");
  165. self.routeinfoid = sp.getUrlName("routeinfoid");
  166. self.directionid = sp.getUrlName("directionid");
  167. self.formeditid = sp.getUrlName("formeditid");
  168. var postCfg = {
  169. headers: {
  170. 'Content-Type': 'application/json',
  171. 'Authorization': "Bearer " + self.get_AccessToken
  172. }
  173. };
  174. self.getData = function () {
  175. var data = {
  176. directionid: self.directionid,
  177. userid: self.userId,
  178. routeid: self.routeid,
  179. routeinfoid: self.routeinfoid,
  180. }
  181. $http.post(apiurljs.login + "g2app/abase/queryDataRouteList", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
  182. .success(function (obj) {
  183. var res = strToJson(s4.decryptData_CBC(obj.data));
  184. self.flow = res.data[0];
  185. res.data.forEach(function (item) {
  186. if (item.STATUSINFO == 'START') {
  187. item.SIGNDATE = item.RECEIVEDATE;
  188. item.STARTNODENAME = "开始";
  189. item.USERNAMEFROM = item.USERNAME;
  190. }
  191. if (item.STATUS == 0) item.borderStyle = { "background-color": "white" };
  192. if (item.STATUS == 1) item.borderStyle = { "background-color": "#f05d2e" };
  193. if (item.STATUS == 2) item.borderStyle = { "background-color": "#1890ff" };
  194. if (item.STATUS == 3) item.borderStyle = { "background-color": "white" };
  195. if (item.STATUS == 100) item.borderStyle = { "background-color": "white" };
  196. if (item.STATUS == 4) item.borderStyle = { "background-color": "#00a900" };
  197. if (item.KIND == 0) {
  198. item.KIND1 = "转办";
  199. if (item.STATUS == 0) item.STATUS1 = "草稿";
  200. if (item.STATUS == 1) item.STATUS1 = "待办";
  201. if (item.STATUS == 2) item.STATUS1 = "在办";
  202. if (item.STATUS == 3) item.STATUS1 = "发送中";
  203. if (item.STATUS == 100) item.STATUS1 = "等待";
  204. if (item.STATUS == 4) {
  205. if (item.KINDCOUNT == 0)
  206. item.STATUS1 = "已阅";
  207. else
  208. item.STATUS1 = "已转";
  209. }
  210. }
  211. else {
  212. item.KIND1 = "阅办";
  213. if (item.STATUS == 0) item.STATUS1 = "草稿";
  214. if (item.STATUS == 1) item.STATUS1 = "待办";
  215. if (item.STATUS == 2) item.STATUS1 = "在办";
  216. if (item.STATUS == 3) item.STATUS1 = "发送中";
  217. if (item.STATUS == 100) item.STATUS1 = "等待";
  218. if (item.STATUS == 4) {
  219. if (item.KINDCOUNT == 0)
  220. item.STATUS1 = "已阅";
  221. else
  222. item.STATUS1 = "已转";
  223. }
  224. }
  225. })
  226. self.routeList = res.data;
  227. })
  228. }
  229. self.getData()
  230. self.btnEdit = function (forward) {
  231. self.forward = forward;
  232. //self.routeList.forEach(function (item) {
  233. // if (item.ROUTEID == forward.LASTROUTEID) {
  234. // self.DIRECTIONID = item.DIRECTIONID
  235. // }
  236. //})
  237. var data = {
  238. ckey: self.forward.CODETABLE,
  239. directionid: self.forward.DIRECTIONID,
  240. //formeditid: self.forward.FORMEDITID,
  241. routeid: self.forward.ROUTEID,
  242. routeinfoid: self.forward.ROUTEINFOID
  243. }
  244. $http.post(apiurljs.login + "g2app/abase/queryDataFormEditFuncT",{ data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
  245. .success(function (obj) {
  246. var res = strToJson(s4.decryptData_CBC(obj.data));
  247. console.log(res)
  248. self.buttonList = [];
  249. res.data[self.forward.CODETABLE + ".FUNCLIST"].forEach(function (item) {
  250. if (item.CODE.indexOf("SENDITEM") > -1) {
  251. self.buttonList.push(item)
  252. }
  253. })
  254. sp.layer("#Edit")
  255. })
  256. }
  257. self.buttonClick = function (obj) {
  258. var username = [], userid = [];
  259. self.routeList.forEach(function (item) {
  260. if (item.LASTROUTEID == self.forward.LASTROUTEID) {
  261. username.push(item.USERNAME);
  262. userid.push(item.USERID)
  263. }
  264. })
  265. $("#forwardWin").attr("src", "forwardUser.html?routeid=" + self.forward.ROUTEID + "&routeinfoid=" + self.forward.ROUTEINFOID + "&copyrightid=" + sp.getUrlName("copyrightid") + "&directionid=" + self.forward.DIRECTIONID + "&formeditid=" + self.forward.FORMEDITID + "&codefuncbutton=" + obj.CODE + "&directionidtarget=" + obj.DIRECTIONIDTARGET)
  266. sp.layer("#forward")
  267. }
  268. self.submitOption = function () {
  269. }
  270. }])
  271. app.directive("repeatFinish", function () {
  272. return {
  273. link: function (scope) {
  274. if (scope.$last == true) {
  275. setTimeout(function () {
  276. //$("#routeList").rowspan(0)
  277. //$("#routeList").rowspan(1)
  278. //$("#routeList").rowspan(2)
  279. }, 10);
  280. }
  281. }
  282. };
  283. });
  284. jQuery.fn.rowspan = function (colIdx) { //封装的一个JQuery小插件
  285. return this.each(function () {
  286. var that;
  287. $('tr', this).each(function (row) {
  288. $('td:eq(' + colIdx + ')', this).filter(':visible').each(function () {
  289. if (that != null && $(this).html() == $(that).html()) {
  290. if (colIdx == 0) {
  291. var rowspan = $(that).attr("rowSpan");
  292. if (rowspan == undefined) {
  293. $(that).attr("rowSpan", 1);
  294. rowspan = $(that).attr("rowSpan");
  295. }
  296. rowspan = Number(rowspan) + 1;
  297. $(that).attr("rowSpan", rowspan);
  298. $(this).hide();
  299. } else {
  300. if ($(this).prev().html() == $(that).prev().html()) {
  301. var rowspan = $(that).attr("rowSpan");
  302. if (rowspan == undefined) {
  303. $(that).attr("rowSpan", 1);
  304. rowspan = $(that).attr("rowSpan");
  305. }
  306. rowspan = Number(rowspan) + 1;
  307. $(that).attr("rowSpan", rowspan);
  308. $(this).hide();
  309. }
  310. }
  311. } else {
  312. that = this;
  313. }
  314. });
  315. });
  316. });
  317. }
  318. </script>
  319. </body>
  320. </html>