• ExtJs中Ajax.request异步处理后,跳转至其他页面的超链接


    ExtJs中Ajax.request异步处理后,跳转至其他页面的超链接 :   

    1.进入JSP页面:

       Ext.Ajax.request({

                           method:'POST',

                           url:'paAction.do?actionType=piliang_caigou',

                           success: function(response){

                                    var json=Ext.decode(response.responseText);

                                    if(json.success){

                                      Ext.Msg.alert('提示','採購單號:'+json.msg+',保存成功!',function(){

                                            win_supp.hide();

                                            var url="";

                                            //var value=encodeURIComponent(json.msg);

                                            var value=json.msg;

                                            if(pa_type=='6'){

                                              url="getMJOAction.do?typeid=3&method=getmjodetail&id="+value;

                                            }else if(pa_type=='7'){

                                              url="getPo_modAction.do?method=getcustdetail&id="+value;

                                            }else{

                                              url="getPurchaseOrderAction.do?method=getcustdetail&id="+value;

                                            }

                                            window.location.href(url);

                                      });

                                    }else{

                                      Ext.Msg.alert('提示',json.msg);

                                    }

                              },

                              failure:function(response){

                                    Ext.Msg.alert('提示','生成採購單失敗!');

                              },

                              params:{

                                   json1:str,

                                   json2:str2,

                                   supp_id:supp_id

                               }

                          });

     2.打开一個在Ext.onReady(function(){    })立即执行函数,外面的窗口函数(调用此js文件不会自动加载的窗口函数)---通过超链接调用;

    {

            header:'採購狀態',

            dataIndex:'is_wanjie_cg',

            menuDisabled:true,

            width:100,

            renderer:function(value, cellmeta, record, rowIndex, columnIndex, store){

              var pa_no= record.get('pa_no');

              return " "+value+" ";

            }

        }

    3.打开其他js页面的內容---通过超链接调用;

    {

            header:'申購單',

            dataIndex:'pa_no',

            menuDisabled:true,

            width:150,

            renderer:function(value, cellmeta, record, rowIndex, columnIndex, store){

              //var pa_no=encodeURIComponent(Ext.encode(value));

              var pa_no=value

              return ""+value+"";

            }

        }

  • 相关阅读:
    rabbitMQ 中三种常用交换机:direct、topic、fanout的使用以及区别和queue消息的Ack,Nack ,Reject 消息类型
    Python+Selenium实现长截图、自动上传并发布抖音短视频实例演示教程
    【前端验证】被动响应型uvm_model环境搭建——以握手型ram_model为例
    c++学习26qt(二)
    FFmpeg进阶: 音频滤镜大全
    Go语言多维数组
    Unity3D学习之UI系统——使用UGUI制作游戏登陆界面
    NLP(6)--Diffusion Model
    自动化测试框架pytest系列一
    [计算几何] 2 二维凸包/笨蛋(我)也能看懂的二维凸包算法
  • 原文地址:https://blog.csdn.net/x1043556915/article/details/127682042