FormPanelController.js 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. Ext.define('make.view.osmake.osMakeScrap.FormPanelController', {
  2. extend: 'saas.view.core.form.FormPanelController',
  3. alias: 'controller.osmake-osmakescrap-formpanel',
  4. init: function (form) {
  5. var me = this;
  6. this.control({
  7. 'dbfindtrigger[name=ms_vendname]':{
  8. beforerender:function(f){
  9. Ext.apply(f,{
  10. //赋值
  11. dbfinds:[{
  12. from:'id',to:'ms_vendid',ignore:true
  13. },{
  14. from:'ve_code',to:'ms_vendcode'
  15. },{
  16. from:'ve_name',to:'ms_vendname'
  17. }],
  18. }) ;
  19. }
  20. },
  21. //从表多选放大镜赋值关系 以及 tpl模板
  22. 'multidbfindtrigger[name=md_prodcode]':{
  23. beforerender:function(f){
  24. Ext.apply(f,{
  25. //放大镜赋值设置
  26. dbfinds:[{
  27. from:'id',to:'md_prodid',ignore:true
  28. },{
  29. from:'pr_code',to:'md_prodcode'
  30. },{
  31. from:'pr_detail',to:'pr_detail'
  32. },{
  33. from:'pr_spec',to:'pr_spec'
  34. },{
  35. from: 'pr_brand', to: 'pr_brand'
  36. },{
  37. from: 'pr_orispeccode', to: 'pr_orispeccode'
  38. },{
  39. from: 'pr_unit', to: 'pr_unit'
  40. }, {
  41. from:'pr_purcprice',to:'md_lastprice'
  42. },{
  43. from:'pr_zxbzs',to:'pr_zxbzs'
  44. }],
  45. });
  46. }
  47. },
  48. 'multidbfindtrigger[name=pr_detail]': {
  49. beforerender: function (f) {
  50. Ext.apply(f, {
  51. dbfinds:[{
  52. from:'id',to:'md_prodid',ignore:true
  53. },{
  54. from:'pr_code',to:'md_prodcode'
  55. },{
  56. from:'pr_detail',to:'pr_detail'
  57. },{
  58. from:'pr_spec',to:'pr_spec'
  59. },{
  60. from: 'pr_brand', to: 'pr_brand'
  61. },{
  62. from: 'pr_orispeccode', to: 'pr_orispeccode'
  63. },{
  64. from: 'pr_unit', to: 'pr_unit'
  65. }, {
  66. from:'pr_purcprice',to:'md_lastprice'
  67. },{
  68. from:'pr_zxbzs',to:'pr_zxbzs'
  69. }],
  70. });
  71. }
  72. },
  73. 'multidbfindtrigger[name=md_macode]': {
  74. beforerender: function (f) {
  75. Ext.apply(f, {
  76. defaultCondition: "ma_statuscode = 'AUDITED' and ma_tasktype = 'OS'",
  77. dbfinds:[{
  78. from:'ma_id',to:'md_maid',
  79. },{
  80. from:'mm_id',to:'md_mmid',
  81. },{
  82. from:'mm_detno',to:'md_mmdetno'
  83. },{
  84. from:'ma_code',to:'md_macode'
  85. },{
  86. from:'mm_prodid',to:'md_prodid'
  87. },{
  88. from:'mm_prodcode',to:'md_prodcode'
  89. },{
  90. from:'pr_detail',to:'pr_detail'
  91. },{
  92. from:'pr_spec',to:'pr_spec'
  93. },{
  94. from:'pr_unit',to:'pr_unit'
  95. },{
  96. from:'pr_brand',to:'pr_brand'
  97. },{
  98. from:'pr_orispeccode',to:'pr_orispeccode'
  99. }],
  100. });
  101. }
  102. }
  103. });
  104. },
  105. });