opinion.html 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329
  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. </tr>
  68. </thead>
  69. </table>
  70. <div style="overflow-y:auto;max-height:700px">
  71. <table class="sp-table" style="margin-top:-38px;" id="routeList">
  72. <thead>
  73. <tr>
  74. <th width="150"><div style="width: 133px; font-weight: 600">发送节点</div></th>
  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="100"><div style="width: 84px; 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: 134px; font-weight: 600">接件时间</div></th>
  83. <th><div style="font-weight: 600">回复意见</div></th>
  84. </tr>
  85. </thead>
  86. <tbody>
  87. <tr ng-repeat="item in ctl.routeList" repeat-finish>
  88. <td ng-bind="item.STARTNODENAME"></td>
  89. <td ng-bind="item.USERNAMEFROM"></td>
  90. <td ng-bind="item.RECEIVEDATE"></td>
  91. <td ng-bind="item.ENDNODENAME" ng-style="item.borderStyle"></td>
  92. <td ng-bind="item.SECTNAME" ng-style="item.borderStyle"></td>
  93. <td ng-bind="item.USERNAME" ng-style="item.borderStyle"></td>
  94. <td ng-bind="item.KIND1" ng-style="item.borderStyle"></td>
  95. <td ng-bind="item.STATUS1" ng-style="item.borderStyle"></td>
  96. <td ng-bind="item.SIGNDATE" ng-style="item.borderStyle"></td>
  97. <td ng-style="item.borderStyle" style="text-align:left; padding:0px;margin:0px">
  98. <table border="0" class="opinionclass" width="100%" style="margin:0px;padding:0px;">
  99. <tr ng-repeat="itemOpinion in item.OPINIONARRAY">
  100. <td ng-bind="itemOpinion.OPINION" style="text-align:left"></td>
  101. <td ng-bind="itemOpinion.CMANNAME" width="160"></td>
  102. <td ng-bind="itemOpinion.CDATE" width="160"></td>
  103. <td width="100">
  104. <button class="sp-btn-red sp-btn-sm sp-radius sp-pull-right" ng-click="ctl.btnEdit(itemOpinion,item)">修改</button>
  105. <button class="sp-btn-red sp-btn-sm sp-radius sp-pull-right" ng-click="ctl.delOption(itemOpinion,item)">删除</button>
  106. </td>
  107. </tr>
  108. </table>
  109. </td>
  110. </tr>
  111. </tbody>
  112. </table>
  113. </div>
  114. <div class="sp-layer" id="Edit" style="width: 550px;">
  115. <div class="sp-layer-head" style="background:#2176d6">
  116. <div class="sp-page sp-text-center sp-font16">
  117. 修改意见
  118. <div class="sp-layer-close" title="关闭" onclick="sp.closeCenter('.sp-layer')">
  119. ×
  120. </div>
  121. </div>
  122. </div>
  123. <div class="sp-layer-body">
  124. <table class="sp-grid-job">
  125. <tbody>
  126. <tr>
  127. <td style="width:120px;">{{ctl.opinionItem.OPINIONCOL}}</td>
  128. <td>
  129. <textarea rows="10" style="resize:none" ng-model="ctl.opinionItem.OPINION"></textarea>
  130. </td>
  131. </tr>
  132. </tbody>
  133. </table>
  134. <div class="sp-page sp-text-center sp-mt-20">
  135. <a class="sp-btn-blue sp-radius" ng-click="ctl.submitOption()"><i class="fa fa-check sp-mr-5"></i>确 定</a>
  136. <a class="sp-btn-blue sp-radius" onclick="sp.layerhide()"><i class="fa fa-refresh sp-mr-5"></i>关 闭</a>
  137. </div>
  138. </div>
  139. </div>
  140. </div>
  141. <script src="../../AFrontEnd/js/jquery/jquery-2.1.4.min.js"></script>
  142. <script src="../../AFrontEnd/js/laydate/laydate.js"></script>
  143. <script src="../../AFrontEnd/js/angularjs/angular.js"></script>
  144. <script src="../../AFrontEnd/js/angularjs/dirPagination.js"></script>
  145. <script src="../../apiurljs.js"></script>
  146. <script src="../../js/sm4.js"></script>
  147. <script>document.write('<scri' + 'pt src="../../AFrontEnd/js/special/special.js?time=' + new Date().getTime() + '" type="text/javascript"></s' + 'cript>')</script>
  148. <script>
  149. 'use strict';
  150. var app = angular.module('app', [
  151. ]);
  152. app.controller("formeditCtrl", ["$scope", "$http", "$timeout", function ($scope, $http, $timeout) {
  153. var self = this;
  154. var s4 = new SM4Util();
  155. self.userId = $.cookie("GlWorkPlatform-userid");
  156. self.userName = $.cookie("GlWorkPlatform-chineseName");
  157. self.get_AccessToken = localStorage.getItem("GlWorkPlatform-AccessToken");
  158. self.routeid = sp.getUrlName("routeid");
  159. self.routeinfoid = sp.getUrlName("routeinfoid");
  160. self.directionid = sp.getUrlName("directionid");
  161. self.formeditid = sp.getUrlName("formeditid");
  162. var postCfg = {
  163. headers: {
  164. 'Content-Type': 'application/json',
  165. 'Authorization': "Bearer " + self.get_AccessToken
  166. }
  167. };
  168. self.getData = function () {
  169. var data = {
  170. directionid: self.directionid,
  171. userid: self.userId,
  172. routeid: self.routeid,
  173. routeinfoid: self.routeinfoid,
  174. }
  175. $http.post(apiurljs.login + "g2app/abase/queryDataRouteList", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
  176. .success(function (obj) {
  177. var res = strToJson(s4.decryptData_CBC(obj.data));
  178. self.flow = res.data[0];
  179. res.data.forEach(function (item) {
  180. if (item.STATUSINFO == 'START') {
  181. item.SIGNDATE = item.RECEIVEDATE;
  182. item.STARTNODENAME = "开始";
  183. item.USERNAMEFROM = item.USERNAME;
  184. }
  185. if (item.STATUS == 0) item.borderStyle = { "background-color": "white" };
  186. if (item.STATUS == 1) item.borderStyle = { "background-color": "#f05d2e" };
  187. if (item.STATUS == 2) item.borderStyle = { "background-color": "#1890ff" };
  188. if (item.STATUS == 3) item.borderStyle = { "background-color": "white" };
  189. if (item.STATUS == 100) item.borderStyle = { "background-color": "white" };
  190. if (item.STATUS == 4) item.borderStyle = { "background-color": "#00a900" };
  191. if (item.KIND == 0) {
  192. item.KIND1 = "转办";
  193. if (item.STATUS == 0) item.STATUS1 = "草稿";
  194. if (item.STATUS == 1) item.STATUS1 = "待办";
  195. if (item.STATUS == 2) item.STATUS1 = "在办";
  196. if (item.STATUS == 3) item.STATUS1 = "发送中";
  197. if (item.STATUS == 100) item.STATUS1 = "等待";
  198. if (item.STATUS == 4) {
  199. if (item.KINDCOUNT == 0)
  200. item.STATUS1 = "已阅";
  201. else
  202. item.STATUS1 = "已转";
  203. }
  204. }
  205. else {
  206. item.KIND1 = "阅办";
  207. if (item.STATUS == 0) item.STATUS1 = "草稿";
  208. if (item.STATUS == 1) item.STATUS1 = "待办";
  209. if (item.STATUS == 2) item.STATUS1 = "在办";
  210. if (item.STATUS == 3) item.STATUS1 = "发送中";
  211. if (item.STATUS == 100) item.STATUS1 = "等待";
  212. if (item.STATUS == 4) {
  213. if (item.KINDCOUNT == 0)
  214. item.STATUS1 = "已阅";
  215. else
  216. item.STATUS1 = "已转";
  217. }
  218. }
  219. })
  220. self.routeList = res.data;
  221. })
  222. }
  223. self.getData()
  224. self.btnEdit = function (obj,parentobj) {
  225. self.opinionItem = obj;
  226. self.opinionItem.OLDOPINION = obj.OPINION;
  227. self.opinionItem.CMAN = parentobj.USERID;
  228. self.opinionItem.ROUTEINFOID = parentobj.ROUTEINFOID;
  229. sp.layer("#Edit")
  230. }
  231. self.submitOption = function () {
  232. var data = {
  233. cuserid: self.userId,
  234. userid: self.opinionItem.CMAN,
  235. routeid: self.opinionItem.ROUTEID,
  236. routeinfoid: self.opinionItem.ROUTEINFOID,
  237. colid: self.opinionItem.COLID,
  238. tableid: self.opinionItem.TABLEID,
  239. oldopinion: self.opinionItem.OLDOPINION,
  240. opinion: self.opinionItem.OPINION
  241. }
  242. $http.post(apiurljs.login + "g2app/dataabase/addSysRouteOpinionRecode", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
  243. .success(function (obj) {
  244. var res = strToJson(s4.decryptData_CBC(obj.data));
  245. if (res.success == true) {
  246. self.getData();
  247. sp.layerhide()
  248. }
  249. })
  250. }
  251. self.delOption = function (obj, parentobj) {
  252. var data = {
  253. cuserid: self.userId,
  254. userid: parentobj.USERID,
  255. routeid: obj.ROUTEID,
  256. routeinfoid: parentobj.ROUTEINFOID,
  257. colid: obj.COLID,
  258. tableid: obj.TABLEID,
  259. oldopinion: obj.OPINION,
  260. opinion: ""
  261. }
  262. $http.post(apiurljs.login + "g2app/dataabase/delSysRouteOpinionRecode", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
  263. .success(function (obj) {
  264. var res = strToJson(s4.decryptData_CBC(obj.data));
  265. if (res.success == true) {
  266. self.getData();
  267. sp.layerhide()
  268. }
  269. })
  270. }
  271. }])
  272. app.directive("repeatFinish", function () {
  273. return {
  274. link: function (scope) {
  275. if (scope.$last == true) {
  276. setTimeout(function () {
  277. //$("#routeList").rowspan(0)
  278. //$("#routeList").rowspan(1)
  279. //$("#routeList").rowspan(2)
  280. }, 10);
  281. }
  282. }
  283. };
  284. });
  285. jQuery.fn.rowspan = function (colIdx) { //封装的一个JQuery小插件
  286. return this.each(function () {
  287. var that;
  288. $('tr', this).each(function (row) {
  289. $('td:eq(' + colIdx + ')', this).filter(':visible').each(function () {
  290. if (that != null && $(this).html() == $(that).html()) {
  291. if (colIdx == 0) {
  292. var rowspan = $(that).attr("rowSpan");
  293. if (rowspan == undefined) {
  294. $(that).attr("rowSpan", 1);
  295. rowspan = $(that).attr("rowSpan");
  296. }
  297. rowspan = Number(rowspan) + 1;
  298. $(that).attr("rowSpan", rowspan);
  299. $(this).hide();
  300. } else {
  301. if ($(this).prev().html() == $(that).prev().html()) {
  302. var rowspan = $(that).attr("rowSpan");
  303. if (rowspan == undefined) {
  304. $(that).attr("rowSpan", 1);
  305. rowspan = $(that).attr("rowSpan");
  306. }
  307. rowspan = Number(rowspan) + 1;
  308. $(that).attr("rowSpan", rowspan);
  309. $(this).hide();
  310. }
  311. }
  312. } else {
  313. that = this;
  314. }
  315. });
  316. });
  317. });
  318. }
  319. </script>
  320. </body>
  321. </html>