123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204 |
-
- @{
- ViewBag.Title = "ProblemMonitoring";
- Layout = "~/Views/Shared/_MainLayoutPage.cshtml";
- }
- <style type="text/css">
- .datagrid-header-rownumber, .datagrid-cell-rownumber{
- width:60px;
- }
- </style>
- <div class="easyui-layout" data-options="fit:true,border:false">
- <div id="toolbar" style="padding:3px;">
- <label>
- <input type="radio" onchange = "change();" checked="checked" name="radio" value="" class="a-radio">
- <span class="b-radio"></span>全部
- </label>
- <label>
- <input type="radio" onchange = "change();" name="radio" id="2" value="完成" class="a-radio">
- <span class="b-radio"></span>完成
- </label>
- <label>
- <input type="radio" onchange = "change();" name="radio" id="3" value="未完成" class="a-radio">
- <span class="b-radio"></span>未完成
- </label>
- <div style="margin-left:20px;display:inline-block">
- <input class="easyui-combobox" id="Ring" data-options="label:'环节:',prompt:'请选择',panelHeight:200,labelAlign:'right'" style="width:260px;" />
- <input class="easyui-combobox" id="Channel" data-options="label:'渠道:',prompt:'请选择',limitToList:true,panelHeight:300,labelAlign:'right'" style="width:260px;" />
- </div>
- <div style="margin-left:20px;display:inline-block">
- <a id="btnSelect" href="#" class="easyui-linkbutton c1" style="margin-left:30px"><i class="fa fa-search"></i> 查询记录</a>
- <a id="btnRefresh" href="#" class="easyui-linkbutton c8" data-options="plain:true"><i class="fa fa-refresh"></i> 刷新</a>
- @*<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>*@
- </div>
- </div>
- <div data-options="region:'center',border:false">
- <table id="table">
- <thead>
- <tr>
- <th rowspan="2" field="编号" width="80" align="center" sortable="true">问题编号</th>
- <th rowspan="2" field="问题标题" width="300" halign="center" >问题标题</th>
- <th rowspan="2" field="当前环节1" width="100" align="center" >当前环节</th>
- <th rowspan="2" field="受理人" width="80" align="center" sortable="true">处理人</th>
- <th rowspan="2" field="登记人" width="80" align="center" >登记人</th>
- <th rowspan="2" field="登记日期" width="80" align="center" sortable="true">登记时间</th>
- <th rowspan="2" field="渠道" width="120" align="center" >反馈渠道</th>
- <th colspan="3" field="各环节耗时" align="center" >各环节耗时</th>
- <th rowspan="2" field="总耗时" width="100" align="center" sortable="true">总耗时(小时)</th>
- <th rowspan="2" field="滞留时间" width="120" align="center" sortable="true">滞留时间(小时)</th>
- </tr>
- <tr>
- <th field="项目处理1" width="80" align="center" sortable="true">项目处理</th>
- <th field="技术支持1" width="80" align="center" sortable="true">技术支持</th>
- <th field="研发处理1" width="80" align="center" sortable="true">研发处理</th>
- </tr>
- </thead>
- </table>
- </div>
- </div>
- <script type="text/javascript">
- var RYXZ='@ViewBag.RYXZ'
- $(function () {
- $("#table").datagrid({
- fit: true,
- width: '100%',
- toolbar: '#toolbar',
- pageSize: 20,
- pageList: [10, 20, 30, 40, 50, 1000],
- rownumbers: true,
- pagination: true,
- border: true,
- remoteSort: true,
- singleSelect: true, //单行选择
- loadMsg: "正在查询数据,请稍候...",
- url: '/Report/GetMonitoring',
- method: 'get',
- rowStyler: function (index, row) {
- if (row.是否终止 == 1) {
- return 'background-color:#ef6d6d;'; // rowStyle是一个已经定义了的ClassName(类名)
- }
- else if (row.是否解决 == 1) {
- return 'background-color:rgba(140, 243, 114, 0.95)'; // rowStyle是一个已经定义了的ClassName(类名)
- }
- },
- onDblClickRow: function (rowIndex, rowData) {
- checkproblem();
- }
- })
- //查询
- $("#btnSelect").bind('click', function () {
- $('#table').datagrid('load', {
- CurrentLink: $("#Ring").combobox('getValue'),
- Channel: $("#Channel").combobox('getValue'),
- State: $('input:radio:checked').val()
- });
- })
- //刷新
- $("#btnRefresh").bind('click', function () {
- $('#table').datagrid('reload');
- })
- //环节
- $("#Ring").combobox({
- url: '/Report/GetRing',
- valueField: 'ID',
- textField: '名称',
- })
- ///渠道
- $("#Channel").combobox({
- url: '/Report/GetChannel',
- valueField: 'ID',
- textField: '名称',
- })
- })
- function change() {
- $('#table').datagrid('load', {
- CurrentLink: $("#Ring").combobox('getValue'),
- Channel: $("#Channel").combobox('getValue'),
- State: $('input:radio:checked').val()
- });
- }
- //查看问题弹窗
- function checkproblem () {
- var that = this
- var WT = $('#table').datagrid("getSelected");
- if (WT == null) {
- top.ZLPMS.Msg("请选择一行数据!");
- }
- else {
- top.ZLPMS.OpenNewWindow("查看问题", "/Problem/CheckProblemWindow/" + WT["ID"], '880px', '600px', function () {
- that.DealProblem(0, 0, WT["ID"]);
- });
- }
- }
- //处理问题
- function DealProblem (showAtt, IsSupport, ProblemId) {
- var that = this
- //是否为技术支持处理
- IsSupport = IsSupport || 0;
- //受理问题
- var receiveProblem = function (title, HJID) {
- var index = top.ZLPMS.Loading3(2);
- //受理问题
- $.ajax({
- url: '/Support/ReceiveProblem',
- data: { id: ProblemId },
- method: 'post',
- success: function (data) {
- top.ZLPMS.UnLoading(index);
- var url = "/Problem/ProductionPdeal?id=" + ProblemId + "&showAtt=" + showAtt + '&workflowid=' + HJID + '&IsSupport=' + IsSupport;
- //成功后调用
- if (data.code == 200) {
- top.ZLPMS.OpenNewWindow("处理问题:" + title, url, '1000px', '640px', function () {
- //回调用刷新(只有确定后才刷新)
- $('#table').datagrid('reload');
- });
- } else {//显示具体原因,并提示是否强制处理
- top.ZLPMS.Confirm('该问题已被他人受理,您确定要继续处理吗?', 3, function (idx) {
- top.ZLPMS.CloseWindow(idx);
- top.ZLPMS.OpenNewWindow("处理问题", url, '1000px', '640px', function () {
- //回调用刷新(只有确定后才刷新)
- $('#table').datagrid('reload');
- });
- })
- }
- }
- });
- };
- $.post('/Problem/GetProblemById/' + ProblemId, function (data) {
- var row = data[0];
- if (row) {
- /*已关闭的问题,已解决的问题,已受理的问题, 不需要处理*/
- if (row.是否终止 == 1) {
- top.ZLPMS.Msg('已终止的问题不需要再处理!');
- return;
- }
- if (row.是否解决 == 1) {
- top.ZLPMS.Msg('已解决的问题不需要再处理!');
- return;
- }
- if (row.环节ID > 3 && that.RYXZ != '1') {
- top.ZLPMS.Msg('非本部人员不能处理技术支持与研发处理环节问题,仅能查阅!');
- return;
- }
- if (row.环节ID == 3 && (RYXZ == '3' || RYXZ == '4' || RYXZ == '5')) {//客户,机构管理员,卫计委人员无法处理项目问题
- top.ZLPMS.Msg('客户,机构管理员,卫计委人员无法处理项目问题,仅能查阅!');
- return;
- }
- //打开处理窗口
- receiveProblem(row.编号, row.环节ID);
- } else {//提醒用户没有选择问题记录
- top.ZLPMS.Msg('没有选择需要处理的问题记录,请选择后再处理!');
- }
- })
- }
- </script>
|