• 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+"";

            }

        }

  • 相关阅读:
    Tomcat9的安装以及配置环境
    tinymce prism代码高亮图文详解
    解决swiper组件autoplay报错问题
    毕业论文中word的使用1-代码域标公式
    PyG学习 - Dataset, DataLoader, Tranforms
    Linux安装jdk
    设计模式——中介者模式
    Go-Ldap-Admin | openLDAP 同步钉钉、企业微信、飞书组织架构实践和部分小坑
    【mcuclub】超声波测距模块HC-SR04
    Python绘制三维立体图详解
  • 原文地址:https://blog.csdn.net/x1043556915/article/details/127682042