FormPanelController.js 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. Ext.define('saas.view.money.othspendings.FormPanelController', {
  2. extend: 'saas.view.core.form.FormPanelController',
  3. alias: 'controller.money-othspendings-formpanel',
  4. init: function (form) {
  5. var me = this;
  6. this.control({
  7. //放大镜赋值关系 以及 tpl模板
  8. 'dbfindtrigger[name=os_vendname]':{
  9. beforerender:function(f){
  10. Ext.apply(f,{
  11. dataUrl:basePath+'document/vendor/getVendorsByCondition',
  12. dbfinds:[{
  13. from:'id',to:'os_vendid'
  14. },{
  15. from:'ve_code',to:'os_vendcode'
  16. },{
  17. from:'ve_name',to:'os_vendname'
  18. }],
  19. dbtpls:[{
  20. field:'ve_code',width:100
  21. },{
  22. field:'ve_name',width:100
  23. }],
  24. dbColumns:[{
  25. "text": "供应商ID",
  26. "flex": 0,
  27. "dataIndex": "id",
  28. "width": 100,
  29. "xtype": "numbercolumn"
  30. },{
  31. conditionCode:'ve_code',
  32. "text": "供应商编号",
  33. "flex": 1,
  34. "dataIndex": "ve_code",
  35. "width": 100
  36. }, {
  37. conditionCode:'ve_name',
  38. "text": "供应商名称",
  39. "flex": 1,
  40. "dataIndex": "ve_name",
  41. "width": 100
  42. }, {
  43. conditionCode:'cu_type',
  44. "text": "供应商类型",
  45. "flex": 0,
  46. "dataIndex": "ve_type",
  47. "width": 200,
  48. "items": null
  49. }]
  50. }) ;
  51. }
  52. },
  53. //放大镜赋值关系 以及 tpl模板
  54. 'dbfindtrigger[name=os_bankname]':{
  55. beforerender:function(f){
  56. Ext.apply(f,{
  57. conditionCode:'os_bankcode',
  58. dataUrl:basePath+'document/bankinformation/getAll',
  59. dbfinds:[{
  60. from:'bk_bankcode',to:'os_bankcode'
  61. },{
  62. from:'bk_bankname',to:'os_bankname'
  63. },{
  64. from:'bk_id',to:'os_bankid'
  65. }],
  66. dbtpls:[{
  67. field:'bk_bankcode',width:100
  68. },{
  69. field:'bk_bankname',width:100
  70. }],
  71. dbColumns:[{
  72. "text": "账户ID",
  73. "flex": 0,
  74. "dataIndex": "id",
  75. "width": 0,
  76. "xtype": "",
  77. "items": null
  78. },{
  79. "text": "账户编号",
  80. "flex": 1,
  81. "dataIndex": "bk_bankcode",
  82. "width": 100,
  83. "xtype": "",
  84. "items": null
  85. }, {
  86. "text": "账户名称",
  87. "flex": 1,
  88. "dataIndex": "bk_bankname",
  89. "xtype": "",
  90. "items": null
  91. }, {
  92. "text": "账户类型",
  93. "flex": 0,
  94. "dataIndex": "bk_type",
  95. "width": 200,
  96. "xtype": "",
  97. "items": null
  98. }]
  99. }) ;
  100. }
  101. }
  102. });
  103. }
  104. });