QueryPanelController.js 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. Ext.define('saas.view.money.othreceipts.QueryPanelController', {
  2. extend: 'saas.view.core.query.QueryPanelController',
  3. alias: 'controller.money-othreceipts-querypanel',
  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:'/api/document/customer/list',
  12. addXtype: 'document-customer-formpanel',
  13. addTitle: '客户资料',
  14. dbfinds:[{
  15. from:'id',to:'or_custid'
  16. },{
  17. from:'cu_code',to:'or_custcode'
  18. },{
  19. from:'cu_name',to:'or_custname'
  20. }],
  21. dbtpls:[{
  22. field:'cu_code',width:100
  23. },{
  24. field:'cu_name',width:100
  25. }],
  26. dbColumns:[{
  27. "text": "客户ID",
  28. "flex": 0,
  29. "dataIndex": "id",
  30. "width": 100,
  31. "xtype": ""
  32. },{
  33. "text": "客户编号",
  34. "flex": 1,
  35. "dataIndex": "cu_code",
  36. "width": 100,
  37. "xtype": ""
  38. }, {
  39. "text": "客户名称",
  40. "flex": 1,
  41. "dataIndex": "cu_name",
  42. "xtype": ""
  43. }, {
  44. "text": "客户类型",
  45. "flex": 0,
  46. "dataIndex": "cu_type",
  47. "width": 200,
  48. "xtype": ""
  49. }]
  50. }) ;
  51. }
  52. },
  53. //放大镜赋值关系 以及 tpl模板
  54. 'dbfindtrigger[name=or_bankname]':{
  55. beforerender:function(f){
  56. Ext.apply(f,{
  57. dataUrl:'/api/document/bankinformation/list',
  58. dbfinds:[{
  59. from:'bk_bankcode',to:'or_bankcode'
  60. },{
  61. from:'bk_bankname',to:'or_bankname'
  62. },{
  63. from:'id',to:'or_bankid'
  64. }],
  65. dbtpls:[{
  66. field:'bk_bankcode',width:100
  67. },{
  68. field:'bk_bankname',width:100
  69. }],
  70. dbColumns:[{
  71. "text": "账户ID",
  72. "flex": 0,
  73. "dataIndex": "id",
  74. "width": 0,
  75. "xtype": ""
  76. },{
  77. "text": "账户编号",
  78. "flex": 1,
  79. "dataIndex": "bk_bankcode",
  80. "width": 100,
  81. "xtype": ""
  82. }, {
  83. "text": "账户名称",
  84. "flex": 1,
  85. "dataIndex": "bk_bankname",
  86. "xtype": ""
  87. }, {
  88. "text": "账户类型",
  89. "flex": 0,
  90. "dataIndex": "bk_type",
  91. "width": 200,
  92. "xtype": ""
  93. }]
  94. }) ;
  95. }
  96. }
  97. });
  98. }
  99. });