FormPanel.js 9.9 KB

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