Ext.define('make.view.osmake.osMakeScrap.FormPanelController', { extend: 'saas.view.core.form.FormPanelController', alias: 'controller.osmake-osmakescrap-formpanel', init: function (form) { var me = this; this.control({ 'dbfindtrigger[name=ms_vendname]':{ beforerender:function(f){ Ext.apply(f,{ //赋值 dbfinds:[{ from:'id',to:'ms_vendid',ignore:true },{ from:'ve_code',to:'ms_vendcode' },{ from:'ve_name',to:'ms_vendname' }], }) ; } }, //从表多选放大镜赋值关系 以及 tpl模板 'multidbfindtrigger[name=md_prodcode]':{ beforerender:function(f){ Ext.apply(f,{ //放大镜赋值设置 dbfinds:[{ from:'id',to:'md_prodid',ignore:true },{ from:'pr_code',to:'md_prodcode' },{ 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:'pr_purcprice',to:'md_lastprice' },{ from:'pr_zxbzs',to:'pr_zxbzs' }], }); } }, 'multidbfindtrigger[name=pr_detail]': { beforerender: function (f) { Ext.apply(f, { dbfinds:[{ from:'id',to:'md_prodid',ignore:true },{ from:'pr_code',to:'md_prodcode' },{ 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:'pr_purcprice',to:'md_lastprice' },{ from:'pr_zxbzs',to:'pr_zxbzs' }], }); } }, 'multidbfindtrigger[name=md_macode]': { beforerender: function (f) { Ext.apply(f, { defaultCondition: "ma_statuscode = 'AUDITED' and ma_tasktype = 'OS'", dbfinds:[{ from:'ma_id',to:'md_maid', },{ from:'mm_id',to:'md_mmid', },{ from:'mm_detno',to:'md_mmdetno' },{ from:'ma_code',to:'md_macode' },{ from:'mm_prodid',to:'md_prodid' },{ from:'mm_prodcode',to:'md_prodcode' },{ from:'pr_detail',to:'pr_detail' },{ from:'pr_spec',to:'pr_spec' },{ from:'pr_unit',to:'pr_unit' },{ from:'pr_brand',to:'pr_brand' },{ from:'pr_orispeccode',to:'pr_orispeccode' }], }); } } }); }, });