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

<!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 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 InitList() {
            try {
                gridlist = $("#divDataList").ligerGrid({
                    height: '100%',
                    columns: [
                { display: '操作', isSort: false, width: 100, render: function (rowdata, rowindex, value) {
                    var h = "";
                    if (!rowdata._editing) {
                        h += "<a href='javascript:ShowInfo(" + rowdata._f_workorderid + ")'>详情</a> ";
                    }
                    return h;
                }
                },
                { display: '状态', name: '_f_name', width: 80 },
                { display: '来电类型', name: '_f_typename', width: 80 },
                { display: '制单人', name: '_f_username', width: 80 },
                { display: '新建时间', name: '_f_createdate', width: 150, type: 'date', format: 'yyyy-MM-dd hh:mm:ss' },
                { display: 'Id', name: '_f_workorderid', hide: 'Id', width: 1 },
                { display: '工单记录编号', name: '_f_code', width: 140 },
                { display: '客户名称', name: '_f_customername', minWidth: 120 },
                { display: '来电人', name: '_f_repairmanname', width: 80 },
                { display: '来电人联系方式', name: '_f_repairmanphone', width: 120 },
                { display: '客户属性', name: '_f_customernature', width: 80 },
                { display: '系统类型', name: '_f_systemtype', width: 120 },
                { display: '客户归属部门', name: '_f_servicedept', width: 120 },
                { display: '质保到期时间', name: '_f_qualityguaranteeendtime', width: 150, type: 'date', format: 'yyyy-MM-dd hh:mm:ss' }
                ],
            url: 'ajax/historyserviceinfo.ashx?action=gethistoryservicelist&cid=' + document.getElementById("hiddCustomerId").value, pageSize: 5, rownumbers: true,
                    onDblClickRow: function (data, rowindex, rowobj) {
                        try {
                            ShowInfo(data._f_workorderid);
                        }
                        catch (e) {
                            alert(e.Message);
                        }
                    }
                });
            }
            catch (e) {
                alert(e.Message);
            }
            gridlist.changePage('first');
            $("#pageloading").hide();
        }

        function ShowInfo(id) {
            parent.OpenWindowShow('/workordermanage/workorder/workordershow.aspx?id=' + id, '查看工单详细');
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <asp:HiddenField ID="hiddCustomerId" runat="server" />
    <div id="divDataList">
    </div>
    </form>
</body>
</html>
