Browse Source

【增加】移动端:增加投诉管理;

master
dyy 3 years ago
parent
commit
cb9f084cbf
25 changed files with 1392 additions and 8 deletions
  1. +8
    -8
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/config/config.js
  2. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_ReceiveComplaint/Sys_ReceiveComplaint.css
  3. +23
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_ReceiveComplaint/Sys_ReceiveComplaint.html
  4. +129
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_ReceiveComplaint/Sys_ReceiveComplaint.js
  5. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_ReceiveComplaint/form/form.css
  6. +17
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_ReceiveComplaint/form/form.html
  7. +154
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_ReceiveComplaint/form/form.js
  8. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Assign/Assign.css
  9. +27
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Assign/Assign.html
  10. +121
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Assign/Assign.js
  11. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Assign/form/form.css
  12. +22
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Assign/form/form.html
  13. +159
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Assign/form/form.js
  14. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Sys_SendComplaint.css
  15. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Sys_SendComplaint.html
  16. +165
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Sys_SendComplaint.js
  17. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/form/form.css
  18. +17
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/form/form.html
  19. +169
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/form/form.js
  20. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/reply/reply.css
  21. +6
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/reply/reply.html
  22. +45
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/reply/reply.js
  23. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj
  24. +119
    -0
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/EducationalAdministration/Sys_ReceiveComplaintApi.cs
  25. +173
    -0
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/EducationalAdministration/Sys_SendComplaintApi.cs

+ 8
- 8
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/config/config.js View File

@@ -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


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_ReceiveComplaint/Sys_ReceiveComplaint.css View File

@@ -0,0 +1 @@


+ 23
- 0
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_ReceiveComplaint/Sys_ReceiveComplaint.html View File

@@ -0,0 +1,23 @@
<div class="lr-page lr-EducationalAdministrationSys_ReceiveComplaint-page">
<div class="lr-page-tool">
<div class="lr-tool-left">
总共<span class="lr-badge lr-badge-primary">0</span>条
</div>
<div class="lr-tool-right">
<div class="lr-tool-right-btn lr_multiple_search">
<i class="iconfont icon-searchlist"></i>
<div class="lr-tool-right-btn-content lr-form-container">
<div class="lr-form-row">
<label>主题</label>
<input id="Title" type="text">
</div>
</div>
</div>
<div class="lr-tool-right-btn lr_time_search">
<i class="iconfont icon-time"></i>
</div>
</div>
</div>
<div class="lr-page-content" id="lr_EducationalAdministrationSys_ReceiveComplaint_list"></div>
</div>

+ 129
- 0
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_ReceiveComplaint/Sys_ReceiveComplaint.js View File

@@ -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($('<p class="lr-ellipsis"><span>投诉编号:</span></p>').dataFormatter({ value: _item.ComplaintCode }));
_$item.append($('<p class="lr-ellipsis"><span>主题:</span></p>').dataFormatter({ value: _item.Title }));
_$item.append($('<p class="lr-ellipsis"><span>指派人:</span></p>').dataFormatter({ value: _item.Sender }));
_$item.append($('<p class="lr-ellipsis"><span>指派时间:</span></p>').dataFormatter({
value: _item.SendTime,
type: 'datetime',
dateformat: 'yyyy-MM-dd hh:mm:ss'
}));
_$item.append($('<p class="lr-ellipsis"><span>回复状态:</span></p>').dataFormatter({ value: _item.ReplyFlag == 1 ? "已回复" : "未回复" }));
_$item.append($('<p class="lr-ellipsis"><span>回复时间:</span></p>').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: ['<a class="lr-btn-danger">删除</a>'] // 列表行左滑按钮
};
return page;
})();

+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_ReceiveComplaint/form/form.css View File

@@ -0,0 +1 @@


+ 17
- 0
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_ReceiveComplaint/form/form.html View File

