function save(call) {

    let validate = $("#sequenceForm").form('validate');
    if (!validate) {
        layer.msg("必填项不得为空!");
        return false;
    }
    var data = $('#sequenceForm').serializeJson();
    let url = g.ctx + 'pc/sys/job/save';
    if (jobName != '') {
        url = g.ctx + 'pc/sys/job/update';
    }
    $.ajax({
        url: url,
        method: "POST",
        data: data,
        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 loadJob() {
    if (jobName != '') {
        $.ajax({
            url: g.ctx + 'pc/sys/job/get',
            method: "GET",
            data: {jobName: jobName},
            success: function (data) {
                $.each(data, function (idx, val) {
                    if (idx == 'scheduleTime') {
                        $("#" + idx).val(val);
                    } else {
                        $("#" + idx).textbox("setValue", val);
                    }
                })
            },
            error: function (data) {
                topWin.layer.alert(data.responseJSON.message, {icon: 2});
            }
        });
    }
}

$(function () {
    loadJob();
});