产品开发篇

QQ:1187362408 欢迎技术交流和学习

关于系统业务逻辑(产品开发):

TODO:

1,业务逻辑复杂型

2,复杂数据操控型

讲解篇:1,业务逻辑复杂型2, 复杂数据操控型

TODO:

1,业务逻辑复杂型(业务逻辑绕了些),

2,复杂数据操控型(字段不多,但控制复杂)

一,业务逻辑复杂型

<span style="color:#000000;">var infoflag = true; //是否需要给父页面赋值  True 弹出框口 需要  False 打开新页面 不需要
var handleurl = "/Handle/UserRoleManage/UserHandler.ashx"; //一般处理程序路径
var chkProQuery = new Array("ddlPro", "ddlCity", "ddlCoun", "ddlTown", "ddlVill", "ddlGird");//联动select改变对应checkbox控制全选反选  初始化<省市县乡镇村网格[用户角色类别]
var chkNameArray = new Array("protypechk", "citytypechk", "countypechk", "towntypechk", "villtypechk", "girdtypechk");//初始化数组<省市县乡镇村网格[用户角色类别]名称name>
var chkNameIdArray = new Array(["protypechk", "protypechk_"], ["citytypechk", "citytypechk_"], ["countypechk", "countypechk_"], ["towntypechk", "towntypechk_"], ["villtypechk", "villtypechk_"], ["girdtypechk", "girdtypechk_"]);//初始化数组<省市县乡镇村网格[用户角色类别]名称name,id>
//var chkNameAndIdArray = new Array(["procheckbox", "prochk_"], ["citycheckbox", "citychk_"], ["councheckbox", "counchk_"], ["towncheckbox", "townchk_"], ["villcheckbox", "villchk_"], ["girdcheckbox", "girdchk_"]);//初始化数组<省市县乡镇村网格[用户角色]名称name,id>

$(function () {
    $.each(chkNameArray, function (value, idex) {
        //RequiredCheckbox(idex);//索引
        RequiredCheckbox(chkNameArray[value]);//名称
    });
});

function ProQuery(ddlName, chkId) {

    $.each(chkProQuery, function (value, idex) {

        if (ddlName == idex) {
            $("[id^=" + chkId + "]").each(function () {
                if ($("[id=" + ddlName + "]").val() == "2") {//清除
                    $(this).attr('checked', false);
                } else if ($("[id=" + ddlName + "]").val() == "0") {//全选
                    $(this).attr('checked', 'checked');
                } else if ($("[id=" + ddlName + "]").val() == "1") {//反选
                    $(this).attr("checked", !this.checked);
                }
            })
        }

    });
}


/*地区控件选中后执行的方法*/
function linkage() {
    clearFields2();//取消禁用
    var areacode = $("#uc_btnSelectArea1_hidAreaCode").val();
    var areaLevel = GetJbByCode(areacode);//勾选的当前地区级别(0:省级1:市级2:县级3:乡镇级4:村级)
    switch (areaLevel) {
        case 1:
            $("table tr").eq(2).attr("disabled", "disabled");//禁用省,省级角色类别
            break;
        case 2:
            $("table tr:lt(6):not(:lt(2))").attr("disabled", "disabled");//禁用省,省级角色类别,禁用市,市级角色类别
            break;
        case 3:
            $("table tr:lt(8):not(:lt(2))").attr("disabled", "disabled");//禁用省,省级角色类别,禁用市,市级角色类别,县,县级角色类别,乡,乡级角色类别
            break;
        case 4:
            $("table tr:lt(10):not(:lt(2))").attr("disabled", "disabled");//禁用省,省级角色类别,禁用市,市级角色类别,县,县级角色类别,乡,乡级角色类别,村,村级角色类别
            break;
        case 5:
            $("table tr:lt(12):not(:lt(2))").attr("disabled", "disabled");//禁用省,省级角色类别,禁用市,市级角色类别,县,县级角色类别,乡,乡级角色类别,村,村级角色类别,网格,网格角色类别
            break;
        default:
            break;
    }
}



