NotFinishProblem.cshtml 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  1. @{
  2. ViewBag.Title = "NotFinishProblem";
  3. Layout = "~/Views/Shared/_MainLayoutPage.cshtml";
  4. }
  5. <script>
  6. var Type = '@ViewBag.Type';
  7. var PersonProperty = '@ViewBag.PersonProperty';
  8. $(function () {
  9. //关闭窗口
  10. $('#btnClose').bind('click', function () {
  11. ZLPMS.CloseTopWindow(false);
  12. });
  13. //问题列表
  14. $("#List").datagrid({
  15. url: "/Home/NotFinishProblemList",
  16. method: 'Get',
  17. pagination: true,
  18. singleSelect: true,
  19. fit: true,
  20. rownumbers: true,
  21. queryParams: {
  22. Type: Type
  23. },
  24. columns: [
  25. [{
  26. field: '编号',
  27. title: '编号',
  28. sortable: true,
  29. width: 60,
  30. align: 'center'
  31. },
  32. {
  33. field: '问题性质',
  34. title: '性质',
  35. width: 60,
  36. align: 'center',
  37. formatter: function (val, row, index) {
  38. switch (val) {
  39. case 1:
  40. return "<i class='fa fa-bug' title='Bug' style='color:red'>Bug</i>";
  41. case 2:
  42. return "<i class='fa fa-commenting-o' title='咨询'>咨询</i>";
  43. case 3:
  44. return "<i class='fa fa-dropbox' title='需求' style='color:#3279b6'>需求</i>";
  45. case 4:
  46. return "<i class='fa fa-history' title='任务'>任务</i>";
  47. default:
  48. break;
  49. }
  50. }
  51. },
  52. {
  53. field: '问题标题',
  54. title: '【问题标题】',
  55. width: 300,
  56. halign: 'center'
  57. },
  58. {
  59. field: '登记人',
  60. title: '登记人',
  61. width: 60,
  62. align: 'center'
  63. },
  64. {
  65. field: '登记日期',
  66. title: '登记日期',
  67. sortable: true,
  68. width: 140,
  69. align: 'center'
  70. },
  71. {
  72. field: '当前环节',
  73. title: '当前环节',
  74. sortable: true,
  75. width: 90,
  76. halign: 'center'
  77. },
  78. {
  79. field: '受理人',
  80. title: '当前受理人',
  81. sortable: true,
  82. width: 60,
  83. align: 'center'
  84. },
  85. {
  86. field: '渠道',
  87. title: '分公司(渠道)',
  88. width: 100,
  89. align: 'center'
  90. },
  91. {
  92. field: '机构',
  93. title: '医疗机构',
  94. width: 100,
  95. align: 'center'
  96. },
  97. {
  98. field: '产品',
  99. title: '产品类型',
  100. width: 100,
  101. align: 'center'
  102. },
  103. {
  104. field: '指派人',
  105. title: '被指派人',
  106. sortable: true,
  107. width: 60,
  108. align: 'center'
  109. },
  110. {
  111. field: '总耗时',
  112. title: '已耗小时',
  113. sortable: true,
  114. width: 80,
  115. formatter: function (val, row, index) {
  116. var rd = val % 24;
  117. if (val >= 24) {
  118. return parseInt(val / 24) + '天' + rd.toFixed(1) + '时';
  119. } else {
  120. return rd + '小时';
  121. }
  122. }
  123. }
  124. ]
  125. ],
  126. onDblClickRow: function (rowIndex, rowData) {
  127. checkproblem();
  128. }
  129. })
  130. })
  131. //查看问题弹窗
  132. function checkproblem() {
  133. var that = this
  134. var WT = $('#List').datagrid("getSelected");
  135. if (WT == null) {
  136. top.ZLPMS.Msg("请选择一行数据!");
  137. } else {
  138. top.ZLPMS.OpenNewWindow("查看问题", "/Problem/CheckProblemWindow/" + WT["ID"], '880px', '600px', function () {
  139. DealProblem(0, 0, WT["ID"]);
  140. });
  141. }
  142. }
  143. function DealProblem(showAtt, IsSupport, ProblemId) {
  144. var that = this
  145. //是否为技术支持处理
  146. IsSupport = IsSupport || 0;
  147. //受理问题
  148. var receiveProblem = function (title, HJID) {
  149. var index = top.ZLPMS.Loading3(2);
  150. //受理问题
  151. $.ajax({
  152. url: '/Support/ReceiveProblem',
  153. data: {
  154. id: ProblemId
  155. },
  156. method: 'post',
  157. success: function (data) {
  158. top.ZLPMS.UnLoading(index);
  159. var url = "/Problem/ProductionPdeal?id=" + ProblemId + "&showAtt=" + showAtt + '&workflowid=' + HJID +
  160. '&IsSupport=' + IsSupport;
  161. //成功后调用
  162. if (data.code == 200) {
  163. top.ZLPMS.OpenNewWindow("处理问题:" + title, url, '1000px', '640px', function () {
  164. //回调用刷新(只有确定后才刷新)
  165. $('#List').datagrid('reload')
  166. });
  167. } else { //显示具体原因,并提示是否强制处理
  168. top.ZLPMS.Confirm('该问题已被他人受理,您确定要继续处理吗?', 3, function (idx) {
  169. top.ZLPMS.CloseWindow(idx);
  170. top.ZLPMS.OpenNewWindow("处理问题", url, '1000px', '640px');
  171. })
  172. }
  173. }
  174. });
  175. };
  176. $.post('/Problem/GetProblemById/' + ProblemId, function (data) {
  177. var row = data[0];
  178. if (row) {
  179. /*已关闭的问题,已解决的问题,已受理的问题, 不需要处理*/
  180. if (row.是否终止 == 1) {
  181. top.ZLPMS.Msg('已终止的问题不需要再处理!');
  182. return;
  183. }
  184. if (row.是否解决 == 1) {
  185. top.ZLPMS.Msg('已解决的问题不需要再处理!');
  186. return;
  187. }
  188. if (row.环节ID > 3 && PersonProperty != '1') {
  189. top.ZLPMS.Msg('非本部人员不能处理技术支持与研发处理环节问题,仅能查阅!');
  190. return;
  191. }
  192. if (row.环节ID == 3 && (PersonProperty == '3' || PersonProperty == '4' || PersonProperty ==
  193. '5')) { //客户,机构管理员,卫计委人员无法处理项目问题
  194. top.ZLPMS.Msg('客户,机构管理员,卫计委人员无法处理项目问题,仅能查阅!');
  195. return;
  196. }
  197. //打开处理窗口
  198. receiveProblem(row.编号, row.环节ID);
  199. } else { //提醒用户没有选择问题记录
  200. top.ZLPMS.Msg('没有选择需要处理的问题记录,请选择后再处理!');
  201. }
  202. })
  203. }
  204. </script>
  205. <div class="easyui-layout" fit="true">
  206. <div data-options="region:'south',border:false" style="height:50px;text-align:right; padding:5px">
  207. <a href="#" id="btnClose" class="easyui-linkbutton c5">
  208. <i class="fa fa-power-off"></i>
  209. 关闭
  210. </a>
  211. </div>
  212. <div data-options="region:'center',border:false">
  213. <div title="未完成问题" style="padding:5px;height:420px" data-options="fit:true,border:false">
  214. <table class="easyui-datagrid" id="List"></table>
  215. </div>
  216. </div>
  217. </div>