/*-------------------------------文档信息-----------------------------------
///功能：公司信息
///创建人: 翟新乐
///创建时间：----------------------
///修改人：------------------------
///修改时间：-----------------------
///修改原因：-----------------------
///详细说明：-----------------------
---------------------------------------------------------------------*/

//保存公司信息
function Save() {
    var strRecord = "{";
    var obj1 = trim($("#a1", "#idDiv_p0609").val());    //公司全称
    strRecord += "\"a1\":\"" + obj1 + "\",";
    var obj2 = trim($("#a2", "#idDiv_p0609").val());    //电话
    strRecord += "\"a2\":\"" + obj2 + "\",";
    var obj3 = trim($("#a3", "#idDiv_p0609").val());    //税号
    strRecord += "\"a3\":\"" + obj3 + "\",";
    var obj4 = trim($("#a4", "#idDiv_p0609").val());    //开户行
    strRecord += "\"a4\":\"" + obj4 + "\",";
    var obj5 = trim($("#a5", "#idDiv_p0609").val());    //账号
    strRecord += "\"a5\":\"" + obj5 + "\",";
    strRecord = strRecord.substring(0, strRecord.length - 1);
    strRecord += "}";
    var result = ParseData(window.external.DoOptions("Tgsxx", 'Add', strRecord));
    if (result.ReturnCode != "0") {
        window.parent.cihoAlert(msg.save.saveFail);
        return;
    } else {
        strRecord = null;
        obj1 = null;
        obj2 = null;
        obj3 = null;
        obj4 = null;
        obj5 = null;
        result = {};
        window.parent.cihoAlert(msg.save.saveSuc);
    }

}

//无用
function rec(form) {
    var a = form.text1.value;
    var b = form.textf.value;
    var c = form.texts.value;
}
function re(form) {
    form.text1.value = "";
    form.textf.value = "";
    form.texts.value = "";

    var subItem = $("#idContent input[name]").each(function () {
        strRecord += "\"" + $(this).attr("name") + "\":\"" + trim($(this).val()) + "\",";

    });
    strRecord = strRecord.substring(0, strRecord.length - 1);
    strRecord += "}";
}