/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 * 创建人:超级管理员 * 日 期:2022-11-23 10:48 * 描 述:投诉受理 */ var refreshGirdData; var bootstrap = function ($, learun) { "use strict"; var page = { init: function () { page.initGird(); page.bind(); }, bind: function () { $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { page.search(queryJson); }, 320, 400); $('#Status').lrselect({ data: [{ text: "未受理", value: "0" }, { text: "受理中", value: "1" }, { text: "已受理", value: "2" }], text: "text", value: "value" }) $('#QuestionerIdentity').lrselect({ width: '150px', placeholder: "请选择提问者身份", allowSearch: true, url: top.$.rootUrl + '/EducationalAdministration/SunshineEducation/GetQuestionerIdentity?ProblemType=' + "投诉受理", value: 'ID', text: 'QuestionerIdentity' }); $('#MatterType').lrselect({ width: '150px', placeholder: "请选择事项类别", allowSearch: true, url: top.$.rootUrl + '/EducationalAdministration/SunshineEducation/GetMatterType?ProblemType=' + "投诉受理", value: 'ID', text: 'MatterType' }); $('#MatterTypeContent').lrselect({ width: '150px', placeholder: "请选择类别分类", allowSearch: true, url: top.$.rootUrl + '/EducationalAdministration/SunshineEducation/GetMatterTypeContent?ProblemType=' + "投诉受理", value: 'ID', text: 'MatterTypeContent' }); $('#AcceptanceUnit').lrDepartmentSelect(); // 刷新 $('#lr_refresh').on('click', function () { location.reload(); }); // 新增 $('#lr_add').on('click', function () { learun.layerForm({ id: 'form', title: '新增', url: top.$.rootUrl + '/EducationalAdministration/SunshineEducation/Form', width: 800, height: 600, callBack: function (id) { return top[id].acceptClick(refreshGirdData); } }); }); // 编辑 $('#lr_edit').on('click', function () { var keyValue = $('#gridtable').jfGridValue('ID'); if (learun.checkrow(keyValue)) { var Status = $('#gridtable').jfGridValue('Status'); if (Status != 0) { learun.alert.warning("当前项已受理或受理中不可编辑!"); return; } learun.layerForm({ id: 'form', title: '编辑', url: top.$.rootUrl + '/EducationalAdministration/SunshineEducation/Form?keyValue=' + keyValue, width: 800, height: 400, callBack: function (id) { return top[id].acceptClick(refreshGirdData); } }); } }); // 删除 $('#lr_delete').on('click', function () { var keyValue = $('#gridtable').jfGridValue('ID'); if (learun.checkrow(keyValue)) { var Status = $('#gridtable').jfGridValue('Status'); if (Status != 0) { learun.alert.warning("当前项已受理或受理中不可删除!"); return; } learun.layerConfirm('是否确认删除该项!', function (res) { if (res) { learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/SunshineEducation/DeleteForm', { keyValue: keyValue }, function () { refreshGirdData(); }); } }); } }); //受理标识 $('#lr_reply').on('click', function () { var keyValue = $('#gridtable').jfGridValue('ID'); if (learun.checkrow(keyValue)) { var Status = $('#gridtable').jfGridValue('Status'); if (Status != 0) { learun.alert.warning("当前项已受理完成!"); return; } learun.layerConfirm('是否确认受理该项?', function (res) { if (res) { learun.postForm(top.$.rootUrl + '/EducationalAdministration/SunshineEducation/ReplyForm', { keyValue: keyValue }, function () { refreshGirdData(); }); } }); } }); //指派部门及人 $('#lr_auditor').on('click', function () { var keyValue = $('#gridtable').jfGridValue('ID'); if (learun.checkrow(keyValue)) { var Status = $('#gridtable').jfGridValue('Status'); if (Status == 0) { learun.alert.warning("当前项不可回复!"); return; } learun.layerForm({ id: 'formReply', title: '回复', url: top.$.rootUrl + '/EducationalAdministration/SunshineEducation/UserForm?keyValue=' + keyValue, width: 400, height: 300, callBack: function (id) { return top[id].acceptClick(refreshGirdData); } }); refreshGirdData(); } }); //回复 $('#lr_acceptance').on('click', function () { var keyValue = $('#gridtable').jfGridValue('ID'); if (learun.checkrow(keyValue)) { var Status = $('#gridtable').jfGridValue('Status'); if (Status == 0) { learun.alert.warning("当前项不可回复!"); return; } learun.layerForm({ id: 'formReply', title: '回复', url: top.$.rootUrl + '/EducationalAdministration/SunshineEducation/FormReply?keyValue=' + keyValue, width: 800, height: 900, callBack: function (id) { return top[id].acceptClick(refreshGirdData); } }); refreshGirdData(); } }); }, initGird: function () { $('#gridtable').lrAuthorizeJfGrid({ url: top.$.rootUrl + '/EducationalAdministration/SunshineEducation/GetPageList', headData: [ { label: '问题类型', name: 'ProblemType', width: 100, align: "left" }, { label: '提问者身份', name: 'QuestionerIdentity', width: 100, align: "left" }, { label: '事项类型', name: 'MatterType', width: 100, align: "left" }, { label: '事项类别内容', name: 'MatterTypeContent', width: 150, align: "left" }, { label: '标题', name: 'Title', width: 200, align: "left" }, //{ label: '信件内容', name: 'Contents', width: 300, align: "left" }, { label: '姓名', name: 'Name', width: 100, align: "left" }, { label: '电话号码', name: 'Phone', width: 100, align: "left" }, { label: 'EMail', name: 'EMail', width: 120, align: "left" }, { label: '地址', name: 'Address', width: 200, align: "left" }, { label: "附件", name: "Path", width: 500, align: "center", formatterAsync: function (callback, value, row, op, $cell) { $.ajax({ url: '/LR_SystemModule/Annexes/GetAnnexesFileList', data: { folderId: value }, type: 'GET', dataType: "json", async: false, cache: false, success: function (res) { var bb = ''; //$.each(res.data, function (i, item) { // bb += '' + // item.F_FileName.substring(0, item.F_FileName.indexOf(".")) + // ',   '; //}) $.each(res.data, function (i, item) { bb += '' + item.F_FileName.substring(0, item.F_FileName.indexOf(".")) + ',   '; }) callback(bb); } }); } }, { label: '提交时间', name: 'Createdate', width: 140, align: "left", formatter: function (cellvalue) { return learun.formatDate(cellvalue, 'yyyy-MM-dd hh:mm:ss'); }, }, { label: '受理状态', name: 'Status', width: 80, align: "left", formatter: function (cellvalue) { if (cellvalue == '0') { return '未受理'; } else if (cellvalue == '1') { return '受理中'; } else if (cellvalue == '2') { return '已受理'; } else if (cellvalue == '3') { return '不满意'; } }, }, { label: '受理单位', name: 'AcceptanceUnit', width: 200, align: "left", formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getAsync('custmerData', { url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', key: value, keyId: 'id', callback: function (_data) { callback(_data['name']); } }); } }, { label: '受理时间', name: 'AcceptanceTime', width: 140, align: "left", formatter: function (cellvalue) { return learun.formatDate(cellvalue, 'yyyy-MM-dd hh:mm:ss'); }, }, { label: '受理单号', name: 'AcceptanceCode', width: 140, align: "left" }, { label: '回复用户', name: 'AcceptanceId', width: 200, align: "left", formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getAsync('user', { key: value, callback: function (_data) { callback(_data.name); } }); } }, { label: '评论意见', name: 'CriticalReview', width: 200, align: "left" }, { label: '评论打分', name: 'RatingReview', width: 100, align: "left", formatter: function (cellvalue) { if (cellvalue == '0') { return '非常满意'; } else if (cellvalue == '1') { return '满意'; } else if (cellvalue == '2') { return '一般'; } else if (cellvalue == '3') { return '不满意'; } }, }, { label: '回复内容', name: 'Responses', width: 200, align: "left" }, { label: '点击次数', name: 'Clicks', width: 200, align: "left" }, ], mainId: 'ID', sidx: 'Createdate desc', isPage: true }); page.search(); }, search: function (param) { param = param || {}; param.SqlParam = " and ProblemType ='投诉受理'"; $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } }; refreshGirdData = function () { $('#gridtable').jfGridSet('reload'); }; page.init(); } function downLoad(fileId, fileTwo) { console.log(222); if (fileTwo) { top.learun.postFormSilence(top.$.rootUrl + '/PersonnelManagement/MP_QualityObjectives/AddRecord', { fileId: fileTwo }, function () { }); } top.learun.download({ url: top.$.rootUrl + '/LR_SystemModule/Annexes/DownAnnexesFile', param: { fileId: fileId, __RequestVerificationToken: $.lrToken }, method: 'POST' }); }