FormPanel.js 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  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 : "customerDbfindTrigger",
  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 : "bandinfoDbfindTrigger",
  48. name : "or_bankname",
  49. fieldLabel : "账户名称",
  50. allowBlank : false
  51. }, {
  52. xtype:'datefield',
  53. name : 'or_date',
  54. fieldLabel : '单据日期',
  55. defaultValue: new Date(),
  56. allowBlank : false
  57. },{
  58. name : "detailGridField",
  59. xtype : "detailGridField",
  60. storeModel:'saas.model.money.Othreceipts',
  61. detnoColumn: 'ord_detno',
  62. deleteDetailUrl:'/api/money/othreceipts/deleteDetail',
  63. columnWidth : 1,
  64. columns : [
  65. {
  66. text : "id",
  67. dataIndex : "id",
  68. xtype : "numbercolumn",
  69. hidden:true
  70. }, {
  71. text : "期间",
  72. dataIndex : "ord_ym",
  73. editor : {
  74. xtype : "numberfield",
  75. readOnly: true
  76. },
  77. // defaultValue: Ext.Date.format(new Date(), 'Ym'),
  78. width : 110.0,
  79. hidden: true,
  80. items : null
  81. }, {
  82. text : "收入类别",
  83. width : 150.0,
  84. dataIndex : "ord_type",
  85. items : null,
  86. allowBlank : false,
  87. hiddenBtn:false,//true 则会关闭新增按钮功能
  88. editor : {
  89. xtype : "remotecombo",
  90. storeUrl:'/api/document/fundinouttype/getCombo?condition=收入',
  91. addHandler:function(b){
  92. var document = Ext.create('saas.view.document.kind.Kind',{});
  93. var form =this.ownerCmp.ownerCt.ownerCmp.ownerCt;
  94. this.dialog = form.getController().getView().add({
  95. xtype: 'document-kind-childwin',
  96. bind: {
  97. title: '新增收入类别'
  98. },
  99. dataKind:'inoutkind',
  100. belong:document.etc['inoutkind'],
  101. _parent:form,
  102. _combo:this.ownerCmp,
  103. record:null,
  104. session: true
  105. });
  106. this.dialog.show();
  107. }
  108. }
  109. }, {
  110. text : "金额",
  111. xtype: 'numbercolumn',
  112. dataIndex : "ord_nowbalance",
  113. width : 110.0,
  114. allowBlank : false,
  115. editor : {
  116. xtype : "numberfield",
  117. decimalPrecision: 2
  118. },
  119. renderer : function(v) {
  120. var arr = (v + '.').split('.');
  121. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  122. var format = '0,000.' + xr.join();
  123. return Ext.util.Format.number(v, format);
  124. },
  125. summaryType: 'sum',
  126. summaryRenderer: function(v) {
  127. var arr = (v + '.').split('.');
  128. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  129. var format = '0,000.' + xr.join();
  130. return Ext.util.Format.number(v, format);
  131. }
  132. }, {
  133. text : "备注",
  134. dataIndex : "ord_remark",
  135. width : 250,
  136. editor : {
  137. xtype : "textfield"
  138. }
  139. }
  140. ]
  141. }, {
  142. xtype : "numberfield",
  143. name : "or_amount",
  144. fieldLabel : "收款金额",
  145. readOnly:true
  146. },{
  147. xtype : "textfield",
  148. name : "or_remark",
  149. fieldLabel : "备注",
  150. allowBlank : true,
  151. columnWidth : 0.75
  152. },{
  153. xtype : "hidden",
  154. name : "creatorId",
  155. fieldLabel : "录入人ID",
  156. readOnly:true
  157. },
  158. {
  159. xtype : "textfield",
  160. name : "creatorName",
  161. fieldLabel : "录入人",
  162. readOnly:true
  163. }, {
  164. xtype : "datefield",
  165. name : "createTime",
  166. fieldLabel : "录入日期",
  167. readOnly:true,
  168. defaultValue: new Date()
  169. },{
  170. xtype : "hidden",
  171. name : "updaterId",
  172. fieldLabel : "更新人ID",
  173. readOnly:true
  174. },{
  175. xtype : "hidden",
  176. name : "updaterName",
  177. fieldLabel : "更新人",
  178. readOnly:true
  179. }, {
  180. xtype : "hidden",
  181. name : "updateTime",
  182. fieldLabel : "更新日期",
  183. readOnly:true,
  184. defaultValue: new Date()
  185. },{
  186. xtype: 'textfield',
  187. name: 'or_auditman',
  188. fieldLabel: '审核人',
  189. readOnly:true
  190. },{
  191. xtype: "datefield",
  192. name: "or_auditdate",
  193. fieldLabel: "审核日期",
  194. readOnly:true
  195. }]
  196. });