/*省市县乡镇村网格[用户角色类别]   2015/2/11   [方]*/
function RequiredNameIdCheckbox(chkName, chkId) {//单选框名称
    var typestr = "";//用户角色类别名称[省市县乡镇村网格] 1角色类别[1],2角色类别[2]
    $("[name=" + chkName + "][checked]").each(function () {
        var cx = $(this).attr("id");
        typestr += cx.replace(chkId, "");//省市县乡镇村网格角色类别名称
    })
    return typestr;
}
/*[新增] 省市县乡镇村网格[用户角色][合并]   2015/03/02    [方]*/
/*function RequiredNameAndIdCheckbox(chkName, chkId) {
    var typestr = "";//省市县乡镇村网格[用户角色]
    $("[name=" + chkName + "][checked]").each(function () {
        var cx = $(this).attr("id");
        typestr += cx.replace(chkId, "") + "^";//省市县乡镇村网格角色名称
    });
    typestr = typestr.substr(0, typestr.length - 1);
    return typestr;
}*/

/*省市县乡镇村网格[用户角色类别] 单选[点击不取消勾选]   2015/2/11   [方]*/
function RequiredCheckbox(chkName) {//单选框名称
    $(":checkbox[name=" + chkName + "]").each(function () {
        $(this).click(function () {
            if ($(this).attr("checked")) {
                $(":checkbox[name=" + chkName + "]").removeAttr('checked');
                $(this).attr('checked', 'checked');
            } else {
                $(this).attr("checked", "checked");
            }
        });
    });
}


function CheckInput() {
    var result = $("#form1").validate({
        rules: {
            uc_btnSelectArea1$txtAreaName: {
                requiredgPID: true
            },
            procheckbox: {//省级角色
                requiredproCheck: true
            },
            citycheckbox: {//市级角色
                requiredcityCheck: true
            },
            councheckbox: {//县角色
                requiredcounCheck: true
            },
            towncheckbox: {//乡镇角色
                requiredtownCheck: true
            },
            villcheckbox: {//村级角色
                requiredvillCheck: true
            },
            girdcheckbox: {//网格角色
                requiredgirdCheck: true
            }
        }
    });
    return result.form();
};
//[省]用户角色必选
jQuery.validator.addMethod("requiredproCheck", function (value, element) {
    var chkvalue = false;
    var areacode = $("#uc_btnSelectArea1_hidAreaCode").val();
    var areaLevel = GetJbByCode(areacode);//勾选的当前地区级别(0:省级1:市级2:县级3:乡镇级4:村级)
    if (areaLevel < 1) {
        $("[name='procheckbox'][checked]").each(function () {
            chkvalue = true;
        });
    } else {
        chkvalue = true;
    }
    return chkvalue;
}, "*至少选择一个省级用户角色")
//[市]用户角色必选
jQuery.validator.addMethod("requiredcityCheck", function (value, element) {
    var chkvalue = false;
    var areacode = $("#uc_btnSelectArea1_hidAreaCode").val();
    var areaLevel = GetJbByCode(areacode);//勾选的当前地区级别(0:省级1:市级2:县级3:乡镇级4:村级)
    if (areaLevel < 2) {
        $("[name='citycheckbox'][checked]").each(function () {
            chkvalue = true;
        });
    } else {
        chkvalue = true;
    }
    return chkvalue;
}, "*至少选择一个市级用户角色")
//[县]用户角色必选
jQuery.validator.addMethod("requiredcounCheck", function (value, element) {
    var chkvalue = false;
    var areacode = $("#uc_btnSelectArea1_hidAreaCode").val();
    var areaLevel = GetJbByCode(areacode);//勾选的当前地区级别(0:省级1:市级2:县级3:乡镇级4:村级)
    if (areaLevel < 3) {
        $("[name='councheckbox'][checked]").each(function () {
            chkvalue = true;
        });
    } else {
        chkvalue = true;
    }
    return chkvalue;
}, "*至少选择一个县级用户角色")
//[乡镇]用户角色必选
jQuery.validator.addMethod("requiredtownCheck", function (value, element) {
    var chkvalue = false;
    var areacode = $("#uc_btnSelectArea1_hidAreaCode").val();
    var areaLevel = GetJbByCode(areacode);//勾选的当前地区级别(0:省级1:市级2:县级3:乡镇级4:村级)
    if (areaLevel < 4) {
        $("[name='towncheckbox'][checked]").each(function () {
            chkvalue = true;
        });
    } else {
        chkvalue = true;
    }
    return chkvalue;
}, "*至少选择一个乡镇级用户角色")
//[村]用户角色必选
jQuery.validator.addMethod("requiredvillCheck", function (value, element) {
    var chkvalue = false;
    var areacode = $("#uc_btnSelectArea1_hidAreaCode").val();
    var areaLevel = GetJbByCode(areacode);//勾选的当前地区级别(0:省级1:市级2:县级3:乡镇级4:村级)
    if (areaLevel < 5) {
        $("[name='villcheckbox'][checked]").each(function () {
            chkvalue = true;
        });
    } else {
        chkvalue = true;
    }
    return chkvalue;
}, "*至少选择一个村级用户角色")
//[网格]用户角色必选
jQuery.validator.addMethod("requiredgirdCheck", function (value, element) {
    var chkvalue = false;
    var areacode = $("#uc_btnSelectArea1_hidAreaCode").val();
    var areaLevel = GetJbByCode(areacode);//勾选的当前地区级别(0:省级1:市级2:县级3:乡镇级4:村级)
    if (areaLevel < 6) {
        $("[name='girdcheckbox'][checked]").each(function () {
            chkvalue = true;
        });
    } else {
        chkvalue = true;
    }
    return chkvalue;
}, "*至少选择一个网格用户角色")

