var el = {
    form: '#form',
};

function save(call) {
    let validate = $(el.form).form('validate');
    if (!validate) {
        topWin.layer.msg("必填项不得为空!");
        return false;
    }
    var formData = $(el.form).serializeJson();
    $.ajax({
        url: g.ctx + 'pc/supplier/qualification/rest/saveOrUpdate',
        method: "post",
        data: formData,
        success: function (data) {
            topWin.layer.alert("保存成功", {icon: 1}, function (idx) {
                topWin.layer.close(idx);
                call();
            });
        },
        error: function (data) {
            topWin.layer.alert(data.responseJSON.message, {icon: 2});
        }
    });
}

$(function () {
    singleFileUpload('fileUpload','fileId')
});