Ext.namespace('Shipping'); Shipping.MsOpQQCTBILLView = function (config) { Ext.applyIf(this, config); this.initUIComponents(); window.Shipping.MsOpQQCTBILLView.superclass.constructor.call(this); }; Ext.extend(Shipping.MsOpQQCTBILLView, Ext.Panel, { ParentWin: null, OpStatus: 'add', StoreList: null, editRecord: null, region: 'north', bsno: '', AccDate: null, IsAccDate: '', initUIComponents: function () { //枚举参照相关 //编辑form this.bsno = getUrlParam('mblno'); this.formEdit = Ext.widget('form', { region: 'center', frame: true, bodyPadding: 5, trackResetOnLoad: true, fieldDefaults: { margins: '2 2 2 2', labelAlign: 'right', flex: 1, labelWidth: 90, msgTarget: 'qtip' }, }); //end this.formEdit this.panelBtn = new Ext.Panel({ region: "north", tbar: [ { text: "退出", handler: function (button, event) { window.close(); }, scope: this } ] }); this.panelTop = new Ext.Panel({ layout: "border", region: "north", height: 35, id: "BillHead", items: [this.panelBtn] }); this.panelcenter= new Ext.Panel({ layout: "border", region: "center", items: [] }); Ext.apply(this, { items: [this.panelTop, this.panelcenter] }); this.InitData(); }, //end initUIComponents //#region 加载数据 InitData: function () { var condition = ''; this.opStatus = 'edit'; _this = this; this.LoadData(this.bsno); }, //end InitData LoadData: function (bsno) { Ext.Ajax.request({ waitMsg:"正在查询数据", url: '/MvcShipping/MsOpSeae/GetQQCTBILL', params: { mblno: this.bsno, bsno: '' }, callback: function (options, success, response) { if (success) { var jsonresult = Ext.JSON.decode(response.responseText); if (jsonresult.Success) { var statusdata = Ext.JSON.decode(jsonresult.data); var boxitems = " "; var html=boxitems+statusdata.Data; formCustomDataShow = Ext.widget('form', { region: 'center', autoScroll: true, // border: false, bodyPadding: 0, html:html }); this.panelcenter.add(formCustomDataShow); this.panelcenter.doLayout(); } else { Ext.Msg.show({ title:"错误", msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK }); } } }, failure: function (response, options) { Ext.Msg.show({ title:"警告", msg:"服务器响应出错", icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); }, success: function (response, options) { }, scope: this }); //end Ext.Ajax.request } });