jQuery.validator.addMethod("requiredgPID", function (value, element) {
    return value != "";
}, "*地区不能为空!");



function Save(flag) {
    if (!CheckInput())
        return;
    var action = "padd";

    /*省市县乡镇村网格[用户角色]*/
    var chkprostr = "";//省
    $("[name='procheckbox'][checked]").each(function () {
        var cx = $(this).attr("id");
        chkprostr += cx.replace("prochk_", "") + "^";
    });
    var chkcitystr = "";//市
    $("[name='citycheckbox'][checked]").each(function () {
        var cx = $(this).attr("id");
        chkcitystr += cx.replace("citychk_", "") + "^";
    });
    var chkcounstr = "";//县
    $("[name='councheckbox'][checked]").each(function () {
        var cx = $(this).attr("id");
        chkcounstr += cx.replace("counchk_", "") + "^";
    });
    var chktownstr = "";//乡镇
    $("[name='towncheckbox'][checked]").each(function () {
        var cx = $(this).attr("id");
        chktownstr += cx.replace("townchk_", "") + "^";
    });
    var chkvillstr = "";//村
    $("[name='villcheckbox'][checked]").each(function () {
        var cx = $(this).attr("id");
        chkvillstr += cx.replace("villchk_", "") + "^";
    });
    var chkgirdstr = "";//网格
    $("[name='girdcheckbox'][checked]").each(function () {
        var cx = $(this).attr("id");
        chkgirdstr += cx.replace("girdchk_", "") + "^";
    });

    /*[新增] 省市县乡镇村网格[用户角色][合并]   2015/03/02    [方]*/
    /*TODO:
    1、省市县乡镇村网格合并格式:以","隔开
    2、其中每一单项<省市县乡镇村网格>,以"^"隔开,去除最后一个空字符
    3、最终合并格式如:
    b3cff5e4-d7c4-473f-8a80-1f8681562677^8a5baa20-fe3a-4005-8c3b-718eb64d7281,
    4cfd5cb4-d04b-46c0-8738-c8119d2a9fbb^d35979ad-96c7-4dd5-a4c2-c832ac0b56d8,
    fd33d69e-ac6e-4c62-99cc-c8e69718b97b^a81d3ab7-aba0-4b6f-a730-d2aa5eaa512f,
    352b986b-7c44-48e4-a088-b7f4d56c8201^b8775c0a-fcdd-4aa6-bef5-b9e6ea895ebe,
    ebbeb3ad-11c1-48d7-9268-ee14abfa5c89^ee839f4f-1daf-45ca-bd8e-67fd0ba264f0,
    ea2d104b-c77e-4875-b703-bbf52a5f2978^091a04db-0af2-4cb1-8af8-eb14d6173c8b,
    4、暂时注释
    */
    /*var typenameidStr = "";
    $.each(chkNameAndIdArray, function (value, idex) {
        var typeNameIdArray = idex;
        var sArray = "";
        $.each(typeNameIdArray, function (value, idex) {
            sArray += idex + ",";
        });
        sArray = sArray.substr(0, sArray.length - 1).split(',');
        typenameidStr += RequiredNameAndIdCheckbox(sArray[0], sArray[1]) + ",";
    });
    typenameidStr = typenameidStr.substr(0, typenameidStr.length - 1);
    return typenameidStr;*/




    /*省市县乡镇村网格[用户角色类别]*/
    var typestr = "";
    $.each(chkNameIdArray, function (value, idex) {
        var typeArray = idex;
        var sArray = "";
        $.each(typeArray, function (value, idex) {
            sArray += idex + ",";
        });
        sArray = sArray.substr(0, sArray.length - 1).split(',');
        typestr += RequiredNameIdCheckbox(sArray[0], sArray[1]) + "^";
    });

    /*地区编码 用户角色[省、市、县、乡镇、村、网格]  用户角色[省、市、县、乡镇、村、网格]类别 */
    var data = "action=" + action + "&sAreaCode=" + $("#uc_btnSelectArea1_hidAreaCode").val() + "&chkprostr=" + chkprostr + "&chkcitystr=" + chkcitystr + "&chkcounstr=" + chkcounstr + "&chktownstr=" + chktownstr + "&chkvillstr=" + chkvillstr + "&chkgirdstr=" + chkgirdstr + "&typestr=" + typestr;

    $.ajax({
        type: "POST", //用POST方式传输
        dataType: "json", //数据格式:JSON
        url: handleurl, //目标地址
        data: data,
        cache: false,
        success: function (data) {
            window.parent.document.getElementById("hidIsChange").value = "1";
            $.messager.alert('信息', data.data, 'info');
            clearFields1(); //清空界面和隐藏域ID

        },
        error: function (XmlHttpRequest, textStatus, errorThrown) { $.messager.alert('错误', errorThrown, 'error'); },
        beforeSend: function () {
            if (flag)
                $("body").mask();
            else
                parent.$("body").mask();
        },
        complete: function () {
            if (flag)
                $("body").unmask();
            else
                parent.$("body").unmask();
        }
    });
}


