ZBLOG

ggNamespace.functionsvar columns =[ new GridColumn init({ data: 'id', title: lang("id"),visible: false })10%'),new GridColumn('applyDate', lang('advance_repayment apply_date'),false,newGridColumn('agencyCode',lang('affiliation'),false,'10%')ne...

根据你提供的代码,以下是修改后的完整代码:

var columns = [
    new GridColumn('id', { data: 'id', title: lang("id"), visible: false }),
    new GridColumn('applyDate', lang('advance_repayment apply_date'), false, '10%'),
    new GridColumn('agencyCode', lang('affiliation'), false, '10%'),
    new GridColumn('collectionUnit', lang('belonging to_the_echelon'), false, '10%'),
    new GridColumn('customerId', lang('customer id'), false, '10%'),
    new GridColumn('loanCode', lang('REF NBR'), false, '18%'),
    new GridColumn('paidDateValue', lang('last_paid time'), false, '10%'),
    new GridColumn('paidAmount', lang('repayment amount'), false, '10%'),
    new GridColumn('remark', lang('remark'), false, '10%'),
    new GridColumn('repaymentName', lang('repayment voucher'), false, '10%'),
    new GridColumn(lang("application status"), false, '10%'),
    new GridColumn(newGridColumn(confirmReason),lang("refuse reason"),false,'10%')
];

var settings = {
  columns: columns,
  processing: true,
  serverSide: true,
  ajax: {
      url:'../d/supplement/getList',
      contentType:'application/json',
      type:'POST',
      lang:defLanguage
  },
  rowCallback:function(row,data,index){
      $(row).find('.link-approve').on(
        'click',
        function(e){
            e.stopPropagation();
            let resultConfirm = data.resultConfirm;
            let id = data.id;
            
            layer.confirm(
                "确认是否通过申请?",
                {
                    btn:['是', '否'],
                    title:"申请通过确认"
                },
                function(){
                    $.ajax({
                        url:'../d/supplement/saveConfirm',
                        method: 'POST',
                        data:{
                            resultConfirm: 2,
                            id: id
                        },
                        dataType: 'json',
                        success:function(result){
                            console.log(result.message);
                            if(result.message === "已存在对应日期对应金额的还款记录,是否确认新增"){
                                layer.confirm(
                                    result.message,
                                    {
                                        btn:['是', '否'],
                                        title:"确认新增"
                                    },
                                    function(index){
                                        $.ajax({
                                            url:'../d/supplement/saveConfirm',
                                            method: 'POST',
                                            data:{
                                                resultConfirm: 2,
                                                id: id,
                                                isNotRepay: 1
                                            },
                                            dataType:'json',
                                            success:function(finalResult){
                                                console.log(finalResult.message);
                                                alert(finalResult.message);
                                            }
                                        });
                                    }
                                );
                            } else {
                                alert(result.message);
                            }
                        }
                    });
                }
            );
        }
    )
}

这样修改后,代码应该能正常运行。请注意检查语法和逻辑错误,并根据实际需求进行调整。


内容由零声教学AI助手提供,问题来源于学员提问

本站部分文章来源于网络,版权归原作者所有,如有侵权请联系站长删除。
转载请注明出处:https://golang.0voice.com/?id=15599

分享:
扫描分享到社交APP
上一篇
下一篇
发表列表
游客 游客
此处应有掌声~
评论列表

还没有评论,快来说点什么吧~

联系我们

在线咨询: 点击这里给我发消息

微信号:3007537140

上班时间: 10:30-22:30

关注我们
x

注册

已经有帐号?