FormPanel.js 5.3 KB

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