<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="woekorderDCLedit.aspx.cs" Inherits="HySoft.BaseCallCenter.Web.workordermanage.workorder.woekorderDCLedit" %>

<!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/json2.js" type="text/javascript"></script>
    <script src="../../scripts/ui/js/core/base.js" type="text/javascript"></script>
    <script type="text/javascript" src="../../scripts/function.js"></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/ui/js/plugins/ligerLayout.js" type="text/javascript"></script>
    <script src="../../scripts/ui/js/plugins/ligerTree.js" type="text/javascript"></script>
    <script src="../../scripts/ui/js/plugins/ligerMenu.js" type="text/javascript"></script>
    <script src="../../scripts/ui/js/plugins/ligerTab.js" type="text/javascript"></script>
    <script src="../../scripts/ui/js/plugins/ligerDrag.js" type="text/javascript"></script>
    <script src="../../scripts/CustomersData.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" />
    <link href="../../scripts/ui/skins/ligerui-icons.css" rel="stylesheet" type="text/css" />
    <link href="../../images/style.css" rel="stylesheet" type="text/css" />
    <script src="../../scripts/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
    <script type="text/javascript">
        var gridlist;
        $(function () {
            InitList();
        });
        function CloseThis() {
            var dialog = frameElement.dialog;
            dialog.close();
        }

        function GetValue(id) {
            document.getElementById("hfSQDX").value = id;
            iframeDeal.window.SetValue(id);
        }

        function Close() {
            var dialog = frameElement.dialog;
            parent.InitList();
            dialog.close();
        }

        function InitList() {
            try {
                gridlist = $("#divDataList").ligerGrid({
                    height: 205,
                    width: '100%',
                    columns: [
                { display: '工单处理', name: '_f_name', align: 'left', width: '10%' },
                { display: '处理人', name: '_f_username', width: '12%' },
                {
                    display: '处理内容', name: '_f_remark', width: '40%', render: function (rowdata, rowindex) {
                        return "<div title='" + rowdata._f_remark + "'  onmouseover='title_show(this);'  onmouseout='title_back(this);'>" + rowdata._f_remark + "</div>";
                    }
                },
                { display: '处理时间', name: '_f_optdate', width: '24%', type: 'date', format: 'yyyy-MM-dd hh:mm:ss' },
                {
                    display: '耗时', name: '_f_elapsedtime', width: '12%', render: function (rowdata, rowindex) {
                        var value = rowdata._f_elapsedtime;
                        var s = value % 60 + "秒";
                        var m = ((value / 60).toFixed(0)) % 60 + "分";
                        var h = (value / 3600).toFixed(0) + "时";
                        return h + m + s;
                    }
                }
                    ],
                    url: '../ajax/CommonDataList.ashx?action=getlist&intenseid=' + document.getElementById('HDintenseid').value, pageSize: 10, rownumbers: true
                });
            }
            catch (e) {
                alert(e.Message);
            }
            gridlist.changePage('first');
            $("#pageloading").hide();
        }
        function OpenWindowShow(Url, Title, Width, Height) {
            $.ligerDialog.open({
                title: Title, url: Url, height: Height, width: Width, isResize: true, modal: true
            });
        }

        var title_value = "";
        function title_show(td) {
            var div = document.getElementById("title_show");
            title_value = td.title;
            div.style.left = (td.offsetLeft + 130) + "px";;
            var words_per_line = 40;  //每行字数
            var title = split_str(td.title, words_per_line); //按每行25个字显示标题内容。
            div.innerHTML = title;
            div.style.display = 'block';
            td.title = ''; 	//去掉原有title显示。
        }

        function split_str(string, words_per_line) {
            var output_string = string.substring(0, 1); //取出i=0时的字，避免for循环里换行时多次判断i是否为0
            for (var i = 1; i < string.length; i++) {
                if (i % words_per_line == 0) {
                    output_string += "<br/>";
                }
                output_string += string.substring(i, i + 1);
            }
            return output_string;
        }
        function title_back(td) {
            var div = document.getElementById("title_show");
            td.title = title_value;
            div.style.display = "none";
        }
        function call() {
            if (document.getElementById("F_REPAIRMANPHONE").value != "" && top.document.getElementById("lblAgentExt").innerHTML != "") {
                top.PhoneCallOutJD(1, document.getElementById("F_REPAIRMANPHONE").value, document.getElementById("HDworkorderid").value);
            }
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <div id="contentTab" style="float: left; width: 550px;">
            <asp:HiddenField ID="HDintenseid" runat="server" />
            <asp:HiddenField ID="HDworkorderid" runat="server" />
            <asp:HiddenField ID="hfSQDX" runat="server" />
            <div class="tab_con" style="display: block;" title="来电信息">
                <table class="form_table">
                    <tr>
                        <th>客户名称：
                        </th>
                        <td>
                            <asp:TextBox ID="F_CUSTOMERNAME" runat="server" CssClass="txtInput normal" ReadOnly="true" Style="width: 120px;"></asp:TextBox>
                        </td>
                        <%--<th>客户等级：
                        </th>
                        <td>
                            <asp:TextBox ID="F_CustomerClass" runat="server" CssClass="txtInput normal"
                                Style="width: 120px;" ReadOnly="true"></asp:TextBox>
                        </td>--%>
                        <th>所属部门：
                        </th>
                        <td>
                            <asp:TextBox ID="F_ServiceDept" runat="server" CssClass="txtInput normal" Style="width: 120px;" ReadOnly="true"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <th>系统开通时间：
                        </th>
                        <td>
                            <asp:TextBox ID="F_SystemStartTime" runat="server" CssClass="txtInput normal"
                                Style="width: 120px;" ReadOnly="true"></asp:TextBox>
                        </td>
                        <th>工单类型：
                        </th>
                        <td>
                            <asp:TextBox ID="F_TypeName" runat="server" CssClass="txtInput normal" Style="width: 120px;" ReadOnly="true"></asp:TextBox>
                        </td>
                    </tr>
                    <tr style="display: none;">
                        <th>客户属性：
                        </th>
                        <td>
                            <asp:TextBox ID="F_CustomerNature" runat="server" CssClass="txtInput normal" Style="width: 120px;" ReadOnly="true"></asp:TextBox>

                        </td>
                        <th>售后负责人：
                        </th>
                        <td>
                            <asp:TextBox ID="F_REPAIRLEVEL" runat="server" CssClass="txtInput normal"
                                Style="width: 120px;" ReadOnly="true"></asp:TextBox>
                        </td>
                    </tr>
                    <tr style="display: none;">
                        <th>客户编号：
                        </th>
                        <td>
                            <asp:TextBox ID="F_CUSTOMERID" runat="server" CssClass="txtInput normal" Style="width: 120px;" ReadOnly="true"></asp:TextBox>
                        </td>

                        <th>工单开始时间：
                        </th>
                        <td>
                            <asp:TextBox ID="F_CREATEDATE" runat="server" CssClass="txtInput normal"
                                Style="width: 120px;" ReadOnly="true"></asp:TextBox>
                        </td>
                    </tr>
                    <%--<tr>
                        <th>系统类型：
                        </th>
                        <td>
                            <asp:TextBox ID="F_SystemType" runat="server" CssClass="txtInput normal" Style="width: 120px;" ReadOnly="true"></asp:TextBox>
                        </td>
                        

                    </tr>--%>
                    <%--<tr>

                        <th>质保到期时间：
                        </th>
                        <td>
                            <asp:TextBox ID="F_QualityGuaranteeEndTime" runat="server" CssClass="txtInput normal"
                                Style="width: 120px;" ReadOnly="true"></asp:TextBox>
                        </td>
                        <th>报修级别：
                        </th>
                        <td>
                            <asp:TextBox ID="F_REPAIRLEVELNAME" runat="server" CssClass="txtInput normal"
                                Style="width: 120px;" ReadOnly="true"></asp:TextBox>
                        </td>
                    </tr>--%>
                    <tr style="display: none">
                        <th>是否形成知识：
                        </th>
                        <td>
                            <asp:TextBox ID="F_KNOWLEDGE" runat="server" CssClass="txtInput normal" Style="width: 120px;" ReadOnly="true"></asp:TextBox>
                        </td>

                        <th>是否已经形成知识：
                        </th>
                        <td>
                            <asp:TextBox ID="F_ALREADYKNOWLEDGE" runat="server" CssClass="txtInput normal"
                                Style="width: 120px;" ReadOnly="true"></asp:TextBox>
                        </td>
                    </tr>
                    <tr style="display: none">
                        <th>知识条目名称：
                        </th>
                        <td>
                            <asp:TextBox ID="F_KNOWLEDGENAME" runat="server" CssClass="txtInput normal" Style="width: 120px;" ReadOnly="true"></asp:TextBox>
                        </td>

                        <th>报修人性质：
                        </th>
                        <td>
                            <asp:TextBox ID="F_STANDARDADDRESS" runat="server" CssClass="txtInput normal"
                                Style="width: 120px;" ReadOnly="true"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <th>诉求人：

                        </th>

                        <td>
                            <asp:TextBox ID="F_REPAIRMANNAME" runat="server" CssClass="txtInput normal"
                                Style="width: 120px;" ReadOnly="true"></asp:TextBox>
                        </td>
                        <th>诉求人电话：
                        </th>
                        <td>
                            <asp:TextBox ID="F_REPAIRMANPHONE" runat="server" CssClass="txtInput normal"
                                Style="width: 120px;"></asp:TextBox><img onclick="call();" title="坐席可以点击直接拨打电话" src="../../images/seatimgs/tonghua.jpg" height="20px" />
                        </td>
                    </tr>
                    <tr>
                        <th style="position: relative;">诉求内容：
                        </th>
                        <td colspan="3">
                            <asp:TextBox ID="F_CONTENT" runat="server" CssClass="txtInput normal" TextMode="MultiLine"
                                Style="width: 370px; height: 120px;"></asp:TextBox>
                            <asp:Button ID="btnModify" class="btnSearch" runat="server" Text="保存"
                                OnClick="btnModify_Click" />
                            <%--onmouseover="title_show(this);"  onmouseout="title_back(this);"--%>
                        </td>

                    </tr>
                </table>
            </div>

            <div title="数据列表" style="display: block;">
                <div id='title_show'
                    style='position: absolute; display: none; border: solid 1px #999999; background: #edeef0; z-index: 444;'>
                </div>
                <div id="divDataList">
                </div>
            </div>
        </div>
        <div style="width: 235px; height: 600px; float: right;">
            <iframe id="iframeDeal" name="iframeDeal" runat="server" scrolling="no" frameborder="0" src="" style="height: 100%;"></iframe>
        </div>
    </form>
</body>
</html>
