FormPanel.js 13 KB

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