FormPanel.js 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319
  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. defaultItems: [{
  25. xtype: 'hidden',
  26. name: 'id',
  27. bind: '{id}',
  28. fieldLabel: 'id',
  29. allowBlank: true,
  30. columnWidth: 0
  31. }, {
  32. xtype: "textfield",
  33. name: "pi_class",
  34. bind: "{pi_class}",
  35. fieldLabel: "单据类型",
  36. readOnly: true,
  37. allowBlank: true,
  38. columnWidth: 0.25
  39. }, {
  40. xtype: "hidden",
  41. name: "pi_custid",
  42. bind: "{pi_custid}",
  43. fieldLabel: "客户ID",
  44. allowBlank: true,
  45. columnWidth: 0.0
  46. }, {
  47. xtype: 'hidden',
  48. name: 'pi_custcode',
  49. bind: '{pi_custcode}',
  50. fieldLabel: '客户编号'
  51. }, {
  52. xtype: 'customerDbfindTrigger',
  53. name: 'pi_custname',
  54. bind: '{pi_custname}',
  55. allowBlank : true,
  56. fieldLabel: '客户名称'
  57. }, {
  58. xtype: "datefield",
  59. name: "pi_date",
  60. bind: "{pi_date}",
  61. fieldLabel: "单据日期",
  62. allowBlank: false,
  63. columnWidth: 0.25,
  64. defaultValue: new Date()
  65. }, {
  66. xtype: "textfield",
  67. name: "pi_total",
  68. bind: "{pi_total}",
  69. fieldLabel: "总额",
  70. allowBlank: true,
  71. readOnly: true,
  72. columnWidth: 0.25
  73. }, {
  74. name: "detailGridField",
  75. xtype: "detailGridField",
  76. storeModel:'saas.model.purchase.ProdIODetail',
  77. deleteDetailUrl: '/api/storage/prodinout/deleteDetail',
  78. detnoColumn: 'pd_pdno',
  79. columns: [{
  80. text: "id",
  81. dataIndex: "id",
  82. xtype: "numbercolumn",
  83. hidden: true
  84. }, {
  85. text: "物料id",
  86. dataIndex: "pd_prodid",
  87. xtype: "numbercolumn",
  88. hidden: true
  89. },
  90. {
  91. text: "物料编号",
  92. width: 150.0,
  93. dataIndex: "pd_prodcode",
  94. xtype: "",
  95. items: null,
  96. allowBlank : false,
  97. editor: {
  98. displayField: "display",
  99. editable: true,
  100. format: "",
  101. hideTrigger: false,
  102. maxLength: 100.0,
  103. minValue: null,
  104. positiveNum: false,
  105. queryMode: "local",
  106. store: null,
  107. valueField: "value",
  108. xtype: "productMultiDbfindTrigger"
  109. }
  110. },{
  111. text: 'model映射需要',
  112. dataIndex: 'productDTO',
  113. hidden: true,
  114. },
  115. {
  116. text: "名称",
  117. dataIndex: "pr_detail",
  118. width : 200.0,
  119. ignore: true,
  120. renderer: function (v, m, r) {
  121. return r.data["productDTO"] ? r.data["productDTO"][m.column.dataIndex] : v;
  122. }
  123. },
  124. {
  125. text: "规格",
  126. dataIndex: "pr_spec",
  127. width : 150.0,
  128. ignore: true,
  129. renderer: function (v, m, r) {
  130. return r.data["productDTO"] ? r.data["productDTO"][m.column.dataIndex] : v;
  131. }
  132. },
  133. {
  134. text: "数量",
  135. xtype: 'numbercolumn',
  136. dataIndex: "pd_outqty",
  137. allowBlank : false,
  138. width: 110.0,
  139. editor : {
  140. xtype : "numberfield",
  141. decimalPrecision: 8,
  142. minValue:0
  143. },
  144. renderer : function(v) {
  145. var arr = (v + '.').split('.');
  146. var xr = (new Array(arr[1].length)).fill('0');
  147. var format = '0.' + xr.join();
  148. return Ext.util.Format.number(v, format);
  149. },
  150. summaryType: 'sum',
  151. summaryRenderer: function(v) {
  152. var arr = (v + '.').split('.');
  153. var xr = (new Array(arr[1].length)).fill('0');
  154. var format = '0.' + xr.join();
  155. return Ext.util.Format.number(v, format);
  156. }
  157. },{
  158. text: "仓库id",
  159. dataIndex: "pd_whid",
  160. xtype: "numbercolumn",
  161. hidden: true
  162. },
  163. {
  164. text: "仓库编号",
  165. dataIndex: "pd_whcode",
  166. hidden: true
  167. },
  168. {
  169. text: "仓库",
  170. dataIndex: "pd_whname",
  171. width: 150.0,
  172. allowBlank : false,
  173. editor: {
  174. displayField: "display",
  175. editable: true,
  176. format: "",
  177. hideTrigger: false,
  178. maxLength: 100.0,
  179. minValue: null,
  180. positiveNum: false,
  181. queryMode: "local",
  182. store: null,
  183. valueField: "value",
  184. xtype: "warehouseDbfindTrigger"
  185. }
  186. },
  187. {
  188. text: "单价",
  189. xtype: 'numbercolumn',
  190. dataIndex: "pd_orderprice",
  191. width : 110.0,
  192. editor : {
  193. xtype : "numberfield",
  194. decimalPrecision: 8,
  195. minValue:0
  196. },
  197. renderer : function(v) {
  198. var arr = (v + '.').split('.');
  199. var xr = (new Array(arr[1].length)).fill('0');
  200. var format = '0,000.' + xr.join();
  201. return Ext.util.Format.number(v, format);
  202. }
  203. },
  204. {
  205. text: "含税金额",
  206. xtype: 'numbercolumn',
  207. dataIndex: "pd_total",
  208. width: 110.0,
  209. renderer : function(v) {
  210. var arr = (v + '.').split('.');
  211. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  212. var format = '0,000.' + xr.join();
  213. return Ext.util.Format.number(v, format);
  214. },
  215. summaryType: 'sum',
  216. summaryRenderer: function(v) {
  217. var arr = (v + '.').split('.');
  218. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  219. var format = '0,000.' + xr.join();
  220. return Ext.util.Format.number(v, format);
  221. }
  222. }, {
  223. text: "税率",
  224. xtype: 'numbercolumn',
  225. dataIndex: "pd_taxrate",
  226. width : 80.0,
  227. editor : {
  228. xtype : "numberfield",
  229. decimalPrecision: 0,
  230. minValue: 0,
  231. maxValue: 100
  232. },
  233. renderer : function(v) {
  234. return Ext.util.Format.number(v, '0');
  235. }
  236. },
  237. {
  238. text: "未税金额",
  239. xtype: 'numbercolumn',
  240. dataIndex: "pd_nettotal",
  241. width : 110.0,
  242. renderer : function(v) {
  243. var arr = (v + '.').split('.');
  244. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  245. var format = '0,000.' + xr.join();
  246. return Ext.util.Format.number(v, format);
  247. },
  248. summaryType: 'sum',
  249. summaryRenderer: function(v) {
  250. var arr = (v + '.').split('.');
  251. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  252. var format = '0,000.' + xr.join();
  253. return Ext.util.Format.number(v, format);
  254. }
  255. },{
  256. text : "备注",
  257. dataIndex : "pd_remark",
  258. width : 250,
  259. items : null,
  260. editor : {
  261. xtype : "textfield"
  262. },
  263. }
  264. ]
  265. },{
  266. xtype : "textfield",
  267. name : "pi_remark",
  268. fieldLabel : "备注",
  269. columnWidth : 1
  270. },{
  271. xtype : "hidden",
  272. name : "creatorId",
  273. fieldLabel : "录入人ID",
  274. readOnly:true
  275. },
  276. {
  277. xtype : "textfield",
  278. name : "creatorName",
  279. fieldLabel : "录入人",
  280. readOnly:true
  281. }, {
  282. xtype : "datefield",
  283. name : "createTime",
  284. fieldLabel : "录入日期",
  285. readOnly:true,
  286. defaultValue: new Date()
  287. },{
  288. xtype : "hidden",
  289. name : "updaterId",
  290. fieldLabel : "更新人ID",
  291. readOnly:true
  292. },{
  293. xtype : "hidden",
  294. name : "updaterName",
  295. fieldLabel : "更新人",
  296. readOnly:true
  297. }, {
  298. xtype : "hidden",
  299. name : "updateTime",
  300. fieldLabel : "更新日期",
  301. readOnly:true,
  302. defaultValue: new Date()
  303. }, {
  304. xtype : "textfield",
  305. name : "pi_auditman",
  306. fieldLabel : "审核人",
  307. readOnly:true
  308. }, {
  309. xtype : "datefield",
  310. name : "pi_auditdate",
  311. fieldLabel : "审核日期",
  312. readOnly:true
  313. }]
  314. });