@@ -0,0 +1,17 @@
<div class="lr-form-container">
<div class="lr-form-row " data-table="Sys_ReceiveComplaint">
<font face="宋体">*</font>
<label>主题</label>
<input id="Title" type="text" isvalid="yes" checkexpession="NotNull" errormsg="主题" readonly="readonly" />
</div>
<div class="lr-form-row lr-form-row-multi" data-table="Sys_ReceiveComplaint">
<font face="宋体">*</font>
<label>投诉意见</label>
<textarea id="Contents" isvalid="yes" checkexpession="NotNull" errormsg="投诉意见" readonly="readonly"></textarea>
</div>
<div class="lr-form-row lr-form-row-multi" data-table="Sys_ReceiveComplaint">
<font face="宋体">*</font>
<label>回复内容</label>
<textarea id="ReplyContents" isvalid="yes" checkexpession="NotNull" errormsg="回复内容"></textarea>
</div>
</div>

+ 154
- 0
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_ReceiveComplaint/form/form.js View File

@@ -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 = '\
<div class="lr-form-header-cancel" >取消</div>\
<div class="lr-form-header-btnlist" >\
<div class="lr-form-header-more" ><i class="iconfont icon-more" ></i></div>\
<div class="lr-form-header-edit" ><i class="iconfont icon-edit" ></i></div>\
</div>\
<div class="lr-form-header-submit" >提交</div>';
$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;
})();


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Assign/Assign.css View File

@@ -0,0 +1 @@


+ 27
- 0
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Assign/Assign.html View File

@@ -0,0 +1,27 @@
<div class="lr-page lr-EducationalAdministrationSys_SendComplaintAssign-page">
<div class="lr-page-tool">
<div class="lr-tool-left">
总共<span class="lr-badge lr-badge-primary">0</span>条
</div>
<div class="lr-tool-right">
<div class="lr-tool-right-btn lr_multiple_search">
<i class="iconfont icon-searchlist"></i>
<div class="lr-tool-right-btn-content lr-form-container">
<div class="lr-form-row">
<label>主题</label>
<input id="Title" type="text">
</div>
<div class="lr-form-row">
<label>投诉编号</label>
<input id="ComplaintCode" type="text">
</div>
</div>
</div>
<div class="lr-tool-right-btn lr_time_search">
<i class="iconfont icon-time"></i>
</div>
</div>
</div>
<div class="lr-page-content" id="lr_EducationalAdministrationSys_SendComplaintAssign_list"></div>

</div>

+ 121
- 0
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Assign/Assign.js View File

@@ -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($('<p class="lr-ellipsis"><span>投诉编号:</span></p>').dataFormatter({ value: _item.ComplaintCode }));
_$item.append($('<p class="lr-ellipsis"><span>主题:</span></p>').dataFormatter({ value: _item.Title }));
_$item.append($('<p class="lr-ellipsis"><span>投诉人:</span></p>').dataFormatter({ value: _item.CreateUserName }));
_$item.append($('<p class="lr-ellipsis"><span>指派状态:</span></p>').dataFormatter({ value: _item.AssignFlag == 1 ? "已指派" : "未指派" }));
_$item.append($('<p class="lr-ellipsis"><span>指派时间:</span></p>').dataFormatter({
value: _item.AssignTime,
type: 'datetime',
dateformat: 'yyyy-MM-dd hh:mm:ss'
}));
_$item.append($('<p class="lr-ellipsis"><span>接收人:</span></p>').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;
})();

+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Assign/form/form.css View File

@@ -0,0 +1 @@


+ 22
- 0
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Assign/form/form.html View File

@@ -0,0 +1,22 @@
<div class="lr-form-container">
<div class="lr-form-row " data-table="Sys_SendComplaint">
<font face="宋体">*</font>
<label>投诉编号</label>
<input id="ComplaintCode" type="text" isvalid="yes" checkexpession="NotNull" errormsg="投诉编号" readonly="readonly" />
</div>
<div class="lr-form-row " data-table="Sys_SendComplaint">
<font face="宋体">*</font>
<label>主题</label>
<input id="Title" type="text" isvalid="yes" checkexpession="NotNull" errormsg="主题" readonly="readonly" />
</div>
<div class="lr-form-row lr-form-row-multi" data-table="Sys_SendComplaint">
<font face="宋体">*</font>
<label>投诉意见</label>
<textarea id="Contents" isvalid="yes" checkexpession="NotNull" errormsg="投诉意见" readonly="readonly"></textarea>
</div>
<div class="lr-form-row " data-table="Sys_SendComplaint">
<font face="宋体">*</font>
<label>接收人</label>
<div id="ReceiverUserId" isvalid="yes" checkexpession="NotNull" errormsg="接收人" ></div>
</div>
</div>

