1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504 |
- var problemlObj = {
- ProblemID: undefined,
- CPID: undefined,
- XMID: undefined,
- PersonProperty: undefined,
- Choose: undefined,
- Count: 0,
- Data: undefined
- }
- function viewModel(View) {
- var that = this;
- this.View = View || 'project';
- //当前默认的环节点
- var currentWorkFlowId = "";
- if (RYXZ == 1) { //中联本部人员(默认技术支持处理)
- currentWorkFlowId = 4;
- } else if (RYXZ == 2) { //中联渠道人员(默认查询项目处理问题)
- currentWorkFlowId = 3;
- } else if (RYXZ == 3) { //中联产品操作人员(默认显示机构处理)
- currentWorkFlowId = 1;
- } else if (RYXZ == 4) { //医院管理员(显示卫计委处理)
- currentWorkFlowId = 2;
- } else { //默认显示项目处理
- currentWorkFlowId = 3;
- }
- //初始化所有组件
- this.inits = function (val) {
- if (val != undefined) {
- currentWorkFlowId = val;
- } else {
- //currentWorkFlowId = 3;//加载项目人员问题
- currentWorkFlowId = false;
- }
- //获取相关的下拉列表控件值
- com.GetCom(currentWorkFlowId);
- var that = this;
- //绑定查询事件
- $('#btnSelect').bind('click', function () {
- var dg = $('#dgProblems');
- var params = com.GetQueryParams();
- params.insideProblem = that.View == 'product' ? true : false
- //重新加载数据
- dg.datagrid('load', params);
- });
- //清空查询条件
- $("#btnClear").bind('click', function () {
- $('#XMID').combobox("setValue", "");
- $('#CPID').combobox("setValues", []);
- $('#WTXZ').combobox("setValue", "");
- $('#JJDM').combobox("setValue", "");
- $('#BBID').combobox("setValue", "");
- $('#JJBB').combobox("setValue", "");
- $('#DDID').combobox("setValue", "");
- $('#JJBBZT').combobox("setValue", "");
- $('#JGID').combobox("setValue", "");
- $('#YFCLRID').combobox("setValue", "");
- $('#SLRID').combobox("setValue", "");
- $('#CSCLRID').combobox("setValue", "");
- $('#HJID').combobox("setValues", []);
- $('#DJR').textbox("setValue", "");
- $('#KsCx').textbox("setValue", "");
- $('#dbStartDate').datebox("setValue", "");
- $('#dbEndDate').datebox("setValue", "");
- $('#zzStartDate').datebox("setValue", "");
- $('#zzEndDate').datebox("setValue", "");
- $('#CPMKID').combobox("setValue", "");
- $('#ckclose').checkbox('uncheck');
- $('#terminissues').checkbox('uncheck');
- //重置是否选择解决版本radio
- var radio = document.getElementsByName("LX");
- for (var i = 0; i < radio.length; i++) {
- if (2 == radio[i].value) {
- $(radio[i]).next().click();
- }
- }
- //$('#myprob').checkbox('uncheck');
- //$('#myregist').checkbox('uncheck');
- //$('#myassign').checkbox('uncheck');
- //$('#myapply').checkbox('uncheck');
- });
- //刷新
- $('#btnRefresh').bind('click', function () {
- that.Refresh();
- });
- //监听查询文本的回车键,如果有回车就查询
- $('#KsCx').textbox('textbox').keydown(function (e) {
- if (e.keyCode == 13) {
- that.Refresh();
- }
- });
- }
- //初始化datagrid
- this.initdatagrid = function (val, ModuleType) {
- if (val) {
- currentflowId = [val];
- } else {
- currentflowId = [];
- }
- var showReceiveProblem = false;
- //仅已受理的问题
- if ($('#ckRecevie').length > 0) {
- showReceiveProblem = $('#ckRecevie').checkbox('options').checked;
- }
- //仅显示我的问题(我处理的)
- var myProblem = $('#myprob').checkbox('options').checked;
- //与我相关选项
- var myProblemCombox = "";
- if ($('#myregist').checkbox('options').checked) {
- myProblemCombox += '1,'
- }
- if ($('#myassign').checkbox('options').checked) {
- myProblemCombox += '4,'
- }
- if ($('#myapply').checkbox('options').checked) {
- myProblemCombox += '5,'
- }
- //先读取的默认关注产品和模块
- $.post("/Problem/GetMyConfigAll", function (data) {
- var priductid = ""
- var productModuleId = ""
- if (data != null) {
- priductid = data.ProductID
- productModuleId = data.ModuleID
- }
-
- var dg = $('#dgProblems');
- var dgColoum = [{
- 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>"; break;
- case 2:
- return "<i class='fa fa-commenting-o' title='咨询'>咨询</i>"; break;
- case 3:
- return "<i class='fa fa-dropbox' title='需求' style='color:#3279b6'>需求</i>"; break;
- case 4:
- return "<i class='fa fa-history' title='优化'>优化</i>"; break;
- case 5:
- return "<i class='fa fa-history' title='环境'>环境</i>"; break;
- case 6:
- return "<i class='fa fa-history' title='接口'>接口</i>"; break;
- }
- }
- },
- {
- field: '产品',
- title: '产品类型',
- width: 100,
- align: 'center'
- },
- {
- field: '问题标题',
- title: '【问题标题】',
- width: 300,
- halign: 'center',
- formatter: function (val, row, index) {
- val = "<lable class='easyui-tooltip' title='" + val + "'>" + val + "</lable>";
- if (row.附件数量 > 0) {
- return "<i class='fa fa-paperclip' title='包含有:" + row.附件数量 + "个附件' style='color:Blue'></i> " + val;
- } else {
- return " " + val;
- }
- }
- },
- {
- field: '模块',
- title: '模块',
- width: 100,
- align: 'center'
- },
- {
- field: '登记人',
- title: '登记人',
- width: 60,
- align: 'center'
- },
- {
- field: '受理人',
- title: '受理人',
- sortable: true,
- width: 60,
- align: 'center'
- },
- {
- field: '联系电话',
- title: '联系电话',
- width: 90,
- align: 'center'
- },
- {
- field: '登记日期',
- title: '登记日期',
- sortable: true,
- width: 140,
- align: 'center'
- },
-
- {
- field: '滞留时间',
- title: '滞留时间',
- sortable: true,
- width: 80,
- formatter: function (val, row, index) {
- var rd = val % 24;
- if (val >= 24) {
- return parseInt(val / 24) + '天' + rd.toFixed(1) + '时';
- } else {
- return rd + '小时';
- }
- }
- },
- {
- field: '版本号',
- title: '版本号',
- width: 120,
- align: 'center'
- },
- {
- field: '解决版本',
- title: '解决版本',
- width: 120,
- align: 'center'
- },
-
- {
- field: '解决版本状态',
- title: '解决版本状态',
- sortable: true,
- width: 100,
- align: 'center',
- formatter: function (val, row, index) {
- if (row.解决版本状态 == 1) {
- return '登记';
- }
- if (row.解决版本状态 == 2) {
- return '修改'
- }
- if (row.解决版本状态 == 3) {
- return '测试';
- }
- if (row.解决版本状态 == 4) {
- return '待发布';
- }
- if (row.解决版本状态 == 5) {
- return '终止';
- }
- if (row.解决版本状态 == 6) {
- return '已发布';
- }
- }
- },
- {
- field: '研发处理人',
- title: '研发处理人',
- sortable: true,
- width: 100,
- align: 'center'
- }, {
- field: '测试处理人',
- title: '测试处理人',
- sortable: true,
- width: 100,
- align: 'center'
- },
- {
- field: '当前环节',
- title: '当前环节',
- sortable: true,
- width: 90,
- halign: 'center'
- },
- {
- field: '项目',
- title: '项目',
- width: 100,
- align: 'center'
- },
- {
- field: '机构',
- title: '医疗机构',
- width: 100,
- align: 'center'
- },
- {
- field: '反馈人',
- title: '反馈人',
- width: 60,
- align: 'center'
- },
- {
- field: '受理时间',
- title: '受理时间',
- sortable: true,
- width: 150,
- align: 'center'
- },
- {
- field: '指派人',
- title: '被指派人',
- sortable: true,
- width: 60,
- align: 'center'
- },
- {
- field: '指派时间',
- title: '指派时间',
- sortable: true,
- width: 150,
- align: 'center'
- },
- {
- field: '渠道',
- title: '分公司(渠道)',
- width: 100,
- align: 'center'
- },
-
-
- {
- field: '总耗时',
- title: '已耗小时',
- sortable: true,
- width: 80,
- formatter: function (val, row, index) {
- var rd = val % 24;
- if (val >= 24) {
- return parseInt(val / 24) + '天' + rd.toFixed(1) + '时';
- } else {
- return rd + '小时';
- }
- }
- },
- {
- field: '技术支持分类',
- title: '技术支持分类',
- sortable: true,
- width: 120,
- align: 'center'
- },
- { field: '紧急补丁时间', title: '紧急补丁时间', sortable: true, width: 90, align: 'center' },
- ];
- //如果为项目模块
- if (ModuleType == 1) {
- var addcoloum1 = {
- field: '是否验证',
- title: '是否验收',
- width: 70,
- halign: 'center',
- sortable: true,
- align: 'center',
- formatter: function (val, row, index) {
- if (val == 1) {
- return "是(" + row.验证人姓名 + ")";
- } else {
- return "否";
- }
- }
- };
- var addcoloum2 = {
- field: '问题分类',
- title: '问题分类',
- width: 70,
- halign: 'center',
- align: 'center'
- }
- dgColoum.splice(4, 0, addcoloum1)
- dgColoum.splice(5, 0, addcoloum2)
- }
- //如果为当前流程环节为技术支持
- else if (ModuleType == 4) {
- var addcoloum1 = {
- field: '最后提交人',
- title: '最后提交人',
- width: 90,
- halign: 'center',
- sortable: true,
- align: 'center',
- };
- dgColoum.splice(7, 0, addcoloum1)
- }
- dg.datagrid({
- fit: true,
- width: '100%',
- toolbar: '#toolbar',
- pageSize: 20,
- pageList: [10, 20, 30, 40, 50, 1000],
- rownumbers: true,
- pagination: true,
- border: false,
- checkbox: true,
- checkOnSelect: false,
- remoteSort: true,
- singleSelect: true, //单行选择
- loadMsg: "正在查询数据,请稍候...",
- url: '/Problem/QueryProblems',
- method: 'post',
- queryParams:
- {
- workflowNode: currentflowId,
- showReceiveProblem: showReceiveProblem,
- myProblem: myProblem,
- myProblemCombox: myProblemCombox,
- productId: priductid,
- productModuleId: productModuleId,
- insideProblem: that.View == 'product' ? true : false
- },
- frozenColumns: [
- [{
- field: '状态',
- title: '状态',
- width: 50,
- align: 'center',
- formatter: function (val, row, index) {
- var imgtext = "";
- //if (row.是否终止 == 1 || row.是否解决 == 1) {
- // imgtext += "<a href='#' onclick=\"UndoProblem('" + row.ID + "')\"><i class='fa fa-undo' title='回退' style='color:red'></i></a> ";
- //}
- if (row.重复次数 != 0) {
- imgtext += "<a href='#' style='color:green' title='重复" + row.重复次数 + "次'><i class='fa fa-window-restore' aria-hidden='true'></i></a> ";
- }
- if (row.关联编号 != null) {
- // imgtext += "<i class='fa fa-cube' aria-hidden='true'></i> ";
- imgtext += "<a href='#' style='color:green' title='源版本问题编号:" + row.关联编号 + "'>子版</a> ";
- } else if (row.关联数量 != null && row.关联数量 > 0) {
- // imgtext += "<a href='#' style='color:green' title='共有'" + row.关联数量 + "个子版本'>源版</a> ";
- imgtext += "<a href='#' style='color:green' title='共有" + row.关联数量 + "个子版本' onclick='ShowConnect("" + row.ID + "")'>源版</a> ";
- }
- if (row.是否回退 == 1) {
- imgtext += "<i class='fa fa-rotate-left' title='回退'></i> ";
- }
- if (row.紧急代码 == 2) {
- imgtext += "<i class='fa fa-warning' title='优先级:中' style='color:green'></i> ";
- } else if (row.紧急代码 == 3) {
- imgtext += "<i class='fa fa-warning' title='优先级:高' style='color:blue'></i> ";
- } else if (row.紧急代码 == 4) {
- imgtext += "<i class='fa fa-warning' title='优先级:非常紧急' style='color:red'></i> ";
- }
- //显示问题类型(1:项目问题,2:产品问题)
- if (row.问题类型 == 2) {
- imgtext += "<i class='fa fa-star' title='产品问题' style='color:Red'></i> ";
- }
- //显示完成/终止的问题
- if (row.是否终止 == 1) {
- imgtext += "<i class='fa fa-ban' style='color:red' title='终止的问题'></i> ";
- } else if (row.是否解决 == 1) {
- imgtext += "<i class='fa fa-check' style='color:green' title='已完成的问题'></i> ";
- }
- //记录维保过期问题
- if (row.应用状态 != 1) {
- imgtext += "<i class='fa fa-hourglass-o' title='维保过期' style='color:Red'></i> ";
- }
- return imgtext;
- }
- }, //状态包括:是否解决,紧急,终止
- {
- field: '编号',
- title: '编号',
- sortable: true,
- width: 60,
- align: 'center'
- }
- ]
- ],
- columns: [dgColoum],
- onSelect: function (rowIndex, rowData) {
- if (rowData.应用状态 != 1) {
- $('#btnDeal').linkbutton({ disabled: true });
- var tips="未维护"
- if (rowData.服务结束时间 != null) {
- tips = rowData.服务结束时间;
- }
- $('#btnDeal').tooltip({
- position: 'top',
- content: "当前客户已脱保,脱保日期:" + tips
- });
- }
- else {
- $('#btnDeal').linkbutton({ disabled: false });
- $('#btnDeal').tooltip({
- position: 'top',
- content:""
- });
-
- }
-
- //选择一行记录,加载对应的处理过程与沟通信息
- com.GetMainProcess(rowData["ID"]);
- com.DealProcess(rowData["ID"]);
- com.getResourceData(rowData["ID"]);
- var item1 = $('#MoreItem').menu('getItem', $('#btn_acceptance')[0]);
- var item2 = $('#MoreItem').menu('getItem', $('#btn_repeal')[0]);
- if (rowData.是否解决 == 0 && rowData.是否终止 == 0) {
- $('#MoreItem').menu('disableItem', item1.target);
- $('#MoreItem').menu('disableItem', item2.target);
- } else {
- $('#MoreItem').menu('enableItem', item1.target);
- $('#MoreItem').menu('enableItem', item2.target);
- }
- if (rowData.是否验证 == 1) {
- $('#MoreItem').menu('disableItem', item1.target);
- }
- },
- rowStyler: function (index, row) {
- if (row.是否终止 == 1) {
- return 'background-color:#ff9292;'; // rowStyle是一个已经定义了的ClassName(类名)
- } else if (row.是否解决 == 1) {
- return 'background-color:#a3ffa3;'; // rowStyle是一个已经定义了的ClassName(类名)
- } else if (row.是否回退 == 1) {
- return 'background-color:rgba(0, 150, 136, 0.73)'; // rowStyle是一个已经定义了的ClassName(类名)
- }
- },
- onDblClickRow: function (rowIndex, rowData) {
- sessionStorage.setItem("WTID", rowData.ID);
- checkproblem();
- },
- onClickRow: function (index, rowData) {
- sessionStorage.setItem("WTID", rowData.ID);
- $(".dot .menu-icon").removeClass("fa fa-dot-circle-o color_blue")
- $(".dot .menu-icon").addClass("fa fa-circle-o color_blue")
- $(".dot" + rowData.解决版本状态 + " .menu-icon").addClass("fa fa-dot-circle-o color_blue")
- }
- });
- })
- }
-
- //刷新(技术支持)
- this.Refresh = function () {
- var dg = $('#dgProblems');
- //获取查询参数
- var params = com.GetQueryParams();
- params.insideProblem = that.View == 'product' ? true : false
- //重新加载
- dg.datagrid('reload', params);
- }
- }
- //技术支持列表页面
- function superViewModel() {
- this.type = '';
- //初始化没有支持的问题列表
- this.initNotSuperGrid = function (type) {
- this.type = type;
- var dg = $('#dgnoSuperList');
- dg.datagrid({
- singleSelect: true,
- fit: true,
- border: false,
- striped: true,
- remoteSort: false,
- toolbar: '#noSuperToolbar',
- rownumbers: true,
- pagination: true,
- pageSize: 20,
- loadMsg: "正在查询数据,请稍候...",
- method: 'post',
- url: '/Support/GetNeedProcessList?type=' + type,
- columns: [
- [{
- field: '紧急代码',
- title: '状态',
- width: 50,
- align: 'center',
- formatter: function (val, row, index) {
- var prop = row.问题性质;
- var imgtext = "";
- switch (prop) {
- case 1:
- imgtext = "<i class='fa fa-bug' title='Bug' style='color:red'></i>";
- break;
- case 2:
- imgtext = "<i class='fa fa-commenting-o' title='咨询'></i>";
- break;
- case 3:
- imgtext = "<i class='fa fa-dropbox' title='需求' style='color:#3279b6'></i>";
- break;
- case 4:
- imgtext = "<i class='fa fa-history' title='任务'></i>";
- break;
- }
- //显示优先级
- if (row.紧急代码 == 2) {
- imgtext += "<i class='fa fa-warning' title='中' style='color:green'></i> ";
- } else if (row.紧急代码 == 3) {
- imgtext += "<i class='fa fa-warning' title='高' style='color:blue'></i> ";
- } else if (row.紧急代码 == 4) {
- imgtext += "<i class='fa fa-warning' title='非常紧急' style='color:red'></i> ";
- }
- //显示处理操作按钮
- imgtext += "<a href='#' onclick=\"ReceiveProblem('" + row.ID + "\',true)\"> <i class='fa fa-flash' title='点击开始受理问题' style='color:#4325bc;font-size:16px'></i></a>";
- return imgtext;
- }
- },
- {
- field: '问题标题',
- title: '问题标题',
- sortable: true,
- width: 250,
- formatter: function (val, row, index) {
- val = "<a href='#' onclick=\"viewProblem('" + row.ID + "')\" class='node' title='" + val + "'>" + val + "</a>";
- if (row.附件数量 > 0) {
- return "<i class='fa fa-paperclip' title='包含有:" + row.附件数量 + "个附件' style='color:Blue'></i> " + val;
- } else {
- return " " + val;
- }
- }
- },
- {
- field: '编号',
- title: '编号',
- sortable: true,
- width: 60,
- align: 'center'
- },
- {
- field: '渠道',
- title: '来源渠道',
- sortable: true,
- width: 100,
- align: 'center'
- },
- {
- field: '产品',
- title: '来源产品',
- sortable: true,
- width: 80,
- align: 'center'
- },
- {
- field: '反馈人',
- title: '反馈人',
- sortable: true,
- width: 60,
- align: 'center'
- },
- {
- field: '登记人',
- title: '登记人',
- sortable: true,
- width: 60,
- align: 'center'
- },
- {
- field: '登记日期',
- title: '登记日期',
- sortable: true,
- width: 160,
- align: 'center'
- }
- ]
- ],
- onSelect: function (rowIndex, rowData) {
- //选择一行记录,加载对应的处理过程与沟通信息
- com.GetMainProcess(rowData["ID"]);
- com.DealProcess(rowData["ID"]);
- }
- });
- //设置分页信息总分近钮不可见
- var pager = dg.datagrid().datagrid('getPager');
- pager.pagination({
- layout: ['sep', 'first', 'prev', 'next', 'last', 'info'],
- displayMsg: '共:{total}项'
- });
- }
- //初始化绑定按钮事件
- this.inits = function (pid, mid) {
- var that = this;
- //绑定受理问题按钮
- $('#btnProcess').bind('click', function () {
- FastReceiveProblem(null);
- });
- //刷新未处理的问题
- $('#btnRefreshProcess').bind('click', function () {
- com.RefreshNoProcessList();
- });
- //根据产品过滤问题
- var productid = "";
- $('#ccProduct').combobox({
- onChange(newValue, oldValue) {
- var dg = $('#dgnoSuperList');
- productid = newValue.join(",");
- dg.datagrid('load', {
- productid: newValue.join(","),
- productModuleId: productModuleId,
- type: that.type
- });
- $('#CPID').combobox('setValues', newValue);
- $('#btnRefresh').trigger('click');
- },
- onLoadSuccess: function (row, data) {
- if (pid != '') { //设置为我的关注模块
- $('#ccProduct').combobox('setValues', [pid]);
- }
- }
- });
- //根据产品模块过滤问题
- var productModuleId = "";
- $('#ccProductModule').combobox({
- onChange(newValue, oldValue) {
- productModuleId = newValue.join(",");
- var dg = $('#dgnoSuperList');
- dg.datagrid('load', {
- productid: productid,
- productModuleId: newValue.join(","),
- type: that.type
- });
- $('#CPMKID').combobox('setValues', newValue);
- $('#btnRefresh').trigger('click');
- },
- onLoadSuccess: function (row, data) {
- if (mid != '') { //设置为我的关注模块
- $('#ccProductModule').combobox('setValues', [mid]);
- }
- }
- });
- }
- }
- //共公处理方法
- var com = {
- //加载问题处理过程
- DealProcess: function (ID) {
- var url = "/Problem/GetClc?ID=" + ID;
- $.post(url, {}, function (data) {
- $("#timeLine").empty();
- $.each(data, function (idx, json) {
- if (json != undefined) {
- var attfile = "";
- if (json.附件 != undefined) {
- attfile = "<i class='fa fa-paperclip' style='color:blue' title='包含过程附件'></i>";
- }
- json.描述 = json.描述 != undefined ? json.描述 : "无";
- if (json.描述 != "无") {
- var arrEntities = {
- 'lt': '<',
- 'gt': '>',
- 'nbsp': ' ',
- 'amp': '&',
- 'quot': '"'
- };
- json.描述 = json.描述.replace(/<[^>]+>/g, "").replace(/&(lt|gt|nbsp|amp|quot);/ig, function (all, t) {
- return arrEntities[t]
- });
- if (json.描述.length == 0) {
- json.描述 = "内有图片,点击该过程即可查看";
- }
- }
- if (json.描述.length > 25) {
- json.描述 = json.描述.substring(0, 25) + "...";
- }
- var html = "<li onclick='viewProcess(\"" + json.ID + "\")' class='layui-timeline-item timelineDetail'><i class='layui-icon layui-timeline-axis'></i><div class='layui-timeline-content layui-text'><h3 class='layui-timeline-title'><a href='#' >" + json.处理状态 + "</a> " + attfile + "</h3><p>" + json.处理人员 + "(" + json.职务 + ")<br>" + json.记录时间 + (json.耗时 != undefined ? "(" + json.耗时 + ")小时" : "") + "<br>" + "描述:" + (json.描述) + "</p></div></li>";
- $("#timeLine").append(html);
- }
- });
- });
- },
- //获取问题过程主流程
- GetMainProcess: function (ID) {
- var url = "/Problem/GetMainProcess/" + ID;
- $.post(url, {}, function (data) {
- $("#timeLineMain").empty();
- data = data.reverse();
- $.each(data, function (idx, json) {
- if (json) {
- var attfile = "";
- json.LinkDeatil = json.LinkDeatil ? "描述:" + json.LinkDeatil : "";
- if (json.LinkDeatil) {
- var arrEntities = {
- 'lt': '<',
- 'gt': '>',
- 'nbsp': ' ',
- 'amp': '&',
- 'quot': '"'
- };
- json.LinkDeatil = json.LinkDeatil.replace(/<[^>]+>/g, "").replace(/&(lt|gt|nbsp|amp|quot);/ig, function (all, t) {
- return arrEntities[t]
- });
- if (json.LinkDeatil.length == 0) {
- json.LinkDeatil = "内有图片,点击该过程即可查看";
- }
- if (json.LinkDeatil.length > 25) {
- json.LinkDeatil = json.LinkDeatil.substring(0, 25) + "...";
- }
- }
- var detail = "";
- if (json.LinkUserName) {
- detail = "<p>" + (json.LinkUserName ? json.LinkUserName + '(' + json.job + ')' : '') + "<br>" + (json.LinkTime ? json.LinkTime : '') + "<br>" + (json.LinkDeatil) + "</p>";
- }
- //图标转换
- var Icon = "";
- switch (json.StatusID) {
- case 1:
- Icon = "";
- break;
- case 3:
- Icon = "ဇ";
- break;
- case 7:
- Icon = "စ";
- break;
- case 11:
- Icon = "";
- break;
- default:
- Icon = "";
- break;
- }
- var html = "<li onclick='viewProcess(\"" + (json.ProcessId ? json.ProcessId : '') + "\")' class='layui-timeline-item timelineDetail'><i class='layui-icon layui-timeline-axis'>" + Icon + "</i><div class='layui-timeline-content layui-text'><h3 class='layui-timeline-title'><a href='#' >" + json.LinkName + "</a></h3>" + detail + "</div></li>";
- $("#timeLineMain").append(html);
- }
- });
- });
- },
- ///获取流程图标 0 登记新问题 1 机构处理 2 卫计委处理 3 项目处理 4 技术支持处理 5 研发处理 6 测试处理
- FindIcon: function (title) {
- if (title == "登记新问题") {
- return "<i class='layui-icon layui-icon-fire' style='font-size: 20px; color: #1E9FFF;margin-right:5px'></i>";
- } else if (title == "机构处理") {
- return "<i class='layui-icon layui-icon-release' style='font-size: 20px; color: #1E9FFF;margin-right:5px'></i>";
- } else if (title == "卫计委处理") {
- return "<i class='layui-icon layui-icon-loading' style='font-size: 20px; color: #1E9FFF;margin-right:5px'></i>";
- } else if (title == "项目处理") {
- return "<i class='layui-icon layui-icon-ok-circle' style='font-size: 20px; color: #cc9910;margin-right:5px'></i>";
- } else if (title == "技术支持处理") {
- return "<i class='layui-icon layui-icon-loading' style='font-size: 20px; color: #1E9FFF;margin-right:5px'></i>";
- } else if (title == "研发处理") {
- return "<i class='layui-icon layui-icon-ok-circle' style='font-size: 20px; color: #cc9910;margin-right:5px'></i>";
- } else if (title == "测试处理") {
- return "<i class='layui-icon layui-icon-ok-circle' style='font-size: 20px; color: #cc9910;margin-right:5px'></i>";
- } else if (title == "完成") {
- return "<i class='layui-icon layui-icon-top' style='font-size: 20px; color: #cc9910;margin-right:5px'></i>";
- } else {
- return '';
- }
- },
- //给查询条件赋值
- GetCom: function (currentWorkFlowId) {
- //从Cookie中获取默认选择项
- var Mycheck_PC = JSON.parse(getCookie("Mycheck_PC")) || {};
- //项目
- $("#XMID").combobox({
- url: '/Problem/GetProjectByInfo',
- valueField: 'ID',
- textField: '名称',
- onChange: function (newValue, oldValue) {
- if (newValue.length == 36) {
- //项目所属的机构
- $("#JGID").combobox({
- url: '/Problem/GetStationByID/' + newValue,
- valueField: 'ID',
- textField: '名称',
- onLoadSuccess: function (data) {
-
- }
- })
- }
- }
- })
- $("#CPID").combobox({
- url: '/Product/GetAllProducts',
- valueField: "ID",
- textField: "名称",
- multiple: true,
- onChange: function (cur, old) {
- //只选择一个产品触发
- if (cur.length == 1) {
- //登记版本
- $("#BBID").combobox({
- url: '/Problem/GetVersionById?id=' + cur[0] + "&type=0",
- valueField: '版本号',
- textField: '版本号'
- });
- //解决版本
- $("#JJBB").combobox({
- url: '/Problem/GetVersionById?id=' + cur[0] + "&type=0",
- valueField: '版本号',
- textField: '版本号'
- });
- }
- }
- });
- $("#CPMKID").combobox({
- url: '/Problem/GetAllModual',
- valueField: "ID",
- textField: "名称",
- multiple: true,
- });
- $("#WTXZ").combobox({
- url: '/Problem/XZinfo',
- valueField: "ID",
- textField: "问题性质"
- });
- $("#JJBBZT").combobox({
- url: "/Problem/GetBaseCode?type=35DB8B88-36B5-49FE-A879-D49DB88BC03B",
- valueField: "代码",
- textField: "显示名"
- });
- //研发处理人
- $("#YFCLRID").combobox({
- url: "/Problem/GetUserInfoByChannelId",
- valueField: 'ID',
- textField: '姓名'
- })
- $("#SLRID").combobox({
- url: "/Problem/GetFKR",
- valueField: 'ID',
- textField: '姓名'
- })
- //测试处理人
- $("#CSCLRID").combobox({
- url: "/Problem/GetUserInfoByChannelId",
- valueField: 'ID',
- textField: '姓名'
- })
- $("#JJDM").combobox({
- url: '/Problem/JJCDinfo',
- valueField: "ID",
- textField: "紧急程度"
- });
- $("#HJID").combobox({
- url: '/Problem/LCHJ',
- valueField: "ID",
- textField: "流程环节",
- multiple: true,
- onBeforeLoad: function () {
- if (currentWorkFlowId)
- $(this).combobox('setValues', [currentWorkFlowId]);
- }
- });
- $("#FaCx").combobox({
- url: '/Problem/FanSelect',
- valueField: "ID",
- textField: "方案名"
- })
- //迭代
- $('#DDID').combobox({
- url: '/Problem/GetLterationList',
- valueField: 'ID',
- textField: '名称',
- });
- $('#myprob').checkbox({
- checked: Mycheck_PC.myprob || false,
- onChange(checked) {
- Mycheck_PC.myprob = checked;
- setCookie("Mycheck_PC", JSON.stringify(Mycheck_PC), 2)
- $('#btnSelect').click();
- }
- });
- $('#myregist').checkbox({
- checked: Mycheck_PC.myregist || false,
- onChange(checked) {
- Mycheck_PC.myregist = checked;
- setCookie("Mycheck_PC", JSON.stringify(Mycheck_PC), 2)
- $('#btnSelect').click();
- }
- });
- $('#myassign').checkbox({
- checked: Mycheck_PC.myassign || false,
- onChange(checked) {
- Mycheck_PC.myassign = checked;
- setCookie("Mycheck_PC", JSON.stringify(Mycheck_PC), 2)
- $('#btnSelect').click();
- }
- });
- $('#myapply').checkbox({
- checked: Mycheck_PC.myapply || false,
- onChange(checked) {
- Mycheck_PC.myapply = checked;
- setCookie("Mycheck_PC", JSON.stringify(Mycheck_PC), 2)
- $('#btnSelect').click();
- }
- });
- },
- //获取当前界面的查询条件
- GetQueryParams: function () {
- var data = {};
-
- //项目ID
- var projectid = $('#XMID').combobox('getValue');
- data.projectId = projectid;
- //机构id
- var orgId = $('#JGID').combobox('getValue');
- data.orgId = orgId;
- //产品id
- var pid = $('#CPID').combobox('getValues').join(",");
- data.productId = pid;
- //产品模块id
- var pmid = $('#CPMKID').combobox('getValues').join(",");
- data.productModuleId = pmid;
- //问题性质
- var property = $('#WTXZ').combobox('getValue');
- data.property = property;
- //紧急程度
- var priority = $('#JJDM').combobox('getValue');
- data.priority = priority;
- //流程环节
- var workflowNode = $('#HJID').combobox('getValues').join(",");
- data.workflowNode = workflowNode;
- //解决版本状态
- data.JJBBZT = $('#JJBBZT').combobox('getValues').join(",");
- //研发处理人id
- data.YFCLRID = $('#YFCLRID').combobox('getValues').join(",");
- //受理人id
- data.SLRID = $('#SLRID').combobox('getValues').join(",");
- //测试处理人id
- data.CSCLRID = $('#CSCLRID').combobox('getValues').join(",");
- //登记人
- var RegistPerson = $('#DJR').textbox('getValue');
- data.RegistPerson = RegistPerson;
- //查询信息(根据问题编号与标题查询)
- var queryText = $('#KsCx').textbox('getValue');
- data.queryText = queryText;
- //快速检索是否包含查询条件
- var IncludeSearchContent = $('#IncludeSearchContent').checkbox('options').checked;
- data.IncludeSearchContent = IncludeSearchContent;
- //仅显示我的问题(我处理的)
- var myProblem = $('#myprob').checkbox('options').checked;
- data.myProblem = myProblem;
- //与我相关选项
- var mySelect = "";
- if ($('#myregist').checkbox('options').checked) {
- mySelect += '1,'
- }
- if ($('#myassign').checkbox('options').checked) {
- mySelect += '4,'
- }
- if ($('#myapply').checkbox('options').checked) {
- mySelect += '5,'
- }
- data.myProblemCombox = mySelect;
- //仅已受理的问题
- if ($('#ckRecevie').length > 0) {
- var showReceiveProblem = $('#ckRecevie').checkbox('options').checked;
- data.showReceiveProblem = showReceiveProblem;
- }
- //是否显示已关闭的问题
- var showCloseProblem = $('#ckclose').checkbox('options').checked;
- data.showCloseProblem = showCloseProblem;
- //只显示终止的问题
- if ($('#terminissues').length > 0) {
- var showTerminIssues = $('#terminissues').checkbox('options').checked;
- data.showTerminIssues = showTerminIssues;
- }
- //获取查询日期
- var startDate = $('#dbStartDate').datebox('getValue');
- data.startDate = startDate;
- //获取查询结束日期
- var endDate = $('#dbEndDate').datebox('getValue');
- data.endDate = endDate;
- //获取终止/解决查询日期
- var zzstartDate = $('#zzStartDate').datebox('getValue');
- data.zzstartDate = zzstartDate;
- //获取终止/解决查询结束日期
- var zzendDate = $('#zzEndDate').datebox('getValue');
- data.zzendDate = zzendDate;
- //迭代任务
- data.lteration = $('#DDID').combobox('getValue');
- //产品登记版本
- data.version = $('#BBID').combobox('getValue');
- //产品解决版本
- data.solutionversion = $('#JJBB').combobox('getValue');
- //是否指定解决版本
- data.whether = $('input[name="LX"]:checked').val();
- return data;
- },
- //刷新未处理的问题
- RefreshNoProcessList: function () {
- //刷新待处理列表
- $('#dgnoSuperList').datagrid('reload');
- //刷新已处理列表
- $('#dgProblems').datagrid('reload');
- },
- //刷新已处理列表
- RefreshOnDeal: function () {
- //刷新已处理列表
- $('#dgProblems').datagrid('reload');
- },
- ///刷新待处理列表
- RefreshNoDeal: function () {
- $('#dgnoSuperList').datagrid('reload');
- },
- //加载资源信息
- getResourceData: function (ID) {
- $('#resource').datagrid({
- toolbar: '#btn_func',
- singleSelect: true,
- url: '/Problem/ResourceData?proid=' +ID,
- fit: true,
- columns: [
- [{
- field: 'DECODE类型',
- title: '类型',
- width: 70
- },
- {
- field: '内容',
- width: 116,
- title: '内容',
- minWdith: 116
- },
- {
- field: '资源ID',
- title: '资源ID',
- width: 120,
- minWdith: 120
- },
- {
- field: '添加时间',
- title: '添加时间',
- width: 142,
- }
- ]
- ]
- })
- }
-
- }
- //关闭窗体
- function Close() {
- ZLPMS.CloseTopWindow(true)
- }
- //导出Excel
- function GetExcel(type) {
- //var data = $('#dgProblems').datagrid('getData');
- var params = com.GetQueryParams();
- params.type = type == 3 ? type : 0;
- params.page = 0;
- params.rows = 0;
- var location = top.ZLPMS.Loading("导出中,请稍等...");
- $.post("/Problem/QueryProblems", params, function (data) {
- top.ZLPMS.UnLoading(location);
- var jsonData = data.rows;
- //删除ID
- if (type == 1) {
- for (var t in jsonData) {
- delete jsonData[t].ID;
- delete jsonData[t].ROWNO;
- delete jsonData[t].受理人ID;
- delete jsonData[t].环节ID;
- delete jsonData[t].受理人ID;
- delete jsonData[t].问题类型;
- /* delete jsonData[t].问题性质;*/
- switch (jsonData[t].问题性质) {
- case 1:
- jsonData[t].问题性质 = "缺陷"
- break
- case 2:
- jsonData[t].问题性质 = "咨询"
- break
- case 3:
- jsonData[t].问题性质 = "需求"
- break
- case 4:
- jsonData[t].问题性质 = "优化"
- break
- case 5:
- jsonData[t].问题性质 = "环境"
- break
- case 6:
- jsonData[t].问题性质 = "接口"
- break
- }
- }
- } else {
- for (var t in jsonData) {
- delete jsonData[t].ID;
- delete jsonData[t].ROWNO;
- delete jsonData[t].受理人ID;
- delete jsonData[t].环节ID;
- delete jsonData[t].受理人ID;
- delete jsonData[t].问题类型;
- /* delete jsonData[t].问题性质;*/
- switch (jsonData[t].问题性质) {
- case 1:
- jsonData[t].问题性质 = "缺陷"
- break
- case 2:
- jsonData[t].问题性质 = "咨询"
- break
- case 3:
- jsonData[t].问题性质 = "需求"
- break
- case 4:
- jsonData[t].问题性质 = "优化"
- break
- case 5:
- jsonData[t].问题性质 = "环境"
- break
- case 6:
- jsonData[t].问题性质 ="接口"
- break
- }
- switch (jsonData[t].解决版本状态) {
- case 1:
- jsonData[t].解决版本状态 = "登记"
- break
- case 2:
- jsonData[t].解决版本状态 = "修改"
- break
- case 3:
- jsonData[t].解决版本状态 = "测试"
- break
- case 4:
- jsonData[t].解决版本状态 = "待发布"
- break
- case 5:
- jsonData[t].解决版本状态 = "终止"
- break
- case 6:
- jsonData[t].解决版本状态 = "已发布"
- break
- }
- jsonData[t].是否终止 = jsonData[t].是否终止 == 1 ? '是' : '否';
- jsonData[t].是否验证 = jsonData[t].是否验证 == 1 ? '是' : '否';
- jsonData[t].是否解决 = jsonData[t].是否解决 == 1 ? '是' : '否';
- jsonData[t].是否受理 = jsonData[t].是否受理 == 1 ? '是' : '否';
- jsonData[t].是否回退 = jsonData[t].是否回退 == 1 ? '是' : '否';
- jsonData[t].是否回退 = jsonData[t].是否回退 == 1 ? '是' : '否';
- }
- }
- //获取标题
- var name = '<tr>';
- for (let Title in jsonData[0]) {
- //增加\t为了不让表格显示科学计数法或者其他格式
- name += `<td>${Title}</td>`;
- }
- name += '</tr>';
- let str = '';
- //循环遍历,每行加入tr标签,每个单元格加td标签
- for (let i = 0; i < jsonData.length; i++) {
- str += '<tr>';
- for (let item in jsonData[i]) {
- //增加\t为了不让表格显示科学计数法或者其他格式
- str += `<td>${jsonData[i][item] + '\t'}</td>`;
- }
- str += '</tr>';
- }
- str = name + str;
- let worksheet = '问题记录'
- let uri = 'data:application/vnd.ms-excel;base64,';
- //下载的表格模板数据
- let template = `<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"> <head><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet> <x:Name>${worksheet}</x:Name> <x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet> </x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--> </head><body><table>${str}</table></body></html>`;
- //下载模板
- window.location.href = uri + base64(template)
- })
- }
- //自定义导出设置
- function ExcelSet() {
- top.ZLPMS.OpenNewWindow("导出Excel设置", "/Problem/ExcelSet_Window/", '500px', '520px', function () {
- GetExcel(1)
- });
- }
- function base64(s) {
- return window.btoa(unescape(encodeURIComponent(s)))
- }
- function ShowConnect(id) {
- $.post("/Problem/ShowConnect/" + id, function (data) {
- var html = ""
- for (var i = 0; i < data.length; i++) {
- html += data[i].编号版本 + "<br/>"
- }
- //配置一个透明的询问框
- layer.msg(html, {
- time: 200000, //20s后自动关闭
- btnAlign: 'c',
- btn: ['关闭']
- });
- })
- }
- //导出Excel
- function ExportExcelV2(type) {
- //var data = $('#dgProblems').datagrid('getData');
- var params = com.GetQueryParams();
- params.type = type == 3 ? type : 0;
- params.page = 0;
- params.rows = 0;
- var location = top.ZLPMS.Loading("导出中,请稍等...");
- $.post("/Problem/QueryProblemsV2", params, function (data) {
- top.ZLPMS.UnLoading(location);
- var jsonData = data.rows;
- //删除ID
- if (type == 1) {
- for (var t in jsonData) {
-
- /* delete jsonData[t].问题性质;*/
- switch (jsonData[t].问题性质) {
- case 1:
- jsonData[t].问题性质 = "缺陷"
- break
- case 2:
- jsonData[t].问题性质 = "咨询"
- break
- case 3:
- jsonData[t].问题性质 = "需求"
- break
- case 4:
- jsonData[t].问题性质 = "优化"
- break
- case 5:
- jsonData[t].问题性质 = "环境"
- break
- case 6:
- jsonData[t].问题性质 = "接口"
- break
- }
- }
- } else {
- for (var t in jsonData) {
- delete jsonData[t].ID;
- delete jsonData[t].ROWNO;
- delete jsonData[t].受理人ID;
- delete jsonData[t].环节ID;
- delete jsonData[t].受理人ID;
- delete jsonData[t].问题类型;
- /* delete jsonData[t].问题性质;*/
- switch (jsonData[t].问题性质) {
- case 1:
- jsonData[t].问题性质 = "缺陷"
- break
- case 2:
- jsonData[t].问题性质 = "咨询"
- break
- case 3:
- jsonData[t].问题性质 = "需求"
- break
- case 4:
- jsonData[t].问题性质 = "优化"
- break
- case 5:
- jsonData[t].问题性质 = "环境"
- break
- case 6:
- jsonData[t].问题性质 = "接口"
- break
- }
- switch (jsonData[t].解决版本状态) {
- case 1:
- jsonData[t].解决版本状态 = "登记"
- break
- case 2:
- jsonData[t].解决版本状态 = "修改"
- break
- case 3:
- jsonData[t].解决版本状态 = "测试"
- break
- case 4:
- jsonData[t].解决版本状态 = "待发布"
- break
- case 5:
- jsonData[t].解决版本状态 = "终止"
- break
- case 6:
- jsonData[t].解决版本状态 = "已发布"
- break
- }
- jsonData[t].是否终止 = jsonData[t].是否终止 == 1 ? '是' : '否';
- jsonData[t].是否验证 = jsonData[t].是否验证 == 1 ? '是' : '否';
- jsonData[t].是否解决 = jsonData[t].是否解决 == 1 ? '是' : '否';
- jsonData[t].是否受理 = jsonData[t].是否受理 == 1 ? '是' : '否';
- jsonData[t].是否回退 = jsonData[t].是否回退 == 1 ? '是' : '否';
- jsonData[t].是否回退 = jsonData[t].是否回退 == 1 ? '是' : '否';
- }
- }
- //获取标题
- var name = '<tr>';
- for (let Title in jsonData[0]) {
- //增加\t为了不让表格显示科学计数法或者其他格式
- name += `<td>${Title}</td>`;
- }
- name += '</tr>';
- let str = '';
- //循环遍历,每行加入tr标签,每个单元格加td标签
- for (let i = 0; i < jsonData.length; i++) {
- str += '<tr>';
- for (let item in jsonData[i]) {
- //增加\t为了不让表格显示科学计数法或者其他格式
- str += `<td>${jsonData[i][item] + '\t'}</td>`;
- }
- str += '</tr>';
- }
- str = name + str;
- let worksheet = '问题记录'
- let uri = 'data:application/vnd.ms-excel;base64,';
- //下载的表格模板数据
- let template = `<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"> <head><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet> <x:Name>${worksheet}</x:Name> <x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet> </x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--> </head><body><table>${str}</table></body></html>`;
- //下载模板
- window.location.href = uri + base64(template)
- })
- }
- //自定义导出设置V2版本
- function ExportExcel(source) {
- top.ZLPMS.OpenNewWindow("导出Excel设置", "/Problem/ExcelSet_Window/", '500px', '520px', function () {
- if (source==3) {//产品问题导出
- ExportExcelV2(1)
- }
-
- });
- }
|