• extjs form submit 总是执行failure


    代码:

     function createWeekReort() {
                if (form.getForm().isValid()) {
                    Ext.Msg.confirm("提示", "确认生成月报台账吗?", function (a) {
                        if (a == "yes") {
                            var SSRQ = Ext.getCmp("SSRQ").getRawValue();
                            var KSRQ = Ext.getCmp("KSRQ").getRawValue();
                            var JZRQ = Ext.getCmp("JZRQ").getRawValue();
                            fp.getForm().submit({
                                url: '/_Report/AddAccount',
                                waitMsg: '正在处理',
                                waitTitle: '请等待',
                                params: { SSRQ: SSRQ, KSRQ: KSRQ, JZRQ: JZRQ },
                                timeout: 600000,
                                success: function (fp, o) {
                                    if (o.result.success) {
                                        Ext.Msg.alert("提示", o.result.data.msg, function () {
                                            ExtGrid.Store.reload();
                                            win.hide();
                                        });
                                    }
                                },
                                failure: function (fp, o) {
                                    Ext.MessageBox.alert("警告", "" + o.result.data.msg + "");
                                }
    
                            });
                        }
                    })
                } else {
                    Ext.Msg.alert("警告", "请检查必填项");
                }
            }

    在执行这段代码时总是进入执行failure中,后来发现是这个timeout超时捣的鬼,把这个注释掉就可以了

  • 相关阅读:
    如何在linux下解压缩rar格式的文件压缩包
    CentOS-6.3安装配置SVN
    codeblock 设置背景颜色
    leetcode[55] Merge Intervals
    leetcode Jump Game
    leetcode Spiral Matrix
    leetcode Maximum Subarray
    leetcode N-QueensII
    leetcode[50] N-Queens
    leetcod Pow(x, n)
  • 原文地址:https://www.cnblogs.com/siyunianhua/p/5713488.html
Copyright © 2020-2023  润新知