//设置界面属性值
function clearFields1() {
    $("#T_Content tr").attr("disabled", false);// 取消禁用
    //$("#T_Content :input:not('.roles')").clearFields(); //清空界面
}
function clearFields2() {
    $("#T_Content tr").attr("disabled", false);// 取消禁用
}</span>



二,复杂数据操控型

<span style="color:#000000;">var infoflag = true; //是否需要给父页面赋值  True 弹出框口 需要  False 打开新页面 不需要
var handleurl = "/Handle/SQJS/ResidentsAutonomy/RA_PublicityOnLine.ashx"; //一般处理程序路径
//http://localhost:56248/Handle/SQJS/ResidentsAutonomy/RA_Candidate.ashx
var candidateHandleUrl = "/Handle/SQJS/ResidentsAutonomy/RA_Candidate.ashx";//确定初步候选人和确定正式候选人
//http://localhost:56248/Handle/SQJS/ResidentsAutonomy/RA_ElectionProject.ashx
var electionProjectHandleUrl = "/Handle/SQJS/ResidentsAutonomy/RA_ElectionProject.ashx";//确认正式选举内容和时间和确认选举结果

var type = getParameter("iType");//页面状态 编辑或者查看


$(function () {

    /******隐藏check 操作按钮*************/
    if (type == "view") {
        $("#btn_Save").hide();//保存
        $("#btn_SaveandAdd").hide();//保存并新增
        infoflag = false;//用于查看界面 返回

        $("#ActionInfo").text("查看"); //把标识设置为查看

        $("#T_Content .red").css({ "display": "none" });//查看去除必填选项标识



        $("#T_Content").find("input").attr("disabled", "disabled");//input
        $("#T_Content").find("textarea").attr("disabled", "disabled");//textarea
        $("#iTypeCode").attr("disabled", "disabled");//公示类别
        $("#iOnLine").attr("disabled", "disabled");//是否公示

    }

    var ID = GetID();
    if (ID != "") {
        Load(ID);
    }

    $("#iTypeCode").change(function () {
        var checkValue = $("#iTypeCode").val();
        var ID = GetID();//网上公示ID
        var gProjectID = getParameter("gProjectID");//选举项目ID
        if (ID == "") {//相关公式信息表:RA_Candidate RA_ElectionProject View_SQ_RA_ElectionProject_sPreliminaryConfirm View_SQ_RA_ElectionProject_sFormallyConfirm
            switch (checkValue) {
                case "3"://确定初步候选人【正式确认为1】
                    clearFields1();
                    $.ajax({
                        type: "POST", //用POST方式传输
                        dataType: "json", //数据格式:JSON
                        url: handleurl, //目标地址
                        data: "action=preliminary&gID=" + gProjectID,
                        cache: false,
                        success: function (data) {
                            //数据获取完毕,填充页面据显示
                            if (data != null && data != "") {
                                LoadData1(data);
                            }
                        },
                        error: function (XmlHttpRequest, textStatus, errorThrown) { $.messager.alert('错误', errorThrown, 'error'); },
                        beforeSend: function () {
                        },
                        complete: function () {
                            $("hidLoad").val("1");
                        }
                    });
                    break;
                case "4":
                    clearFields1();
                    $.ajax({
                        type: "POST", //用POST方式传输
                        dataType: "json", //数据格式:JSON
                        url: handleurl, //目标地址
                        data: "action=formally&gID=" + gProjectID,
                        cache: false,
                        success: function (data) {
                            //数据获取完毕,填充页面据显示
                            if (data != null && data != "") {
                                LoadData1(data);
                            }
                        },
                        error: function (XmlHttpRequest, textStatus, errorThrown) { $.messager.alert('错误', errorThrown, 'error'); },
                        beforeSend: function () {
                        },
                        complete: function () {
                            $("hidLoad").val("1");
                        }
                    });
                    break;
                case "5":
                    clearFields2();
                    $.ajax({
                        type: "POST", //用POST方式传输
                        dataType: "json", //数据格式:JSON
                        url: electionProjectHandleUrl, //目标地址
                        data: "action=get&gID=" + gProjectID,
                        cache: false,
                        success: function (data) {
                            //数据获取完毕,填充页面据显示
                            if (data != null && data != "") {
                                $("#txt_dPublictityStartTime").val(renderTime(data.dStartDate, true));//开始时间dPublictityStartTime
                                $("#txt_dPublicityEndTime").val(renderTime(data.dEndDate, true));//结束时间
                                $("#txt_sContent").val(data.sProjectContent);//公示内容
                                $("#dPublictityStartTime").val(renderTime(data.dStartDate, true));//公示开始时间
                                $("#dPublicityEndTime").val(renderTime(data.dEndDate, true));//公示结束时间
                                $("#sContent").val(data.sProjectContent);//公示内容
                                //$("#txt_sMemo").val(data.sMemo);//备注
                            }
                        },
                        error: function (XmlHttpRequest, textStatus, errorThrown) { $.messager.alert('错误', errorThrown, 'error'); },
                        beforeSend: function () {
                        },
                        complete: function () {
                            $("hidLoad").val("1");
                        }
                    });
                    break;
                case "6":
                    clearFields2();
                    $.ajax({
                        type: "POST", //用POST方式传输
                        dataType: "json", //数据格式:JSON
                        url: handleurl, //目标地址
                        data: "action=getivotecount&gID=" + gProjectID,
                        cache: false,
                        success: function (data) {
                            //数据获取完毕,填充页面据显示
                            if (data != null && data != "") {
                                $("#txt_dPublictityStartTime").val(renderTime(data.dStartDate, true));//开始时间dPublictityStartTime
                                $("#txt_dPublicityEndTime").val(renderTime(data.dEndDate, true));//结束时间
                                $("#txt_sContent").val(data.iVoteCount);//公示内容:现场选举 网上选举 结果汇总
                                $("#dPublictityStartTime").val(renderTime(data.dStartDate, true));//公示开始时间
                                $("#dPublicityEndTime").val(renderTime(data.dEndDate, true));//公示结束时间
                                $("#sContent").val(data.iVoteCount);//公示内容
                                //$("#txt_sMemo").val(data.sMemo);//备注
                            }
                        },
                        error: function (XmlHttpRequest, textStatus, errorThrown) { $.messager.alert('错误', errorThrown, 'error'); },
                        beforeSend: function () {
                        },
                        complete: function () {
                            $("hidLoad").val("1");
                        }
                    });
                    break;
                default:
                    clearFields3();
                    break;

            }
        } else if (ID != "") {//RA_PublicityOnLine表
            Load(ID);
        }
    });
});

