AccountBalanceController.js 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. Ext.define('saas.view.money.report.AccountBalanceController', {
  2. extend: 'saas.view.core.report.ReportPanelController',
  3. alias: 'controller.money-report-accountbalance',
  4. init: function (form) {
  5. this.control({
  6. //账户资料
  7. 'dbfindtrigger[name=bankname]':{
  8. beforerender:function(f){
  9. Ext.apply(f,{
  10. dataUrl:'/api/document/bankinformation/list',
  11. addXtype: 'other-bankinformation',
  12. addTitle: '资金账户',
  13. dbfinds:[
  14. {
  15. from:'bk_bankname',to:'bankname'
  16. }],
  17. dbtpls:[{
  18. field:'bk_bankcode',width:100
  19. },{
  20. field:'bk_bankname',width:100
  21. }],
  22. dbSearchFields: [{
  23. emptyText: '查找资金账户',
  24. xtype: "textfield",
  25. name: "search",
  26. getCondition: function (v) {
  27. return "(upper(bk_bankcode) like '%"+v.toUpperCase()+"%' or upper(bk_bankname) like '%"+v.toUpperCase()+"%')";
  28. },
  29. allowBlank: true,
  30. columnWidth: 0.25
  31. }],
  32. dbColumns: [{
  33. "text": "账户ID",
  34. "flex": 0,
  35. "dataIndex": "id",
  36. "width": 0,
  37. "xtype": ""
  38. }, {
  39. "text": "资金账户",
  40. "flex": 1,
  41. "dataIndex": "bk_bankcode",
  42. "width": 120,
  43. "xtype": ""
  44. }, {
  45. "text": "账户名称",
  46. "flex": 1,
  47. "dataIndex": "bk_bankname",
  48. "width": 150,
  49. "xtype": ""
  50. }, {
  51. "text": "账户类别",
  52. "flex": 1,
  53. "dataIndex": "bk_type",
  54. "width": 120,
  55. "xtype": ""
  56. }, {
  57. "text": "账户余额",
  58. "flex": 1,
  59. "dataIndex": "bk_thisamount",
  60. "width": 120,
  61. xtype: 'numbercolumn',
  62. }, {
  63. "text": "建帐日期",
  64. "flex": 1,
  65. "dataIndex": "bk_date",
  66. "width": 120,
  67. "xtype": "datecolumn"
  68. }]
  69. }) ;
  70. }
  71. }
  72. });
  73. }
  74. });