FormPanel.js 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  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. allowBlank : false
  38. }, {
  39. xtype : 'hidden',
  40. name : 'or_bankid',
  41. fieldLabel : '账户ID'
  42. }, {
  43. xtype : 'hidden',
  44. name : 'or_bankcode',
  45. fieldLabel : '账户编号'
  46. }, {
  47. xtype : "dbfindtrigger",
  48. name : "or_bankname",
  49. fieldLabel : "账户名称",
  50. allowBlank : false
  51. }, {
  52. name : "detailGridField",
  53. xtype : "detailGridField",
  54. storeModel:'saas.model.money.Othreceipts',
  55. detnoColumn: 'ord_detno',
  56. deleteDetailUrl:'/api/money/othreceipts/deleteDetail/',
  57. columnWidth : 1,
  58. columns : [
  59. {
  60. text : "id",
  61. dataIndex : "id",
  62. xtype : "numbercolumn",
  63. width:0
  64. }, {
  65. text : "期间",
  66. dataIndex : "ord_ym",
  67. editor : {
  68. xtype : "numberfield",
  69. readOnly: true
  70. },
  71. defaultValue: Ext.Date.format(new Date(), 'Ym'),
  72. width : 120.0,
  73. // hidden: true,
  74. items : null
  75. }, {
  76. text : "收入类别",
  77. width : 200.0,
  78. dataIndex : "ord_type",
  79. items : null,
  80. editor : {
  81. xtype : "remotecombo",
  82. storeUrl:'/api/document/fundinouttype/getCombo?condition=收入',
  83. addHandler:function(b){
  84. var document = Ext.create('saas.view.document.kind.Kind',{});
  85. var form =this.ownerCmp.ownerCt.ownerCmp.ownerCt;
  86. this.dialog = form.getController().getView().add({
  87. xtype: 'document-kind-childwin',
  88. bind: {
  89. title: '新增收入类别类型'
  90. },
  91. dataKind:'fundinouttype',
  92. belong:document.etc['fundinouttype'],
  93. _parent:form,
  94. _combo:this.ownerCmp,
  95. record:null,
  96. session: true
  97. });
  98. this.dialog.show();
  99. }
  100. }
  101. }, {
  102. text : "金额",
  103. dataIndex : "ord_nowbalance",
  104. width : 120.0,
  105. editor : {
  106. xtype : "numberfield",
  107. decimalPrecision: 2
  108. },
  109. renderer : function(v) {
  110. var arr = (v + '.').split('.');
  111. var xr = (new Array(arr[1].length)).fill('0');
  112. var format = '0,000.' + xr.join();
  113. return Ext.util.Format.number(v, format);
  114. },
  115. summaryType: 'sum',
  116. summaryRenderer: function(v) {
  117. var arr = (v + '.').split('.');
  118. var xr = (new Array(arr[1].length)).fill('0');
  119. var format = '0,000.' + xr.join();
  120. return Ext.util.Format.number(v, format);
  121. }
  122. }, {
  123. text : "备注",
  124. dataIndex : "ord_remark",
  125. width : 220,
  126. editor : {
  127. xtype : "textarea"
  128. }
  129. }
  130. ]
  131. }, {
  132. xtype : "numberfield",
  133. name : "or_amount",
  134. fieldLabel : "收款金额",
  135. readOnly:true
  136. },{
  137. xtype : "textfield",
  138. name : "or_remark",
  139. fieldLabel : "备注",
  140. allowBlank : true,
  141. columnWidth : 0.75
  142. }, {
  143. xtype : "textfield",
  144. name : "or_recorder",
  145. fieldLabel : "录入人",
  146. readOnly:true
  147. }, {
  148. xtype : "datefield",
  149. name : "or_date",
  150. fieldLabel : "录入日期",
  151. readOnly:true
  152. }
  153. ]
  154. });