<!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>
    <title></title>
    <link href="../../Content/Default/jquery-ui-1.8.10.custom.css" rel="stylesheet" type="text/css" />
    <link href="../../Content/Default/ui.jqgrid.css" rel="stylesheet" type="text/css" />
    <link href="../../Content/Default/combo.css" rel="stylesheet" type="text/css" />
    <link href="../../Content/Default/combobox.css" rel="stylesheet" type="text/css" />
    <link href="../../Content/style.css" rel="stylesheet" type="text/css" />
    <script src="../../Scripts/lib/jquery-1.4.4.min.js" type="text/javascript"></script>
    <script src="../../Scripts/lib/jquery-ui-1.8.10.custom.min.js" type="text/javascript"></script>
    <script src="../../Scripts/lib/grid.locale-cn.js" type="text/javascript"></script>
    <script src="../../Scripts/lib/jquery.jqGrid.min.js" type="text/javascript"></script>
    <script src="../../Scripts/lib/jquery.layoutpanel.js" type="text/javascript"></script>
    <script src="../../Scripts/lib/jquery.combo_ciho.js" type="text/javascript"></script>
    <script src="../../Scripts/lib/jquery.combobox.js" type="text/javascript"></script>
    <script src="../../Scripts/lib/jquery.autonum.min.js" type="text/javascript"></script>
    <script src="../../Scripts/msgBox.js" type="text/javascript"></script>
    <script src="../../Scripts/msg.js" type="text/javascript"></script>
    <script src="../../Scripts/common.js" type="text/javascript"></script>
    <script src="../../Scripts/07/p0701.js" type="text/javascript"></script>
    <script src="../../Scripts/07/p0702.js" type="text/javascript"></script>
    <script src="../../Scripts/07/p0703.js" type="text/javascript"></script>
    <script src="../../Scripts/06/p0609.js" type="text/javascript"></script>
    <script src="../../Scripts/07/psafe.js" type="text/javascript"></script>
    <script type="text/javascript">
        //var strCmbSel = 1;
        $(function () {
            //$(":input[name='filter']").combobox();

            ifrmResize();
            window.onresize = function () {
                ifrmResize();
	            //调整弹出窗口遮罩层的高度
	            $('.menu_dlg_shield').height(window.parent.document.documentElement.clientHeight - _iFrmHeight);
	            $('.menu_dlg_bg').css("height", window.parent.document.documentElement.clientHeight - _iFrmHeight); //调整弹出所属窗口层的高度
            }
            $("#idDiv_p0701 :input[name=filter]").combobox({ width: 40, panelHeight: 110, valueField: "value", textField: "text" });
            //$("#cmbSelArray", "#idDiv_psafe").combobox({ width: 60, panelHeight: 90 });
            addArrowClass();
            //要加载的下拉列表的数据
            arrDatas = [{ "value": 0, "text": 0 },
                        { "value": 1, "text": 1 },
                        { "value": 2, "text": 2 },
                        { "value": 3, "text": 3 },
                        { "value": 4, "text": 4}];

            $("#div_number").combobox("loadData", arrDatas);
            $("#div_percent").combobox("loadData", arrDatas);
            $("#div_money").combobox("loadData", arrDatas);

            //绑定数字控件
            $("#pageCount", "#idDiv_p0701").css("ime-mode", "disabled").autoNumeric({ mDec: 0, aSep: "" });

            setData();

            //公司信息
            var result = ParseData(window.external.DoOptions('Tgsxx', 'GetList', '{}'));
            var data = result.Records;
            if (data != "{}" && data.length != 0) {
                $("#a1", "#idDiv_p0609").val(data[0].a1);
                $("#a2", "#idDiv_p0609").val(data[0].a2);
                $("#a3", "#idDiv_p0609").val(data[0].a3);
                $("#a4", "#idDiv_p0609").val(data[0].a4);
                $("#a5", "#idDiv_p0609").val(data[0].a5);
            }

            //数据维护数据
            var objRet = ParseData(window.external.DoOptions('TXtsz', 'GetList', '{}'));
            var strData = objRet.Records;
            if (strData != "{}" && strData.length != 0) {
                for (var intI = 0; intI < strData.length; intI++) {
                    if (strData[intI].a2 == "IsBindMail") {
                        if (strData[intI].a3 != "" && strData[intI].a3 == "true") {
                            $("#bingEmailBtn", "#idDiv_p0703").val("取消绑定");
                            $("#BindLable", "#idDiv_p0703").html("<font color='green'>已绑定</font>");
                        }
                    }
                }
            }
        })
        function ifrmResize() {
            //IFrame高度 = 窗口高度 - menu高度 - 底部高度 - tab标签高度 - 按钮区域高度
            var iHeight = window.parent.document.documentElement.clientHeight;
            //            if (iHeight < _iHtStandard) {
            //                iHeight -= 26;
            //            }
            //iHeight = iHeight - _iHtAll;
            $("#idDiv_p0701").css("height", iHeight);
            $("#idDiv_p0702").css("height", iHeight);
            $("#idDiv_p0703").css("height", iHeight);
            $("#idDiv_p0609").css("height", iHeight);
            $("#idDiv_psafe").css("height", iHeight);
            $("#ifrmContent").css("height", iHeight);
        }
        function showIframe(strIfrmId) {
            //隐藏其他IFrame，显示本IFrame
            $("#idDiv_p0701").css("display", "none");
            $("#idDiv_p0702").css("display", "none");
            $("#idDiv_p0703").css("display", "none");
            $("#idDiv_p0609").css("display", "none");
            $("#idDiv_psafe").css("display", "none");
            //$("#idDiv_" + strIfrmId).attr("src", "../07/" + strIfrmId + ".html");
            $("#idDiv_" + strIfrmId).show();
            $(".operate").remove();
            //取消其他Li选中，设定本li选中
            $("#p0701").removeClass("active");
            $("#p0702").removeClass("active");
            $("#p0703").removeClass("active");
            $("#p0609").removeClass("active");
            $("#psafe").removeClass("active");
            $("#" + strIfrmId).addClass("active");
            if (strIfrmId == "p0702") {
                doData();
                //设定新增按钮的位置
                setAddBtnPostion();
            }
            if (strIfrmId == "p0701") {
                setData();
            }
            if (strIfrmId == "psafe") {
                var objRet = ParseData(window.external.DoOptions('TXtsz', 'GetList', '{}'));
                var data = objRet.Records;
                if (data != "{}" && data.length != 0) {
                    for (var i = 0; i < data.length; i++) {
                        if (data[i].a2 == "IsUsedInitDBPassWord") {
                            if (data[i].a3 == "false") {
                                $("#dataUnload", "#idDiv_psafe").attr("checked", false);
                                //$("#safeBtn", "#idDiv_psafe").attr("disabled", "disabled");
                                //$("#bindEmpwd", "#idDiv_psafe").html("<font color='red'>未设置</font>");
                            }
                            else {
                                $("#dataUnload", "#idDiv_psafe").attr("checked", true);
                                //$("#bindEmpwd", "#idDiv_psafe").html("<font color='green'>已设置</font>");
                            }
                        }
                        if (data[i].a2 == "InitDBPassWord") {
                            if (data[i].a3 != "") {
                                $("#safeBtn", "#idDiv_psafe").val("重置密码");
                                $("#bindEmpwd", "#idDiv_psafe").html("<font color='green'>已设置</font>");
                            }
                        }
                    }
                }
            }
        }       
    </script>