function Load(ID) {
    $.ajax({
        type: "POST", //用POST方式传输
        dataType: "json", //数据格式:JSON
        url: handleurl, //目标地址
        data: "action=get&gID=" + ID,
        cache: false,
        success: function (data) {
            //数据获取完毕,填充页面据显示
            if (data != null && data != "") {
                LoadData(data);
                IsPublicityOnLine(data);//页面加载 设置属性值
            }
        },
        error: function (XmlHttpRequest, textStatus, errorThrown) { $.messager.alert('错误', errorThrown, 'error'); },
        beforeSend: function () {
        },
        complete: function () {
            $("hidLoad").val("1");
        }
    });
}

function IsPublicityOnLine(data) {
    $("#iTypeCode").attr("disabled", "disabled");
    var iTypeCode = data.iTypeCode;
    switch (iTypeCode) {
        case 3:
            $("#txt_sContent").attr("disabled", "disabled");//正式选举内容
            break;
        case 4:
            $("#txt_sContent").attr("disabled", "disabled");//正式选举内容
            break;
        case 5:
            clearFields2();
        case 6:
            clearFields2();
            break;
        default:
            break;
    }
}

function LoadData(data) {
    SetInputValue(data);
    $("#txt_dPublictityStartTime").val(renderTime(data.dPublictityStartTime, true));//公示开始时间
    $("#txt_dPublicityEndTime").val(renderTime(data.dPublicityEndTime, true));//公示结束时间
    $("#dPublicityEndTime").val(renderTime(data.dPublicityEndTime, true));//公示结束时间
    $("#dPublictityStartTime").val(renderTime(data.dPublictityStartTime, true));//公示开始时间
    $("#sContent").val(data.sContent);
    $("#siTypeCode").val(data.iTypeCode);
}

