You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

307 rivejä
15 KiB

  1. /* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
  2. * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2022-11-23 10:48
  5. * 描 述:投诉受理
  6. */
  7. var refreshGirdData;
  8. var bootstrap = function ($, learun) {
  9. "use strict";
  10. var page = {
  11. init: function () {
  12. page.initGird();
  13. page.bind();
  14. },
  15. bind: function () {
  16. $('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
  17. page.search(queryJson);
  18. }, 320, 400);
  19. $('#Status').lrselect({
  20. data: [{ text: "未受理", value: "0" }, { text: "受理中", value: "1" }, { text: "已受理", value: "2" }],
  21. text: "text",
  22. value: "value"
  23. })
  24. $('#QuestionerIdentity').lrselect({
  25. width: '150px',
  26. placeholder: "请选择提问者身份",
  27. allowSearch: true,
  28. url: top.$.rootUrl + '/EducationalAdministration/SunshineEducation/GetQuestionerIdentity?ProblemType=' + "投诉受理",
  29. value: 'ID',
  30. text: 'QuestionerIdentity'
  31. });
  32. $('#MatterType').lrselect({
  33. width: '150px',
  34. placeholder: "请选择事项类别",
  35. allowSearch: true,
  36. url: top.$.rootUrl + '/EducationalAdministration/SunshineEducation/GetMatterType?ProblemType=' + "投诉受理",
  37. value: 'ID',
  38. text: 'MatterType'
  39. });
  40. $('#MatterTypeContent').lrselect({
  41. width: '150px',
  42. placeholder: "请选择类别分类",
  43. allowSearch: true,
  44. url: top.$.rootUrl + '/EducationalAdministration/SunshineEducation/GetMatterTypeContent?ProblemType=' + "投诉受理",
  45. value: 'ID',
  46. text: 'MatterTypeContent'
  47. });
  48. $('#AcceptanceUnit').lrDepartmentSelect();
  49. // 刷新
  50. $('#lr_refresh').on('click', function () {
  51. location.reload();
  52. });
  53. // 新增
  54. $('#lr_add').on('click', function () {
  55. learun.layerForm({
  56. id: 'form',
  57. title: '新增',
  58. url: top.$.rootUrl + '/EducationalAdministration/SunshineEducation/Form',
  59. width: 800,
  60. height: 600,
  61. callBack: function (id) {
  62. return top[id].acceptClick(refreshGirdData);
  63. }
  64. });
  65. });
  66. // 编辑
  67. $('#lr_edit').on('click', function () {
  68. var keyValue = $('#gridtable').jfGridValue('ID');
  69. if (learun.checkrow(keyValue)) {
  70. var Status = $('#gridtable').jfGridValue('Status');
  71. if (Status != 0) {
  72. learun.alert.warning("当前项已受理或受理中不可编辑!");
  73. return;
  74. }
  75. learun.layerForm({
  76. id: 'form',
  77. title: '编辑',
  78. url: top.$.rootUrl + '/EducationalAdministration/SunshineEducation/Form?keyValue=' + keyValue,
  79. width: 800,
  80. height: 400,
  81. callBack: function (id) {
  82. return top[id].acceptClick(refreshGirdData);
  83. }
  84. });
  85. }
  86. });
  87. // 删除
  88. $('#lr_delete').on('click', function () {
  89. var keyValue = $('#gridtable').jfGridValue('ID');
  90. if (learun.checkrow(keyValue)) {
  91. var Status = $('#gridtable').jfGridValue('Status');
  92. if (Status != 0) {
  93. learun.alert.warning("当前项已受理或受理中不可删除!");
  94. return;
  95. }
  96. learun.layerConfirm('是否确认删除该项!', function (res) {
  97. if (res) {
  98. learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/SunshineEducation/DeleteForm', { keyValue: keyValue }, function () {
  99. refreshGirdData();
  100. });
  101. }
  102. });
  103. }
  104. });
  105. //受理标识
  106. $('#lr_reply').on('click', function () {
  107. var keyValue = $('#gridtable').jfGridValue('ID');
  108. if (learun.checkrow(keyValue)) {
  109. var Status = $('#gridtable').jfGridValue('Status');
  110. if (Status != 0) {
  111. learun.alert.warning("当前项已受理完成!");
  112. return;
  113. }
  114. learun.layerConfirm('是否确认受理该项?', function (res) {
  115. if (res) {
  116. learun.postForm(top.$.rootUrl + '/EducationalAdministration/SunshineEducation/ReplyForm', { keyValue: keyValue }, function () {
  117. refreshGirdData();
  118. });
  119. }
  120. });
  121. }
  122. });
  123. //指派部门及人
  124. $('#lr_auditor').on('click', function () {
  125. var keyValue = $('#gridtable').jfGridValue('ID');
  126. if (learun.checkrow(keyValue)) {
  127. var Status = $('#gridtable').jfGridValue('Status');
  128. if (Status == 0) {
  129. learun.alert.warning("当前项不可回复!");
  130. return;
  131. }
  132. learun.layerForm({
  133. id: 'formReply',
  134. title: '回复',
  135. url: top.$.rootUrl + '/EducationalAdministration/SunshineEducation/UserForm?keyValue=' + keyValue,
  136. width: 400,
  137. height: 300,
  138. callBack: function (id) {
  139. return top[id].acceptClick(refreshGirdData);
  140. }
  141. });
  142. refreshGirdData();
  143. }
  144. });
  145. //回复
  146. $('#lr_acceptance').on('click', function () {
  147. var keyValue = $('#gridtable').jfGridValue('ID');
  148. if (learun.checkrow(keyValue)) {
  149. var Status = $('#gridtable').jfGridValue('Status');
  150. if (Status == 0) {
  151. learun.alert.warning("当前项不可回复!");
  152. return;
  153. }
  154. learun.layerForm({
  155. id: 'formReply',
  156. title: '回复',
  157. url: top.$.rootUrl + '/EducationalAdministration/SunshineEducation/FormReply?keyValue=' + keyValue,
  158. width: 800,
  159. height: 900,
  160. callBack: function (id) {
  161. return top[id].acceptClick(refreshGirdData);
  162. }
  163. });
  164. refreshGirdData();
  165. }
  166. });
  167. },
  168. initGird: function () {
  169. $('#gridtable').lrAuthorizeJfGrid({
  170. url: top.$.rootUrl + '/EducationalAdministration/SunshineEducation/GetPageList',
  171. headData: [
  172. { label: '问题类型', name: 'ProblemType', width: 100, align: "left" },
  173. { label: '提问者身份', name: 'QuestionerIdentity', width: 100, align: "left" },
  174. { label: '事项类型', name: 'MatterType', width: 100, align: "left" },
  175. { label: '事项类别内容', name: 'MatterTypeContent', width: 150, align: "left" },
  176. { label: '标题', name: 'Title', width: 200, align: "left" },
  177. //{ label: '信件内容', name: 'Contents', width: 300, align: "left" },
  178. { label: '姓名', name: 'Name', width: 100, align: "left" },
  179. { label: '电话号码', name: 'Phone', width: 100, align: "left" },
  180. { label: 'EMail', name: 'EMail', width: 120, align: "left" },
  181. { label: '地址', name: 'Address', width: 200, align: "left" },
  182. {
  183. label: "附件", name: "Path", width: 500, align: "center",
  184. formatterAsync: function (callback, value, row, op, $cell) {
  185. $.ajax({
  186. url: '/LR_SystemModule/Annexes/GetAnnexesFileList',
  187. data: { folderId: value },
  188. type: 'GET',
  189. dataType: "json",
  190. async: false,
  191. cache: false,
  192. success: function (res) {
  193. var bb = '';
  194. //$.each(res.data, function (i, item) {
  195. // bb += '<span onclick="downLoad(\'' +
  196. // item.F_Id +
  197. // '\')" style="color:blue">' +
  198. // item.F_FileName.substring(0, item.F_FileName.indexOf(".")) +
  199. // '</span>,&nbsp;&nbsp;&nbsp;';
  200. //})
  201. $.each(res.data, function (i, item) {
  202. bb += '<span onclick="downLoad(\'' +
  203. item.F_Id +
  204. '\')" style="color:blue">' +
  205. item.F_FileName.substring(0, item.F_FileName.indexOf(".")) +
  206. '</span>,&nbsp;&nbsp;&nbsp;';
  207. })
  208. callback(bb);
  209. }
  210. });
  211. }
  212. },
  213. {
  214. label: '提交时间', name: 'Createdate', width: 140, align: "left",
  215. formatter: function (cellvalue) {
  216. return learun.formatDate(cellvalue, 'yyyy-MM-dd hh:mm:ss');
  217. },
  218. },
  219. {
  220. label: '受理状态', name: 'Status', width: 80, align: "left",
  221. formatter: function (cellvalue) {
  222. if (cellvalue == '0') {
  223. return '未受理';
  224. } else if (cellvalue == '1') {
  225. return '受理中';
  226. } else if (cellvalue == '2') {
  227. return '已受理';
  228. } else if (cellvalue == '3') {
  229. return '不满意';
  230. }
  231. },
  232. },
  233. {
  234. label: '受理单位', name: 'AcceptanceUnit', width: 200, align: "left",
  235. formatterAsync: function (callback, value, row, op, $cell) {
  236. learun.clientdata.getAsync('custmerData', {
  237. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata',
  238. key: value,
  239. keyId: 'id',
  240. callback: function (_data) {
  241. callback(_data['name']);
  242. }
  243. });
  244. }
  245. },
  246. {
  247. label: '受理时间', name: 'AcceptanceTime', width: 140, align: "left",
  248. formatter: function (cellvalue) {
  249. return learun.formatDate(cellvalue, 'yyyy-MM-dd hh:mm:ss');
  250. },
  251. },
  252. { label: '受理单号', name: 'AcceptanceCode', width: 140, align: "left" },
  253. {
  254. label: '回复用户', name: 'AcceptanceId', width: 200, align: "left",
  255. formatterAsync: function (callback, value, row, op, $cell) {
  256. learun.clientdata.getAsync('user', {
  257. key: value,
  258. callback: function (_data) {
  259. callback(_data.name);
  260. }
  261. });
  262. }
  263. },
  264. { label: '评论意见', name: 'CriticalReview', width: 200, align: "left" },
  265. {
  266. label: '评论打分', name: 'RatingReview', width: 100, align: "left",
  267. formatter: function (cellvalue) {
  268. if (cellvalue == '0') {
  269. return '非常满意';
  270. } else if (cellvalue == '1') {
  271. return '满意';
  272. } else if (cellvalue == '2') {
  273. return '一般';
  274. } else if (cellvalue == '3') {
  275. return '不满意';
  276. }
  277. },
  278. },
  279. { label: '回复内容', name: 'Responses', width: 200, align: "left" },
  280. { label: '点击次数', name: 'Clicks', width: 200, align: "left" },
  281. ],
  282. mainId: 'ID',
  283. sidx: 'Createdate desc',
  284. isPage: true
  285. });
  286. page.search();
  287. },
  288. search: function (param) {
  289. param = param || {};
  290. param.SqlParam = " and ProblemType ='投诉受理'";
  291. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  292. }
  293. };
  294. refreshGirdData = function () {
  295. $('#gridtable').jfGridSet('reload');
  296. };
  297. page.init();
  298. }
  299. function downLoad(fileId, fileTwo) {
  300. console.log(222);
  301. if (fileTwo) {
  302. top.learun.postFormSilence(top.$.rootUrl + '/PersonnelManagement/MP_QualityObjectives/AddRecord', { fileId: fileTwo }, function () {
  303. });
  304. }
  305. top.learun.download({ url: top.$.rootUrl + '/LR_SystemModule/Annexes/DownAnnexesFile', param: { fileId: fileId, __RequestVerificationToken: $.lrToken }, method: 'POST' });
  306. }