/**
 *
 * @author BOGON
 * @version 1.0
 */

var page = {
    submitFlag: 0,
    save: function (call) {
        if (!$('#form').form("validate")) {
            return;
        }
        var formData = $("#form").serializeJson();
        $.ajax({
            type: "POST", //请求方式
            data: {ids: ids,paymentTermCode: formData.paymentTermCode},
            url: g.ctx + "finance/receipt/voucher/rest/updatePayment", //请求路径
            success: function (data) {
                layer.alert("修改成功", function () {
                    call();
                })
            },
            error: function (data) {
                layer.alert(data.responseJSON.message);
            }
        });
    }
}
$(function () {

    $('#paymentTermCode').combobox({
        url: g.ctx + 'pc/sys/dict/getDicByType?type=payment_method',
        panelHeight: 'auto',
        limitToList: 'true',
        prompt: '-- 请选择 --',
        method: 'GET',
        valueField: 'code',
        textField: 'name',
    });
})