Browse Source

【增加】移动端:增加消息提醒列表;wabapi:增加消息提醒接口;

yanshi
dyy 2 years ago
parent
commit
4383cbeaf1
5 changed files with 193 additions and 0 deletions
  1. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/crm/MessageRind/MessageRind.css
  2. +26
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/crm/MessageRind/MessageRind.html
  3. +114
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/crm/MessageRind/MessageRind.js
  4. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj
  5. +51
    -0
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/LR_Crm/MessageRemindApi.cs

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

@@ -0,0 +1 @@


+ 26
- 0
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/crm/MessageRind/MessageRind.html View File

@@ -0,0 +1,26 @@
<div class="lr-page lr-crmMessageRind-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="BindUserAccount" 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_crmMessageRind_list">
</div>
</div>

+ 114
- 0
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/crm/MessageRind/MessageRind.js View File

@@ -0,0 +1,114 @@
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
* Copyright (c) 2013-2018 北京泉江科技有限公司
* 创建人:超级管理员
* 日 期:2022-05-07 14:50
* 描 述:消息提醒
*/
(function () {
var begin = '';
var end = '';
var multipleData = null;
var page = {
grid: null,
init: function ($page) {
begin = '';
end = '';
multipleData = null;
page.grid = $page.find('#lr_crmMessageRind_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({ })
};
if (param.multipleData) {
_postParam.queryJson = JSON.stringify(multipleData);
}
if (param.begin && param.end) {
_postParam.queryJson = JSON.stringify({ StartTime: param.begin, EndTime: param.end });
}
learun.httpget(config.webapi + 'learun/adms/crm/MessageRind/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.ReceiptName }));
_$item.append($('<p class="lr-ellipsis"><span>发件人姓名:</span></p>').dataFormatter({ value: _item.SenderName }));
_$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.TheTitle }));
_$item.append($('<p class="lr-ellipsis"><span>内容:</span></p>').dataFormatter({ value: _item.TheContent }));
_$item.append($('<p class="lr-ellipsis"><span>状态:</span></p>').dataFormatter({ value: _item.ReadSigns == false ? "未读" :"已读" }));
return '';
},
rowClick: function (item, $item, $page) {// 列表行点击触发方法

},
btnClick: function (item, $item, $page) {// 左滑按钮点击事件
//TODO:点哪个查看哪个列表页面
learun.nav.go({ path: 'crm/invoice', title: '开具发票', type: 'right', param: { keyValue: item.InstanceId } });


},
rowBtns: ['<a class="lr-btn-danger">查看</a>'] // 列表行左滑按钮
};
return page;
})();

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

@@ -191,6 +191,7 @@
</ItemGroup>
<ItemGroup>
<Compile Include="Bootstraper.cs" />
<Compile Include="Modules\LR_Crm\MessageRemindApi.cs" />
<Compile Include="Modules\PersonnelManagement\EvaluatingIndicatorApi.cs" />
<Compile Include="Modules\AnnexesApiWx.cs" />
<Compile Include="Modules\BaseNoLoginApi.cs" />


+ 51
- 0
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/LR_Crm/MessageRemindApi.cs View File

@@ -0,0 +1,51 @@
using Learun.Application.CRM;
using Learun.Application.TwoDevelopment.LR_Desktop;
using Nancy;

namespace Learun.Application.WebApi
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.0 数字化智慧校园
/// Copyright (c) 2013-2018 北京泉江科技有限公司
/// 创建人:数字化智慧校园-框架开发组
/// 日 期:2022.05.07
/// 描 述:消息提醒
/// </summary>
public class MessageRemindApi : BaseApi
{
MessageRindIBLL messageRindIBLL = new MessageRindBLL();

/// <summary>
/// 注册接口
/// </summary>
public MessageRemindApi()
: base("/learun/adms/crm/MessageRind")
{
Get["/pagelist"] = GetPageList;

}
#region 获取数据

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

#endregion
}
}

Loading…
Cancel
Save