function LoadData1(data) {
    $("#txt_sContent").val(data.sCandidatePeopNames);//公示内容
    $("#sContent").val(data.sCandidatePeopNames);//公示内容
    //$("#txt_sMemo").val(data.sMemo);//备注

}

function CheckInput() {
    var result = $("#form1").validate({
        rules: {
            txt_dPublictityStartTime: {
                required: true,
                dateISO: true
            },
            txt_dPublicityEndTime: {
                required: true,
                dateISO: true
            },
            txt_sContent: {
                required: true,
                maxlength: 500
            }
        }
    });
    return result.form();
};


function CheckInput1(iTypeCode) {
    var result;
    if (GetID() == "") {
        var gProjectID = getParameter("gProjectID");//选举项目ID
        $.ajax({
            type: "POST",
            url: handleurl,
            data: "action=ismanypublicityonline&gProjectID=" + gProjectID + "&iCode=" + iTypeCode,
            dataType: "json",
            async: false,
            error: function (XmlHttpRequest, textStatus, errorThrown) { $.messager.alert('错误', XmlHttpRequest.responseText, 'error'); },
            success: function (returnJsonValue) {

                if (returnJsonValue.result == false) {
                    $.messager.alert('信息', returnJsonValue.data, 'info');

                    result = returnJsonValue.result.toString();

                }
                //clearFields(); //清空界面和隐藏域ID
            },
            beforeSend: function () {
            },
            complete: function () {
            }
        });
    }
    return result;
}

