CheckProblemWindow.cshtml 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370
  1. 
  2. @{
  3. ViewBag.Title = "CheckProblemWindow";
  4. Layout = null;
  5. }
  6. <!DOCTYPE html>
  7. <meta charset="utf-8">
  8. <meta name="renderer" content="webkit">
  9. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  10. <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  11. <script src="~/ViewModels/Register.Problem.js?t=12321.232222222222222222222222222222222221221"></script>
  12. <link href="~/Content/Scripts/plugins/umeditor-1.2.3/themes/default/_css/umeditor.css" rel="stylesheet" />
  13. <link href="~/Content/Scripts/plugins/layui/css/layui.css" rel="stylesheet" />
  14. <link href="~/Content/Style/font-awesome/ico-font/iconfont.css" rel="stylesheet" />
  15. <link href="~/Content/Style/font-awesome/css/font-awesome.min.css" rel="stylesheet" />
  16. <link href="~/Content/SysFrame/common.css" rel="stylesheet" />
  17. <link href="~/Content/Scripts/plugins/easyui/themes/metro/easyui.css" rel="stylesheet" />
  18. <link href="~/Content/Style/CommonStyle.css" rel="stylesheet" />
  19. <script src="~/Content/Scripts/jquery.min.js"></script>
  20. <script src="~/Content/Scripts/plugins/layui/layui.js"></script>
  21. <script src="~/Content/Scripts/plugins/easyui/jquery.easyui.min.js"></script>
  22. <script src="~/Content/Scripts/plugins/easyui/easyui-lang-zh_CN.js"></script>
  23. <script src="~/Content/Scripts/SysFrame/Zlsoft.UI-1.0.js"></script>
  24. <script src="~/Content/Scripts/zlpms.js"></script>
  25. <script src="~/Content/Scripts/plugins/umeditor-1.2.3/umeditor.min.js"></script>
  26. <script src="~/Content/Scripts/plugins/umeditor-1.2.3/umeditor.config.js"></script>
  27. <script src="~/Content/Scripts/plugins/umeditor-1.2.3/lang/zh-cn/zh-cn.js"></script>
  28. <style>
  29. table {
  30. width: 97%;
  31. }
  32. table td {
  33. padding: 3px;
  34. border-bottom: solid 1px #EEE;
  35. }
  36. .btn-cc {
  37. position: absolute;
  38. bottom: 20px;
  39. right: 10px;
  40. }
  41. table {
  42. width: 100%;
  43. }
  44. table td {
  45. border: solid 1px #cacaca;
  46. padding: 3px;
  47. }
  48. .lable {
  49. width: 130px;
  50. padding: 5px 5px 5px 15px;
  51. background: #f5f5f5;
  52. color: #2636a3;
  53. font-size: 13px;
  54. }
  55. .img {
  56. width: 40px;
  57. height: 50px;
  58. border: solid 1px #000;
  59. }
  60. #content img, #solutionplan img, #endreason img, #backreason img {
  61. max-width: 400px;
  62. height: auto;
  63. }
  64. .timelineDetail:hover {
  65. background-color: #c5e5ff;
  66. cursor: pointer;
  67. }
  68. .tabs-header {
  69. border: 0px
  70. }
  71. </style>
  72. <form class="easyui-tabs" fit="true" lay-filter="insert_problem" id="insert_problem">
  73. <div title="<i class='fa fa-sticky-note-o'></i> 问题信息" style="padding:5px;display:none;">
  74. <table>
  75. <tr>
  76. <td class="lable">问题编号</td>
  77. <td id="code" style="width:300px"></td>
  78. <td class="lable">问题性质</td>
  79. <td id="property"></td>
  80. </tr>
  81. <tr>
  82. <td class="lable">所属渠道</td>
  83. <td id="company"></td>
  84. <td class="lable">所属项目</td>
  85. <td id="project"></td>
  86. </tr>
  87. <tr>
  88. <td class="lable">所属机构</td>
  89. <td id="org"></td>
  90. <td class="lable">所属产品/版本号</td>
  91. <td id="productAndVersion"></td>
  92. </tr>
  93. <tr>
  94. <td class="lable">所属模块</td>
  95. <td id="module"></td>
  96. <td class="lable">紧急程度</td>
  97. <td id="prior"></td>
  98. </tr>
  99. <tr>
  100. <td class="lable">要求时间</td>
  101. <td id="priordate"></td>
  102. <td class="lable">紧急描述</td>
  103. <td id="priorDesc"></td>
  104. </tr>
  105. <tr>
  106. <td class="lable">反馈人/登记人</td>
  107. <td id="feedbackAndRegisterPerson"></td>
  108. <td class="lable">登记时间</td>
  109. <td id="registertime"></td>
  110. </tr>
  111. <tr>
  112. <td class="lable">登记来源</td>
  113. <td id="codefrom"></td>
  114. </tr>
  115. <tr>
  116. <td class="lable">问题标题</td>
  117. <td id="title" colspan="3"></td>
  118. </tr>
  119. <tr>
  120. <td class="lable">问题描述</td>
  121. <td id="content" colspan="3" style="height:180px;overflow:auto;"></td>
  122. </tr>
  123. <tr>
  124. <td class="lable">问题附件</td>
  125. <td colspan="3" style="height:50px;" id="attach"></td>
  126. </tr>
  127. </table>
  128. <div class="btn-cc">
  129. @Html.Partial("CloseButton")
  130. </div>
  131. </div>
  132. <div title="<i class='fa fa-server'></i> 相关信息" style="padding:5px;display:none;">
  133. <table id="About">
  134. <tr>
  135. <td class="lable">项目处理</td>
  136. <td id="projectdeal" style="width:300px"></td>
  137. <td class="lable">技术支持</td>
  138. <td id="technologydeal"></td>
  139. </tr>
  140. <tr>
  141. <td class="lable">研发协助</td>
  142. <td id="developmentdeal"></td>
  143. <td class="lable">是否受理</td>
  144. <td id="accept"></td>
  145. </tr>
  146. <tr>
  147. <td class="lable">受理人/受理时间</td>
  148. <td id="acceptperson"></td>
  149. <td class="lable">指派人/指派时间</td>
  150. <td id="assign"></td>
  151. </tr>
  152. <tr id="tr-solution">
  153. <td class="lable">是否解决</td>
  154. <td id="solution"></td>
  155. <td class="lable">解决版本</td>
  156. <td id="solutionversion"></td>
  157. </tr>
  158. <tr id="tr-solutionplan" style="display:none">
  159. <td class="lable">处理说明</td>
  160. <td id="solutionplan" colspan="3" height="90px"></td>
  161. </tr>
  162. <tr id="tr-end" style="display:none">
  163. <td class="lable">是否终止</td>
  164. <td id="end"></td>
  165. </tr>
  166. <tr id="tr-endreason" style="display:none">
  167. <td class="lable">终止原因</td>
  168. <td id="endreason" colspan="3" height="90px"></td>
  169. </tr>
  170. <tr id="tr-back" style="display:none">
  171. <td class="lable">是否回退</td>
  172. <td id="back"></td>
  173. </tr>
  174. <tr id="tr-backreason" style="display:none">
  175. <td class="lable">回退原因</td>
  176. <td id="backreason" colspan="3" height="90px"></td>
  177. </tr>
  178. </table>
  179. <div class="btn-cc">
  180. @Html.Partial("CloseButton")
  181. </div>
  182. </div>
  183. <div title="<i class='fa fa-random'></i> 流转过程" style="padding:5px;display:none;">
  184. <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
  185. <ul class="layui-tab-title">
  186. <li class="layui-this">主流程</li>
  187. <li>详细流程</li>
  188. </ul>
  189. <div class="layui-tab-content" style="height: 100px;">
  190. <div class="layui-tab-item layui-show"><ul style="max-height:400px;overflow-y:auto" class="layui-timeline" id="timeLineMain" title="主流程"></ul></div>
  191. <div class="layui-tab-item"><ul style="max-height:400px;overflow-y:auto" class="layui-timeline" id="timeLine" title="详细流程"></ul></div>
  192. </div>
  193. </div>
  194. <div class="btn-cc">
  195. @Html.Partial("CloseButton")
  196. </div>
  197. </div>
  198. <div title="<i class='fa fa-cubes'></i>资源信息" style="padding:5px;display:none;">
  199. <script type="text/html" id="toolbartop">
  200. @*头部工具*@
  201. <a href="#" class="layui-btn layui-btn-sm" onclick="add()">新增</a>
  202. </script>
  203. @*右侧工具*@
  204. <script type="text/html" id="barright">
  205. <a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
  206. <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
  207. </script>
  208. <table class="layui-hide" lay-filter="test" id="test" lay-data="{id: 'ID'}"></table>
  209. </div>
  210. </form>
  211. <script type="text/javascript">
  212. var models = new ProblemModel();
  213. var id = "@ViewBag.id"
  214. models.CheckProblem(id);
  215. DealProcess(id);
  216. GetMainProcess(id);
  217. //获取是否包括了处理参数
  218. var p = getQueryString('p');
  219. if (p != null) {
  220. $('.aproccess').css({ "display": "block" });
  221. }
  222. $('.aproccess').bind('click', function () { //处理问题
  223. ZLPMS.CloseTopWindow(true);
  224. });
  225. layui.use('element', function () {
  226. var $ = layui.jquery
  227. , element = layui.element;
  228. $('.site-demo-active').on('click', function () {
  229. var othis = $(this), type = othis.data('type');
  230. active[type] ? active[type].call(this, othis) : '';
  231. });
  232. //Hash地址的定位
  233. var layid = location.hash.replace(/^#test=/, '');
  234. element.tabChange('test', layid);
  235. element.on('tab(test)', function (elem) {
  236. location.hash = 'test=' + $(this).attr('lay-id');
  237. });
  238. });
  239. layui.use('table', function () {
  240. var table = layui.table;
  241. //监听行工具事件
  242. table.on('tool(test)', function (obj) {
  243. //删除资源
  244. if (obj.event === 'del') {
  245. top.ZLPMS.Confirm('您确定要删除吗', 5, function () {
  246. //执行删除
  247. $.post("/Problem/DelResource?id=" + obj.data.ID, function (data) {
  248. if (data == 1) {
  249. layui.use('table', function () {
  250. var table = layui.table;
  251. table.reload('test', {});
  252. })
  253. top.ZLPMS.Msg("删除成功");
  254. } else {
  255. top.ZLPMS.Msg("删除失败");
  256. }
  257. })
  258. });
  259. } else
  260. //编辑资源
  261. if (obj.event === 'edit') {
  262. sessionStorage.setItem("WTID",obj.data.WTID)
  263. sessionStorage.setItem("ID",obj.data.ID)
  264. sessionStorage.setItem("内容",obj.data.NR)
  265. sessionStorage.setItem("资源ID",obj.data.ZYID)
  266. sessionStorage.setItem("类型",obj.data.LX)
  267. sessionStorage.setItem("实例类型",obj.data.SL)
  268. sessionStorage.setItem("序号", obj.data.XH)
  269. top.ZLPMS.OpenNewWindow("资源编辑", "/Problem/ResourceWindow?type=1", "600px", "650px", function () {
  270. layui.use('table', function () {
  271. var table = layui.table;
  272. table.reload('test', {});
  273. })
  274. })
  275. }
  276. });
  277. })
  278. //加载问题处理过程
  279. function DealProcess(ID) {
  280. var url = "/Problem/GetClc?ID=" + ID;
  281. $.post(url, {}, function (data) {
  282. $("#timeLine").empty();
  283. $.each(data, function (idx, json) {
  284. if (json != undefined) {
  285. var attfile = "";
  286. if (json.附件 != undefined) {
  287. attfile = "<i class='fa fa-paperclip' style='color:blue' title='包含过程附件'></i>";
  288. }
  289. json.描述 = json.描述 != undefined ? json.描述 : "无";
  290. var html = "<li onclick='viewProcess(\"" + json.ID + "\")' class='layui-timeline-item timelineDetail'><i class='layui-icon layui-timeline-axis'></i><div class='layui-timeline-content layui-text'><h3 class='layui-timeline-title'><a href='#' >" + json.处理状态 + "</a> " + attfile + "</h3><p>" + json.处理人员 + "(" + json.职务 + ")<br>" + json.记录时间 + (json.耗时 != undefined ? "(" + json.耗时 + ")小时" : "") + "<br>" + "描述:" + json.描述 + "</p></div></li>";
  291. $("#timeLine").append(html);
  292. }
  293. });
  294. });
  295. }
  296. //获取问题过程主流程
  297. function GetMainProcess(ID){
  298. var url = "/Problem/GetMainProcess/" + ID;
  299. $.post(url, {}, function (data) {
  300. $("#timeLineMain").empty();
  301. data = data.reverse();
  302. $.each(data, function (idx, json) {
  303. if (json) {
  304. var attfile = "";
  305. json.LinkDeatil = json.LinkDeatil ? "描述:" + json.LinkDeatil : "";
  306. var detail = "";
  307. if (json.LinkUserName) {
  308. detail = "<p>" + (json.LinkUserName ? json.LinkUserName + '(' + json.job + ')' : '') + "<br>" + (json.LinkTime ? json.LinkTime : '') + "<br>" + (json.LinkDeatil) + "</p>";
  309. }
  310. //图标转换
  311. var Icon = "";
  312. switch (json.StatusID) {
  313. case 1: Icon = "&#xe756;"; break;
  314. case 3: Icon = "&#x1007;"; break;
  315. case 7: Icon = "&#x1005;"; break;
  316. case 11: Icon = "&#xe679;"; break;
  317. default: Icon = "&#xe617;"; break;
  318. }
  319. var html = "<li onclick='viewProcess(\"" + (json.ProcessId ? json.ProcessId : '') + "\")' class='layui-timeline-item timelineDetail'><i class='layui-icon layui-timeline-axis'>" + Icon + "</i><div class='layui-timeline-content layui-text'><h3 class='layui-timeline-title'><a href='#' >" + json.LinkName + "</a></h3>" + detail + "</div></li>";
  320. $("#timeLineMain").append(html);
  321. }
  322. });
  323. });
  324. }
  325. //新增资源
  326. function add() {
  327. top.ZLPMS.OpenNewWindow("资源编辑", "/Problem/ResourceWindow?type=0", "600px", "650px", function () {
  328. layui.use('table', function () {
  329. var table = layui.table;
  330. table.reload('test', {});
  331. })
  332. })
  333. }
  334. </script>