@@ -0,0 +1,69 @@ | |||
数字化智慧校园 | |||
统一身份认证补充接口 | |||
V1.0 | |||
概述 | |||
根据特定需求开发补充接口 | |||
登录接口 | |||
采用标准Http GET 请求发送用户名、密码到认证接口,接口实现用户名密码判定后返回标准json; | |||
请求地址:http://112.45.152.8:8000/Login/CheckLoginForSSOBC | |||
请求方式:发送标准Http GET请求到认证地址 | |||
接口请求参数 | |||
参数 | |||
说明 | |||
u | |||
用户名 | |||
p | |||
密码 | |||
认证接口返回参数 | |||
参数 | |||
说明 | |||
code | |||
状态码 返回200成功、其他失败 | |||
info | |||
状态消息 返回login success表示登录成功、其他失败 | |||
data | |||
保留 暂时无用 | |||
登录成功后,认证服务器将在用户浏览器cookies中写入数字化智慧校园系统数据,第三方系统可直接跳转到http://112.45.152.8:8000/Home/Index 进入数字化智慧校园系统。 | |||
退出登录接口 | |||
第三方系统退出时,需要主动调用退出登录接口以同步数字化智慧校园系统退出状态。 | |||
采用标准Http POST 请求,返回标准json; | |||
请求地址:http://112.45.152.8:8000/Login/OutLoginForSSOBC | |||
请求方式:发送标准Http POST请求到认证地址 | |||
接口请求参数:无 | |||
认证接口返回参数 | |||
参数 | |||
说明 | |||
code | |||
状态码 返回200成功、其他失败 | |||
info | |||
状态消息 返回logout success表示退出成功、其他失败 | |||
data | |||
保留 暂时无用 | |||
@@ -1,15 +1,15 @@ | |||
var config = { | |||
webapi: 'http://localhost:8088/', | |||
web: "http://localhost:8087/"//web地址,用于配置logo | |||
}; | |||
//var config = { | |||
// var config = { | |||
// webapi: 'http://localhost:8080/', | |||
// web: "http://localhost:8082/"//web地址,用于配置logo | |||
// }; | |||
// var config = { | |||
// webapi: 'http://112.230.201.53:31173/', | |||
// web:"http://112.230.201.53/:8081/"//web地址,用于配置logo | |||
//}; | |||
//var config = { | |||
// webapi: 'http://localhost:31173/', | |||
// web: "http://localhost:20472/"//web地址,用于配置logo | |||
//}; | |||
// }; | |||
var config = { | |||
webapi: 'http://localhost:31173/', | |||
web: "http://localhost:20472/"//web地址,用于配置logo | |||
}; | |||
//var config = { | |||
@@ -1,4 +1,4 @@ | |||
var cityData = [{ | |||
var cityData = [{ | |||
value: '110000', | |||
text: '北京市', | |||
children: [{ | |||
@@ -7242,7 +7242,11 @@ | |||
}] | |||
}, { | |||
value: "441900", | |||
text: "东莞市" | |||
text: "东莞市", | |||
children: [{ | |||
value: "441901", | |||
text: "市辖区" | |||
}] | |||
}, { | |||
value: "442000", | |||
text: "中山市" | |||
@@ -1,4 +1,4 @@ | |||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2020-02-03 14:37 | |||
@@ -48,7 +48,7 @@ | |||
code: 'EUserType' | |||
}); | |||
$page.find('#lr_PersonnelManagementEpidemicSituation_btn').on('tap', function () { | |||
learun.nav.go({ path: 'PersonnelManagement/EpidemicSituationCopy/form', title: '新增', type: 'right' }); | |||
learun.nav.go({ path: 'PersonnelManagement/EpidemicSituationCopy/form', title: '每日疫情打卡', type: 'right' }); | |||
}); | |||
}, | |||
lclass: 'lr-list', | |||
@@ -57,7 +57,7 @@ | |||
pagination: { | |||
rows: param.rows, | |||
page: param.page, | |||
sidx: 'ID', | |||
sidx: 'CreateTime', | |||
sord: 'DESC' | |||
}, | |||
queryJson: '{}' | |||
@@ -1,4 +1,4 @@ | |||
<div class="lr-form-container"> | |||
<div class="lr-form-container"> | |||
<div class="lr-form-row " data-table="EpidemicSituation"> | |||
<label>填报人员</label> | |||
@@ -7,22 +7,22 @@ | |||
<div class="lr-form-row " data-table="EpidemicSituation"> | |||
<label>填报时间</label> | |||
<div id="CreateTime"></div> | |||
<div id="CreateTime" readonly="readonly"></div> | |||
</div> | |||
<div class="lr-form-row " data-table="EpidemicSituation"> | |||
<label>类别</label> | |||
<div id="Type"></div> | |||
<div id="Type" readonly="readonly"></div> | |||
</div> | |||
<div class="lr-form-row " data-table="EpidemicSituation"> | |||
<label>所在部门</label> | |||
<div id="Department"></div> | |||
<div id="Department" readonly="readonly"></div> | |||
</div> | |||
<div class="lr-form-row " data-table="EpidemicSituation"> | |||
<label>所在班级</label> | |||
<input id="StudentSource" type="text" /> | |||
<input id="StudentSource" type="text" readonly="readonly"/> | |||
</div> | |||
<div class="lr-form-row " data-table="EpidemicSituation"> | |||
@@ -32,18 +32,18 @@ | |||
<div class="lr-form-row " data-table="EpidemicSituation"> | |||
<label>性别</label> | |||
<div id="Gender"></div> | |||
<div id="Gender" readonly="readonly"></div> | |||
</div> | |||
<div class="lr-form-row " data-table="EpidemicSituation"> | |||
<label>家庭住址</label> | |||
<input id="HomeAddress" type="text" /> | |||
<input id="HomeAddress" type="text" readonly="readonly"/> | |||
<div id="allmap" style="display: none;"></div> | |||
</div> | |||
<div class="lr-form-row " data-table="EpidemicSituation"> | |||
<label>联系方式</label> | |||
<input id="Mobile" type="text" /> | |||
<input id="Mobile" type="text" readonly="readonly"/> | |||
</div> | |||
<div class="lr-form-row " data-table="EpidemicSituation"> | |||
@@ -51,7 +51,7 @@ | |||
<input id="Objective" type="text" /> | |||
</div> | |||
<div class="lr-form-row " data-table="EpidemicSituation"> | |||
<label>*是否外出</label> | |||
<label>*外出旅居</label> | |||
<div id="IsOut"></div> | |||
</div> | |||
<div class="lr-form-row" id="PassPlaces"></div> | |||
@@ -61,7 +61,7 @@ | |||
</div> | |||
<div class="lr-form-row" id="ContactsDetails"></div> | |||
<div class="lr-form-row " data-table="EpidemicSituation"> | |||
<label>*疫区人异常</label> | |||
<label>*新冠病例接触</label> | |||
<div id="HasPeople"></div> | |||
</div> | |||
<div class="lr-form-row" id="PeopleDetails"></div> | |||
@@ -1,4 +1,4 @@ | |||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2020-02-03 14:37 | |||
@@ -11,6 +11,7 @@ | |||
var page = { | |||
isScroll: true, | |||
init: function ($page, param) { | |||
learun.layer.loading(true, '正在加载...'); | |||
keyValue = param.keyValue; | |||
// 添加头部按钮列表 | |||
var _html = '\ | |||
@@ -363,6 +364,7 @@ | |||
$page.find('#Department').parent().show(); | |||
$page.find('#StudentSource').parent().hide(); | |||
} | |||
learun.layer.loading(false); | |||
}, destroy: function (pageinfo) { | |||
$header = null; | |||
keyValue = ''; | |||
@@ -0,0 +1,63 @@ | |||
.lr-login-page { | |||
position: relative; | |||
height: 100%; | |||
width: 100%; | |||
background-color: #fff; | |||
} | |||
.lr-login-page .login-content { | |||
position: absolute; | |||
width: 100%; | |||
height: 280px; | |||
top: 50%; | |||
margin-top: -210px; | |||
text-align: center; | |||
} | |||
.lr-login-page .login-content > img { | |||
width: 60px; | |||
height: 60px; | |||
border-radius: 50%; | |||
margin-bottom: 60px; | |||
} | |||
.lr-login-page .line { | |||
position: relative; | |||
margin: auto; | |||
width: 92%; | |||
height: 35px; | |||
line-height: 35px; | |||
border-bottom: 1px solid #eeeeee; | |||
padding-left: 35px; | |||
} | |||
.lr-login-page .line i { | |||
position: absolute; | |||
left: 10px; | |||
font-size: 18px; | |||
color: #666; | |||
} | |||
.lr-login-page .line input { | |||
position: relative; | |||
line-height: 20px; | |||
width: 100%; | |||
background: transparent; | |||
border: none; | |||
font-size: 14px; | |||
} | |||
.lr-login-page button { | |||
margin: auto; | |||
margin-top: 25px; | |||
width: 92%; | |||
} | |||
.lr-login-page .version { | |||
position: absolute; | |||
width: 100%; | |||
bottom: 5px; | |||
text-align: center; | |||
font-size: 12px; | |||
color: #ccc; | |||
} |
@@ -0,0 +1,17 @@ | |||
<div class="lr-login-page"> | |||
<div class="login-content"> | |||
<img src="" /> | |||
<div class="line"> | |||
<i class="iconfont icon-friend_light"></i> | |||
<input id="idcard" type="text" placeholder="学生身份证号"> | |||
</div> | |||
<div class="line"> | |||
<i class="iconfont icon-lock"></i> | |||
<input id="pwd" type="password" placeholder="新生身份证号码后8位"> | |||
</div> | |||
<button id="loginBtn" type="button" class="lr-btn-primary lr-btn-block"> | |||
登录 | |||
</button> | |||
</div> | |||
<div class="version"></div> | |||
</div> |
@@ -0,0 +1,104 @@ | |||
(function () { | |||
var isBindAccountLogin = '';//切换账号登录 | |||
var bindUserName = '';//绑定账号 | |||
var bindUserPassword = '';//绑定账号密码 | |||
var page = { | |||
headColor: '#ffffff', | |||
init: function ($page, param) { | |||
//切换账号登录时:登录页赋值,触发登录事件; | |||
isBindAccountLogin = param.isBindAccountLogin; | |||
bindUserName = param.bindUserName; | |||
bindUserPassword = param.bindUserPassword; | |||
if (isBindAccountLogin == 1) { | |||
$page.find('#account').val(bindUserName); | |||
$page.find('#password').val(bindUserPassword); | |||
var timer = setTimeout(function () { | |||
$page.find('#loginBtn').trigger("tap"); | |||
clearTimeout(timer); | |||
}, 3000); | |||
} | |||
var path = config.webapi; | |||
// learun.http.get(path + "Learun/adms/EducationalAdministration/EmpRegister/registerbutton", | |||
// {}, (res) => { | |||
// if (res.info == "True") { | |||
// var button = $page.find('#RegisterBtn'); | |||
// button.show(); | |||
// } | |||
// }); | |||
//获取ACIp | |||
learun.http.get(path + "weixinapi/GetACIp", | |||
{}, (res) => { | |||
learun.storage.set("Ip", res.data.Ip); | |||
learun.storage.set("ACIp", res.data.ACIp); | |||
learun.storage.set("ACIp2", res.data.ACIp2); | |||
}); | |||
$page.find('img').attr('src', config.web + "Login/GetImg?code=applogo"); | |||
$page.find('#loginBtn').on('tap', function () { | |||
var account = $('#idcard').val(); | |||
var password = $('#pwd').val(); | |||
var up = false; | |||
if (account === "") { | |||
learun.layer.warning('身份证号不能为空!', function () { }, '提示', '关闭'); | |||
}else if(account.length<=6){ | |||
learun.layer.warning('身份证号输入有误!', function () { }, '提示', '关闭'); | |||
} else if (password === "") { | |||
learun.layer.warning('密码不能为空!', function () { }, '提示', '关闭'); | |||
} else { | |||
var data = { | |||
username: account, | |||
password: password, | |||
up: up | |||
}; | |||
var postdata = { | |||
token: '', | |||
loginMark: learun.deviceId(),// 正式请换用设备号 | |||
data: JSON.stringify(data) | |||
}; | |||
learun.layer.loading(true, "正在登录,请稍后"); | |||
learun.http.post(path + "learun/adms/user/loginbyIdCard", postdata, (res) => { | |||
learun.layer.loading(false); | |||
if (res === null) { | |||
learun.layer.warning('无法连接服务器,请检测网络!', function () { }, '提示', '关闭'); | |||
return; | |||
} | |||
if (res.code === 200) { | |||
var logininfo = { | |||
account: account, | |||
token: res.data.baseinfo.token, | |||
date: learun.date.format(new Date(), 'yyyy-MM-dd hh:mm:ss') | |||
}; | |||
learun.storage.set('logininfo', logininfo); | |||
learun.storage.set('userinfo', res.data); | |||
$('#account').val(''); | |||
$('#password').val(''); | |||
if (res.data.pwd === true) { | |||
learun.storage.set('pwdandnotice', true); | |||
} else { | |||
learun.storage.set('pwdandnotice', false); | |||
} | |||
learun.tab.go('workspace'); | |||
if (learun.storage.get("Ip") != null && learun.storage.get("ACIp") != "") { | |||
//Ip上网 | |||
sendToAc(learun.storage.get("ACIp"), 'logon', learun.storage.get("Ip"), account, ''); | |||
} | |||
if (learun.storage.get("Ip") != null && learun.storage.get("ACIp2") != "") { | |||
//Ip上网 | |||
sendToAc(learun.storage.get("ACIp2"), 'logon', learun.storage.get("Ip"), account, ''); | |||
} | |||
} else { | |||
learun.layer.warning(res.info, function () { }, '提示', '关闭'); | |||
} | |||
}); | |||
} | |||
}); | |||
} | |||
}; | |||
return page; | |||
})(); |
@@ -1,4 +1,4 @@ | |||
<div class="lr-login-page"> | |||
<div class="lr-login-page"> | |||
<div class="login-content"> | |||
<img src="" /> | |||
<div class="line"> | |||
@@ -15,6 +15,9 @@ | |||
<button id="bindweixinBtn" type="button" class="lr-btn-primary lr-btn-block"> | |||
微信登录 | |||
</button> | |||
<button id="bindidcardBtn" type="button" class="lr-btn-primary lr-btn-block"> | |||
新生首次登录入口 | |||
</button> | |||
<button id="RegisterBtn" type="button" style="display:none;" class="lr-btn-primary lr-btn-block"> | |||
注册 | |||
</button> | |||
@@ -1,4 +1,4 @@ | |||
(function () { | |||
(function () { | |||
var isBindAccountLogin = '';//切换账号登录 | |||
var bindUserName = '';//绑定账号 | |||
var bindUserPassword = '';//绑定账号密码 | |||
@@ -106,7 +106,10 @@ | |||
function () { | |||
location.href = "/weixinlogin.html"; | |||
}); | |||
$page.find('#bindidcardBtn').on('tap', | |||
function () { | |||
learun.nav.go({ path: 'login/IdCardLogin', title: '身份证登录', type: 'right' }); | |||
}); | |||
} | |||
}; | |||
return page; | |||
@@ -0,0 +1 @@ | |||
|
@@ -0,0 +1,34 @@ | |||
<<div style="margin-top:10px;" class="lr-form-container" id="modifypasswordform"> | |||
<div class="lr-form-row"> | |||
<label>原密码</label> | |||
<input id="oldpassword" type="password" isvalid="yes" checkexpession="NotNull" errormsg="原密码"> | |||
</div> | |||
<div class="lr-form-row"> | |||
<label>新密码</label> | |||
<input id="newpassword" type="password" isvalid="yes" checkexpession="NotNull" errormsg="新密码"> | |||
</div> | |||
<div class="lr-form-row"> | |||
<label>确认新密码</label> | |||
<input id="newpassword1" type="password" isvalid="yes" checkexpession="NotNull" errormsg="确认新密码"> | |||
</div> | |||
</div> | |||
<div class="lr-list" style="margin-top: 15px;"> | |||
<div id="strongpwd" style="display: none;"> | |||
您的密码不满足强度要求,请您先修改密码后再执行系统其他操作! | |||
</div> | |||
<div> | |||
新密码必须8-20位同时包含1.[大小写字母]、2[数字]、3[特殊符号!@@#$%^&*] | |||
</div> | |||
<div> | |||
学生学号请登录后点击【我的】->点击头像->查看【帐号】 | |||
</div> | |||
<div class="lr-list-item" style="color: red; text-align: center;" id="savepassword"> | |||
保存 | |||
</div> | |||
</div> | |||
<div class="lr-list" style="margin-top:15px;display: none;" id="strongpwdout" > | |||
<div class="lr-list-item" style="color:red;text-align:center;" id="outloginbtn"> | |||
退出 | |||
</div> | |||
</div> |
@@ -0,0 +1,68 @@ | |||
(function () { | |||
var userinfo = null; | |||
var page = { | |||
isScroll: true, | |||
init: function ($page) { | |||
userinfo = learun.storage.get('userinfo'); | |||
//主被动修改密码判断 | |||
if (learun.storage.get('pwd')===true) { | |||
$page.find('#strongpwd').css("display", "block"); | |||
$page.find('#strongpwdout').css("display", "block"); | |||
} | |||
$page.find('#savepassword').on('tap', function () { | |||
if (!$('#modifypasswordform').lrformValid()) { | |||
return false; | |||
} | |||
var formdata = $('#modifypasswordform').lrformGet(); | |||
var reg = /^(?=.*[0-9])(?=.*[A-Z])(?=.*[a-z])(?=.*[!@#$%^&*,\.])[0-9a-zA-Z!@#$%^&*,\.]{8,20}$/; | |||
if (!reg.test(formdata.newpassword)) { | |||
learun.layer.toast('密码不满足强度要求'); | |||
return false; | |||
} | |||
if (formdata.newpassword1 === formdata.newpassword) { | |||
var req = { | |||
newpassword: $.md5(formdata.newpassword), | |||
oldpassword: formdata.oldpassword | |||
}; | |||
learun.layer.loading(true); | |||
// 访问后台修改密码 | |||
learun.httppost(config.webapi + "learun/adms/user/modifypwiden", req, (data,info) => { | |||
learun.layer.loading(false); | |||
if (data) {// 表单数据保存成功,发起流程 | |||
learun.layer.toast(info); | |||
//learun.storage.set('logininfo', null); | |||
learun.storage.set('pwdandnotice', false); | |||
learun.storage.set('isUpdStu', true); | |||
learun.nav.go({ path: 'workspace', isBack: false, isHead: false }); | |||
} | |||
return false; | |||
}); | |||
} | |||
else { | |||
learun.layer.toast('二次输入密码不同'); | |||
} | |||
}); | |||
$page.find('#outloginbtn').on('tap', function () { | |||
learun.layer.confirm('确定要退出账号?', function (_index) { | |||
if (_index === '1') { | |||
learun.isOutLogin = true; | |||
if (learun.storage.get("Ip") != null && learun.storage.get("ACIp") != "") { | |||
//Ip上网 | |||
sendToAc(learun.storage.get("ACIp"), 'logout', learun.storage.get("Ip"), userinfo.baseinfo.account, ''); | |||
} | |||
if (learun.storage.get("Ip") != null && learun.storage.get("ACIp2") != "") { | |||
//Ip上网 | |||
sendToAc(learun.storage.get("ACIp2"), 'logout', learun.storage.get("Ip"), userinfo.baseinfo.account, ''); | |||
} | |||
learun.storage.set('logininfo', null); | |||
learun.nav.go({ path: 'login', isBack: false, isHead: false }); | |||
} | |||
}, '', ['取消', '退出']); | |||
}); | |||
} | |||
}; | |||
return page; | |||
})(); |
@@ -1,132 +1,259 @@ | |||
.welcome { | |||
padding: 1px 12px 20px; | |||
background: #fff; | |||
height: 100%; | |||
overflow: auto; | |||
} | |||
.welCard{ | |||
background-color: #EFF2F3; | |||
height: calc(100% - 50px); | |||
overflow: auto; | |||
padding-bottom: 30px; | |||
} | |||
.welTab { | |||
display: flex; | |||
justify-content: space-between; | |||
align-items: center; | |||
/* position: relative; */ | |||
background: #fff; | |||
padding: 1px 12px 0px; | |||
font-size: 14px; | |||
line-height: 40px; | |||
} | |||
.welTab div { | |||
padding: 0 5px; | |||
position: relative; | |||
} | |||
.welTab div:after { | |||
content: ''; | |||
position: absolute; | |||
left: 0; | |||
right: 0; | |||
bottom: 3px; | |||
height: 2px; | |||
} | |||
.welTab div.active { | |||
color: #0C86D8; | |||
} | |||
.welTab div.active:after { | |||
background-color: #0C86D8; | |||
} | |||
.welBox { | |||
display: none; | |||
/* background: #fff; */ | |||
/* padding: 0px 12px 20px; */ | |||
} | |||
.welbox2{ | |||
padding: 0px 12px 0px; | |||
background-color: #fff; | |||
} | |||
.welBox.active { | |||
display: block; | |||
} | |||
.welT { | |||
font-size: 16px; | |||
margin-bottom: 10px; | |||
line-height: 26px; | |||
} | |||
.welT i { | |||
width: 26px; | |||
height: 26px; | |||
line-height: 24px; | |||
border: 1px solid #efefef; | |||
border-radius: 4px; | |||
float: right; | |||
text-align: center; | |||
color: #999; | |||
} | |||
padding: 10px 0; | |||
font-weight: bold; | |||
font-size: 16px; | |||
line-height: 26px; | |||
} | |||
.welT2 { | |||
height: 46px; | |||
line-height: 46px; | |||
font-size: 16px; | |||
margin: 0 -12px; | |||
padding: 0 12px; | |||
background-color: #EFF2F3; | |||
} | |||
.welT i { | |||
width: 26px; | |||
height: 26px; | |||
line-height: 24px; | |||
border: 1px solid #efefef; | |||
border-radius: 4px; | |||
float: right; | |||
text-align: center; | |||
color: #999; | |||
} | |||
.welLine { | |||
height: 1px; | |||
background: #efefef; | |||
margin: 10px -12px; | |||
height: 7px; | |||
background-color: #EFF2F3; | |||
/* margin: 10px -12px; */ | |||
} | |||
.welText { | |||
overflow: hidden; | |||
font-size: 14px; | |||
margin-top: 5px; | |||
overflow: hidden; | |||
font-size: 14px; | |||
margin-top: 8px; | |||
line-height: 0; | |||
} | |||
.welText span { | |||
float: right; | |||
width: 60%; | |||
text-align: right; | |||
} | |||
.welText div { | |||
width: 58px; | |||
display: inline-block; | |||
line-height: 20px; | |||
text-align: justify; | |||
text-align-last: justify; | |||
} | |||
.welText div:after { | |||
overflow: hidden; | |||
width: 100%; | |||
content: ''; | |||
} | |||
.welText span { | |||
float: right; | |||
width: 60%; | |||
text-align: right; | |||
line-height: 20px; | |||
} | |||
.welInputBox { | |||
margin: 0 -12px; | |||
} | |||
.welInput { | |||
overflow: hidden; | |||
font-size: 14px; | |||
margin-top: 10px; | |||
} | |||
.welInput span { | |||
float: left; | |||
width: 26%; | |||
text-align: right; | |||
line-height: 30px; | |||
} | |||
.welInput input { | |||
display: block; | |||
margin-left: 28%; | |||
width: 72%; | |||
border: 1px solid #efefef; | |||
border-radius: 4px; | |||
height: 30px; | |||
line-height: 28px; | |||
padding: 0 10px; | |||
margin-bottom: 0; | |||
} | |||
overflow: hidden; | |||
font-size: 14px; | |||
/* margin-top: 10px; */ | |||
height: 46px; | |||
padding: 8px 12px; | |||
border-top: 1px solid #EFF2F3; | |||
} | |||
.welInput:first-child { | |||
border: 0; | |||
} | |||
.welInput span { | |||
float: left; | |||
width: 70px; | |||
text-align: right; | |||
line-height: 30px; | |||
text-align: justify; | |||
text-align-last: justify; | |||
} | |||
.welInput span:after { | |||
overflow: hidden; | |||
width: 100%; | |||
content: ''; | |||
} | |||
.welInput .welInputs { | |||
display: block; | |||
margin-left: 80px; | |||
width: calc(100% - 80px); | |||
border: 0px solid #efefef; | |||
border-radius: 4px; | |||
height: 30px; | |||
line-height: 28px; | |||
padding: 0 10px; | |||
margin-bottom: 0; | |||
text-align: right; | |||
} | |||
.welInput .lr-picker { | |||
line-height: 30px; | |||
} | |||
.welCon { | |||
padding: 10px; | |||
border: 1px solid #efefef; | |||
margin-top: 18px; | |||
border-radius: 4px; | |||
position: relative; | |||
margin-top: 18px; | |||
position: relative; | |||
margin: 0 -12px; | |||
} | |||
.welDel { | |||
position: absolute; | |||
top: -8px; | |||
left: -8px; | |||
background: #fff; | |||
} | |||
.welDel i { | |||
text-align: center; | |||
width: 26px; | |||
height: 26px; | |||
display: block; | |||
line-height: 24px; | |||
border: 1px solid #efefef; | |||
border-radius: 50%; | |||
} | |||
background: #EFF2F3; | |||
padding: 5px 12px 10px; | |||
text-align: right; | |||
} | |||
.welImgAdd { | |||
text-align: center; | |||
line-height: 0; | |||
.welDel i,.welAdd i { | |||
text-align: center; | |||
width: 26px; | |||
height: 26px; | |||
line-height: 24px; | |||
border: 2px solid #0C86D8; | |||
border-radius: 3px; | |||
background: #ffff; | |||
color: #0C86D8; | |||
} | |||
.welAdd{ | |||
background: #EFF2F3; | |||
margin: 0 -12px; | |||
padding: 5px 12px; | |||
font-size: 14px; | |||
color: #0C86D8; | |||
} | |||
#files { | |||
opacity: 0; | |||
-webkit-opacity: 0; | |||
z-index: 9; | |||
display: none; | |||
opacity: 0; | |||
-webkit-opacity: 0; | |||
z-index: 9; | |||
display: none; | |||
} | |||
#welImgBtn { | |||
display: block; | |||
width: 110px; | |||
height: 30px; | |||
text-align: center; | |||
line-height: 26px; | |||
border: 2px solid #efefef; | |||
border-radius: 4px; | |||
font-size: 14px; | |||
color: #999; | |||
margin: 10px auto; | |||
cursor: pointer; | |||
} | |||
.welImgAdd{ | |||
min-height:110px; | |||
} | |||
#PhotoImg { | |||
width: 110px; | |||
height:110px; | |||
} | |||
.btnBox{ | |||
margin-top:20px; | |||
text-align:center; | |||
display: block; | |||
width: 110px; | |||
height: 30px; | |||
text-align: center; | |||
line-height: 26px; | |||
border: 2px solid #efefef; | |||
border-radius: 4px; | |||
font-size: 14px; | |||
color: #999; | |||
margin: 10px auto; | |||
cursor: pointer; | |||
} | |||
.welImgAdd { | |||
width: 225px; | |||
margin: 60px auto; | |||
border: 1px solid #0C86D8; | |||
border-radius: 6px; | |||
overflow: hidden; | |||
line-height: 0; | |||
} | |||
.welImgAdd img { | |||
width: 100%; | |||
} | |||
/* #PhotoImg { | |||
width: 110px; | |||
height: 110px; | |||
} */ | |||
.welImgInfo { | |||
width: 260px; | |||
margin: 0 auto; | |||
color: #888888; | |||
} | |||
.welImgInfoT { | |||
font-size: 16px; | |||
font-weight: bold; | |||
} | |||
.welImgInfoTxt { | |||
font-size: 14px; | |||
margin-top: 10px; | |||
} | |||
.btnBox { | |||
margin-top: 20px; | |||
text-align: center; | |||
} | |||
#saveBtn { | |||
margin: auto; | |||
margin-top: 25px; | |||
width: 92%; | |||
} | |||
margin: auto; | |||
margin-top: 25px; | |||
width: 92%; | |||
border-radius: 6px; | |||
} |
@@ -1,157 +1,196 @@ | |||
<div class="welT">基本信息</div> | |||
<div class="welBox"> | |||
<input type="hidden" name="ID" value="" id="ID" /> | |||
<div class="welText"> | |||
学号 | |||
<span id="StuNo"></span> | |||
</div> | |||
<div class="welText"> | |||
准考证号 | |||
<span id="zkzh"></span> | |||
</div> | |||
<div class="welText"> | |||
考生号 | |||
<span id="ksh"></span> | |||
</div> | |||
<div class="welText"> | |||
姓名 <span id="StuName"></span> | |||
</div> | |||
<div class="welText"> | |||
性别 | |||
<span id="GenderNo"></span> | |||
</div> | |||
<div class="welText"> | |||
系别 | |||
<span id="DeptNo"></span> | |||
</div> | |||
<div class="welText"> | |||
专业 | |||
<span id="MajorNo"></span> | |||
</div> | |||
<div class="welText"> | |||
班级 | |||
<span id="ClassNo"></span> | |||
</div> | |||
<div class="welText"> | |||
身份证号 | |||
<span id="IdentityCardNo"></span> | |||
</div> | |||
<div class="welText"> | |||
出生日期 | |||
<span id="Birthday"></span> | |||
</div> | |||
<div class="welText"> | |||
户口类别 | |||
<span id="ResidenceNo"></span> | |||
</div> | |||
<div class="welText"> | |||
政治面貌 | |||
<span id="PartyFaceNo"></span> | |||
</div> | |||
<div class="welcome"> | |||
<div class="welTab"> | |||
<div class="active">基本信息</div> | |||
<div>采集照片</div> | |||
<div>籍贯/通讯</div> | |||
<div>账户信息</div> | |||
<div>家庭成员</div> | |||
</div> | |||
<div class="welLine"></div> | |||
<div class="welT">采集照片信息</div> | |||
<div class="welBox"> | |||
<input type="hidden" id="Photo" value="" /> | |||
<input id="files" type="file" accept="image/*"> | |||
<div class="welImgAdd"> | |||
<!--<div id="welImgBtn">上传照片</div>--> | |||
<img id="PhotoImg" src="" alt=""> | |||
</div> | |||
<!--<div class="welText">说明:近期两寸免冠正面彩色照小于100K</div>--> | |||
</div> | |||
<div class="welLine"></div> | |||
<div class="welT">自然信息</div> | |||
<div class="welBox"> | |||
<div class="welInput"> | |||
<span>籍贯</span> | |||
<input id="RegionNo" type="text" placeholder="请填写籍贯" /> | |||
</div> | |||
</div> | |||
<div class="welLine"></div> | |||
<div class="welT">通讯信息</div> | |||
<div class="welBox"> | |||
<div class="welInput"> | |||
<span>家庭住址</span> | |||
<input id="FamilyAddress" type="text" placeholder="按XX省XX市XX县XX街道填写" /> | |||
</div> | |||
<div class="welInput"> | |||
<span>联系电话</span> | |||
<input id="telephone" type="text" placeholder="请填写联系电话(重要)" /> | |||
<div class="welLine" style="margin-top: 0;"></div> | |||
<div class="welCard"> | |||
<div class="welBox active"> | |||
<div class="welbox2" style="padding-bottom: 20px;"> | |||
<div class="welT">基本信息</div> | |||
<input type="hidden" name="ID" value="" id="ID" /> | |||
<div class="welText"> | |||
<div>学号</div> | |||
<span id="StuNo"></span> | |||
</div> | |||
<div class="welText"> | |||
<div>准考证号</div> | |||
<span id="zkzh"></span> | |||
</div> | |||
<div class="welText"> | |||
<div>考生号</div> | |||
<span id="ksh"></span> | |||
</div> | |||
<div class="welText"> | |||
<div>姓名</div> | |||
<span id="StuName"></span> | |||
</div> | |||
<div class="welText"> | |||
<div>性别</div> | |||
<span id="GenderNo"></span> | |||
</div> | |||
<div class="welText"> | |||
<div>系别</div> | |||
<span id="DeptNo"></span> | |||
</div> | |||
<div class="welText"> | |||
<div>专业</div> | |||
<span id="MajorNo"></span> | |||
</div> | |||
<div class="welText"> | |||
<div>班级</div> | |||
<span id="ClassNo"></span> | |||
</div> | |||
<div class="welText"> | |||
<div>身份证号</div> | |||
<span id="IdentityCardNo"></span> | |||
</div> | |||
<div class="welText"> | |||
<div>出生日期</div> | |||
<span id="Birthday"></span> | |||
</div> | |||
<div class="welText"> | |||
<div>户口类别</div> | |||
<span id="ResidenceNo"></span> | |||
</div> | |||
<div class="welText"> | |||
<div>政治面貌</div> | |||
<span id="PartyFaceNo"></span> | |||
</div> | |||
</div> | |||
</div> | |||
<div data-table="StuInfoBasic"> | |||
<span>基础信息</span> | |||
<div class="welInput"> | |||
<span>开户银行</span> | |||
<!-- <input id="DepositBank" type="text" placeholder="请选择开户银行" /> --> | |||
<div id="DepositBank" placeholder="请选择开户银行"></div> | |||
</div> | |||
<div class="welInput "> | |||
<span>银行卡账号</span> | |||
<input id="BankCard" type="text" placeholder="请填写银行卡号"/> | |||
<div class="welBox "> | |||
<div class="welbox2" style="padding-bottom: 20px;"> | |||
<div class="welT">采集照片</div> | |||
<input type="hidden" id="Photo" value="" /> | |||
<input id="files" type="file" accept="image/*"> | |||
<div class="welImgAdd"> | |||
<!--<div id="welImgBtn">上传照片</div>--> | |||
<img id="PhotoImg" src="../../images/wel1.png" alt=""> | |||
</div> | |||
<div class="welImgInfo"> | |||
<div class="welImgInfoT">照片要求:</div> | |||
<div class="welImgInfoTxt">1 . 单色背景,正面,免冠近期证件照</div> | |||
<div class="welImgInfoTxt">2 . 文件格式JPG</div> | |||
<div class="welImgInfoTxt">3 . 文件大小165320KB以下</div> | |||
</div> | |||
</div> | |||
<div class="welInput "> | |||
<span>开户行位置</span> | |||
<input id="BankLocation" type="text" placeholder="请填写开户行位置" /> | |||
<div class="btnBox"> | |||
<button id="saveBtn" type="button" class="lr-btn-primary lr-btn-block saveBtn">保存</button> | |||
</div> | |||
</div> | |||
<div class="welLine"></div> | |||
<div class="welT">家庭成员(直系家属) <i title="家庭成员(直系家属)" class="iconfont icon-add"></i></div> | |||
<div class="welBox" id="StuInfoFreshFamily"> | |||
<div class="welCon"> | |||
<div class="welInput"> | |||
<span>姓名</span> | |||
<input type="text" name="Name" placeholder="请填写姓名" /> | |||
</div> | |||
<div class="welInput"> | |||
<span>与本人关系</span> | |||
<input type="text" name="Relation" placeholder="请填写与本人关系" /> | |||
</div> | |||
<div class="welInput"> | |||
<span>性别</span> | |||
<input type="text" name="Sex" placeholder="请填写性别" /> | |||
</div> | |||
<div class="welInput"> | |||
<span>年龄</span> | |||
<input type="text" name="Age" placeholder="请填写年龄" /> | |||
</div> | |||
<div class="welInput"> | |||
<span>政治面貌</span> | |||
<input type="text" name="Politicy" placeholder="请填写政治面貌" /> | |||
</div> | |||
<div class="welDel"> <i class="iconfont icon-move"></i> </div> | |||
<div class="welBox "> | |||
<div class="welbox2"> | |||
<div class="welT2">自然信息</div> | |||
<div class="welInputBox"> | |||
<div class="welInput"> | |||
<span>籍贯</span> | |||
<input class="welInputs" id="RegionNo" type="text" placeholder="请填写籍贯" /> | |||
</div> | |||
</div> | |||
<div class="welT2">通讯信息</div> | |||
<div class="welInputBox"> | |||
<div class="welInput"> | |||
<span>家庭住址</span> | |||
<input class="welInputs" id="FamilyAddress" type="text" placeholder="按XX省XX市XX县XX街道填写" /> | |||
</div> | |||
<div class="welInput"> | |||
<span>联系电话</span> | |||
<input class="welInputs" id="telephone" type="text" placeholder="请填写联系电话(重要)" /> | |||
</div> | |||
</div> | |||
<div class="welT2">紧急联系人</div> | |||
<div class="welUrgent" id="StuInfoFreshEmergePeople"> | |||
<div class="welCon"> | |||
<div class="welInput"> | |||
<span>姓名</span> | |||
<input class="welInputs" type="text" name="Name" placeholder="请填写姓名" /> | |||
</div> | |||
<div class="welInput"> | |||
<span>与本人关系</span> | |||
<div name="Relation" value=""></div> | |||
</div> | |||
<div class="welInput"> | |||
<span>手机号码</span> | |||
<input class="welInputs" type="text" name="Telephone" placeholder="请填写手机号码" /> | |||
</div> | |||
<div class="welInput"> | |||
<span>座机号码</span> | |||
<input class="welInputs" type="text" name="Mobile" placeholder="请填写座机号码" /> | |||
</div> | |||
<div class="welInput"> | |||
<span>联系地址</span> | |||
<input class="welInputs" type="text" name="Address" placeholder="请填写联系地址" /> | |||
</div> | |||
<div class="welDel"> <i class="iconfont icon-move"></i> </div> | |||
</div> | |||
</div> | |||
<div class="welAdd"><i title="紧急联系人" class="iconfont icon-add"></i> 添加紧急联系人</div> | |||
</div> | |||
<div class="btnBox"> | |||
<button id="saveBtn" type="button" class="lr-btn-primary lr-btn-block saveBtn">保存</button> | |||
</div> | |||
</div> | |||
<div class="welLine"></div> | |||
<div class="welT">紧急联系人 <i title="紧急联系人" class="iconfont icon-add"></i></div> | |||
<div class="welBox" id="StuInfoFreshEmergePeople"> | |||
<div class="welCon"> | |||
<div class="welInput"> | |||
<span>姓名</span> | |||
<input type="text" name="Name" placeholder="请填写姓名" /> | |||
</div> | |||
<div class="welInput"> | |||
<span>与本人关系</span> | |||
<input type="text" name="Relation" placeholder="请填写与本人关系" /> | |||
</div> | |||
<div class="welInput"> | |||
<span>手机号码</span> | |||
<input type="text" name="Telephone" placeholder="请填写手机号码" /> | |||
</div> | |||
<div class="welInput"> | |||
<span>座机号码</span> | |||
<input type="text" name="Mobile" placeholder="请填写座机号码" /> | |||
</div> | |||
<div class="welInput"> | |||
<span>联系地址</span> | |||
<input type="text" name="Address" placeholder="请填写联系地址" /> | |||
</div> | |||
<div class="welDel"> <i class="iconfont icon-move"></i> </div> | |||
<div class="welBox "> | |||
<div class="welbox2"> | |||
<div class="welInputBox"> | |||
<div class="welInput"> | |||
<span>开户银行</span> | |||
<div name="DepositBank" id="DepositBank" placeholder="请选择开户银行" value=""></div> | |||
</div> | |||
<div class="welInput"> | |||
<span>银行卡号</span> | |||
<input class="welInputs" id="BankCard" type="text" placeholder="银行卡号" /> | |||
</div> | |||
<div class="welInput"> | |||
<span>开 户 行</span> | |||
<input class="welInputs" id="BankLocation" type="text" placeholder="开户行" /> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="btnBox"> | |||
<button id="saveBtn1" type="button" class="lr-btn-primary lr-btn-block saveBtn">保存</button> | |||
</div> | |||
</div> | |||
<div class="btnBox"> | |||
<button id="saveBtn" type="button" class="lr-btn-primary lr-btn-block">保存</button> | |||
<div class="welBox"> | |||
<div class="welbox2"> | |||
<div class="welT2">家庭成员(直系家属)</div> | |||
<div class="welUrgent" id="StuInfoFreshFamily"> | |||
<div class="welCon"> | |||
<div class="welInput"> | |||
<span>姓名</span> | |||
<input class="welInputs" type="text" name="Name" placeholder="请填写姓名" /> | |||
</div> | |||
<div class="welInput"> | |||
<span>与本人关系</span> | |||
<div name="Relation" value=""></div> | |||
</div> | |||
<div class="welInput"> | |||
<span>年龄</span> | |||
<input class="welInputs" type="text" name="Age" placeholder="请填写年龄" /> | |||
</div> | |||
<div class="welInput"> | |||
<span>政治面貌</span> | |||
<div name="Politicy" value=""></div> | |||
</div> | |||
<div class="welDel"> <i class="iconfont icon-move"></i> </div> | |||
</div> | |||
</div> | |||
<div class="welAdd"><i title="家庭成员" class="iconfont icon-add"></i> 添加家庭成员</div> | |||
</div> | |||
<div class="btnBox"> | |||
<button id="saveBtn" type="button" class="lr-btn-primary lr-btn-block saveBtn">保存</button> | |||
</div> | |||
</div> | |||
</div> | |||
</div> |
@@ -1,103 +1,122 @@ | |||
(function() { | |||
var colDataItemArr = ['GenderNo']; | |||
var colDataItemCode = ['usersex']; | |||
(function () { | |||
var colDataItemArr = ['GenderNo']; | |||
var colDataItemCode = ['usersex']; | |||
var colDataItemBank = ['DepositBank']; | |||
var page = { | |||
isScroll: false, | |||
init: function($page) { | |||
// 获取登录者信息 | |||
var userinfo = learun.storage.get('userinfo'); | |||
//增加联系人 | |||
$page.find('.welT i').on('tap', function() { | |||
var FamilyHtml = '<div class="welCon"><form class="welConForm">' + | |||
'<div class="welInput">' + | |||
'<span>姓名</span>' + | |||
'<input type="text" name="Name" placeholder="请填写姓名" />' + | |||
'</div>' + | |||
'<div class="welInput">' + | |||
'<span>与本人关系</span>' + | |||
'<div name="Relation" value=""></div>' + | |||
'</div>' + | |||
'<div class="welInput">' + | |||
'<span>性别</span>' + | |||
'<div name="Sex" value=""></div>' + | |||
'</div>' + | |||
'<div class="welInput">' + | |||
'<span>年龄</span>' + | |||
'<input type="text" name="Age" placeholder="请填写年龄" />' + | |||
'</div>' + | |||
'<div class="welInput">' + | |||
'<span>政治面貌</span>' + | |||
'<div name="Politicy" value=""></div>' + | |||
'</div>' + | |||
//'<div class="welInput">' + | |||
//'<span>身份证号</span>' + | |||
//'<input type="text" name="IdCard" placeholder="请填写身份证号" />' + | |||
//'</div>' + | |||
'<div class="welDel"> <i class="iconfont icon-move"></i> </div>' + | |||
'</form></div>'; | |||
var EmergePeopleHtml = '<div class="welCon"><form class="welConForm">' + | |||
'<div class="welInput">' + | |||
'<span>姓名</span>' + | |||
'<input type="text" name="Name" placeholder="请填写姓名" />' + | |||
'</div>' + | |||
'<div class="welInput">' + | |||
'<span>与本人关系</span>' + | |||
'<input type="text" name="Relation" placeholder="请填写与本人关系" />' + | |||
'</div>' + | |||
'<div class="welInput">' + | |||
'<span>手机号码</span>' + | |||
'<input type="text" name="Telephone" placeholder="请填写手机号码" />' + | |||
'</div>' + | |||
'<div class="welInput">' + | |||
'<span>座机号码</span>' + | |||
'<input type="text" name="Mobile" placeholder="请填写座机号码" />' + | |||
'</div>' + | |||
'<div class="welInput">' + | |||
'<span>联系地址</span>' + | |||
'<input type="text" name="Address" placeholder="请填写联系地址" />' + | |||
'</div>' + | |||
'<div class="welDel"> <i class="iconfont icon-move"></i> </div>' + | |||
'</form></div>'; | |||
var obj = $(this).parent().next(); | |||
if ($(this).attr('title') == '紧急联系人') { | |||
obj.append(EmergePeopleHtml); | |||
} else { | |||
obj.append(FamilyHtml); | |||
} | |||
var page = { | |||
isScroll: false, | |||
init: function ($page) { | |||
// 获取登录者信息 | |||
var userinfo = learun.storage.get('userinfo'); | |||
//tab切换 | |||
$page.find('.welTab div').on('tap', function () { | |||
var ind = $(this).index(); | |||
$(this).addClass('active').siblings().removeClass('active'); | |||
$('.welBox').css('display', 'none').eq(ind).fadeIn() | |||
}) | |||
//增加联系人 | |||
$page.find('.welAdd i').on('tap', function () { | |||
var FamilyHtml = '<div class="welCon"><form class="welConForm">' + | |||
'<div class="welInput">' + | |||
'<span>姓名</span>' + | |||
'<input class="welInputs" type="text" name="Name" placeholder="请填写姓名" />' + | |||
'</div>' + | |||
'<div class="welInput">' + | |||
'<span>与本人关系</span>' + | |||
'<div name="Relation" value=""></div>' + | |||
'</div>' + | |||
'<div class="welInput">' + | |||
'<span>年龄</span>' + | |||
'<input class="welInputs" type="text" name="Age" placeholder="请填写年龄" />' + | |||
'</div>' + | |||
'<div class="welInput">' + | |||
'<span>政治面貌</span>' + | |||
'<div name="Politicy" value=""></div>' + | |||
'</div>' + | |||
//'<div class="welInput">' + | |||
//'<span>身份证号</span>' + | |||
//'<input type="text" name="IdCard" placeholder="请填写身份证号" />' + | |||
//'</div>' + | |||
'<div class="welDel"> <i class="iconfont icon-move"></i> </div>' + | |||
'</form></div>'; | |||
var EmergePeopleHtml = '<div class="welCon"><form class="welConForm">' + | |||
'<div class="welInput">' + | |||
'<span>姓名</span>' + | |||
'<input class="welInputs" type="text" name="Name" placeholder="请填写姓名" />' + | |||
'</div>' + | |||
'<div class="welInput">' + | |||
'<span>与本人关系</span>' + | |||
'<div name="Relation" value=""></div>' + | |||
'</div>' + | |||
'<div class="welInput">' + | |||
'<span>手机号码</span>' + | |||
'<input class="welInputs" type="text" name="Telephone" placeholder="请填写手机号码" />' + | |||
'</div>' + | |||
'<div class="welInput">' + | |||
'<span>座机号码</span>' + | |||
'<input class="welInputs" type="text" name="Mobile" placeholder="请填写座机号码" />' + | |||
'</div>' + | |||
'<div class="welInput">' + | |||
'<span>联系地址</span>' + | |||
'<input class="welInputs" type="text" name="Address" placeholder="请填写联系地址" />' + | |||
'</div>' + | |||
'<div class="welDel"> <i class="iconfont icon-move"></i> </div>' + | |||
'</form></div>'; | |||
page.bind($page); | |||
}) | |||
//删除联系人 | |||
$page.find('.welBox').on('tap', '.welDel i', function() { | |||
var parents = $(this).parents('.welCon') | |||
learun.layer.confirm('是否删除此联系人?', function(_index) { | |||
_index == 1 ? parents.remove() : '' | |||
}, '提示', ['否', '是']); | |||
}) | |||
//上传照片 | |||
var inputNode = $page.find('#files'); | |||
$page.find('#welImgBtn').on('tap', function() { | |||
var evt = new MouseEvent("click", { | |||
bubbles: false, | |||
cancelable: true, | |||
view: window | |||
var obj = $(this).parents('.welBox').find('.welUrgent'); | |||
if ($(this).attr('title') == '紧急联系人') { | |||
obj.append(EmergePeopleHtml); | |||
} else { | |||
obj.append(FamilyHtml); | |||
//政治面貌 | |||
var Politicy = $(obj).find('[name="Politicy"]:last'); | |||
Politicy.lrpickerex({ | |||
code: 'BCdPartyFace', | |||
type: 'sourceData', | |||
ivalue: 'partyfaceno', | |||
itext: 'partyface' | |||
}); | |||
//赋值 | |||
Politicy.lrpickerSet(Politicy.attr('value')); | |||
} | |||
//与本人关系 | |||
var Relation = $(obj).find('[name="Relation"]:last'); | |||
Relation.lrpickerex({ | |||
code: 'FamilyRelation', | |||
type: 'dataItem' | |||
}); | |||
inputNode[0].dispatchEvent(evt); | |||
}) | |||
inputNode.on('change', function() { | |||
previewFile(); | |||
}); | |||
//数据绑定 | |||
//赋值 | |||
Relation.lrpickerSet(Relation.attr('value')); | |||
// page.bind($page); | |||
}) | |||
//删除联系人 | |||
$page.find('.welBox').on('tap', '.welDel i', function () { | |||
var parents = $(this).parents('.welCon') | |||
learun.layer.confirm('是否删除此联系人?', function (_index) { | |||
_index == 1 ? parents.remove() : '' | |||
}, '提示', ['否', '是']); | |||
}) | |||
//上传照片 | |||
var inputNode = $page.find('#files'); | |||
$page.find('#PhotoImg').on('tap', function () { | |||
var evt = new MouseEvent("click", { | |||
bubbles: false, | |||
cancelable: true, | |||
view: window | |||
}); | |||
inputNode[0].dispatchEvent(evt); | |||
}) | |||
inputNode.on('change', function () { | |||
previewFile(); | |||
}); | |||
//数据绑定 | |||
learun.layer.loading(true, '获取数据中'); | |||
learun.httpget(config.webapi + "StuInfoFresh/stuInfoFreshEntity", userinfo.baseinfo.account, ( | |||
data) => { | |||
//console.log('datadata',data); | |||
if (data) { | |||
//基本信息 | |||
for (var id in data['StuInfoFreshEntity']) { | |||
@@ -126,16 +145,16 @@ | |||
} | |||
}); | |||
} | |||
// if (id == "#DepositBank") { | |||
// learun.clientdata.get('sourceData', { | |||
// code: 'DepositBank', | |||
// key: data['StuInfoFreshEntity']['' + id + ''], | |||
// keyId: 'DepositBank', | |||
// callback: function(data, op) { | |||
// $("#DepositBank").html(data.text); | |||
// } | |||
// }); | |||
// } | |||
if (id == "#DepositBank") { | |||
learun.clientdata.get('sourceData', { | |||
code: 'DepositBank', | |||
key: data['StuInfoFreshEntity']['' + id + ''], | |||
keyId: 'DepositBank', | |||
callback: function(data, op) { | |||
$("#DepositBank").html(data.text); | |||
} | |||
}); | |||
} | |||
} else if (dom.tagName.toLowerCase() == "input") { | |||
$('#' + id).val(data['StuInfoFreshEntity']['' + id + '']); | |||
} | |||
@@ -146,79 +165,71 @@ | |||
$("#DepositBank").lrpickerSet(data.StuInfoFreshEntity.DepositBank); | |||
//头像 | |||
$('#PhotoImg').attr('src', config.web + data['Url']); | |||
//家庭成员 | |||
if(data['StuInfoFreshFamilyList'].length>0){ | |||
$('#StuInfoFreshFamily').html(""); | |||
$.each(data['StuInfoFreshFamilyList'], function(i, item) { | |||
var html = '<div class="welCon"><form class="welConForm">' + | |||
'<div class="welInput">' + | |||
'<span>姓名</span>' + | |||
'<input type="text" name="Name" placeholder="请填写姓名" value="' + | |||
'<input class="welInputs" type="text" name="Name" placeholder="请填写姓名" value="' + | |||
item.Name + '"/>' + | |||
'</div >' + | |||
'<div class="welInput">' + | |||
'<span>与本人关系</span>' + | |||
//'<input type="text" name="Relation" placeholder="请填写与本人关系" value="' + item.Relation + '"/>' + | |||
'<div name="Relation" value="' + item.Relation + '"></div>' + | |||
'</div>' + | |||
'<div class="welInput">' + | |||
'<span>性别</span>' + | |||
//'<input type="text" name="Sex" placeholder="请填写性别" value="' + item.Sex + '"/>' + | |||
'<div name="Sex" value="' + item.Sex + '"></div>' + | |||
'</div>' + | |||
'<div class="welInput">' + | |||
'<span>年龄</span>' + | |||
'<input type="text" name="Age" placeholder="请填写年龄" value="' + | |||
'<input class="welInputs" type="text" name="Age" placeholder="请填写年龄" value="' + | |||
item.Age + '"/>' + | |||
'</div>' + | |||
'<div class="welInput">' + | |||
'<span>政治面貌</span>' + | |||
//'<input type="text" name="Politicy" placeholder="请填写政治面貌" value="' + item.Politicy + '"/>' + | |||
'<div name="Politicy" value="' + item.Politicy + '"/>' + | |||
'</div>' + | |||
//'<div class="welInput">' + | |||
//'<span>身份证号</span>' + | |||
//'<input type="text" name="IdCard" placeholder="请填写身份证号" value="' + item.IdCard + '"/>' + | |||
//'</div>' + | |||
'<div class="welDel"> <i class="iconfont icon-move"></i> </div>' + | |||
'</form></div> '; | |||
$('#StuInfoFreshFamily').append(html); | |||
}); | |||
});} | |||
//紧急联系人 | |||
if(data['StuInfoFreshEmergePeopleList'].length>0){ | |||
$('#StuInfoFreshEmergePeople').html(""); | |||
$.each(data['StuInfoFreshEmergePeopleList'], function(i, item) { | |||
var html = '<div class="welCon"><form class="welConForm">' + | |||
'<div class="welInput">' + | |||
'<span>姓名</span>' + | |||
'<input type="text" name="Name" placeholder="请填写姓名" value="' + | |||
'<input class="welInputs" type="text" name="Name" placeholder="请填写姓名" value="' + | |||
item.Name + '"/>' + | |||
'</div >' + | |||
'<div class="welInput">' + | |||
'<span>与本人关系</span>' + | |||
'<input type="text" name="Relation" placeholder="请填写与本人关系" value="' + | |||
item.Relation + '"/>' + | |||
'<div name="Relation" value="' +item.Relation + '"></div>' + | |||
'</div>' + | |||
'<div class="welInput">' + | |||
'<span>手机号码</span>' + | |||
'<input type="text" name="Telephone" placeholder="请填写手机号码" value="' + | |||
'<input class="welInputs" type="text" name="Telephone" placeholder="请填写手机号码" value="' + | |||
item.Telephone + '"/>' + | |||
'</div>' + | |||
'<div class="welInput">' + | |||
'<span>座机号码</span>' + | |||
'<input type="text" name="Mobile" placeholder="请填写座机号码" value="' + | |||
'<input class="welInputs" type="text" name="Mobile" placeholder="请填写座机号码" value="' + | |||
item.Mobile + '"/>' + | |||
'</div>' + | |||
'<div class="welInput">' + | |||
'<span>联系地址</span>' + | |||
'<input type="text" name="Address" placeholder="请填写联系地址" value="' + | |||
item.Address + '"/>' + | |||
'<input class="welInputs" type="text" name="Address" placeholder="请填写联系地址" value="' +item.Address + '"/>' + | |||
'</div>' + | |||
'<div class="welDel"> <i class="iconfont icon-move"></i> </div>' + | |||
'</form></div > '; | |||
$('#StuInfoFreshEmergePeople').append(html); | |||
}); | |||
} | |||
page.bind($page); | |||
learun.layer.loading(false); | |||
@@ -227,8 +238,9 @@ | |||
}); | |||
//保存 | |||
$page.find('#saveBtn').on('tap', function() { | |||
//保存 | |||
$page.find('.saveBtn').on('tap', function () { | |||
var postdata = { | |||
ID: $('#ID').val(), | |||
RegionNo: $('#RegionNo').val(), | |||
@@ -241,135 +253,138 @@ | |||
StuInfoFreshFamilyEntities: family(), | |||
StuInfoFreshEmergePeopleEntities: emergePeople() | |||
}; | |||
console.log(postdata) | |||
// return | |||
learun.layer.loading(true, '正在提交数据'); | |||
learun.httpget(config.webapi + "StuInfoFresh/saveStuInfoFresh", postdata, ( | |||
data) => { | |||
learun.layer.loading(false); | |||
if (data) { | |||
learun.layer.toast('保存成功'); | |||
location.reload(); | |||
} | |||
}); | |||
//console.log(postdata) | |||
//return | |||
learun.layer.loading(true, '正在提交数据'); | |||
learun.httpget(config.webapi + "StuInfoFresh/saveStuInfoFresh", postdata, (data) => { | |||
learun.layer.loading(false); | |||
if (data) { | |||
learun.layer.toast('保存成功'); | |||
location.reload(); | |||
} | |||
}); | |||
}); | |||
}); | |||
page.bind($page); | |||
}, | |||
bind: function ($page) { | |||
//性别 | |||
$.each($page.find('[name="Sex"]'), function (i, item) { | |||
$page.find(item).lrpickerex({ | |||
code: 'usersex', | |||
type: 'dataItem' | |||
}); | |||
//赋值 | |||
$(item).lrpickerSet($(item).attr('value')); | |||
}); | |||
//政治面貌 | |||
$.each($page.find('[name="Politicy"]'), function (i, item) { | |||
$page.find(item).lrpickerex({ | |||
code: 'BCdPartyFace', | |||
type: 'sourceData', | |||
ivalue: 'partyfaceno', | |||
itext: 'partyface' | |||
}); | |||
//赋值 | |||
$(item).lrpickerSet($(item).attr('value')); | |||
}); | |||
//与本人关系 | |||
$.each($page.find('[name="Relation"]'), function (i, item) { | |||
$page.find(item).lrpickerex({ | |||
code: 'FamilyRelation', | |||
type: 'dataItem' | |||
}); | |||
//赋值 | |||
$(item).lrpickerSet($(item).attr('value')); | |||
}); | |||
//开户银行 | |||
$page.find('#DepositBank').lrpickerex({ | |||
code: 'DepositBank', | |||
type: 'dataItem' | |||
}); | |||
/* $.each($page.find('[name="DepositBank"]'), function (i, item) { | |||
$page.find(item).lrpickerex({ | |||
code: 'DepositBank', | |||
type: 'dataItem' | |||
}); | |||
//赋值 | |||
$(item).lrpickerSet($(item).attr('value')); | |||
}); */ | |||
} | |||
}; | |||
//数据处理 | |||
function family() { | |||
var list = new Array(); | |||
$.each($('#StuInfoFreshFamily').children('.welCon'), function (i, item) { | |||
var o = $(item).children(".welConForm").serializeObject(); | |||
o.Sex = $(item).find('[name="Sex"]').lrpickerGet(); | |||
o.Politicy = $(item).find('[name="Politicy"]').lrpickerGet(); | |||
o.Relation = $(item).find('[name="Relation"]').lrpickerGet(); | |||
list.push(o); | |||
}); | |||
return list; | |||
} | |||
function emergePeople() { | |||
var list = new Array(); | |||
$.each($('#StuInfoFreshEmergePeople').children('.welCon'), function (i, item) { | |||
var o = $(item).children(".welConForm").serializeObject(); | |||
list.push(o); | |||
}); | |||
return list; | |||
} | |||
}, | |||
bind: function($page) { | |||
//性别 | |||
$.each($page.find('[name="Sex"]'), function(i, item) { | |||
$page.find(item).lrpickerex({ | |||
code: 'usersex', | |||
type: 'dataItem' | |||
}); | |||
//赋值 | |||
$(item).lrpickerSet($(item).attr('value')); | |||
}); | |||
$page.find('#DepositBank').lrpickerex({ | |||
code: 'DepositBank', | |||
type: 'dataItem' | |||
}); | |||
//政治面貌 | |||
$.each($page.find('[name="Politicy"]'), function(i, item) { | |||
$page.find(item).lrpickerex({ | |||
code: 'BCdPartyFace', | |||
type: 'sourceData', | |||
ivalue: 'partyfaceno', | |||
itext: 'partyface' | |||
}); | |||
//赋值 | |||
$(item).lrpickerSet($(item).attr('value')); | |||
}); | |||
//与本人关系 | |||
$.each($page.find('#StuInfoFreshFamily').find('[name="Relation"]'), function(i, item) { | |||
$page.find(item).lrpickerex({ | |||
code: 'FamilyRelation', | |||
type: 'dataItem' | |||
}); | |||
//赋值 | |||
$(item).lrpickerSet($(item).attr('value')); | |||
}); | |||
} | |||
}; | |||
//数据处理 | |||
function family() { | |||
var list = new Array(); | |||
$.each($('#StuInfoFreshFamily').children('.welCon'), function(i, item) { | |||
var o = $(item).children(".welConForm").serializeObject(); | |||
o.Sex = $(item).find('[name="Sex"]').lrpickerGet(); | |||
o.DepositBank = $(item).find('[name="DepositBank"]').lrpickerGet(); | |||
o.Politicy = $(item).find('[name="Politicy"]').lrpickerGet(); | |||
o.Relation = $(item).find('[name="Relation"]').lrpickerGet(); | |||
list.push(o); | |||
}); | |||
return list; | |||
} | |||
function emergePeople() { | |||
var list = new Array(); | |||
$.each($('#StuInfoFreshEmergePeople').children('.welCon'), function(i, item) { | |||
var o = $(item).children(".welConForm").serializeObject(); | |||
list.push(o); | |||
}); | |||
return list; | |||
} | |||
$.fn.serializeObject = function () { | |||
var o = {}; | |||
var a = this.serializeArray(); | |||
$.each(a, function () { | |||
if (o[this.name]) { | |||
if (!o[this.name].push) { | |||
o[this.name] = [o[this.name]]; | |||
} | |||
o[this.name].push(this.value || ''); | |||
} else { | |||
o[this.name] = this.value || ''; | |||
} | |||
}); | |||
return o; | |||
} | |||
$.fn.serializeObject = function() { | |||
var o = {}; | |||
var a = this.serializeArray(); | |||
$.each(a, function() { | |||
if (o[this.name]) { | |||
if (!o[this.name].push) { | |||
o[this.name] = [o[this.name]]; | |||
} | |||
o[this.name].push(this.value || ''); | |||
} else { | |||
o[this.name] = this.value || ''; | |||
} | |||
}); | |||
return o; | |||
} | |||
//上传照片 | |||
function previewFile() { | |||
var html = ''; | |||
var file = document.querySelector('input[type=file]').files[0]; | |||
var reader = new FileReader(); | |||
reader.onloadend = function() { | |||
//$('#PhotoImg').attr('src', reader.result); | |||
var postData = { | |||
Base64Url: reader.result | |||
} | |||
learun.httppost(config.webapi + "StuInfoFresh/savePhoto", postData, (data) => { | |||
if (data) { | |||
$('#Photo').val(data.AnnexesFileId); | |||
$('#PhotoImg').attr('src', config.web + data.Url); | |||
} else { | |||
learun.layer.toast('采集照片信息失败!'); | |||
} | |||
}); | |||
} | |||
if (file) { | |||
reader.readAsDataURL(file); | |||
} | |||
} | |||
//上传照片 | |||
function previewFile() { | |||
var html = ''; | |||
var file = document.querySelector('input[type=file]').files[0]; | |||
var reader = new FileReader(); | |||
reader.onloadend = function () { | |||
//$('#PhotoImg').attr('src', reader.result); | |||
var postData = { | |||
Base64Url: reader.result | |||
} | |||
learun.httppost(config.webapi + "StuInfoFresh/savePhoto", postData, (data) => { | |||
if (data) { | |||
$('#Photo').val(data.AnnexesFileId); | |||
$('#PhotoImg').attr('src', config.web + data.Url); | |||
} else { | |||
learun.layer.toast('采集照片信息失败!'); | |||
} | |||
}); | |||
} | |||
if (file) { | |||
reader.readAsDataURL(file); | |||
} | |||
} | |||
//产生随机数 | |||
function GenerateRandom() { | |||
var retstr = ""; | |||
var date = new Date(); | |||
retstr = date.getFullYear().toString() + "-" + date.getMonth().toString() + "-" + date.getDate() | |||
.toString() + "-" + date.getUTCHours().toString() + "-" + date.getUTCMinutes() + "-" + date | |||
.getUTCSeconds() | |||
.toString(); | |||
var Num = ""; | |||
for (var i = 0; i < 6; i++) { | |||
Num += Math.floor(Math.random() * 10); | |||
} | |||
return retstr + Num; | |||
} | |||
//产生随机数 | |||
function GenerateRandom() { | |||
var retstr = ""; | |||
var date = new Date(); | |||
retstr = date.getFullYear().toString() + "-" + date.getMonth().toString() + "-" + date.getDate().toString() + "-" + date.getUTCHours().toString() + "-" + date.getUTCMinutes() + "-" + date.getUTCSeconds().toString(); | |||
var Num = ""; | |||
for (var i = 0; i < 6; i++) { | |||
Num += Math.floor(Math.random() * 10); | |||
} | |||
return retstr + Num; | |||
} | |||
return page; | |||
return page; | |||
})(); |
@@ -1,4 +1,4 @@ | |||
<script type="text/javascript"> | |||
<script type="text/javascript"> | |||
(function ($, learun) { | |||
learun.nav.data["workspace"].jsObj = (function () { | |||
@@ -221,6 +221,14 @@ | |||
if (learun.storage.get('pwd') === true) { | |||
learun.nav.go({ path: 'my/modifypassword', isBack: false, isHead: true, title:'修改密码' }); | |||
} | |||
if (learun.storage.get('pwdandnotice') === true) { | |||
learun.nav.go({ path: 'my/modifypasswordandnotice', isBack: false, isHead: true, title: '修改密码' }); | |||
} | |||
if (learun.storage.get('isUpdStu') === true) { | |||
learun.storage.set('isUpdStu',null); | |||
learun.nav.go({ path: 'login/IdCardLogin', title: '身份证登录', type: 'right' }); | |||
//learun.nav.go({ path: 'my/modifypassword', isBack: false, isHead: true, title:'修改密码' }); | |||
} | |||
var _html = ''; | |||
// _html += '<div class="scanner">'; | |||
// _html += '<i class="iconfont icon-scan"></i>'; | |||
@@ -408,6 +408,31 @@ namespace Learun.Application.Organization | |||
} | |||
} | |||
/// <summary> | |||
/// 获取实体,通过身份证号 | |||
/// </summary> | |||
/// <param name="idcard">身份证号</param> | |||
/// <returns></returns> | |||
public UserEntity GetEntityByIdCard(string idcard) | |||
{ | |||
try | |||
{ | |||
UserEntity userEntity; | |||
userEntity = userService.GetEntityByIdCard(idcard); | |||
return userEntity; | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取实体,通过用户名 | |||
/// </summary> | |||
/// <param name="account">用户账号</param> | |||
@@ -854,6 +879,42 @@ namespace Learun.Application.Organization | |||
} | |||
} | |||
/// <summary> | |||
/// 修改用户登录密码身份证后8位 | |||
/// </summary> | |||
/// <param name="newPassword">新密码(MD5 小写)</param> | |||
/// <param name="oldPassword">旧密码(身份证后8位)</param> | |||
public bool RevisePasswordiden(string newPassword, string oldPassword) | |||
{ | |||
try | |||
{ | |||
UserInfo userInfo = LoginUserInfo.Get(); | |||
cache.Remove(cacheKeyId + userInfo.userId, CacheId.user); | |||
cache.Remove(cacheKeyAccount + userInfo.account, CacheId.user); | |||
var entity = userService.GetEntity(userInfo.userId); | |||
if (oldPassword == entity.F_IdentityCardNo.Substring(entity.F_IdentityCardNo.Length - 8, 8)) | |||
{ | |||
userService.RevisePassword(userInfo.userId, newPassword); | |||
} | |||
else | |||
{ | |||
return false; | |||
} | |||
return true; | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 重置密码 | |||
/// </summary> | |||
/// <param name="keyValue">账号主键</param> | |||
@@ -1108,6 +1169,75 @@ namespace Learun.Application.Organization | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 验证登录 | |||
/// </summary> | |||
/// <param name="account">身份证号</param> | |||
/// <param name="password">密码</param> | |||
/// <returns></returns> | |||
public UserEntity CheckLoginByIdCard(string account, string password) | |||
{ | |||
try | |||
{ | |||
UserEntity userEntity = GetEntityByIdCard(account); | |||
if (userEntity == null) | |||
{ | |||
userEntity = new UserEntity() | |||
{ | |||
LoginMsg = "账户不存在!", | |||
LoginOk = false | |||
}; | |||
return userEntity; | |||
}else if (userEntity.F_Description != "学生") | |||
{ | |||
userEntity = new UserEntity() | |||
{ | |||
LoginMsg = "您非学生,不可用此种方式登录!", | |||
LoginOk = false | |||
}; | |||
return userEntity; | |||
} | |||
else | |||
{ | |||
} | |||
userEntity.LoginOk = false; | |||
if (userEntity.F_EnabledMark == 1) | |||
{ | |||
if (userEntity.F_IdentityCardNo.Length <= 8) | |||
{ | |||
userEntity.LoginMsg = "身份证输入有误!"; | |||
} | |||
else if (password == userEntity.F_IdentityCardNo.Substring(userEntity.F_IdentityCardNo.Length - 8, 8)) | |||
{ | |||
userEntity.LoginOk = true; | |||
} | |||
else | |||
{ | |||
userEntity.LoginMsg = "密码和账户名不匹配!"; | |||
} | |||
} | |||
else | |||
{ | |||
userEntity.LoginMsg = "账户被系统锁定,请联系管理员!"; | |||
} | |||
return userEntity; | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取用户头像 | |||
/// </summary> | |||
@@ -174,6 +174,13 @@ namespace Learun.Application.Organization | |||
/// <returns></returns> | |||
UserEntity CheckLogin(string username, string password); | |||
/// <summary> | |||
/// 验证登录 F_UserOnLine 0 不成功,1成功 | |||
/// </summary> | |||
/// <param name="username">账号</param> | |||
/// <param name="password">密码</param> | |||
/// <returns></returns> | |||
UserEntity CheckLoginByIdCard(string username, string password); | |||
/// <summary> | |||
/// 获取用户头像 | |||
/// </summary> | |||
/// <param name="userId">用户ID</param> | |||
@@ -195,5 +202,13 @@ namespace Learun.Application.Organization | |||
void UpdateIp(string ip, string id); | |||
void GetImgForDC(string userId); | |||
UserEntity GetEntityByWeixinOpenIdPC(string openId); | |||
/// <summary> | |||
/// 通过身份证后8位修改密码 | |||
/// </summary> | |||
/// <param name="newPassword"></param> | |||
/// <param name="oldPassword"></param> | |||
/// <returns></returns> | |||
bool RevisePasswordiden(string newPassword, string oldPassword); | |||
} | |||
} |
@@ -78,6 +78,31 @@ namespace Learun.Application.Organization | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取实体,通过身份证号 | |||
/// </summary> | |||
/// <param name="idcard">身份证号</param> | |||
/// <returns></returns> | |||
public UserEntity GetEntityByIdCard(string idcard) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository() | |||
.FindEntity<UserEntity>(a => a.F_IdentityCardNo.Equals(idcard) && a.F_DeleteMark == 0); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 用户列表(根据公司主键) | |||
/// </summary> | |||
@@ -0,0 +1,131 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-01-19 11:14 | |||
/// 描 述:默认密码配置 | |||
/// </summary> | |||
public class Sys_DefaultPwdConfigController : MvcControllerBase | |||
{ | |||
private Sys_DefaultPwdConfigIBLL sys_DefaultPwdConfigIBLL = new Sys_DefaultPwdConfigBLL(); | |||
#region 视图功能 | |||
/// <summary> | |||
/// 主页面 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Form() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetPageList(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = sys_DefaultPwdConfigIBLL.GetPageList(paginationobj, queryJson); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = paginationobj.total, | |||
page = paginationobj.page, | |||
records = paginationobj.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetFormData(string keyValue) | |||
{ | |||
var Sys_DefaultPwdConfigData = sys_DefaultPwdConfigIBLL.GetSys_DefaultPwdConfigEntity( keyValue ); | |||
var jsonData = new { | |||
Sys_DefaultPwdConfig = Sys_DefaultPwdConfigData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
sys_DefaultPwdConfigIBLL.DeleteEntity(keyValue); | |||
return Success("删除成功!"); | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="strEntity">实体</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[ValidateAntiForgeryToken] | |||
[AjaxOnly] | |||
public ActionResult SaveForm(string keyValue, string strEntity) | |||
{ | |||
Sys_DefaultPwdConfigEntity entity = strEntity.ToObject<Sys_DefaultPwdConfigEntity>(); | |||
entity.IsEnabled = false; | |||
sys_DefaultPwdConfigIBLL.SaveEntity(keyValue,entity); | |||
if (string.IsNullOrEmpty(keyValue)) | |||
{ | |||
} | |||
return Success("保存成功!"); | |||
} | |||
/// <summary> | |||
/// 启用 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DoEnabled(string keyValue) | |||
{ | |||
sys_DefaultPwdConfigIBLL.DoEnabled(keyValue); | |||
return Success("操作成功!"); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -3,6 +3,7 @@ using System.Data; | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
using System.Linq; | |||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
@@ -16,6 +17,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
public class SYS_ReceiveDocumentController : MvcControllerBase | |||
{ | |||
private SYS_ReceiveDocumentIBLL sYS_ReceiveDocumentIBLL = new SYS_ReceiveDocumentBLL(); | |||
private Sys_ReceiveFileIBLL receiveFileIbll=new Sys_ReceiveFileBLL(); | |||
#region 视图功能 | |||
@@ -28,6 +30,17 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 公文接收归档 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult IndexFile() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
@@ -56,17 +69,22 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 阅读详情 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult SelectUserForm() | |||
public ActionResult ReadList() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 阅读详情 | |||
/// 打印页面 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult ReadList() | |||
public ActionResult PrintView() | |||
{ | |||
return View(); | |||
} | |||
@@ -85,6 +103,17 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = sYS_ReceiveDocumentIBLL.GetPageList(paginationobj, queryJson); | |||
foreach (var item in data) | |||
{ | |||
var sql = $"SELECT COUNT(*) FROM dbo.Sys_ReceiveFile where ReadFlag=1 AND SFileId='{item.RID}'"; | |||
var sendSql = $"SELECT COUNT(*) FROM dbo.Sys_ReceiveFile where SFileId='{item.RID}'"; | |||
var readdt = sYS_ReceiveDocumentIBLL.Execute(sql); | |||
var senddt = sYS_ReceiveDocumentIBLL.Execute(sendSql); | |||
var readcount = readdt.Rows[0][0]; | |||
var sendcount = senddt.Rows[0][0]; | |||
item.NumberPeople = $"{readcount}/{sendcount}"; | |||
} | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
@@ -124,6 +153,21 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
}; | |||
return Success(jsonData); | |||
} | |||
public ActionResult PrintInfo(string keyValue) | |||
{ | |||
var entity = sYS_ReceiveDocumentIBLL.GetSys_ReceiveDocumentEntity(keyValue); | |||
var entityItem = receiveFileIbll.GetPageListBySendId(keyValue).ToList().Where(a=>a.ReadTime!=null).OrderBy(a=>a.ReadTime); | |||
object data = new | |||
{ | |||
entity, | |||
entityItem | |||
}; | |||
return Success(data); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
@@ -157,6 +201,9 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
} | |||
return Success("操作成功!"); | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// <param name="keyValue">主键</param> | |||
@@ -120,6 +120,22 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取批示信息 | |||
/// <summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetInstructions(string keyValue) | |||
{ | |||
var data = sys_ReceiveFileIBLL.GetInstructions(keyValue); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// <summary> | |||
/// <param name="queryJson">查询参数</param> | |||
@@ -185,6 +201,30 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
return Success("删除成功!"); | |||
} | |||
/// <summary> | |||
/// 设置批示状态为已处理 | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult DisPose(string keyValue) | |||
{ | |||
sys_ReceiveFileIBLL.DisPose(keyValue); | |||
return Success("操作成功!"); | |||
} | |||
/// <summary> | |||
/// 重置 | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult Reset(string keyValue) | |||
{ | |||
sys_ReceiveFileIBLL.Reset(keyValue); | |||
return Success("操作成功!"); | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
@@ -230,6 +270,38 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
sys_ReceiveFileIBLL.ReceiveDocumentIssue(entity); | |||
return Success("保存成功!"); | |||
} | |||
/// <summary> | |||
/// 主任批示 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult ZhuRenP(string strEntity) | |||
{ | |||
Sys_IssueEntity entity = strEntity.ToObject<Sys_IssueEntity>(); | |||
entity.SpecifyReceiver = sys_ReceiveFileIBLL.ZhuRenP(); | |||
//entity.SpecifyReceiver = "System"; | |||
sys_ReceiveFileIBLL.ReceiveDocumentIssue(entity); | |||
return Success("发送成功"); | |||
} | |||
/// <summary> | |||
/// 校长批示 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult XiaoZhangP(string strEntity) | |||
{ | |||
Sys_IssueEntity entity = strEntity.ToObject<Sys_IssueEntity>(); | |||
entity.SpecifyReceiver = sys_ReceiveFileIBLL.XiaoZhangP(); | |||
//entity.SpecifyReceiver = "System"; | |||
sys_ReceiveFileIBLL.ReceiveDocumentIssue(entity); | |||
return Success("发送成功"); | |||
} | |||
/// <summary> | |||
/// 查看实体数据 | |||
/// <param name="keyValue">主键</param> | |||
@@ -21,7 +21,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
private Sys_SendFileIBLL sys_SendFileIBLL = new Sys_SendFileBLL(); | |||
#region 视图功能 | |||
#region 视图功能 | |||
/// <summary> | |||
/// 主页面 | |||
@@ -32,6 +32,26 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 行政公文归档 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult IndexFile() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 党政公文归档 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult IndexPartyFile() | |||
{ | |||
return View(); | |||
} | |||
[HttpGet] | |||
public ActionResult IndexDocument() | |||
{ | |||
@@ -47,6 +67,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 主页面【党政公文下发】 | |||
/// <summary> | |||
@@ -56,11 +77,13 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
return View(); | |||
} | |||
[HttpGet] | |||
public ActionResult FormDocument() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
@@ -70,6 +93,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页【党政公文下发】 | |||
/// <summary> | |||
@@ -91,6 +115,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 【党政公文下发】 | |||
/// </summary> | |||
@@ -100,6 +125,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
return View(); | |||
} | |||
[HttpGet] | |||
public ActionResult ReadList() | |||
{ | |||
@@ -111,6 +137,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 【党政公文下发】 | |||
/// </summary> | |||
@@ -120,9 +147,10 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
@@ -135,6 +163,18 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = sys_SendFileIBLL.GetPageList(paginationobj, queryJson).Where(m => m.STypeId == 1); | |||
foreach (var item in data) | |||
{ | |||
var sql = $"SELECT COUNT(*) FROM dbo.Sys_ReceiveFile where ReadFlag=1 AND SFileId='{item.SFileId}'"; | |||
var sendSql = $"SELECT COUNT(*) FROM dbo.Sys_ReceiveFile where SFileId='{item.SFileId}'"; | |||
var readdt = sys_SendFileIBLL.Execute(sql); | |||
var senddt = sys_SendFileIBLL.Execute(sendSql); | |||
var readcount = readdt.Rows[0][0]; | |||
var sendcount = senddt.Rows[0][0]; | |||
item.NumberPeople = $"{readcount}/{sendcount}"; | |||
} | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
@@ -144,6 +184,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
}; | |||
return Success(jsonData); | |||
} | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetPageListDocument(string pagination, string queryJson) | |||
@@ -159,12 +200,24 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
}; | |||
return Success(jsonData); | |||
} | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetPageListParty(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = sys_SendFileIBLL.GetPageList(paginationobj, queryJson).Where(m => m.STypeId == 3); | |||
foreach (var item in data) | |||
{ | |||
var sql = $"SELECT COUNT(*) FROM dbo.Sys_ReceiveFile where ReadFlag=1 AND SFileId='{item.SFileId}'"; | |||
var sendSql = $"SELECT COUNT(*) FROM dbo.Sys_ReceiveFile where SFileId='{item.SFileId}'"; | |||
var readdt = sys_SendFileIBLL.Execute(sql); | |||
var senddt = sys_SendFileIBLL.Execute(sendSql); | |||
var readcount = readdt.Rows[0][0]; | |||
var sendcount = senddt.Rows[0][0]; | |||
item.NumberPeople = $"{readcount}/{sendcount}"; | |||
} | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
@@ -174,6 +227,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// <summary> | |||
@@ -190,6 +244,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
}; | |||
return Success(jsonData); | |||
} | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetFormDataView(string keyValue) | |||
@@ -202,6 +257,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// <summary> | |||
@@ -217,9 +273,10 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
@@ -233,6 +290,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
sys_SendFileIBLL.DeleteEntity(keyValue); | |||
return Success("删除成功!"); | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// <param name="keyValue">主键</param> | |||
@@ -249,6 +307,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
entity.STypeId = 1; | |||
} | |||
sys_SendFileIBLL.SaveEntity(keyValue, entity); | |||
return Success("保存成功!"); | |||
} | |||
@@ -264,6 +323,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
entity.STypeId = 2; | |||
} | |||
sys_SendFileIBLL.SaveEntity(keyValue, entity); | |||
return Success("保存成功!"); | |||
} | |||
@@ -279,9 +339,11 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
entity.STypeId = 3; | |||
} | |||
sys_SendFileIBLL.SaveEntity(keyValue, entity); | |||
return Success("保存成功!"); | |||
} | |||
/// <summary> | |||
/// 提交 | |||
/// </summary> | |||
@@ -294,6 +356,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
sys_SendFileIBLL.ChangeStatusById(keyValue, 1, processId); | |||
return Success("操作成功!"); | |||
} | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult ChangeStatusByIdDocument(string keyValue) | |||
@@ -303,6 +366,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
sys_SendFileIBLL.ChangeStatusByProcessId(guid, 2); | |||
return Success("操作成功!"); | |||
} | |||
/// <summary> | |||
/// 结束下发 | |||
/// </summary> | |||
@@ -316,6 +380,14 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
sys_SendFileIBLL.OverIssue(keyValue); | |||
return Success("下发成功!"); | |||
} | |||
/* public ActionResult ReceiveFile(string keyValue) | |||
{ | |||
return View(); | |||
}*/ | |||
#endregion | |||
} | |||
@@ -0,0 +1,15 @@ | |||
@{ | |||
ViewBag.Title = "默认密码配置"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="Sys_DefaultPwdConfig" > | |||
<div class="lr-form-item-title">密码名称<font face="宋体">*</font></div> | |||
<input id="PwdName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Sys_DefaultPwdConfig" > | |||
<div class="lr-form-item-title">密码<font face="宋体">*</font></div> | |||
<input id="Pwd" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Sys_DefaultPwdConfig/Form.js") |
@@ -0,0 +1,51 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2021-01-19 11:14 | |||
* 描 述:默认密码配置 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Sys_DefaultPwdConfig/GetFormData?keyValue=' + keyValue, function (data) { | |||
for (var id in data) { | |||
if (!!data[id].length && data[id].length > 0) { | |||
$('#' + id ).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
} | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
var postData = { | |||
strEntity: JSON.stringify($('body').lrGetFormData()) | |||
}; | |||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Sys_DefaultPwdConfig/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,39 @@ | |||
@{ | |||
ViewBag.Title = "默认密码配置"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout "> | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">密码名称</div> | |||
<input id="PwdName" type="text" class="form-control" /> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||
</div> | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<a id="lr_enabled" class="btn btn-default"><i class="fa fa-lock"></i> 启用</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Sys_DefaultPwdConfig/Index.js") |
@@ -0,0 +1,112 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2021-01-19 11:14 | |||
* 描 述:默认密码配置 | |||
*/ | |||
var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/EducationalAdministration/Sys_DefaultPwdConfig/Form', | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/EducationalAdministration/Sys_DefaultPwdConfig/Form?keyValue=' + keyValue, | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/Sys_DefaultPwdConfig/DeleteForm', { keyValue: keyValue}, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 启用 | |||
$('#lr_enabled').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
var IsEnabled = $('#gridtable').jfGridValue('IsEnabled'); | |||
if (IsEnabled == true) { | |||
learun.alert.warning("当前项已启用!"); | |||
return false; | |||
} | |||
learun.layerConfirm('是否确认启用该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/Sys_DefaultPwdConfig/DoEnabled', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').lrAuthorizeJfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/Sys_DefaultPwdConfig/GetPageList', | |||
headData: [ | |||
{ label: "密码名称", name: "PwdName", width: 150, align: "left"}, | |||
{ label: "密码", name: "Pwd", width: 150, align: "left"}, | |||
{ | |||
label: "是否启用", name: "IsEnabled", width: 100, align: "left", | |||
formatter: function (cellvalue, rowObject) { | |||
return cellvalue == true ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>"; | |||
} | |||
}, | |||
], | |||
mainId:'Id', | |||
isPage: true | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
$('#gridtable').jfGridSet('reload'); | |||
}; | |||
page.init(); | |||
} |
@@ -7,10 +7,18 @@ | |||
<div class="lr-form-item-title">来文单位</div> | |||
<input id="RSourceUnit" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Sys_ReceiveDocument" > | |||
<div class="lr-form-item-title">字第(号)</div> | |||
<input id="lwz" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Sys_ReceiveDocument" > | |||
<div class="lr-form-item-title">收文单位</div> | |||
<div id="RReceiveUnit" ></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Sys_ReceiveDocument" > | |||
<div class="lr-form-item-title">字第(号)</div> | |||
<input id="swz" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Sys_ReceiveDocument" > | |||
<div class="lr-form-item-title">缓急程度</div> | |||
<div id="RUrgencyDegree" ></div> | |||
@@ -7,10 +7,18 @@ | |||
<div class="lr-form-item-title">来文单位</div> | |||
<input id="RSourceUnit" type="text" readonly="readonly" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Sys_ReceiveDocument"> | |||
<div class="lr-form-item-title">字第(号)</div> | |||
<input id="lwz" type="text" readonly="readonly" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Sys_ReceiveDocument"> | |||
<div class="lr-form-item-title">收文单位</div> | |||
<div id="RReceiveUnit" readonly="readonly"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Sys_ReceiveDocument"> | |||
<div class="lr-form-item-title">字第(号)</div> | |||
<input id="swz" type="text" readonly="readonly" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Sys_ReceiveDocument"> | |||
<div class="lr-form-item-title">缓急程度</div> | |||
<div id="RUrgencyDegree" readonly="readonly"></div> | |||
@@ -7,7 +7,9 @@ | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="datesearch"></div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<div id="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
@@ -31,17 +33,20 @@ | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<div class=" btn-group btn-group-sm" > | |||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 录入</a> | |||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 修改</a> | |||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||
<a id="lr_submit" class="btn btn-default"><i class="fa fa-plus"></i> 提交</a> | |||
@*<a id="lr_submit" class="btn btn-default"><i class="fa fa-plus"></i> 提交</a>*@ | |||
</div> | |||
<div class=" btn-group btn-group-sm" > | |||
<a id="lr_view" class="btn btn-default"><i class="fa fa-search-minus"></i> 查看</a> | |||
<a id="lr_IssueSpecifyReceiver" class="btn btn-default"><i class="fa fa-envelope"></i> 下发</a> | |||
<a id="lr_IssueSpecifyReceiver1" class="btn btn-default"><i class="fa fa-envelope"></i> 校办主任阅签</a> | |||
<a id="lr_IssueSpecifyReceiver2" class="btn btn-default"><i class="fa fa-envelope"></i> 校长书记批办</a> | |||
<a id="lr_IssueSpecifyReceiver" class="btn btn-default"><i class="fa fa-envelope"></i> 部门签字办理</a> | |||
<a id="lr_OverIssue" class="btn btn-default"><i class="fa fa-minus-square"></i> 结束下发</a> | |||
<a id="lr_read" class="btn btn-default"><i class="fa fa-calendar-minus-o"></i> 查阅情况</a> | |||
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -8,14 +8,43 @@ var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var processId = ''; | |||
var auditors = {}; | |||
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); | |||
@@ -52,11 +81,6 @@ var bootstrap = function ($, learun) { | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('RID'); | |||
if (learun.checkrow(keyValue)) { | |||
var SendFlag = $('#gridtable').jfGridValue('RSendFlag'); | |||
if (SendFlag != 0) { | |||
learun.alert.warning("当前项目已提交不能编辑!"); | |||
return; | |||
} | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
@@ -107,83 +131,78 @@ var bootstrap = function ($, learun) { | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('RID'); | |||
if (learun.checkrow(keyValue)) { | |||
var SendFlag = $('#gridtable').jfGridValue('RSendFlag'); | |||
if (SendFlag != 0) { | |||
learun.alert.warning("当前项目已提交不能删除!"); | |||
return; | |||
} | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveDocument/DeleteForm', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
page.search(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 提交 | |||
$('#lr_submit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('RID'); | |||
if (learun.checkrow(keyValue)) { | |||
var SendFlag = $('#gridtable').jfGridValue('RSendFlag'); | |||
if (SendFlag != 0) { | |||
learun.alert.warning("当前项目已提交,请耐心等待审批!"); | |||
return; | |||
//// 提交 | |||
//$('#lr_submit').on('click', function () { | |||
// var keyValue = $('#gridtable').jfGridValue('RID'); | |||
// if (learun.checkrow(keyValue)) { | |||
// var SendFlag = $('#gridtable').jfGridValue('RSendFlag'); | |||
// if (SendFlag != 0) { | |||
// learun.alert.warning("当前项目已提交,请耐心等待审批!"); | |||
// return; | |||
// } | |||
// learun.layerConfirm('是否确认提交该项!', function (res) { | |||
// if (res) { | |||
// processId = learun.newGuid(); | |||
// learun.postForm(top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveDocument/ChangeStatusById', { keyValue: keyValue, processId: processId }, function (res) { | |||
// refreshGirdData(res, {}); | |||
// }); | |||
// } | |||
// }); | |||
// } | |||
//}); | |||
//校办主任阅签 | |||
$('#lr_IssueSpecifyReceiver1').on('click', | |||
function () { | |||
var keyValue = $('#gridtable').jfGridValue('RID'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认请校办主任阅签!', function (res) { | |||
if (res) { | |||
var formData = {}; | |||
formData.RFileId = ''; | |||
formData.SFileId = keyValue; | |||
var postData = { | |||
strEntity: JSON.stringify(formData) | |||
}; | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/ZhuRenP', postData, function (res) { | |||
page.search(); | |||
}); | |||
} | |||
}); | |||
} | |||
learun.layerForm({ | |||
id: 'formselectuser', | |||
title: '下发审批指定接收人', | |||
url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveDocument/SelectUserForm?keyValue=' + keyValue, | |||
width: 800, | |||
height: 200, | |||
callBack: function (id) { | |||
var res = false; | |||
// 验证数据 | |||
res = top[id].validForm(); | |||
// 保存数据 | |||
}); | |||
//校长书记批办 | |||
$('#lr_IssueSpecifyReceiver2').on('click', | |||
function () { | |||
var keyValue = $('#gridtable').jfGridValue('RID'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认请校校长书记批办!', function (res) { | |||
if (res) { | |||
res = top[id].save('', function (formres, formdata) { | |||
processId = learun.newGuid(); | |||
var schemeObj; | |||
//初始化流程 | |||
learun.httpAsync('GET', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/GetSchemeByCode', { code: "Sys_ReceiveDocument" }, function (data) { | |||
if (data) { | |||
schemeObj = JSON.parse(data.F_Content); | |||
// 获取开始节点 | |||
$.each(schemeObj.nodes, function (_index, _item) { | |||
if (_item.type == 'startround') { | |||
var param = { | |||
code: 'Sys_ReceiveDocument', | |||
processId: '', | |||
taskId: '', | |||
nodeId: _item.id, | |||
operationCode: 'agree' | |||
}; | |||
learun.httpAsync('GET', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/GetNextAuditors', param, function (data) { | |||
$.each(data, | |||
function (_id, _list) { | |||
if (_list.length > 0) { | |||
auditors[_id] = formdata.SpecifyReceiver; | |||
} | |||
}); | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveDocument/ChangeStatusById', { keyValue: keyValue, processId: processId }, function (datares) { | |||
refreshGirdData(datares, {}); | |||
return true; | |||
}); | |||
}); | |||
return true; | |||
} | |||
}); | |||
} | |||
}); | |||
var formData = {}; | |||
formData.RFileId = ''; | |||
formData.SFileId = keyValue; | |||
var postData = { | |||
strEntity: JSON.stringify(formData) | |||
}; | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/XiaoZhangP', postData, function (res) { | |||
page.search(); | |||
}); | |||
} | |||
return res; | |||
} | |||
}); | |||
} | |||
}); | |||
}); | |||
} | |||
}); | |||
// 下发审批指定接收人 | |||
$('#lr_IssueSpecifyReceiver').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('RID'); | |||
@@ -213,17 +232,11 @@ var bootstrap = function ($, learun) { | |||
$('#lr_OverIssue').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('RID'); | |||
if (learun.checkrow(keyValue)) { | |||
var SendFlag = $('#gridtable').jfGridValue('RSendFlag'); | |||
console.log(SendFlag); | |||
if (SendFlag !== '2') { | |||
learun.alert.warning("当前公文未审批通过,请耐心等待审批!"); | |||
return; | |||
} | |||
learun.layerConfirm('是否结束下发!', function (res) { | |||
if (res) { | |||
processId = learun.newGuid(); | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveDocument/OverIssue', { keyValue: keyValue, }, function (res) { | |||
refreshGirdData(res, {}); | |||
page.search(); | |||
}); | |||
} | |||
}); | |||
@@ -239,17 +252,51 @@ var bootstrap = function ($, learun) { | |||
url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveDocument/ReadList?keyValue=' + keyValue, | |||
width: 850, | |||
height: 400, | |||
btn: null | |||
btn: null, | |||
end: function () { | |||
page.search(); | |||
} | |||
}); | |||
} | |||
}); | |||
//打印 | |||
$('#lr_print').on('click', | |||
function () { | |||
var keyValue = $('#gridtable').jfGridValue('RID'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerFormForPercent({ | |||
id: 'form', | |||
title: '查阅情况', | |||
url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveDocument/PrintView?keyValue=' + keyValue, | |||
width: '100%', | |||
height: '100%', | |||
btn: null | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').lrAuthorizeJfGrid({ | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveDocument/GetPageList', | |||
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) { | |||
@@ -261,6 +308,7 @@ var bootstrap = function ($, learun) { | |||
}); | |||
} | |||
}, | |||
{ label: "字第(号)", name: "swz", width: 100, align: "left" }, | |||
{ | |||
label: "缓急程度", name: "RUrgencyDegree", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
@@ -298,57 +346,62 @@ var bootstrap = function ($, learun) { | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "提交时间", name: "F_CreateDate", width: 180, align: "left", formatter: function (cellvalue) { | |||
if (cellvalue != '0001-01-01 00:00:00') { | |||
return cellvalue; | |||
} | |||
} | |||
}, | |||
{ label: "审批意见", name: "SpecifyReceiver", width: 300, align: "left" }, | |||
{ | |||
label: "状态", name: "RSendFlag", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
if (cellvalue === "1") { | |||
return '<span class=\"label label-warning\">审批中</span>'; | |||
} else if (cellvalue === "2") { | |||
return '<span class=\"label label-info\">审批通过</span>'; | |||
} else if (cellvalue === "3") { | |||
return '<span class=\"label label-danger\" >审批失败</span>'; | |||
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, | |||
sidx: 'F_CreateDate desc' | |||
isPage: true | |||
}); | |||
page.search(); | |||
//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', | |||
auditors: JSON.stringify(auditors) | |||
}; | |||
learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) { | |||
learun.loading(false); | |||
}); | |||
//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.search(); | |||
// } | |||
//}; | |||
page.init(); | |||
} |
@@ -0,0 +1,46 @@ | |||
@{ | |||
ViewBag.Title = "公文接收归档"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout "> | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="datesearch"></div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<div id="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">文件标题</div> | |||
<input id="RTitle" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">来文单位</div> | |||
<input id="RSourceUnit" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">收文单位</div> | |||
<div id="RReceiveUnit"></div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
<div class=" btn-group btn-group-sm" > | |||
<a id="lr_view" class="btn btn-default"><i class="fa fa-search-minus"></i> 查看</a> | |||
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/IndexFile.js") |
@@ -0,0 +1,227 @@ | |||
/* * 版 本 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, | |||
btn: null, | |||
callBack: function (id) { | |||
var res = false; | |||
// 验证数据 | |||
res = top[id].validForm(); | |||
// 保存数据 | |||
if (res) { | |||
res = top[id].save('', function () { | |||
page.search(); | |||
}); | |||
} | |||
return res; | |||
} | |||
}); | |||
} | |||
}); | |||
//打印 | |||
$('#lr_print').on('click', | |||
function () { | |||
var keyValue = $('#gridtable').jfGridValue('RID'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerFormForPercent({ | |||
id: 'form', | |||
title: '查阅情况', | |||
url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveDocument/PrintView?keyValue=' + keyValue, | |||
width: '100%', | |||
height: '100%', | |||
btn: null | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveDocument/GetPageList', | |||
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(); | |||
} |
@@ -0,0 +1,147 @@ | |||
@{ | |||
ViewBag.Title = "公文发送"; | |||
Layout = "~/Views/Shared/_SimpleForm.cshtml"; | |||
} | |||
<!DOCTYPE html> | |||
<html> | |||
<head> | |||
<meta charset="utf-8"> | |||
<title></title> | |||
<style> | |||
table, | |||
tr, | |||
td { | |||
padding: 0; | |||
margin: 0; | |||
border-collapse: collapse; | |||
} | |||
table { | |||
/* table-layout: fixed; */ | |||
font-size: 13px; | |||
} | |||
.tableBox { | |||
width: 90%; | |||
margin: 30px auto; | |||
} | |||
.table { | |||
width: 100%; | |||
border-top: 1px solid #000; | |||
border-right: 1px solid #000; | |||
} | |||
.table th{ | |||
font-size: 18px; | |||
border-left: 1px solid #000; | |||
padding: 5px 0; | |||
} | |||
.table tr { | |||
border-bottom: 1px solid #000; | |||
} | |||
.table td { | |||
border-left: 1px solid #000; | |||
line-height: 20px; | |||
padding: 5px 5px; | |||
} | |||
.tableT { | |||
text-align: center; | |||
font-size: 18px; | |||
margin-bottom: 5px; | |||
letter-spacing: 4px; | |||
} | |||
.tableTxt1,.tableTxt2{ | |||
border-left: 1px solid #000; | |||
border-right: 1px solid #000; | |||
border-bottom: 1px solid #000; | |||
padding: 5px 10px; | |||
} | |||
.tableTxt1:first-child{ | |||
border-top: 1px solid #000; | |||
} | |||
.tableTxt2{ | |||
text-align: right; | |||
} | |||
.btn { | |||
width: 100px; | |||
height: 34px; | |||
line-height: 34px; | |||
text-align: center; | |||
margin: 30px auto; | |||
border: 1px solid #ccc; | |||
cursor: pointer; | |||
border-radius: 4px; | |||
} | |||
</style> | |||
</head> | |||
<body> | |||
<div id="table"> | |||
<div class="tableBox"> | |||
<div class="tableT">北京金隅科技学校</div> | |||
<div class="tableT">收文处理专用纸(收文登记)</div> | |||
<table class="table"> | |||
<tr> | |||
<td style="width: 80px;">收文</td> | |||
<td id="RReceiveUnit"></td> | |||
<td style="width: 80px;">字第</td> | |||
<td id="swz"></td> | |||
<td style="width: 80px;">号</td> | |||
<td>收文日期</td> | |||
<td id="RReceiveTime"></td> | |||
</tr> | |||
<tr> | |||
<td>来文</td> | |||
<td id="RSourceUnit"></td> | |||
<td>字第</td> | |||
<td id="lwz"></td> | |||
<td>号</td> | |||
<td></td> | |||
<td></td> | |||
</tr> | |||
<tr> | |||
<td>收文标题</td> | |||
<td colspan="6" id="RTitle"></td> | |||
</tr> | |||
<tr> | |||
<td>处理意见</td> | |||
<td colspan="6" id="yj1"></td> | |||
</tr> | |||
<tr> | |||
<td>领导批示</td> | |||
<td colspan="6"> | |||
<div class="tableTxt1" id="yj2"></div> | |||
<div class="tableTxt2" id="xiaozhanginfo"></div> | |||
</td> | |||
</tr> | |||
<tr> | |||
<td>部门处理情况</td> | |||
<td colspan="6" id="yj3"> | |||
</td> | |||
</tr> | |||
<tr> | |||
<td>经办人</td> | |||
<td colspan="4" id="SenderId"></td> | |||
<td>办结日期</td> | |||
<td id="overDate"></td> | |||
</tr> | |||
</table> | |||
</div> | |||
</div> | |||
<div class="btn">打印</div> | |||
<script src="js/jquery-1.4.4.min.js"></script> | |||
<script src="js/jquery.jqprint-0.3.js"></script> | |||
<script> | |||
$('.btn').click(function(){ | |||
$('.tableBox').jqprint(); | |||
}) | |||
</script> | |||
</body> | |||
</html> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/PrintView.js") |
@@ -0,0 +1,80 @@ | |||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2019-04-11 10:31 | |||
* 描 述:公文发送 | |||
*/ | |||
var refreshGirdData; | |||
var keyValue = request('keyValue'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var processId = ''; | |||
var page = { | |||
init: function () { | |||
console.log(keyValue); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
$.get(top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveDocument/PrintInfo?keyValue=' + keyValue, | |||
function(data) { | |||
var data = JSON.parse(data).data; | |||
var entityItem = data.entityItem; | |||
console.log(data); | |||
learun.clientdata.getAsync('department', { | |||
key: data.entity.RReceiveUnit, | |||
callback: function (_data) { | |||
console.log(_data); | |||
$('#RReceiveUnit').html(_data.name); | |||
} | |||
}); | |||
$('#swz').html(data.entity.swz); | |||
$('#RReceiveTime').html(data.entity.RReceiveTime.substr(0,10)); | |||
$('#RSourceUnit').html(data.entity.RSourceUnit); | |||
$('#lwz').html(data.entity.lwz); | |||
$('#RTitle').html(data.entity.RTitle); | |||
$('#yj1').html(entityItem[0].SpecifyReceiver); | |||
$('#yj2').html(entityItem[1].SpecifyReceiver); | |||
learun.clientdata.getAsync('user', { | |||
key: entityItem[1].ReceiverId, | |||
callback: function (_data) { | |||
console.log(_data); | |||
$('#xiaozhanginfo').html(_data.name + ' ' + (entityItem[1].ReadTime || '').substr(0, 10)); | |||
} | |||
}); | |||
learun.clientdata.getAsync('user', { | |||
key: data.entity.SenderId, | |||
callback: function (_data) { | |||
$('#SenderId').html(_data.name); | |||
} | |||
}); | |||
var text = ''; | |||
$.each(entityItem, | |||
function(i, item) { | |||
if (i < 2) {return true;} | |||
learun.clientdata.getAsync('user', { | |||
key: item.ReceiverId, | |||
callback: function (_data) { | |||
text += '<div class="tableTxt1">' + | |||
(item.SpecifyReceiver == '' ? '已阅' : item.SpecifyReceiver) + | |||
'</div> <div class="tableTxt2"> '+_data.name+' '+(item.ReadTime || '').substr(0,10)+'</div>'; | |||
} | |||
}); | |||
}); | |||
$('#yj3').html(text); | |||
$('#overDate').html(data.entityItem[data.entityItem.length - 1].ReadTime.substr(0,10)); | |||
}); | |||
}, | |||
}; | |||
page.init(); | |||
} |
@@ -17,7 +17,8 @@ | |||
<div class="lr-layout-tool-right"> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
<a id="lr_Issue" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 下发</a> | |||
<a id="lr_reset" class="btn btn-default"><i class="fa fa-imdb"></i> 重新发起</a> | |||
<a id="lr_dispose" class="btn btn-default"><i class="fa fa-imdb"></i> 已处理</a> | |||
</div> | |||
</div> | |||
@@ -25,39 +25,36 @@ var bootstrap = function ($, learun) { | |||
location.reload(); | |||
}); | |||
$('#lr_Issue').on('click', | |||
function () { | |||
var keyValue = $('#gridtable').jfGridValue('SFileId'); | |||
var rFileId = $('#gridtable').jfGridValue('RFileId'); | |||
var specifyReceiver = $('#gridtable').jfGridValue('SpecifyReceiver'); | |||
if (learun.checkrow(rFileId)) { | |||
var SendStatus = $('#gridtable').jfGridValue('SendStatus'); | |||
if (SendStatus) { | |||
learun.alert.warning("已下发!"); | |||
return; | |||
} | |||
learun.layerForm({ | |||
id: 'formIssue', | |||
title: '下发', | |||
url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveDocument/IssueForm?keyValue=' + keyValue + '&rFileId=' + rFileId + '&specifyReceiver=' + specifyReceiver, | |||
width: 500, | |||
height: 500, | |||
callBack: function (id) { | |||
var res = false; | |||
// 验证数据 | |||
res = top[id].validForm(); | |||
// 保存数据 | |||
if (res) { | |||
res = top[id].save('', function () { | |||
page.search(); | |||
}); | |||
} | |||
return res; | |||
//已处理 | |||
$('#lr_dispose').on('click', | |||
function() { | |||
var sendId = $('#gridtable').jfGridValue('RFileId'); | |||
if (learun.checkrow(sendId)) { | |||
learun.layerConfirm('是否确认此批示已处理!', function (res) { | |||
if (res) { | |||
learun.getForm(top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/DisPose?keyValue='+sendId, function () { | |||
page.search(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
//重新发起 | |||
$('#lr_reset').on('click', | |||
function () { | |||
var sendId = $('#gridtable').jfGridValue('RFileId'); | |||
if (learun.checkrow(sendId)) { | |||
learun.layerConfirm('是否确认重新发起此批示!', function (res) { | |||
if (res) { | |||
learun.getForm(top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/Reset?keyValue=' + sendId, function () { | |||
page.search(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
@@ -67,33 +64,10 @@ var bootstrap = function ($, learun) { | |||
{ | |||
label: "接收人", name: "Receiver", width: 150, align: "left" | |||
}, | |||
{ label: "签批意见", name: "SpecifyReceiver", width: 300, align: "left" }, | |||
{ | |||
label: "查阅时间", name: "ReadTime", width: 150, align: "left" | |||
}, | |||
{ | |||
label: "指定接收人", name: "SpecifyReceiver", width: 150, 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: "ReadFlag", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
@@ -105,20 +79,25 @@ var bootstrap = function ($, learun) { | |||
} | |||
}, | |||
{ | |||
label: "下发状态", name: "SendStatus", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
if (cellvalue === true) { | |||
return '<span class=\"label label-success\">已下发</span>'; | |||
} else { | |||
return '<span class=\"label label-warning\">未下发</span>'; | |||
label: "处理状态", name: "RStatus", width: 100, align: "left", | |||
formatter: function (callback, value, row, op, $cell) { | |||
console.log(callback); | |||
switch (callback) { | |||
case 0: | |||
return '<span class=\"label label-warning\">未处理</span>'; | |||
case 1: | |||
return '<span class=\"label label-success\">已处理</span>';; | |||
default: | |||
return '<span class=\"label label-success\">无需处理</span>'; | |||
} | |||
} | |||
} | |||
}, | |||
], | |||
mainId: 'RFileId', | |||
isPage: true, | |||
sidx: 'ReadFlag,ReadTime', | |||
sord: 'ASC' | |||
sord: 'DASC' | |||
}); | |||
page.search(); | |||
}, | |||
@@ -23,5 +23,17 @@ | |||
<div class="lr-form-item-title">内容</div> | |||
<div id="Contents" style="margin-top:6px;"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Sys_ReceiveFile"> | |||
<div class="lr-form-item-title">批示</div> | |||
<textarea id="SpecifyReceiver" class="form-control" style="height:100px;"></textarea> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Sys_ReceiveFile"> | |||
<div class="lr-form-item-title">通知管理员</div> | |||
<div id="RStatus"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">批示记录</div> | |||
<div id="gridtable"></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Sys_ReceiveFile/Form.js") |
@@ -6,8 +6,11 @@ | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
var readFlag = request('readFlag'); | |||
var isDesktop = request('isDesktop');//首页"我的桌面"中的"公文接收"列表子项的点击事件 | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var loginInfo = top.learun.clientdata.get(['userinfo']); | |||
var selectedRow = learun.frameTab.currentIframe().selectedRow; | |||
var page = { | |||
init: function () { | |||
@@ -16,17 +19,35 @@ var bootstrap = function ($, learun) { | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
//如果是校长的话,审批需要做必填设置 | |||
if (loginInfo.realName == "关亮") { | |||
$('#SpecifyReceiver').prev().html('批示<font face="宋体">*</font>'); | |||
$('#SpecifyReceiver').attr('isvalid', 'yes').attr('checkexpession', 'NotNull'); | |||
} | |||
$('#SenderId').lrformselect({ | |||
layerUrl: top.$.rootUrl + '/LR_OrganizationModule/User/SelectOnlyForm', | |||
layerUrlW: 400, | |||
layerUrlH: 300, | |||
dataUrl: top.$.rootUrl + '/LR_OrganizationModule/User/GetListByUserIds' | |||
}); | |||
}); | |||
$('#RStatus').lrRadioCheckbox({ | |||
data: [{ text: '通知', value: 0 }, { text: '不通知', value: 1 }], text: 'text', value: 'value' | |||
}); | |||
if ($('.lr-radio').find('input:radio:checked').length == 0) { | |||
$('.lr-radio').find('input')[0].checked = true; | |||
} | |||
$('#SendType').lrDataItemSelect({ code: 'FileSendType' }); | |||
if (selectedRow.ReadFlag == true) {//已读 | |||
$('#Url').lrUploader(); | |||
} else {//未读 | |||
$('#Url').lrUploader({ RFileId: selectedRow.RFileId }); | |||
if (isDesktop != "1") { | |||
if (selectedRow.ReadFlag == true) {//已读 | |||
$('#Url').lrUploader({ isView: false }); | |||
} else {//未读 | |||
$('#Url').lrUploader({ RFileId: selectedRow.RFileId, isView: false }); | |||
} | |||
} else { | |||
$('#Url').lrUploader({ RFileId: keyValue, isView: false }); | |||
} | |||
}, | |||
initData: function () { | |||
@@ -38,11 +59,33 @@ var bootstrap = function ($, learun) { | |||
} | |||
else { | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
$('#Contents').html(data[id].Contents); | |||
} | |||
} | |||
$("#lrUploader_uploadBtn_Url").hide(); | |||
}); | |||
//已读状态不可修改批示 | |||
if (readFlag == 'true') { | |||
$('#SpecifyReceiver').attr('readonly', 'readonly'); | |||
} | |||
var data = learun.httpGet(top.$.rootUrl + | |||
'/EducationalAdministration/Sys_ReceiveFile/GetInstructions?keyValue=' + | |||
keyValue, | |||
''); | |||
$('#gridtable').jfGrid({ | |||
headData: [ | |||
{ label: "批阅人", name: "Receiver", width: 100, align: "left" }, | |||
{ label: "内容", name: "SpecifyReceiver", width: 500, align: "left" }, | |||
], | |||
mainId: 'RFileId', | |||
isPage: true, | |||
sidx: 'SendTime', | |||
sord: 'DESC' | |||
}); | |||
$('#gridtable').jfGridSet('refreshdata', data.data.rows); | |||
} | |||
} | |||
}; | |||
@@ -51,6 +94,7 @@ var bootstrap = function ($, learun) { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
var postData = { | |||
strEntity: JSON.stringify($('body').lrGetFormData()) | |||
}; | |||
@@ -18,6 +18,10 @@ | |||
<input id="Title" type="text" class="form-control" /> | |||
</div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">接收人</div> | |||
<input id="Receiver" type="text" class="form-control" /> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -27,7 +27,7 @@ | |||
</div> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_Read" class="btn btn-default"><i class="fa fa-plus"></i> 查阅</a> | |||
<a id="lr_SpecifyReceiver" class="btn btn-default"><i class="fa fa-plus"></i> 指定接收人</a> | |||
@*<a id="lr_SpecifyReceiver" class="btn btn-default"><i class="fa fa-plus"></i> 指定接收人</a>*@ | |||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||
</div> | |||
</div> | |||
@@ -8,8 +8,8 @@ var refreshGirdData; | |||
var selectedRow; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var startTime; | |||
var endTime; | |||
var startTime = ''; | |||
var endTime = ''; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
@@ -35,8 +35,6 @@ var bootstrap = function ($, learun) { | |||
yxShow: false, | |||
preyShow: false, | |||
yShow: false, | |||
// 默认 | |||
dfvalue: '1', | |||
selectfn: function (begin, end) { | |||
startTime = begin; | |||
endTime = end; | |||
@@ -79,22 +77,22 @@ var bootstrap = function ($, learun) { | |||
}); | |||
} | |||
}); | |||
// 指定接收人 | |||
$('#lr_SpecifyReceiver').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('RFileId'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerForm({ | |||
id: 'formSys_ReceiveFile', | |||
title: '指定接收人', | |||
url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/SpecifyReceiverForm?keyValue=' + keyValue, | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
//// 指定接收人 | |||
//$('#lr_SpecifyReceiver').on('click', function () { | |||
// var keyValue = $('#gridtable').jfGridValue('RFileId'); | |||
// if (learun.checkrow(keyValue)) { | |||
// learun.layerForm({ | |||
// id: 'formSys_ReceiveFile', | |||
// title: '指定接收人', | |||
// url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/SpecifyReceiverForm?keyValue=' + keyValue, | |||
// width: 600, | |||
// height: 400, | |||
// callBack: function (id) { | |||
// return top[id].acceptClick(refreshGirdData); | |||
// } | |||
// }); | |||
// } | |||
//}); | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('RFileId'); | |||
@@ -118,32 +116,28 @@ var bootstrap = function ($, learun) { | |||
var keyValue = $('#gridtable').jfGridValue('RFileId'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
top.layer.open({ | |||
//判断查阅状态 | |||
if (selectedRow.ReadFlag == false) { | |||
//判断附件 | |||
//if (selectedRow.Url == null || selectedRow.Url == "") { | |||
//自动已读 | |||
learun.postFormSilence(top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/Read', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
//} | |||
} | |||
learun.layerForm({ | |||
id: 'formSys_ReceiveFile', | |||
type: 2, | |||
title: '查看', | |||
area: ['1000px', '600px'], | |||
btn: null, | |||
content: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/Form?keyValue=' + keyValue, | |||
skin: 'lr-layer-nobtn', | |||
success: function (layero, index) { | |||
top['formSys_ReceiveFile'] = learun.iframe($(layero).find('iframe').attr('id'), top.frames); | |||
//判断查阅状态 | |||
if (selectedRow.ReadFlag == false) { | |||
//判断附件 | |||
//if (selectedRow.Url == null || selectedRow.Url == "") { | |||
//自动已读 | |||
learun.postFormSilence(top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/Read', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
//} | |||
} | |||
}, | |||
end: function () { | |||
top['formSys_ReceiveFile'] = null; | |||
url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/Form?keyValue=' + keyValue + '&readFlag=' + selectedRow.ReadFlag, | |||
width: 1000, | |||
height: 600, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
@@ -162,43 +156,12 @@ var bootstrap = function ($, learun) { | |||
callback(_data.name); | |||
} | |||
}); | |||
}}, | |||
{ label: "主题", name: "Title", width: 300, align: "left" }, | |||
{ label: "发送时间", name: "SendTime", width: 130, align: "left" }, | |||
{ | |||
label: "接收对象", name: "SendType", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('dataItem', { | |||
key: value, | |||
code: 'FileSendType', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "主题", name: "Title", width: 300, align: "left" }, | |||
{ label: "发送时间", name: "SendTime", width: 130, align: "left" }, | |||
{ | |||
label: "指定接收人", name: "SpecifyReceiver", width: 150, 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: "SpecifyReceiver", width: 300, align: "left" | |||
}, | |||
{ | |||
label: "状态", name: "ReadFlag", width: 100, align: "left", | |||
@@ -210,6 +173,19 @@ var bootstrap = function ($, learun) { | |||
} | |||
} | |||
}, | |||
{ | |||
label: "是否通知管理员", name: "RStatus", width: 100, align: "left", | |||
formatter: function (callback, value, row, op, $cell) { | |||
switch (callback) { | |||
case 1: | |||
return '不通知'; | |||
case 0: | |||
return '通知'; | |||
default: | |||
} | |||
} | |||
}, | |||
{ label: "查阅时间", name: "ReadTime", width: 130, align: "left" }, | |||
], | |||
mainId: 'RFileId', | |||
@@ -217,6 +193,7 @@ var bootstrap = function ($, learun) { | |||
sidx: 'SendTime', | |||
sord: 'DESC' | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
@@ -18,6 +18,10 @@ | |||
<input id="Title" type="text" class="form-control" /> | |||
</div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">接收人</div> | |||
<input id="Receiver" type="text" class="form-control" /> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -27,6 +27,10 @@ | |||
<div class="lr-form-item-title">接收校区<font face="宋体">*</font></div> | |||
<div id="CompanyId" ></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Sys_SendFile" > | |||
<div class="lr-form-item-title">文号<font face="宋体">*</font></div> | |||
<input id="DocNo" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Sys_SendFile" > | |||
<div class="lr-form-item-title">文件</div> | |||
<div id="Url" ></div> | |||
@@ -7,6 +7,9 @@ | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="datesearch"></div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<div id="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
@@ -14,6 +17,10 @@ | |||
<div class="lr-form-item-title">主题</div> | |||
<input id="Title" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">接收人</div> | |||
<input id="Receiver" type="text" class="form-control" /> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -31,6 +38,7 @@ | |||
<a id="lr_submit" class="btn btn-default"><i class="fa fa-plus"></i> 提交</a> | |||
<a id="lr_view" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 查看</a> | |||
<a id="lr_read" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 查阅情况</a> | |||
<a id="lr_OverIssue" class="btn btn-default"><i class="fa fa-minus-square"></i> 结束下发</a> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -8,12 +8,42 @@ var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var processId = ''; | |||
var startTime; | |||
var endTime; | |||
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); | |||
@@ -138,6 +168,20 @@ var bootstrap = function ($, learun) { | |||
}); | |||
} | |||
}); | |||
// 结束下发 | |||
$('#lr_OverIssue').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('SFileId'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否结束下发!', function (res) { | |||
if (res) { | |||
processId = learun.newGuid(); | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/Sys_SendFile/OverIssue', { keyValue: keyValue, }, function (res) { | |||
page.search(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
@@ -145,6 +189,7 @@ var bootstrap = function ($, learun) { | |||
url: top.$.rootUrl + '/EducationalAdministration/Sys_SendFile/GetPageList', | |||
headData: [ | |||
{ label: "主题", name: "Title", width: 300, align: "left" }, | |||
{ label: "文号", name: "DocNo", width: 300, align: "left" }, | |||
{ | |||
label: "接收对象", name: "SendType", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
@@ -157,7 +202,7 @@ var bootstrap = function ($, learun) { | |||
}); | |||
} | |||
}, | |||
{ | |||
{ | |||
label: "接收人", name: "Receiver", width: 300, align: "left" | |||
}, | |||
{ | |||
@@ -166,6 +211,7 @@ var bootstrap = function ($, learun) { | |||
{ | |||
label: "下发时间", name: "SendTime", width: 150, align: "left" | |||
}, | |||
{ | |||
label: "状态", name: "SendFlag", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
@@ -178,14 +224,21 @@ var bootstrap = function ($, learun) { | |||
} | |||
} | |||
}, | |||
{ | |||
label: "阅读数/接受人数", name: "NumberPeople", width: 150, align: "left" | |||
}, | |||
], | |||
mainId: 'SFileId', | |||
isPage: true | |||
}); | |||
page.search(); | |||
//page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.StartTime = startTime; | |||
param.EndTime = endTime; | |||
param.SqlParameter = ' AND SendFlag<>4'; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
@@ -0,0 +1,41 @@ | |||
@{ | |||
ViewBag.Title = "公文发送"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout "> | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="datesearch"></div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<div id="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">主题</div> | |||
<input id="Title" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">接收人</div> | |||
<input id="Receiver" type="text" class="form-control" /> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<a id="lr_view" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 查看</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Sys_SendFile/IndexFile.js") |
@@ -0,0 +1,131 @@ | |||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2019-04-11 10:31 | |||
* 描 述:公文发送 | |||
*/ | |||
var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var processId = ''; | |||
var startTime; | |||
var endTime; | |||
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); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 查看 | |||
$('#lr_view').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('SFileId'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '查看', | |||
url: top.$.rootUrl + '/EducationalAdministration/Sys_SendFile/FormView?keyValue=' + keyValue, | |||
width: 800, | |||
height: 700, | |||
btn: null | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/Sys_SendFile/GetPageList', | |||
headData: [ | |||
{ label: "主题", name: "Title", width: 300, align: "left" }, | |||
{ | |||
label: "接收对象", name: "SendType", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('dataItem', { | |||
key: value, | |||
code: 'FileSendType', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "接收人", name: "Receiver", width: 300, align: "left" | |||
}, | |||
{ | |||
label: "下发人", name: "Sender", width: 100, align: "left" | |||
}, | |||
{ | |||
label: "下发时间", name: "SendTime", width: 150, align: "left" | |||
}, | |||
{ | |||
label: "状态", name: "SendFlag", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
if (cellvalue === 1) { | |||
return '<span class=\"label label-warning\">审批中</span>'; | |||
} else if (cellvalue === 2) { | |||
return '<span class=\"label label-success\">已下发</span>'; | |||
} else if (cellvalue === 4) { | |||
return '<span class=\"label label-success\">下发完毕</span>'; | |||
} else { | |||
return '<span class=\"label label-default\" >草稿</span>'; | |||
} | |||
} | |||
}, | |||
{ | |||
label: "阅读数/接受人数", name: "NumberPeople", width: 150, align: "left" | |||
}, | |||
], | |||
mainId: 'SFileId', | |||
isPage: true | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.StartTime = startTime; | |||
param.EndTime = endTime; | |||
param.SqlParameter = ' AND SendFlag=4'; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
page.init(); | |||
} |
@@ -7,6 +7,9 @@ | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="datesearch"></div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<div id="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
@@ -15,6 +18,10 @@ | |||
<input id="Title" type="text" class="form-control" /> | |||
</div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">接收人</div> | |||
<input id="Receiver" type="text" class="form-control" /> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -31,6 +38,7 @@ | |||
<a id="lr_submit" class="btn btn-default"><i class="fa fa-plus"></i> 提交</a> | |||
<a id="lr_view" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 查看</a> | |||
<a id="lr_read" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 查阅情况</a> | |||
<a id="lr_OverIssue" class="btn btn-default"><i class="fa fa-minus-square"></i> 结束下发</a> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -8,12 +8,42 @@ var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var processId = ''; | |||
var startTime; | |||
var endTime; | |||
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); | |||
@@ -138,6 +168,21 @@ var bootstrap = function ($, learun) { | |||
}); | |||
} | |||
}); | |||
// 结束下发 | |||
$('#lr_OverIssue').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('SFileId'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否结束下发!', function (res) { | |||
if (res) { | |||
processId = learun.newGuid(); | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/Sys_SendFile/OverIssue', { keyValue: keyValue, }, function (res) { | |||
page.search(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
@@ -166,6 +211,7 @@ var bootstrap = function ($, learun) { | |||
{ | |||
label: "下发时间", name: "SendTime", width: 150, align: "left" | |||
}, | |||
{ | |||
label: "状态", name: "SendFlag", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
@@ -178,14 +224,21 @@ var bootstrap = function ($, learun) { | |||
} | |||
} | |||
}, | |||
{ | |||
label: "阅读人数/接受人数", name: "NumberPeople", width: 150, align: "left", | |||
}, | |||
], | |||
mainId: 'SFileId', | |||
isPage: true | |||
}); | |||
page.search(); | |||
//page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.StartTime = startTime; | |||
param.EndTime = endTime; | |||
param.SqlParameter = ' AND SendFlag<>4'; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
@@ -0,0 +1,41 @@ | |||
@{ | |||
ViewBag.Title = "公文发送"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout "> | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="datesearch"></div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<div id="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">主题</div> | |||
<input id="Title" type="text" class="form-control" /> | |||
</div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">接收人</div> | |||
<input id="Receiver" type="text" class="form-control" /> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<a id="lr_view" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 查看</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Sys_SendFile/IndexPartyFile.js") |
@@ -0,0 +1,149 @@ | |||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2019-04-11 10:31 | |||
* 描 述:公文发送 | |||
*/ | |||
var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var processId = ''; | |||
var startTime; | |||
var endTime; | |||
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); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 查看 | |||
$('#lr_view').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('SFileId'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '查看', | |||
url: top.$.rootUrl + '/EducationalAdministration/Sys_SendFile/FormPartyView?keyValue=' + keyValue, | |||
width: 800, | |||
height: 700, | |||
btn: null | |||
}); | |||
} | |||
}); | |||
////打印 | |||
//$('#lr_print').on('click', function () { | |||
// $('#gridtable').jqprintTable(); | |||
//}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/Sys_SendFile/GetPageListParty', | |||
headData: [ | |||
{ label: "主题", name: "Title", width: 300, align: "left" }, | |||
{ | |||
label: "接收对象", name: "SendType", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('dataItem', { | |||
key: value, | |||
code: 'FileSendType', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "接收人", name: "Receiver", width: 300, align: "left" | |||
}, | |||
{ | |||
label: "下发人", name: "Sender", width: 100, align: "left" | |||
}, | |||
{ | |||
label: "下发时间", name: "SendTime", width: 150, align: "left" | |||
}, | |||
{ | |||
label: "状态", name: "SendFlag", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
if (cellvalue === 1) { | |||
return '<span class=\"label label-warning\">审批中</span>'; | |||
} else if (cellvalue === 2) { | |||
return '<span class=\"label label-success\">已下发</span>'; | |||
} else if (cellvalue === 4) { | |||
return '<span class=\"label label-success\">下发完毕</span>'; | |||
}else { | |||
return '<span class=\"label label-default\" >草稿</span>'; | |||
} | |||
} | |||
}, | |||
{ | |||
label: "阅读人数/接受人数", name: "NumberPeople", width: 150, align: "left", | |||
}, | |||
], | |||
mainId: 'SFileId', | |||
isPage: true | |||
}); | |||
//page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.SqlParameter = ' AND SendFlag=4'; | |||
param.StartTime = startTime; | |||
param.EndTime = endTime; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function (res, postData) { | |||
if (res && res.code && res.code == 200) { | |||
var postData = { | |||
schemeCode: 'Sys_SendFileParty',// 填写流程对应模板编号 | |||
processId: processId, | |||
level: '1', | |||
}; | |||
learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) { | |||
learun.loading(false); | |||
}); | |||
} | |||
page.search(); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,147 @@ | |||
@{ | |||
ViewBag.Title = "打印"; | |||
Layout = "~/Views/Shared/_SimpleForm.cshtml"; | |||
} | |||
<!DOCTYPE html> | |||
<html> | |||
<head> | |||
<meta charset="utf-8"> | |||
<title></title> | |||
<style> | |||
table, | |||
tr, | |||
td { | |||
padding: 0; | |||
margin: 0; | |||
border-collapse: collapse; | |||
} | |||
table { | |||
/* table-layout: fixed; */ | |||
font-size: 13px; | |||
} | |||
.tableBox { | |||
width: 90%; | |||
margin: 30px auto; | |||
} | |||
.table { | |||
width: 100%; | |||
border-top: 1px solid #000; | |||
border-right: 1px solid #000; | |||
} | |||
.table th{ | |||
font-size: 18px; | |||
border-left: 1px solid #000; | |||
padding: 5px 0; | |||
} | |||
.table tr { | |||
border-bottom: 1px solid #000; | |||
} | |||
.table td { | |||
border-left: 1px solid #000; | |||
line-height: 20px; | |||
padding: 5px 5px; | |||
} | |||
.tableT { | |||
text-align: center; | |||
font-size: 18px; | |||
margin-bottom: 5px; | |||
letter-spacing: 4px; | |||
} | |||
.tableTxt1,.tableTxt2{ | |||
border-left: 1px solid #000; | |||
border-right: 1px solid #000; | |||
border-bottom: 1px solid #000; | |||
padding: 5px 10px; | |||
} | |||
.tableTxt1:first-child{ | |||
border-top: 1px solid #000; | |||
} | |||
.tableTxt2{ | |||
text-align: right; | |||
} | |||
.btn { | |||
width: 100px; | |||
height: 34px; | |||
line-height: 34px; | |||
text-align: center; | |||
margin: 30px auto; | |||
border: 1px solid #ccc; | |||
cursor: pointer; | |||
border-radius: 4px; | |||
} | |||
</style> | |||
</head> | |||
<body> | |||
<div id="table"> | |||
<div class="tableBox"> | |||
<div class="tableT">北京金隅科技学校</div> | |||
<div class="tableT">收文处理专用纸(收文登记)</div> | |||
<table class="table"> | |||
<tr> | |||
<td style="width: 80px;">收文</td> | |||
<td id="RReceiveUnit"></td> | |||
<td style="width: 80px;">字第</td> | |||
<td id="swz"></td> | |||
<td style="width: 80px;">号</td> | |||
<td>收文日期</td> | |||
<td id="RReceiveTime"></td> | |||
</tr> | |||
<tr> | |||
<td>来文</td> | |||
<td id="RSourceUnit"></td> | |||
<td>字第</td> | |||
<td id="lwz"></td> | |||
<td>号</td> | |||
<td></td> | |||
<td></td> | |||
</tr> | |||
<tr> | |||
<td>收文标题</td> | |||
<td colspan="6" id="RTitle"></td> | |||
</tr> | |||
<tr> | |||
<td>处理意见</td> | |||
<td colspan="6" id="yj1"></td> | |||
</tr> | |||
<tr> | |||
<td>领导批示</td> | |||
<td colspan="6"> | |||
<div class="tableTxt1" id="yj2"></div> | |||
<div class="tableTxt2" id="xiaozhanginfo"></div> | |||
</td> | |||
</tr> | |||
<tr> | |||
<td>部门处理情况</td> | |||
<td colspan="6" id="yj3"> | |||
</td> | |||
</tr> | |||
<tr> | |||
<td>经办人</td> | |||
<td colspan="4" id="SenderId"></td> | |||
<td>办结日期</td> | |||
<td id="overDate"></td> | |||
</tr> | |||
</table> | |||
</div> | |||
</div> | |||
<div class="btn">打印</div> | |||
<script src="js/jquery-1.4.4.min.js"></script> | |||
<script src="js/jquery.jqprint-0.3.js"></script> | |||
<script> | |||
$('.btn').click(function(){ | |||
$('.tableBox').jqprint(); | |||
}) | |||
</script> | |||
</body> | |||
</html> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Sys_SendFile/PrintView.js") |
@@ -0,0 +1,80 @@ | |||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2019-04-11 10:31 | |||
* 描 述:公文发送 | |||
*/ | |||
var refreshGirdData; | |||
var keyValue = request('keyValue'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var processId = ''; | |||
var page = { | |||
init: function () { | |||
console.log(keyValue); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
$.get(top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveDocument/PrintInfo?keyValue=' + keyValue, | |||
function(data) { | |||
var data = JSON.parse(data).data; | |||
var entityItem = data.entityItem; | |||
console.log(data); | |||
learun.clientdata.getAsync('department', { | |||
key: data.entity.RReceiveUnit, | |||
callback: function (_data) { | |||
console.log(_data); | |||
$('#RReceiveUnit').html(_data.name); | |||
} | |||
}); | |||
$('#swz').html(data.entity.swz); | |||
$('#RReceiveTime').html(data.entity.RReceiveTime.substr(0,10)); | |||
$('#RSourceUnit').html(data.entity.RSourceUnit); | |||
$('#lwz').html(data.entity.lwz); | |||
$('#RTitle').html(data.entity.RTitle); | |||
$('#yj1').html(entityItem[0].SpecifyReceiver); | |||
$('#yj2').html(entityItem[1].SpecifyReceiver); | |||
learun.clientdata.getAsync('user', { | |||
key: entityItem[1].ReceiverId, | |||
callback: function (_data) { | |||
console.log(_data); | |||
$('#xiaozhanginfo').html(_data.name + ' ' + (entityItem[1].ReadTime || '').substr(0, 10)); | |||
} | |||
}); | |||
learun.clientdata.getAsync('user', { | |||
key: data.entity.SenderId, | |||
callback: function (_data) { | |||
$('#SenderId').html(_data.name); | |||
} | |||
}); | |||
var text = ''; | |||
$.each(entityItem, | |||
function(i, item) { | |||
if (i < 2) {return true;} | |||
learun.clientdata.getAsync('user', { | |||
key: item.ReceiverId, | |||
callback: function (_data) { | |||
text += '<div class="tableTxt1">' + | |||
(item.SpecifyReceiver == '' ? '已阅' : item.SpecifyReceiver) + | |||
'</div> <div class="tableTxt2"> '+_data.name+' '+(item.ReadTime || '').substr(0,10)+'</div>'; | |||
} | |||
}); | |||
}); | |||
$('#yj3').html(text); | |||
$('#overDate').html(data.entityItem[data.entityItem.length - 1].ReadTime.substr(0,10)); | |||
}); | |||
}, | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,188 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using Learun.Application.TwoDevelopment.LR_Desktop; | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
using System.Collections; | |||
namespace Learun.Application.Web.Areas.LR_Desktop.Controllers | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-04-23 16:58 | |||
/// 描 述:消息提醒 | |||
/// </summary> | |||
public class MessageRindController : MvcControllerBase | |||
{ | |||
private MessageRindIBLL messageRindIBLL = new MessageRindBLL(); | |||
#region 视图功能 | |||
/// <summary> | |||
/// 主页面 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 未读消息页面 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult UnreadIndex() | |||
{ | |||
ViewBag.Name = (LoginUserInfo.Get()).realName; | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Form() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetPageList(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = messageRindIBLL.GetPageList(paginationobj, queryJson); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = paginationobj.total, | |||
page = paginationobj.page, | |||
records = paginationobj.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取未读的消息的数量 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetCountForUnread() | |||
{ | |||
var count = messageRindIBLL.GetCountForUnread(); | |||
return Success(count); | |||
} | |||
/// <summary> | |||
/// 获取未读的消息 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetListForUnread() | |||
{ | |||
var data = messageRindIBLL.GetListForUnread(); | |||
List<Hashtable> list = new List<Hashtable>(); | |||
foreach (var entity in data) | |||
{ | |||
Hashtable ht = new Hashtable(); | |||
ht["MessageId"] = entity.MessageId; | |||
ht["SenderName"] = entity.SenderName; | |||
ht["TheTitle"] = entity.TheTitle; | |||
ht["TheContent"] = entity.TheContent; | |||
ht["ConnectionUrl"] = entity.ConnectionUrl; | |||
ht["InstanceId"] = entity.InstanceId; | |||
list.Add(ht); | |||
} | |||
return ToJsonResult(list); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetFormData(string keyValue) | |||
{ | |||
var MessageRemindData = messageRindIBLL.GetMessageRemindEntity(keyValue); | |||
var jsonData = new | |||
{ | |||
MessageRemind = MessageRemindData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
messageRindIBLL.DeleteEntity(keyValue); | |||
return Success("删除成功!"); | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="strEntity">实体</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[ValidateAntiForgeryToken] | |||
[AjaxOnly] | |||
public ActionResult SaveForm(string keyValue, string strEntity) | |||
{ | |||
MessageRemindEntity entity = strEntity.ToObject<MessageRemindEntity>(); | |||
messageRindIBLL.SaveEntity(keyValue, entity); | |||
if (string.IsNullOrEmpty(keyValue)) | |||
{ | |||
} | |||
return Success("保存成功!"); | |||
} | |||
/// <summary> | |||
/// 更改状态为已读 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="strEntity">实体</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult SaveReadSigns(string keyValue) | |||
{ | |||
if (!string.IsNullOrEmpty(keyValue)) | |||
{ | |||
messageRindIBLL.SaveReadSigns(keyValue); | |||
} | |||
return Success("保存成功!"); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,35 @@ | |||
@{ | |||
ViewBag.Title = "消息提醒"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-6 lr-form-item" data-table="MessageRemind" > | |||
<div class="lr-form-item-title">收件人ID</div> | |||
<input id="ReceiptId" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="MessageRemind" > | |||
<div class="lr-form-item-title">收件人姓名</div> | |||
<input id="ReceiptName" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="MessageRemind" > | |||
<div class="lr-form-item-title">发件人ID</div> | |||
<input id="SenderId" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="MessageRemind" > | |||
<div class="lr-form-item-title">发件人姓名</div> | |||
<input id="SenderName" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="MessageRemind"> | |||
<div class="lr-form-item-title">发送时间</div> | |||
<input id="SendTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#SendTime').trigger('change'); } })" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="MessageRemind" > | |||
<div class="lr-form-item-title">标题</div> | |||
<input id="TheTitle" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="MessageRemind" > | |||
<div class="lr-form-item-title">内容</div> | |||
<textarea id="TheContent" style="height:100px;width:100%"></textarea> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/LR_Desktop/Views/MessageRind/Form.js") |
@@ -0,0 +1,41 @@ | |||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2021-05-08 | |||
* 描 述:消息提醒 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/LR_Desktop/MessageRemind/GetFormData?keyValue=' + keyValue, function (data) { | |||
$('#form').lrSetFormData(data); | |||
}); | |||
} | |||
} | |||
}; | |||
//保存数据 | |||
acceptClick = function (callBack) { | |||
if (!$('#form').lrValidform()) { | |||
return false; | |||
} | |||
var postData = $('#form').lrGetFormData(); | |||
$.lrSaveForm(top.$.rootUrl + '/LR_Desktop/MessageRind/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,94 @@ | |||
@{ | |||
ViewBag.Title = "消息提醒"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout " > | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="datesearch"></div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
@*<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a>*@ | |||
<a id="lr_view" class="btn btn-default"><i class="fa fa-trash-o"></i> 查看</a> | |||
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a> | |||
</div> | |||
<div class="layui-btn-container"> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
@*<div id="winpop"> | |||
<div class="title">您有新的未读消息<span class="close" onclick="tips_pop()">x</span></div> | |||
<div id="notifications"> | |||
</div> | |||
</div>*@ | |||
</div> | |||
@Html.AppendJsFile("/Areas/LR_Desktop/Views/MessageRind/Index.js"); | |||
<script> | |||
//function tips_pop() { | |||
// var MsgPop = document.getElementById("winpop"); | |||
// var popH = parseInt(MsgPop.style.height); | |||
// if (popH == 0) { | |||
// MsgPop.style.Height = "block"; | |||
// show = setInterval("changeH('up')", 2); | |||
// } else { | |||
// hide = setInterval("changeH('down')", 2); | |||
// } | |||
//} | |||
//function changeH(str) { | |||
// var magPop = document.getElementById("winpop"); | |||
// var popH = parseInt(MsgPop.style.Height); | |||
// if (str == "up") { | |||
// if (popH <= 100) { | |||
// msgPop.style.height = (popH + 4).toString() + "px"; | |||
// } else { | |||
// clearInterval(show); | |||
// } | |||
// } | |||
// if (str == "down") { | |||
// if (popH >= 4) { | |||
// MsgPop.style.Height = (popH - 4).toString() + "px"; | |||
// } else { | |||
// clearInterval(hide); | |||
// MsgPop.style.display = "none"; | |||
// } | |||
// } | |||
// window.onload = function() { | |||
// document.getElementById('winpop').style.height = '0px'; | |||
// setTimeout("tips_pop()", 800); | |||
// } | |||
//} | |||
//function Winpop() { | |||
// var state = '0'; | |||
// //$.get(${ ctx }/ sys /msGetUserMedia/getMsgList?state + "&t=" + new Date().getTime(),function(data) { | |||
// // $("#notifications").html(data); | |||
// //}), | |||
// $.get(${ ctx } / sys / msGetUserMedia / getMsgList ? state + "&t=" + new Date().getTime(), function (data) { | |||
// $("#notifications").html(data); | |||
// }); | |||
//} | |||
//winpop(); | |||
//setInterval(function() { | |||
// $("#winpop").load(Winpop(), ""); | |||
// }, | |||
// 1000); | |||
</script> |
@@ -0,0 +1,150 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2021-04-23 16:58 | |||
* 描 述:消息提醒 | |||
*/ | |||
var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var startTime; | |||
var endTime; | |||
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(); | |||
} | |||
}); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/LR_Desktop/MessageRind/Form', | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('MessageId'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/LR_Desktop/MessageRind/Form?keyValue=' + keyValue, | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('MessageId'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/LR_Desktop/MessageRind/DeleteForm', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 打印 | |||
$('#lr_print').on('click', function () { | |||
$('#gridtable').jqprintTable(); | |||
}); | |||
// 查看 | |||
$('#lr_view').on('click', function () { | |||
var title = $('#gridtable').jfGridValue('TheTitle'); | |||
var keyValue = $('#gridtable').jfGridValue('InstanceId'); | |||
//var MessageId = $('#gridtable').jfGridValue('MessageId'); | |||
var ConnectionUrl = $('#gridtable').jfGridValue('ConnectionUrl'); | |||
var url = top.$.rootUrl + ConnectionUrl + keyValue; | |||
learun.layerForm({ | |||
id: 'formview', | |||
title: title, | |||
url: url, | |||
width: 1000, | |||
height: 650, | |||
maxmin: true, | |||
btn: null, | |||
}); | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').lrAuthorizeJfGrid({ | |||
url: top.$.rootUrl + '/LR_Desktop/MessageRind/GetPageList', | |||
headData: [ | |||
//{ label: "收件人ID", name: "ReceiptId", width: 100, align: "left"}, | |||
{ label: "收件人姓名", name: "ReceiptName", width: 100, align: "left" }, | |||
//{ label: "发件人ID", name: "SenderId", width: 100, align: "left"}, | |||
{ label: "发件人姓名", name: "SenderName", width: 100, align: "left" }, | |||
{ label: "发送时间", name: "SendTime", width: 100, align: "left" }, | |||
{ label: "标题", name: "TheTitle", width: 100, align: "left" }, | |||
{ label: "内容", name: "TheContent", width: 400, align: "left" }, | |||
{ | |||
label: "状态", name: "ReadSigns", width: 100, align: "left", formatter: function (cellvalue) { | |||
return cellvalue == false ? "<span class=\"label label-danger\">未读</span>" : "<span class=\"label label-success\">已读</span>"; | |||
} | |||
}, | |||
], | |||
mainId: 'MessageId', | |||
isPage: true | |||
}); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.StartTime = startTime; | |||
param.EndTime = endTime; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
$('#gridtable').jfGridSet('reload'); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,141 @@ | |||
@*@{ | |||
ViewBag.Title = "未读消息"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout " > | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-body" id="content"></div> | |||
</div> | |||
</div> | |||
</div>*@ | |||
<!DOCTYPE html> | |||
<html> | |||
<head> | |||
<meta name="viewport" content="width=device-width" /> | |||
<title>未读消息提醒</title> | |||
<script src="~/Content/jquery/plugin/fullcalendar/js/jquery-1.7.2.min.js"></script> | |||
<script src="~/Content/jquery/plugin/jquery-ui/jquery-ui.min.js"></script> | |||
<script src="~/Content/jquery/plugin/fullcalendar/js/fullcalendar.min.js"></script> | |||
<link href="~/Content/jquery/plugin/fullcalendar/css/fullcalendar.css" rel="stylesheet" /> | |||
@Html.AppendCssFile( | |||
"/Views/LR_Content/style/lr-common.css", | |||
"/Views/LR_Content/style/lr-iframe-index.css", | |||
"~/Content/jquery/plugin/toastr/toastr.css" | |||
) | |||
</head> | |||
<body> | |||
<div id='content'> | |||
</div> | |||
@Html.AppendJsFile( | |||
"~/Content/jquery/plugin/toastr/toastr.min.js", | |||
"~/Views/LR_Content/script/lr-admin.js", | |||
"~/Views/LR_Content/script/lr-clientdata.js", | |||
"~/Content/jquery/plugin/fullcalendar/js/jquery-1.7.2.min.js", | |||
"~/Areas/LR_Desktop/Views/MessageRind/Index.js" | |||
) | |||
<script type='text/javascript'> | |||
var name = '@(ViewBag.Name)'; | |||
$(document).ready(function () { | |||
getdata(); | |||
function getdata() { | |||
$.ajax({ | |||
url: top.$.rootUrl + '/LR_Desktop/MessageRind/GetListForUnread', | |||
type: "get", | |||
dataType: "json", | |||
async: false, | |||
success: function (data) { | |||
var content = ""; | |||
if (data.length > 0) { | |||
content += "<ul id='uldata'>"; | |||
for (var i = 0; i < data.length; i++) { | |||
//data[i]["SenderName"] | |||
//content += "<li>" + " " + name + "的消息:" + "</li>"; | |||
var theContent = data[i]["TheContent"]; | |||
//可显示的最长长度 | |||
var maxlen = 50; | |||
if (theContent.length > maxlen) { | |||
theContent = theContent.substring(0, maxlen - 3) + "..."; | |||
} | |||
var param = data[i]["TheTitle"] + "、" + data[i]["InstanceId"] + "、" + data[i]["MessageId"] + "、" + data[i]["ConnectionUrl"]; | |||
content += "<li>"; | |||
content += " 【" + data[i]["TheTitle"] + "】" + theContent + " "; | |||
content += '<a id="' + param + '" href="javascript:void(0);" class="lr-item" style="color:blue;textDecoration:underline">点击查看>>'; | |||
content += "</a>"; | |||
content += "</li>"; | |||
} | |||
content += "</ul>"; | |||
} | |||
else { | |||
content = "暂无未读消息"; | |||
} | |||
$("#content").html(content); | |||
} | |||
}); | |||
} | |||
$('#uldata .lr-item').on('click', function () { | |||
var $obj = $(this); | |||
var params = ($obj.attr('id')).split('、'); | |||
//更改状态为已读 | |||
var MessageId = params[2]; | |||
if (top.learun.checkrow(MessageId)) { | |||
$.ajax({ | |||
url: top.$.rootUrl + '/LR_Desktop/MessageRind/SaveReadSigns', | |||
type: "post", | |||
data: { keyValue: MessageId }, | |||
dataType: "json", | |||
async: false, | |||
success: function (data) { | |||
//弹窗查看详情 | |||
var keyValue = params[1]; | |||
var ConnectionUrl = params[3]; | |||
var title = params[0]; | |||
if (top.learun.checkrow(keyValue)) { | |||
top.learun.layerForm({ | |||
id: 'formview', | |||
title: title, | |||
url: top.$.rootUrl + ConnectionUrl + keyValue, | |||
width: 1000, | |||
height: 650, | |||
maxmin: true, | |||
btn: null, | |||
}); | |||
} | |||
} | |||
}) | |||
} | |||
}); | |||
}); | |||
//function funLook(param) { | |||
// var id = "433d5658-40b0-4e2d-b736-c4e8561d017e";//$obj.attr('id'); | |||
// var _module = top.learun.clientdata.get(['modulesMap', id]); | |||
// switch (_module.F_Target) { | |||
// case 'iframe':// 窗口 | |||
// if (top.learun.validator.isNotNull(_module.F_UrlAddress).code) { | |||
// top.learun.frameTab.open(_module); | |||
// } | |||
// break; | |||
// case 'open':// 窗口 | |||
// var newWin = window.open(_module.F_UrlAddress); | |||
// newWin.location.replace(_module.F_UrlAddress); | |||
// break; | |||
// } | |||
//} | |||
</script> | |||
</body> | |||
</html> |
@@ -0,0 +1,117 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using Learun.Application.TwoDevelopment.Permission; | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.Web.Areas.Permission.Controllers | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2020-12-22 11:35 | |||
/// 描 述:公告发布权限设置 | |||
/// </summary> | |||
public class DepartmentReleasePermissionsController : MvcControllerBase | |||
{ | |||
private DepartmentReleasePermissionsIBLL departmentReleasePermissionsIBLL = new DepartmentReleasePermissionsBLL(); | |||
#region 视图功能 | |||
/// <summary> | |||
/// 主页面 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Form() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetPageList(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = departmentReleasePermissionsIBLL.GetPageList(paginationobj, queryJson); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = paginationobj.total, | |||
page = paginationobj.page, | |||
records = paginationobj.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetFormData(string keyValue) | |||
{ | |||
var DepartmentReleasePermissionsData = departmentReleasePermissionsIBLL.GetDepartmentReleasePermissionsEntity( keyValue ); | |||
var jsonData = new { | |||
DepartmentReleasePermissions = DepartmentReleasePermissionsData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
departmentReleasePermissionsIBLL.DeleteEntity(keyValue); | |||
return Success("删除成功!"); | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="strEntity">实体</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[ValidateAntiForgeryToken] | |||
[AjaxOnly] | |||
public ActionResult SaveForm(string keyValue, string strEntity) | |||
{ | |||
DepartmentReleasePermissionsEntity entity = strEntity.ToObject<DepartmentReleasePermissionsEntity>(); | |||
departmentReleasePermissionsIBLL.SaveEntity(keyValue,entity); | |||
if (string.IsNullOrEmpty(keyValue)) | |||
{ | |||
} | |||
return Success("保存成功!"); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,15 @@ | |||
@{ | |||
ViewBag.Title = "公告发布权限设置"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="DepartmentReleasePermissions" > | |||
<div class="lr-form-item-title">发布人员</div> | |||
<div id="UserID" ></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="DepartmentReleasePermissions" > | |||
<div class="lr-form-item-title">公告类型</div> | |||
<div id="Permission" ></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/Permission/Views/DepartmentReleasePermissions/Form.js") |
@@ -0,0 +1,55 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2020-12-22 11:35 | |||
* 描 述:公告发布权限设置 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
var departmentId = request('departmentId'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
$('#UserID').lrUserSelect(0); | |||
$('#Permission').lrDataItemSelect({ code: 'NoticeCategory', type: 'multiple' }); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/Permission/DepartmentReleasePermissions/GetFormData?keyValue=' + keyValue, function (data) { | |||
for (var id in data) { | |||
if (!!data[id].length && data[id].length > 0) { | |||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
} | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
var formdata = $('body').lrGetFormData(); | |||
formdata.DepartmentID = departmentId; | |||
var postData = { | |||
strEntity: JSON.stringify(formdata) | |||
}; | |||
$.lrSaveForm(top.$.rootUrl + '/Permission/DepartmentReleasePermissions/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,36 @@ | |||
@{ | |||
ViewBag.Title = "公告发布权限设置"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout " > | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">部门</div> | |||
<div id="DepartmentID"></div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/Permission/Views/DepartmentReleasePermissions/Index.js") |
@@ -0,0 +1,112 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2020-12-22 11:35 | |||
* 描 述:公告发布权限设置 | |||
*/ | |||
var refreshGirdData; | |||
var departmentId = request('departmentId'); | |||
console.log(123 + departmentId); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
console.log(departmentId); | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
$('#DepartmentID').lrDataSourceSelect({ code: 'classdata',value: 'id',text: 'name' }); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form1', | |||
title: '新增', | |||
url: top.$.rootUrl + '/Permission/DepartmentReleasePermissions/Form?departmentId='+departmentId, | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerForm({ | |||
id: 'form1', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/Permission/DepartmentReleasePermissions/Form?keyValue=' + keyValue, | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/Permission/DepartmentReleasePermissions/DeleteForm', { keyValue: keyValue}, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').lrAuthorizeJfGrid({ | |||
url: top.$.rootUrl + '/Permission/DepartmentReleasePermissions/GetPageList', | |||
headData: [ | |||
{ label: "发布人员", name: "UserID", 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: "Permission", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getsAsync('dataItem', { | |||
key: value, | |||
code: 'NoticeCategory', | |||
callback: function (_data) { | |||
callback(_data); | |||
} | |||
}); | |||
}}, | |||
], | |||
mainId:'ID', | |||
isPage: true | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.DepartmentID = departmentId; | |||
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
$('#gridtable').jfGridSet('reload'); | |||
}; | |||
page.init(); | |||
} |
@@ -38,6 +38,12 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers | |||
return View(); | |||
} | |||
[HttpGet] | |||
public ActionResult IndexAll() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 统计 | |||
/// <summary> | |||
@@ -57,6 +63,12 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers | |||
return View(); | |||
} | |||
[HttpGet] | |||
public ActionResult FormView() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 外出原因统计 | |||
/// </summary> | |||
@@ -0,0 +1,72 @@ | |||
@{ | |||
ViewBag.Title = "疫情记录"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap"> | |||
<div class="col-xs-6 lr-form-item" data-table="EpidemicSituation"> | |||
<div class="lr-form-item-title">填报人员</div> | |||
<div id="Creater" readonly="readonly" class="form-control"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="EpidemicSituation"> | |||
<div class="lr-form-item-title">填报时间</div> | |||
<input id="CreateTime" readonly="readonly" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#CreateTime').trigger('change'); } })" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="EpidemicSituation"> | |||
<div class="lr-form-item-title">类别</div> | |||
<div id="Type" class="form-control" readonly="readonly"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="EpidemicSituation" id="Departmentdiv"> | |||
<div class="lr-form-item-title">所在部门</div> | |||
<div id="Department" class="form-control" readonly="readonly"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="EpidemicSituation" id="StudentSourcediv"> | |||
<div class="lr-form-item-title">系专业班级</div> | |||
<input id="StudentSource" class="form-control" type="text" readonly="readonly"/> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="EpidemicSituation"> | |||
<div class="lr-form-item-title">健康状况</div> | |||
<div id="HealthSituation" class="form-control" readonly="readonly"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="EpidemicSituation"> | |||
<div class="lr-form-item-title">性别</div> | |||
<div id="Gender" readonly="readonly"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="EpidemicSituation"> | |||
<div class="lr-form-item-title">家庭住址</div> | |||
<input id="HomeAddress" type="text" class="form-control" readonly="readonly"/> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="EpidemicSituation"> | |||
<div class="lr-form-item-title">联系方式</div> | |||
<input id="Mobile" type="text" class="form-control" readonly="readonly"/> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="EpidemicSituation"> | |||
<div class="lr-form-item-title">当前地址</div> | |||
<input id="Objective" type="text" class="form-control" readonly="readonly"/> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="EpidemicSituation"> | |||
<div class="lr-form-item-title">是否外出</div> | |||
<div id="IsOut" readonly="readonly"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item lr-form-item-grid"> | |||
<div id="PassPlaces" readonly="readonly"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="EpidemicSituation"> | |||
<div class="lr-form-item-title">家人异常</div> | |||
<div id="HasFamily" readonly="readonly"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item lr-form-item-grid"> | |||
<div id="ContactsDetails"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="EpidemicSituation"> | |||
<div class="lr-form-item-title">疫区人异常</div> | |||
<div id="HasPeople" readonly="readonly"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item lr-form-item-grid"> | |||
<div id="PeopleDetails"></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/PersonnelManagement/Views/EpidemicSituationCopy/FormView.js") |
@@ -0,0 +1,587 @@ | |||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2020-02-03 14:37 | |||
* 描 述:疫情记录 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
$('#Creater').lrDataSourceSelect({ code: 'BaseUser', value: 'f_userid', text: 'f_realname' }); | |||
$('#Department').lrDataSourceSelect({ code: 'classdata', value: 'id', text: 'name' }); | |||
$('#UnitName').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' }); | |||
$('#Type').lrDataItemSelect({ | |||
code: 'EUserType', select: function (item) { | |||
if (item) { | |||
if (item.id == "5") { | |||
$("#Departmentdiv").hide(); | |||
$("#StudentSourcediv").show(); | |||
} else { | |||
$("#StudentSourcediv").hide(); | |||
$("#Departmentdiv").show(); | |||
} | |||
} else { | |||
$("#PeopleDetails").parent().hide(); | |||
} | |||
} | |||
}); | |||
$('#RelationShip').lrDataItemSelect({ code: 'ERelationship' }); | |||
$('#OutReason').lrDataItemSelect({ code: 'OutReason' }); | |||
$('#HealthSituation').lrDataItemSelect({ code: 'EpiHealth' }); | |||
$('#IsOut').lrDataItemSelect({ | |||
code: 'YesOrNoInt', | |||
select: function (item) { | |||
if (item) { | |||
if (item.text == "是") { | |||
$("#PassPlaces").parent().show(); | |||
} else { | |||
$("#PassPlaces").parent().hide(); | |||
} | |||
} else { | |||
$("#PassPlaces").parent().hide(); | |||
} | |||
} | |||
}); | |||
$('#HasFamily').lrDataItemSelect({ | |||
code: 'YesOrNoInt', | |||
select: function (item) { | |||
if (item) { | |||
if (item.text == "是") { | |||
$("#ContactsDetails").parent().show(); | |||
} else { | |||
$("#ContactsDetails").parent().hide(); | |||
} | |||
} else { | |||
$("#ContactsDetails").parent().hide(); | |||
} | |||
} | |||
}); | |||
$('#HasPeople').lrDataItemSelect({ | |||
code: 'YesOrNoInt', | |||
select: function (item) { | |||
if (item) { | |||
if (item.text == "是") { | |||
$("#PeopleDetails").parent().show(); | |||
} else { | |||
$("#PeopleDetails").parent().hide(); | |||
} | |||
} else { | |||
$("#PeopleDetails").parent().hide(); | |||
} | |||
} | |||
}); | |||
$('#Gender').lrDataItemSelect({ code: 'usersex' }); | |||
$('#Provice').lrDataSourceSelect({ | |||
code: 'DIC_PROVINCE', value: 'pcode', text: 'pname', | |||
select: function (item) { | |||
if (!!item) { | |||
$('#OutArea').lrselectRefresh({ | |||
url: "/DIC_CITY/GetListByProvinceCode", | |||
param: { ProvinceCode: item.pcode }, | |||
value: 'CCODE', | |||
text: 'CNAME' | |||
}); | |||
$('#City').lrselectRefresh({ | |||
url: "", | |||
data: [] | |||
}); | |||
} | |||
} | |||
}); | |||
$('#OutArea').lrselect({ | |||
select: function (item) { | |||
if (!!item) { | |||
$('#City').lrselectRefresh({ | |||
url: top.$.rootUrl + "/DIC_AREA/GetAreasListByCityCode", | |||
param: { cityCode: item.CCODE }, | |||
value: 'ACODE', | |||
text: 'ANAME' | |||
}); | |||
} | |||
} | |||
}); | |||
$('#City').lrselect(); | |||
$('#Vehicle').lrDataItemSelect({ code: 'Vehicle' }); | |||
$('#PassPlaces').jfGrid({ | |||
headData: [ | |||
{ | |||
label: '类别', name: 'PassType', width: 100, align: 'left' | |||
, edit: { | |||
type: 'select', | |||
init: function (row, $edit) { | |||
}, | |||
datatype: 'dataItem', | |||
code: 'EpiPassType' | |||
} | |||
}, | |||
{ | |||
label: '省', name: 'Province', width: 100, align: 'left' | |||
, edit: { | |||
type: 'select', | |||
init: function (row, $edit) { | |||
}, | |||
datatype: 'dataSource', | |||
code: 'DIC_PROVINCE', | |||
op: { | |||
value: 'pcode', | |||
text: 'pname', | |||
title: 'pname' | |||
} | |||
} | |||
}, { | |||
label: '市', name: 'City', width: 100, align: 'left', | |||
formatter: function (value, row, op, $cell) { | |||
var province = row.Province; | |||
var res; | |||
learun.httpSync('GET', '/DIC_CITY/GetListByProvinceCode', { ProvinceCode: province }, function (data) { | |||
$.each(data, function (_index, _item) { | |||
if (value == _item.CCODE) { | |||
res = _item.CNAME; | |||
} | |||
}); | |||
}); | |||
return res; | |||
}, | |||
edit: { | |||
type: 'select', | |||
init: function (row, $self) { | |||
var province = row.Province; | |||
learun.httpAsync('GET', '/DIC_CITY/GetListByProvinceCode', { ProvinceCode: province }, function (data) { | |||
var res = []; | |||
$.each(data, function (_index, _item) { | |||
res.push(_item); | |||
}); | |||
$self.lrselectRefresh({ | |||
data: res, | |||
}); | |||
}); | |||
}, | |||
op: { | |||
value: 'CCODE', | |||
text: 'CNAME', | |||
title: 'CNAME', | |||
} | |||
} | |||
}, | |||
{ | |||
label: '区域', name: 'Area', width: 100, align: 'left', | |||
formatter: function (value, row, op, $cell) { | |||
var cityCode = row.City; | |||
var res; | |||
learun.httpSync('GET', top.$.rootUrl + "/DIC_AREA/GetAreasListByCityCode", { cityCode: cityCode }, function (data) { | |||
$.each(data, function (_index, _item) { | |||
if (value == _item.ACODE) { | |||
res = _item.ANAME; | |||
} | |||
}); | |||
}); | |||
return res; | |||
}, | |||
edit: { | |||
type: 'select', | |||
init: function (row, $edit) { | |||
var cityCode = row.City; | |||
learun.httpAsync('GET', top.$.rootUrl + "/DIC_AREA/GetAreasListByCityCode", { cityCode: cityCode }, function (data) { | |||
var res = []; | |||
$.each(data, function (_index, _item) { | |||
res.push(_item); | |||
}); | |||
$edit.lrselectRefresh({ | |||
data: res, | |||
}); | |||
}); | |||
}, | |||
op: { | |||
value: 'ACODE', | |||
text: 'ANAME', | |||
title: 'ANAME' | |||
} | |||
} | |||
}, | |||
{ | |||
label: '详细地址', name: 'Address', width: 100, align: 'left' | |||
, edit: { | |||
type: 'input', | |||
} | |||
}, | |||
{ | |||
label: '时间', name: 'Time', width: 100, align: 'left', edit: { type: 'datatime' } | |||
}, | |||
{ | |||
label: '交通工具', name: 'Vehicle', width: 100, align: 'left', edit: { | |||
type: 'select', | |||
init: function (row, $edit) { | |||
}, | |||
datatype: 'dataItem', | |||
code: 'Vehicle' | |||
} | |||
}, | |||
{ | |||
label: '班次号', name: 'VehicleNo', width: 100, align: 'left' | |||
, edit: { | |||
type: 'input', | |||
} | |||
}], | |||
isMultiselect: true, | |||
isEdit: true, | |||
height: 200 | |||
}); | |||
$('#ContactsDetails').jfGrid({ | |||
headData: [ | |||
{ | |||
label: '名字', name: 'Name', width: 100, align: 'left', | |||
edit: { type: 'input' } | |||
}, | |||
{ | |||
label: '性别', name: 'Gender', width: 100, align: 'left' | |||
, edit: { | |||
type: 'select', | |||
init: function (row, $edit) { | |||
}, | |||
datatype: 'dataItem', | |||
code: 'usersex' | |||
} | |||
}, | |||
{ | |||
label: '联系方式', name: 'Mobile', width: 100, align: 'left', edit: { type: 'input' } | |||
}, | |||
{ | |||
label: '隔离方式', name: 'QTType', width: 100, align: 'left' | |||
, edit: { | |||
type: 'select', | |||
init: function (data, $edit) { | |||
}, | |||
datatype: 'dataItem', | |||
code: 'QuarantineType' | |||
} | |||
}, | |||
{ | |||
label: '省', name: 'Province', width: 100, align: 'left' | |||
, edit: { | |||
type: 'select', | |||
init: function (row, $edit) { | |||
}, | |||
datatype: 'dataSource', | |||
code: 'DIC_PROVINCE', | |||
op: { | |||
value: 'pcode', | |||
text: 'pname', | |||
title: 'pname' | |||
} | |||
} | |||
}, { | |||
label: '市', name: 'City', width: 100, align: 'left', | |||
formatter: function (value, row, op, $cell) { | |||
var province = row.Province; | |||
var res; | |||
learun.httpSync('GET', '/DIC_CITY/GetListByProvinceCode', { ProvinceCode: province }, function (data) { | |||
$.each(data, function (_index, _item) { | |||
if (value == _item.CCODE) { | |||
res = _item.CNAME; | |||
} | |||
}); | |||
}); | |||
return res; | |||
}, | |||
edit: { | |||
type: 'select', | |||
init: function (row, $self) { | |||
var province = row.Province; | |||
learun.httpAsync('GET', '/DIC_CITY/GetListByProvinceCode', { ProvinceCode: province }, function (data) { | |||
var res = []; | |||
$.each(data, function (_index, _item) { | |||
res.push(_item); | |||
}); | |||
$self.lrselectRefresh({ | |||
data: res, | |||
}); | |||
}); | |||
}, | |||
op: { | |||
value: 'CCODE', | |||
text: 'CNAME', | |||
title: 'CNAME', | |||
} | |||
} | |||
}, | |||
{ | |||
label: '区域', name: 'Area', width: 100, align: 'left', | |||
formatter: function (value, row, op, $cell) { | |||
var cityCode = row.City; | |||
var res; | |||
learun.httpSync('GET', top.$.rootUrl + "/DIC_AREA/GetAreasListByCityCode", { cityCode: cityCode }, function (data) { | |||
$.each(data, function (_index, _item) { | |||
if (value == _item.ACODE) { | |||
res = _item.ANAME; | |||
} | |||
}); | |||
}); | |||
return res; | |||
}, | |||
edit: { | |||
type: 'select', | |||
init: function (row, $edit) { | |||
var cityCode = row.City; | |||
learun.httpAsync('GET', top.$.rootUrl + "/DIC_AREA/GetAreasListByCityCode", { cityCode: cityCode }, function (data) { | |||
var res = []; | |||
$.each(data, function (_index, _item) { | |||
res.push(_item); | |||
}); | |||
$edit.lrselectRefresh({ | |||
data: res, | |||
}); | |||
}); | |||
}, | |||
op: { | |||
value: 'ACODE', | |||
text: 'ANAME', | |||
title: 'ANAME' | |||
} | |||
} | |||
}, | |||
{ | |||
label: '隔离地点', name: 'QTAddress', width: 100, align: 'left', edit: { type: 'input' } | |||
}, | |||
{ | |||
label: '隔离时间', name: 'QTTime', width: 100, align: 'left' | |||
, edit: { | |||
type: 'datatime', | |||
dateformat: '1' | |||
} | |||
}, | |||
{ | |||
label: '接触隔离时间', name: 'QTContactTime', width: 100, align: 'left' | |||
, edit: { | |||
type: 'datatime', | |||
dateformat: '1' | |||
} | |||
}, | |||
{ | |||
label: '健康状况', name: 'Fever', width: 100, align: 'left' | |||
, edit: { | |||
type: 'select', | |||
init: function (data, $edit) { | |||
}, | |||
datatype: 'dataItem', | |||
code: 'EpiHealth' | |||
} | |||
}, | |||
], | |||
isMultiselect: true, | |||
isEdit: true, | |||
height: 200 | |||
}); | |||
$('#PeopleDetails').jfGrid({ | |||
headData: [ | |||
{ | |||
label: '名字', name: 'Name', width: 100, align: 'left', | |||
edit: { type: 'input' } | |||
}, | |||
{ | |||
label: '性别', name: 'Gender', width: 100, align: 'left' | |||
, edit: { | |||
type: 'select', | |||
init: function (row, $edit) { | |||
}, | |||
datatype: 'dataItem', | |||
code: 'usersex' | |||
} | |||
}, | |||
{ | |||
label: '联系方式', name: 'Mobile', width: 100, align: 'left', edit: { type: 'input' } | |||
}, | |||
{ | |||
label: '隔离方式', name: 'QTType', width: 100, align: 'left' | |||
, edit: { | |||
type: 'select', | |||
init: function (data, $edit) { | |||
}, | |||
datatype: 'dataItem', | |||
code: 'QuarantineType' | |||
} | |||
}, | |||
{ | |||
label: '省', name: 'Province', width: 100, align: 'left' | |||
, edit: { | |||
type: 'select', | |||
init: function (row, $edit) { | |||
}, | |||
datatype: 'dataSource', | |||
code: 'DIC_PROVINCE', | |||
op: { | |||
value: 'pcode', | |||
text: 'pname', | |||
title: 'pname' | |||
} | |||
} | |||
}, { | |||
label: '市', name: 'City', width: 100, align: 'left', | |||
formatter: function (value, row, op, $cell) { | |||
var province = row.Province; | |||
var res; | |||
learun.httpSync('GET', '/DIC_CITY/GetListByProvinceCode', { ProvinceCode: province }, function (data) { | |||
$.each(data, function (_index, _item) { | |||
if (value == _item.CCODE) { | |||
res = _item.CNAME; | |||
} | |||
}); | |||
}); | |||
return res; | |||
}, | |||
edit: { | |||
type: 'select', | |||
init: function (row, $self) { | |||
var province = row.Province; | |||
learun.httpAsync('GET', '/DIC_CITY/GetListByProvinceCode', { ProvinceCode: province }, function (data) { | |||
var res = []; | |||
$.each(data, function (_index, _item) { | |||
res.push(_item); | |||
}); | |||
$self.lrselectRefresh({ | |||
data: res, | |||
}); | |||
}); | |||
}, | |||
op: { | |||
value: 'CCODE', | |||
text: 'CNAME', | |||
title: 'CNAME', | |||
} | |||
} | |||
}, | |||
{ | |||
label: '区域', name: 'Area', width: 100, align: 'left', | |||
formatter: function (value, row, op, $cell) { | |||
var cityCode = row.City; | |||
var res; | |||
learun.httpSync('GET', top.$.rootUrl + "/DIC_AREA/GetAreasListByCityCode", { cityCode: cityCode }, function (data) { | |||
$.each(data, function (_index, _item) { | |||
if (value == _item.ACODE) { | |||
res = _item.ANAME; | |||
} | |||
}); | |||
}); | |||
return res; | |||
}, | |||
edit: { | |||
type: 'select', | |||
init: function (row, $edit) { | |||
var cityCode = row.City; | |||
learun.httpAsync('GET', top.$.rootUrl + "/DIC_AREA/GetAreasListByCityCode", { cityCode: cityCode }, function (data) { | |||
var res = []; | |||
$.each(data, function (_index, _item) { | |||
res.push(_item); | |||
}); | |||
$edit.lrselectRefresh({ | |||
data: res, | |||
}); | |||
}); | |||
}, | |||
op: { | |||
value: 'ACODE', | |||
text: 'ANAME', | |||
title: 'ANAME' | |||
} | |||
} | |||
}, | |||
{ | |||
label: '隔离地点', name: 'QTAddress', width: 100, align: 'left', edit: { type: 'input' } | |||
}, | |||
{ | |||
label: '隔离时间', name: 'QTTime', width: 100, align: 'left' | |||
, edit: { | |||
type: 'datatime', | |||
dateformat: '1' | |||
} | |||
}, | |||
{ | |||
label: '接触隔离时间', name: 'QTContactTime', width: 100, align: 'left' | |||
, edit: { | |||
type: 'datatime', | |||
dateformat: '1' | |||
} | |||
}, | |||
{ | |||
label: '健康状况', name: 'Fever', width: 100, align: 'left' | |||
, edit: { | |||
type: 'select', | |||
init: function (data, $edit) { | |||
}, | |||
datatype: 'dataItem', | |||
code: 'EpiHealth' | |||
} | |||
}, | |||
], | |||
isMultiselect: true, | |||
isEdit: true, | |||
height: 200 | |||
}); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/PersonnelManagement/EpidemicSituationCopy/GetFormData?keyValue=' + keyValue, function (data) { | |||
for (var id in data) { | |||
if (!!data[id].length && data[id].length > 0) { | |||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
} | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
var postData = {}; | |||
postData.strEntity = JSON.stringify($('[data-table="EpidemicSituation"]').lrGetFormData()); | |||
postData.strcontactsDetailsList = JSON.stringify($('#ContactsDetails').jfGridGet('rowdatas')); | |||
postData.passPlaceDetailsList = JSON.stringify($('#PassPlaces').jfGridGet('rowdatas')); | |||
postData.strpeopleDetailsList = JSON.stringify($('#PeopleDetails').jfGridGet('rowdatas')); | |||
$.lrSaveForm(top.$.rootUrl + '/PersonnelManagement/EpidemicSituationCopy/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -12,10 +12,10 @@ | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||
<a id="lr_view" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 查看</a> | |||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||
</div> | |||
</div> | |||
@@ -51,6 +51,19 @@ var bootstrap = function ($, learun) { | |||
}); | |||
} | |||
}); | |||
$('#lr_view').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerForm({ | |||
id: 'FormView', | |||
title: '查看', | |||
url: top.$.rootUrl + '/PersonnelManagement/EpidemicSituationCopy/FormView?keyValue=' + keyValue, | |||
width: 1000, | |||
height: 650, | |||
btn: null | |||
}); | |||
} | |||
}); | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
@@ -104,7 +117,7 @@ var bootstrap = function ($, learun) { | |||
} | |||
}, | |||
{ | |||
label: "所在部门", name: "Department", width: 100, align: "left", | |||
label: "所在部门/班级", name: "Department", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
console.log(row); | |||
if (row.StudentSource) { | |||
@@ -203,7 +216,6 @@ var bootstrap = function ($, learun) { | |||
search: function (param) { | |||
param = param || {}; | |||
var loginInfo = top.learun.clientdata.get(['userinfo']); | |||
console.log('人员id' + createrID); | |||
if (createrID) { | |||
param.Creater = createrID; | |||
} else { | |||
@@ -0,0 +1,45 @@ | |||
@{ | |||
ViewBag.Title = "疫情记录"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout " > | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="datesearch"></div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<div id="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">填表人员</div> | |||
<input id="Creater" type="text" class="form-control"/> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">类别</div> | |||
<div id="Type"></div> | |||
</div> | |||
@*<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">系|专业|班级</div> | |||
<input id="StudentSource" type="text" class="form-control" /> | |||
</div>*@ | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_view" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 查看</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/PersonnelManagement/Views/EpidemicSituationCopy/IndexAll.js") |
@@ -0,0 +1,232 @@ | |||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2020-02-03 14:37 | |||
* 描 述:疫情记录 | |||
*/ | |||
var refreshGirdData; | |||
var createrID = request('createrID'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var startTime; | |||
var endTime; | |||
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); | |||
$('#Type').lrDataItemSelect({ code: 'EUserType' }); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
$('#lr_view').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerForm({ | |||
id: 'FormView', | |||
title: '查看', | |||
url: top.$.rootUrl + '/PersonnelManagement/EpidemicSituationCopy/FormView?keyValue=' + keyValue, | |||
width: 1000, | |||
height: 650, | |||
btn: null | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/PersonnelManagement/EpidemicSituation/GetPageList', | |||
headData: [ | |||
{ | |||
label: "填表人员", name: "Creater", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser', | |||
key: value, | |||
keyId: 'f_userid', | |||
callback: function (_data) { | |||
callback(_data['f_realname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "填报日期", name: "CreateTime", width: 100, align: "left", | |||
formatter: function (value, row) { | |||
return dateFormat("YYYY-mm-dd", new Date(value)); | |||
} | |||
}, | |||
{ | |||
label: "类别", name: "Type", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('dataItem', { | |||
key: value, | |||
code: 'EUserType', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "所在部门/班级", name: "Department", width: 200, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
if (row.StudentSource) { | |||
callback(row.StudentSource); | |||
} else { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', | |||
key: value, | |||
keyId: 'id', | |||
callback: function (_data) { | |||
callback(_data['name']); | |||
} | |||
}); | |||
} | |||
} | |||
}, | |||
{ | |||
label: "性别", name: "Gender", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('dataItem', { | |||
key: value, | |||
code: 'usersex', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "家庭住址", name: "HomeAddress", width: 100, align: "left" }, | |||
{ | |||
label: "健康状况", name: "HealthSituation", width: 100, align: "left", | |||
//formatterAsync: function (callback, value, row, op, $cell) { | |||
// learun.clientdata.getAsync('dataItem', { | |||
// key: value, | |||
// code: 'EpiHealth', | |||
// callback: function (_data) { | |||
// callback(_data.text); | |||
// } | |||
// }); | |||
//} | |||
formatter: function (cellvalue, row) { | |||
if (cellvalue == 0) { | |||
return '<span class=\"label label-success\">健康</span>'; | |||
} else if (cellvalue == 1) { | |||
return '<span class=\"label label-danger\">异常</span>'; | |||
} | |||
} | |||
}, | |||
{ | |||
label: "是否外出", name: "IsOut", width: 100, align: "left", | |||
//formatterAsync: function (callback, value, row, op, $cell) { | |||
// learun.clientdata.getAsync('dataItem', { | |||
// key: value, | |||
// code: 'YesOrNoInt', | |||
// callback: function (_data) { | |||
// callback(_data.text); | |||
// } | |||
// }); | |||
//} | |||
formatter: function (cellvalue, row) { | |||
if (cellvalue === 0) { | |||
return '<span class=\"label label-success\">否</span>'; | |||
} else if (cellvalue === 1) { | |||
return '<span class=\"label label-danger\">是</span>'; | |||
} | |||
} | |||
}, | |||
{ | |||
label: "家人异常", name: "HasFamily", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
if (cellvalue === 0) { | |||
return '<span class=\"label label-success\">否</span>'; | |||
} else if (cellvalue === 1) { | |||
return '<span class=\"label label-danger\">是</span>'; | |||
} | |||
} | |||
}, | |||
{ | |||
label: "疫区人异常", name: "HasPeople", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
if (cellvalue === 0) { | |||
return '<span class=\"label label-success\">否</span>'; | |||
} else if (cellvalue === 1) { | |||
return '<span class=\"label label-danger\">是</span>'; | |||
} | |||
} | |||
}, | |||
{ label: "联系方式", name: "Mobile", width: 100, align: "left" }, | |||
{ label: "当前地址", name: "Objective", width: 100, align: "left" } | |||
], | |||
mainId: 'ID', | |||
isPage: true | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.StartTime = startTime; | |||
param.EndTime = endTime; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
page.search(); | |||
}; | |||
page.init(); | |||
} | |||
function dateFormat(fmt, date) { | |||
let ret; | |||
const opt = { | |||
"Y+": date.getFullYear().toString(), // 年 | |||
"m+": (date.getMonth() + 1).toString(), // 月 | |||
"d+": date.getDate().toString(), // 日 | |||
"H+": date.getHours().toString(), // 时 | |||
"M+": date.getMinutes().toString(), // 分 | |||
"S+": date.getSeconds().toString() // 秒 | |||
// 有其他格式化字符需求可以继续添加,必须转化成字符串 | |||
}; | |||
for (let k in opt) { | |||
ret = new RegExp("(" + k + ")").exec(fmt); | |||
if (ret) { | |||
fmt = fmt.replace(ret[1], (ret[1].length == 1) ? (opt[k]) : (opt[k].padStart(ret[1].length, "0"))) | |||
}; | |||
}; | |||
return fmt; | |||
} |
@@ -12,7 +12,7 @@ | |||
<div class="lr-query-formcontent"> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">填表人员</div> | |||
<div id="Creater"></div> | |||
<input id="Creater" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">类别</div> | |||
@@ -20,7 +20,6 @@ var bootstrap = function ($, learun) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
$('#Type').lrDataItemSelect({ code: 'EUserType' }); | |||
$('#Creater').lrDataSourceSelect({ code: 'BaseUser', value: 'f_userid', text: 'f_realname' }); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
@@ -35,6 +34,7 @@ var bootstrap = function ($, learun) { | |||
url: top.$.rootUrl + '/PersonnelManagement/EpidemicSituationCopy/Index?createrID=' + createrID, | |||
width: '80%', | |||
height: '80%', | |||
btn: null | |||
}); | |||
} | |||
}); | |||
@@ -72,9 +72,8 @@ var bootstrap = function ($, learun) { | |||
} | |||
}, | |||
{ | |||
label: "所在部门", name: "Department", width: 100, align: "left", | |||
label: "所在部门/班级", name: "Department", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
console.log(row); | |||
if (row.StudentSource) { | |||
callback(row.StudentSource); | |||
} else { | |||
@@ -57,6 +57,7 @@ namespace Learun.Application.Web.Controllers | |||
private Sys_UpdateRecordIBLL sys_UpdateRecordIBLL = new Sys_UpdateRecordBLL(); | |||
private Perm_FunctionIBLL perm_FunctionIBLL = new Perm_FunctionBLL(); | |||
private ICache redisCache = CacheFactory.CaChe(); | |||
private Sys_DefaultPwdConfigIBLL sys_DefaultPwdConfigIBLL = new Sys_DefaultPwdConfigBLL(); | |||
#region 视图功能 | |||
public ActionResult ChangePwd() | |||
@@ -168,7 +169,8 @@ namespace Learun.Application.Web.Controllers | |||
var readnewslist = newsIBLL.GetList("", userinfo.userId).Where(m => !string.IsNullOrEmpty(m.RNewsId)).Select(m => m.F_NewsId); | |||
ViewBag.UnreadNews = outnewslist.Count(m => !readnewslist.Contains(m.F_NewsId)); | |||
paginationobj.sidx = "SendTime"; | |||
ViewBag.UnreadFile = sys_ReceiveFileIBLL.GetPageListByUserId(paginationobj, "{}", userinfo.userId).Where(a => a.STypeId == 1).Count(); | |||
//ViewBag.UnreadFile = sys_ReceiveFileIBLL.GetPageListByUserId(paginationobj, "{}", userinfo.userId).Where(a => a.STypeId == 1).Count(); | |||
ViewBag.UnreadFile = sys_ReceiveFileIBLL.GetPageListBySenderId(userinfo.userId); | |||
return View(); | |||
} | |||
@@ -229,6 +231,11 @@ namespace Learun.Application.Web.Controllers | |||
string qingJuurl = ConfigurationManager.AppSettings["QingJuurl"]; | |||
string qingjuregisterurl = ConfigurationManager.AppSettings["QingJuRegisterurl"]; | |||
string defpwd = ConfigurationManager.AppSettings["defaultpwd"]; | |||
//读取默认密码配置中已启用的密码 | |||
if (sys_DefaultPwdConfigIBLL.GetEnabledEntity() != null) | |||
{ | |||
defpwd = sys_DefaultPwdConfigIBLL.GetEnabledEntity().Pwd; | |||
} | |||
var qjinfo = qjAccountIbll.GetQingJu_UserAccountEntityByAccount(userinfo.account); | |||
if (qjinfo == null || string.IsNullOrEmpty(qjinfo.UserAccount)) | |||
{ | |||
@@ -335,6 +342,11 @@ namespace Learun.Application.Web.Controllers | |||
string qingJuurl = ConfigurationManager.AppSettings["QingJuurl"]; | |||
string qingjuregisterurl = ConfigurationManager.AppSettings["QingJuRegisterurl"]; | |||
string defpwd = ConfigurationManager.AppSettings["defaultpwd"]; | |||
//读取默认密码配置中已启用的密码 | |||
if (sys_DefaultPwdConfigIBLL.GetEnabledEntity() != null) | |||
{ | |||
defpwd = sys_DefaultPwdConfigIBLL.GetEnabledEntity().Pwd; | |||
} | |||
if (up != null && !string.IsNullOrEmpty(up.QUserName)) | |||
{ | |||
if (userinfo.Description == "教师") | |||
@@ -423,7 +435,7 @@ namespace Learun.Application.Web.Controllers | |||
#region 待办 | |||
var userinfo = LoginUserInfo.Get(); | |||
Pagination paginationobj = new Pagination() { rows = 5, page = 1, sidx = "readflag asc,SENDTIME desc ", sord = "desc" }; | |||
Pagination paginationobj = new Pagination() { rows = 100, page = 1, sidx = "readflag asc,SENDTIME desc ", sord = "desc" }; | |||
//未读邮件 | |||
ViewBag.UnreadMail = sYS_ReceiveMessageIBLL.GetPageList(paginationobj, "{\"userId\":\"" + userinfo.userId + "\"}").Count(m => m.READFLAG == 0); | |||
//办公事项 | |||
@@ -476,12 +488,15 @@ namespace Learun.Application.Web.Controllers | |||
var readnewslist = newsIBLL.GetList("", userinfo.userId).Where(m => !string.IsNullOrEmpty(m.RNewsId)).Select(m => m.F_NewsId); | |||
ViewBag.UnreadNews = outnewslist.Count(m => !readnewslist.Contains(m.F_NewsId)); | |||
paginationobj.sidx = "SendTime"; | |||
ViewBag.UnreadFile = sys_ReceiveFileIBLL.GetPageListByUserId(paginationobj, "{}", userinfo.userId).Count(); | |||
ViewBag.UnreadFile = sys_ReceiveFileIBLL.GetPageListBySenderId(userinfo.userId).Count(); | |||
//普通教师请假-未归档数 | |||
ViewBag.UnfileLeave = 0; | |||
//中层领导请假-未归档数 | |||
ViewBag.UnfileLeaveZC = 0; | |||
ViewBag.UnreadNum = ViewBag.UnreadFile + ViewBag.UnreadNews + ViewBag.UnreadTask + ViewBag.UnreadMail; | |||
ViewBag.UnreadNum = ViewBag.UnreadFile + ViewBag.UnreadNews + ViewBag.UnreadTask + ViewBag.UnreadMail + ViewBag.UnfileLeave + ViewBag.UnfileLeaveZC; | |||
#endregion | |||
//获取在线用户人数 | |||
ViewBag.OnlineUserNum = 0; | |||
var onlineUserResult = sys_UpdateRecordIBLL.GetOnlineUserNum(); | |||
@@ -739,6 +739,85 @@ namespace Learun.Application.Web.Controllers | |||
} | |||
} | |||
/// <summary> | |||
/// 无ui登录 | |||
/// </summary> | |||
/// <param name="u"></param> | |||
/// <param name="p"></param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult CheckLoginForSSOBC(string u,string p) | |||
{ | |||
try | |||
{ | |||
string uid = Request.QueryString["u"]; | |||
string pwd = Request.QueryString["p"]; | |||
if (!string.IsNullOrEmpty(uid)&&!string.IsNullOrEmpty(pwd)) | |||
{ | |||
string username = uid; | |||
string password = pwd; | |||
UserEntity userEntity = userBll.CheckLogin(username, Md5Helper.Encrypt(password, 32)); | |||
LogEntity logEntity = new LogEntity(); | |||
logEntity.F_CategoryId = 1; | |||
logEntity.F_OperateTypeId = ((int)OperationType.Login).ToString(); | |||
logEntity.F_OperateType = EnumAttribute.GetDescription(OperationType.Login); | |||
logEntity.F_OperateAccount = username + "(" + userEntity.F_RealName + ")"; | |||
logEntity.F_OperateUserId = !string.IsNullOrEmpty(userEntity.F_UserId) ? userEntity.F_UserId : username; | |||
logEntity.F_Module = "接口登录"; | |||
logEntity.F_Description = "PC端"; | |||
if (!userEntity.LoginOk)//登录失败 | |||
{ | |||
//写入日志 | |||
logEntity.F_ExecuteResult = 0; | |||
logEntity.F_ExecuteResultJson = "接口登录失败:" + userEntity.LoginMsg; | |||
logEntity.WriteLog(); | |||
return Fail(userEntity.LoginMsg); | |||
} | |||
else | |||
{ | |||
OperatorHelper.Instance.AddLoginUser(userEntity.F_Account, "Learun_ADMS_6.1_PC", null);//写入缓存信息 | |||
//写入日志 | |||
logEntity.F_ExecuteResult = 1; | |||
logEntity.F_ExecuteResultJson = "无ui接口登录成功"; | |||
logEntity.WriteLog(); | |||
return Success("login success"); | |||
} | |||
} | |||
else | |||
{ | |||
return Fail("参数错误"); | |||
} | |||
} | |||
catch (Exception e) | |||
{ | |||
return Fail("参数错误"); | |||
} | |||
} | |||
/// <summary> | |||
/// 无ui退出 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpPost] | |||
public ActionResult OutLoginForSSOBC() | |||
{ | |||
LogEntity logEntity = new LogEntity(); | |||
logEntity.F_CategoryId = 1; | |||
logEntity.F_OperateTypeId = ((int)OperationType.Exit).ToString(); | |||
logEntity.F_OperateType = EnumAttribute.GetDescription(OperationType.Exit); | |||
logEntity.F_OperateAccount ="第三方无ui"; | |||
logEntity.F_OperateUserId = "noui"; | |||
logEntity.F_ExecuteResult = 1; | |||
logEntity.F_ExecuteResultJson = "无ui退出系统"; | |||
logEntity.F_Module = "退出"; | |||
logEntity.F_Description = "PC端"; | |||
logEntity.WriteLog(); | |||
Session.Abandon();//清除当前会话 | |||
Session.Clear();//清除当前浏览器所有Session | |||
OperatorHelper.Instance.EmptyCurrent(); | |||
return Success("logout success"); | |||
} | |||
#endregion | |||
#region 微信登录 | |||
@@ -331,6 +331,7 @@ | |||
<Compile Include="Areas\EducationalAdministration\Controllers\StuGrantController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\StuInfoBasicChangeController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\StuScoreNotPassController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\Sys_DefaultPwdConfigController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\Sys_ReceiveDocumentController.cs" /> | |||
<Compile Include="Areas\EvaluationTeach\EvaluationTeachAreaRegistration.cs" /> | |||
<Compile Include="Areas\EvaluationTeach\Controllers\Eval_MainController.cs" /> | |||
@@ -389,6 +390,7 @@ | |||
<Compile Include="Areas\LR_Desktop\Controllers\DTListController.cs" /> | |||
<Compile Include="Areas\LR_Desktop\Controllers\DTSettingController.cs" /> | |||
<Compile Include="Areas\LR_Desktop\Controllers\DTTargetController.cs" /> | |||
<Compile Include="Areas\LR_Desktop\Controllers\MessageRindController.cs" /> | |||
<Compile Include="Areas\LR_Desktop\Controllers\WeChatDevelopController.cs" /> | |||
<Compile Include="Areas\LR_Desktop\LR_DesktopAreaRegistration.cs" /> | |||
<Compile Include="Areas\LR_DisplayBoard\Controllers\LR_KBConfigInfoController.cs" /> | |||
@@ -469,6 +471,7 @@ | |||
<Compile Include="Areas\LR_WorkFlowModule\Controllers\WfSchemeController.cs" /> | |||
<Compile Include="Areas\LR_WorkFlowModule\Controllers\WfSystemDemoController.cs" /> | |||
<Compile Include="Areas\LR_WorkFlowModule\LR_WorkFlowModuleAreaRegistration.cs" /> | |||
<Compile Include="Areas\Permission\Controllers\DepartmentReleasePermissionsController.cs" /> | |||
<Compile Include="Areas\Permission\PermissionAreaRegistration.cs" /> | |||
<Compile Include="Areas\PersonnelManagement\Controllers\EpidemicReportController.cs" /> | |||
<Compile Include="Areas\PersonnelManagement\Controllers\EpidemicSituationCopyController.cs" /> | |||
@@ -1000,11 +1003,15 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\StuScore\GraduateScoreQueryAllIndex.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuScore\ScoreQueryAllIndexTeacher.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuScore\ScoreQueryAllIndex.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_DefaultPwdConfig\Form.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_DefaultPwdConfig\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_ReceiveDocument\FormView.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_ReceiveDocument\Form.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_ReceiveDocument\Form.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_ReceiveDocument\Index.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_ReceiveDocument\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_ReceiveDocument\IndexFile.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_ReceiveDocument\PrintView.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_ReceiveDocument\SelectUserForm.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_ReceiveDocument\IssueForm.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_ReceiveDocument\ReadList.js" /> | |||
@@ -1021,9 +1028,12 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_SendFile\FormDocumentView.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_SendFile\FormDocument.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_SendFile\FormPartyView.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_SendFile\IndexFile.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_SendFile\IndexParty.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_SendFile\IndexDocument.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_SendFile\IndexPartyFile.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_SendFile\IssueForm.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_SendFile\PrintView.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_SendFile\ReadListParty.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_SendFile\ReadListDocument.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Thermography\IndexResult.js" /> | |||
@@ -1245,6 +1255,8 @@ | |||
<Content Include="Areas\LR_Desktop\Views\DTSetting\App\AppIndex.js" /> | |||
<Content Include="Areas\LR_Desktop\Views\DTSetting\PC\PcIndex.css" /> | |||
<Content Include="Areas\LR_Desktop\Views\DTSetting\PC\PcIndex.js" /> | |||
<Content Include="Areas\LR_Desktop\Views\MessageRind\Form.js" /> | |||
<Content Include="Areas\LR_Desktop\Views\MessageRind\Index.js" /> | |||
<Content Include="Areas\LR_Desktop\Views\WeChatDevelop\Form.js" /> | |||
<Content Include="Areas\LR_Desktop\Views\WeChatDevelop\Index.js" /> | |||
<Content Include="Areas\LR_DisplayBoard\Views\LR_KBConfigInfo\ChartForm.css" /> | |||
@@ -1350,9 +1362,13 @@ | |||
<Content Include="Areas\LR_TaskScheduling\Views\TSScheme\Index.js" /> | |||
<Content Include="Areas\LR_TaskScheduling\Views\TSScheme\SelectExpressForm.css" /> | |||
<Content Include="Areas\LR_TaskScheduling\Views\TSScheme\SelectExpressForm.js" /> | |||
<Content Include="Areas\Permission\Views\DepartmentReleasePermissions\Form.js" /> | |||
<Content Include="Areas\Permission\Views\DepartmentReleasePermissions\Index.js" /> | |||
<Content Include="Areas\PersonnelManagement\Views\ContractManagement\FormRemove.js" /> | |||
<Content Include="Areas\PersonnelManagement\Views\ContractManagement\FormTerminate.js" /> | |||
<Content Include="Areas\PersonnelManagement\Views\ContractManagement\FormRenew.js" /> | |||
<Content Include="Areas\PersonnelManagement\Views\EpidemicSituationCopy\FormView.js" /> | |||
<Content Include="Areas\PersonnelManagement\Views\EpidemicSituationCopy\IndexAll.js" /> | |||
<Content Include="Areas\PersonnelManagement\Views\Sal_UserSalary\ImportForm.css" /> | |||
<Content Include="Areas\PersonnelManagement\Views\Sal_UserSalary\ImportForm.js" /> | |||
<Content Include="Areas\PersonnelManagement\Views\StuSaverecord\IndexForStudent.js" /> | |||
@@ -6942,6 +6958,20 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\StuCancelLeaveManagement\CheckForm.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuDisciplineManagement\FormView.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuCancelDisciplineManagement\FormView.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_ReceiveDocument\IndexFile.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_ReceiveDocument\PrintView.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_SendFile\IndexFile.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_SendFile\IndexPartyFile.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_SendFile\PrintView.cshtml" /> | |||
<Content Include="Areas\Permission\Views\DepartmentReleasePermissions\Form.cshtml" /> | |||
<Content Include="Areas\Permission\Views\DepartmentReleasePermissions\Index.cshtml" /> | |||
<Content Include="Areas\LR_Desktop\Views\MessageRind\Form.cshtml" /> | |||
<Content Include="Areas\LR_Desktop\Views\MessageRind\Index.cshtml" /> | |||
<Content Include="Areas\LR_Desktop\Views\MessageRind\UnreadIndex.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_DefaultPwdConfig\Form.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_DefaultPwdConfig\Index.cshtml" /> | |||
<Content Include="Areas\PersonnelManagement\Views\EpidemicSituationCopy\FormView.cshtml" /> | |||
<Content Include="Areas\PersonnelManagement\Views\EpidemicSituationCopy\IndexAll.cshtml" /> | |||
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | |||
<Content Include="Views\Login\Default-beifen.cshtml" /> | |||
<None Include="Properties\PublishProfiles\FolderProfile1.pubxml" /> | |||
@@ -163,4 +163,8 @@ | |||
<add key="QJUrl" value="www.qj.com"/> | |||
<!--系主任角色Id--> | |||
<add key="DeptDirectorRoleId" value="cccde0ce-ebfe-41f2-9a78-e49aaa21cd5a" /> | |||
<!-- 登录次数限制:登录连续错误要禁止登录 --> | |||
<add key="ForbidLoginNum" value="5"/> | |||
<!-- 禁止登录时间(分钟) --> | |||
<add key="ForbidLoginMinutes" value="10"/> | |||
</appSettings> |
@@ -180,7 +180,7 @@ namespace Learun.Application.WebApi | |||
ReqParameter req = this.Bind<ReqParameter>(); | |||
loginMark = req.loginMark; | |||
token = req.token; | |||
if (path == "/learun/adms/user/login" || path == "/" || path == "/bgimg" || path == "/learun/adms/user/img" || path == "/learun/adms/desktop/img"||path== "/learun/adms/user/imgfordc") | |||
if (path == "/learun/adms/user/login"|| path == "/learun/adms/user/loginbyIdCard" || path == "/" || path == "/bgimg" || path == "/learun/adms/user/img" || path == "/learun/adms/desktop/img"||path== "/learun/adms/user/imgfordc") | |||
{// 登录接口,默认页面接口不做权限验证处理 | |||
return null; | |||
} | |||
@@ -144,7 +144,7 @@ namespace Learun.Application.WebApi | |||
var userId = entity.Creater; | |||
if (epidemicSituationIBLL.HasTodayValue(userId)) | |||
{ | |||
return Success("不能重复提交"); | |||
return Fail("不能重复提交"); | |||
} | |||
} | |||
@@ -27,7 +27,9 @@ namespace Learun.Application.WebApi | |||
{ | |||
Post["/login"] = Login; | |||
Post["/modifypw"] = ModifyPassword; | |||
Post["/modifypwiden"] = ModifyPasswordiden; | |||
Post["/unbundWeiXin"] = DoUnbundWeiXin; | |||
Post["/loginbyIdCard"] = LoginByIdCard; | |||
Get["/info"] = Info; | |||
Get["/map"] = GetMap; | |||
@@ -119,6 +121,88 @@ namespace Learun.Application.WebApi | |||
#endregion | |||
} | |||
/// <summary> | |||
/// 身份验证-登录接口 | |||
/// </summary> | |||
/// <param name="_"></param> | |||
/// <returns></returns> | |||
private Response LoginByIdCard(dynamic _) | |||
{ | |||
LoginModel loginModel = this.GetReqData<LoginModel>(); | |||
#region 内部账户验证 | |||
UserEntity userEntity = userIBLL.CheckLoginByIdCard(loginModel.username, loginModel.password); | |||
#region 写入日志 | |||
LogEntity logEntity = new LogEntity(); | |||
logEntity.F_CategoryId = 1; | |||
logEntity.F_OperateTypeId = ((int)OperationType.Login).ToString(); | |||
logEntity.F_OperateType = EnumAttribute.GetDescription(OperationType.Login); | |||
logEntity.F_OperateAccount = loginModel.username + "(" + userEntity.F_RealName + ")"; | |||
logEntity.F_OperateUserId = !string.IsNullOrEmpty(userEntity.F_UserId) ? userEntity.F_UserId : loginModel.username; | |||
logEntity.F_Module = Config.GetValue("SoftName"); | |||
logEntity.F_Description = "移动端"; | |||
#endregion | |||
if (!userEntity.LoginOk)//登录失败 | |||
{ | |||
//写入日志 | |||
logEntity.F_ExecuteResult = 0; | |||
logEntity.F_ExecuteResultJson = "登录失败:" + userEntity.LoginMsg; | |||
logEntity.WriteLog(); | |||
return Fail(userEntity.LoginMsg); | |||
} | |||
else | |||
{ | |||
//新增新生判断 | |||
var stuinfobasic = stuInfoBasicIBLL.GetStuInfoBasicEntityByStuNo(userEntity.F_EnCode); | |||
if (stuinfobasic!=null&&stuinfobasic.Grade!="21") | |||
{ | |||
userEntity.LoginMsg = "只有新生支持身份证方式登录"; | |||
return Fail(userEntity.LoginMsg); | |||
} | |||
//记录ip | |||
userIBLL.UpdateIp(GetIP(), userEntity.F_UserId); | |||
string token = OperatorHelper.Instance.AddLoginUser(userEntity.F_Account, "Learun_ADMS_6.1_App", this.loginMark, false);//写入缓存信息 | |||
//写入日志 | |||
logEntity.F_ExecuteResult = 1; | |||
logEntity.F_ExecuteResultJson = "登录成功"; | |||
logEntity.WriteLog(); | |||
//保存用户设备号 | |||
userIBLL.UpdateDeviceId(userEntity.F_UserId, loginModel.deviceid); | |||
OperatorResult res = OperatorHelper.Instance.IsOnLine(token, this.loginMark); | |||
res.userInfo.password = null; | |||
res.userInfo.secretkey = null; | |||
var studententity = stuInfoBasicIBLL.GetStuInfoBasicEntityByStuNo(userEntity.F_Account); | |||
if (studententity != null) | |||
{ | |||
res.userInfo.grade = studententity.Grade; | |||
var majorinfo = majorIbll.GetCdMajorEntityByMajorNo(studententity.MajorNo); | |||
if (majorinfo != null) | |||
{ | |||
res.userInfo.majorno = majorinfo.ID ?? ""; | |||
} | |||
} | |||
//是否强密码验证 | |||
bool pwd = false; | |||
if (!string.IsNullOrEmpty(ConfigurationManager.AppSettings["verifypwd"]) && ConfigurationManager.AppSettings["verifypwd"] == "true" && loginModel.up == false) | |||
{ | |||
pwd = true; | |||
} | |||
var jsonData = new | |||
{ | |||
baseinfo = res.userInfo, | |||
post = postIBLL.GetListByPostIds(res.userInfo.postIds), | |||
role = roleIBLL.GetListByRoleIds(res.userInfo.roleIds), | |||
pwd = pwd | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
} | |||
/// <summary> | |||
/// 获取用户信息 | |||
/// </summary> | |||
@@ -164,6 +248,26 @@ namespace Learun.Application.WebApi | |||
} | |||
} | |||
} | |||
private Response ModifyPasswordiden(dynamic _) | |||
{ | |||
ModifyModel modifyModel = this.GetReqData<ModifyModel>(); | |||
if (userInfo.isSystem) | |||
{ | |||
return Fail("当前账户不能修改密码"); | |||
} | |||
else | |||
{ | |||
bool res = userIBLL.RevisePasswordiden(modifyModel.newpassword, modifyModel.oldpassword); | |||
if (!res) | |||
{ | |||
return Fail("原密码错误,请重新输入"); | |||
} | |||
else | |||
{ | |||
return Success("密码修改成功"); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 解绑微信 | |||
@@ -0,0 +1,29 @@ | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using System.Data.Entity.ModelConfiguration; | |||
namespace Learun.Application.Mapping | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-01-19 11:14 | |||
/// 描 述:默认密码配置 | |||
/// </summary> | |||
public class Sys_DefaultPwdConfigMap : EntityTypeConfiguration<Sys_DefaultPwdConfigEntity> | |||
{ | |||
public Sys_DefaultPwdConfigMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("SYS_DEFAULTPWDCONFIG"); | |||
//主键 | |||
this.HasKey(t => t.Id); | |||
#endregion | |||
#region 配置关系 | |||
#endregion | |||
} | |||
} | |||
} | |||
@@ -0,0 +1,29 @@ | |||
using Learun.Application.TwoDevelopment.LR_Desktop; | |||
using System.Data.Entity.ModelConfiguration; | |||
namespace Learun.Application.Mapping | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-04-23 16:58 | |||
/// 描 述:消息提醒 | |||
/// </summary> | |||
public class MessageRemindMap : EntityTypeConfiguration<MessageRemindEntity> | |||
{ | |||
public MessageRemindMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("MESSAGEREMIND"); | |||
//主键 | |||
this.HasKey(t => t.MessageId); | |||
#endregion | |||
#region 配置关系 | |||
#endregion | |||
} | |||
} | |||
} | |||
@@ -87,6 +87,7 @@ | |||
<Compile Include="EducationalAdministration\StuInfoFreshOnlineServiceMap.cs" /> | |||
<Compile Include="EducationalAdministration\StuScoreNotPassMap.cs" /> | |||
<Compile Include="EducationalAdministration\StuSelectLessonListOfElectivePreMap.cs" /> | |||
<Compile Include="EducationalAdministration\Sys_DefaultPwdConfigMap.cs" /> | |||
<Compile Include="EducationalAdministration\Sys_ReceiveFileMap.cs" /> | |||
<Compile Include="EducationalAdministration\TeachPlanMap.cs" /> | |||
<Compile Include="EducationalAdministration\TeachSwitchMap.cs" /> | |||
@@ -110,6 +111,7 @@ | |||
<Compile Include="LR_CodeDemo\LR_OA_ProjectMap.cs" /> | |||
<Compile Include="LR_CRM\CrmCustomerContactMap.cs" /> | |||
<Compile Include="LR_CRM\CrmChanceMap.cs" /> | |||
<Compile Include="LR_Desktop\MessageRemindMap.cs" /> | |||
<Compile Include="LR_Desktop\WeChatDevelopMap.cs" /> | |||
<Compile Include="LR_Excel\ExcelExportMap.cs" /> | |||
<Compile Include="LR_Excel\ExcelImportFieldMap.cs" /> | |||
@@ -193,6 +195,7 @@ | |||
<Compile Include="LR_WorkFlow\WfSchemeMap.cs" /> | |||
<Compile Include="LR_WorkFlow\WfTaskHistoryMap.cs" /> | |||
<Compile Include="LR_WorkFlow\WfTaskMap.cs" /> | |||
<Compile Include="Permission\DepartmentReleasePermissionsMap.cs" /> | |||
<Compile Include="PersonnelManagement\JbjiabanMap.cs" /> | |||
<Compile Include="PersonnelManagement\MP_ManageMentPlanMap.cs" /> | |||
<Compile Include="PersonnelManagement\PMCadreMap.cs" /> | |||
@@ -0,0 +1,29 @@ | |||
using Learun.Application.TwoDevelopment.Permission; | |||
using System.Data.Entity.ModelConfiguration; | |||
namespace Learun.Application.Mapping | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2020-12-22 11:35 | |||
/// 描 述:公告发布权限设置 | |||
/// </summary> | |||
public class DepartmentReleasePermissionsMap : EntityTypeConfiguration<DepartmentReleasePermissionsEntity> | |||
{ | |||
public DepartmentReleasePermissionsMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("DEPARTMENTRELEASEPERMISSIONS"); | |||
//主键 | |||
this.HasKey(t => t.ID); | |||
#endregion | |||
#region 配置关系 | |||
#endregion | |||
} | |||
} | |||
} | |||
@@ -0,0 +1,171 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.Data; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-01-19 11:14 | |||
/// 描 述:默认密码配置 | |||
/// </summary> | |||
public class Sys_DefaultPwdConfigBLL : Sys_DefaultPwdConfigIBLL | |||
{ | |||
private Sys_DefaultPwdConfigService sys_DefaultPwdConfigService = new Sys_DefaultPwdConfigService(); | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<Sys_DefaultPwdConfigEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
return sys_DefaultPwdConfigService.GetPageList(pagination, queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Sys_DefaultPwdConfig表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public Sys_DefaultPwdConfigEntity GetSys_DefaultPwdConfigEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return sys_DefaultPwdConfigService.GetSys_DefaultPwdConfigEntity(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Sys_DefaultPwdConfig表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public Sys_DefaultPwdConfigEntity GetEnabledEntity() | |||
{ | |||
try | |||
{ | |||
return sys_DefaultPwdConfigService.GetEnabledEntity(); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void DeleteEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
sys_DefaultPwdConfigService.DeleteEntity(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
/// <returns></returns> | |||
public void SaveEntity(string keyValue, Sys_DefaultPwdConfigEntity entity) | |||
{ | |||
try | |||
{ | |||
sys_DefaultPwdConfigService.SaveEntity(keyValue, entity); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 启用 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void DoEnabled(string keyValue) | |||
{ | |||
try | |||
{ | |||
sys_DefaultPwdConfigService.DoEnabled(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,60 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.ComponentModel.DataAnnotations.Schema; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-01-19 11:14 | |||
/// 描 述:默认密码配置 | |||
/// </summary> | |||
public class Sys_DefaultPwdConfigEntity | |||
{ | |||
#region 实体成员 | |||
/// <summary> | |||
/// Id | |||
/// </summary> | |||
[Column("ID")] | |||
public string Id { get; set; } | |||
/// <summary> | |||
/// PwdName | |||
/// </summary> | |||
[Column("PWDNAME")] | |||
public string PwdName { get; set; } | |||
/// <summary> | |||
/// Pwd | |||
/// </summary> | |||
[Column("PWD")] | |||
public string Pwd { get; set; } | |||
/// <summary> | |||
/// IsEnabled | |||
/// </summary> | |||
[Column("ISENABLED")] | |||
public bool? IsEnabled { get; set; } | |||
#endregion | |||
#region 扩展操作 | |||
/// <summary> | |||
/// 新增调用 | |||
/// </summary> | |||
public void Create() | |||
{ | |||
this.Id = Guid.NewGuid().ToString(); | |||
} | |||
/// <summary> | |||
/// 编辑调用 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
public void Modify(string keyValue) | |||
{ | |||
this.Id = keyValue; | |||
} | |||
#endregion | |||
#region 扩展字段 | |||
#endregion | |||
} | |||
} | |||
@@ -0,0 +1,61 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-01-19 11:14 | |||
/// 描 述:默认密码配置 | |||
/// </summary> | |||
public interface Sys_DefaultPwdConfigIBLL | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
IEnumerable<Sys_DefaultPwdConfigEntity> GetPageList(Pagination pagination, string queryJson); | |||
/// <summary> | |||
/// 获取Sys_DefaultPwdConfig表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
Sys_DefaultPwdConfigEntity GetSys_DefaultPwdConfigEntity(string keyValue); | |||
/// <summary> | |||
/// 获取Sys_DefaultPwdConfig表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
Sys_DefaultPwdConfigEntity GetEnabledEntity(); | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
void DeleteEntity(string keyValue); | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
void SaveEntity(string keyValue, Sys_DefaultPwdConfigEntity entity); | |||
/// <summary> | |||
/// 启用 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
void DoEnabled(string keyValue); | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,213 @@ | |||
using Dapper; | |||
using Learun.DataBase.Repository; | |||
using Learun.Util; | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Data; | |||
using System.Text; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-01-19 11:14 | |||
/// 描 述:默认密码配置 | |||
/// </summary> | |||
public class Sys_DefaultPwdConfigService : RepositoryFactory | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">查询参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<Sys_DefaultPwdConfigEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT "); | |||
strSql.Append(@" | |||
t.Id, | |||
t.PwdName, | |||
t.Pwd, | |||
t.IsEnabled | |||
"); | |||
strSql.Append(" FROM Sys_DefaultPwdConfig t "); | |||
strSql.Append(" WHERE 1=1 "); | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
if (!queryParam["PwdName"].IsEmpty()) | |||
{ | |||
dp.Add("PwdName", "%" + queryParam["PwdName"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.PwdName Like @PwdName "); | |||
} | |||
return this.BaseRepository().FindList<Sys_DefaultPwdConfigEntity>(strSql.ToString(), dp, pagination); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Sys_DefaultPwdConfig表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public Sys_DefaultPwdConfigEntity GetSys_DefaultPwdConfigEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository().FindEntity<Sys_DefaultPwdConfigEntity>(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Sys_DefaultPwdConfig表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public Sys_DefaultPwdConfigEntity GetEnabledEntity() | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository().FindEntity<Sys_DefaultPwdConfigEntity>(x => x.IsEnabled == true); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void DeleteEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
this.BaseRepository().Delete<Sys_DefaultPwdConfigEntity>(t => t.Id == keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
public void SaveEntity(string keyValue, Sys_DefaultPwdConfigEntity entity) | |||
{ | |||
try | |||
{ | |||
if (!string.IsNullOrEmpty(keyValue)) | |||
{ | |||
entity.Modify(keyValue); | |||
this.BaseRepository().Update(entity); | |||
} | |||
else | |||
{ | |||
entity.Create(); | |||
this.BaseRepository().Insert(entity); | |||
} | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 启用 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void DoEnabled(string keyValue) | |||
{ | |||
var db = this.BaseRepository().BeginTrans(); | |||
try | |||
{ | |||
var model = this.BaseRepository().FindEntity<Sys_DefaultPwdConfigEntity>(x => x.IsEnabled == true); | |||
if (model != null) | |||
{ | |||
model.IsEnabled = false; | |||
db.Update(model); | |||
} | |||
var newmodel = this.BaseRepository().FindEntity<Sys_DefaultPwdConfigEntity>(x => x.Id == keyValue); | |||
if (newmodel != null) | |||
{ | |||
newmodel.IsEnabled = true; | |||
db.Update(newmodel); | |||
} | |||
db.Commit(); | |||
} | |||
catch (Exception ex) | |||
{ | |||
db.Rollback(); | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -42,6 +42,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
public DataTable Execute(string sql) | |||
{ | |||
return sYS_ReceiveDocumentService.Execute(sql); | |||
} | |||
/// <summary> | |||
/// 获取Sys_ReceiveDocument表实体数据 | |||
/// <param name="keyValue">主键</param> | |||
@@ -30,6 +30,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
[Column("RRECEIVEUNIT")] | |||
public string RReceiveUnit { get; set; } | |||
/// <summary> | |||
/// 接收时间 | |||
/// </summary> | |||
[Column("RRECEIVETIME")] | |||
public DateTime? RReceiveTime { get; set; } | |||
/// <summary> | |||
/// 缓急程度 | |||
/// </summary> | |||
[Column("RURGENCYDEGREE")] | |||
@@ -74,15 +79,33 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// </summary> | |||
[Column("RFile")] | |||
public string RFile { get; set; } | |||
[Column("F_CREATEDATE")] | |||
public DateTime? F_CreateDate { get; set; } | |||
/// <summary> | |||
/// 发送人 | |||
/// </summary> | |||
[Column("SENDERID")] | |||
public string SenderId { get; set; } | |||
/// <summary> | |||
/// 需要处理 | |||
/// </summary> | |||
[NotMapped] | |||
[Column("HasDispose")] | |||
public int? HasDispose { get; set; } | |||
/// <summary> | |||
/// 收文(字) | |||
/// </summary> | |||
[Column("SWZ")] | |||
public string swz { get; set; } | |||
/// <summary> | |||
/// 来文(字) | |||
/// </summary> | |||
[Column("LWZ")] | |||
public string lwz { get; set; } | |||
#endregion | |||
#region 扩展操作 | |||
@@ -94,8 +117,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
var loginUser = LoginUserInfo.Get(); | |||
this.RID = Guid.NewGuid().ToString(); | |||
this.SenderId = loginUser.userId; | |||
this.RReceiveTime = DateTime.Now; | |||
this.RSendFlag = "0"; | |||
} | |||
/// <summary> | |||
/// 编辑调用 | |||
@@ -107,6 +130,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
#endregion | |||
#region 扩展字段 | |||
/// <summary> | |||
/// 编号 | |||
/// </summary> | |||
[NotMapped] | |||
public string NumberPeople { get; set; } | |||
#endregion | |||
} | |||
} | |||
@@ -21,6 +21,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
IEnumerable<Sys_ReceiveDocumentEntity> GetPageList(Pagination pagination, string queryJson); | |||
DataTable Execute(string sql); | |||
/// <summary> | |||
/// 获取Sys_ReceiveDocument表实体数据 | |||
/// <param name="keyValue">主键</param> | |||
@@ -4,6 +4,7 @@ using Learun.Util; | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Data; | |||
using System.Linq; | |||
using System.Text; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
@@ -42,13 +43,21 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
t.SpecifyReceiver, | |||
t.RContent, | |||
t.RSendFlag, | |||
t.RProcessId,t.F_CreateDate | |||
t.swz, | |||
t.lwz, | |||
t.RReceiveTime, | |||
t.RProcessId | |||
"); | |||
strSql.Append(" FROM Sys_ReceiveDocument t "); | |||
strSql.Append(" WHERE 1=1 "); | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
if (!queryParam["SenderId"].IsEmpty()) | |||
{ | |||
dp.Add("SenderId", queryParam["SenderId"].ToString(), DbType.String); | |||
strSql.Append(" AND t.SenderId = @SenderId "); | |||
} | |||
if (!queryParam["RReceiveUnit"].IsEmpty()) | |||
{ | |||
dp.Add("RReceiveUnit", queryParam["RReceiveUnit"].ToString(), DbType.String); | |||
@@ -64,7 +73,36 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
dp.Add("RTitle", "%" + queryParam["RTitle"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.RTitle Like @RTitle "); | |||
} | |||
return this.BaseRepository().FindList<Sys_ReceiveDocumentEntity>(strSql.ToString(), dp, pagination); | |||
if (queryParam["StartTime"].ToString() != "1753-01-01" && queryParam["EndTime"].ToString() != "3000-01-01") | |||
{ | |||
dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime); | |||
dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime); | |||
strSql.Append(" AND ( t.RReceiveTime >= @startTime AND t.RReceiveTime <= @endTime ) "); | |||
} | |||
//sql条件 | |||
if (!queryParam["SqlParameter"].IsEmpty()) | |||
{ | |||
strSql.Append(queryParam["SqlParameter"].ToString()); | |||
} | |||
var list = this.BaseRepository().FindList<Sys_ReceiveDocumentEntity>(strSql.ToString(), dp, pagination); | |||
foreach (var item in list) | |||
{ | |||
if (!item.RSendFlag.Equals("4")) | |||
{ | |||
var listentity = this.BaseRepository().FindList<Sys_ReceiveFileEntity>(a => a.SFileId == item.RID && a.RStatus == 0).Count(); | |||
if (listentity > 0) | |||
{ | |||
item.HasDispose = 1; | |||
} | |||
else | |||
{ | |||
item.HasDispose = 0; | |||
} | |||
} | |||
} | |||
return list; | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -79,6 +117,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
public DataTable Execute(string sql) | |||
{ | |||
return this.BaseRepository().FindTable(sql); | |||
} | |||
/// <summary> | |||
/// 获取Sys_ReceiveDocument表实体数据 | |||
/// <param name="keyValue">主键</param> | |||
@@ -138,12 +182,16 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// <returns></returns> | |||
public void DeleteEntity(string keyValue) | |||
{ | |||
var db = this.BaseRepository().BeginTrans(); | |||
try | |||
{ | |||
this.BaseRepository().Delete<Sys_ReceiveDocumentEntity>(t => t.RID == keyValue); | |||
db.Delete<Sys_ReceiveDocumentEntity>(t => t.RID == keyValue); | |||
db.Delete<Sys_ReceiveFileEntity>(a => a.SFileId == keyValue); | |||
db.Commit(); | |||
} | |||
catch (Exception ex) | |||
{ | |||
db.Rollback(); | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
@@ -198,7 +246,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
try | |||
{ | |||
BaseRepository().ExecuteBySql("update Sys_ReceiveDocument set RSendFlag=" + status + ",RProcessId='" + processId + "',F_CreateDate=getdate() where RID='" + keyValue + "'", null); | |||
BaseRepository().ExecuteBySql("update Sys_ReceiveDocument set RSendFlag=" + status + ",RProcessId='" + processId + "' where RID='" + keyValue + "'", null); | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -90,6 +90,42 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
} | |||
public IEnumerable<Sys_ReceiveFileEntity> GetPageListBySenderId(string senderId) | |||
{ | |||
try | |||
{ | |||
return sys_ReceiveFileService.GetPageListBySenderId(senderId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
public IEnumerable<Sys_ReceiveFileEntity> GetPageListBySendId(string senderId) | |||
{ | |||
try | |||
{ | |||
return sys_ReceiveFileService.GetPageListBySendId(senderId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Sys_ReceiveFile表实体数据 | |||
@@ -214,6 +250,43 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
} | |||
public void DisPose(string keyValue) | |||
{ | |||
try | |||
{ | |||
sys_ReceiveFileService.DisPose(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
public void Reset(string keyValue) | |||
{ | |||
try | |||
{ | |||
sys_ReceiveFileService.Reset(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 查看实体数据 | |||
@@ -276,6 +349,63 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
public string ZhuRenP() | |||
{ | |||
try | |||
{ | |||
return sys_ReceiveFileService.ZhuRenP(); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
public string XiaoZhangP() | |||
{ | |||
try | |||
{ | |||
return sys_ReceiveFileService.XiaoZhangP(); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
public object GetInstructions(string keyValue) | |||
{ | |||
try | |||
{ | |||
return sys_ReceiveFileService.GetInstructions(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
@@ -90,6 +90,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
[Column("DELFLAG")] | |||
public bool? DelFlag { get; set; } | |||
/// <summary> | |||
/// 管理员是否已经处理 | |||
/// </summary> | |||
[Column("RSTATUS")] | |||
public int? RStatus { get; set; } | |||
/// <summary> | |||
/// 查阅时间 | |||
/// </summary> | |||
[Column("READTIME")] | |||
@@ -40,6 +40,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// <param name="userId">用户编号</param> | |||
/// <returns></returns> | |||
IEnumerable<Sys_ReceiveFileEntity> GetPageListByUserId(Pagination pagination, string queryJson, string userId); | |||
IEnumerable<Sys_ReceiveFileEntity> GetPageListBySenderId(string senderId); | |||
IEnumerable<Sys_ReceiveFileEntity> GetPageListBySendId(string senderId); | |||
#endregion | |||
#region 提交数据 | |||
@@ -68,6 +70,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// <summary> | |||
/// <returns></returns> | |||
void VirtualDeleteEntity(string keyValue); | |||
void DisPose(string keyValue); | |||
void Reset(string keyValue); | |||
/// <summary> | |||
/// 查看实体数据 | |||
/// <param name="keyValue">主键</param> | |||
@@ -79,5 +83,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
void Issue(Sys_IssueEntity entity); | |||
void ReceiveDocumentIssue(Sys_IssueEntity entity); | |||
string ZhuRenP(); | |||
string XiaoZhangP(); | |||
object GetInstructions(string keyValue); | |||
} | |||
} |
@@ -9,6 +9,7 @@ using System.Linq; | |||
using System.Text; | |||
using System.Threading.Tasks; | |||
using System.Web; | |||
using Learun.Application.Base.AuthorizeModule; | |||
using Learun.Application.Organization; | |||
using Learun.Application.TwoDevelopment.LR_Desktop; | |||
using Microsoft.AspNet.SignalR.Client; | |||
@@ -109,7 +110,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty()) | |||
if (queryParam["StartTime"].ToString() != "1753-01-01" && queryParam["EndTime"].ToString() != "3000-01-01") | |||
{ | |||
dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime); | |||
dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime); | |||
@@ -139,6 +140,45 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
} | |||
public IEnumerable<Sys_ReceiveFileEntity> GetPageListBySenderId(string userId) | |||
{ | |||
try | |||
{ | |||
var userInfo = LoginUserInfo.Get(); | |||
var list = this.BaseRepository().FindList<Sys_ReceiveFileEntity>(a => a.SenderId == userId && a.RStatus == 0); | |||
return list; | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
public IEnumerable<Sys_ReceiveFileEntity> GetPageListBySendId(string SFileId) | |||
{ | |||
try | |||
{ | |||
var list = this.BaseRepository().FindList<Sys_ReceiveFileEntity>(a => a.SFileId == SFileId); | |||
return list; | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
@@ -245,6 +285,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
oldentity.ReplyFlag = true; | |||
oldentity.ReplyTime = DateTime.Now; | |||
oldentity.SpecifyReceiver = entity.SpecifyReceiver; | |||
oldentity.RStatus = entity.RStatus; | |||
this.BaseRepository().Update(oldentity); | |||
} | |||
else | |||
@@ -322,6 +363,58 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
public void DisPose(string keyValue) | |||
{ | |||
try | |||
{ | |||
var entity = this.BaseRepository().FindEntity<Sys_ReceiveFileEntity>(a => a.RFileId == keyValue); | |||
if (null != entity) | |||
{ | |||
entity.RStatus = 1; | |||
this.BaseRepository().Update(entity); | |||
} | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 重置批示状态 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
public void Reset(string keyValue) | |||
{ | |||
try | |||
{ | |||
var entity = this.BaseRepository().FindEntity<Sys_ReceiveFileEntity>(a => a.RFileId == keyValue); | |||
if (null != entity) | |||
{ | |||
entity.ReadFlag = false; | |||
this.BaseRepository().Update(entity); | |||
} | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 查看实体数据 | |||
/// <param name="keyValue">主键</param> | |||
@@ -331,7 +424,60 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
try | |||
{ | |||
this.BaseRepository().ExecuteBySql("update Sys_ReceiveFile set ReadFlag=1,ReadTime='" + DateTime.Now + "' where RFileId='" + keyValue + "'", null); | |||
//状态改为已读 | |||
string sql = "update Sys_ReceiveFile set ReadFlag=1,ReadTime='" + DateTime.Now + "' where RFileId='" + | |||
keyValue + "'"; | |||
this.BaseRepository().ExecuteBySql(sql, null); | |||
//判断当前公文是否已全部已读,如果全部已读,需要通知提醒下发人,加入消息提醒 | |||
//获取未读人数 | |||
var updSql = | |||
$"select count(1) from Sys_ReceiveFile where SFileId=(select SFileId from Sys_ReceiveFile where RFileId='{keyValue}')and ReadFlag = 0"; | |||
var dt = this.BaseRepository().FindTable(updSql); | |||
if (dt.Rows[0][0] != null && Convert.ToInt32(dt.Rows[0][0]) == 0) | |||
{ | |||
var entity = this.BaseRepository().FindEntity<Sys_ReceiveFileEntity>(keyValue); | |||
var receiveDocumentEntity = | |||
this.BaseRepository().FindEntity<Sys_ReceiveDocumentEntity>(entity.SFileId); | |||
var userInfo = this.BaseRepository().FindEntity<UserEntity>(entity.SenderId); | |||
MessageRemindEntity msgEntity = new MessageRemindEntity(); | |||
msgEntity.Create(); | |||
msgEntity.ReceiptId = entity.SenderId; | |||
msgEntity.ReceiptName = userInfo != null ? userInfo.F_RealName : ""; | |||
msgEntity.SenderId = entity.ReceiverId; | |||
msgEntity.SenderName = entity.Receiver; | |||
if (entity.STypeId == 3) | |||
{ | |||
msgEntity.TheTitle = "党政公文下发"; | |||
var sendFileEntity = | |||
this.BaseRepository().FindEntity<Sys_SendFileEntity>(entity.SFileId); | |||
msgEntity.TheContent = "【全部已阅】" + sendFileEntity.Title; | |||
msgEntity.InstanceId = sendFileEntity.SFileId; | |||
msgEntity.ConnectionUrl = "/EducationalAdministration/Sys_SendFile/ReadListParty?keyValue="; | |||
} | |||
else if (entity.STypeId == 4) | |||
{ | |||
msgEntity.TheTitle = "公文接收"; | |||
msgEntity.TheContent = "【全部已阅】" + receiveDocumentEntity.RTitle; | |||
msgEntity.InstanceId = receiveDocumentEntity.RID; | |||
msgEntity.ConnectionUrl = "/EducationalAdministration/Sys_ReceiveDocument/ReadList?keyValue="; | |||
} | |||
else if (entity.STypeId == 1) | |||
{ | |||
msgEntity.TheTitle = "行政公文下发"; | |||
var sendFileEntity = | |||
this.BaseRepository().FindEntity<Sys_SendFileEntity>(entity.SFileId); | |||
msgEntity.TheContent = "【全部已阅】" + sendFileEntity.Title; | |||
msgEntity.InstanceId = sendFileEntity.SFileId; | |||
msgEntity.ConnectionUrl = "/EducationalAdministration/Sys_SendFile/ReadList?keyValue="; | |||
} | |||
msgEntity.SendTime = DateTime.Now; | |||
msgEntity.ReadSigns = false; | |||
this.BaseRepository().Insert(msgEntity); | |||
} | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -450,6 +596,34 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
public string ZhuRenP() | |||
{ | |||
var loginUser = LoginUserInfo.Get(); | |||
var PeopleInTheSameDepartment = this.BaseRepository() | |||
.FindList<UserEntity>(a => a.F_DepartmentId == loginUser.departmentId); | |||
//从同一部门的人中找出主任 | |||
var roleEntity = this.BaseRepository().FindEntity<RoleEntity>(a => a.F_FullName == "中层干部正职"); | |||
var allZhuRen = new List<string>(); | |||
if (null != roleEntity) | |||
{ | |||
allZhuRen = this.BaseRepository() | |||
.FindList<UserRelationEntity>(a => a.F_ObjectId == roleEntity.F_RoleId).Select(a => a.F_UserId).ToList(); | |||
} | |||
var zhurenID = PeopleInTheSameDepartment.FirstOrDefault(a => allZhuRen.Contains(a.F_UserId))?.F_UserId; | |||
return zhurenID; | |||
} | |||
public string XiaoZhangP() | |||
{ | |||
var xiaozhangID = this.BaseRepository().FindEntity<UserEntity>(a => a.F_RealName.Contains("关亮"))?.F_UserId; | |||
return xiaozhangID; | |||
} | |||
/// <summary> | |||
/// 公文接收 下发指定接收人 | |||
/// </summary> | |||
@@ -460,12 +634,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
try | |||
{ | |||
//从‘查阅情况’ 列表中跳转 将发送情况改变 | |||
if (!string.IsNullOrEmpty(entity.RFileId)) | |||
{ | |||
var rEntity = db.FindEntity<Sys_ReceiveFileEntity>(a => a.RFileId == entity.RFileId); | |||
rEntity.SendStatus = true; | |||
db.Update(rEntity); | |||
} | |||
//if (!string.IsNullOrEmpty(entity.RFileId)) | |||
//{ | |||
// var rEntity = db.FindEntity<Sys_ReceiveFileEntity>(a => a.RFileId == entity.RFileId); | |||
// rEntity.SendStatus = true; | |||
// db.Update(rEntity); | |||
//} | |||
var Sys_ReceiveDocument = db.FindEntity<Sys_ReceiveDocumentEntity>(a => a.RID == entity.SFileId); | |||
var teacherlist = db.FindList<UserEntity>(a => entity.SpecifyReceiver.Contains(a.F_UserId)).ToList(); | |||
@@ -511,6 +685,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
Sys_ReceiveDocument.ReceiverId = stringBuilder.ToString().TrimEnd(','); | |||
Sys_ReceiveDocument.RSendFlag = "1"; | |||
db.Update(Sys_ReceiveDocument); | |||
db.Commit(); | |||
//读取信息推送管理-公文下发推送(02)的配置 | |||
@@ -592,5 +767,30 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
} | |||
public object GetInstructions(string keyValue) | |||
{ | |||
try | |||
{ | |||
var sendId = this.BaseRepository().FindEntity<Sys_ReceiveFileEntity>(a => a.RFileId == keyValue) | |||
?.SFileId; | |||
var data = this.BaseRepository().FindList<Sys_ReceiveFileEntity>(a => a.SFileId == sendId && a.SpecifyReceiver != null) | |||
.OrderBy(a => a.ReplyTime); | |||
return data; | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
} | |||
} |
@@ -41,6 +41,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
} | |||
public DataTable Execute(string sql) | |||
{ | |||
return sys_SendFileService.Execute(sql); | |||
} | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// <summary> | |||