define(function (require) { return function (context) { var aa = require('/app/view/queryStockMatMiss.js')(context); var aanorth = aa.north; var aacenter = aa.center; var aasouth = aa.south; var bb = require('/app/view/queryStockMiss.js')(context); var bbnorth = bb.north; var bbcenter = bb.center; return { south: { height: '100%', border: false, items: { xtype: 'tabs', onSelect: function (title, index) { $("#" + aa.center.items.id).reload(); setTimeout(function () { console.log($("input[name='queryProperties']").prev()[0]); $("input[name='queryProperties']").prev()[0].focus(); }) $("#" + bb.center.items.id).reload(); setTimeout(function () { console.log($("input[name='queryProperties']").prev()[0]); $("input[name='queryProperties']").prev()[0].focus(); }) }, items: [ { title: '库存缺件', items: { xtype: 'layout', north: aanorth, center: aacenter, south: aasouth, }, }, { title: '需求单缺件', items: { xtype: 'layout', north: bbnorth, center: bbcenter, }, }, ], } } }; }; });