ProblemMonitoring.cshtml 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. 
  2. @{
  3. ViewBag.Title = "ProblemMonitoring";
  4. Layout = "~/Views/Shared/_MainLayoutPage.cshtml";
  5. }
  6. <style type="text/css">
  7. .datagrid-header-rownumber, .datagrid-cell-rownumber{
  8. width:60px;
  9. }
  10. </style>
  11. <div class="easyui-layout" data-options="fit:true,border:false">
  12. <div id="toolbar" style="padding:3px;">
  13. <label>
  14. <input type="radio" onchange = "change();" checked="checked" name="radio" value="" class="a-radio">
  15. <span class="b-radio"></span>全部
  16. </label>
  17. <label>
  18. <input type="radio" onchange = "change();" name="radio" id="2" value="完成" class="a-radio">
  19. <span class="b-radio"></span>完成
  20. </label>
  21. <label>
  22. <input type="radio" onchange = "change();" name="radio" id="3" value="未完成" class="a-radio">
  23. <span class="b-radio"></span>未完成
  24. </label>
  25. <div style="margin-left:20px;display:inline-block">
  26. <input class="easyui-combobox" id="Ring" data-options="label:'环节:',prompt:'请选择',panelHeight:200,labelAlign:'right'" style="width:260px;" />
  27. <input class="easyui-combobox" id="Channel" data-options="label:'渠道:',prompt:'请选择',limitToList:true,panelHeight:300,labelAlign:'right'" style="width:260px;" />
  28. </div>
  29. <div style="margin-left:20px;display:inline-block">
  30. <a id="btnSelect" href="#" class="easyui-linkbutton c1" style="margin-left:30px"><i class="fa fa-search"></i> 查询记录</a>
  31. <a id="btnRefresh" href="#" class="easyui-linkbutton c8" data-options="plain:true"><i class="fa fa-refresh"></i> 刷新</a>
  32. @*<a onclick="GetExcel()" id="btn_Class" href="#" class="easyui-linkbutton c2" data-options="plain:true"><i class="fa fa-file-text-o"> 导出excel</i></a>*@
  33. </div>
  34. </div>
  35. <div data-options="region:'center',border:false">
  36. <table id="table">
  37. <thead>
  38. <tr>
  39. <th rowspan="2" field="编号" width="80" align="center" sortable="true">问题编号</th>
  40. <th rowspan="2" field="问题标题" width="300" halign="center" >问题标题</th>
  41. <th rowspan="2" field="当前环节1" width="100" align="center" >当前环节</th>
  42. <th rowspan="2" field="受理人" width="80" align="center" sortable="true">处理人</th>
  43. <th rowspan="2" field="登记人" width="80" align="center" >登记人</th>
  44. <th rowspan="2" field="登记日期" width="80" align="center" sortable="true">登记时间</th>
  45. <th rowspan="2" field="渠道" width="120" align="center" >反馈渠道</th>
  46. <th colspan="3" field="各环节耗时" align="center" >各环节耗时</th>
  47. <th rowspan="2" field="总耗时" width="100" align="center" sortable="true">总耗时(小时)</th>
  48. <th rowspan="2" field="滞留时间" width="120" align="center" sortable="true">滞留时间(小时)</th>
  49. </tr>
  50. <tr>
  51. <th field="项目处理1" width="80" align="center" sortable="true">项目处理</th>
  52. <th field="技术支持1" width="80" align="center" sortable="true">技术支持</th>
  53. <th field="研发处理1" width="80" align="center" sortable="true">研发处理</th>
  54. </tr>
  55. </thead>
  56. </table>
  57. </div>
  58. </div>
  59. <script type="text/javascript">
  60. var RYXZ='@ViewBag.RYXZ'
  61. $(function () {
  62. $("#table").datagrid({
  63. fit: true,
  64. width: '100%',
  65. toolbar: '#toolbar',
  66. pageSize: 20,
  67. pageList: [10, 20, 30, 40, 50, 1000],
  68. rownumbers: true,
  69. pagination: true,
  70. border: true,
  71. remoteSort: true,
  72. singleSelect: true, //单行选择
  73. loadMsg: "正在查询数据,请稍候...",
  74. url: '/Report/GetMonitoring',
  75. method: 'get',
  76. rowStyler: function (index, row) {
  77. if (row.是否终止 == 1) {
  78. return 'background-color:#ef6d6d;'; // rowStyle是一个已经定义了的ClassName(类名)
  79. }
  80. else if (row.是否解决 == 1) {
  81. return 'background-color:rgba(140, 243, 114, 0.95)'; // rowStyle是一个已经定义了的ClassName(类名)
  82. }
  83. },
  84. onDblClickRow: function (rowIndex, rowData) {
  85. checkproblem();
  86. }
  87. })
  88. //查询
  89. $("#btnSelect").bind('click', function () {
  90. $('#table').datagrid('load', {
  91. CurrentLink: $("#Ring").combobox('getValue'),
  92. Channel: $("#Channel").combobox('getValue'),
  93. State: $('input:radio:checked').val()
  94. });
  95. })
  96. //刷新
  97. $("#btnRefresh").bind('click', function () {
  98. $('#table').datagrid('reload');
  99. })
  100. //环节
  101. $("#Ring").combobox({
  102. url: '/Report/GetRing',
  103. valueField: 'ID',
  104. textField: '名称',
  105. })
  106. ///渠道
  107. $("#Channel").combobox({
  108. url: '/Report/GetChannel',
  109. valueField: 'ID',
  110. textField: '名称',
  111. })
  112. })
  113. function change() {
  114. $('#table').datagrid('load', {
  115. CurrentLink: $("#Ring").combobox('getValue'),
  116. Channel: $("#Channel").combobox('getValue'),
  117. State: $('input:radio:checked').val()
  118. });
  119. }
  120. //查看问题弹窗
  121. function checkproblem () {
  122. var that = this
  123. var WT = $('#table').datagrid("getSelected");
  124. if (WT == null) {
  125. top.ZLPMS.Msg("请选择一行数据!");
  126. }
  127. else {
  128. top.ZLPMS.OpenNewWindow("查看问题", "/Problem/CheckProblemWindow/" + WT["ID"], '880px', '600px', function () {
  129. that.DealProblem(0, 0, WT["ID"]);
  130. });
  131. }
  132. }
  133. //处理问题
  134. function DealProblem (showAtt, IsSupport, ProblemId) {
  135. var that = this
  136. //是否为技术支持处理
  137. IsSupport = IsSupport || 0;
  138. //受理问题
  139. var receiveProblem = function (title, HJID) {
  140. var index = top.ZLPMS.Loading3(2);
  141. //受理问题
  142. $.ajax({
  143. url: '/Support/ReceiveProblem',
  144. data: { id: ProblemId },
  145. method: 'post',
  146. success: function (data) {
  147. top.ZLPMS.UnLoading(index);
  148. var url = "/Problem/ProductionPdeal?id=" + ProblemId + "&showAtt=" + showAtt + '&workflowid=' + HJID + '&IsSupport=' + IsSupport;
  149. //成功后调用
  150. if (data.code == 200) {
  151. top.ZLPMS.OpenNewWindow("处理问题:" + title, url, '1000px', '640px', function () {
  152. //回调用刷新(只有确定后才刷新)
  153. $('#table').datagrid('reload');
  154. });
  155. } else {//显示具体原因,并提示是否强制处理
  156. top.ZLPMS.Confirm('该问题已被他人受理,您确定要继续处理吗?', 3, function (idx) {
  157. top.ZLPMS.CloseWindow(idx);
  158. top.ZLPMS.OpenNewWindow("处理问题", url, '1000px', '640px', function () {
  159. //回调用刷新(只有确定后才刷新)
  160. $('#table').datagrid('reload');
  161. });
  162. })
  163. }
  164. }
  165. });
  166. };
  167. $.post('/Problem/GetProblemById/' + ProblemId, function (data) {
  168. var row = data[0];
  169. if (row) {
  170. /*已关闭的问题,已解决的问题,已受理的问题, 不需要处理*/
  171. if (row.是否终止 == 1) {
  172. top.ZLPMS.Msg('已终止的问题不需要再处理!');
  173. return;
  174. }
  175. if (row.是否解决 == 1) {
  176. top.ZLPMS.Msg('已解决的问题不需要再处理!');
  177. return;
  178. }
  179. if (row.环节ID > 3 && that.RYXZ != '1') {
  180. top.ZLPMS.Msg('非本部人员不能处理技术支持与研发处理环节问题,仅能查阅!');
  181. return;
  182. }
  183. if (row.环节ID == 3 && (RYXZ == '3' || RYXZ == '4' || RYXZ == '5')) {//客户,机构管理员,卫计委人员无法处理项目问题
  184. top.ZLPMS.Msg('客户,机构管理员,卫计委人员无法处理项目问题,仅能查阅!');
  185. return;
  186. }
  187. //打开处理窗口
  188. receiveProblem(row.编号, row.环节ID);
  189. } else {//提醒用户没有选择问题记录
  190. top.ZLPMS.Msg('没有选择需要处理的问题记录,请选择后再处理!');
  191. }
  192. })
  193. }
  194. </script>