FormPanel.js 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  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/inoutkind/getCombo',
  78. addHandler:function(b){
  79. var document = Ext.create('saas.view.document.kind.Kind',{});
  80. var form =this.ownerCmp.ownerCt.ownerCmp.ownerCt;
  81. this.dialog = form.getController().getView().add({
  82. xtype: 'document-kind-childwin',
  83. bind: {
  84. title: '新增收入类别类型'
  85. },
  86. dataKind:'inoutkind',
  87. belong:document.etc['inoutkind'],
  88. _parent:form,
  89. _combo:this.ownerCmp,
  90. record:null,
  91. session: true
  92. });
  93. this.dialog.show();
  94. }
  95. }
  96. }, {
  97. text : "金额",
  98. dataIndex : "ord_nowbalance",
  99. editor : {
  100. xtype : "numberfield"
  101. },
  102. width : 120.0,
  103. xtype : "numbercolumn",
  104. format:'0',
  105. items : null,
  106. summaryType: 'sum'
  107. }, {
  108. text : "单价",
  109. editor : {
  110. xtype : "numberfield"
  111. },
  112. format:'0,000.00',
  113. dataIndex : "sd_price",
  114. width : 120.0,
  115. xtype : "numbercolumn",
  116. items : null,
  117. summaryType: 'sum'
  118. }, {
  119. text : "备注",
  120. dataIndex : "ord_remark",
  121. width : 120.0,
  122. items : null,
  123. flex : 1.0,
  124. editor : {
  125. xtype : ""
  126. }
  127. }
  128. ]
  129. }, {
  130. xtype : "textfield",
  131. name : "or_amount",
  132. fieldLabel : "收款金额",
  133. readOnly:true
  134. },{
  135. xtype : "textfield",
  136. name : "or_remark",
  137. fieldLabel : "备注",
  138. allowBlank : true,
  139. columnWidth : 0.75
  140. }, {
  141. xtype : "textfield",
  142. name : "or_recorder",
  143. fieldLabel : "录入人",
  144. readOnly:true
  145. }, {
  146. format : "Y-m-d",
  147. xtype : "datefield",
  148. name : "or_date",
  149. fieldLabel : "录入日期",
  150. readOnly:true
  151. }
  152. ]
  153. });