FormPanel.js 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387
  1. Ext.define('saas.view.stock.appropriationInOut.FormPanel', {
  2. extend: 'saas.view.core.form.FormPanel',
  3. xtype: 'stock-appropriationinout-formpanel',
  4. controller: 'stock-appropriationinout-formpanel',
  5. viewModel: 'stock-appropriationinout-formpanel',
  6. viewName: 'stock-appropriationinout-formpanel',
  7. caller: 'AppropriationInOut',
  8. //字段属性
  9. _title: '调拨单',
  10. _idField: 'id',
  11. _codeField: 'pi_inoutno',
  12. _statusField: 'pi_status',
  13. _statusCodeField: 'pi_statuscode',
  14. _relationColumn: 'pd_piid',
  15. _readUrl: '/api/storage/prodinout/read',
  16. _saveUrl: '/api/storage/prodinout/save',
  17. _auditUrl: '/api/storage/prodinout/audit',
  18. _unAuditUrl: '/api/storage/prodinout/unAudit',
  19. _deleteUrl: '/api/storage/prodinout/delete',
  20. initId: 0,
  21. initComponent: function () {
  22. Ext.apply(this, {
  23. toolBtns: [],
  24. defaultItems: [{
  25. xtype: 'hidden',
  26. name: 'id',
  27. fieldLabel: 'id',
  28. allowBlank: true,
  29. columnWidth: 0
  30. }, {
  31. xtype: "hidden",
  32. name: "pi_class",
  33. fieldLabel: "单据类型",
  34. readOnly: true,
  35. allowBlank: true,
  36. columnWidth: 0.25
  37. }, {
  38. xtype: "hidden",
  39. name: "pi_vendid",
  40. fieldLabel: "供应商ID",
  41. allowBlank: true,
  42. columnWidth: 0.0
  43. }, {
  44. xtype: 'hidden',
  45. name: 'pi_vendcode',
  46. fieldLabel: '供应商编号'
  47. }, {
  48. xtype: 'hidden',
  49. name: 'pi_vendname',
  50. fieldLabel: '供应商名称'
  51. }, {
  52. xtype: "hidden",
  53. name: "pi_custid",
  54. fieldLabel: "客户ID",
  55. allowBlank: true,
  56. columnWidth: 0.0
  57. }, {
  58. xtype: 'hidden',
  59. name: 'pi_custcode',
  60. fieldLabel: '客户编号'
  61. }, {
  62. xtype: 'hidden',
  63. name: 'pi_custname',
  64. fieldLabel: '客户名称'
  65. }, {
  66. xtype: "datefield",
  67. name: "pi_date",
  68. fieldLabel: "单据日期",
  69. allowBlank: false,
  70. columnWidth: 0.25,
  71. defaultValue: new Date()
  72. }, {
  73. name: "detailGridField",
  74. xtype: "detailGridField",
  75. storeModel: 'saas.model.stock.AppropriationInOut',
  76. deleteDetailUrl: '/api/storage/prodinout/deleteDetail',
  77. detnoColumn: 'pd_pdno',
  78. columns: [{
  79. text: "id",
  80. dataIndex: "id",
  81. xtype: "numbercolumn",
  82. hidden: true
  83. }, {
  84. text: "物料id",
  85. dataIndex: "pd_prodid",
  86. xtype: "numbercolumn",
  87. hidden: true
  88. }, {
  89. text: "物料编号",
  90. width: 150.0,
  91. dataIndex: "pd_prodcode",
  92. xtype: "",
  93. items: null,
  94. allowBlank: false,
  95. editor: {
  96. displayField: "display",
  97. editable: true,
  98. format: "",
  99. hideTrigger: false,
  100. maxLength: 100.0,
  101. minValue: null,
  102. positiveNum: false,
  103. queryMode: "local",
  104. store: null,
  105. valueField: "value",
  106. xtype: "productMultiDbfindTrigger"
  107. }
  108. }, {
  109. text: 'model映射需要',
  110. dataIndex: 'productDTO',
  111. hidden: true,
  112. }, {
  113. text: "品牌",
  114. width: 100.0,
  115. dataIndex: "pr_brand",
  116. ignore: true,
  117. renderer: function (v, m, r) {
  118. if (!v) {
  119. return r.data["productDTO"] ? r.data["productDTO"][m.column.dataIndex] : null;
  120. }
  121. return v;
  122. }
  123. }, {
  124. text: "物料名称",
  125. width: 150.0,
  126. dataIndex: "pr_detail",
  127. ignore: true,
  128. renderer: function (v, m, r) {
  129. if (!v) {
  130. return r.data["productDTO"] ? r.data["productDTO"][m.column.dataIndex] : null;
  131. }
  132. return v;
  133. }
  134. }, {
  135. text: "型号",
  136. width: 200.0,
  137. dataIndex: "pr_orispeccode",
  138. ignore: true,
  139. renderer: function (v, m, r) {
  140. if (!v) {
  141. return r.data["productDTO"] ? r.data["productDTO"][m.column.dataIndex] : null;
  142. }
  143. return v;
  144. }
  145. }, {
  146. text: "规格",
  147. width: 200,
  148. dataIndex: "pr_spec",
  149. ignore: true,
  150. renderer: function (v, m, r) {
  151. if (!v) {
  152. return r.data["productDTO"] ? r.data["productDTO"][m.column.dataIndex] : null;
  153. }
  154. return v;
  155. }
  156. }, {
  157. text: "数量",
  158. xtype: 'numbercolumn',
  159. dataIndex: "pd_outqty",
  160. width: 110.0,
  161. allowBlank: false,
  162. editor: {
  163. xtype: "numberfield",
  164. decimalPrecision: 3,
  165. minValue: 0
  166. },
  167. renderer: function(v, m, r) {
  168. return saas.util.BaseUtil.numberFormat(v, 3, false);
  169. },
  170. summaryType: 'sum',
  171. summaryRenderer: function(v, d, f, m) {
  172. return saas.util.BaseUtil.numberFormat(v, 3, false);
  173. }
  174. }, {
  175. text: "单位",
  176. width: 65.0,
  177. dataIndex: "pr_unit",
  178. ignore: true,
  179. renderer: function (v, m, r) {
  180. if (!v) {
  181. return r.data["productDTO"] ? r.data["productDTO"][m.column.dataIndex] : null;
  182. }
  183. return v;
  184. }
  185. }, {
  186. text: "拨出仓库id",
  187. dataIndex: "pd_whid",
  188. xtype: "numbercolumn",
  189. hidden: true
  190. }, {
  191. text: "拨出仓库编号",
  192. dataIndex: "pd_whcode",
  193. hidden: true
  194. }, {
  195. text: "拨出仓库",
  196. dataIndex: "pd_whname",
  197. width: 120.0,
  198. items: null,
  199. allowBlank: false,
  200. editor: {
  201. displayField: "display",
  202. editable: true,
  203. format: "",
  204. hideTrigger: false,
  205. maxLength: 100.0,
  206. minValue: null,
  207. positiveNum: false,
  208. queryMode: "local",
  209. store: null,
  210. valueField: "value",
  211. xtype: "warehouseDbfindTrigger"
  212. }
  213. }, {
  214. text: "拨入仓库id",
  215. dataIndex: "pd_inwhid",
  216. xtype: "numbercolumn",
  217. hidden: true
  218. }, {
  219. text: "拨入仓库编号",
  220. dataIndex: "pd_inwhcode",
  221. hidden: true
  222. }, {
  223. text: "拨入仓库",
  224. dataIndex: "pd_inwhname",
  225. width: 120.0,
  226. allowBlank: false,
  227. items: null,
  228. editor: {
  229. displayField: "display",
  230. editable: true,
  231. format: "",
  232. hideTrigger: false,
  233. maxLength: 100.0,
  234. minValue: null,
  235. positiveNum: false,
  236. queryMode: "local",
  237. store: null,
  238. valueField: "value",
  239. xtype: "warehouseDbfindTrigger"
  240. }
  241. }, {
  242. text: "备注",
  243. dataIndex: "pd_remark",
  244. width: 250,
  245. items: null,
  246. editor: {
  247. xtype: "textfield"
  248. },
  249. }, {
  250. dataIndex: "pd_text1",
  251. text: "自定义字段1",
  252. width: 100,
  253. hidden: true,
  254. initHidden: false,
  255. editor: {
  256. xtype: "textfield"
  257. },
  258. }, {
  259. dataIndex: "pd_text2",
  260. text: "自定义字段2",
  261. width: 100,
  262. hidden: true,
  263. initHidden: false,
  264. editor: {
  265. xtype: "textfield"
  266. },
  267. }, {
  268. dataIndex: "pd_text3",
  269. text: "自定义字段3",
  270. width: 100,
  271. hidden: true,
  272. initHidden: false,
  273. editor: {
  274. xtype: "textfield"
  275. },
  276. }, {
  277. dataIndex: "pd_text4",
  278. text: "自定义字段4",
  279. width: 100,
  280. hidden: true,
  281. initHidden: false,
  282. editor: {
  283. xtype: "textfield"
  284. },
  285. }, {
  286. dataIndex: "pd_text5",
  287. text: "自定义字段5",
  288. width: 100,
  289. hidden: true,
  290. initHidden: false,
  291. editor: {
  292. xtype: "textfield"
  293. },
  294. }]
  295. }, {
  296. xtype: "textfield",
  297. name: "pi_remark",
  298. fieldLabel: "备注",
  299. columnWidth: 1
  300. }, {
  301. xtype: "hidden",
  302. name: "creatorId",
  303. fieldLabel: "录入人ID",
  304. readOnly: true
  305. }, {
  306. xtype: "textfield",
  307. name: "creatorName",
  308. fieldLabel: "录入人",
  309. readOnly: true
  310. }, {
  311. xtype: "datefield",
  312. name: "createTime",
  313. fieldLabel: "录入日期",
  314. readOnly: true,
  315. defaultValue: new Date()
  316. }, {
  317. xtype: "hidden",
  318. name: "updaterId",
  319. fieldLabel: "更新人ID",
  320. readOnly: true,
  321. ignore: true
  322. }, {
  323. xtype: "hidden",
  324. name: "updaterName",
  325. fieldLabel: "更新人",
  326. readOnly: true,
  327. ignore: true
  328. }, {
  329. xtype: "hidden",
  330. name: "updateTime",
  331. fieldLabel: "更新日期",
  332. readOnly: true,
  333. defaultValue: new Date(),
  334. ignore: true
  335. }, {
  336. xtype: "textfield",
  337. name: "pi_auditman",
  338. fieldLabel: "审核人",
  339. readOnly: true,
  340. ignore: true
  341. }, {
  342. xtype: "datefield",
  343. name: "pi_auditdate",
  344. fieldLabel: "审核日期",
  345. readOnly: true,
  346. ignore: true
  347. }, {
  348. xtype: "textfield",
  349. name: "pi_text1",
  350. fieldLabel: "自定义字段1",
  351. hidden: true,
  352. initHidden: false
  353. }, {
  354. xtype: "textfield",
  355. name: "pi_text2",
  356. fieldLabel: "自定义字段2",
  357. hidden: true,
  358. initHidden: false
  359. }, {
  360. xtype: "textfield",
  361. name: "pi_text3",
  362. fieldLabel: "自定义字段3",
  363. hidden: true,
  364. initHidden: false
  365. }, {
  366. xtype: "textfield",
  367. name: "pi_text4",
  368. fieldLabel: "自定义字段4",
  369. hidden: true,
  370. initHidden: false
  371. }, {
  372. xtype: "textfield",
  373. name: "pi_text5",
  374. fieldLabel: "自定义字段5",
  375. hidden: true,
  376. initHidden: false
  377. }]
  378. });
  379. this.callParent(arguments);
  380. },
  381. });