25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 
 
 
 

306 satır
14 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. }, 280, 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',
  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',
  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", sort: 'false' },
  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. }
  229. },
  230. },
  231. {
  232. label: '受理单位', name: 'AcceptanceUnit', width: 200, align: "left",
  233. formatterAsync: function (callback, value, row, op, $cell) {
  234. learun.clientdata.getAsync('custmerData', {
  235. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata',
  236. key: value,
  237. keyId: 'id',
  238. callback: function (_data) {
  239. callback(_data['name']);
  240. }
  241. });
  242. }
  243. },
  244. {
  245. label: '受理时间', name: 'AcceptanceTime', width: 140, align: "left",
  246. formatter: function (cellvalue) {
  247. return learun.formatDate(cellvalue, 'yyyy-MM-dd hh:mm:ss');
  248. },
  249. },
  250. { label: '受理单号', name: 'AcceptanceCode', width: 140, align: "left" },
  251. {
  252. label: '回复用户', name: 'AcceptanceId', width: 200, align: "left",
  253. formatterAsync: function (callback, value, row, op, $cell) {
  254. learun.clientdata.getAsync('user', {
  255. key: value,
  256. callback: function (_data) {
  257. callback(_data.name);
  258. }
  259. });
  260. }
  261. },
  262. { label: '评论意见', name: 'CriticalReview', width: 200, align: "left" },
  263. {
  264. label: '评论打分', name: 'RatingReview', width: 100, align: "left",
  265. formatter: function (cellvalue) {
  266. if (cellvalue == '0') {
  267. return '非常满意';
  268. } else if (cellvalue == '1') {
  269. return '满意';
  270. } else if (cellvalue == '2') {
  271. return '一般';
  272. } else if (cellvalue == '3') {
  273. return '不满意';
  274. }
  275. },
  276. },
  277. { label: '回复内容', name: 'Responses', width: 200, align: "left" },
  278. { label: '点击次数', name: 'Clicks', width: 200, align: "left" },
  279. ],
  280. mainId: 'ID',
  281. sidx: 'Createdate desc',
  282. isPage: true
  283. });
  284. page.search();
  285. },
  286. search: function (param) {
  287. param = param || {};
  288. param.SqlParam = " and ProblemType ='舆情反映'";
  289. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  290. }
  291. };
  292. refreshGirdData = function () {
  293. $('#gridtable').jfGridSet('reload');
  294. };
  295. page.init();
  296. }
  297. function downLoad(fileId, fileTwo) {
  298. console.log(222);
  299. if (fileTwo) {
  300. top.learun.postFormSilence(top.$.rootUrl + '/PersonnelManagement/MP_QualityObjectives/AddRecord', { fileId: fileTwo }, function () {
  301. });
  302. }
  303. top.learun.download({ url: top.$.rootUrl + '/LR_SystemModule/Annexes/DownAnnexesFile', param: { fileId: fileId, __RequestVerificationToken: $.lrToken }, method: 'POST' });
  304. }