FormPanelController.js 4.4 KB

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