FormPanel.js 9.5 KB

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