| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155 |
- <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="worktimesset.aspx.cs" Inherits="HySoft.BaseCallCenter.Web.telmanage.worktimesset" %>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head id="Head1" runat="server">
- <title></title>
- <link href="../scripts/ui/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" />
- <script src="../scripts/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
- <script src="../scripts/ui/js/core/base.js" type="text/javascript"></script>
- <script src="../scripts/ui/js/ligerui.min.js" type="text/javascript"></script>
- <link href="../scripts/ui/skins/Tab/css/tab.css" rel="stylesheet" type="text/css" />
- <link href="../scripts/ui/skins/Tab/css/grid.css" rel="stylesheet" type="text/css" />
- <script src="../scripts/ui/js/plugins/ligerGrid.js" type="text/javascript"></script>
- <script src="../scripts/CustomersData.js" type="text/javascript"></script>
- <link href="../scripts/ui/skins/ligerui-icons.css" rel="stylesheet" type="text/css" />
- <link href="../images/style.css" rel="stylesheet" type="text/css" />
- <script type="text/javascript">
- function itemclick(item) {
- alert(item.text);
- }
- var singleClick;
- var gridlist;
- $(function () {
- LoadList();
- });
- function LoadList() {
- gridlist = $("#divDataList").ligerGrid({
- height: '100%',
- checkbox: true,
- columns: [
- { display: '工作开始时间', name: '_f_workstarttimes', minWidth: 60, type: 'date', format: 'hh:mm:ss' },
- { display: '工作结束时间', name: '_f_workendtimes', minWidth: 60, type: 'date', format: 'hh:mm:ss' },
- { display: '时间段名称', name: '_f_timename', minWidth: 60 },
- { display: '时间段备注', name: '_f_remark'}],
- url: 'ajax/workcalendarset.ashx?action=getTimeList&keyword=' + encodeURIComponent(document.getElementById("txtKeywords").value), pageSize: 10, rownumbers: true,
- onSelectRow: function (data, rowindex, rowobj) {
- singleClick = formatDateTime(data._f_workstarttimes);
- },
- onDblClickRow: function (data, rowindex, rowobj) {
- Edit('edit');
- },
- isChecked: function (rowdata) {
- if (findCheckedCustomer(formatDateTime(rowdata._f_workstarttimes)) == -1)
- return false;
- return true;
- },
- onCheckRow: function (checked, data) {
- if (checked) addCheckedCustomer(formatDateTime(data._f_workstarttimes));
- else removeCheckedCustomer(formatDateTime(data._f_workstarttimes));
- },
- onCheckAllRow: function (checked) {
- for (var rowid in this.records) {
- if (checked)
- addCheckedCustomer(formatDateTime(this.records[rowid]['_f_workstarttimes']));
- else
- removeCheckedCustomer(formatDateTime(this.records[rowid]['_f_workstarttimes']));
- }
- }
- });
- gridlist.changePage('first');
- $("#pageloading").hide();
- }
- function formatDateTime(value, rowData, rowIndex) {
- if (value != null) {
- var date = new Date(parseInt(value.replace("/Date(", "").replace(")/", ""), 10));
- var result = date.getFullYear() + "-" + (date.getMonth() + 1 < 10 ? "0"
- + (date.getMonth() + 1) : date.getMonth() + 1) + "-"
- + (date.getDate() < 10 ? "0" + date.getDate() : date.getDate()) + " "
- + (date.getHours() < 10 ? "0" + date.getHours() : date.getHours()) + ":"
- + (date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes()) + ":"
- + (date.getSeconds() < 10 ? "0" + date.getSeconds() : date.getSeconds());
- return result;
- }
- return value;
- }
- function deleteRow() {
- g.deleteSelectedRow();
- }
- var checkedCustomer = [];
- function findCheckedCustomer(_f_mobilenum) {
- for (var i = 0; i < checkedCustomer.length; i++) {
- if (checkedCustomer[i] == _f_mobilenum) return i;
- }
- return -1;
- }
- function addCheckedCustomer(_f_mobilenum) {
- if (findCheckedCustomer(_f_mobilenum) == -1)
- checkedCustomer.push(_f_mobilenum);
- }
- function removeCheckedCustomer(_f_mobilenum) {
- var i = findCheckedCustomer(_f_mobilenum);
- if (i == -1) return;
- checkedCustomer.splice(i, 1);
- }
- function Add(param) {
- $.ligerDialog.open({ url: 'worktimessetaddandedit.aspx?actionFlag=' + param, title: '添加上班时段', height: 350, width: 530, isResize: true
- });
- }
- function Edit(params) {
- if (singleClick == "" || singleClick == undefined) {
- $.ligerDialog.warn('请选择修改行!');
- } else {
- $.ligerDialog.open({ url: 'worktimessetaddandedit.aspx?actionFlag=' + params + '&singleFlage=' + singleClick, title: '修改上班时段', height: 350, width: 530, isResize: true
- });
- }
- }
- function DeleteList() {
- if (checkedCustomer.length <= 0) {
- $.ligerDialog.warn('请选择删除行!');
- } else {
- $.ligerDialog.confirm('确定要删除吗?', function (yes) {
- if (yes) {
- gridlist = $("#divDataList").ligerGrid({
- url: 'ajax/workcalendarset.ashx?action=deletelist&arrid=' + checkedCustomer.join(','), pageSize: 10, rownumbers: true
- });
- }
- LoadList();
- });
- }
- }
- document.onkeydown = function (event) {
- var e = event || window.event || arguments.callee.caller.arguments[0];
- if (e && e.keyCode == 13) {
- LoadList();
- }
- };
- </script>
- </head>
- <body style="margin: 0px; padding: 0px; overflow: hidden;">
- <form id="form1" runat="server">
- <div class="l-loading" style="display: block" id="pageloading">
- </div>
- <div class="tools_box">
- <div class="tools_bar">
- <a class="tools_btn" href="#" onclick="Add('add');"><span><b class="add">添加</b></span>
- </a><a class="tools_btn" href="#" onclick="Edit('edit');"><span><b class="modify">修改</b></span>
- </a><a class="tools_btn" href="#" onclick="DeleteList();"><span><b class="delete">批量删除</b></span>
- </a>
- <div class="search_box">
- 关键字:<asp:TextBox ID="txtKeywords" runat="server" CssClass="txtInput"></asp:TextBox>
- <input id="btnSearch" type="button" value="搜 索" class="btnSearch" onclick="LoadList();" />
- </div>
- </div>
- </div>
- <div id="divDataList">
- </div>
- </form>
- </body>
- </html>
|