/*************************
*功能：应付维护
*创建人：张振华
*时间：2010-08-16
*备注：
*************************/

//往弹出层里添加内容
function tableYfqcForm(strId) {

    //table对象
    var objTable = $("#" + strTableNameP060701);

    //列配置
    var objNames = objTable.jqGrid('getGridParam', "colNames");
    var objIndexs = objTable.jqGrid('getGridParam', "colModel");

    //商品，供应商，开票单位
    var objSp = getComboboxData('Tspxx');
    var objGys = getComboboxData('Tgysxx');
    var objKpdw = getComboboxData('Tkpdwxx');
    objGys.push({ "dm": "-1", "mc": "<font color='red'>添加供应商</font>" });
    objSp.push({ "dm": "-1", "mc": "<font color='red'>添加药品</font>" });
    objKpdw.push({ "dm": "-1", "mc": "<font color='red'>添加开票单位</font>" });

    //其他变量
    var sign = "";
    var inputtype = "";
    var strForm = "";
    var strAppendTmp = "";
    var strPrice = 0;

    //生成动态html
    strForm += "<ul>";
    for (var i = 1; i < objNames.length; i++) {

        if (objIndexs[i]["name"] == "c2" || objIndexs[i]["name"] == "b3"
            || objIndexs[i]["name"] == "b2" || objIndexs[i]["name"] == "id"
            || objIndexs[i]["name"] == "b1" || objIndexs[i]["name"] == "c1"
            || objIndexs[i]["name"] == "jldm" || objIndexs[i]["name"] == "cz"
            || objIndexs[i]["name"] == "b2" || objIndexs[i]["name"] == "kpdwmc" || objIndexs[i]["name"] == "kpsl" || objIndexs[i]["name"] == "c4") {
            continue;
        }

        //判断是否必填，加样式
        if (objIndexs[i]["editrules"] != null) {
            if (objIndexs[i]["editrules"].required == true) {
                sign = "<font color='red'>*</font>";
            }
            else {
                sign = "";
            }
        }

        if (objIndexs[i]["edittype"] == "text") {
            if (objIndexs[i]["index"] == "a2") {
                strAppendTmp += "<li>";
                strAppendTmp += sign;
                strAppendTmp += objNames[i] + "：";
                strAppendTmp += "<input type='text'  value=''  name='" + objIndexs[i]["name"] + "'";
                strAppendTmp += " id='" + objIndexs[i]["name"] + "' "; //限制输入长度
                strAppendTmp += " onkeypress='return checkValidate(event)' onpaste='return validatePaste()'/>"; //限制输入，粘贴特殊字符
                strAppendTmp += "</li>";
            }
            else {
                strAppendTmp += "<li>";
                strAppendTmp += sign;
                strAppendTmp += objNames[i] + "：";
                strAppendTmp += "<input type='text'  value=''  name='" + objIndexs[i]["name"] + "'";
                strAppendTmp += " id='" + objIndexs[i]["name"] + "' maxlength='30'"; //限制输入长度
                strAppendTmp += " onkeypress='return checkValidate(event)' onpaste='return validatePaste()'/>"; //限制输入，粘贴特殊字符
                strAppendTmp += "</li>";
            }
        }
        if (objIndexs[i]["edittype"] == "checkbox") {
            strAppendTmp += "<li class=\"unline\">";
            strAppendTmp += sign;
            strAppendTmp += objNames[i] + "：";
            strAppendTmp += "<input type='checkbox' value=''  name='" + objIndexs[i]["name"] + "'";
            strAppendTmp += " id='" + objIndexs[i]["name"] + "' maxlength='50'"; //限制输入长度
            strAppendTmp += " onkeypress='return checkValidate(event)' onpaste='return validatePaste()'/>"; //限制输入，粘贴特殊字符
            strAppendTmp += "</li>";
        }
        if (objIndexs[i]["edittype"] == "select") {
            strAppendTmp += "<li>";
            strAppendTmp += sign + objNames[i] + "：";
            strAppendTmp += "<select name='" + objIndexs[i]["name"] + "' id='" + objIndexs[i]["name"] + "'";
            strAppendTmp += " class='easyui-combobox'>";
            strAppendTmp += "</select>";
            strAppendTmp += "</li>";
        }

    }
    strForm += strAppendTmp;
    strForm += "</ul>";

    //添加到层里
    $("#" + strDialogP060701 + "_divform").append(strForm);

    //供应商
    $("#gysdm", "#" + strDialogP060701).combobox({
        textField: "mc",
        valueField: "dm",
        editable: true,
        onChange: function (newValue, oldValue) {
            $("#" + strDialogP060701 + "_divform").data("change", true);
        },
        afterChange: function (newValue, newText) {
            if (newValue == "-1") {
                ciho.IniData({ id: "divAddType", title: "供应商", table: "Tflxx", page: "p0607" }, { jquery: $("#gysdm", "#" + strDialogP060701), model: "Tgysxx" });
                ciho.showTypeDialog();
            }
        }
    });
    if (objGys != "{}") {
        $("#gysdm", "#" + strDialogP060701).combobox("loadData", objGys);
    }

    //商品
    $("#spdm", "#" + strDialogP060701).combobox({
        textField: "mc",
        valueField: "dm",
        onChange: function (newValue, oldValue) {
            $("#" + strDialogP060701 + "_divform").data("change", true);
        },
        onSelect: function (strRecord) {
            //            var strValue = strRecord.dm;
            //            if (objSp != "{}") {
            //                for (var j = 0; j < objSp.length; j++) {
            //                    if (objSp[j].dm == strValue) {
            //                        var strData = parseFloat(objSp[j].a13);
            //                        if (!isNaN(strData)) {
            //                            $("#a4", "#" + strDialogP060701).val(parseFloat(objSp[j].a13).toFixed(window.parent.strPricePlace));
            //                        }
            //                    }
            //                }
            //            }
        },
        afterChange: function (newValue, newText) {
            if (newValue == "-1") {
                ciho.IniData({ id: "divAddType", title: "药品", table: "Tflxx", page: "p0607" }, { jquery: $("#spdm", "#" + strDialogP060701), model: "Tspxx" });
                ciho.showTypeDialog();
            }
        }
    });
    if (objSp != "{}") {
        $("#spdm", "#" + strDialogP060701).combobox("loadData", objSp);
    }

    //单价
    $("#a4", "#" + strDialogP060701).autoNumeric({ mDec: window.parent.strPricePlace, aSep: "" }).focus(function () { this.select(); }).css("ime-mode", "disabled");
    $("#a4", "#" + strDialogP060701).blur(function () {
        var strA4 = parseFloat(trim($(this).val()));
        var strA5 = parseFloat(trim($("#a5", "#" + strDialogP060701).val()));
        if (!isNaN(strA4) && !isNaN(strA5)) {
            $("#a10", "#" + strDialogP060701).val(parseFloat(strA4 * strA5).toFixed(window.parent.strMoneyPlace));
        } else {
            $("#a10", "#" + strDialogP060701).val("");
        }

    });

    //数量
    $("#a5", "#" + strDialogP060701).autoNumeric({ mDec: window.parent.strCountPlace, aSep: "", aNeg: '-' }).focus(function () { this.select(); }).css("ime-mode", "disabled");
    $("#a5", "#" + strDialogP060701).blur(function () {
        var strA5 = parseFloat($(this).val());
        var strA4 = parseFloat($("#a4").val());
        if (!isNaN(strA5) && !isNaN(strA4)) {
            $("#a10", "#" + strDialogP060701).val(parseFloat(strA4 * strA5).toFixed(window.parent.strMoneyPlace));
        }
        else {
            $("#a10", "#" + strDialogP060701).val("");
        }

    });

    //是否带票
    $("#a7", "#" + strDialogP060701).change(function () {
        if (true == $(this)[0].checked) {

            $("#a8", "#" + strDialogP060701).attr("disabled", false);
            $("#a9", "#" + strDialogP060701).attr("disabled", false);
            $("#kpdwdm", "#" + strDialogP060701).combobox("enable");

            //带出以上数据
            if (!$("#a8", "#" + strDialogP060701).val()) {
                $("#a8", "#" + strDialogP060701).val($("#a5", "#" + strDialogP060701).val());
            }
            if (!$("#a9", "#" + strDialogP060701).val()) {
                $("#a9", "#" + strDialogP060701).val($("#a4", "#" + strDialogP060701).val());
            }
            if (!$("#a11", "#" + strDialogP060701).val()) {
                $("#a11", "#" + strDialogP060701).val($("#a10", "#" + strDialogP060701).val());
            }
        }
        else {
            $("#a8", "#" + strDialogP060701).val("");
            $("#a9", "#" + strDialogP060701).val("");
            $("#a11", "#" + strDialogP060701).val("");
            $("#kpdwdm", "#" + strDialogP060701).combobox("setValue", "");
            $("#a8", "#" + strDialogP060701).attr("disabled", true);
            $("#a9", "#" + strDialogP060701).attr("disabled", true);
            $("#kpdwdm", "#" + strDialogP060701).combobox("disable");
        }
    });

    //未开数量
    $("#a8", "#" + strDialogP060701).blur(function () {
        var strA8 = parseFloat($(this).val());
        if (!isNaN(strA8)) {
            $(this).val(strA8.toFixed(window.parent.strCountPlace));
            var strA9 = parseFloat($("#a9").val());
            if (!isNaN(strA9)) {
                $("#a11").val(parseFloat(strA8 * strA9).toFixed(window.parent.strMoneyPlace));
            }

        }
        else {
            $("#a11").val("");
        }
    });
    $("#a8", "#" + strDialogP060701).autoNumeric({ mDec: window.parent.strCountPlace, aSep: "", aNeg: '-' }).focus(function () { this.select(); }).css("ime-mode", "disabled");

    //未开单价
    $("#a9", "#" + strDialogP060701).blur(function () {

        var strA9 = parseFloat($(this).val());
        if (!isNaN(strA9)) {
            $(this).val(strA9.toFixed(window.parent.strPricePlace));
            var strA8 = parseFloat($("#a8").val());
            if (!isNaN(strA8)) {
                $("#a11").val(parseFloat(strA8 * strA9).toFixed(window.parent.strMoneyPlace));
            }
        }
        else {
            $("#a11").val("");
        }
    });
    $("#a9", "#" + strDialogP060701).autoNumeric({ mDec: window.parent.strPricePlace, aSep: "" }).focus(function () { this.select(); }).css("ime-mode", "disabled");

    //开票单位
    $("#kpdwdm", "#" + strDialogP060701).combobox({
        textField: "mc",
        valueField: "dm",
        editable: true,
        onChange: function (newValue, oldValue) {
            $("#" + strDialogP060701 + "_divform").data("change", true);
        },
        afterChange: function (newValue, newText) {
            if (newValue == "-1") {
                ciho.IniData({ id: "divAddType", title: "开票单位", table: "Tflxx", page: "p0607" }, { jquery: $("#kpdwdm", "#" + strDialogP060701), model: "Tkpdwxx" });
                ciho.showTypeDialog();
            }
        }
    });
    if (objKpdw != "{}") {
        $("#kpdwdm", "#" + strDialogP060701).combobox("loadData", objKpdw);
    }

    //时间控件
    inputAndBindData("a6", false, "#" + strDialogP060701);
    $("#a6", $("#" + strDialogP060701 + "_divform")).blur(function () {
        $("#" + strDialogP060701 + "_divform").data("change", true);
    });

    //修改时，加载value
    var bGysdm = false;
    var strB1Mc = "";
    var bSpdm = false;
    var strC1Mc = "";
    var strKpdw = false;
    var strKpmc = "";
    var strDate;

    if (strSaveSign == '2') {
        for (var i = 0; i < objIndexs.length; i++) {
            objRecordsP060701 = objTable.getRowData(strId);
            var bPage = objTable.jqGrid('getCell', strId, i);
            if (objIndexs[i].name == "a7") {
                if (bPage == "1") {
                    $("#a7").attr("checked", true);
                    $("#a8").attr("disabled", false);
                    $("#a9").attr("disabled", false);
                }
                else {
                    $("#a7")[0].checked = false;
                    $("#a8").attr("disabled", true);
                    $("#a9").attr("disabled", true);
                }
            }
            else if (objIndexs[i].name == "gysdm") { //b1
                if (bPage != "-1" && bPage != "" && bPage != "undefined") {
                    strGysdmP060701 = bPage;
                    $("#gysdm", "#" + strDialogP060701).combobox('setValue', bPage);
                    if ($("#gysdm", "#" + strDialogP060701).combobox('getValue') == bPage) {
                        bGysdm = true;
                    }
                }
            }
            else if (objIndexs[i].name == "kpdwdm" && bPage != undefined) {
                strKpdwdmP060701 = bPage;
                $("#kpdwdm", "#" + strDialogP060701).combobox("setValue", bPage);
                if ($("#kpdwdm", "#" + strDialogP060701).combobox('getValue') == bPage) {
                    strKpdw = true;
                }
            }
            else if (objIndexs[i].name == "b1") {
                strB1Mc = bPage;
            }
            else if (objIndexs[i].name == "c1") {
                strC1Mc = bPage;
            }
            else if (objIndexs[i].name == "kpdwmc") {
                strKpmc = bPage;
            }
            else if (objIndexs[i].name == "spdm") {//c1
                if (bPage != "-1" && bPage != "" && bPage != "undefined") {
                    strYpdmP060701 = bPage;
                    $("#spdm", "#" + strDialogP060701).combobox('setValue', bPage);
                    if ($("#spdm", "#" + strDialogP060701).combobox('getValue') == bPage) {
                        bSpdm = true;
                    }
                }
            }
            else {
                $('#' + objIndexs[i].name, "#" + strDialogP060701 + "_divform").val(bPage);
            }
        }

        //true表示停用
        if (bGysdm == true) {
            $("#gysdm", "#" + strDialogP060701).combobox('setText', strB1Mc);
        }
        if (bSpdm == true) {
            $("#spdm", "#" + strDialogP060701).combobox('setText', strC1Mc);
        }
        if (strKpdw == true) {
            $("#kpdwdm", "#" + strDialogP060701).combobox('setText', strKpmc);
        }
    }

    //设置状态
    if ($("#a7", "#" + strDialogP060701)[0].checked == false) {
        $("#a10", "#" + strDialogP060701).attr("disabled", true);
        $("#a11", "#" + strDialogP060701).attr("disabled", true);
        $("#a8", "#" + strDialogP060701).attr("disabled", true);
        $("#a9", "#" + strDialogP060701).attr("disabled", true);
        $("#kpdwdm", "#" + strDialogP060701).combobox("disable");
    }

    //设定状态
    $("#a10", "#" + strDialogP060701).attr("disabled", true);
    $("#a11", "#" + strDialogP060701).attr("disabled", true);


    $("#a6", "#" + strDialogP060701).val(strStateDate);

    $("#a6", "#" + strDialogP060701).attr("disabled", true);

    //层加change事件
    $(":input", $("#" + strDialogP060701 + "_divform")).change(function () {
        $("#" + strDialogP060701 + "_divform").data("change", true);
    });
    $("#" + strDialogP060701 + "_divform").data("change", false);

    //设置层序
    $(".layoutpanel").css("z-index", "50000009");

    setTimeout(function () { $("#a2", "#" + strDialogP060701).focus(); }, 100);
    //释放内存
    objTable = null;

}

