• 前台界面2


    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CustomerInformationHandUpdate.aspx.cs" Inherits="CRM.UI.CustomerInformationHandUpdate" %>

    <!DOCTYPE html>

    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
    <link rel="stylesheet" type="text/css" href="/assets/easyui/themes/icon.css" />
    <link rel="stylesheet" type="text/css" href="/assets/easyui/demo/demo.css" />
    <link rel="stylesheet" type="text/css" href="/assets/easyui/themes/color.css" />
    <link rel="stylesheet" type="text/css" href="/assets/easyui/themes/default/easyui.css" />
    <script type="text/javascript" src="/assets/easyui/jquery.min.js"></script>
    <script type="text/javascript" src="/assets/easyui/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="/assets/jQueryFormJs/jquery-form.js"></script>
    <script type="text/javascript" src="/assets/easyui/locale/easyui-lang-zh_CN.js"></script>
    <style>
    .tdming {
    100px;
    text-align: right;
    }
    .tdkong {
    150px;
    }
    .checkbox {
    100px;
    }
    </style>

    </head>
    <body>
    <form id="form1" runat="server">
    <div>
    <table style="100%">
    <tr>
    <td class="tdming">区域:</td>
    <td class="tdkong">
    <input id="quyu" class="easyui-combobox" /></td>
    <td class="tdming">行业:</td>
    <td class="tdkong"><input id="hangye" class="easyui-combobox" /></td>
    <td class="tdming"></td>
    <td></td>
    <td></td>
    </tr>
    <tr>
    <td class="tdming">客户名称:</td>
    <td class="tdkong">
    <input id="kehumingcheng" class="easyui-textbox" /></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    </tr>
    <tr>
    <td class="tdming">线索搜集人:</td>
    <td class="tdkong">
    <input id="xiansuosoujiren" class="easyui-textbox" /></td>
    <td class="tdming">线索获取时间:</td>
    <td class="tdkong"><div id="huoqushijian" class="easyui-datetimebox" ></div></td>
    <td class="tdming"></td>
    <td></td>
    <td></td>
    </tr>
    <tr>
    <td class="tdming">渠道来源:</td>
    <td class="tdkong">
    <input id="qudaolaiyuan" class="easyui-textbox" /></td>
    <td class="tdming">省:</td>
    <td class="tdkong"><input id="sheng" class="easyui-combobox" /></td>
    <td class="tdming">市</td>
    <td class="tdkong"><input id="shi" class="easyui-combobox" /></td>
    <td></td>
    </tr>
    <tr>
    <td class="tdming">客户地址:</td>
    <td colspan="3">
    <input id="kehudizhi" class="easyui-textbox" data-options="400" /></td>
    <td></td>
    <td></td>
    <td></td>
    </tr>
    <tr>
    <td class="tdming" align="top">联系人相关:</td>
    <td colspan="6">
    <div style="500px; overflow:hidden; height:120px; ">
    <table id="clientContactContainer" >
    </table>
    </div>
    </td>
    </tr>
    <tr>
    <td class="tdming">产品名称:</td>
    <td class="tdkong">
    <input id="chanpinmingcheng" class="easyui-textbox" /></td>
    <td class="tdming">产品属性:</td>
    <td class="tdkong"><input id="chanpinshuxing" class="easyui-combobox" /></td>
    <td class="tdming">物流模式:</td>
    <td class="tdkong"><input id="wuliumoshi" class="easyui-combobox" /></td>
    <td></td>
    </tr>
    </table>
    <table style="100%;padding-left:30px;">
    <tr>
    <td class="checkbox"><input id="chb_pipei" type="checkbox" name="name" value="" />与我公司匹配</td>
    <td class="checkbox"><input id="ch_kehu" type="checkbox" name="name" value="" />TOP客户</td>
    <td class="checkbox"><input id="ch_hangye" type="checkbox" name="name" value="" />行业TOP</td>
    <td class="checkbox"><input id="ch_gongsi" type="checkbox" name="name" value="" />公司TOP</td>
    <td class="checkbox"><input id="ch_pianqu" type="checkbox" name="name" value="" />片区TOP</td>
    <td class="checkbox"><input id="ch_sheng" type="checkbox" name="name" value="" />省级TOP</td>
    <td class="checkbox"><input id="ch_mubiaokehu" type="checkbox" name="name" value="" />目标客户</td>
    <td></td>
    </tr>
    </table>
    <table style="100%;padding-left:30px;">
    <tr>
    <td style="380px;">
    物流需求表:<input id="liulan" name="liulan" class="easyui-filebox" data-options="250" /></td>
    <td style="text-align:left;" id="oldDemandFileContainer">
    </td>
    <td>
    <a id="btnmoban" href="/Handler/FileDownLoadHandler.ashx?filePath=~ emplatelogisticsDemand.xlsx" target="content">模板下载</a>
    </td>
    </tr>
    </table>
    <div style="height:20px;"></div>
    <table style="100%;">
    <tr>

    <td style="300px;text-align:right;"><a id="btnqueding" class="easyui-linkbutton" data-options="iconCls:'icon-save'">确定</a></td>
    <td style="text-align:left;"><a id="quxiao" class="easyui-linkbutton" data-options="iconCls:'icon-cancel'">取消</a></td>
    </tr>
    </table>
    </div>
    </form>

    <script>
    $(function () {
    //用以保存所有当前客户的联系人信息
    window["clientConactPersons"] = null;

    //开启遮照
    parent.parent.showMask();

    //初始化客户联系人 grid
    initClientContactGrid();

    //联系人 ajax 获取
    getClientConactPersons();

    //物流需求表 ajax 获取
    getClientDemand();

    var lock1 = $.Deferred();
    var lock2 = $.Deferred();
    var lock3 = $.Deferred();
    var lock4 = $.Deferred();
    var lock5 = $.Deferred();

    $.when(lock1, lock2, lock3, lock4, lock5).done(function () {
    parent.parent.hideMask();
    //初始化选中项数据
    initSelectData();
    }).fail(function () {
    parent.parent.hideMask();
    alert("e");
    });

    //显示当前日期
    formatterDate = function (date) {
    var day = date.getDate() > 9 ? date.getDate() : "0" + date.getDate();
    var month = (date.getMonth() + 1) > 9 ? (date.getMonth() + 1) : "0"
    + (date.getMonth() + 1);
    var hor = date.getHours();
    var min = date.getMinutes();
    var sec = date.getSeconds();
    return date.getFullYear() + '-' + month + '-' + day + " " + hor + ":" + min + ":" + sec;
    };
    $('#huoqushijian').datetimebox('setValue', formatterDate(new Date()));

    //区域
    $.ajax({
    url: "/Handler/GetAreasHandler.ashx", //请求的url地址

    dataType: "json", //返回格式为json
    type: "post", //请求方式
    success: function (req) {
    //请求成功时处理
    //去除遮照
    var resultToParse = req["data"];
    jQuery("#quyu").combobox({
    valueField: 'CrmArea_ID',
    textField: 'CrmArea_Name'
    }).combobox("loadData", resultToParse);
    var data = $('#quyu').combobox('getData');//默认选中第一条
    $("#quyu").combobox('select', data[0]["CrmArea_ID"]);
    lock1.resolve();
    if (checkType()["t"] == "read") {
    readDisableControls();
    }
    },
    error: function (a, b, c) {
    //请求出错处理
    //去除遮照
    console.log(a);
    lock1.reject();
    }
    });

    //行业
    $.ajax({
    url: "/Handler/GetTradeTypeHandler.ashx", //请求的url地址
    dataType: "json", //返回格式为json
    type: "post", //请求方式
    success: function (req) {
    //请求成功时处理
    //去除遮照
    var resultToParse = req["data"];
    jQuery("#hangye").combobox({
    valueField: 'CrmTrade_ID',
    textField: 'CrmTrade_Name'
    }).combobox("loadData", resultToParse);
    var data = $('#hangye').combobox('getData');//默认选中第一条
    $("#hangye").combobox('select', data[0]["CrmTrade_ID"]);
    lock2.resolve();
    },
    error: function (a, b, c) {
    //请求出错处理
    //去除遮照
    console.log(a);
    lock2.reject();
    if (checkType()["t"] == "read") {
    readDisableControls();
    }
    }
    });
    //产品属性
    $.ajax({
    url: "/Handler/GetProductTypeHandler.ashx", //请求的url地址
    dataType: "json", //返回格式为json
    type: "post", //请求方式
    success: function (req) {
    //请求成功时处理
    //去除遮照
    var resultToParse = req["data"];
    jQuery("#chanpinshuxing").combobox({
    valueField: 'CrmProductType_ID',
    textField: 'CrmProductType_Name'
    }).combobox("loadData", resultToParse);

    var data = $('#chanpinshuxing').combobox('getData');//默认选中第一条
    $("#chanpinshuxing").combobox('select', data[0]["CrmProductType_ID"]);
    lock3.resolve();
    if (checkType()["t"] == "read") {
    readDisableControls();
    }
    },
    error: function (a, b, c) {
    //请求出错处理
    //去除遮照
    console.log(a);
    lock3.reject();
    }
    });
    //物流模式
    $.ajax({
    url: "/Handler/GetLogisticsModelHandler.ashx", //请求的url地址
    dataType: "json", //返回格式为json
    type: "post", //请求方式
    success: function (req) {
    //请求成功时处理
    //去除遮照
    var resultToParse = req["data"];
    jQuery("#wuliumoshi").combobox({
    valueField: 'CrmLogisticsModel_ID',
    textField: 'CrmLogisticsModel_Name'
    }).combobox("loadData", resultToParse);

    var data = $('#wuliumoshi').combobox('getData');//默认选中第一条
    $("#wuliumoshi").combobox('select', data[0]["CrmLogisticsModel_ID"]);
    lock4.resolve();
    if (checkType()["t"] == "read") {
    readDisableControls();
    }
    },
    error: function (a, b, c) {
    //请求出错处理
    //去除遮照
    console.log(a);
    lock4.reject();
    }
    });

    //获取省
    $.ajax({
    url: "/Handler/GetAddressHandler.ashx", //请求的url地址
    dataType: "json", //返回格式为json
    type: "post", //请求方式
    success: function (req) {
    //请求成功时处理
    //去除遮照
    var resultToParse = req["data"]["province"];
    jQuery("#sheng").combobox({
    valueField: 'CityCode',
    textField: 'CityName'
    }).combobox("loadData", resultToParse);
    var data = $('#sheng').combobox('getData');//默认选中第一条
    //绑定级联事件(省市)
    $("#sheng").combobox({
    "onSelect": function (record) {
    var provinceCode = record["CityCode"];
    //级联调整市级菜单
    shijiTrigger(req["data"]["city"], provinceCode);
    window["allCities"] = req["data"]["city"];
    }
    });
    $("#sheng").combobox('select', data[0]["CityCode"]);
    //初始化市
    initCityCombox(req);
    lock5.resolve();
    if (checkType()["t"] == "read") {
    readDisableControls();
    }
    },
    error: function (a, b, c) {
    //请求出错处理
    //去除遮照
    console.log(a);
    lock5.reject();
    }
    });
    addbtntrigger();//取消
    btnCancel();//确定
    if (checkType()["t"] == "read") {
    readDisableControls();
    }
    });

    </script>
    <!-- 初始化市combox -->
    <script>
    function initCityCombox(provinceAndCityData) {

    //请求成功时处理
    //去除遮照
    var resultToParse = provinceAndCityData["data"]["city"];

    //看懂就行 start
    var jsonData = [];
    var cityArray = resultToParse[0];
    for (var key in cityArray) {
    for (var key2 in cityArray[key][0]) {
    var tempJsonItme = { "CityCode": key2, "CityName": cityArray[key][0][key2] };
    jsonData.push(tempJsonItme);
    }
    }
    //看懂就行 end

    jQuery("#shi").combobox({
    valueField: 'CityCode',
    textField: 'CityName'
    }).combobox("loadData", jsonData).combobox('select', jsonData[0]["CityCode"]);

    }
    </script>

    <!-- 级联调整市级菜单 -->
    <script>
    function shijiTrigger(resultToParse, provinceCode) {
    for (var i = 0; i < resultToParse.length; i++) {
    for (var Pkey in resultToParse[i]) {
    if (Pkey == provinceCode) {
    var cityArray = resultToParse[i][Pkey];
    var jsonData = [];
    for (var key in cityArray) {
    for (var key2 in cityArray[key]) {
    var tempJsonItme = { "CityCode": key2, "CityName": cityArray[key][key2] };
    jsonData.push(tempJsonItme);
    }
    }
    jQuery("#shi").combobox({
    valueField: 'CityCode',
    textField: 'CityName'
    }).combobox("loadData", jsonData).combobox('select', jsonData[0]["CityCode"]);
    }
    }
    }

    }
    </script>
    <!--绑定搜索'确定'和‘取消’按钮事件-->
    <script>
    function addbtntrigger() {
    //绑定搜索按钮事件
    jQuery("#btnqueding").click(function () {
    if (checkType()["t"] != "read") {
    //获取前端联系人信息
    var allClientContactsArray = getNewClientContacts();
    //获取其他信息
    var customInformation = getCustomInformation();
    updateClientInformation(customInformation, allClientContactsArray);
    }
    });
    }
    function btnCancel() {
    jQuery("#quxiao").click(function () {
    if (checkType()["t"] != "read") {
    parent.closeDialog();
    }
    });
    }
    </script>

    <!-- 获取客户录入数据 -->
    <script>
    function getCustomInformation() {
    var result = {};
    result["CrmArea_ID"] = $("#quyu").combobox('getValue');
    result["CrmTrade_ID"] = $("#hangye").combobox('getValue');
    result["CrmClient_Name"] = $("#kehumingcheng").val();
    result["CrmClient_SearchName"] = $("#xiansuosoujiren").val();
    result["CrmClient_CluesTime"] = $("#huoqushijian").datetimebox('getValue');
    result["CrmClient_Trench"] = $("#qudaolaiyuan").val();
    result["CrmClient_ProvinceID"] = $("#sheng").combobox('getValue');
    result["CrmClient_CityID"] = $("#shi").combobox('getValue');
    result["CrmClient_Address"] = $("#kehudizhi").val();
    result["CrmClient_ProductName"] = $("#chanpinmingcheng").val();
    result["CrmClient_ProductAttributesID"] = $("#chanpinshuxing").combobox('getValue');
    result["CrmClient_LogisticsModeID"] = $("#wuliumoshi").combobox('getValue');
    result["CrmClient_IsMatched"] = $("#chb_pipei").get(0).checked == true ? 1 : -1;
    result["CrmClient_IsTradeTop"] = $("#ch_hangye").get(0).checked == true ? 1 : -1;
    result["CrmClient_IsCompanyTop"] = $("#ch_gongsi").get(0).checked == true ? 1 : -1;
    result["CrmClient_IsAreaTop"] = $("#ch_pianqu").get(0).checked == true ? 1 : -1;
    result["CrmClient_IsProvinceTop"] = $("#ch_sheng").get(0).checked == true ? 1 : -1;
    result["CrmClient_IsTargetCustomer"] = $("#ch_mubiaokehu").get(0).checked == true ? 1 : -1;
    return result;
    }
    </script>

    <!-- 初始化已选择数据 -->
    <script>
    function initSelectData()
    {
    if (parent["clientData"] != null) {
    var oldData = parent["clientData"];
    var CrmClient_ID = oldData["CrmClient_ID"];

    //绑定数据
    jQuery("#quyu").combobox("setValue", oldData["CrmClient_AreaID"]);
    jQuery("#hangye").combobox("setValue", oldData["CrmTrade_ID"]);
    jQuery("#sheng").combobox("setValue", oldData["CrmClient_ProvinceID"]);
    shijiTrigger(window["allCities"], oldData["CrmClient_ProvinceID"]);
    jQuery("#shi").combobox("setValue", oldData["CrmClient_CityID"]);
    jQuery("#chanpinshuxing").combobox("setValue", oldData["CrmClient_ProductAttributesID"]);
    jQuery("#wuliumoshi").combobox("setValue", oldData["CrmClient_LogisticsModeID"]);

    jQuery("#kehumingcheng").textbox("setValue", oldData["CrmClient_Name"]);
    jQuery("#xiansuosoujiren").textbox("setValue", oldData["CrmClient_SearchName"]);
    jQuery("#qudaolaiyuan").textbox("setValue", oldData["CrmClient_Trench"]);
    jQuery("#kehudizhi").textbox("setValue", oldData["CrmClient_Address"]);
    jQuery("#chanpinmingcheng").textbox("setValue", oldData["CrmClient_ProductName"]);

    //复选框
    $("#chb_pipei").get(0).checked = oldData["CrmClient_IsMatched"];
    $("#ch_hangye").get(0).checked = oldData["CrmClient_IsTradeTop"];
    $("#ch_gongsi").get(0).checked = oldData["CrmClient_IsCompanyTop"];
    $("#ch_pianqu").get(0).checked = oldData["CrmClient_IsAreaTop"];
    $("#ch_sheng").get(0).checked = oldData["CrmClient_IsProvinceTop"];
    $("#ch_mubiaokehu").get(0).checked = oldData["CrmClient_IsTargetCustomer"];

    //联系人,动态多行
    if (window["clientConactPersons"] != null)
    {
    var clientContactArray = window["clientConactPersons"];
    //填充 datagrid
    var json = { "total": clientContactArray.length, "rows": clientContactArray };
    $("#clientContactContainer").datagrid("loadData", json);
    }

    //时间控件
    formatterDate = function (date) {
    var day = date.getDate() > 9 ? date.getDate() : "0" + date.getDate();
    var month = (date.getMonth() + 1) > 9 ? (date.getMonth() + 1) : "0"
    + (date.getMonth() + 1);
    var hor = date.getHours();
    var min = date.getMinutes();
    var sec = date.getSeconds();
    return date.getFullYear() + '-' + month + '-' + day + " " + hor + ":" + min + ":" + sec;
    };
    $('#huoqushijian').datetimebox('setValue', formatterDate(new Date(oldData["CrmClient_CluesTime"])));

    //附件显示图标,可下载
    if (window["clientDemandFilePath"] != null)
    {
    for(var i=0;i<window["clientDemandFilePath"].length;i++)
    {
    jQuery("#oldDemandFileContainer").append("<a href='/Handler/FileDownLoadHandler.ashx?filePath=" + encodeURIComponent(window["clientDemandFilePath"][i]["CrmDemand_FilePath"]) + "'><img src='/Images/file_1.jpg' title='" + window["clientDemandFilePath"][i]["CrmDemand_CreaterName"] + "@" + window["clientDemandFilePath"][i]["CrmDemand_CreaterDate"] + "' /></a>");
    }
    }

    }
    else
    {
    alert("缺少数据");
    }
    }
    </script>

    <!-- 联系人 ajax 获取 -->
    <script>
    function getClientConactPersons()
    {
    if (parent["clientData"] != null) {
    //联系人 ajax 获取,填充 window["clientConactPersons"]
    //继续
    //开启遮照
    parent.parent.showMask();

    $.ajax({
    type: "post",
    url: "/Handler/GetClientContacts.ashx",
    dataType: "json",
    data: { "CrmClient_ID": parent["clientData"]["CrmClient_ID"] },
    success: function (data) {
    if (data[0]["result"] == "1") {
    var clientList = data[0]["data"];
    window["clientConactPersons"] = clientList;
    parent.parent.hideMask();
    if (checkType()["t"] == "read") {
    readDisableControls();
    }
    }
    else {
    parent.parent.hideMask();
    }
    }
    });

    }
    }
    </script>

    <!-- 初始化客户联系人 DataGrid -->
    <script>
    function initClientContactGrid()
    {
    var datagrid;
    var editRow = undefined;

    datagrid = $("#clientContactContainer").datagrid({
    iconCls: 'icon-save', //图标
    pagination: false, //显示分页
    pageSize: 15, //页大小
    pageList: [15, 30, 45, 60], //页大小下拉选项此项各value是pageSize的倍数
    fit: true, //datagrid自适应宽度
    fitColumn: false, //列自适应宽度
    striped: true, //行背景交换
    nowap: true, //列内容多时自动折至第二行
    border: false,
    idField: 'ID', //主键
    columns: [[//显示的列
    {
    field: 'CrmClientConactPerson_Name', title: '联系人姓名', 100, sortable: true,
    editor: { type: 'validatebox', options: { required: false } }
    },
    {
    field: 'CrmClientConactPerson_Duty', title: '联系人职务', 100,
    editor: { type: 'validatebox', options: { required: false } }
    },
    {
    field: 'CrmClientConactPerson_PhoneNumber', title: '联系人电话', 150,
    editor: { type: 'validatebox', options: { required: false } }
    }
    ]],
    queryParams: { action: 'query' }, //查询参数
    toolbar: [{
    text: '添加', iconCls: 'icon-add', handler: function () {//添加列表的操作按钮添加,修改,删除等
    //添加时先判断是否有开启编辑的行,如果有则把开户编辑的那行结束编辑
    if (editRow != undefined) {
    datagrid.datagrid("endEdit", editRow);
    }
    //添加时如果没有正在编辑的行,则在datagrid的第一行插入一行
    if (editRow == undefined) {
    datagrid.datagrid("insertRow", {
    index: 0, // index start with 0
    row: {

    }
    });
    //将新插入的那一行开户编辑状态
    datagrid.datagrid("beginEdit", 0);
    //给当前编辑的行赋值
    editRow = 0;
    }

    }
    }, '-',
    {
    text: '删除', iconCls: 'icon-remove', handler: function () {
    $.messager.confirm("提示", "你确定要全部删除吗?", function (r) {
    if (r) {
    datagrid.datagrid('loadData', { total: 0, rows: [] });
    editRow = null;
    }
    });
    }
    }, '-'],
    onAfterEdit: function (rowIndex, rowData, changes) {
    //endEdit该方法触发此事件
    console.info(rowData);
    editRow = undefined;
    },
    onDblClickRow: function (rowIndex, rowData) {
    //双击开启编辑行
    if (editRow != undefined) {
    datagrid.datagrid("endEdit", editRow);
    }
    if (editRow == undefined) {
    datagrid.datagrid("beginEdit", rowIndex);
    editRow = rowIndex;
    window["clientContactEditRow"] = editRow; //定义全局变量:当前编辑的行
    }
    }
    });

    window["clientContactDataGrid"] = datagrid;//定义全局变量datagrid
    }
    </script>

    <!-- 获取前端客户联系人信息 -->
    <script>
    function getNewClientContacts()
    {
    if (window["clientContactEditRow"] != undefined) {
    window["clientContactDataGrid"].datagrid("endEdit", window["clientContactEditRow"]);
    }

    var result = [];

    var temp = $("#clientContactContainer").datagrid("getRows");

    result = temp;

    return result;
    }
    </script>

    <!-- 客户物流需求表 ajax 获取 -->
    <script>
    function getClientDemand()
    {
    if (parent["clientData"] != null) {
    //物流需求表 ajax 获取,填充 window["clientDemandFilePath"]
    //开启遮照
    parent.parent.showMask();

    $.ajax({
    type: "post",
    url: "/Handler/GetClientDemandFiles.ashx",
    dataType: "json",
    data: { "CrmClient_ID": parent["clientData"]["CrmClient_ID"] },
    success: function (data) {
    if (data[0]["result"] == "1") {
    var demandFilePathList = data[0]["data"];
    window["clientDemandFilePath"] = demandFilePathList;
    parent.parent.hideMask();
    }
    else {
    parent.parent.hideMask();
    }
    }
    });

    }
    }
    </script>

    <!-- 保存数据 -->
    <script>
    function updateClientInformation(customInformation, allClientContactsArray)
    {
    if (allClientContactsArray.length > 0)
    {
    customInformation["contacts"] = allClientContactsArray;
    }

    customInformation["CrmClient_ID"] = parent["clientData"]["CrmClient_ID"];

    //开启遮照
    parent.parent.showMask();
    $("#form1").ajaxSubmit({
    type: "post",
    url: "/Handler/UpdateClientHandler.ashx",
    dataType: "json",
    data: customInformation,
    success: function (data) {
    if (data[0]["result"] == "1") {
    //提示修改成功,自动关闭dialog,刷新list
    parent.parent.hideMask();

    parent.closeDialog(1);
    parent.getConditionAndRefreshData();
    }
    else if (data == -1) {
    alert("请排错");
    parent.parent.hideMask();
    }
    else {
    alert("请排错");
    parent.parent.hideMask();
    }
    }
    });
    }
    </script>
    <!--用于判断页面传值控制界面是否只读-->
    <script>
    function checkType() {
    var aQuery = window.location.href.split("?"); //取得Get参数 var aGET = new Array(); if (aQuery.length > 1) {
    var aBuf = aQuery[1].split("&"); for (var i = 0, iLoop = aBuf.length; i < iLoop; i++) {
    var aTmp = aBuf[i].split("="); //分离key与Value aGET[aTmp[0]] = aTmp[1];
    }
    } return aGET;
    } //窗体禁用 function readDisableControls() {
    $(document).contents().find(".easyui-textbox").each(function () {
    jQuery("#" + this.id).textbox("disable", true);
    }); $(document).contents().find(".easyui-databox").each(function () {
    jQuery("#" + this.id).databox("disable", true);
    }); $(document).contents().find(".easyui-datetimebox").each(function () {
    jQuery("#" + this.id).datetimebox("disable", true);
    }); $(document).contents().find(".easyui-combobox").each(function () {
    jQuery("#" + this.id).combobox("readonly", true); }); $(document).contents().find(".easyui-combo").each(function () {
    jQuery("#" + this.id).combo("readonly", true);
    }); $(document).contents().find(".easyui-filebox").each(function () {
    jQuery("#" + this.id).filebox("disable", true);
    }); $(document).contents().find(".easyui-linkbutton").each(function () {
    jQuery("#" + this.id).linkbutton("disable", true);
    }); $(document).contents().find(".easyui-datagrid").each(function () {
    jQuery("#" + this.id).datagrid("disable", true);
    }); $(document).contents().find("a").each(function () {
    jQuery("#" + this.id).attr("href", "javascript:void(0)"); }); $(document).contents().find("input[type='checkbox']").each(function () {
    jQuery("#" + this.id).attr("disabled", "disabled");
    });
    }
    </script>
    </body>
    </html>

  • 相关阅读:
    洛谷P1196银河英雄传说
    NOIP2011普及组第三题瑞士轮(洛谷P1309)
    Dijkstra算法
    10.13做题——洛谷1449后缀表达式
    NOI题库(1.12.T3)甲流病人初筛
    10.12做题——NOI题库(1.13.T30)1的个数
    NOIP考试必备——随机数
    10.10做题——USACO1.2/洛谷1207回文平方数(Dual Palindromes)
    10.9做题——洛谷P1927防护伞
    10.9做题——USACO1.2/洛谷1206回文平方数(Palindromic Squares)
  • 原文地址:https://www.cnblogs.com/zhang-wenbin/p/5810095.html
Copyright © 2020-2023  润新知