FormPanel.js 11 KB

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