FormPanelController.js 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. Ext.define('saas.view.stock.otherIn.FormPanelController', {
  2. extend: 'saas.view.core.form.FormPanelController',
  3. alias: 'controller.stock-otherin-formpanel',
  4. init: function (form) {
  5. var me = this;
  6. this.control({
  7. //放大镜赋值关系 以及 tpl模板
  8. 'dbfindtrigger[name=pi_vendname]':{
  9. beforerender:function(f){
  10. Ext.apply(f,{
  11. dbfinds:[{
  12. from:'id',to:'pi_vendid',ignore:true
  13. },{
  14. from:'ve_code',to:'pi_vendcode'
  15. },{
  16. from:'ve_name',to:'pi_vendname'
  17. }],
  18. }) ;
  19. }
  20. },
  21. //放大镜赋值关系 以及 tpl模板
  22. 'dbfindtrigger[name=pi_custname]': {
  23. beforerender: function (f) {
  24. Ext.apply(f, {
  25. dbfinds: [{
  26. from: 'id',to: 'pi_custid',ignore:true
  27. }, {
  28. from: 'cu_code',to: 'pi_custcode'
  29. }, {
  30. from: 'cu_name',to: 'pi_custname'
  31. }],
  32. });
  33. }
  34. },
  35. //放大镜赋值关系 以及 tpl模板
  36. 'multidbfindtrigger[name=pd_prodcode]': {
  37. beforerender: function (f) {
  38. Ext.apply(f, {
  39. dbfinds: [{
  40. from: 'id',
  41. to: 'pd_prodid',ignore:true
  42. }, {
  43. from: 'pr_code',
  44. to: 'pd_prodcode'
  45. }, {
  46. from: 'pr_detail',
  47. to: 'pr_detail'
  48. }, {
  49. from: 'pr_spec',
  50. to: 'pr_spec'
  51. },{
  52. from:'pr_whid',to:'pd_whid'
  53. },{
  54. from:'pr_whcode',to:'pd_whcode'
  55. },{
  56. from:'pr_whname',to:'pd_whname'
  57. },{
  58. from:'pr_purcprice',to:'pd_orderprice'
  59. }],
  60. });
  61. }
  62. },
  63. //放大镜赋值关系 以及 tpl模板
  64. 'dbfindtrigger[name=pd_whname]': {
  65. beforerender: function (f) {
  66. Ext.apply(f, {
  67. dbfinds: [{
  68. from: 'id',
  69. to: 'pd_whid',ignore:true
  70. }, {
  71. from: 'wh_code',
  72. to: 'pd_whcode'
  73. }, {
  74. from: 'wh_description',
  75. to: 'pd_whname'
  76. }],
  77. });
  78. },
  79. },
  80. });
  81. }
  82. });