| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390 |
- <%@ Page Language="C#" AutoEventWireup="true" CodeFile="WorkTimeOverSet.aspx.cs"
- Inherits="Business_WorkTimeOverSet" %>
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head id="Head1" runat="server">
- <title>工单时间设置</title>
- <base target="_self" />
- <link href="../_common/styles/global.css" rel="stylesheet" type="text/css" />
- <link href="../_common/styles/dialogs.css" rel="stylesheet" type="text/css" />
- <link href="../_common/styles/select.css" rel="stylesheet" type="text/css" />
- <link href="../_common/styles/form.css" rel="stylesheet" type="text/css" />
- <link href="../_common/styles/controls.css" rel="stylesheet" type="text/css" />
- <link href="../_common/styles/nav.css" rel="stylesheet" type="text/css" />
- <link href="../_grid/grid.css" rel="stylesheet" type="text/css" />
- <link href="../_grid/AppGrid.css" rel="stylesheet" type="text/css" />
- <link href="../_common/styles/menu.css" rel="stylesheet" type="text/css" />
- <link href="../_common/styles/tabs.css" rel="stylesheet" type="text/css" />
- <script src="../_common/scripts/Global.js" type="text/javascript"></script>
- <script src="../_common/scripts/windowinformation.js" type="text/javascript"></script>
- <script src="../_common/scripts/Util.js" type="text/javascript"></script>
- <script src="../_grid/action.js" type="text/javascript"></script>
- <script src="../_javascripts/globalctrl.js" type="text/javascript"></script>
- <%-- <script src="../_common/scripts/calendar.js" type="text/javascript"></script>--%>
- <script src="../Scripts/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
- <script src="../_javascripts/JS/search.js" type="text/javascript"></script>
- <style type="text/css">
- .wbox
- {
- width: 100%;
- height: 100%;
- border: 1px solid #849bba;
- background: #FFF;
- padding: 1px;
- }
- .lbox
- {
- width: 100%;
- height: 100%;
- padding-bottom: 4px;
- padding-left: 4px;
- padding-right: 4px;
- background: #c6d4e4;
- }
- .tbox
- {
- height: 25px;
- color: #15428b;
- font-size: 14px;
- cursor: move;
- margin: 0px;
- padding: 0px;
- padding-left: 5px;
- line-height: 25px;
- overflow: hidden;
- }
- .tbox img
- {
- float: right;
- margin-right: 3px;
- margin-top: 5px;
- top: -28px;
- position: relative;
- }
- .nrbox
- {
- width: 100%;
- height: auto;
- border: 1px solid #849bba;
- background: #dfe8f6;
- margin: 0px auto;
- }
- .style1
- {
- height: 32px;
- }
- </style>
- <script language="javascript">
- var divmark = "";
- 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>";
- 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;\">";
- 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>";
- divmark += "<div id=\"divContent\" class=\"nrbox\"></div></div></div></div>";
- document.write(divmark);
- </script>
- <script language="javascript" type="text/javascript">
- function OpenMessage(strid, strtitle, strmessage, strwidth, btnstyle, _height) {
- var btnstr = "";
- switch (btnstyle) {
- case 0:
- btnstr = "<div style='padding-bottom:10px; text-align:center;'><button style='width: 65px;' onclick='MessageBoxClose();'>确 定</button></div>";
- break;
- case 1:
- btnstr = "<br /><div style='padding-bottom:15px; text-align:center;'><img alt='加载数据中' style='width:180px;' src='../_imgs/inprogress.gif'></div><br />";
- break;
- case 2:
- btnstr = "<div style='padding-bottom:10px; text-align:center;'><button style='width: 65px;' onclick='MessageBoxClose();pagination(1);'>确 定</button></div>";
- break;
- case 3:
- btnstr = "<div style='padding-bottom:10px; text-align:center;'><button style='width: 65px;' onclick='MessageBoxClose();LoadingData();'>确 定</button></div>";
- break;
- case 4:
- btnstr = "<div style='padding-bottom:10px; text-align:center;'><button style='width: 65px;' onclick='MessageBoxClose();DeleteOpt();'>确 定</button> <button style='width: 65px;' onclick='MessageBoxClose();'>取 消</button></div>";
- break;
- default:
- break;
- }
- if (_height != null) {
- strmessage = "<div style='padding:0px;'>" + strmessage + "</div>" + btnstr;
- document.getElementById("divMessageBox").style.height = _height;
- }
- else {
- strmessage = "<div style='padding:10px;'>" + strmessage + "</div>" + btnstr;
- document.getElementById("divMessageBox").style.height = 50;
- _height = 120;
- }
- document.getElementById("spanTitle").innerHTML = strtitle;
- document.getElementById("divContent").innerHTML = strmessage;
- document.getElementById("divMessageBox").style.width = strwidth;
- try {
- document.getElementById("divMessageBox").style.top = (document.body.clientHeight - _height) / 2;
- document.getElementById("divMessageBox").style.left = (document.body.clientWidth - strwidth) / 2;
- }
- catch (e)
- { }
- document.getElementById("divLock").style.display = "block";
- document.getElementById("divMessageBox").style.display = "block";
- }
- function OpenWindowPage(_title, _id, _width, _height, _url) {
- var html = "<iframe id='" + _id + "' src='" + _url + "' style='width:100%; height:" + _height + ";'></iframe>";
- OpenMessage(_id, _title, html, _width, -1, _height);
- }
- function MessageBoxClose() {
- document.getElementById("divLock").style.display = "none";
- document.getElementById("divMessageBox").style.display = "none";
- }
- function CloseWindowPage(type) {
- MessageBoxClose();
- }
- </script>
- <script type="text/javascript" language="javascript">
- var _searchitems; //查询条件:0当前页码,1每页数量2类型3级别4状态
- var pagesize = 20; //
- var strWhere;
- var pageIndex = 1;
- //初始化页面数据
- function Init() {
- pagination(1); //绑定数据
- }
- //重新绑定页码
- function pagination(index) {
- pageIndex = index;
- LoadingData();
- loadInfoBigType();
- }
- //获取查询条件
- function GetSearchItems() {
- _searchitems = new Array;
- _searchitems[0] = pageIndex;
- _searchitems[1] = pagesize;
- _searchitems[2] = Trim(document.getElementById("ddlInfoType").value);
- _searchitems[3] = Trim(document.getElementById("ddlBigType").value);
- _searchitems[4] = Trim(document.getElementById("ddlState").value);
- }
- //加载数据
- function LoadingData() {
- GetSearchItems();
- try {
- OpenMessage('framemessage', '加载数据', '正在读取数据...', 220, 1);
- Business_WorkTimeOverSet.LoadingData(_searchitems, DataBand_callback);
- }
- catch (e) { }
- }
- //加载数据
- function DataBand_callback(res) {
- document.getElementById("divDataItems").innerHTML = res.value;
- res = null;
- MessageBoxClose()
- }
- // function GetStrValue(strid) {
- // document.getElementById("trList").style.height = "50%";
- // document.getElementById("trShow").style.height = "50%";
- // document.getElementById("ifShow").src = "WorkOrderInfo.aspx?id=" + escape(strid); //获取工单编号
- // }
- function OptEdit(otype) {
- switch (otype) {
- case 'addvalue':
- if (document.getElementById("mnuNewDict").disabled != true) {
- OpenWindowPage('工单时间设置-添加', 'framemessage', 500, 300, 'WorkTimeOverSetEdit.aspx?otype=new');
- }
- break;
- case 'editvalue':
- if (document.getElementById("mnuEditDict").disabled != true) {
- var oTr = getSelectedOTr("crmGrid", getSelected("crmGrid")[0]);
- if (oTr) {
- OpenWindowPage('工单时间设置-修改', 'editvalue', 500, 300, 'WorkTimeOverSetEdit.aspx?otype=modify' + '&id=' + oTr.oid);
- } else {
- OpenMessage('framemessage', '提示', '请选择需要修改的选项', 220, 0);
- }
- }
- break;
- case 'deletevalue':
- if ((document.getElementById("mnuDeleteDict").getAttribute("disabled")) != true) {
- var oTr = getSelectedOTr("crmGrid", getSelected("crmGrid")[0]);
- if (oTr) {
- DeleteData();
- } else {
- OpenMessage('framemessage', '提示', '请选择要删除的选项', 220, 0);
- }
- }
- break;
- case 'showInfo':
- if ((document.getElementById("mnuEditDict").getAttribute("disabled")) != true) {
- var oTr = getSelectedOTr("crmGrid", getSelected("crmGrid")[0]);
- if (oTr) {
- OpenWindowPage('查看信息', 'editvalue', 950, 350, 'KnowledgeView.aspx?id=' + oTr.oid);
- }
- }
- break;
- }
- }
- function DeleteData() {
- OpenMessage('framemessage', '删除', '确定要删除列表中选择的项吗?', 250, 4);
- }
- function DeleteOpt() {
- try {
- OpenMessage('framemessage', '删除', '正在删除数据...', 220, 1);
- Business_WorkTimeOverSet.DeleteOpt(getSelected("crmGrid"), DeleteOpt_callback);
- }
- catch (e) {
- OpenMessage('framemessage', '删除', e.message, 220, 0);
- }
- finally {
- }
- }
- function DeleteOpt_callback(res) {
- var r = res.value;
- if (r == "success") {
- LoadingData();
- OpenMessage('framemessage', '删除', '删除成功', 220, 0);
- }
- else {
- OpenMessage('framemessage', '删除', '删除失败', 220, 0);
- }
- }
-
- //加载业务大类
- function loadInfoBigType() {
-
- document.getElementById("ddlBigType").options.length = 0;
- document.getElementById("ddlBigType").options.add(new Option("--全部--", ""));
- var dt = Business_WorkTimeOverSet.BindInfoType(document.getElementById("ddlInfoType").value).value;
- if (dt != null) {
- if (dt != undefined) {
- for (var i = 0; i < dt.Rows.length; i++) {
- document.getElementById("ddlBigType").options.add(new Option(dt.Rows[i]["TypeName"], dt.Rows[i]["TypeId"]));
- }
- }
- }
-
- }
- </script>
- </head>
- <body onload="Init();">
- <form id="form1" runat="server">
- <table class="stdTable" cellspacing="0" cellpadding="0" style="width: 100%;">
- <tbody>
- <tr height="24">
- <td>
- <table cellspacing="0" cellpadding="0" width="100%">
- <tbody>
- <tr>
- <td>
- <table class="actionBar" id="mnuBar1" cellspacing="0" cellpadding="0">
- <tbody>
- <tr>
- <td class="icMenu" nowrap align="left">
- <span class="menu" id="mnuNewDict" runat="server" title="添加值"
- style="padding-right: 5px; padding-left: 4px; padding-bottom: 0px; padding-top: 3px"
- onclick="OptEdit('addvalue');" tabindex="0" action="OptEdit('addvalue');" pr="5"
- pl="4">
- <div class="mnuBtn">
- <img class="mnuBtn" src="../_imgs/18_addView.gif"> 添加</div>
- </span>
- <img src="../_imgs/mnu_hSpacerGrid.gif"> <span class="menu" id="mnuEditDict"
- title="修改值" runat="server" style="padding-right: 5px; padding-left: 4px; padding-bottom: 0px;
- padding-top: 3px;" onclick="OptEdit('editvalue');" tabindex="0" action="OptEdit('editvalue');"
- pr="5" pl="4">
- <div class="mnuBtn">
- <img class="mnuBtn" src="../_imgs/ico_18_4207.gif"> 修改</div>
- </span> <img src="../_imgs/mnu_hSpacerGrid.gif"> <span class="menu" id="mnuDeleteDict"
- title="删除值" runat="server" style="padding-right: 3px; padding-left: 3px; padding-bottom: 0px;
- padding-top: 3px" onclick="OptEdit('deletevalue');" tabindex="0" action="OptEdit('deletevalue');"
- pr="3" pl="3">
- <div class="mnuBtn">
- <img class="mnuBtn" src="../_imgs/ico/ico_16_delete.gif"> 删除</div>
- </span>
- </td>
- <td>
- <table class="stdTable">
- <tbody>
- <tr>
- <td class="mnuTitle mnuRight">
- <nobr class="mnuTitle" id="mnuTitle">
- </nobr>
- </td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- <tr>
- <td>
- <table width="100%">
- <tr>
- <td align="right">
- 业务类型 :
- </td>
- <td align="left">
- <asp:DropDownList ID="ddlInfoType" runat="server" CssClass="selectBox" Width="120px" onchange="loadInfoBigType()">
- </asp:DropDownList>
- </td>
- <td align="right">
- 业务类别 :
- </td>
- <td align="left">
- <asp:DropDownList ID="ddlBigType" runat="server" CssClass="selectBox" Width="120px">
- </asp:DropDownList>
- </td>
- <td align="right">
- 工单状态 :
- </td>
- <td align="left">
- <asp:DropDownList ID="ddlState" runat="server" CssClass="selectBox" Width="120px">
- </asp:DropDownList>
- </td>
-
- <td>
- <input type="button" class="btn" style="width: 65px" value="查询" onclick="LoadingData();" />
- </td>
- </tr>
- </table>
- </td>
- </tr>
- <tr height="100%">
- <td>
- <div id="divDataItems" style="background-color: White; width: 100%; height: 100%;
- overflow: auto">
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- </form>
- </body>
- </html>
|