FormPanel.js 10 KB

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