Ext.define('make.view.sale.saleForecast.FormPanelController', { extend: 'saas.view.sale.sale.FormPanelController', alias: 'controller.sale-saleforecast-formpanel', init: function (form) { var me = this; this.control({ //放大镜赋值关系 以及 tpl模板 'multidbfindtrigger[name=sd_prodcode]': { beforerender: function (f) { Ext.apply(f, { defaultCondition:"pr_statuscode='ENABLE' and pr_manutype in('MAKE','OSMAKE')", dbfinds: [{ from: 'pr_code', to: 'sd_prodcode' }, { from: 'pr_saleprice', to: 'sd_lastprice' }, { from: 'pr_detail', to: 'pr_detail' }, { from: 'pr_spec', to: 'pr_spec' },{ from: 'pr_brand', to: 'pr_brand' },{ from: 'pr_orispeccode', to: 'pr_orispeccode' },{ from: 'pr_unit', to: 'pr_unit' }, { from: 'id', to: 'sd_prodid', ignore: true }], }); } }, 'multidbfindtrigger[name=pr_detail]': { beforerender: function (f) { Ext.apply(f, { defaultCondition:"pr_statuscode='ENABLE' and pr_manutype in('MAKE','OSMAKE')", dbfinds: [{ from: 'pr_code', to: 'sd_prodcode' }, { from: 'pr_saleprice', to: 'sd_lastprice' }, { from: 'pr_detail', to: 'pr_detail' }, { from: 'pr_spec', to: 'pr_spec' },{ from: 'pr_brand', to: 'pr_brand' },{ from: 'pr_orispeccode', to: 'pr_orispeccode' },{ from: 'pr_unit', to: 'pr_unit' }, { from: 'id', to: 'sd_prodid', ignore: true }], }); } }, 'dbfindtrigger[name=sd_custname]': { beforerender: function (f) { Ext.apply(f, { dbfinds: [{ from: 'cu_code', to: 'sd_custcode' }, { from: 'cu_name', to: 'sd_custname' }, { from: 'id', to: 'sd_custid', ignore: true }], }); } } }); }, turnMake: function () { var me = this, form = me.getView(), id = form.getForm().findField(form._idField); me.turnMakeDialog = form.add({ xtype: 'sale-saleforecast-turnmakewin', _parent:form, _id : id.value, width:'70%', height:'65%' }); me.turnMakeDialog.show(); } , });