+ 159
- 0
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Assign/form/form.js View File

@@ -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 = '\
<div class="lr-form-header-cancel" >取消</div>\
<div class="lr-form-header-btnlist" >\
<div class="lr-form-header-more" ><i class="iconfont icon-more" ></i></div>\
<div class="lr-form-header-edit" ><i class="iconfont icon-edit" ></i></div>\
</div>\
<div class="lr-form-header-submit" >提交</div>';
$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;
})();


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Sys_SendComplaint.css View File

@@ -0,0 +1 @@


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Sys_SendComplaint.html View File

@@ -0,0 +1,29 @@
<div class="lr-page lr-EducationalAdministrationSys_SendComplaint-page">
<div class="lr-page-tool">
<div class="lr-tool-left">
总共<span class="lr-badge lr-badge-primary">0</span>条
</div>
<div class="lr-tool-right">
<div class="lr-tool-right-btn lr_multiple_search">
<i class="iconfont icon-searchlist"></i>
<div class="lr-tool-right-btn-content lr-form-container">
<div class="lr-form-row">
<label>主题</label>
<input id="Title" type="text">
</div>
<div class="lr-form-row">
<label>投诉编号</label>
<input id="ComplaintCode" type="text">
</div>
</div>
</div>
<div class="lr-tool-right-btn lr_time_search">
<i class="iconfont icon-time"></i>
</div>
</div>
</div>
<div class="lr-page-content" id="lr_EducationalAdministrationSys_SendComplaint_list"></div>
<div class="lr-list-addbtn" id="lr_EducationalAdministrationSys_SendComplaint_btn">
<i class="iconfont icon-add1"></i>
</div>
</div>

+ 165
- 0
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Sys_SendComplaint.js View File

@@ -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($('<p class="lr-ellipsis"><span>投诉编号:</span></p>').dataFormatter({ value: _item.ComplaintCode }));
_$item.append($('<p class="lr-ellipsis"><span>主题:</span></p>').dataFormatter({ value: _item.Title }));
_$item.append($('<p class="lr-ellipsis"><span>提交状态:</span></p>').dataFormatter({ value: _item.SendFlag == 1 ? "已提交" : "草稿" }));
_$item.append($('<p class="lr-ellipsis"><span>提交时间:</span></p>').dataFormatter({
value: _item.SendTime,
type: 'datetime',
dateformat: 'yyyy-MM-dd hh:mm:ss'
}));
_$item.append($('<p class="lr-ellipsis"><span>回复状态:</span></p>').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: [
'<a class="lr-btn-danger">删除</a>',
'<a class="lr-btn-blue">提交</a>',
'<a class="lr-btn-green">回复情况</a>'
] // 列表行左滑按钮
};
return page;
})();

+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/form/form.css View File

@@ -0,0 +1 @@


+ 17
- 0
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/form/form.html View File

@@ -0,0 +1,17 @@
<div class="lr-form-container">
<div class="lr-form-row " data-table="Sys_SendComplaint">
<font face="宋体">*</font>
<label>投诉编号</label>
<input id="ComplaintCode" type="text" isvalid="yes" checkexpession="NotNull" errormsg="投诉编号" readonly="readonly"/>
</div>
<div class="lr-form-row " data-table="Sys_SendComplaint">
<font face="宋体">*</font>
<label>主题</label>
<input id="Title" type="text" isvalid="yes" checkexpession="NotNull" errormsg="主题" />
</div>
<div class="lr-form-row lr-form-row-multi" data-table="Sys_SendComplaint">
<font face="宋体">*</font>
<label>投诉意见</label>
<textarea id="Contents" isvalid="yes" checkexpession="NotNull" errormsg="投诉意见"></textarea>
</div>
</div>

