FormPanel.js 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  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 : "hidden"
  59. }, {
  60. text : "期间",
  61. dataIndex : "osd_ym",
  62. editor : {
  63. xtype : "numberfield"
  64. },
  65. width : 120.0,
  66. xtype : "numbercolumn",
  67. items : null
  68. }, {
  69. text : "支出类别",
  70. width : 200.0,
  71. dataIndex : "osd_type",
  72. xtype : "",
  73. items : null,
  74. editor : {
  75. xtype : "remotecombo",
  76. storeUrl:basePath+'ducument/fundinoutType/getAll',
  77. name : "osd_type",
  78. fieldLabel : "支出类别",
  79. allowBlank : true,
  80. queryMode: 'local',
  81. displayField: 'display',
  82. valueField: 'value',
  83. columnWidth : 0.25,
  84. etc:{
  85. inoutkind:{
  86. keyField:'id',
  87. dataField:'ft_name',
  88. reqUrl:basePath+'ducument/fundinoutType/save',
  89. delUrl:basePath+'ducument/fundinoutType/delete'
  90. }
  91. },
  92. addHandler:function(b){
  93. var form = this.ownerCmp.ownerCt;
  94. this.dialog = form.getController().getView().add({
  95. xtype: 'document-inoutkind-childwin',
  96. bind: {
  97. title: '新增收入类型'
  98. },
  99. dataKind:'vendorkind',
  100. belong:this.ownerCmp.etc['inoutkind'],
  101. _parent:form,
  102. record:null,
  103. session: true
  104. });
  105. this.dialog.show();
  106. }
  107. }
  108. }, {
  109. text : "金额",
  110. dataIndex : "osd_nowbalance",
  111. editor : {
  112. xtype : "numberfield"
  113. },
  114. width : 120.0,
  115. xtype : "numbercolumn",
  116. format:'0',
  117. items : null,
  118. summaryType: 'sum'
  119. }, {
  120. text : "单价",
  121. editor : {
  122. xtype : "numberfield"
  123. },
  124. format:'0,000.00',
  125. dataIndex : "sd_price",
  126. width : 120.0,
  127. xtype : "numbercolumn",
  128. items : null,
  129. summaryType: 'sum'
  130. }, {
  131. text : "备注",
  132. dataIndex : "osd_remark",
  133. width : 120.0,
  134. items : null,
  135. ignore:true,
  136. flex : 1.0,
  137. }
  138. ]
  139. }, {
  140. xtype : "textfield",
  141. name : "os_amount",
  142. fieldLabel : "收款金额",
  143. readOnly:true
  144. },{
  145. xtype : "textfield",
  146. name : "os_remark",
  147. fieldLabel : "备注",
  148. allowBlank : true,
  149. columnWidth : 0.75
  150. }, {
  151. xtype : "textfield",
  152. name : "os_recorder",
  153. fieldLabel : "录入人",
  154. readOnly:true
  155. }, {
  156. format : "Y-m-d",
  157. xtype : "datefield",
  158. name : "os_date",
  159. fieldLabel : "录入日期",
  160. readOnly:true
  161. }
  162. ]
  163. });