123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173 |
-
- @{
- ViewBag.Title = "ProductProblemWindow";
- Layout = "~/Views/Shared/_MainLayoutPage.cshtml";
- }
- <div class="easyui-layout" fit="true">
- <div data-options="region:'south',border:false" style="height:50px;text-align:right; padding:5px">
- <a href="#" id="btnClose" class="easyui-linkbutton c5">
- <i class="fa fa-power-off"></i>
- 关闭
- </a>
- </div>
- <div data-options="region:'center',border:false">
-
- <div class="btn_promb" id="btn_promb" style="border-top:0px">
- <input id="Product" data-options="prompt:'请选择产品'" class="easyui-combobox" style="width:200px">
- <input id="dtn-search-Problem" class="easyui-searchbox" data-options="prompt:'输入问题标题/编号',searcher:GetSearch" style="width:180px" />
- <a href="#" onclick="GetSearch()" id="btn_refresh" class="easyui-linkbutton c8" data-options="iconCls:'fa fa-refresh ',plain:true">刷新</a>
- </div>
- <table class="easyui-datagrid" id="VersionProblem"></table>
- </div>
- </div>
- <script>
- var PersonProperty='@ViewBag.PersonProperty'
- $(function () {
- //关闭窗口
- $('#btnClose').bind('click', function () {
- ZLPMS.CloseTopWindow(false);
- });
- $("#Product").combobox({
- url: '/Product/ProductInfoCombobox',
- valueField: 'ID',
- textField: '名称',
- editable: true,
- onChange: function () {
- GetSearch()
- }
- });
- //初始化版本问题列表
- $("#VersionProblem").datagrid({
- url: "/Problem/GetVersionProblem",
- method: 'Get',
- pagination: true,
- singleSelect: true,
- fit: true,
- rownumbers: true,
- toolbar: '#btn_promb',
- columns: [[
- { field: '编号', title: '编号', sortable: true, width: 60, align: 'center' },
- {
- field: '问题性质', title: '性质', width: 60, align: 'center', formatter: function (val, row, index) {
- switch (val) {
- case 1:
- return "<i class='fa fa-bug' title='Bug' style='color:red'>Bug</i>";
- case 2:
- return "<i class='fa fa-commenting-o' title='咨询'>咨询</i>";
- case 3:
- return "<i class='fa fa-dropbox' title='需求' style='color:#3279b6'>需求</i>";
- case 4:
- return "<i class='fa fa-history' title='任务'>任务</i>";
- default:
- break;
- }
- }
- },
- { field: '问题标题', title: '【问题标题】', width: 300, halign: 'center' },
- { field: '版本', title: '版本号', width: 150, align: 'center' },
- { field: '产品', title: '产品类型', width: 100, align: 'center' },
- { field: '模块', title: '产品模块', width: 100, align: 'center' },
- { field: '说明', title: '说明', width: 300, align: 'center' },
- { field: '登记人', title: '登记人', width: 60, align: 'center' },
- { field: '登记日期', title: '登记日期', sortable: true, width: 140, align: 'center' },
- { field: '受理人', title: '当前受理人', sortable: true, width: 60, align: 'center' },
- { field: '渠道', title: '分公司(渠道)', width: 100, align: 'center' },
- { field: '项目', title: '所在项目', width: 100, align: 'center' },
- { field: '机构', title: '医疗机构', width: 100, align: 'center' }
- ]],
- onDblClickRow: function (rowIndex, rowData) {
- checkproblem();
- }
- })
- })
- //查看问题弹窗
- function checkproblem () {
- var that = this
- var WT = $('#VersionProblem').datagrid("getSelected");
- if (WT == null) {
- top.ZLPMS.Msg("请选择一行数据!");
- }
- else {
- top.ZLPMS.OpenNewWindow("查看问题", "/Problem/CheckProblemWindow/" + WT["ID"], '880px', '600px', function () {
- DealProblem(1, 1, 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 () {
- //回调用刷新(只有确定后才刷新)
- });
- } else {//显示具体原因,并提示是否强制处理
- top.ZLPMS.Confirm('该问题已被他人受理,您确定要继续处理吗?', 3, function (idx) {
- top.ZLPMS.CloseWindow(idx);
- top.ZLPMS.OpenNewWindow("处理问题", url, '1000px', '640px');
- })
- }
- }
- });
- };
- $.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 && PersonProperty != '1') {
- top.ZLPMS.Msg('非本部人员不能处理技术支持与研发处理环节问题,仅能查阅!');
- return;
- }
- if (row.环节ID == 3 && (PersonProperty == '3' || PersonProperty == '4' || PersonProperty == '5')) {//客户,机构管理员,卫计委人员无法处理项目问题
- top.ZLPMS.Msg('客户,机构管理员,卫计委人员无法处理项目问题,仅能查阅!');
- return;
- }
- //打开处理窗口
- receiveProblem(row.编号, row.环节ID);
- } else {//提醒用户没有选择问题记录
- top.ZLPMS.Msg('没有选择需要处理的问题记录,请选择后再处理!');
- }
- })
- }
- function GetSearch() {
- $('#VersionProblem').datagrid("reload", { SearchText: $('#dtn-search-Problem').searchbox('getValue'), ProductId: $('#Product').combobox('getValue') })
- }
- </script>
|