ProductProblemWindow.cshtml 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. 
  2. @{
  3. ViewBag.Title = "ProductProblemWindow";
  4. Layout = "~/Views/Shared/_MainLayoutPage.cshtml";
  5. }
  6. <div class="easyui-layout" fit="true">
  7. <div data-options="region:'south',border:false" style="height:50px;text-align:right; padding:5px">
  8. <a href="#" id="btnClose" class="easyui-linkbutton c5">
  9. <i class="fa fa-power-off"></i>
  10. 关闭
  11. </a>
  12. </div>
  13. <div data-options="region:'center',border:false">
  14. <div class="btn_promb" id="btn_promb" style="border-top:0px">
  15. <input id="Product" data-options="prompt:'请选择产品'" class="easyui-combobox" style="width:200px">
  16. <input id="dtn-search-Problem" class="easyui-searchbox" data-options="prompt:'输入问题标题/编号',searcher:GetSearch" style="width:180px" />
  17. <a href="#" onclick="GetSearch()" id="btn_refresh" class="easyui-linkbutton c8" data-options="iconCls:'fa fa-refresh ',plain:true">刷新</a>
  18. </div>
  19. <table class="easyui-datagrid" id="VersionProblem"></table>
  20. </div>
  21. </div>
  22. <script>
  23. var PersonProperty='@ViewBag.PersonProperty'
  24. $(function () {
  25. //关闭窗口
  26. $('#btnClose').bind('click', function () {
  27. ZLPMS.CloseTopWindow(false);
  28. });
  29. $("#Product").combobox({
  30. url: '/Product/ProductInfoCombobox',
  31. valueField: 'ID',
  32. textField: '名称',
  33. editable: true,
  34. onChange: function () {
  35. GetSearch()
  36. }
  37. });
  38. //初始化版本问题列表
  39. $("#VersionProblem").datagrid({
  40. url: "/Problem/GetVersionProblem",
  41. method: 'Get',
  42. pagination: true,
  43. singleSelect: true,
  44. fit: true,
  45. rownumbers: true,
  46. toolbar: '#btn_promb',
  47. columns: [[
  48. { field: '编号', title: '编号', sortable: true, width: 60, align: 'center' },
  49. {
  50. field: '问题性质', title: '性质', width: 60, align: 'center', formatter: function (val, row, index) {
  51. switch (val) {
  52. case 1:
  53. return "<i class='fa fa-bug' title='Bug' style='color:red'>Bug</i>";
  54. case 2:
  55. return "<i class='fa fa-commenting-o' title='咨询'>咨询</i>";
  56. case 3:
  57. return "<i class='fa fa-dropbox' title='需求' style='color:#3279b6'>需求</i>";
  58. case 4:
  59. return "<i class='fa fa-history' title='任务'>任务</i>";
  60. default:
  61. break;
  62. }
  63. }
  64. },
  65. { field: '问题标题', title: '【问题标题】', width: 300, halign: 'center' },
  66. { field: '版本', title: '版本号', width: 150, align: 'center' },
  67. { field: '产品', title: '产品类型', width: 100, align: 'center' },
  68. { field: '模块', title: '产品模块', width: 100, align: 'center' },
  69. { field: '说明', title: '说明', width: 300, align: 'center' },
  70. { field: '登记人', title: '登记人', width: 60, align: 'center' },
  71. { field: '登记日期', title: '登记日期', sortable: true, width: 140, align: 'center' },
  72. { field: '受理人', title: '当前受理人', sortable: true, width: 60, align: 'center' },
  73. { field: '渠道', title: '分公司(渠道)', width: 100, align: 'center' },
  74. { field: '项目', title: '所在项目', width: 100, align: 'center' },
  75. { field: '机构', title: '医疗机构', width: 100, align: 'center' }
  76. ]],
  77. onDblClickRow: function (rowIndex, rowData) {
  78. checkproblem();
  79. }
  80. })
  81. })
  82. //查看问题弹窗
  83. function checkproblem () {
  84. var that = this
  85. var WT = $('#VersionProblem').datagrid("getSelected");
  86. if (WT == null) {
  87. top.ZLPMS.Msg("请选择一行数据!");
  88. }
  89. else {
  90. top.ZLPMS.OpenNewWindow("查看问题", "/Problem/CheckProblemWindow/" + WT["ID"], '880px', '600px', function () {
  91. DealProblem(1, 1, WT["ID"]);
  92. });
  93. }
  94. }
  95. //处理问题
  96. function DealProblem (showAtt, IsSupport, ProblemId) {
  97. var that = this
  98. //是否为技术支持处理
  99. IsSupport = IsSupport || 0;
  100. //受理问题
  101. var receiveProblem = function (title, HJID) {
  102. var index = top.ZLPMS.Loading3(2);
  103. //受理问题
  104. $.ajax({
  105. url: '/Support/ReceiveProblem',
  106. data: { id: ProblemId },
  107. method: 'post',
  108. success: function (data) {
  109. top.ZLPMS.UnLoading(index);
  110. var url = "/Problem/ProductionPdeal?id=" + ProblemId + "&showAtt=" + showAtt + '&workflowid=' + HJID + '&IsSupport=' + IsSupport;
  111. //成功后调用
  112. if (data.code == 200) {
  113. top.ZLPMS.OpenNewWindow("处理问题:" + title, url, '1000px', '640px', function () {
  114. //回调用刷新(只有确定后才刷新)
  115. });
  116. } else {//显示具体原因,并提示是否强制处理
  117. top.ZLPMS.Confirm('该问题已被他人受理,您确定要继续处理吗?', 3, function (idx) {
  118. top.ZLPMS.CloseWindow(idx);
  119. top.ZLPMS.OpenNewWindow("处理问题", url, '1000px', '640px');
  120. })
  121. }
  122. }
  123. });
  124. };
  125. $.post('/Problem/GetProblemById/' + ProblemId, function (data) {
  126. var row = data[0];
  127. if (row) {
  128. /*已关闭的问题,已解决的问题,已受理的问题, 不需要处理*/
  129. if (row.是否终止 == 1) {
  130. top.ZLPMS.Msg('已终止的问题不需要再处理!');
  131. return;
  132. }
  133. if (row.是否解决 == 1) {
  134. top.ZLPMS.Msg('已解决的问题不需要再处理!');
  135. return;
  136. }
  137. if (row.环节ID > 3 && PersonProperty != '1') {
  138. top.ZLPMS.Msg('非本部人员不能处理技术支持与研发处理环节问题,仅能查阅!');
  139. return;
  140. }
  141. if (row.环节ID == 3 && (PersonProperty == '3' || PersonProperty == '4' || PersonProperty == '5')) {//客户,机构管理员,卫计委人员无法处理项目问题
  142. top.ZLPMS.Msg('客户,机构管理员,卫计委人员无法处理项目问题,仅能查阅!');
  143. return;
  144. }
  145. //打开处理窗口
  146. receiveProblem(row.编号, row.环节ID);
  147. } else {//提醒用户没有选择问题记录
  148. top.ZLPMS.Msg('没有选择需要处理的问题记录,请选择后再处理!');
  149. }
  150. })
  151. }
  152. function GetSearch() {
  153. $('#VersionProblem').datagrid("reload", { SearchText: $('#dtn-search-Problem').searchbox('getValue'), ProductId: $('#Product').combobox('getValue') })
  154. }
  155. </script>