function Save(isDoNew) {
    var iTypeCode = $("#iTypeCode").val();//网上公示类型

    var action = "add";
    var queryString = $('#T_Content :input').fieldSerialize();
    if (GetID() != "") {
        action = "edit";
        iTypeCode = $("#siTypeCode").val();
    }

    var sTypeName = "";//公示类别
    if (iTypeCode != "") {//公示类别
        sTypeName = $("#iTypeCode").find("option:selected").text();
    }
    queryString += "&sTypeName=" + sTypeName;

    if (CheckInput1(iTypeCode) == "false") {//先验证同一个项目不允许有多个相同类别公式! 后验证基础信息
        return false;
    }

    var data = "action=" + action + "&gID=" + GetID() + "&" + queryString + "&gProjectID=" + getParameter("gProjectID"); //
    Save_1(isDoNew, handleurl, data, infoflag);
}

function clearFields2() {
    //$("#txt_dPublictityStartTime").attr("disabled", "disabled");//开始时间
    //$("#txt_dPublicityEndTime").attr("disabled", "disabled");//结束时间
    $("#txt_sContent").attr("disabled", "disabled");//正式选举内容
}
//设置界面属性值 确定正式选举内容和时间
function clearFields1() {
    //$("#txt_dPublictityStartTime").attr("disabled", false);//开始时间
    //$("#txt_dPublicityEndTime").attr("disabled", false);//结束时间
    $("#txt_sContent").attr("disabled", "disabled");
}

function clearFields3() {
    $("#iTypeCode").attr("disabled", false);//
    //$("#txt_dPublictityStartTime").attr("disabled", false);//
    //$("#txt_dPublicityEndTime").attr("disabled", false);//
    $("#txt_sContent").attr("disabled", false);//正式选举内容

    SetID(""); //清空ID的隐藏域

    $("#txt_dPublictityStartTime").val("");
    $("#txt_dPublicityEndTime").val("");
    $("#sContent").val("");
    $("#txt_sContent").val("");
    $("#txt_sMemo").val("");
    $("#iOnLine").val("1");
}

function clearFields() {
    $("#iTypeCode").attr("disabled", false);//
    $("#txt_dPublictityStartTime").attr("disabled", false);//
    $("#txt_dPublicityEndTime").attr("disabled", false);//
    $("#txt_sContent").attr("disabled", false);//正式选举内容

    SetID(""); //清空ID的隐藏域
    $('#T_Content :input').clearFields(); //清空界面

    $("#sContent").val("");
    //$("#siTypeCode").val("");

    $("#iTypeCode").val("1");
    $("#iOnLine").val("1");
}</span>


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值