FormPanel.js 5.0 KB

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