Window.js 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. /**
  2. * Created by zhouy on 2018/10/18.
  3. */
  4. Ext.define('saas.view.document.bankinformation.Window', {
  5. extend: 'saas.view.document.kind.ChildForm',
  6. xtype: 'document-bankinformation-window',
  7. dataKind:'bankinformation',//类型标识
  8. caller:'BankInformation',
  9. belong:{
  10. columns: [{
  11. text: '账户编号',
  12. dataIndex: 'bk_bankcode',
  13. flex: 1
  14. },{
  15. text: '账户名称',
  16. dataIndex: 'bk_bankname',
  17. flex: 1
  18. },{
  19. text: '账户类别',
  20. dataIndex: 'bk_type',
  21. flex: 1,
  22. },{
  23. text: '币别',
  24. dataIndex: 'bk_currency',
  25. flex: 1,
  26. },{
  27. text: '期初金额(元)',
  28. dataIndex: 'bk_beginamount',
  29. xtype: 'numbercolumn',
  30. renderer : function(v, m, r) {
  31. return saas.util.BaseUtil.numberFormat(v, 2, true);
  32. },
  33. flex: 1
  34. },{
  35. text: '当前余额(元)',
  36. dataIndex: 'bk_thisamount',
  37. xtype: 'numbercolumn',
  38. renderer : function(v, m, r) {
  39. return saas.util.BaseUtil.numberFormat(v, 2, true);
  40. },
  41. flex: 1
  42. },{
  43. xtype:'datecolumn',
  44. text: '建账日期',
  45. format:'Y-m-d',
  46. dataIndex: 'bk_date',
  47. flex: 1
  48. }, {
  49. text: '备注',
  50. dataIndex: 'bk_remark',
  51. flex: 1
  52. }],
  53. keyField:'id'
  54. },
  55. etc:{
  56. bankinformation:{
  57. items:[{
  58. xtype:'hidden',
  59. name:'id'
  60. },{
  61. xtype:'textfield',
  62. name:'bk_bankcode',
  63. allowBlank:false,
  64. fieldLabel:'账户编号',
  65. autoCode:true,
  66. maxLength: 20
  67. },{
  68. xtype:'textfield',
  69. name:'bk_bankname',
  70. allowBlank:false,
  71. fieldLabel:'账户名称',
  72. maxLength: 20
  73. },{
  74. dbfinds:[{
  75. from:'cr_name',to:'bk_currency'
  76. }],
  77. xtype:'currencyDbfindTrigger',
  78. name:'bk_currency',
  79. allowBlank:false,
  80. fieldLabel:'币别',
  81. maxLength: 20
  82. },{
  83. xtype:'numberfield',
  84. name:'bk_beginamount',
  85. allowBlank:false,
  86. fieldLabel:'期初金额(元)',
  87. hideTrigger: true,
  88. mouseWheelEnabled: false,
  89. minValue: 0,
  90. maxLength:15,
  91. decimalPrecision:2,
  92. enforceMaxLength:true
  93. },
  94. // {
  95. // xtype:'numberfield',
  96. // name:'bk_thisamount',
  97. // allowBlank:true,
  98. // fieldLabel:'当前余额',
  99. // hideTrigger: true,
  100. // mouseWheelEnabled: false,
  101. // beforeLabelTextTpl:'',
  102. // minValue: 0
  103. // }
  104. // ,
  105. {
  106. xtype:'combo',
  107. name:'bk_type',
  108. allowBlank:false,
  109. editable:false,
  110. fieldLabel:'账户类别',
  111. store: [
  112. '现金',
  113. '银行'
  114. ]
  115. },{
  116. xtype:'datefield',
  117. name:'bk_date',
  118. fieldLabel:'建账日期',
  119. format:'Y-m-d',
  120. listeners:{
  121. beforerender:function(d){
  122. d.setValue(new Date())
  123. }
  124. }
  125. }, {
  126. xtype:'textfield',
  127. name:'bk_remark',
  128. allowBlank:true,
  129. fieldLabel:'备注',
  130. beforeLabelTextTpl:''
  131. }]
  132. }
  133. }
  134. });