FormPanel.js 13 KB

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