//验证表单
function formDataValidate_Yfqc() {

    //供应商不能为空
    if (!$("#gysdm", "#" + strDialogP060701).combobox('getValue')) {
        //修改时，验证数据是否是停用的数据
        if (strSaveSign == "2" && $("#gysdm", $("#" + strDialogP060701 + "_divform")).combobox('getText') == objRecordsP060701.b1) {
            $("#gysdm", $("#" + strDialogP060701 + "_divform")).combobox("setValue", strGysdmP060701);
            $("#gysdm", $("#" + strDialogP060701 + "_divform")).combobox("setText", objRecordsP060701.b1);
        }
        else {
            window.parent.cihoAlert(msg.sz.gys.empOrNotExit, null, function () { $("#gysdm", "#" + strDialogP060701).combobox("focus"); });
            return false;
        }
    }

    //药品不能为空
    if (!$("#spdm", "#" + strDialogP060701).combobox('getValue')) {
        //修改时，验证数据是否是停用的数据
        if (strSaveSign == "2" && $("#spdm", $("#" + strDialogP060701 + "_divform")).combobox('getText') == objRecordsP060701.c1) {
            $("#spdm", $("#" + strDialogP060701 + "_divform")).combobox("setValue", strYpdmP060701);
            $("#spdm", $("#" + strDialogP060701 + "_divform")).combobox("setText", objRecordsP060701.c1);
        }
        else {
            window.parent.cihoAlert(msg.sz.yp.empOrNotExit, null, function () { $("#spdm", "#" + strDialogP060701).combobox("focus"); });
            return false;
        }
    }

    //验证必填项
    if (false == dataRequired(strTableNameP060701, strDialogP060701)) {
        return false;
    }

    //验证日期
    if (checkDatePattern($("#a6", "#" + strDialogP060701).val()) == false) {
        window.parent.cihoAlert(msg.dt.dtTypeErr, msgBox.dlgBtn.Ok, null, function () { $("#a6", "#" + strDialogP060701).focus(); });
        return false;
    }

    //计算金额和带票金额
    var strA4 = parseFloat($("#a4", "#" + strDialogP060701).val());
    var strA5 = parseFloat($("#a5", "#" + strDialogP060701).val());
    var strA8 = parseFloat($("#a8", "#" + strDialogP060701).val());
    var strA9 = parseFloat($("#a9", "#" + strDialogP060701).val());

    //判断单价是否是非数字
    if (isNaN(strA5)) {
        window.parent.cihoAlert(msg.other.slNoEffecTiveNum, null, function () { $("#a5", "#" + strDialogP060701).focus(); });
        return false;
    }

    $("#a10", "#" + strDialogP060701).val(strA4 * strA5);
    if (!isNaN(strA8) && !isNaN(strA9)) {
        $("#a11", "#" + strDialogP060701).val(strA8 * strA9);
    }

    // 合计数过大
    var strA10 = parseFloat($("#a10", "#" + strDialogP060701).val());
    if (!isNaN(strA10)) {
        if (strA10 > window.parent._MaxPerBill) {
            window.parent.cihoAlert(msg.other.moneyOversize, null, function () { $("#a4", "#" + strDialogP060701).focus(); });
            return false;
        }
    }

    //是否带票
    if ($("#a7", "#" + strDialogP060701)[0].checked == true) {

        //带票数量，单价不能为空
        if (!$("#a8", "#" + strDialogP060701).val()) {              //未开数量为空时
            window.parent.cihoAlert(msg.sz.qc.isDaiPiaoCount, null, function () { $("#a8", "#" + strDialogP060701).focus(); });
            return false;
        }
        if (!$("#a9", "#" + strDialogP060701).val()) {          //未开单价为空时
            window.parent.cihoAlert(msg.sz.qc.isDaiPiaoPrice, null, function () { $("#a9", "#" + strDialogP060701).focus(); });
            return false;
        }

        //开票单位不能为空
        if (!$("#kpdwdm").combobox('getValue')) {
            //修改时，验证数据是否是停用的数据
            if (strSaveSign == "2" && $("#kpdwdm", $("#" + strDialogP060701 + "_divform")).combobox('getText') == objRecordsP060701.kpdwmc && objRecordsP060701.kpdwmc != "") {
                $("#kpdwdm", $("#" + strDialogP060701 + "_divform")).combobox("setValue", strKpdwdmP060701);
                $("#kpdwdm", $("#" + strDialogP060701 + "_divform")).combobox("setText", objRecordsP060701.kpdwmc);
            }
            else {
                window.parent.cihoAlert(msg.other.kpdwNoEmpty, null, function () { $("#kpdwdm", "#" + strDialogP060701).combobox("focus"); });
                return false;
            }
        }

        //判断单价是否是非数字
        if (isNaN(strA8)) {
            window.parent.cihoAlert(msg.other.wkslNoEffecTiveNum, null, function () { $("#a8", "#" + strDialogP060701).focus(); });
            return false;
        }

        //判断合计数
        var strA11 = parseFloat($("#a11", "#" + strDialogP060701).val());
        if (!isNaN(strA11)) {
            if (strA11 > window.parent._MaxPerBill) {
                window.parent.cihoAlert(msg.other.djhjExtent, null, function () { $("#a8", "#" + strDialogP060701).focus(); });
                return false;
            }
        }

        //未开金额不能等于零
        if (strA8 * strA9 == 0) {
            window.parent.cihoAlert(msg.other.wkMoneyOrNotExit, null, function () {
                if (strA8 == 0) {
                    $("#a8", "#" + strDialogP060701).focus();
                }
                else {
                    $("#a9", "#" + strDialogP060701).focus();
                }

            });
            return false;
        }

    }

    return true;
}