</head>
<body>
    <div class="title_bar">
        <div class="topi">
            <div class="column">
                <div id="added">
                </div>
                <div class="dedt">
                </div>
                <div class="clr">
                </div>
            </div>
            <div>
            </div>
        </div>
        <div class="clr">
        </div>
    </div>
    <div class="global">
        <ul class="global_sid">
            <li><a href="#" id="p0701" class="active" onclick="showIframe('p0701')">常规设置</a></li>
            <li><a href="#" id="p0702" onclick="showIframe('p0702')">操作员管理</a></li>
            <li><a href="#" id="p0703" onclick="showIframe('p0703')">数据维护</a></li>
            <li><a href="#" id="psafe" onclick="showIframe('psafe')">安全设置</a></li>
            <li><a href="#" id="p0609" onclick="showIframe('p0609')">公司信息</a></li>
        </ul>
        <div id="idDiv_p0701" class="global_con">
            <ul>
                <li class="con_h2">常规设置:</li>
                <li class="goll_inp">每页显示<input style="width: 50px;" type='text' name='pageCount'
                    id='pageCount' />行 </li>
                <!-- <li>
                    <input type='checkbox' name='showTip' id='showTip' /><label for="showTip">单据金额与付款金额不一致时提示用户</label>
                </li>-->
                <li class="bor"></li>
                <li class="con_h2">小数位数设置:</li>
                <li class="combo_bg">小数点位数（数&nbsp;&nbsp;&nbsp;量）：
                    <select name="filter" id='div_number' class='easyui-combobox' editable="false">
                        <!--
                        <option value='0'>0</option>
                        <option value='1'>1</option>
                        <option value='2'>2</option>
                        <option value='3'>3</option>
                        <option value='4'>4</option>-->
                    </select>
                </li>
                <li class="combo_bg">小数点位数（金&nbsp;&nbsp;&nbsp;额）：
                    <select name="filter" id='div_money' class='easyui-combobox' editable="false">
                        <!--                        <option value='0'>0</option>
                        <option value='1'>1</option>
                        <option value='2'>2</option>
                        <option value='3'>3</option>
                        <option value='4'>4</option>-->
                    </select>
                </li>
                <li class="combo_bg">小数点位数（百分比）：
                    <select name="filter" id='div_percent' class='easyui-combobox' editable="false">
                        <!--                        <option value='0'>0</option>
                        <option value='1'>1</option>
                        <option value='2'>2</option>
                        <option value='3'>3</option>
                        <option value='4'>4</option>-->
                    </select>
                </li>
                <li class="con_btn"><a href="#" onclick='saveData();return false;'>保存</a><a href="#"
                    onclick="reset()">恢复默认</a></li>
                <li class="bor"></li>
            </ul>
        </div>
        <!--操作员Start-->
        <div id="idDiv_p0702" class="global_con" style="display: none;">
            <div class="conTbl">
                <table id="TCzywh">
                </table>
            </div>
            <div class="czy" id='idDivAdd'>
                <a href="#" onclick="alterItemP0702(1)">新增</a></div>
        </div>
        <!--操作员End-->
        <!--数据备份Start-->
        <div id="idDiv_p0703" class="global_con" style="display: none;">
            <ul>
                <li class="con_h2">本地备份:</li>
                <li class="con_btn"><a href="#" onclick="StartSave()">备份到本地</a></li>
                <li class="bor"></li>
                <li class="con_h2">邮箱备份:</li>
                <li class="con_btn">&nbsp;&nbsp;&nbsp;&nbsp; 邮箱绑定&nbsp;&nbsp;<input type="button"
                    id="bingEmailBtn" name="bingEmailBtn" value="绑定" style="width: 60px;" onclick="BindEmail()" />
                    &nbsp;&nbsp;<span id="BindLable">&nbsp;&nbsp; <font color="red">未绑定</font></span>
                    <input style="display: none" type="button" id="zhData" value="" />
                    <input style="display: none" type="button" id="miMaData" value="" />
                </li>
                <li class="con_btn"><a href="#" id="btnToEm" onclick="startBindEmData();return false;">
                    发送</a></li>
                <li class="bor"></li>
                <li class="con_h2">数据恢复:</li>
                <li>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;<input type="file" id="exportPath"
                    name="exportPath" /></li>
                <li class="con_btn"><a href="#" onclick="startCopy();return false;">开始恢复</a></li>
                <li class="bor"></li>
                <li class="con_h2">系统初始化:</li>
                <li><font color="red">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;提示：系统初始化将清空所有数据</font></li>
                <li class="con_btn"><a href="#" onclick="updateEmpty()">初始化</a></li>
                <li class="bor"></li>
            </ul>
        </div>
        <!--数据备份End-->
        <!--安全设置-->
        <div id="idDiv_psafe" class="global_con" style="display: none;">
            <ul>
                <!-- <li class="con_h2">允许密码输入错误次数:</li>
                <li  class="combo_bg">
                    <input style=" background:none; width:24px; height:22px; border:none;" type="checkbox" id="errorLen" name="errorLen" value="" />&nbsp;&nbsp;最大次数&nbsp;&nbsp;
                    <select name="selArray" id='cmbSelArray' class='easyui-combobox' style="text-align: center;">
                        <option value='20'>20</option>
                        <option value='30'>30</option>
                        <option value='50'>50</option>
                        <option value='100'>100</option>
                    </select>
                </li>
                <li class="bor"></li>-->
                <li class="con_h2">数据销毁密码:</li>
                <li>
                    <input type="checkbox" id="dataUnload" name="dataUnload" value="" />&nbsp;&nbsp;数据销毁密码&nbsp;&nbsp;<input
                        type="button" id="safeBtn" style="width: 70px;" value="设置" onclick="updateSafe()" />
                    &nbsp;&nbsp;<span id="bindEmpwd">&nbsp;&nbsp; <font color="red">未设置</font></span></li>
                <li style="height: 56px; line-height: 26px;"><font color="red"><span>提示：启用登录框快速恢复出厂状态功能，
                    你需要设置一个清除密码，以后任何时候只要在登录框输入登录管理<br />
                    员用户名和清除密码后点击登录， 系统将删除所有录入数据恢复到出厂状态。请谨慎使用本功能，一旦删除数据<br />
                    将不能恢复.</span></font></li>
                <li class="bor"></li>
                <li class="con_btn"><a href="#" onclick="saveSafeInit();return false;">保存</a></li>
            </ul>
        </div>
        <!--安全设置End-->
        <div id="idDiv_p0609" class="global_con" style="display: none;">
            <ul>
                <!--<li class="con_h2">公司信息:</li>-->
                <li class="goll_inp">公司全称：<input type="text" id='a1' name='a1' maxlength="50" onkeypress="return checkValidate(event)"
                    onpaste="return validatePaste()" />
                </li>
                <li class="goll_inp">电&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;话：<input type="text"
                    id='a2' name='a2' maxlength="50" onkeypress="return checkValidate(event)" onpaste="return validatePaste()" />
                </li>
                <li class="goll_inp">税&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;号：<input type="text"
                    id='a3' name='a3' maxlength="50" onkeypress="return checkValidate(event)" onpaste="return validatePaste()" />
                </li>
                <li class="goll_inp">开&nbsp;&nbsp;户&nbsp;&nbsp; 行：<input type="text" id='a4' name="a4"
                    maxlength="50" onkeypress="return checkValidate(event)" onpaste="return validatePaste()" />
                </li>
                <li class="goll_inp">账&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;号：<input type="text"
                    id='a5' name="a5" maxlength="50" onkeypress="return checkValidate(event)" onpaste="return validatePaste()" />
                </li>
                <li class="con_btn"><a href="#" onclick='Save();return false;'>保存</a></li>
                <li class="bor"></li>
            </ul>
        </div>
    </div>
    <div id="divP0702">
    </div>
    <div id="divQxsz">
    </div>
    <div id="divEmail">
    </div>
    <div id="divEmptymm">
    </div>
    <div id="divForSafe">
    </div>
    <div id="divBindPC">
    </div>
</body>
</html>
