FormPanel.js 5.3 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:basePath+'money/othreceipts/read/',
  16. _saveUrl:basePath+'money/othreceipts/save',
  17. _deleteUrl:basePath+'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:basePath+'money/deleteItem/',
  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:basePath+'ducument/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:basePath+'ducument/fundinoutType/save',
  90. delUrl:basePath+'ducument/fundinoutType/delete'
  91. }
  92. },
  93. addHandler:function(b){
  94. //this.ownerCmp.etc['inoutkind'],
  95. var form = this.ownerCmp.ownerCt;
  96. this.dialog = form.getController().getView().add({
  97. xtype: 'document-kind-childwin',
  98. bind: {
  99. title: '新增收入类型'
  100. },
  101. dataKind:'inoutkind',
  102. belong:this.ownerCmp.etc['inoutkind'],
  103. _parent:form,
  104. record:null,
  105. session: true
  106. });
  107. this.dialog.show();
  108. }
  109. }
  110. }, {
  111. text : "金额",
  112. dataIndex : "ord_nowbalance",
  113. editor : {
  114. xtype : "numberfield"
  115. },
  116. width : 120.0,
  117. xtype : "numbercolumn",
  118. format:'0',
  119. items : null,
  120. summaryType: 'sum'
  121. }, {
  122. text : "单价",
  123. editor : {
  124. xtype : "numberfield"
  125. },
  126. format:'0,000.00',
  127. dataIndex : "sd_price",
  128. width : 120.0,
  129. xtype : "numbercolumn",
  130. items : null,
  131. summaryType: 'sum'
  132. }, {
  133. text : "备注",
  134. dataIndex : "ord_remark",
  135. width : 120.0,
  136. items : null,
  137. ignore:true,
  138. flex : 1.0,
  139. }
  140. ]
  141. }, {
  142. xtype : "textfield",
  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 : "textfield",
  154. name : "or_recorder",
  155. fieldLabel : "录入人",
  156. readOnly:true
  157. }, {
  158. format : "Y-m-d",
  159. xtype : "datefield",
  160. name : "or_date",
  161. fieldLabel : "录入日期",
  162. readOnly:true
  163. }
  164. ]
  165. });