From cb9f084cbffd4d1473174cb579ad57009df95780 Mon Sep 17 00:00:00 2001 From: dyy <18335927079@163.com> Date: Fri, 30 Apr 2021 18:09:07 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=A2=9E=E5=8A=A0=E3=80=91=E7=A7=BB?= =?UTF-8?q?=E5=8A=A8=E7=AB=AF=EF=BC=9A=E5=A2=9E=E5=8A=A0=E6=8A=95=E8=AF=89?= =?UTF-8?q?=E7=AE=A1=E7=90=86=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../www/config/config.js | 16 +- .../Sys_ReceiveComplaint.css | 1 + .../Sys_ReceiveComplaint.html | 23 +++ .../Sys_ReceiveComplaint.js | 129 +++++++++++++ .../Sys_ReceiveComplaint/form/form.css | 1 + .../Sys_ReceiveComplaint/form/form.html | 17 ++ .../Sys_ReceiveComplaint/form/form.js | 154 ++++++++++++++++ .../Sys_SendComplaint/Assign/Assign.css | 1 + .../Sys_SendComplaint/Assign/Assign.html | 27 +++ .../Sys_SendComplaint/Assign/Assign.js | 121 ++++++++++++ .../Sys_SendComplaint/Assign/form/form.css | 1 + .../Sys_SendComplaint/Assign/form/form.html | 22 +++ .../Sys_SendComplaint/Assign/form/form.js | 159 ++++++++++++++++ .../Sys_SendComplaint/Sys_SendComplaint.css | 1 + .../Sys_SendComplaint/Sys_SendComplaint.html | 29 +++ .../Sys_SendComplaint/Sys_SendComplaint.js | 165 +++++++++++++++++ .../Sys_SendComplaint/form/form.css | 1 + .../Sys_SendComplaint/form/form.html | 17 ++ .../Sys_SendComplaint/form/form.js | 169 +++++++++++++++++ .../Sys_SendComplaint/reply/reply.css | 1 + .../Sys_SendComplaint/reply/reply.html | 6 + .../Sys_SendComplaint/reply/reply.js | 45 +++++ .../Learun.Application.WebApi.csproj | 2 + .../Sys_ReceiveComplaintApi.cs | 119 ++++++++++++ .../Sys_SendComplaintApi.cs | 173 ++++++++++++++++++ 25 files changed, 1392 insertions(+), 8 deletions(-) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_ReceiveComplaint/Sys_ReceiveComplaint.css create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_ReceiveComplaint/Sys_ReceiveComplaint.html create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_ReceiveComplaint/Sys_ReceiveComplaint.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_ReceiveComplaint/form/form.css create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_ReceiveComplaint/form/form.html create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_ReceiveComplaint/form/form.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Assign/Assign.css create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Assign/Assign.html create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Assign/Assign.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Assign/form/form.css create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Assign/form/form.html create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Assign/form/form.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Sys_SendComplaint.css create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Sys_SendComplaint.html create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Sys_SendComplaint.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/form/form.css create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/form/form.html create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/form/form.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/reply/reply.css create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/reply/reply.html create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/reply/reply.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/EducationalAdministration/Sys_ReceiveComplaintApi.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/EducationalAdministration/Sys_SendComplaintApi.cs diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/config/config.js b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/config/config.js index c0c70d1fc..8729d3859 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/config/config.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/config/config.js @@ -1,7 +1,7 @@ -var config = { - webapi: 'http://123.57.209.16:31173/', - web: "http://localhost:8087/"//web地址,用于配置logo -}; +//var config = { +// webapi: 'http://123.57.209.16:31173/', +// web: "http://localhost:8087/"//web地址,用于配置logo +//}; //var config = { // webapi: 'http://112.230.201.53:31173/', // web:"http://112.230.201.53/:8081/"//web地址,用于配置logo @@ -12,10 +12,10 @@ var config = { //}; -//var config = { -// webapi: 'http://localhost:8081/', -// web: "http://localhost:8080/"//web地址,用于配置logo -//}; +var config = { + webapi: 'http://localhost:8081/', + web: "http://localhost:8087/"//web地址,用于配置logo +}; // var config = { // webapi: 'http://123.57.209.16:31173/', // web: "http://123.57.209.16:31175/"//web地址,用于配置logo diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_ReceiveComplaint/Sys_ReceiveComplaint.css b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_ReceiveComplaint/Sys_ReceiveComplaint.css new file mode 100644 index 000000000..5f282702b --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_ReceiveComplaint/Sys_ReceiveComplaint.css @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_ReceiveComplaint/Sys_ReceiveComplaint.html b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_ReceiveComplaint/Sys_ReceiveComplaint.html new file mode 100644 index 000000000..b33844114 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_ReceiveComplaint/Sys_ReceiveComplaint.html @@ -0,0 +1,23 @@ +
+
+
+ 总共0条 +
+
+ + +
+
+
+ +
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_ReceiveComplaint/Sys_ReceiveComplaint.js b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_ReceiveComplaint/Sys_ReceiveComplaint.js new file mode 100644 index 000000000..b839297d1 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_ReceiveComplaint/Sys_ReceiveComplaint.js @@ -0,0 +1,129 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2021-04-30 16:33 + * 描 述:接收投诉意见 + */ +(function () { + var begin = ''; + var end = ''; + var multipleData = null; + var page = { + grid: null, + init: function ($page) { + begin = ''; + end = ''; + multipleData = null; + page.grid = $page.find('#lr_EducationalAdministrationSys_ReceiveComplaint_list').lrpagination({ + lclass: page.lclass, + rows: 10, // 每页行数 + getData: function (param, callback) {// 获取数据 param 分页参数,callback 异步回调 + param.begin = begin; + param.end = end; + param.multipleData = multipleData; + page.loadData(param, callback, $page); + }, + renderData: function (_index, _item, _$item) {// 渲染数据模板 + return page.rowRender(_index, _item, _$item, $page); + }, + click: function (item, $item, $et) {// 列表行点击事件 + if ($et.hasClass('lr-btn-danger')) { + page.btnClick(item, $item, $page); + } + else { + page.rowClick(item, $item, $page); + } + }, + btns: page.rowBtns + }); + // 时间搜索 + $page.find('.lr_time_search').searchdate({ + callback: function (_begin, _end) { + begin = _begin; + end = _end; + multipleData = null; + page.grid.reload(); + } + }); + // 多条件查询 + var $multiple = $page.find('.lr_multiple_search').multiplequery({ + callback: function (data) { + begin = ''; + end = ''; + multipleData = data || {}; + page.grid.reload(); + } + }); + }, + lclass: 'lr-list', + loadData: function (param, callback, $page) {// 列表加载后台数据 + var _postParam = { + pagination: { + rows: param.rows, + page: param.page, + sidx: 'SendTime desc', + sord: 'DESC' + }, + queryJson: JSON.stringify({ ReceiverId: learun.storage.get('userinfo').baseinfo.userId }) + + }; + if (param.multipleData) { + multipleData.ReceiverId = learun.storage.get('userinfo').baseinfo.userId; + _postParam.queryJson = JSON.stringify(multipleData); + } + if (param.begin && param.end) { + _postParam.queryJson = JSON.stringify({ StartTime: param.begin, EndTime: param.end, ReceiverId: learun.storage.get('userinfo').baseinfo.userId }); + } + learun.httpget(config.webapi + 'learun/adms/EducationalAdministration/Sys_ReceiveComplaint/pagelist', _postParam, (data) => { + $page.find('.lr-badge').text('0'); + if (data) { + $page.find('.lr-badge').text(data.records); + callback(data.rows, parseInt(data.records)); + } + else { + callback([], 0); + } + }); + }, + rowRender: function (_index, _item, _$item, $page) {// 渲染列表行数据 + _$item.addClass('lr-list-item lr-list-item-multi'); + _$item.append($('

投诉编号:

').dataFormatter({ value: _item.ComplaintCode })); + _$item.append($('

主题:

').dataFormatter({ value: _item.Title })); + _$item.append($('

指派人:

').dataFormatter({ value: _item.Sender })); + _$item.append($('

指派时间:

').dataFormatter({ + value: _item.SendTime, + type: 'datetime', + dateformat: 'yyyy-MM-dd hh:mm:ss' + })); + _$item.append($('

回复状态:

').dataFormatter({ value: _item.ReplyFlag == 1 ? "已回复" : "未回复" })); + _$item.append($('

回复时间:

').dataFormatter({ + value: _item.ReplyTime, + type: 'datetime', + dateformat: 'yyyy-MM-dd hh:mm:ss' + })); + return ''; + }, + rowClick: function (item, $item, $page) {// 列表行点击触发方法 + learun.nav.go({ path: 'EducationalAdministration/Sys_ReceiveComplaint/form', title: '详情', type: 'right', param: { keyValue: item.RComplaintId, ReplyFlag: item.ReplyFlag } }); + }, + btnClick: function (item, $item, $page) {// 左滑按钮点击事件 + if (item.ReplyFlag !== 1) { + learun.layer.warning("当前投诉意见未回复,无法删除!"); + return false; + } + learun.layer.confirm('确定要删除该笔数据吗?', function (_index) { + if (_index === '1') { + learun.layer.loading(true, '正在删除该笔数据'); + learun.httppost(config.webapi + 'learun/adms/EducationalAdministration/Sys_ReceiveComplaint/delete', item.RComplaintId, (data) => { + if (data) {// 删除数据成功 + page.grid.reload(); + } + learun.layer.loading(false); + }); + } + }, '智慧校园提示', ['取消', '确定']); + }, + rowBtns: ['删除'] // 列表行左滑按钮 + }; + return page; +})(); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_ReceiveComplaint/form/form.css b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_ReceiveComplaint/form/form.css new file mode 100644 index 000000000..5f282702b --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_ReceiveComplaint/form/form.css @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_ReceiveComplaint/form/form.html b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_ReceiveComplaint/form/form.html new file mode 100644 index 000000000..b821b2cf9 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_ReceiveComplaint/form/form.html @@ -0,0 +1,17 @@ +
+
+ * + + +
+
+ * + + +
+
+ * + + +
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_ReceiveComplaint/form/form.js b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_ReceiveComplaint/form/form.js new file mode 100644 index 000000000..c0db12e83 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_ReceiveComplaint/form/form.js @@ -0,0 +1,154 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2021-04-30 16:33 + * 描 述:接收投诉意见 + */ +(function () { + var keyValue = ''; + var ReplyFlag = '';//回复状态 + var $header = null; + var titleText = ''; + var page = { + isScroll: true, + init: function ($page, param) { + keyValue = param.keyValue; + ReplyFlag = param.ReplyFlag; + // 添加头部按钮列表 + var _html = '\ +
取消
\ +
\ +
\ +
\ +
\ +
提交
'; + $header = $page.parents('.f-page').find('.f-page-header'); + $header.append(_html); + // 取消 + $header.find('.lr-form-header-cancel').on('tap', function () { + learun.layer.confirm('确定要退出当前编辑?', function (_index) { + if (_index === '1') { + if (keyValue) {// 如果是编辑状态 + learun.formblur(); + $header.find('.lr-form-header-cancel').hide(); + $header.find('.lr-form-header-submit').hide(); + $header.find('.lr-form-header-btnlist').show(); + $header.find('.f-page-title').text(titleText); + $page.find('.lr-form-container').setFormRead(); + } + else {// 如果是新增状态 关闭当前页面 + learun.nav.closeCurrent(); + } + } + }, '智慧校园提示', ['取消', '确定']); + }); + // 编辑 + $header.find('.lr-form-header-edit').on('tap', function () { + if (keyValue) { + if (ReplyFlag !== 0) { + learun.layer.warning("当前投诉意见已回复!"); + return false; + } + } + $header.find('.lr-form-header-btnlist').hide(); + $header.find('.lr-form-header-cancel').show(); + $header.find('.lr-form-header-submit').show(); + titleText = $header.find('.f-page-title').text(); + $header.find('.f-page-title').text('编辑'); + $page.find('.lr-form-container').setFormWrite(); + }); + // 更多 + $header.find('.lr-form-header-more').on('tap', function () { + learun.actionsheet({ + id: 'more', + data: [ + { + text: '删除', + mark: true, + event: function () {// 删除当前条信息 + learun.layer.confirm('确定要删除该笔数据吗?', function (_index) { + if (_index === '1') { + learun.layer.loading(true, '正在删除该笔数据'); + learun.httppost(config.webapi + 'learun/adms/EducationalAdministration/Sys_ReceiveComplaint/delete', keyValue, (data) => { + learun.layer.loading(false); + if (data) {// 删除数据成功 + learun.nav.closeCurrent(); + var prepage = learun.nav.getpage('EducationalAdministration/Sys_ReceiveComplaint'); + prepage.grid.reload(); + } + }); + } + }, '智慧校园提示', ['取消', '确定']); + } + } + ], + cancel: function () { + } + }); + }); + // 提交 + $header.find('.lr-form-header-submit').on('tap', function () { + // 获取表单数据 + if (!$page.find('.lr-form-container').lrformValid()) { + return false; + } + var _postData = {} + _postData.keyValue = keyValue; + _postData.strEntity = JSON.stringify($page.find('.lr-form-container').lrformGet()); + learun.layer.loading(true, '正在提交数据'); + learun.httppost(config.webapi + 'learun/adms/EducationalAdministration/Sys_ReceiveComplaint/save', _postData, (data) => { + learun.layer.loading(false); + if (data) {// 表单数据保存成功 + if (keyValue) { + learun.layer.toast('保存数据成功!'); + learun.formblur(); + $header.find('.lr-form-header-cancel').hide(); + $header.find('.lr-form-header-submit').hide(); + $header.find('.lr-form-header-btnlist').show(); + $header.find('.f-page-title').text(titleText); + $page.find('.lr-form-container').setFormRead(); + } + else {// 如果是 + learun.nav.closeCurrent(); + } + var prepage = learun.nav.getpage('EducationalAdministration/Sys_ReceiveComplaint'); + prepage.grid.reload(); + } + }); + }); + page.bind($page, param); + if (keyValue) { + // 添加编辑按钮 + $page.find('.lr-form-container').setFormRead(); + $header.find('.lr-form-header-btnlist').show(); + // 获取表单数据 + learun.layer.loading(true, '获取表单数据'); + learun.httpget(config.webapi + 'learun/adms/EducationalAdministration/Sys_ReceiveComplaint/form', keyValue, (data) => { + if (data) { + for (var id in data) { + if (data[id].length) { + $page.find('#' + id).lrgridSet(data[id]); + } + else { + $page.find('[data-table="' + id + '"]').lrformSet(data[id]); + } + } + } + learun.layer.loading(false); + }); + } + else { + $header.find('.lr-form-header-cancel').show(); + $header.find('.lr-form-header-submit').show(); + } + }, + bind: function ($page, param) { + + }, destroy: function (pageinfo) { + $header = null; + keyValue = ''; + } + }; + return page; +})(); + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Assign/Assign.css b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Assign/Assign.css new file mode 100644 index 000000000..5f282702b --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Assign/Assign.css @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Assign/Assign.html b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Assign/Assign.html new file mode 100644 index 000000000..83056d346 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Assign/Assign.html @@ -0,0 +1,27 @@ +
+
+
+ 总共0条 +
+
+ + +
+
+
+ +
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Assign/Assign.js b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Assign/Assign.js new file mode 100644 index 000000000..4266ab518 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Assign/Assign.js @@ -0,0 +1,121 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2021-04-30 16:33 + * 描 述:发送投诉意见 + */ +(function () { + var begin = ''; + var end = ''; + var multipleData = null; + var page = { + grid: null, + init: function ($page) { + begin = ''; + end = ''; + multipleData = null; + page.grid = $page.find('#lr_EducationalAdministrationSys_SendComplaintAssign_list').lrpagination({ + lclass: page.lclass, + rows: 10, // 每页行数 + getData: function (param, callback) {// 获取数据 param 分页参数,callback 异步回调 + param.begin = begin; + param.end = end; + param.multipleData = multipleData; + page.loadData(param, callback, $page); + }, + renderData: function (_index, _item, _$item) {// 渲染数据模板 + return page.rowRender(_index, _item, _$item, $page); + }, + click: function (item, $item, $et) {// 列表行点击事件 + if ($et.hasClass('lr-btn-danger')) { + //page.btnClick(item, $item, $page); + } + else { + page.rowClick(item, $item, $page); + } + }, + btns: page.rowBtns + }); + // 时间搜索 + $page.find('.lr_time_search').searchdate({ + callback: function (_begin, _end) { + begin = _begin; + end = _end; + multipleData = null; + page.grid.reload(); + } + }); + // 多条件查询 + var $multiple = $page.find('.lr_multiple_search').multiplequery({ + callback: function (data) { + begin = ''; + end = ''; + multipleData = data || {}; + page.grid.reload(); + } + }); + }, + lclass: 'lr-list', + loadData: function (param, callback, $page) {// 列表加载后台数据 + var _postParam = { + pagination: { + rows: param.rows, + page: param.page, + sidx: 'SendTime desc', + sord: 'DESC' + }, + queryJson: JSON.stringify({ SendFlag: "1" }) + + }; + if (param.multipleData) { + multipleData.SendFlag = "1"; + _postParam.queryJson = JSON.stringify(multipleData); + } + if (param.begin && param.end) { + _postParam.queryJson = JSON.stringify({ StartTime: param.begin, EndTime: param.end, SendFlag: "1" }); + } + learun.httpget(config.webapi + 'learun/adms/EducationalAdministration/Sys_SendComplaint/pagelist', _postParam, (data) => { + $page.find('.lr-badge').text('0'); + if (data) { + $page.find('.lr-badge').text(data.records); + callback(data.rows, parseInt(data.records)); + } + else { + callback([], 0); + } + }); + }, + rowRender: function (_index, _item, _$item, $page) {// 渲染列表行数据 + _$item.addClass('lr-list-item lr-list-item-multi'); + _$item.append($('

投诉编号:

').dataFormatter({ value: _item.ComplaintCode })); + _$item.append($('

主题:

').dataFormatter({ value: _item.Title })); + _$item.append($('

投诉人:

').dataFormatter({ value: _item.CreateUserName })); + _$item.append($('

指派状态:

').dataFormatter({ value: _item.AssignFlag == 1 ? "已指派" : "未指派" })); + _$item.append($('

指派时间:

').dataFormatter({ + value: _item.AssignTime, + type: 'datetime', + dateformat: 'yyyy-MM-dd hh:mm:ss' + })); + _$item.append($('

接收人:

').dataFormatter({ value: _item.Receiver })); + return ''; + }, + rowClick: function (item, $item, $page) {// 列表行点击触发方法 + learun.nav.go({ path: 'EducationalAdministration/Sys_SendComplaint/Assign/form', title: '详情', type: 'right', param: { keyValue: item.SComplaintId, AssignFlag: item.AssignFlag } }); + }, + //btnClick: function (item, $item, $page) {// 左滑按钮点击事件 + // learun.layer.confirm('确定要删除该笔数据吗?', function (_index) { + // if (_index === '1') { + // learun.layer.loading(true, '正在删除该笔数据'); + // learun.httppost(config.webapi + 'learun/adms/EducationalAdministration/Sys_SendComplaint/delete', item.SComplaintId, (data) => { + // if (data) {// 删除数据成功 + // page.grid.reload(); + // } + // learun.layer.loading(false); + // }); + // } + // }, '智慧校园提示', ['取消', '确定']); + //}, + rowBtns: [] // 列表行左滑按钮 + }; + return page; +})(); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Assign/form/form.css b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Assign/form/form.css new file mode 100644 index 000000000..5f282702b --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Assign/form/form.css @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Assign/form/form.html b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Assign/form/form.html new file mode 100644 index 000000000..f1d467e3c --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Assign/form/form.html @@ -0,0 +1,22 @@ +
+
+ * + + +
+
+ * + + +
+
+ * + + +
+
+ * + +
+
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Assign/form/form.js b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Assign/form/form.js new file mode 100644 index 000000000..87e4e26a0 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Assign/form/form.js @@ -0,0 +1,159 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2021-04-30 16:33 + * 描 述:发送投诉意见 + */ +(function () { + var keyValue = ''; + var AssignFlag = '';//指派状态 + var $header = null; + var titleText = ''; + var page = { + isScroll: true, + init: function ($page, param) { + keyValue = param.keyValue; + AssignFlag = param.AssignFlag; + // 添加头部按钮列表 + var _html = '\ +
取消
\ +
\ +
\ +
\ +
\ +
提交
'; + $header = $page.parents('.f-page').find('.f-page-header'); + $header.append(_html); + // 取消 + $header.find('.lr-form-header-cancel').on('tap', function () { + learun.layer.confirm('确定要退出当前编辑?', function (_index) { + if (_index === '1') { + if (keyValue) {// 如果是编辑状态 + learun.formblur(); + $header.find('.lr-form-header-cancel').hide(); + $header.find('.lr-form-header-submit').hide(); + $header.find('.lr-form-header-btnlist').show(); + $header.find('.f-page-title').text(titleText); + $page.find('.lr-form-container').setFormRead(); + } + else {// 如果是新增状态 关闭当前页面 + learun.nav.closeCurrent(); + } + } + }, '智慧校园提示', ['取消', '确定']); + }); + // 编辑 + $header.find('.lr-form-header-edit').on('tap', function () { + if (keyValue) { + if (AssignFlag !== 0) { + learun.layer.warning("当前投诉意见已指派!"); + return false; + } + } + $header.find('.lr-form-header-btnlist').hide(); + $header.find('.lr-form-header-cancel').show(); + $header.find('.lr-form-header-submit').show(); + titleText = $header.find('.f-page-title').text(); + $header.find('.f-page-title').text('编辑'); + $page.find('.lr-form-container').setFormWrite(); + }); + // 更多 + $header.find('.lr-form-header-more').on('tap', function () { + learun.actionsheet({ + id: 'more', + data: [ + //{ + // text: '删除', + // mark: true, + // event: function () {// 删除当前条信息 + // learun.layer.confirm('确定要删除该笔数据吗?', function (_index) { + // if (_index === '1') { + // learun.layer.loading(true, '正在删除该笔数据'); + // learun.httppost(config.webapi + 'learun/adms/EducationalAdministration/Sys_SendComplaint/delete', keyValue, (data) => { + // learun.layer.loading(false); + // if (data) {// 删除数据成功 + // learun.nav.closeCurrent(); + // var prepage = learun.nav.getpage('EducationalAdministration/Sys_SendComplaint'); + // prepage.grid.reload(); + // } + // }); + // } + // }, '智慧校园提示', ['取消', '确定']); + // } + //} + ], + cancel: function () { + } + }); + }); + // 提交 + $header.find('.lr-form-header-submit').on('tap', function () { + // 获取表单数据 + if (!$page.find('.lr-form-container').lrformValid()) { + return false; + } + var formData = $page.find('.lr-form-container').lrformGet(); + formData.Receiver = $page.find("#ReceiverUserId").find("div").text(); + var _postData = {} + _postData.keyValue = keyValue; + _postData.strEntity = JSON.stringify(formData); + learun.layer.loading(true, '正在提交数据'); + learun.httppost(config.webapi + 'learun/adms/EducationalAdministration/Sys_SendComplaint/saveAssign', _postData, (data) => { + learun.layer.loading(false); + if (data) {// 表单数据保存成功 + if (keyValue) { + learun.layer.toast('保存数据成功!'); + learun.formblur(); + $header.find('.lr-form-header-cancel').hide(); + $header.find('.lr-form-header-submit').hide(); + $header.find('.lr-form-header-btnlist').show(); + $header.find('.f-page-title').text(titleText); + $page.find('.lr-form-container').setFormRead(); + } + else {// 如果是 + learun.nav.closeCurrent(); + } + var prepage = learun.nav.getpage('EducationalAdministration/Sys_SendComplaint/Assign'); + prepage.grid.reload(); + } + }); + }); + page.bind($page, param); + if (keyValue) { + // 添加编辑按钮 + $page.find('.lr-form-container').setFormRead(); + $header.find('.lr-form-header-btnlist').show(); + // 获取表单数据 + learun.layer.loading(true, '获取表单数据'); + learun.httpget(config.webapi + 'learun/adms/EducationalAdministration/Sys_SendComplaint/form', keyValue, (data) => { + if (data) { + for (var id in data) { + if (data[id].length) { + $page.find('#' + id).lrgridSet(data[id]); + } + else { + $page.find('[data-table="' + id + '"]').lrformSet(data[id]); + } + } + } + learun.layer.loading(false); + }); + } + else { + $header.find('.lr-form-header-cancel').show(); + $header.find('.lr-form-header-submit').show(); + } + }, + bind: function ($page, param) { + $page.find('#ReceiverUserId').lrselect({ + type: 'user', + needPre: false + }); + }, destroy: function (pageinfo) { + $header = null; + keyValue = ''; + } + }; + return page; +})(); + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Sys_SendComplaint.css b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Sys_SendComplaint.css new file mode 100644 index 000000000..5f282702b --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Sys_SendComplaint.css @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Sys_SendComplaint.html b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Sys_SendComplaint.html new file mode 100644 index 000000000..948db718e --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Sys_SendComplaint.html @@ -0,0 +1,29 @@ +
+
+
+ 总共0条 +
+
+ + +
+
+
+
+ +
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Sys_SendComplaint.js b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Sys_SendComplaint.js new file mode 100644 index 000000000..e4f758a97 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Sys_SendComplaint.js @@ -0,0 +1,165 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2021-04-30 16:33 + * 描 述:发送投诉意见 + */ +(function () { + var begin = ''; + var end = ''; + var multipleData = null; + var page = { + grid: null, + init: function ($page) { + begin = ''; + end = ''; + multipleData = null; + page.grid = $page.find('#lr_EducationalAdministrationSys_SendComplaint_list').lrpagination({ + lclass: page.lclass, + rows: 10, // 每页行数 + getData: function (param, callback) {// 获取数据 param 分页参数,callback 异步回调 + param.begin = begin; + param.end = end; + param.multipleData = multipleData; + page.loadData(param, callback, $page); + }, + renderData: function (_index, _item, _$item) {// 渲染数据模板 + return page.rowRender(_index, _item, _$item, $page); + }, + click: function (item, $item, $et) {// 列表行点击事件 + if ($et.hasClass('lr-btn-danger')) {//删除 + page.btnClick(item, $item, $page); + } + else if ($et.hasClass('lr-btn-blue')) {//提交 + page.btnClickOfSubmit(item, $item, $page); + } + else if ($et.hasClass('lr-btn-green')) {//回复情况 + page.btnClickOfReply(item, $item, $page); + } + else { + page.rowClick(item, $item, $page); + } + }, + btns: page.rowBtns + }); + // 时间搜索 + $page.find('.lr_time_search').searchdate({ + callback: function (_begin, _end) { + begin = _begin; + end = _end; + multipleData = null; + page.grid.reload(); + } + }); + // 多条件查询 + var $multiple = $page.find('.lr_multiple_search').multiplequery({ + callback: function (data) { + begin = ''; + end = ''; + multipleData = data || {}; + page.grid.reload(); + } + }); + $page.find('#lr_EducationalAdministrationSys_SendComplaint_btn').on('tap', function () { + learun.nav.go({ path: 'EducationalAdministration/Sys_SendComplaint/form', title: '新增', type: 'right' }); + }); + }, + lclass: 'lr-list', + loadData: function (param, callback, $page) {// 列表加载后台数据 + var _postParam = { + pagination: { + rows: param.rows, + page: param.page, + sidx: 'SendTime desc', + sord: 'DESC' + }, + queryJson: JSON.stringify({ CreateUserId: learun.storage.get('userinfo').baseinfo.userId }) + + }; + if (param.multipleData) { + multipleData.CreateUserId = learun.storage.get('userinfo').baseinfo.userId; + _postParam.queryJson = JSON.stringify(multipleData); + } + if (param.begin && param.end) { + _postParam.queryJson = JSON.stringify({ StartTime: param.begin, EndTime: param.end, CreateUserId: learun.storage.get('userinfo').baseinfo.userId }); + } + learun.httpget(config.webapi + 'learun/adms/EducationalAdministration/Sys_SendComplaint/pagelist', _postParam, (data) => { + $page.find('.lr-badge').text('0'); + if (data) { + $page.find('.lr-badge').text(data.records); + callback(data.rows, parseInt(data.records)); + } + else { + callback([], 0); + } + }); + }, + rowRender: function (_index, _item, _$item, $page) {// 渲染列表行数据 + _$item.addClass('lr-list-item lr-list-item-multi'); + _$item.append($('

投诉编号:

').dataFormatter({ value: _item.ComplaintCode })); + _$item.append($('

主题:

').dataFormatter({ value: _item.Title })); + _$item.append($('

提交状态:

').dataFormatter({ value: _item.SendFlag == 1 ? "已提交" : "草稿" })); + _$item.append($('

提交时间:

').dataFormatter({ + value: _item.SendTime, + type: 'datetime', + dateformat: 'yyyy-MM-dd hh:mm:ss' + })); + _$item.append($('

回复状态:

').dataFormatter({ value: _item.ReplyFlag == 1 ? "已回复" : "未回复" })); + return ''; + }, + rowClick: function (item, $item, $page) {// 列表行点击触发方法 + learun.nav.go({ path: 'EducationalAdministration/Sys_SendComplaint/form', title: '详情', type: 'right', param: { keyValue: item.SComplaintId, SendFlag: item.SendFlag } }); + }, + btnClick: function (item, $item, $page) {// 左滑按钮点击事件 + if (item.SendFlag !== 0) { + learun.layer.warning("当前投诉意见已提交,无法删除!"); + return false; + } + learun.layer.confirm('确定要删除该笔数据吗?', function (_index) { + if (_index === '1') { + learun.layer.loading(true, '正在删除该笔数据'); + learun.httppost(config.webapi + 'learun/adms/EducationalAdministration/Sys_SendComplaint/delete', item.SComplaintId, (data) => { + if (data) {// 删除数据成功 + page.grid.reload(); + } + learun.layer.loading(false); + }); + } + }, '智慧校园提示', ['取消', '确定']); + }, + btnClickOfSubmit: function (item, $item, $page) {// 左滑按钮点击事件 + if (item.SendFlag !== 0) { + learun.layer.warning("当前投诉意见已提交!"); + return false; + } + learun.layer.confirm('确定要提交该笔数据吗?', function (_index) { + if (_index === '1') { + learun.layer.loading(true, '正在提交该笔数据'); + learun.httppost(config.webapi + 'learun/adms/EducationalAdministration/Sys_SendComplaint/submit', item.SComplaintId, (data) => { + if (data) {// 提交数据成功 + page.grid.reload(); + } + learun.layer.loading(false); + }); + } + }, '智慧校园提示', ['取消', '确定']); + }, + btnClickOfReply: function (item, $item, $page) {// 左滑按钮点击事件 + if (item.SendFlag !== 1) { + learun.layer.warning("当前投诉意见未提交,请先提交!"); + return false; + } + if (item.ReplyFlag !== 1) { + learun.layer.warning("当前投诉意见未回复!"); + return false; + } + learun.nav.go({ path: 'EducationalAdministration/Sys_SendComplaint/reply', title: '回复情况', type: 'right', param: { keyValue: item.SComplaintId } }); + }, + rowBtns: [ + '删除', + '提交', + '回复情况' + ] // 列表行左滑按钮 + }; + return page; +})(); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/form/form.css b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/form/form.css new file mode 100644 index 000000000..5f282702b --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/form/form.css @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/form/form.html b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/form/form.html new file mode 100644 index 000000000..6302b4f9b --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/form/form.html @@ -0,0 +1,17 @@ +
+
+ * + + +
+
+ * + + +
+
+ * + + +
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/form/form.js b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/form/form.js new file mode 100644 index 000000000..c2a2bd8b9 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/form/form.js @@ -0,0 +1,169 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2021-04-30 16:33 + * 描 述:发送投诉意见 + */ +(function () { + var keyValue = ''; + var SendFlag = '';//提交状态 + var $header = null; + var titleText = ''; + var page = { + isScroll: true, + init: function ($page, param) { + keyValue = param.keyValue; + SendFlag = param.SendFlag; + // 添加头部按钮列表 + var _html = '\ +
取消
\ +
\ +
\ +
\ +
\ +
提交
'; + $header = $page.parents('.f-page').find('.f-page-header'); + $header.append(_html); + // 取消 + $header.find('.lr-form-header-cancel').on('tap', function () { + learun.layer.confirm('确定要退出当前编辑?', function (_index) { + if (_index === '1') { + if (keyValue) {// 如果是编辑状态 + learun.formblur(); + $header.find('.lr-form-header-cancel').hide(); + $header.find('.lr-form-header-submit').hide(); + $header.find('.lr-form-header-btnlist').show(); + $header.find('.f-page-title').text(titleText); + $page.find('.lr-form-container').setFormRead(); + } + else {// 如果是新增状态 关闭当前页面 + learun.nav.closeCurrent(); + } + } + }, '智慧校园提示', ['取消', '确定']); + }); + // 编辑 + $header.find('.lr-form-header-edit').on('tap', function () { + if (keyValue) { + if (SendFlag !== 0) { + learun.layer.warning("当前投诉意见已提交,不能编辑!"); + return false; + } + } + $header.find('.lr-form-header-btnlist').hide(); + $header.find('.lr-form-header-cancel').show(); + $header.find('.lr-form-header-submit').show(); + titleText = $header.find('.f-page-title').text(); + $header.find('.f-page-title').text('编辑'); + $page.find('.lr-form-container').setFormWrite(); + }); + // 更多 + $header.find('.lr-form-header-more').on('tap', function () { + learun.actionsheet({ + id: 'more', + data: [ + { + text: '删除', + mark: true, + event: function () {// 删除当前条信息 + learun.layer.confirm('确定要删除该笔数据吗?', function (_index) { + if (_index === '1') { + learun.layer.loading(true, '正在删除该笔数据'); + learun.httppost(config.webapi + 'learun/adms/EducationalAdministration/Sys_SendComplaint/delete', keyValue, (data) => { + learun.layer.loading(false); + if (data) {// 删除数据成功 + learun.nav.closeCurrent(); + var prepage = learun.nav.getpage('EducationalAdministration/Sys_SendComplaint'); + prepage.grid.reload(); + } + }); + } + }, '智慧校园提示', ['取消', '确定']); + } + } + ], + cancel: function () { + } + }); + }); + // 提交 + $header.find('.lr-form-header-submit').on('tap', function () { + // 获取表单数据 + if (!$page.find('.lr-form-container').lrformValid()) { + return false; + } + var _postData = {} + _postData.keyValue = keyValue; + _postData.strEntity = JSON.stringify($page.find('.lr-form-container').lrformGet()); + learun.layer.loading(true, '正在提交数据'); + learun.httppost(config.webapi + 'learun/adms/EducationalAdministration/Sys_SendComplaint/save', _postData, (data) => { + learun.layer.loading(false); + if (data) {// 表单数据保存成功 + if (keyValue) { + learun.layer.toast('保存数据成功!'); + learun.formblur(); + $header.find('.lr-form-header-cancel').hide(); + $header.find('.lr-form-header-submit').hide(); + $header.find('.lr-form-header-btnlist').show(); + $header.find('.f-page-title').text(titleText); + $page.find('.lr-form-container').setFormRead(); + } + else {// 如果是 + learun.nav.closeCurrent(); + } + var prepage = learun.nav.getpage('EducationalAdministration/Sys_SendComplaint'); + prepage.grid.reload(); + } + }); + }); + page.bind($page, param); + if (keyValue) { + // 添加编辑按钮 + $page.find('.lr-form-container').setFormRead(); + $header.find('.lr-form-header-btnlist').show(); + // 获取表单数据 + learun.layer.loading(true, '获取表单数据'); + learun.httpget(config.webapi + 'learun/adms/EducationalAdministration/Sys_SendComplaint/form', keyValue, (data) => { + if (data) { + for (var id in data) { + if (data[id].length) { + $page.find('#' + id).lrgridSet(data[id]); + } + else { + $page.find('[data-table="' + id + '"]').lrformSet(data[id]); + } + } + } + learun.layer.loading(false); + }); + } + else { + $header.find('.lr-form-header-cancel').show(); + $header.find('.lr-form-header-submit').show(); + //获取投诉编号 + learun.httpget(config.webapi + 'learun/adms/EducationalAdministration/Sys_SendComplaint/complaintCode', "", (data) => { + if (data && data != "" && data != undefined) { + $page.find('#ComplaintCode').val(data); + } else { + $page.find('#ComplaintCode').val("TS_" + getCode()); + } + learun.layer.loading(false); + }); + } + }, + bind: function ($page, param) { + + }, destroy: function (pageinfo) { + $header = null; + keyValue = ''; + } + }; + return page; +})(); +//生成随机数 +var getCode = function () { + var a = parseInt(Math.random() * (10000 - 1000 + 1) + 1000); + var now = new Date(); + var b = now.getFullYear() + "" + ((now.getMonth() + 1) < 10 ? ("0" + (now.getMonth() + 1)) : (now.getMonth() + 1)) + "" + (now.getDate() < 10 ? ("0" + now.getDate()) : now.getDate()) + "" + (now.getHours() < 10 ? ("0" + now.getHours()) : now.getHours()) + "" + (now.getMinutes() < 10 ? ("0" + now.getMinutes()) : now.getMinutes()) + "" + (now.getSeconds() < 10 ? ("0" + now.getSeconds) : now.getSeconds()); + return b + a; +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/reply/reply.css b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/reply/reply.css new file mode 100644 index 000000000..5f282702b --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/reply/reply.css @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/reply/reply.html b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/reply/reply.html new file mode 100644 index 000000000..9f7849708 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/reply/reply.html @@ -0,0 +1,6 @@ +
+ +
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/reply/reply.js b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/reply/reply.js new file mode 100644 index 000000000..d04ab42de --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/reply/reply.js @@ -0,0 +1,45 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2021-04-30 16:33 + * 描 述:发送投诉意见 + */ +(function () { + var keyValue = ''; + var $header = null; + var titleText = ''; + var page = { + isScroll: true, + init: function ($page, param) { + keyValue = param.keyValue; + page.bind($page, param); + if (keyValue) { + // 获取表单数据 + learun.layer.loading(true, '获取表单数据'); + learun.httpget(config.webapi + 'learun/adms/EducationalAdministration/Sys_SendComplaint/replylist', keyValue, (data) => { + if (data) { + var html = ''; + for (var id in data) { + for (var i = 0; i < data[id].length; i++) { + html += '
'; + html += ''; + html += ''; + html += '
'; + } + } + $page.find('#replyList').html(html); + } + learun.layer.loading(false); + }); + } + }, + bind: function ($page, param) { + + }, destroy: function (pageinfo) { + $header = null; + keyValue = ''; + } + }; + return page; +})(); + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj index a84b93e4f..3b20af763 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj @@ -195,6 +195,8 @@ + + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/EducationalAdministration/Sys_ReceiveComplaintApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/EducationalAdministration/Sys_ReceiveComplaintApi.cs new file mode 100644 index 000000000..e3420bc4f --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/EducationalAdministration/Sys_ReceiveComplaintApi.cs @@ -0,0 +1,119 @@ +using Nancy; +using Learun.Util; +using System.Collections.Generic; +using System; +using Learun.Application.TwoDevelopment.EducationalAdministration; + +namespace Learun.Application.WebApi +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-04-30 14:33 + /// 描 述:投诉回复 + /// + public class Sys_ReceiveComplaintApi : BaseApi + { + private Sys_ReceiveComplaintIBLL sys_ReceiveComplaintIBLL = new Sys_ReceiveComplaintBLL(); + private Sys_SendComplaintIBLL sys_SendComplaintIBLL = new Sys_SendComplaintBLL(); + + /// + /// 注册接口 + /// + public Sys_ReceiveComplaintApi() + : base("/Learun/adms/EducationalAdministration/Sys_ReceiveComplaint") + { + Get["/pagelist"] = GetPageList; + Get["/form"] = GetForm; + Post["/delete"] = DeleteForm; + Post["/save"] = SaveForm; + } + #region 获取数据 + + /// + /// 获取页面显示列表分页数据 + /// + /// + /// + public Response GetPageList(dynamic _) + { + ReqPageParam parameter = this.GetReqData(); + var data = sys_ReceiveComplaintIBLL.GetPageList(parameter.pagination, parameter.queryJson); + var jsonData = new + { + rows = data, + total = parameter.pagination.total, + page = parameter.pagination.page, + records = parameter.pagination.records + }; + return Success(jsonData); + } + /// + /// 获取表单数据 + /// + /// + /// + public Response GetForm(dynamic _) + { + string keyValue = this.GetReqData(); + var Sys_ReceiveComplaintData = sys_ReceiveComplaintIBLL.GetSys_ReceiveComplaintEntity( keyValue ); + var jsonData = new { + Sys_ReceiveComplaint = Sys_ReceiveComplaintData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// + /// + public Response DeleteForm(dynamic _) + { + string keyValue = this.GetReqData(); + sys_ReceiveComplaintIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// + /// + public Response SaveForm(dynamic _) + { + ReqFormEntity parameter = this.GetReqData(); + Sys_ReceiveComplaintEntity entity = parameter.strEntity.ToObject(); + //接收投诉意见表 + var sys_ReceiveComplaintEntity = sys_ReceiveComplaintIBLL.GetSys_ReceiveComplaintEntity(parameter.keyValue); + sys_ReceiveComplaintEntity.ReplyContents = entity.ReplyContents; + sys_ReceiveComplaintEntity.ReplyFlag = 1; + sys_ReceiveComplaintEntity.ReplyTime = DateTime.Now; + sys_ReceiveComplaintIBLL.SaveEntity(parameter.keyValue, sys_ReceiveComplaintEntity); + //发送投诉意见表 + var sys_SendComplaintEntity = sys_SendComplaintIBLL.GetSys_SendComplaintEntity(sys_ReceiveComplaintEntity.SComplaintId); + if (sys_SendComplaintEntity.ReplyFlag == 0) //未回复 + { + sys_SendComplaintEntity.ReplyFlag = 1; + sys_SendComplaintIBLL.SaveEntity(sys_SendComplaintEntity.SComplaintId, sys_SendComplaintEntity); + } + return Success("保存成功!"); + } + #endregion + + #region 私有类 + + /// + /// 表单实体类 + /// + private class ReqFormEntity { + public string keyValue { get; set; } + public string strEntity{ get; set; } + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/EducationalAdministration/Sys_SendComplaintApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/EducationalAdministration/Sys_SendComplaintApi.cs new file mode 100644 index 000000000..3a247bbf0 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/EducationalAdministration/Sys_SendComplaintApi.cs @@ -0,0 +1,173 @@ +using Nancy; +using Learun.Util; +using System.Collections.Generic; +using System; +using Learun.Application.TwoDevelopment.EducationalAdministration; +using System.Linq; + +namespace Learun.Application.WebApi +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-04-30 14:33 + /// 描 述:投诉管理 + /// + public class Sys_SendComplaintApi : BaseApi + { + private Sys_SendComplaintIBLL sys_SendComplaintIBLL = new Sys_SendComplaintBLL(); + private Sys_ReceiveComplaintIBLL sys_ReceiveComplaintIBLL = new Sys_ReceiveComplaintBLL(); + + /// + /// 注册接口 + /// + public Sys_SendComplaintApi() + : base("/Learun/adms/EducationalAdministration/Sys_SendComplaint") + { + Get["/pagelist"] = GetPageList; + Get["/replylist"] = GetReplyList; + Get["/form"] = GetForm; + Get["/complaintCode"] = GetComplaintCode; + Post["/delete"] = DeleteForm; + Post["/save"] = SaveForm; + Post["/saveAssign"] = SaveAssignForm; + Post["/submit"] = SubmitForm; + } + #region 获取数据 + + /// + /// 获取页面显示列表分页数据 + /// + /// + /// + public Response GetPageList(dynamic _) + { + ReqPageParam parameter = this.GetReqData(); + var data = sys_SendComplaintIBLL.GetPageList(parameter.pagination, parameter.queryJson); + var jsonData = new + { + rows = data, + total = parameter.pagination.total, + page = parameter.pagination.page, + records = parameter.pagination.records + }; + return Success(jsonData); + } + + /// + /// 获取表单数据 + /// + /// + /// + public Response GetForm(dynamic _) + { + string keyValue = this.GetReqData(); + var Sys_SendComplaintData = sys_SendComplaintIBLL.GetSys_SendComplaintEntity(keyValue); + var jsonData = new + { + Sys_SendComplaint = Sys_SendComplaintData, + }; + return Success(jsonData); + } + /// + /// 获取表单数据 + /// + /// + /// + public Response GetComplaintCode(dynamic _) + { + var ComplaintCode = "TS_" + Util.CommonHelper.CreateNo(); + return SuccessString(ComplaintCode); + } + /// + /// 获取回复消息列表 + /// + /// + /// + public Response GetReplyList(dynamic _) + { + string keyValue = this.GetReqData(); + var Sys_ReceiveComplaintList = sys_ReceiveComplaintIBLL.GetSys_ReceiveComplaintList(keyValue).Where(x => x.ReplyFlag == 1).OrderByDescending(x => x.ReplyTime); + var jsonData = new + { + Sys_ReceiveComplaint = Sys_ReceiveComplaintList, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// + /// + public Response DeleteForm(dynamic _) + { + string keyValue = this.GetReqData(); + sys_SendComplaintIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// + /// + public Response SaveForm(dynamic _) + { + ReqFormEntity parameter = this.GetReqData(); + Sys_SendComplaintEntity entity = parameter.strEntity.ToObject(); + entity.CreateTime = DateTime.Now; + entity.CreateUserId = this.userInfo.userId; + entity.CreateUserName = this.userInfo.realName; + entity.SendFlag = 0; + entity.DelFlag = false; + entity.AssignFlag = 0; + entity.ReplyFlag = 0; + sys_SendComplaintIBLL.SaveEntity(parameter.keyValue, entity); + return Success("保存成功!"); + } + /// + /// 保存指派 + /// + /// + /// + public Response SaveAssignForm(dynamic _) + { + ReqFormEntity parameter = this.GetReqData(); + Sys_SendComplaintEntity entity = parameter.strEntity.ToObject(); + entity.SenderId = this.userInfo.userId; + entity.Sender = this.userInfo.realName; + sys_SendComplaintIBLL.AssignSaveEntity(parameter.keyValue, entity); + return Success("保存成功!"); + } + + /// + /// 提交 + /// + /// + /// + public Response SubmitForm(dynamic _) + { + string keyValue = this.GetReqData(); + sys_SendComplaintIBLL.SubmitEntity(keyValue); + return Success("提交成功!"); + } + #endregion + + #region 私有类 + + /// + /// 表单实体类 + /// + private class ReqFormEntity + { + public string keyValue { get; set; } + public string strEntity { get; set; } + } + #endregion + + } +}