Açıklama Yok

workcalendarset.aspx 13KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238
  1. <%@ Page Language="C#" AutoEventWireup="true" CodeFile="workcalendarset.aspx.cs"
  2. Inherits="SysSettings_workcalendarset" %>
  3. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4. <html xmlns="http://www.w3.org/1999/xhtml">
  5. <head id="Head1" runat="server">
  6. <title></title>
  7. <link href="../scripts/ui/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" />
  8. <link href="../_css/messagebox.css" rel="stylesheet" type="text/css" />
  9. <script src="../Scripts/ui/js/jquery-1.3.2.min.js" type="text/javascript"></script>
  10. <script src="../scripts/ui/js/core/base.js" type="text/javascript"></script>
  11. <script src="../scripts/ui/js/ligerui.min.js" type="text/javascript"></script>
  12. <link href="../scripts/ui/skins/Tab/css/tab.css" rel="stylesheet" type="text/css" />
  13. <link href="../scripts/ui/skins/Tab/css/grid.css" rel="stylesheet" type="text/css" />
  14. <script src="../scripts/ui/js/plugins/ligerGrid.js" type="text/javascript"></script>
  15. <link href="../scripts/ui/skins/ligerui-icons.css" rel="stylesheet" type="text/css" />
  16. <link href="../images/style.css" rel="stylesheet" type="text/css" />
  17. <script src="../Scripts/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
  18. <script src="../_javascripts/globalctrl.js" type="text/javascript"></script>
  19. <script type="text/javascript">
  20. $(function() {
  21. LoadList();
  22. });
  23. function LoadList() {
  24. try {
  25. $.ajax({
  26. type: 'get',
  27. url: '/HttpHandel/CommonHelp.ashx?action=getcalendarlist&strdate=' + document.getElementById("txtYear").value + "-" + document.getElementById("txtMonth").value + "-01",
  28. data: { userid: '' },
  29. dataType: 'html',
  30. async: false,
  31. cache: false,
  32. success: function(res) {
  33. document.getElementById("divDataItems").innerHTML = res;
  34. $("#pageloading").hide();
  35. }
  36. });
  37. }
  38. catch (e) {
  39. alert(e.Message);
  40. }
  41. }
  42. function changeState(e) {
  43. $.ligerDialog.confirm('确定修改[' + e.id + ']的工作日设置吗?', function(yes) {
  44. if (yes) {
  45. $.ajax({
  46. type: "post",
  47. url: "/HttpHandel/CommonHelp.ashx?action=changworkingday&dateid=" + e.id,
  48. async: true,
  49. cache: false,
  50. success: function(data, states) {
  51. if (states == "success") {
  52. if (data == "True") {
  53. if (e.color == "#000000" || e.color == "black" || e.color == "Black") {
  54. e.color = "red";
  55. }
  56. else {
  57. e.color = "black";
  58. }
  59. }
  60. }
  61. }
  62. });
  63. }
  64. });
  65. }
  66. function PreYear() {
  67. var year = document.getElementById("txtYear").value;
  68. document.getElementById("txtYear").value = parseInt(year) - 1;
  69. LoadList();
  70. }
  71. function NextYear() {
  72. var year = document.getElementById("txtYear").value;
  73. document.getElementById("txtYear").value = parseInt(year) + 1;
  74. LoadList();
  75. }
  76. function PreMonth() {
  77. var year = document.getElementById("txtYear").value;
  78. var month = document.getElementById("txtMonth").value;
  79. document.getElementById("txtMonth").value = parseInt(month) - 1;
  80. if (parseInt(document.getElementById("txtMonth").value) < 1) {
  81. document.getElementById("txtMonth").value = 12;
  82. document.getElementById("txtYear").value = parseInt(year) - 1;
  83. }
  84. LoadList();
  85. }
  86. function NextMonth() {
  87. var year = document.getElementById("txtYear").value;
  88. var month = document.getElementById("txtMonth").value;
  89. document.getElementById("txtMonth").value = parseInt(month) + 1;
  90. if (parseInt(document.getElementById("txtMonth").value) > 12) {
  91. document.getElementById("txtMonth").value = parseInt(document.getElementById("txtMonth").value) % 12;
  92. document.getElementById("txtYear").value = parseInt(year) + 1;
  93. }
  94. LoadList();
  95. }
  96. function NextMonth1() {
  97. var strdate = document.getElementById("txtYear").value + "-" + document.getElementById("txtMonth").value + "-01";
  98. LoadList();
  99. }
  100. </script>
  101. <script type="text/javascript">
  102. var divmark = "";
  103. divmark += "<div id=\"divLock\" style=\"z-index:1;background-color:#AAA;filter:alpha(opacity=50);position: absolute;width:expression(this.parentNode.scrollWidth);top:expression(this.parentNode.scrollTop); left:0; height:100%;right:0; bottom:0; display:none;\"></div>";
  104. divmark += "<div id=\"divMessageBox\" onmousedown=\"MM_dragLayer('divMessageBox','',0,0,0,0,true,false,-1,-1,-1,-1,false,false,0,'',false,'')\" style=\"display:none;position: absolute;top:expression(this.parentNode.scrollHeight/2-100);left:expression(this.parentNode.scrollWidth/2-100);z-index:2;\">";
  105. divmark += "<div class=\"wbox\"><div class=\"lbox\"><h1 class=\"tbox\"><span id=\"spanTitle\"></span><img src=\"../_images/dialogclose.gif\" style=\"cursor:hand;\" onclick=\"MessageBoxClose();\" /></h1>";
  106. divmark += "<div id=\"divContent\" class=\"nrbox\"></div></div></div></div>";
  107. document.write(divmark);
  108. function OpenMessage(strid, strtitle, strmessage, strwidth, btnstyle, _height, _top) {
  109. var btnstr = "";
  110. switch (btnstyle) {
  111. case 0:
  112. btnstr = "<div style='padding-bottom:10px; text-align:center;'><button style='width: 65px;' onclick='MessageBoxClose();'>确 定</button></div>";
  113. break;
  114. case 1:
  115. btnstr = "<br /><div style='padding-bottom:15px; text-align:center;'><img alt='加载数据中' style='width:180px;' src='../_imgs/inprogress.gif'></div><br />";
  116. break;
  117. case 2:
  118. btnstr = "<div style='padding-bottom:10px; text-align:center;'><button style='width: 65px;' onclick='MessageBoxClose();pagination(1);'>确 定</button></div>";
  119. break;
  120. case 3:
  121. btnstr = "<div style='padding-bottom:10px; text-align:center;'><button style='width: 65px;' onclick='MessageBoxClose();LoadingData();'>确 定</button></div>";
  122. break;
  123. case 4:
  124. btnstr = "<div style='padding-bottom:10px; text-align:center;'><button style='width: 65px;' onclick='MessageBoxClose();DeleteOpt();'>确 定</button>&nbsp;&nbsp;&nbsp;&nbsp;<button style='width: 65px;' onclick='MessageBoxClose();'>取 消</button></div>";
  125. break;
  126. case 5:
  127. btnstr = "<div style='padding-bottom:10px; text-align:center;'><button style='width: 65px;' onclick='MessageBoxClose();ReloadData();'>确 定</button></div>";
  128. break;
  129. case 6:
  130. btnstr = "<div style='padding-bottom:10px; text-align:center;'><button style='width: 65px;' onclick='MessageBoxClose();DeleteDictOpt();'>确 定</button>&nbsp;&nbsp;&nbsp;&nbsp;<button style='width: 65px;' onclick='MessageBoxClose();'>取 消</button></div>";
  131. break;
  132. case 7:
  133. btnstr = "<div style='padding-bottom:10px; text-align:center;'><button style='width: 65px;' onclick='MessageBoxClose();SaveClose();'>确 定</button></div>";
  134. break;
  135. default:
  136. break;
  137. }
  138. if (_height != null) {
  139. strmessage = "<div style='padding:0px;'>" + strmessage + "</div>" + btnstr;
  140. document.getElementById("divMessageBox").style.height = _height;
  141. }
  142. else {
  143. strmessage = "<div style='padding:10px;'>" + strmessage + "</div>" + btnstr;
  144. document.getElementById("divMessageBox").style.height = 50;
  145. _height = 120;
  146. }
  147. document.getElementById("spanTitle").innerHTML = strtitle;
  148. document.getElementById("divContent").innerHTML = strmessage;
  149. document.getElementById("divMessageBox").style.width = strwidth;
  150. try {
  151. if (_top != null) {
  152. document.getElementById("divMessageBox").style.top = (document.body.clientHeight - _height) / 2 + _top;
  153. }
  154. else {
  155. document.getElementById("divMessageBox").style.top = (document.body.clientHeight - _height) / 2;
  156. if (_height > 350) {
  157. document.getElementById("divMessageBox").style.top = 5;
  158. }
  159. }
  160. document.getElementById("divMessageBox").style.left = (document.body.clientWidth - strwidth) / 2;
  161. }
  162. catch (e)
  163. { }
  164. document.getElementById("divLock").style.display = "block";
  165. document.getElementById("divMessageBox").style.display = "block";
  166. }
  167. function OpenWindowPage(_title, _id, _width, _height, _url) {
  168. var html = "<iframe id='" + _id + "' src='" + _url + "' style='width:100%; height:" + _height + ";'></iframe>";
  169. OpenMessage(_id, _title, html, _width, -1, _height);
  170. }
  171. function OpenWindowPage(_title, _id, _width, _height, _url, _top) {
  172. var html = "<iframe id='" + _id + "' src='" + _url + "' style='width:100%; height:" + _height + ";'></iframe>";
  173. OpenMessage(_id, _title, html, _width, -1, _height, _top);
  174. }
  175. function MessageBoxClose() {
  176. document.getElementById("divLock").style.display = "none";
  177. document.getElementById("divMessageBox").style.display = "none";
  178. document.getElementById("divContent").innerHTML = "";
  179. }
  180. function CloseWindowPage(type) {
  181. MessageBoxClose();
  182. }
  183. </script>
  184. </head>
  185. <body style="margin: 0px; padding: 0px; overflow: hidden;">
  186. <form id="form1" runat="server">
  187. <div class="l-loading" style="display: block" id="pageloading">
  188. </div>
  189. <div class="tools_box">
  190. <div class="tools_bar">
  191. <div style="width: 100%; text-align: center; padding-top: 8px; color: Red; font-size: 16px;">
  192. 红色的为非工作日,点击日期对日期进行设置</div>
  193. </div>
  194. </div>
  195. <div style="width: 100%; border: solid 1px #cccccc; height: 38px; padding-top: 10px;
  196. text-align: center;">
  197. <img src="../images/page_FL1.gif" style="cursor: pointer;" onclick="PreYear();" alt="上一年"
  198. title="上一年" />&nbsp;&nbsp;<img src="../images/page_L1.gif" onclick="PreMonth()" style="cursor: pointer;"
  199. alt="上一月" title="上一月" />&nbsp;&nbsp;<asp:TextBox ID="txtYear" runat="server" CssClass="txtInput"
  200. Width="50px" ReadOnly="true"></asp:TextBox>&nbsp;-&nbsp;<asp:TextBox ID="txtMonth"
  201. runat="server" CssClass="txtInput" Width="50px" ReadOnly="true"></asp:TextBox>&nbsp;<img
  202. src="../images/page_R1.gif" onclick="NextMonth();" style="cursor: pointer;" alt="下一月"
  203. title="下一月" />&nbsp;&nbsp;<img src="../images/page_LL1.gif" onclick="NextYear();"
  204. style="cursor: pointer;" alt="下一年" title="下一年" />
  205. </div>
  206. <div id="divDataItems" style="width: 100%;">
  207. </div>
  208. <div id="divTimes" style="width: 100%; border: solid 1px #cccccc; height: 120px; padding-top: 10px;
  209. text-align: center;">
  210. <span style="font-size:14px; display:inline-block; line-height:35px; height:35px;">
  211. 上午:<asp:TextBox ID="txtAMSTime" runat="server" CssClass="txt Wdate" Style="width: 200px;" onclick="WdatePicker({el:'txtAMSTime',dateFmt:'HH:mm'})"></asp:TextBox>
  212. &nbsp;&nbsp;-&nbsp;&nbsp;
  213. <asp:TextBox ID="txtAMETime" runat="server" CssClass="txt Wdate" Style="width: 200px;" onclick="WdatePicker({el:'txtAMETime',dateFmt:'HH:mm'})"></asp:TextBox>
  214. </span>
  215. <br />
  216. <span style="font-size:14px; display:inline-block; line-height:35px; height:35px;">
  217. 下午:<asp:TextBox ID="txtPMSTime" runat="server" CssClass="txt Wdate" Style="width: 200px;" onclick="WdatePicker({el:'txtPMSTime',dateFmt:'HH:mm'})"></asp:TextBox>
  218. &nbsp;&nbsp;-&nbsp;&nbsp;
  219. <asp:TextBox ID="txtPMETime" runat="server" CssClass="txt Wdate" Style="width: 200px;" onclick="WdatePicker({el:'txtPMETime',dateFmt:'HH:mm'})"></asp:TextBox>
  220. </span>
  221. <br />
  222. <span style="font-size:14px; display:inline-block; line-height:35px; height:35px;">
  223. <asp:Button ID="btnSave" runat="server" Text="保存" CssClass="btn" Style="width: 80px; height: 23px;" OnClick="btnSave_Click" /></span>
  224. </div>
  225. </form>
  226. </body>
  227. </html>