FormPanel.js 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274
  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. _auditmanField: 'os_auditman',
  15. _auditdateField: 'os_auditdate',
  16. _relationColumn: 'osd_osid',
  17. _readUrl: '/api/money/othspendings/read',
  18. _saveUrl: '/api/money/othspendings/save',
  19. _auditUrl: '/api/money/othspendings/audit',
  20. _unAuditUrl: '/api/money/othspendings/unAudit',
  21. _deleteUrl: '/api/money/othspendings/delete',
  22. initId: 0,
  23. initComponent: function () {
  24. Ext.apply(this, {
  25. defaultItems: [{
  26. xtype: 'hidden',
  27. name: 'id',
  28. fieldLabel: 'id'
  29. }, {
  30. xtype: 'hidden',
  31. name: 'os_vendid',
  32. fieldLabel: '供应商ID'
  33. }, {
  34. xtype: 'hidden',
  35. name: 'os_vendcode',
  36. fieldLabel: '供应商编号'
  37. }, {
  38. xtype: "vendorDbfindTrigger",
  39. name: "os_vendname",
  40. fieldLabel: "供应商名称",
  41. // allowBlank : false
  42. }, {
  43. xtype: 'hidden',
  44. name: 'os_bankid',
  45. fieldLabel: '结算账户ID'
  46. }, {
  47. xtype: 'hidden',
  48. name: 'os_bankcode',
  49. fieldLabel: '结算账户编号'
  50. }, {
  51. xtype: "bandinfoDbfindTrigger",
  52. name: "os_bankname",
  53. fieldLabel: "账户名称",
  54. allowBlank: false
  55. }, {
  56. xtype: 'datefield',
  57. name: 'os_date',
  58. fieldLabel: '单据日期',
  59. defaultValue: new Date(),
  60. allowBlank: false
  61. }, {
  62. name: "detailGridField",
  63. xtype: "detailGridField",
  64. storeModel: 'saas.model.money.Othspendings',
  65. detnoColumn: 'osd_detno',
  66. deleteDetailUrl: '/api/money/othspendings/deleteDetail',
  67. columnWidth: 1,
  68. columns: [{
  69. text: "id",
  70. dataIndex: "id",
  71. xtype: "numbercolumn",
  72. hidden: true
  73. }, {
  74. text: "期间",
  75. dataIndex: "osd_ym",
  76. editor: {
  77. xtype: "numberfield",
  78. readOnly: true
  79. },
  80. // defaultValue: Ext.Date.format(new Date(), 'Ym'),
  81. width: 110.0,
  82. hidden: true,
  83. items: null
  84. }, {
  85. text: "支出类别",
  86. width: 150.0,
  87. dataIndex: "osd_type",
  88. items: null,
  89. allowBlank: false,
  90. hiddenBtn: false, //true 则会关闭新增按钮功能
  91. editor: {
  92. xtype: "remotecombo",
  93. storeUrl: '/api/document/fundinouttype/getCombo?condition=支出',
  94. addHandler: function (b) {
  95. var document = Ext.create('saas.view.document.kind.Kind', {});
  96. var form = this.ownerCmp.ownerCt.ownerCmp.ownerCt;
  97. this.dialog = form.getController().getView().add({
  98. xtype: 'document-kind-childwin',
  99. bind: {
  100. title: '新增支出类别'
  101. },
  102. dataKind: 'inoutkind',
  103. belong: document.etc['inoutkind'],
  104. _parent: form,
  105. _combo: this.ownerCmp,
  106. record: null,
  107. session: true
  108. });
  109. this.dialog.show();
  110. }
  111. }
  112. }, {
  113. text: "金额(元)",
  114. xtype: 'numbercolumn',
  115. dataIndex: "osd_nowbalance",
  116. width: 110.0,
  117. allowBlank: false,
  118. editor: {
  119. xtype: "numberfield",
  120. decimalPrecision: 2
  121. },
  122. renderer: function (v) {
  123. return saas.util.BaseUtil.numberFormat(v, 2, true);
  124. },
  125. summaryType: 'sum',
  126. summaryRenderer: function(v, d, f, m) {
  127. return saas.util.BaseUtil.numberFormat(v, 2, true);
  128. }
  129. }, {
  130. text: "备注",
  131. dataIndex: "osd_remark",
  132. width: 250,
  133. editor: {
  134. xtype: "textfield"
  135. },
  136. }, {
  137. dataIndex: "osd_text1",
  138. text: "自定义字段1",
  139. width: 100,
  140. hidden: true,
  141. initHidden: false,
  142. editor: {
  143. xtype: "textfield"
  144. },
  145. }, {
  146. dataIndex: "osd_text2",
  147. text: "自定义字段2",
  148. width: 100,
  149. hidden: true,
  150. initHidden: false,
  151. editor: {
  152. xtype: "textfield"
  153. },
  154. }, {
  155. dataIndex: "osd_text3",
  156. text: "自定义字段3",
  157. width: 100,
  158. hidden: true,
  159. initHidden: false,
  160. editor: {
  161. xtype: "textfield"
  162. },
  163. }, {
  164. dataIndex: "osd_text4",
  165. text: "自定义字段4",
  166. width: 100,
  167. hidden: true,
  168. initHidden: false,
  169. editor: {
  170. xtype: "textfield"
  171. },
  172. }, {
  173. dataIndex: "osd_text5",
  174. text: "自定义字段5",
  175. width: 100,
  176. hidden: true,
  177. initHidden: false,
  178. editor: {
  179. xtype: "textfield"
  180. },
  181. }]
  182. }, {
  183. xtype: 'numberfield',
  184. name: 'os_amount',
  185. fieldLabel: '付款金额(元)',
  186. readOnly: true
  187. }, {
  188. xtype: "textfield",
  189. name: "os_remark",
  190. fieldLabel: "备注",
  191. allowBlank: true,
  192. columnWidth: 0.75
  193. }, {
  194. xtype: "hidden",
  195. name: "creatorId",
  196. fieldLabel: "录入人ID",
  197. readOnly: true
  198. }, {
  199. xtype: "textfield",
  200. name: "creatorName",
  201. fieldLabel: "录入人",
  202. readOnly: true
  203. }, {
  204. xtype: "datefield",
  205. name: "createTime",
  206. fieldLabel: "录入日期",
  207. readOnly: true,
  208. defaultValue: new Date()
  209. }, {
  210. xtype: "hidden",
  211. name: "updaterId",
  212. fieldLabel: "更新人ID",
  213. readOnly: true
  214. }, {
  215. xtype: "hidden",
  216. name: "updaterName",
  217. fieldLabel: "更新人",
  218. readOnly: true
  219. }, {
  220. xtype: "hidden",
  221. name: "updateTime",
  222. fieldLabel: "更新日期",
  223. readOnly: true,
  224. defaultValue: new Date()
  225. }, {
  226. xtype: 'textfield',
  227. name: 'os_auditman',
  228. fieldLabel: '审核人',
  229. readOnly: true
  230. }, {
  231. xtype: "datefield",
  232. name: "os_auditdate",
  233. fieldLabel: "审核日期",
  234. readOnly: true
  235. }, {
  236. xtype: "textfield",
  237. name: "os_text1",
  238. fieldLabel: "自定义字段1",
  239. hidden: true,
  240. initHidden: false
  241. }, {
  242. xtype: "textfield",
  243. name: "os_text2",
  244. fieldLabel: "自定义字段2",
  245. hidden: true,
  246. initHidden: false
  247. }, {
  248. xtype: "textfield",
  249. name: "os_text3",
  250. fieldLabel: "自定义字段3",
  251. hidden: true,
  252. initHidden: false
  253. }, {
  254. xtype: "textfield",
  255. name: "os_text4",
  256. fieldLabel: "自定义字段4",
  257. hidden: true,
  258. initHidden: false
  259. }, {
  260. xtype: "textfield",
  261. name: "os_text5",
  262. fieldLabel: "自定义字段5",
  263. hidden: true,
  264. initHidden: false
  265. }]
  266. });
  267. this.callParent(arguments);
  268. },
  269. });