You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

275 lines
9.8 KiB
Plaintext

2 months ago
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UserWork.aspx.cs" Inherits="TradeManage.UserWork" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link rel="stylesheet" type="text/css" href="themes/default/easyui.css" />
<link rel="stylesheet" type="text/css" href="themes/icon.css" />
<link rel="stylesheet" type="text/css" href="themes/New.css" />
<link rel="stylesheet" type="text/css" href="themes/DataGrid.css" />
<link rel="stylesheet" type="text/css" href="Scripts/fancybox/jquery.fancybox-1.3.4.css" />
<script src="Scripts/MicrosoftAjax.js" type="text/javascript"></script>
<script src="Scripts/jquery.min.js" type="text/javascript"></script>
<script src="Scripts/jquery.easyui.min.js" type="text/javascript"></script>
<script src="Scripts/DataGrid.js" type="text/javascript"></script>
<script src="Scripts/DataPager.js" type="text/javascript"></script>
<script src="Scripts/jquery.bgiframe.min.js" type="text/javascript"></script>
<script src="Scripts/Global.js" type="text/javascript"></script>
<script src="Scripts/WindowLoad.js" type="text/javascript"></script>
<script src="Scripts/DatePicker/WdatePicker.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="Scripts/fancybox2.1/source/jquery.fancybox.css?v=2.1.5"
media="screen" />
<script type="text/javascript" src="Scripts/fancybox2.1/lib/jquery.mousewheel-3.0.6.pack.js"></script>
<script type="text/javascript" src="Scripts/fancybox2.1/source/jquery.fancybox.js?v=2.1.5"></script>
<script type="text/javascript">
var WindowLoadModel = new WindowLoad();
var UId = 0;
$(document).ready(function () {
WindowLoadModel.ApplicationPath = "../";
WindowLoadModel.ControlID = "WindowLoad";
WindowLoadModel.Isbgiframe = true;
WindowLoadModel.Load();
ajaxInit(WindowLoadModel);
BindDept();
ReadData();
$("#select_listDept").bind("change", function () {
ReadData();
});
$("#btn_work").bind("click", function () {
window.location.href = "SysManage/JC_UserWork.aspx";
});
$("#chk_ds").bind("click", function () {
if ($("#chk_ds").is(":checked") == true)
{
$("#txt_InDate").show();
}
else
{
$("#txt_InDate").hide();
}
});
});
function fopen(uid,name) {
UId = uid;
$("#a_name").html(name);
$.fancybox({
'width': '40%',
'height': '40%',
'autoScale': false,
'transitionIn': 'elastic',
'transitionOut': 'elastic',
'href': '#test',
'onComplete': function () {
}
});
}
//#region 读取部门
function BindDept() {
$('#select_listDept').append("<option value='0'>全部</option>");
var param = new Object();
param.CompanyID =0;
$.ajax({
url: "UserService.asmx/GetListDept",
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
async: false,
success: function (data) {
$(data.d).each(function () {
$('#select_listDept').append("<option value='" + this.ID + "'>" + this.Name + "</option>");
});
}
});
}
//#endregion
//#region 读取数据
function ReadData() {
var param = new Object();
param.DeptId = $("#select_listDept").val();
WindowLoadModel.Show();
$.ajax({
url: "UserService.asmx/GetListWork",
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
success: function (data) {
WindowLoadModel.Hide();
if (data.d != null)
{
var DId = 0;
var shtml = new Sys.StringBuilder();
$(data.d).each(function () {
if (this.DeptId != DId)
{
shtml.append("<tr><td colspan='5' style='background-color: gray;font-size:larger'>" + this.DeptName + "</td></tr>");
}
var phone = '';
if (this.Mobile1 != "")
phone += "手机:" + this.Mobile1+"<Br/>";
if (this.QQ != "")
phone += "QQ" + this.QQ + "<Br/>";
if (this.Email!= "")
phone += "Email" + this.Email;
DId = this.DeptId;
var ns = this.NowState;
if (this.NowState == "请假")
{
ns = "<font color='red'>请假" + this.LeaveTime + "</font>";
}
shtml.append("<tr><td width='120px' class='f1'><a onclick='fopen(" + this.UserId + ",\"" + this.Name + "\")' style='cursor: pointer; text-decoration: underline; color: blue;'>" + this.Name + "</a></td><td width='180px'>" + phone + "</td><td width='120px' class='f1'>" + this.Duty + "</td><td width='150px' class='f1'>当前状态【" + ns + "】</td><td>" + this.WorkDesc + "</td></tr>");
});
$("#tb1").html(shtml.toString());
}
}
});
}
//#endregion
var UId = 0;
//#region 保存
function save() {
if ($("#txt_content").val() == "") {
alert("请输入内容");
$("#txt_content").focus();
return;
}
if ($("#chk_ds").is(":checked") == true && $("#txt_InDate").val() == "")
{
alert("请输入定时提醒时间");
$("#txt_InDate").focus();
return;
}
var param = new Object();
param.UserId = UId;
param.Content = $("#txt_content").val();
if ($("#chk_ds").is(":checked") == false)
param.InDate = null;
else
param.InDate = $("#txt_InDate").val();
WindowLoadModel.Show();
$.ajax({
url: "BaseData.asmx/SaveOpenMess",
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
success: function (data) {
WindowLoadModel.Hide();
alert("发送成功");
$.fancybox.close();
}
});
}
//#endregion
</script>
</head>
<body class="headbody">
<div class="title_ico">
用户信息
</div>
<div style="display: none">
<div id="test" title="信息" style="width: 550px; height: 320px;">
<table width="95%" class="tableAll" border="1" ellspacing="0" cellpadding="2">
<tr>
<td class="f1">接收人:
</td>
<td align="left">
<a id="a_name"></a>
</td>
</tr>
<tr>
<td style="width: 100px;" class="f1">
<font color="red" style="font-weight: bolder">*</font>内容:
</td>
<td align="left">
<textarea id="txt_content" cols="100" rows="8" style="width: 98%"></textarea>
</td>
</tr>
<tr>
<td style="width: 100px;" class="f1">
</td>
<td align="left"> <input id="chk_ds" type="checkbox"/>定时提醒<input id="txt_InDate" type="text" style="width:200px;display:none" class="editTextbox" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm'})" />
</td>
</tr>
<tr>
<td align="center" colspan="2"><input type="button" class="btnClass btnClassSave" value="发送消息" onclick="save();"/>
</td>
</tr>
</table>
</div>
</div>
<table class="tableAll" style="width: 100%;">
<colgroup>
<col style="width: 80px;" />
<col />
</colgroup>
<tr>
<td colspan="5">
<font color="red">注:未安排工作的请部门负责人在人员工作安排下面填写工作分工</font> <input id="btn_work" type="button" class="btnClass btnClassEdit" value="填写工作" /></td>
</tr>
<tr>
<td class="f1">部门
</td>
<td>
<select id="select_listDept" class="selectClass" style="width: 200px;"></select>
<font color="red">注:点击姓名可以给其发消息提醒</font>
</td>
</tr>
<tr>
<td valign="top" colspan="2" >
<div id="div">
<table class="tableAll" style="width: 90%;" id="tb1">
</table>
</div>
</td>
</tr>
</table>
</body>
</html>