+ 169
- 0
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/form/form.js View File

@@ -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 = '\
<div class="lr-form-header-cancel" >取消</div>\
<div class="lr-form-header-btnlist" >\
<div class="lr-form-header-more" ><i class="iconfont icon-more" ></i></div>\
<div class="lr-form-header-edit" ><i class="iconfont icon-edit" ></i></div>\
</div>\
<div class="lr-form-header-submit" >提交</div>';
$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;
}

+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/reply/reply.css View File

@@ -0,0 +1 @@


+ 6
- 0
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/reply/reply.html View File

@@ -0,0 +1,6 @@
<div class="lr-form-container" id="replyList">
<!--<div class="lr-form-row lr-form-row-multi">
<label>回复内容</label>
<textarea readonly="readonly"></textarea>
</div>-->
</div>

+ 45
- 0
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/reply/reply.js View File

@@ -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 += '<div class="lr-form-row lr-form-row-multi">';
html += '<label>回复内容</label>';
html += '<textarea readonly="readonly">' + data[id][i].ReplyContents + '</textarea>';
html += '</div>';
}
}
$page.find('#replyList').html(html);
}
learun.layer.loading(false);
});
}
},
bind: function ($page, param) {

}, destroy: function (pageinfo) {
$header = null;
keyValue = '';
}
};
return page;
})();


+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj View File

@@ -195,6 +195,8 @@
<Compile Include="Modules\ArrangeLessonTermAttemperApi.cs" />
<Compile Include="Modules\DataSourceNoLoginApi.cs" />
<Compile Include="Modules\AskApi.cs" />
<Compile Include="Modules\EducationalAdministration\Sys_ReceiveComplaintApi.cs" />
<Compile Include="Modules\EducationalAdministration\Sys_SendComplaintApi.cs" />
<Compile Include="Modules\EducationalAdministration\LoginUserBindApi.cs" />
<Compile Include="Modules\PushMessageApi.cs" />
<Compile Include="Modules\EvalApi.cs" />


+ 119
- 0
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/EducationalAdministration/Sys_ReceiveComplaintApi.cs View File

@@ -0,0 +1,119 @@
using Nancy;
using Learun.Util;
using System.Collections.Generic;
using System;
using Learun.Application.TwoDevelopment.EducationalAdministration;

namespace Learun.Application.WebApi
{
/// <summary>
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
/// Copyright (c) 2013-2018 北京泉江科技有限公司
/// 创 建:超级管理员
/// 日 期:2021-04-30 14:33
/// 描 述:投诉回复
/// </summary>
public class Sys_ReceiveComplaintApi : BaseApi
{
private Sys_ReceiveComplaintIBLL sys_ReceiveComplaintIBLL = new Sys_ReceiveComplaintBLL();
private Sys_SendComplaintIBLL sys_SendComplaintIBLL = new Sys_SendComplaintBLL();

/// <summary>
/// 注册接口
/// <summary>
public Sys_ReceiveComplaintApi()
: base("/Learun/adms/EducationalAdministration/Sys_ReceiveComplaint")
{
Get["/pagelist"] = GetPageList;
Get["/form"] = GetForm;
Post["/delete"] = DeleteForm;
Post["/save"] = SaveForm;
}
#region 获取数据

/// <summary>
/// 获取页面显示列表分页数据
/// <summary>
/// <param name="_"></param>
/// <returns></returns>
public Response GetPageList(dynamic _)
{
ReqPageParam parameter = this.GetReqData<ReqPageParam>();
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);
}
/// <summary>
/// 获取表单数据
/// <summary>
/// <param name="_"></param>
/// <returns></returns>
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 提交数据

/// <summary>
/// 删除实体数据
/// <param name="_"></param>
/// <summary>
/// <returns></returns>
public Response DeleteForm(dynamic _)
{
string keyValue = this.GetReqData();
sys_ReceiveComplaintIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}
/// <summary>
/// 保存实体数据(新增、修改)
/// <param name="_"></param>
/// <summary>
/// <returns></returns>
public Response SaveForm(dynamic _)
{
ReqFormEntity parameter = this.GetReqData<ReqFormEntity>();
Sys_ReceiveComplaintEntity entity = parameter.strEntity.ToObject<Sys_ReceiveComplaintEntity>();
//接收投诉意见表
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 私有类

/// <summary>
/// 表单实体类
/// <summary>
private class ReqFormEntity {
public string keyValue { get; set; }
public string strEntity{ get; set; }
}
#endregion

}
}