//保存字符串
function GetSaveStr_Yfqc() {

    //input框的字符串
    var strJsonString = getSaveDataInfo(strDialogP060701);

    //其他控件
    var MyStr = ",\"gysdm\":" + "\"" + $("#gysdm", "#" + strDialogP060701).combobox('getValue') + "\"";
    MyStr += ",\"spdm\":" + "\"" + $("#spdm", "#" + strDialogP060701).combobox('getValue') + "\"";

    var strKpdwdm = $("#kpdwdm", "#" + strDialogP060701).combobox('getValue');
    if (strKpdwdm != undefined) {
        var objKpdw = window.parent._arrCmbKpdw.Records;

        MyStr += ",\"kpdwdm\":" + "\"" + strKpdwdm + "\"";
        for (var i = 0; i < objKpdw.length; i++) {
            if (objKpdw[i].dm == strKpdwdm) {

                MyStr += ",\"kpsl\":" + "\"" + objKpdw[i].dksl + "\"";
            }
        }

    }
    strJsonString = strJsonString.replace("}", MyStr);
    strJsonString += ",\"kmdm\":\"" + strKmdmP0607 + "\"";

    if (strSaveSign == "2") {
        var objRow = $("#" + strTableNameP060701).getRowData(strSelRowIdP060701);
        strJsonString += ",\"jldm\":\"" + objRow.jldm + "\"";
    }
    strJsonString += "}"
    return strJsonString;

}

