FormPanel.js 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. Ext.define('saas.view.money.othreceipts.FormPanel', {
  2. extend: 'saas.view.core.form.FormPanel',
  3. xtype: 'money-othreceipts-formpanel',
  4. controller: 'money-othreceipts-formpanel',
  5. viewModel: 'money-othreceipts-formpanel',
  6. viewName: 'money-othreceipts-formpanel',
  7. caller:'OthReceipts',
  8. //字段属性
  9. _title:'其它收入单',
  10. _idField: 'id',
  11. _codeField: 'or_code',
  12. _statusField: 'or_status',
  13. _statusCodeField: 'or_statuscode',
  14. _relationColumn: 'ord_orid',
  15. _readUrl:'/api/money/othreceipts/read/',
  16. _saveUrl:'/api/money/othreceipts/save/',
  17. _auditUrl:'/api/money/othreceipts/audit/',
  18. _unAuditUrl: '/api/money/othreceipts/unAudit/',
  19. _deleteUrl:'/api/money/othreceipts/delete/',
  20. initId:0,
  21. defaultItems: [{
  22. xtype: 'hidden',
  23. name: 'id',
  24. fieldLabel: 'id'
  25. }, {
  26. xtype : 'hidden',
  27. name : 'or_custid',
  28. fieldLabel : '客户ID'
  29. }, {
  30. xtype : 'hidden',
  31. name : 'or_custcode',
  32. fieldLabel : '客户编号'
  33. }, {
  34. xtype : "dbfindtrigger",
  35. name : "or_custname",
  36. fieldLabel : "客户名称"
  37. }, {
  38. xtype : 'hidden',
  39. name : 'or_bankid',
  40. fieldLabel : '账户ID'
  41. }, {
  42. xtype : 'hidden',
  43. name : 'or_bankcode',
  44. fieldLabel : '账户编号'
  45. }, {
  46. xtype : "dbfindtrigger",
  47. name : "or_bankname",
  48. fieldLabel : "账户名称"
  49. }, {
  50. name : "detailGridField",
  51. xtype : "detailGridField",
  52. storeModel:'saas.model.money.Othreceipts',
  53. detnoColumn: 'ord_detno',
  54. deleteDetailUrl:'/api/money/othreceipts/deleteDetail/',
  55. columnWidth : 1,
  56. columns : [
  57. {
  58. text : "id",
  59. dataIndex : "id",
  60. xtype : "numbercolumn",
  61. width:0
  62. }, {
  63. text : "期间",
  64. dataIndex : "ord_ym",
  65. editor : {
  66. xtype : "numberfield"
  67. },
  68. width : 120.0,
  69. xtype : "numbercolumn",
  70. items : null
  71. }, {
  72. text : "收入类别",
  73. width : 200.0,
  74. dataIndex : "ord_type",
  75. items : null,
  76. editor : {
  77. xtype : "remotecombo",
  78. storeUrl:'/api/document/fundinouttype/getCombo',
  79. addHandler:function(b){
  80. var document = Ext.create('saas.view.document.kind.Kind',{});
  81. var form =this.ownerCmp.ownerCt.ownerCmp.ownerCt;
  82. this.dialog = form.getController().getView().add({
  83. xtype: 'document-kind-childwin',
  84. bind: {
  85. title: '新增收入类别类型'
  86. },
  87. dataKind:'fundinouttype',
  88. belong:document.etc['fundinouttype'],
  89. _parent:form,
  90. _combo:this.ownerCmp,
  91. record:null,
  92. session: true
  93. });
  94. this.dialog.show();
  95. }
  96. }
  97. }, {
  98. text : "金额",
  99. dataIndex : "ord_nowbalance",
  100. width : 120.0,
  101. editor : {
  102. xtype : "numberfield",
  103. decimalPrecision: 2
  104. },
  105. renderer : function(v) {
  106. var arr = (v + '.').split('.');
  107. var xr = (new Array(arr[1].length)).fill('0');
  108. var format = '0,000.' + xr.join();
  109. return Ext.util.Format.number(v, format);
  110. },
  111. summaryType: 'sum',
  112. summaryRenderer: function(v) {
  113. var arr = (v + '.').split('.');
  114. var xr = (new Array(arr[1].length)).fill('0');
  115. var format = '0,000.' + xr.join();
  116. return Ext.util.Format.number(v, format);
  117. }
  118. }, {
  119. text : "备注",
  120. dataIndex : "ord_remark",
  121. width : 220,
  122. editor : {
  123. xtype : "textarea"
  124. }
  125. }
  126. ]
  127. }, {
  128. xtype : "numberfield",
  129. name : "or_amount",
  130. fieldLabel : "收款金额",
  131. readOnly:true
  132. },{
  133. xtype : "textfield",
  134. name : "or_remark",
  135. fieldLabel : "备注",
  136. allowBlank : true,
  137. columnWidth : 0.75
  138. }, {
  139. xtype : "textfield",
  140. name : "or_recorder",
  141. fieldLabel : "录入人",
  142. readOnly:true
  143. }, {
  144. xtype : "datefield",
  145. name : "or_date",
  146. fieldLabel : "录入日期",
  147. readOnly:true
  148. }
  149. ]
  150. });