FormPanel.js 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  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. _deleteUrl:'/api/money/othreceipts/delete/',
  18. initId:0,
  19. defaultItems: [{
  20. xtype: 'hidden',
  21. name: 'id',
  22. fieldLabel: 'id'
  23. }, {
  24. xtype : 'hidden',
  25. name : 'or_custid',
  26. fieldLabel : '客户ID'
  27. }, {
  28. xtype : 'hidden',
  29. name : 'or_custcode',
  30. fieldLabel : '客户编号'
  31. }, {
  32. xtype : "dbfindtrigger",
  33. name : "or_custname",
  34. fieldLabel : "客户名称"
  35. }, {
  36. xtype : 'hidden',
  37. name : 'or_bankid',
  38. fieldLabel : '账户ID'
  39. }, {
  40. xtype : 'hidden',
  41. name : 'or_bankcode',
  42. fieldLabel : '账户编号'
  43. }, {
  44. xtype : "dbfindtrigger",
  45. name : "or_bankname",
  46. fieldLabel : "账户名称"
  47. }, {
  48. name : "detailGridField",
  49. xtype : "detailGridField",
  50. storeModel:'saas.model.money.Othreceipts',
  51. detnoColumn: 'ord_detno',
  52. deleteDetailUrl:'/api/money/othreceipts/deleteDetail/',
  53. columnWidth : 1,
  54. columns : [
  55. {
  56. text : "id",
  57. dataIndex : "id",
  58. xtype : "numbercolumn",
  59. width:0
  60. }, {
  61. text : "期间",
  62. dataIndex : "ord_ym",
  63. editor : {
  64. xtype : "numberfield"
  65. },
  66. width : 120.0,
  67. xtype : "numbercolumn",
  68. items : null
  69. }, {
  70. text : "收入类别",
  71. width : 200.0,
  72. dataIndex : "ord_type",
  73. xtype : "",
  74. items : null,
  75. editor : {
  76. xtype : "remotecombo",
  77. storeUrl:'/api/document/fundinoutType/list',
  78. name : "ord_type",
  79. fieldLabel : "收入类别",
  80. allowBlank : true,
  81. queryMode: 'local',
  82. displayField: 'display',
  83. valueField: 'value',
  84. columnWidth : 0.25,
  85. etc:{
  86. inoutkind:{
  87. keyField:'id',
  88. dataField:'ft_name',
  89. reqUrl:'/api/document/fundinoutType/save',
  90. delUrl:'/api/document/fundinoutType/delete'
  91. }
  92. },
  93. addHandler:function(b){
  94. var form = this.ownerCmp.ownerCt.ownerCmp.ownerCt;
  95. this.dialog = form.getController().getView().add({
  96. xtype: 'document-kind-childwin',
  97. bind: {
  98. title: '新增收入类型'
  99. },
  100. dataKind:'inoutkind',
  101. belong:this.ownerCmp.etc['inoutkind'],
  102. _parent:form,
  103. record:null,
  104. session: true
  105. });
  106. this.dialog.show();
  107. }
  108. }
  109. }, {
  110. text : "金额",
  111. dataIndex : "ord_nowbalance",
  112. editor : {
  113. xtype : "numberfield"
  114. },
  115. width : 120.0,
  116. xtype : "numbercolumn",
  117. format:'0',
  118. items : null,
  119. summaryType: 'sum'
  120. }, {
  121. text : "单价",
  122. editor : {
  123. xtype : "numberfield"
  124. },
  125. format:'0,000.00',
  126. dataIndex : "sd_price",
  127. width : 120.0,
  128. xtype : "numbercolumn",
  129. items : null,
  130. summaryType: 'sum'
  131. }, {
  132. text : "备注",
  133. dataIndex : "ord_remark",
  134. width : 120.0,
  135. items : null,
  136. flex : 1.0,
  137. editor : {
  138. xtype : ""
  139. }
  140. }
  141. ]
  142. }, {
  143. xtype : "textfield",
  144. name : "or_amount",
  145. fieldLabel : "收款金额",
  146. readOnly:true
  147. },{
  148. xtype : "textfield",
  149. name : "or_remark",
  150. fieldLabel : "备注",
  151. allowBlank : true,
  152. columnWidth : 0.75
  153. }, {
  154. xtype : "textfield",
  155. name : "or_recorder",
  156. fieldLabel : "录入人",
  157. readOnly:true
  158. }, {
  159. format : "Y-m-d",
  160. xtype : "datefield",
  161. name : "or_date",
  162. fieldLabel : "录入日期",
  163. readOnly:true
  164. }
  165. ]
  166. });