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

            }

        }

  • 相关阅读:
    HTML5新增的客户端校验
    Vue子组件传自定义事件给父组件
    搭建知识库系统不难,选对工具很重要!
    差分进化算法与遗传算法之间的区别
    CSS3 做一个旋转的立体3D正方形 动效核心【前端就业课 第二阶段】CSS 零基础到实战(07)
    Docker 中的 .NET 异常了怎么抓 Dump
    BGP选路的十一条原则(第八课)
    Linux:syslog()系统调用
    车载视频如何转换视频格式
    数据集笔记:纽约花旗共享单车od数据
  • 原文地址:https://blog.csdn.net/x1043556915/article/details/127682042