//保存应付期初
function SaveYfqc(strType) {

    //验证
    if (formDataValidate_Yfqc() == false) {
        return;
    }

    //获取要保存的字符串
    var strRecord = GetSaveStr_Yfqc();

    //保存数据库
    var objResult = saveData(strTableNameP060701, strRecord, strSaveSign);

    //保存失败
    if (objResult.ReturnCode != "0") {
        window.parent.cihoAlert(objResult.MSG);
        return;
    }

    //重新加载表格数据
    searchDataP060701();

    //添加操作按钮
    //addCzHtmlP060701();

    if (strType == "2") {

        //保存新增
        $(":input", $("#" + strDialogP060701 + "_divform")).val("");
        $("#gysdm", "#" + strDialogP060701).combobox('setValue', "");
        $("#spdm", "#" + strDialogP060701).combobox('setValue', "");
        $("#kpdwdm", "#" + strDialogP060701).combobox('setValue', "");

        $("#a6", "#" + strDialogP060701).val(strStateDate);
        $("#a7", "#" + strDialogP060701)[0].checked = false;
        if ($("#a7", "#" + strDialogP060701)[0].checked == false) {
            $("#a10", "#" + strDialogP060701).attr("disabled", true);
            $("#a11", "#" + strDialogP060701).attr("disabled", true);
            $("#a8", "#" + strDialogP060701).attr("disabled", true);
            $("#a9", "#" + strDialogP060701).attr("disabled", true);
            $("#kpdwdm", "#" + strDialogP060701).combobox("disable");
        }
        setTimeout(function () { $("#a2", "#" + strDialogP060701).focus(); }, 100);

    }
    else {

        //退出改变值
        cihoDlgClose(strDialogP060701);
    }

    //标志位变为1
    strSaveSign = "1";

    //改变层的change状态
    $("#" + strDialogP060701 + "_divform").data("change", false);

    //释放内存
    strRecord = null;
    strTable = null;
    objTable = null;

}

//删除
function deleteYfqcRow(rowId) {

    //取得要删除数据的名称
    var objCurrent = $("#" + strTableNameP060701).getRowData(rowId);

    window.parent.cihoAlert(msg.del.delConfirm, msgBox.dlgBtn.YesNo, function (result) {

        if (result == msgBox.dlgRst.Yes) {
            var objTr = $("#" + strTableNameP060701).getRowData(rowId);

            var strJsonData = "{\"kmdm\":\"" + strKmdmP0607 + "\",\"jldm\":\"" + objTr.jldm + "\"}";

            //数据库删除
            var objResult = ParseData(window.external.DoOptions(strTableNameP060701, 'Delete', strJsonData));

            //数据库删除失败
            if (objResult == null || objResult.ReturnCode == undefined) {
                window.parent.cihoAlert(msg.del.delFail);
                return;
            }

            //保存失败时弹出提示信息
            if (objResult.ReturnCode != 0) {
                window.parent.cihoAlert(objResult.MSG);
                return;
            }

            //前台删除
            $("#" + strTableNameP060701).jqGrid("delRowData", rowId);

            //计算合计
            searchDataP060701();

            //清除浮动层的内容
            $(".operate").remove();

        }
    });
}
