FormPanel.js 5.5 KB

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