FormPanelController.js 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  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_brand', to: 'pr_brand'
  49. },{
  50. from: 'pr_orispeccode', to: 'pr_orispeccode'
  51. },{
  52. from: 'pr_unit', to: 'pr_unit'
  53. }, {
  54. from:'pr_whid',to:'pd_whid'
  55. },{
  56. from:'pr_whcode',to:'pd_whcode'
  57. },{
  58. from:'pr_whname',to:'pd_whname'
  59. },{
  60. from:'pr_purcprice',to:'pd_orderprice'
  61. }],
  62. }) ;
  63. }
  64. },
  65. //放大镜赋值关系 以及 tpl模板
  66. 'dbfindtrigger[name=pd_whname]':{
  67. beforerender:function(f){
  68. Ext.apply(f,{
  69. dbfinds:[{
  70. from:'id',to:'pd_whid',ignore:true
  71. },{
  72. from:'wh_code',to:'pd_whcode'
  73. },{
  74. from:'wh_description',to:'pd_whname'
  75. }],
  76. }) ;
  77. }
  78. }
  79. });
  80. },
  81. addCombo: function () {
  82. var combo = this.ownerCmp;
  83. Ext.create('Ext.window.Window', {
  84. layout: 'vbox',
  85. bodyPadding: 15,
  86. width: 500,
  87. items: [{
  88. fieldLabel: '实际值',
  89. xtype: 'textfield'
  90. }, {
  91. fieldLabel: '显示值',
  92. xtype: 'textfield'
  93. }],
  94. buttons: [{
  95. text: '确认',
  96. handler: function (b) {
  97. combo.setValue('ok');
  98. b.up('window').close();
  99. }
  100. }],
  101. renderTo: this.ownerCmp.ownerCt.getEl()
  102. }).show();
  103. }
  104. });