/**
 * Created by zhang on 2018/9/10.
 */
$(document).ready(function () {
    const locked = lockUtil.getLocked();
    lockUtil.lockTools($(document.body), locked);
    try {
        let tem = JSON.parse($("#originalMainCol").val());
        tem = sortJson(tem);
        $("#mainTreeCol").val(JSON.stringify(tem,null,4));
    }catch (err){
        console.log(err);
    }

    $("#format").click( function() {
        try {
            let jsonText =  $("#mainTreeCol").val();
            $("#mainTreeCol").val(JSON.stringify(JSON.parse(jsonText),null,4));
        }catch (err){
            console.log(err);
            alert("输入的JSON格式有误，请重新输入！");
        }

    })
    $("#save").click(async function() {
        try {
            let libID = $("#libID").val();
            let jsonText =  $("#mainTreeCol").val();
            if(jsonText.indexOf("'")!=-1){
                alert("输入的格式不能包含 ' 位于："+jsonText.substr(jsonText.indexOf("'")-15,18));
                return;
            }
            //测试能不能转换
             JSON.parse(jsonText);
            let newCol = await ajaxPost("/mainTreeCol/saveLib",{query:{ID:libID},data:{main_tree_col:jsonText}});
        }catch (err){
            console.log(err);
            alert("保存失败，请查看输入数据");
        }
    })
    $("#createNormal").click(async function() {
        let mainTreeCol = {"treeCol":1,"headRows":1,"headRowHeight":[36],"emptyRows":3,"cols":[{"width":50,"visible":false,"readOnly":"readOnly.subType","head":{"vAlign":[1],"titleNames":["类别"],"spanRows":[1],"spanCols":[1],"hAlign":[1],"font":["Arial"]},"data":{"wordWrap":false,"vAlign":1,"hAlign":1,"getText":"getText.subType","font":"Arial","field":"subType","cellType":"cellType.subType"},"customize":false},{"width":170,"visible":true,"readOnly":"readOnly.forCode","head":{"vAlign":[1],"titleNames":["项目编码"],"spanRows":[1],"spanCols":[1],"hAlign":[1],"font":["Arial"]},"data":{"wordWrap":false,"vAlign":1,"hAlign":0,"getText":"getText.code","font":"Arial","field":"code"},"customize":false},{"width":200,"visible":true,"showHint":true,"readOnly":"readOnly.forName","head":{"vAlign":[1],"titleNames":["项目名称"],"spanRows":[1],"spanCols":[1],"hAlign":[1],"font":["Arial"]},"data":{"wordWrap":false,"vAlign":1,"hAlign":0,"font":"Arial","field":"name"},"customize":false},{"width":60,"visible":true,"readOnly":"readOnly.forUnit","head":{"vAlign":[1],"titleNames":["计量\n单位"],"spanRows":[1],"spanCols":[1],"hAlign":[1],"font":["Arial"]},"data":{"wordWrap":false,"vAlign":1,"hAlign":1,"font":"Arial","field":"unit","cellType":"cellType.unit"},"customize":false},{"width":100,"visible":false,"readOnly":"readOnly.forContentCharacter","head":{"vAlign":[1],"titleNames":["工作内容"],"spanRows":[1],"spanCols":[1],"hAlign":[1],"font":["Arial"]},"data":{"wordWrap":true,"vAlign":1,"hAlign":[1],"font":"Arial","field":"jobContentText"},"customize":false},{"width":200,"visible":false,"readOnly":"readOnly.forContentCharacter","head":{"vAlign":[1],"titleNames":["项目特征"],"spanRows":[1],"spanCols":[1],"hAlign":[1],"font":["Arial"]},"data":{"wordWrap":true,"vAlign":1,"hAlign":[1],"font":"Arial","field":"itemCharacterText"},"customize":false},{"width":70,"visible":false,"readOnly":"readOnly.forContain","head":{"vAlign":[1],"titleNames":["含量"],"spanRows":[1],"spanCols":[1],"hAlign":[1],"font":["Arial"]},"data":{"wordWrap":false,"vAlign":1,"hAlign":2,"font":"Arial","field":"contain"},"customize":false},{"width":70,"visible":true,"showHint":true,"readOnly":"readOnly.forQuantity","head":{"vAlign":[1],"titleNames":["工程量"],"spanRows":[1],"spanCols":[1],"hAlign":[1],"font":["Arial"]},"data":{"wordWrap":false,"vAlign":1,"hAlign":2,"getText":"getText.quantity","font":"Arial","field":"quantity","cellType":"cellType.quantity"},"customize":false},{"width":80,"visible":false,"readOnly":true,"head":{"vAlign":[1],"titleNames":["工程量表达式"],"spanRows":[1],"spanCols":[1],"hAlign":[1],"font":["Arial"]},"data":{"wordWrap":false,"vAlign":1,"hAlign":2,"font":"Arial","field":"quantityEXP"},"customize":false},{"width":80,"visible":true,"readOnly":"readOnly.commonUnitFee","head":{"vAlign":[1],"titleNames":["综合单价"],"spanRows":[1],"spanCols":[1],"hAlign":[1],"font":["Arial"]},"data":{"wordWrap":false,"vAlign":1,"hAlign":2,"font":"Arial","field":"feesIndex.common.unitFee"},"customize":false},{"width":100,"visible":true,"readOnly":"readOnly.commonTotalFee","head":{"vAlign":[1],"titleNames":["综合合价"],"spanRows":[1],"spanCols":[1],"hAlign":[1],"font":["Arial"]},"data":{"wordWrap":false,"vAlign":1,"hAlign":2,"font":"Arial","field":"feesIndex.common.totalFee","cellType":"cellType.commonTotalFee"},"customize":false},{"width":70,"visible":true,"readOnly":"readOnly.forMarketPrice","head":{"vAlign":[1],"titleNames":["市场单价"],"spanRows":[1],"spanCols":[1],"hAlign":[1],"font":["Arial"]},"data":{"wordWrap":false,"vAlign":1,"hAlign":2,"getText":"getText.marketPrice","font":"Arial","field":"marketUnitFee"},"customize":false},{"width":70,"visible":true,"readOnly":true,"head":{"vAlign":[1],"titleNames":["市场合价"],"spanRows":[1],"spanCols":[1],"hAlign":[1],"font":["Arial"]},"data":{"wordWrap":false,"vAlign":1,"hAlign":2,"font":"Arial","field":"marketTotalFee"},"customize":false},{"width":168,"visible":false,"showHint":true,"readOnly":true,"head":{"vAlign":[1],"titleNames":["子目换算状态"],"spanRows":[1],"spanCols":[1],"hAlign":[1],"font":["Arial"]},"data":{"wordWrap":true,"vAlign":1,"hAlign":0,"font":"Arial","field":"adjustState"},"customize":false},{"width":95,"visible":true,"showHint":true,"readOnly":"readOnly.forCalcBase","head":{"vAlign":[1],"titleNames":["计算基数"],"spanRows":[1],"spanCols":[1],"hAlign":[1],"font":["Arial"]},"data":{"wordWrap":false,"vAlign":1,"hAlign":0,"getText":"getText.calcBase","font":"Arial","field":"calcBase","cellType":"cellType.calcBase"},"customize":false},{"width":58,"visible":true,"readOnly":"readOnly.forFeeRate","head":{"vAlign":[1],"titleNames":["费率(%)"],"spanRows":[1],"spanCols":[1],"hAlign":[1],"font":["Arial"]},"data":{"wordWrap":false,"vAlign":1,"hAlign":2,"getText":"getText.feeRate","font":"Arial","field":"feeRate","cellType":"cellType.feeRate"},"customize":false},{"width":80,"visible":true,"readOnly":"readOnly.calcProgramName","head":{"vAlign":[1],"titleNames":["取费专业"],"spanRows":[1],"spanCols":[1],"hAlign":[1],"font":["Arial"]},"data":{"wordWrap":false,"vAlign":1,"hAlign":0,"getText":"getText.calcProgramName","font":"Arial","field":"programID","cellType":"cellType.calcProgramName"},"customize":false},{"width":120,"visible":false,"showHint":true,"readOnly":"readOnly.forRuleText","head":{"vAlign":[1],"titleNames":["工程量计算规则"],"spanRows":[1],"spanCols":[1],"hAlign":[1],"font":["Arial"]},"data":{"wordWrap":false,"vAlign":1,"hAlign":0,"font":"Arial","field":"ruleText"},"customize":false},{"width":80,"visible":false,"readOnly":true,"head":{"vAlign":[1],"titleNames":["暂估单价"],"spanRows":[1],"spanCols":[1],"hAlign":[1],"font":["Arial"]},"data":{"wordWrap":false,"vAlign":1,"hAlign":2,"font":"Arial","field":"feesIndex.estimate.unitFee"},"customize":false},{"width":80,"visible":false,"readOnly":true,"head":{"vAlign":[1],"titleNames":["暂估合价"],"spanRows":[1],"spanCols":[1],"hAlign":[1],"font":["Arial"]},"data":{"wordWrap":false,"vAlign":1,"hAlign":2,"font":"Arial","field":"feesIndex.estimate.totalFee"},"customize":false},{"width":40,"visible":false,"readOnly":true,"head":{"vAlign":[1],"titleNames":["暂估"],"spanRows":[1],"spanCols":[1],"hAlign":[1],"font":["Arial"]},"data":{"wordWrap":false,"vAlign":1,"hAlign":1,"font":"Arial","field":"isEstimate","cellType":"cellType.isEstimate"},"customize":false},{"width":120,"visible":true,"readOnly":"readOnly.glj","head":{"vAlign":[1],"titleNames":["备注"],"spanRows":[1],"spanCols":[1],"hAlign":[1],"font":["Arial"]},"data":{"wordWrap":false,"vAlign":1,"hAlign":0,"font":"Arial","field":"remark"},"customize":false},{"width":80,"visible":false,"readOnly":true,"head":{"vAlign":[1],"titleNames":["人工费\n单价"],"spanRows":[1],"spanCols":[1],"hAlign":[1],"font":["Arial"]},"data":{"wordWrap":false,"vAlign":1,"hAlign":2,"font":"Arial","field":"feesIndex.labour.unitFee"},"customize":false},{"width":80,"visible":false,"readOnly":true,"head":{"vAlign":[1],"titleNames":["材料费\n单价"],"spanRows":[1],"spanCols":[1],"hAlign":[1],"font":["Arial"]},"data":{"wordWrap":false,"vAlign":1,"hAlign":2,"font":"Arial","field":"feesIndex.material.unitFee"},"customize":false},{"width":80,"visible":false,"readOnly":true,"head":{"vAlign":[1],"titleNames":["施工机具使用费\n单价"],"spanRows":[1],"spanCols":[1],"hAlign":[1],"font":["Arial"]},"data":{"wordWrap":false,"vAlign":1,"hAlign":2,"font":"Arial","field":"feesIndex.machine.unitFee"},"customize":false},{"width":80,"visible":false,"readOnly":true,"head":{"vAlign":[1],"titleNames":["主材费\n单价"],"spanRows":[1],"spanCols":[1],"hAlign":[1],"font":["Arial"]},"data":{"wordWrap":false,"vAlign":1,"hAlign":2,"font":"Arial","field":"feesIndex.mainMaterial.unitFee"},"customize":false},{"width":80,"visible":false,"readOnly":true,"head":{"vAlign":[1],"titleNames":["未计价材料费\n单价"],"spanRows":[1],"spanCols":[1],"hAlign":[1],"font":["Arial"]},"data":{"wordWrap":false,"vAlign":1,"hAlign":2,"font":"Arial","field":"feesIndex.unratedMaterial.unitFee"},"customize":false},{"width":80,"visible":false,"readOnly":true,"head":{"vAlign":[1],"titleNames":["定额综合\n单价"],"spanRows":[1],"spanCols":[1],"hAlign":[1],"font":["Arial"]},"data":{"wordWrap":false,"vAlign":1,"hAlign":2,"font":"Arial","field":"feesIndex.rationUnitPrice.unitFee"},"customize":false},{"width":80,"visible":false,"readOnly":true,"head":{"vAlign":[1],"titleNames":["企业管理费\n单价"],"spanRows":[1],"spanCols":[1],"hAlign":[1],"font":["Arial"]},"data":{"wordWrap":false,"vAlign":1,"hAlign":2,"font":"Arial","field":"feesIndex.manage.unitFee"},"customize":false},{"width":80,"visible":false,"readOnly":true,"head":{"vAlign":[1],"titleNames":["利润\n单价"],"spanRows":[1],"spanCols":[1],"hAlign":[1],"font":["Arial"]},"data":{"wordWrap":false,"vAlign":1,"hAlign":2,"font":"Arial","field":"feesIndex.profit.unitFee"},"customize":false},{"width":80,"visible":false,"readOnly":true,"head":{"vAlign":[1],"titleNames":["一般风险费\n单价"],"spanRows":[1],"spanCols":[1],"hAlign":[1],"font":["Arial"]},"data":{"wordWrap":false,"vAlign":1,"hAlign":2,"font":"Arial","field":"feesIndex.risk.unitFee"},"customize":false},{"width":80,"visible":false,"readOnly":true,"head":{"vAlign":[1],"titleNames":["其他风险费\n单价"],"spanRows":[1],"spanCols":[1],"hAlign":[1],"font":["Arial"]},"data":{"wordWrap":false,"vAlign":1,"hAlign":2,"font":"Arial","field":"feesIndex.otherRisk.unitFee"},"customize":false},{"width":80,"visible":false,"readOnly":true,"head":{"vAlign":[1],"titleNames":["人工价差\n单价"],"spanRows":[1],"spanCols":[1],"hAlign":[1],"font":["Arial"]},"data":{"wordWrap":false,"vAlign":1,"hAlign":2,"font":"Arial","field":"feesIndex.labourDiff.unitFee"},"customize":false},{"width":80,"visible":false,"readOnly":true,"head":{"vAlign":[1],"titleNames":["材料价差\n单价"],"spanRows":[1],"spanCols":[1],"hAlign":[1],"font":["Arial"]},"data":{"wordWrap":false,"vAlign":1,"hAlign":2,"font":"Arial","field":"feesIndex.materialDiff.unitFee"},"customize":false},{"width":80,"visible":false,"readOnly":true,"head":{"vAlign":[1],"titleNames":["施工机具使用价差\n单价"],"spanRows":[1],"spanCols":[1],"hAlign":[1],"font":["Arial"]},"data":{"wordWrap":false,"vAlign":1,"hAlign":2,"font":"Arial","field":"feesIndex.machineDiff.unitFee"},"customize":false},{"width":80,"visible":false,"readOnly":true,"head":{"vAlign":[1],"titleNames":["组织措施费\n单价"],"spanRows":[1],"spanCols":[1],"hAlign":[1],"font":["Arial"]},"data":{"wordWrap":false,"vAlign":1,"hAlign":2,"font":"Arial","field":"feesIndex.organizeMeasures.unitFee"},"customize":false},{"width":80,"visible":false,"readOnly":true,"head":{"vAlign":[1],"titleNames":["安全文明施工费\n单价"],"spanRows":[1],"spanCols":[1],"hAlign":[1],"font":["Arial"]},"data":{"wordWrap":false,"vAlign":1,"hAlign":2,"font":"Arial","field":"feesIndex.safeCivilization.unitFee"},"customize":false},{"width":80,"visible":false,"readOnly":true,"head":{"vAlign":[1],"titleNames":["建设工程竣工档案编制费\n单价"],"spanRows":[1],"spanCols":[1],"hAlign":[1],"font":["Arial"]},"data":{"wordWrap":false,"vAlign":1,"hAlign":2,"font":"Arial","field":"feesIndex.document.unitFee"},"customize":false},{"width":80,"visible":false,"readOnly":true,"head":{"vAlign":[1],"titleNames":["住宅工程质量分户验收费\n单价"],"spanRows":[1],"spanCols":[1],"hAlign":[1],"font":["Arial"]},"data":{"wordWrap":false,"vAlign":1,"hAlign":2,"font":"Arial","field":"feesIndex.acceptance.unitFee"},"customize":false},{"width":80,"visible":false,"readOnly":true,"head":{"vAlign":[1],"titleNames":["规费\n单价"],"spanRows":[1],"spanCols":[1],"hAlign":[1],"font":["Arial"]},"data":{"wordWrap":false,"vAlign":1,"hAlign":2,"font":"Arial","field":"feesIndex.forceFee.totalFee"},"customize":false},{"width":80,"visible":false,"readOnly":true,"head":{"vAlign":[1],"titleNames":["税金\n单价"],"spanRows":[1],"spanCols":[1],"hAlign":[1],"font":["Arial"]},"data":{"wordWrap":false,"vAlign":1,"hAlign":2,"font":"Arial","field":"feesIndex.tax.unitFee"},"customize":false},{"width":80,"visible":false,"readOnly":true,"head":{"vAlign":[1],"titleNames":["增值税\n单价"],"spanRows":[1],"spanCols":[1],"hAlign":[1],"font":["Arial"]},"data":{"wordWrap":false,"vAlign":1,"hAlign":2,"font":"Arial","field":"feesIndex.VAT.totalFee"},"customize":false},{"width":80,"visible":false,"readOnly":true,"head":{"vAlign":[1],"titleNames":["附加税\n单价"],"spanRows":[1],"spanCols":[1],"hAlign":[1],"font":["Arial"]},"data":{"wordWrap":false,"vAlign":1,"hAlign":2,"font":"Arial","field":"feesIndex.surtax.totalFee"},"customize":false},{"width":80,"visible":false,"readOnly":true,"head":{"vAlign":[1],"titleNames":["环境保护税\n单价"],"spanRows":[1],"spanCols":[1],"hAlign":[1],"font":["Arial"]},"data":{"wordWrap":false,"vAlign":1,"hAlign":2,"font":"Arial","field":"feesIndex.environmentTax.totalFee"},"customize":false},{"width":80,"visible":false,"readOnly":true,"head":{"vAlign":[1],"titleNames":["人工费\n合价"],"spanRows":[1],"spanCols":[1],"hAlign":[1],"font":["Arial"]},"data":{"wordWrap":false,"vAlign":1,"hAlign":2,"font":"Arial","field":"feesIndex.labour.totalFee"},"customize":false},{"width":80,"visible":false,"readOnly":true,"head":{"vAlign":[1],"titleNames":["材料费\n合价"],"spanRows":[1],"spanCols":[1],"hAlign":[1],"font":["Arial"]},"data":{"wordWrap":false,"vAlign":1,"hAlign":2,"font":"Arial","field":"feesIndex.material.totalFee"},"customize":false},{"width":80,"visible":false,"readOnly":true,"head":{"vAlign":[1],"titleNames":["施工机具使用费\n合价"],"spanRows":[1],"spanCols":[1],"hAlign":[1],"font":["Arial"]},"data":{"wordWrap":false,"vAlign":1,"hAlign":2,"font":"Arial","field":"feesIndex.machine.totalFee"},"customize":false},{"width":80,"visible":false,"readOnly":true,"head":{"vAlign":[1],"titleNames":["主材费\n合价"],"spanRows":[1],"spanCols":[1],"hAlign":[1],"font":["Arial"]},"data":{"wordWrap":false,"vAlign":1,"hAlign":2,"font":"Arial","field":"feesIndex.mainMaterial.totalFee"},"customize":false},{"width":80,"visible":false,"readOnly":true,"head":{"vAlign":[1],"titleNames":["未计价材料费\n合价"],"spanRows":[1],"spanCols":[1],"hAlign":[1],"font":["Arial"]},"data":{"wordWrap":false,"vAlign":1,"hAlign":2,"font":"Arial","field":"feesIndex.unratedMaterial.totalFee"},"customize":false},{"width":80,"visible":false,"readOnly":true,"head":{"vAlign":[1],"titleNames":["定额综合\n合价"],"spanRows":[1],"spanCols":[1],"hAlign":[1],"font":["Arial"]},"data":{"wordWrap":false,"vAlign":1,"hAlign":2,"font":"Arial","field":"feesIndex.rationUnitPrice.totalFee"},"customize":false},{"width":80,"visible":false,"readOnly":true,"head":{"vAlign":[1],"titleNames":["企业管理费\n合价"],"spanRows":[1],"spanCols":[1],"hAlign":[1],"font":["Arial"]},"data":{"wordWrap":false,"vAlign":1,"hAlign":2,"font":"Arial","field":"feesIndex.manage.totalFee"},"customize":false},{"width":80,"visible":false,"readOnly":true,"head":{"vAlign":[1],"titleNames":["利润\n合价"],"spanRows":[1],"spanCols":[1],"hAlign":[1],"font":["Arial"]},"data":{"wordWrap":false,"vAlign":1,"hAlign":2,"font":"Arial","field":"feesIndex.profit.totalFee"},"customize":false},{"width":80,"visible":false,"readOnly":true,"head":{"vAlign":[1],"titleNames":["一般风险费\n合价"],"spanRows":[1],"spanCols":[1],"hAlign":[1],"font":["Arial"]},"data":{"wordWrap":false,"vAlign":1,"hAlign":2,"font":"Arial","field":"feesIndex.risk.totalFee"},"customize":false},{"width":80,"visible":false,"readOnly":true,"head":{"vAlign":[1],"titleNames":["其他风险费\n合价"],"spanRows":[1],"spanCols":[1],"hAlign":[1],"font":["Arial"]},"data":{"wordWrap":false,"vAlign":1,"hAlign":2,"font":"Arial","field":"feesIndex.otherrisk.totalFee"},"customize":false},{"width":80,"visible":false,"readOnly":true,"head":{"vAlign":[1],"titleNames":["人工价差\n合价"],"spanRows":[1],"spanCols":[1],"hAlign":[1],"font":["Arial"]},"data":{"wordWrap":false,"vAlign":1,"hAlign":2,"font":"Arial","field":"feesIndex.labourDiff.totalFee"},"customize":false},{"width":80,"visible":false,"readOnly":true,"head":{"vAlign":[1],"titleNames":["材料价差\n合价"],"spanRows":[1],"spanCols":[1],"hAlign":[1],"font":["Arial"]},"data":{"wordWrap":false,"vAlign":1,"hAlign":2,"font":"Arial","field":"feesIndex.materialDiff.totalFee"},"customize":false},{"width":80,"visible":false,"readOnly":true,"head":{"vAlign":[1],"titleNames":["施工机具使用价差\n合价"],"spanRows":[1],"spanCols":[1],"hAlign":[1],"font":["Arial"]},"data":{"wordWrap":false,"vAlign":1,"hAlign":2,"font":"Arial","field":"feesIndex.machineDiff.totalFee"},"customize":false},{"width":80,"visible":false,"readOnly":true,"head":{"vAlign":[1],"titleNames":["组织措施费\n合价"],"spanRows":[1],"spanCols":[1],"hAlign":[1],"font":["Arial"]},"data":{"wordWrap":false,"vAlign":1,"hAlign":2,"font":"Arial","field":"feesIndex.organizeMeasures.totalFee"},"customize":false},{"width":80,"visible":false,"readOnly":true,"head":{"vAlign":[1],"titleNames":["安全文明施工费\n合价"],"spanRows":[1],"spanCols":[1],"hAlign":[1],"font":["Arial"]},"data":{"wordWrap":false,"vAlign":1,"hAlign":2,"font":"Arial","field":"feesIndex.safeCivilization.totalFee"},"customize":false},{"width":80,"visible":false,"readOnly":true,"head":{"vAlign":[1],"titleNames":["建设工程竣工档案编制费\n合价"],"spanRows":[1],"spanCols":[1],"hAlign":[1],"font":["Arial"]},"data":{"wordWrap":false,"vAlign":1,"hAlign":2,"font":"Arial","field":"feesIndex.document.totalFee"},"customize":false},{"width":80,"visible":false,"readOnly":true,"head":{"vAlign":[1],"titleNames":["住宅工程质量分户验收费\n合价"],"spanRows":[1],"spanCols":[1],"hAlign":[1],"font":["Arial"]},"data":{"wordWrap":false,"vAlign":1,"hAlign":2,"font":"Arial","field":"feesIndex.acceptance.totalFee"},"customize":false},{"width":80,"visible":false,"readOnly":true,"head":{"vAlign":[1],"titleNames":["规费\n合价"],"spanRows":[1],"spanCols":[1],"hAlign":[1],"font":["Arial"]},"data":{"wordWrap":false,"vAlign":1,"hAlign":2,"font":"Arial","field":"feesIndex.forceFee.totalFee"},"customize":false},{"width":80,"visible":false,"readOnly":true,"head":{"vAlign":[1],"titleNames":["税金\n合价"],"spanRows":[1],"spanCols":[1],"hAlign":[1],"font":["Arial"]},"data":{"wordWrap":false,"vAlign":1,"hAlign":2,"font":"Arial","field":"feesIndex.tax.totalFee"},"customize":false},{"width":80,"visible":false,"readOnly":true,"head":{"vAlign":[1],"titleNames":["增值税\n合价"],"spanRows":[1],"spanCols":[1],"hAlign":[1],"font":["Arial"]},"data":{"wordWrap":false,"vAlign":1,"hAlign":2,"font":"Arial","field":"feesIndex.VAT.totalFee"},"customize":false},{"width":80,"visible":false,"readOnly":true,"head":{"vAlign":[1],"titleNames":["附加税\n合价"],"spanRows":[1],"spanCols":[1],"hAlign":[1],"font":["Arial"]},"data":{"wordWrap":false,"vAlign":1,"hAlign":2,"font":"Arial","field":"feesIndex.surtax.totalFee"},"customize":false},{"width":80,"visible":false,"readOnly":true,"head":{"vAlign":[1],"titleNames":["环境保护税\n合价"],"spanRows":[1],"spanCols":[1],"hAlign":[1],"font":["Arial"]},"data":{"wordWrap":false,"vAlign":1,"hAlign":2,"font":"Arial","field":"feesIndex.environmentTax.totalFee"},"customize":false},{"width":80,"visible":false,"readOnly":true,"head":{"vAlign":[1],"titleNames":["费用1\n单价"],"spanRows":[1],"spanCols":[1],"hAlign":[1],"font":["Arial"]},"data":{"wordWrap":false,"vAlign":1,"hAlign":2,"font":"Arial","field":"feesIndex.fee1.unitFee"},"customize":false},{"width":80,"visible":false,"readOnly":true,"head":{"vAlign":[1],"titleNames":["费用1\n合价"],"spanRows":[1],"spanCols":[1],"hAlign":[1],"font":["Arial"]},"data":{"wordWrap":false,"vAlign":1,"hAlign":2,"font":"Arial","field":"feesIndex.fee1.totalFee"},"customize":false}]};
        try {
            let jsonText =  JSON.stringify(sortJson(mainTreeCol));
            $("#mainTreeCol").val(JSON.stringify(JSON.parse(jsonText),null,4));
        }catch (err){
            console.log(err);
        }

    })
});