zoukankan      html  css  js  c++  java
  • layui 操作后跳窗提醒,后台请求返回关闭跳窗一个方法

    function xxaa(ItemID, type, UserID_Violate,table ) {
        var info = "";
        if (type == 'S') {
            info = "ss交易为【xvb违约】么?";
        } else if (type == 'B') {
            info = "ss定该交易为【cbd违约】么?";
        } else {
            info = "sss交易无人违约么?取消交易";
        }
        layer.confirm('<span style="position: relative;top: -70px;display: inline-block;margin-right: 20px;">备注</span>&nbsp;<textarea rows="5" cols="35" id="as_ReasonY"></textarea>', 
            {
            title: info,
            btn: ['通过', '取消']
          },function(index){
            //调用后台
             $.ajax({
                   type : 'POST',
                   url : 'xxxx',
                   dataType : 'json',
                   data: {"CoinsTradeID": ItemID, "type": type, "UserID_Violate": UserID_Violate, "remark": $("#as_ReasonY").val() },
                   success:function(data){
                     if(data.res=="ok"){
                        layer.alert('操作成功!', function(index){
                             layer.close(index);
                             table.reload('testReload', {
                                where: {
                                   status:$('#TradeStatus').val()
                                  ,startDate:startDate
                                  ,endDate:endDate
                                  ,fc_SellerName:$('#fc_SellerName').val()
                                  ,fc_BuyerName:$('#fc_BuyerName').val()
                                }
                              });
                        });    
                     }else{
                        layer.alert(data.res, function(index){
                           layer.close(index);
                           table.reload('testReload', {
                              where: {
                                 status:$('#TradeStatus').val()
                                ,startDate:startDate
                                ,endDate:endDate
                                ,fc_SellerName:$('#fc_SellerName').val()
                                ,fc_BuyerName:$('#fc_BuyerName').val()
                              }
                            });
                        });
                     }
                   },
                 error:function(e){
                    console.log(e);
                 }    
           }); 
            //obj.del();
            layer.close(index);
          });
      
    }
  • 相关阅读:
    STL之vector
    bubble_sort(归并排序)
    just_sort
    单调队列(数列中长度不超过k的子序列和的最值)
    两数组中寻找两个数的某种关系
    删除一个数字之后数列gcd最大
    实现二叉树(search)
    简单的树(summary)
    H5页面,按钮点击效果(信用卡还款项目)
    vue路由相关知识收集
  • 原文地址:https://www.cnblogs.com/zuochanzi/p/13949653.html
Copyright © 2011-2022 走看看