FormPanel.js 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  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:'/api/money/othspendings/read/',
  16. _saveUrl:'/api/money/othspendings/save/',
  17. _auditUrl:'/api/money/othspendings/audit/',
  18. _unAuditUrl: '/api/money/othspendings/unAudit/',
  19. _deleteUrl:'/api/money/othspendings/delete/',
  20. initId:0,
  21. defaultItems: [{
  22. xtype: 'hidden',
  23. name: 'id',
  24. fieldLabel: 'id'
  25. }, {
  26. xtype : 'hidden',
  27. name : 'os_vendid',
  28. fieldLabel : '供应商ID'
  29. }, {
  30. xtype : 'hidden',
  31. name : 'os_vendcode',
  32. fieldLabel : '供应商编号'
  33. }, {
  34. xtype : "dbfindtrigger",
  35. name : "os_vendname",
  36. fieldLabel : "供应商名称",
  37. allowBlank : false
  38. }, {
  39. xtype : 'hidden',
  40. name : 'os_bankid',
  41. fieldLabel : '结算账户ID'
  42. }, {
  43. xtype : 'hidden',
  44. name : 'os_bankcode',
  45. fieldLabel : '结算账户编号'
  46. }, {
  47. xtype : "dbfindtrigger",
  48. name : "os_bankname",
  49. fieldLabel : "账户名称",
  50. allowBlank : false
  51. }, {
  52. xtype:'datefield',
  53. name : 'os_date',
  54. fieldLabel : '单据日期',
  55. allowBlank : false
  56. },{
  57. name : "detailGridField",
  58. xtype : "detailGridField",
  59. storeModel:'saas.model.money.Othspendings',
  60. detnoColumn: 'osd_detno',
  61. deleteDetailUrl:'/api/money/othspendings/deleteDetail/',
  62. columnWidth : 1,
  63. columns : [
  64. {
  65. text : "id",
  66. dataIndex : "id",
  67. xtype : "numbercolumn",
  68. width:0
  69. }, {
  70. text : "期间",
  71. dataIndex : "osd_ym",
  72. editor : {
  73. xtype : "numberfield",
  74. readOnly:true
  75. },
  76. // defaultValue: Ext.Date.format(new Date(), 'Ym'),
  77. width : 120.0,
  78. hidden: true,
  79. items : null
  80. }, {
  81. text : "支出类别",
  82. width : 200.0,
  83. dataIndex : "osd_type",
  84. items : null,
  85. editor : {
  86. xtype : "remotecombo",
  87. storeUrl:'/api/document/fundinouttype/getCombo?condition=支出',
  88. addHandler:function(b){
  89. var document = Ext.create('saas.view.document.kind.Kind',{});
  90. var form =this.ownerCmp.ownerCt.ownerCmp.ownerCt;
  91. this.dialog = form.getController().getView().add({
  92. xtype: 'document-kind-childwin',
  93. bind: {
  94. title: '新增收入类别'
  95. },
  96. dataKind:'inoutkind',
  97. belong:document.etc['inoutkind'],
  98. _parent:form,
  99. _combo:this.ownerCmp,
  100. record:null,
  101. session: true
  102. });
  103. this.dialog.show();
  104. }
  105. }
  106. }, {
  107. text : "金额",
  108. xtype: 'numbercolumn',
  109. dataIndex : "osd_nowbalance",
  110. width : 120.0,
  111. editor : {
  112. xtype : "numberfield",
  113. decimalPrecision: 2
  114. },
  115. renderer : function(v) {
  116. var arr = (v + '.').split('.');
  117. var xr = (new Array(arr[1].length)).fill('0');
  118. var format = '0,000.' + xr.join();
  119. return Ext.util.Format.number(v, format);
  120. },
  121. summaryType: 'sum',
  122. summaryRenderer: function(v) {
  123. var arr = (v + '.').split('.');
  124. var xr = (new Array(arr[1].length)).fill('0');
  125. var format = '0,000.' + xr.join();
  126. return Ext.util.Format.number(v, format);
  127. }
  128. }, {
  129. text : "备注",
  130. dataIndex : "osd_remark",
  131. width : 250,
  132. editor : {
  133. xtype : "textfield"
  134. },
  135. }
  136. ]
  137. },{
  138. xtype : 'numberfield',
  139. name : 'os_amount',
  140. fieldLabel : '付款金额',
  141. readOnly:true
  142. },{
  143. xtype : "textfield",
  144. name : "os_remark",
  145. fieldLabel : "备注",
  146. allowBlank : true,
  147. columnWidth : 0.75
  148. }, {
  149. xtype : "textfield",
  150. name : "os_recorder",
  151. fieldLabel : "录入人",
  152. readOnly:true
  153. }, {
  154. xtype : "datefield",
  155. name : "os_recorddate",
  156. fieldLabel : "录入日期",
  157. readOnly:true
  158. }
  159. ]
  160. });