FormPanel.js 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. Ext.define('saas.view.money.othspendings.FormPanel', {
  2. extend: 'saas.view.core.form.FormPanel',
  3. xtype: 'money-othspendings-formpanel',
  4. controller: 'money-othspendings-formpanel',
  5. viewModel: 'money-othspendings-formpanel',
  6. viewName: 'money-othspendings-formpanel',
  7. caller:'OthSpendings',
  8. //字段属性
  9. _title:'其它支出单',
  10. _idField: 'id',
  11. _codeField: 'os_code',
  12. _statusField: 'os_status',
  13. _statusCodeField: 'os_statuscode',
  14. _relationColumn: 'osd_orid',
  15. _readUrl:basePath+'money/othspendings/read/',
  16. _saveUrl:basePath+'money/othspendings/save',
  17. _deleteUrl:basePath+'money/othspendings/delete/',
  18. initId:0,
  19. defaultItems: [{
  20. xtype: 'hidden',
  21. name: 'id',
  22. fieldLabel: 'id'
  23. }, {
  24. xtype : 'hidden',
  25. name : 'os_vendid',
  26. fieldLabel : '供应商ID'
  27. }, {
  28. xtype : 'hidden',
  29. name : 'os_vendcode',
  30. fieldLabel : '供应商编号'
  31. }, {
  32. xtype : "dbfindtrigger",
  33. name : "os_vendname",
  34. fieldLabel : "供应商名称"
  35. }, {
  36. xtype : 'hidden',
  37. name : 'os_bankid',
  38. fieldLabel : '结算账户ID'
  39. }, {
  40. xtype : 'hidden',
  41. name : 'os_bankcode',
  42. fieldLabel : '结算账户编号'
  43. }, {
  44. xtype : "dbfindtrigger",
  45. name : "os_bankname",
  46. fieldLabel : "结算账户名称"
  47. }, {
  48. name : "detailGridField",
  49. xtype : "detailGridField",
  50. storeModel:'saas.model.money.Othspendings',
  51. detnoColumn: 'osd_detno',
  52. _deleteDetailUrl:basePath+'money/othreceipts/deleteItem/',
  53. columnWidth : 1,
  54. columns : [
  55. {
  56. text : "id",
  57. dataIndex : "id",
  58. xtype : "numbercolumn",
  59. width:0
  60. }, {
  61. text : "期间",
  62. dataIndex : "osd_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 : "osd_type",
  73. xtype : "",
  74. items : null,
  75. editor : {
  76. xtype : "remotecombo",
  77. storeUrl:basePath+'ducument/fundinoutType/list',
  78. name : "osd_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. var form = this.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 : "osd_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 : "osd_remark",
  134. width : 120.0,
  135. items : null,
  136. ignore:true,
  137. flex : 1.0,
  138. }
  139. ]
  140. }, {
  141. xtype : "textfield",
  142. name : "os_amount",
  143. fieldLabel : "收款金额",
  144. readOnly:true
  145. },{
  146. xtype : "textfield",
  147. name : "os_remark",
  148. fieldLabel : "备注",
  149. allowBlank : true,
  150. columnWidth : 0.75
  151. }, {
  152. xtype : "textfield",
  153. name : "os_recorder",
  154. fieldLabel : "录入人",
  155. readOnly:true
  156. }, {
  157. format : "Y-m-d",
  158. xtype : "datefield",
  159. name : "os_date",
  160. fieldLabel : "录入日期",
  161. readOnly:true
  162. }
  163. ]
  164. });