el = {
    publicFlag : '#publicFlag',
    userType : '#userType',
    form : '#form'
}
$(function () {
    var ue = UE.getEditor('editor');


    var htmlStr = $("#dela").html();

    ue.ready(function () {

        ue.setContent(htmlStr, false);
    })

    $("#dela").html('');
});

function saveOrUpdate(call) {
    if($(el.form).form('validate')){
        var formData = $(el.form).serializeJson();
        formData.content = UE.getEditor('editor').getContent();
        $.ajax({
            url: g.ctx + 'pc/supplier/supplierAgreement/rest/saveOrUpdate',
            method: 'post',
            data: formData,
            success: function (data) {
                call();
            },
            error: function (data) {
                layer.alert(JSON.parse(data.responseText).message);
            }
        });
    }else{
        layer.msg("红色框为必输项，请填写！");
    }
}