+ 173
- 0
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/EducationalAdministration/Sys_SendComplaintApi.cs View File

@@ -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
{
/// <summary>
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
/// Copyright (c) 2013-2018 北京泉江科技有限公司
/// 创 建:超级管理员
/// 日 期:2021-04-30 14:33
/// 描 述:投诉管理
/// </summary>
public class Sys_SendComplaintApi : BaseApi
{
private Sys_SendComplaintIBLL sys_SendComplaintIBLL = new Sys_SendComplaintBLL();
private Sys_ReceiveComplaintIBLL sys_ReceiveComplaintIBLL = new Sys_ReceiveComplaintBLL();

/// <summary>
/// 注册接口
/// <summary>
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 获取数据

/// <summary>
/// 获取页面显示列表分页数据
/// <summary>
/// <param name="_"></param>
/// <returns></returns>
public Response GetPageList(dynamic _)
{
ReqPageParam parameter = this.GetReqData<ReqPageParam>();
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);
}

/// <summary>
/// 获取表单数据
/// <summary>
/// <param name="_"></param>
/// <returns></returns>
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);
}
/// <summary>
/// 获取表单数据
/// <summary>
/// <param name="_"></param>
/// <returns></returns>
public Response GetComplaintCode(dynamic _)
{
var ComplaintCode = "TS_" + Util.CommonHelper.CreateNo();
return SuccessString(ComplaintCode);
}
/// <summary>
/// 获取回复消息列表
/// <summary>
/// <param name="_"></param>
/// <returns></returns>
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 提交数据

/// <summary>
/// 删除实体数据
/// <param name="_"></param>
/// <summary>
/// <returns></returns>
public Response DeleteForm(dynamic _)
{
string keyValue = this.GetReqData();
sys_SendComplaintIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}
/// <summary>
/// 保存实体数据(新增、修改)
/// <param name="_"></param>
/// <summary>
/// <returns></returns>
public Response SaveForm(dynamic _)
{
ReqFormEntity parameter = this.GetReqData<ReqFormEntity>();
Sys_SendComplaintEntity entity = parameter.strEntity.ToObject<Sys_SendComplaintEntity>();
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("保存成功!");
}
/// <summary>
/// 保存指派
/// <param name="_"></param>
/// <summary>
/// <returns></returns>
public Response SaveAssignForm(dynamic _)
{
ReqFormEntity parameter = this.GetReqData<ReqFormEntity>();
Sys_SendComplaintEntity entity = parameter.strEntity.ToObject<Sys_SendComplaintEntity>();
entity.SenderId = this.userInfo.userId;
entity.Sender = this.userInfo.realName;
sys_SendComplaintIBLL.AssignSaveEntity(parameter.keyValue, entity);
return Success("保存成功!");
}

/// <summary>
/// 提交
/// <param name="_"></param>
/// <summary>
/// <returns></returns>
public Response SubmitForm(dynamic _)
{
string keyValue = this.GetReqData();
sys_SendComplaintIBLL.SubmitEntity(keyValue);
return Success("提交成功!");
}
#endregion

#region 私有类

/// <summary>
/// 表单实体类
/// <summary>
private class ReqFormEntity
{
public string keyValue { get; set; }
public string strEntity { get; set; }
}
#endregion

}
}

Loading…
Cancel
Save