弹出页面,弹出框,$('').modal({});模态框

 效果图:

  自己可以添加内容;

 弹出页面,弹出框,$('').modal({});模态框_第1张图片

引用:amazeui前端框架:

 
 

弹出页面:


	
XXX

触发按钮:

 授信额度 

js:

//按钮触发
function creditApplyAmount(id) {

       //页面处理按钮的提交
       $('#handle-form-modal-credit').modal({
           relatedTarget: this,
           closeViaDimmer:false,//点击遮罩层时关闭 Modal
           closeOnConfirm:false,//点击确认时不关闭窗口
           onConfirm: function(e) {
               var apply_amount = $("#creditApplyAmount1").val();
               var capital_source  =  $("#table-item-capital-source").val();
               $.ajax({
                   type:"POST",
                  // contentType:"application/json", //WebService 会返回Json类型
                   url:basePath+"credit/updateLoanApplyCredit",
                   data: 
                   {"id":id,"apply_amount":apply_amount,"capital_source":capital_source},
                   dataType:"json",
                   success:function(data){
                       if(data==1){
                           $('#handle-form-modal-credit').modal('close');
                           $("#creditApplyAmount1").val("");
                           $("#table-item-capital-source  option[value='0'] 
                             ").attr("selected",true);
                           alert("成功!");
                           //刷新页面
                           commitAjax({'url':getDataUrl(),
                               'param':getQueryCondition()});

                       }else{

                           alert("失败!");
                       }
                   },
                   error:function(){

                       alert("异常");
                   }
               });

           },
           onCancel: function(e) {
               var apply_amount = $("#creditApplyAmount1").val("");
               $("#table-item-capital-source  option[value='0'] ").attr("selected",true);
               //alert('你取消提交了!');
           }
       });

   }

后端代码:

  /**
     * xxxxx
     * @param loanApply
     * @param request
     * @return
     */
    @RequestMapping("/updateLoanApplyCredit")
    @ResponseBody
    public Integer updateLoanApplyCredit(
             LoanApply loanApply,
            HttpServletRequest request)
    {

       
        Integer a = 0;
        try {
            a = service.updateLoanApplyAmount(loanApply);
            BaseController.saveLog(
                    SecurityUtils.getSubject().getPrincipals().toString(),
                    DateUtils.getCurrentDate("yyyy-MM-dd HH:mm:ss"),
                    DateUtils.getCurrentDate("yyyy-MM-dd HH:mm:ss"),
                    BaseController.getRequestIp(request), "xxxxx",
                    "xxxxxxx", 1, 1, "");
        }
        catch (Exception e)
        {
            BaseController.saveLog(
                    SecurityUtils.getSubject().getPrincipals().toString(),
                    DateUtils.getCurrentDate("yyyy-MM-dd HH:mm:ss"),
                    DateUtils.getCurrentDate("yyyy-MM-dd HH:mm:ss"),
                    BaseController.getRequestIp(request), "xxxxx",
                    "xxxxxxx, 0, 1, "");
        }
        return a;
    }

 

 

 

你可能感兴趣的:(jsp,Jquery,javaScript,js,html)