Ext.namespace('Shipping'); Shipping.ExpressStatusView = function (config) { Ext.applyIf(this, config); this.initUIComponents(); Shipping.ExpressStatusView.superclass.constructor.call(this); }; Ext.extend(Shipping.ExpressStatusView, Ext.Window, { StoreList: null, expno: '', expid: '', expcorpid: '', EditRecord: null, start: 0, limit: 100, condition: '', returnsql: null, initUIComponents: function () { // BEGIN OF CODE GENERATION PARTS, DON'T DELETE CODE BELOW Ext.define('MsOpExpressStatus', { extend: 'Ext.data.Model', idProperty: 'time', fields: [ { name: 'time', type: 'string' }, { name: 'location', type: 'string' }, { name: 'context', type: 'string' }, { name: 'ftime', type: 'string' } ] }); //#region 数据集 this.storeBodyList = Ext.create('Ext.data.Store', { model: 'MsOpExpressStatus', remoteSort: true, proxy: { type: 'ajax', url: '/MvcShipping/MsOpExpress/GetExpressStatusList', reader: { root: 'data', totalProperty: 'totalCount' } } }); this.gridList = new Ext.grid.GridPanel({ store: this.storeBodyList, enableHdMenu: false, region: 'center', loadMask: { msg: "数据加载中,请稍等..." }, trackMouseOver: true, disableSelection: false, selType: 'cellmodel', columns: [{ dataIndex: 'time', header: '时间', width: 200 }, { dataIndex: 'context', header: '跟踪信息', width: 400 }] }); //#endregion var yardview = this; this.panelBodyCtn = new Ext.Panel({ title: '快递动态信息', layout: "border", height: 270, //margin: '5 10', frame: true, items: [this.gridList] }); this.formSearch = Ext.widget('form', { frame: true, region: 'center', bodyPadding: 5, fieldDefaults: { margins: '2 2 2 2', labelAlign: 'right', flex: 1, labelWidth: 60, msgTarget: 'qtip' }, items: [this.panelBodyCtn], buttons: [{ text: "关闭", handler: function (button, event) { var win = this.up("window"); win.close(); } }] }); Ext.apply(this, { height: 350, closable: true, draggable: true, // title: '高级查询', defaultButton: 'btnQuery', resizable: false, items: [this.formSearch], layout: "border", width: 950, xtype: "window", id: "DsQueryWin", listeners: { scope: this, 'beforeshow': function (thewin, eOpts) { yardview.storeBodyList.load({ params: { expno: this.expno, expcorpid: this.expcorpid, expid: this.expid }, callback: function (r, options, success) { if (success) { if (r.length != 0) { for (i = 0; i < yardview.storeBodyList.getCount(); i += 1) { var itemindex = i + 1; var memberyf = yardview.storeBodyList.getAt(i); var context = memberyf.data.context; if (context.indexOf('签收') >= 0) { this.EditRecord.set("BILLSTATUS", '已收件'); this.EditRecord.commit(); } }; } } }, scope: this }); } } }); } });