|
|
@@ -1,211 +0,0 @@ |
|
|
|
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) |
|
|
|
* Copyright (c) 2013-2018 北京泉江科技有限公司 |
|
|
|
* 创建人:超级管理员 |
|
|
|
* 日 期:2019-10-22 16:58 |
|
|
|
* 描 述:文件接收 |
|
|
|
*/ |
|
|
|
var refreshGirdData; |
|
|
|
var bootstrap = function ($, learun) { |
|
|
|
"use strict"; |
|
|
|
var processId = ''; |
|
|
|
var startTime; |
|
|
|
var endTime; |
|
|
|
var loginInfo = top.learun.clientdata.get(['userinfo']); |
|
|
|
var page = { |
|
|
|
init: function () { |
|
|
|
page.initGird(); |
|
|
|
page.bind(); |
|
|
|
}, |
|
|
|
bind: function () { |
|
|
|
// 时间搜索框 |
|
|
|
$('#datesearch').lrdate({ |
|
|
|
dfdata: [ |
|
|
|
{ name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, |
|
|
|
{ name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, |
|
|
|
{ name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, |
|
|
|
{ name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } } |
|
|
|
], |
|
|
|
// 月 |
|
|
|
mShow: false, |
|
|
|
premShow: false, |
|
|
|
// 季度 |
|
|
|
jShow: false, |
|
|
|
prejShow: false, |
|
|
|
// 年 |
|
|
|
ysShow: false, |
|
|
|
yxShow: false, |
|
|
|
preyShow: false, |
|
|
|
yShow: false, |
|
|
|
// 默认 |
|
|
|
dfvalue: '1', |
|
|
|
selectfn: function (begin, end) { |
|
|
|
startTime = begin; |
|
|
|
endTime = end; |
|
|
|
page.search(); |
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { |
|
|
|
page.search(queryJson); |
|
|
|
}, 220, 400); |
|
|
|
$('#RReceiveUnit').lrDepartmentSelect(); |
|
|
|
|
|
|
|
// 刷新 |
|
|
|
$('#lr_refresh').on('click', function () { |
|
|
|
location.reload(); |
|
|
|
}); |
|
|
|
// 查看 |
|
|
|
$('#lr_view').on('click', function () { |
|
|
|
var keyValue = $('#gridtable').jfGridValue('RID'); |
|
|
|
if (learun.checkrow(keyValue)) { |
|
|
|
learun.layerForm({ |
|
|
|
id: 'form', |
|
|
|
title: '查看', |
|
|
|
url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveDocument/FormView?keyValue=' + keyValue, |
|
|
|
width: 800, |
|
|
|
height: 600, |
|
|
|
callBack: function (id) { |
|
|
|
var res = false; |
|
|
|
// 验证数据 |
|
|
|
res = top[id].validForm(); |
|
|
|
// 保存数据 |
|
|
|
if (res) { |
|
|
|
res = top[id].save('', function () { |
|
|
|
page.search(); |
|
|
|
}); |
|
|
|
} |
|
|
|
return res; |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
// 初始化列表 |
|
|
|
initGird: function () { |
|
|
|
$('#gridtable').jfGrid({ |
|
|
|
url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveDocument/GetPageListStatistics', |
|
|
|
headData: [ |
|
|
|
{ |
|
|
|
label: "录入人员", name: "SenderId", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { |
|
|
|
learun.clientdata.getAsync('custmerData', { |
|
|
|
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'teacheruserdata', |
|
|
|
key: value, |
|
|
|
keyId: 'f_userid', |
|
|
|
callback: function (_data) { |
|
|
|
callback(_data['f_realname']); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
}, |
|
|
|
{ label: "收文时间", name: "RReceiveTime", width: 100, align: "left" }, |
|
|
|
{ label: "来文单位", name: "RSourceUnit", width: 100, align: "left" }, |
|
|
|
{ label: "字第(号)", name: "lwz", width: 100, align: "left" }, |
|
|
|
{ |
|
|
|
label: "收文单位", name: "RReceiveUnit", width: 100, align: "left", |
|
|
|
formatterAsync: function (callback, value, row, op, $cell) { |
|
|
|
learun.clientdata.getAsync('department', { |
|
|
|
key: value, |
|
|
|
callback: function (_data) { |
|
|
|
callback(_data.name); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
}, |
|
|
|
{ label: "字第(号)", name: "swz", width: 100, align: "left" }, |
|
|
|
{ |
|
|
|
label: "缓急程度", name: "RUrgencyDegree", width: 100, align: "left", |
|
|
|
formatterAsync: function (callback, value, row, op, $cell) { |
|
|
|
learun.clientdata.getAsync('dataItem', { |
|
|
|
key: value, |
|
|
|
code: 'UrgencyDegree', |
|
|
|
callback: function (_data) { |
|
|
|
callback(_data.text); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
}, |
|
|
|
{ label: "文件标题", name: "RTitle", width: 100, align: "left" }, |
|
|
|
{ |
|
|
|
label: "已接收", name: "ReceiverId", width: 300, align: "left", formatterAsync: |
|
|
|
function (callback, value, row, op, $cell) { |
|
|
|
learun.clientdata.getAsync('user', |
|
|
|
{ |
|
|
|
key: value, |
|
|
|
callback: function (_data) { |
|
|
|
if (_data.length > 0) { |
|
|
|
var text = ''; |
|
|
|
$.each(_data, |
|
|
|
function (i, item) { |
|
|
|
if (item) { |
|
|
|
text += item.name + ','; |
|
|
|
} |
|
|
|
}); |
|
|
|
text = text.substring(0, text.lastIndexOf(',')); |
|
|
|
callback(text); |
|
|
|
} else { |
|
|
|
callback(_data.name); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: "状态", name: "RSendFlag", width: 100, align: "left", |
|
|
|
formatter: function (cellvalue, row) { |
|
|
|
if (cellvalue === "1") { |
|
|
|
return '<span class=\"label label-warning\">已下发</span>'; |
|
|
|
} else if (cellvalue === "4") { |
|
|
|
return '<span class=\"label label-success\" >下发完毕</span>'; |
|
|
|
} else { |
|
|
|
return '<span class=\"label label-default\" >草稿</span>'; |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: "是否需要处理", name: "HasDispose", width: 100, align: "left", |
|
|
|
formatter: function (cellvalue, row) { |
|
|
|
if (cellvalue == "1") { |
|
|
|
return '<span class=\"label label-warning\">需要处理</span>'; |
|
|
|
} else { |
|
|
|
return '<span class=\"label label-success\" >无需处理</span>'; |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: "阅读人数/接受人数", name: "NumberPeople", width: 150, align: "left" |
|
|
|
|
|
|
|
} |
|
|
|
], |
|
|
|
mainId: 'RID', |
|
|
|
isPage: true |
|
|
|
}); |
|
|
|
//page.search(); |
|
|
|
}, |
|
|
|
search: function (param) { |
|
|
|
|
|
|
|
param = param || {}; |
|
|
|
param.SenderId = loginInfo.userId; |
|
|
|
param.StartTime = startTime; |
|
|
|
param.EndTime = endTime; |
|
|
|
param.SqlParameter = ' AND RSendFlag<>4'; |
|
|
|
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); |
|
|
|
} |
|
|
|
}; |
|
|
|
//refreshGirdData = function (res, postData) { |
|
|
|
// if (res.code == 200) { |
|
|
|
// // 发起流程 |
|
|
|
// var postData = { |
|
|
|
// schemeCode: 'Sys_ReceiveDocument',// 填写流程对应模板编号 |
|
|
|
// processId: processId, |
|
|
|
// level: '1', |
|
|
|
// }; |
|
|
|
// learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) { |
|
|
|
// learun.loading(false); |
|
|
|
// }); |
|
|
|
|
|
|
|
// page.search(); |
|
|
|
// } |
|
|
|
//}; |
|
|
|
page.init(); |
|
|
|
} |