FormPanelController.js 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. Ext.define('saas.view.stock.otherOut.FormPanelController', {
  2. extend: 'saas.view.core.form.FormPanelController',
  3. alias: 'controller.stock-otherout-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',to:'pd_prodid',ignore:true
  41. },{
  42. from:'pr_code',to:'pd_prodcode'
  43. },{
  44. from:'pr_detail',to:'pr_detail'
  45. },{
  46. from:'pr_spec',to:'pr_spec'
  47. },{
  48. from:'pr_whid',to:'pd_whid'
  49. },{
  50. from:'pr_whcode',to:'pd_whcode'
  51. },{
  52. from:'pr_whname',to:'pd_whname'
  53. },{
  54. from:'pr_purcprice',to:'pd_orderprice'
  55. }],
  56. }) ;
  57. }
  58. },
  59. //放大镜赋值关系 以及 tpl模板
  60. 'dbfindtrigger[name=pd_whname]':{
  61. beforerender:function(f){
  62. Ext.apply(f,{
  63. dbfinds:[{
  64. from:'id',to:'pd_whid',ignore:true
  65. },{
  66. from:'wh_code',to:'pd_whcode'
  67. },{
  68. from:'wh_description',to:'pd_whname'
  69. }],
  70. }) ;
  71. }
  72. }
  73. });
  74. },
  75. addCombo: function () {
  76. var combo = this.ownerCmp;
  77. Ext.create('Ext.window.Window', {
  78. layout: 'vbox',
  79. bodyPadding: 15,
  80. width: 500,
  81. items: [{
  82. fieldLabel: '实际值',
  83. xtype: 'textfield'
  84. }, {
  85. fieldLabel: '显示值',
  86. xtype: 'textfield'
  87. }],
  88. buttons: [{
  89. text: '确认',
  90. handler: function (b) {
  91. combo.setValue('ok');
  92. b.up('window').close();
  93. }
  94. }],
  95. renderTo: this.ownerCmp.ownerCt.getEl()
  96. }).show();
  97. }
  98. });