forward.html 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342
  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="150">补发</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="150">补发</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.STATUS==4&&item.KINDCOUNT!=0" class="sp-btn-blue sp-btn-sm sp-radius" ng-click="ctl.btnEdit(item)">补发</button>-->
  110. <button ng-if="item.STARTNODENAME!='开始'&&item.ENDNODENAME!='结束'&&item.STATUS==4" class="sp-btn-blue sp-btn-sm sp-radius" ng-click="ctl.btnEdit(item)">补发</button>
  111. <button ng-if="item.STATUS==1||item.STATUS==2" class="sp-btn-red sp-btn-sm sp-radius" ng-click="ctl.delROUTE(item)">删除</button>
  112. </td>
  113. </tr>
  114. </tbody>
  115. </table>
  116. </div>
  117. <div class="sp-layer" id="Edit" style="width: 550px;">
  118. <div class="sp-layer-head" style="background:#2176d6">
  119. <div class="sp-page sp-text-center sp-font16">
  120. 人员补发
  121. <div class="sp-layer-close" title="关闭" onclick="sp.closeCenter('.sp-layer')">
  122. ×
  123. </div>
  124. </div>
  125. </div>
  126. <div class="sp-layer-body">
  127. <div class="sp-col-33 sp-text-center" ng-repeat="item in ctl.buttonList">
  128. <button class="sp-btn-blue sp-radius" ng-bind="item.CNAME" ng-click="ctl.buttonClick(item)"></button>
  129. </div>
  130. <div class="sp-page sp-text-center sp-mt-20">
  131. <a class="sp-btn-blue sp-radius" onclick="sp.layerhide()"><i class="fa fa-close sp-mr-5"></i>关 闭</a>
  132. </div>
  133. </div>
  134. </div>
  135. <div class="sp-layer" id="forward" style="width: 1000px;">
  136. <div class="sp-layer-head" style="background:#2176d6">
  137. <div class="sp-page sp-text-center sp-font16">
  138. 转&nbsp;&nbsp;发
  139. <div class="sp-layer-close" title="关闭" onclick="sp.closeCenter('.sp-layer')">
  140. ×
  141. </div>
  142. </div>
  143. </div>
  144. <div class="sp-layer-body" ng-class="{'sp-height-400': '{{ctl.deviceType}}' =='pad'}">
  145. <iframe id="forwardWin" style="width:100%;border:0"></iframe>
  146. </div>
  147. </div>
  148. </div>
  149. <script src="../../AFrontEnd/js/jquery/jquery-2.1.4.min.js"></script>
  150. <script src="../../AFrontEnd/js/laydate/laydate.js"></script>
  151. <script src="../../AFrontEnd/js/angularjs/angular.js"></script>
  152. <script src="../../AFrontEnd/js/angularjs/dirPagination.js"></script>
  153. <script src="../../apiurljs.js"></script>
  154. <script src="../../js/sm4.js"></script>
  155. <script>document.write('<scri' + 'pt src="../../AFrontEnd/js/special/special.js?time=' + new Date().getTime() + '" type="text/javascript"></s' + 'cript>')</script>
  156. <script>
  157. 'use strict';
  158. var app = angular.module('app', [
  159. ]);
  160. app.controller("formeditCtrl", ["$scope", "$http", "$timeout", function ($scope, $http, $timeout) {
  161. var self = this;
  162. var s4 = new SM4Util();
  163. self.userId = $.cookie("GlWorkPlatform-userid");
  164. self.userName = $.cookie("GlWorkPlatform-chineseName");
  165. self.get_AccessToken = localStorage.getItem("GlWorkPlatform-AccessToken");
  166. self.routeid = sp.getUrlName("routeid");
  167. self.routeinfoid = sp.getUrlName("routeinfoid");
  168. self.directionid = sp.getUrlName("directionid");
  169. self.formeditid = sp.getUrlName("formeditid");
  170. var postCfg = {
  171. headers: {
  172. 'Content-Type': 'application/json',
  173. 'Authorization': "Bearer " + self.get_AccessToken
  174. }
  175. };
  176. self.getData = function () {
  177. var data = {
  178. directionid: self.directionid,
  179. userid: self.userId,
  180. routeid: self.routeid,
  181. routeinfoid: self.routeinfoid,
  182. }
  183. $http.post(apiurljs.login + "g2app/abase/queryDataRouteList", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
  184. .success(function (obj) {
  185. var res = strToJson(s4.decryptData_CBC(obj.data));
  186. self.flow = res.data[0];
  187. res.data.forEach(function (item) {
  188. if (item.STATUSINFO == 'START') {
  189. item.SIGNDATE = item.RECEIVEDATE;
  190. item.STARTNODENAME = "开始";
  191. item.USERNAMEFROM = item.USERNAME;
  192. }
  193. if (item.STATUS == 0) item.borderStyle = { "background-color": "white" };
  194. if (item.STATUS == 1) item.borderStyle = { "background-color": "#f05d2e" };
  195. if (item.STATUS == 2) item.borderStyle = { "background-color": "#1890ff" };
  196. if (item.STATUS == 3) item.borderStyle = { "background-color": "white" };
  197. if (item.STATUS == 100) item.borderStyle = { "background-color": "white" };
  198. if (item.STATUS == 4) item.borderStyle = { "background-color": "#00a900" };
  199. if (item.KIND == 0) {
  200. item.KIND1 = "转办";
  201. if (item.STATUS == 0) item.STATUS1 = "草稿";
  202. if (item.STATUS == 1) item.STATUS1 = "待办";
  203. if (item.STATUS == 2) item.STATUS1 = "在办";
  204. if (item.STATUS == 3) item.STATUS1 = "发送中";
  205. if (item.STATUS == 100) item.STATUS1 = "等待";
  206. if (item.STATUS == 4) {
  207. if (item.KINDCOUNT == 0)
  208. item.STATUS1 = "已阅";
  209. else
  210. item.STATUS1 = "已转";
  211. }
  212. }
  213. else {
  214. item.KIND1 = "阅办";
  215. if (item.STATUS == 0) item.STATUS1 = "草稿";
  216. if (item.STATUS == 1) item.STATUS1 = "待办";
  217. if (item.STATUS == 2) item.STATUS1 = "在办";
  218. if (item.STATUS == 3) item.STATUS1 = "发送中";
  219. if (item.STATUS == 100) item.STATUS1 = "等待";
  220. if (item.STATUS == 4) {
  221. if (item.KINDCOUNT == 0)
  222. item.STATUS1 = "已阅";
  223. else
  224. item.STATUS1 = "已转";
  225. }
  226. }
  227. })
  228. self.routeList = res.data;
  229. })
  230. }
  231. self.getData()
  232. self.btnEdit = function (forward) {
  233. self.forward = forward;
  234. //self.routeList.forEach(function (item) {
  235. // if (item.ROUTEID == forward.LASTROUTEID) {
  236. // self.DIRECTIONID = item.DIRECTIONID
  237. // }
  238. //})
  239. var data = {
  240. ckey: self.forward.CODETABLE,
  241. directionid: self.forward.DIRECTIONID,
  242. //formeditid: self.forward.FORMEDITID,
  243. routeid: self.forward.ROUTEID,
  244. routeinfoid: self.forward.ROUTEINFOID
  245. }
  246. $http.post(apiurljs.login + "g2app/abase/queryDataFormEditFuncT",{ data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
  247. .success(function (obj) {
  248. var res = strToJson(s4.decryptData_CBC(obj.data));
  249. console.log(res)
  250. self.buttonList = [];
  251. res.data[self.forward.CODETABLE + ".FUNCLIST"].forEach(function (item) {
  252. if (item.CODE.indexOf("SENDITEM") > -1) {
  253. self.buttonList.push(item)
  254. }
  255. })
  256. sp.layer("#Edit")
  257. })
  258. }
  259. self.buttonClick = function (obj) {
  260. var username = [], userid = [];
  261. self.routeList.forEach(function (item) {
  262. if (item.LASTROUTEID == self.forward.LASTROUTEID) {
  263. username.push(item.USERNAME);
  264. userid.push(item.USERID)
  265. }
  266. })
  267. $("#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)
  268. sp.layer("#forward")
  269. }
  270. self.delROUTE = function (obj) {
  271. var data = {
  272. tablename: "SYS_ROUTE",
  273. sqlwhere: "ROUTEID=" + obj.ROUTEID
  274. };
  275. $http.post(apiurljs.login + "g2app/dataabase/deletBywhere", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
  276. .success(function (obj) {
  277. var res = strToJson(s4.decryptData_CBC(obj.data));
  278. self.getData()
  279. })
  280. }
  281. self.submitOption = function () {
  282. }
  283. }])
  284. app.directive("repeatFinish", function () {
  285. return {
  286. link: function (scope) {
  287. if (scope.$last == true) {
  288. setTimeout(function () {
  289. //$("#routeList").rowspan(0)
  290. //$("#routeList").rowspan(1)
  291. //$("#routeList").rowspan(2)
  292. }, 10);
  293. }
  294. }
  295. };
  296. });
  297. jQuery.fn.rowspan = function (colIdx) { //封装的一个JQuery小插件
  298. return this.each(function () {
  299. var that;
  300. $('tr', this).each(function (row) {
  301. $('td:eq(' + colIdx + ')', this).filter(':visible').each(function () {
  302. if (that != null && $(this).html() == $(that).html()) {
  303. if (colIdx == 0) {
  304. var rowspan = $(that).attr("rowSpan");
  305. if (rowspan == undefined) {
  306. $(that).attr("rowSpan", 1);
  307. rowspan = $(that).attr("rowSpan");
  308. }
  309. rowspan = Number(rowspan) + 1;
  310. $(that).attr("rowSpan", rowspan);
  311. $(this).hide();
  312. } else {
  313. if ($(this).prev().html() == $(that).prev().html()) {
  314. var rowspan = $(that).attr("rowSpan");
  315. if (rowspan == undefined) {
  316. $(that).attr("rowSpan", 1);
  317. rowspan = $(that).attr("rowSpan");
  318. }
  319. rowspan = Number(rowspan) + 1;
  320. $(that).attr("rowSpan", rowspan);
  321. $(this).hide();
  322. }
  323. }
  324. } else {
  325. that = this;
  326. }
  327. });
  328. });
  329. });
  330. }
  331. </script>
  332. </body>
  333. </html>