FormPanel.js 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320
  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 : true,
  54. fieldLabel: '客户名称'
  55. }, {
  56. xtype: "datefield",
  57. name: "pi_date",
  58. bind: "{pi_date}",
  59. fieldLabel: "单据日期",
  60. allowBlank: false,
  61. columnWidth: 0.25,
  62. defaultValue: new Date()
  63. }, {
  64. xtype: "textfield",
  65. name: "pi_total",
  66. bind: "{pi_total}",
  67. fieldLabel: "总额",
  68. allowBlank: true,
  69. readOnly: true,
  70. columnWidth: 0.25
  71. }, {
  72. name: "detailGridField",
  73. xtype: "detailGridField",
  74. storeModel:'saas.model.purchase.ProdIODetail',
  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: 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. {
  114. text: "名称",
  115. dataIndex: "pr_detail",
  116. width : 200.0,
  117. ignore: true,
  118. renderer: function (v, m, r) {
  119. return r.data["productDTO"] ? r.data["productDTO"][m.column.dataIndex] : v;
  120. }
  121. },
  122. {
  123. text: "规格",
  124. dataIndex: "pr_spec",
  125. width : 150.0,
  126. ignore: true,
  127. renderer: function (v, m, r) {
  128. return r.data["productDTO"] ? r.data["productDTO"][m.column.dataIndex] : v;
  129. }
  130. },
  131. {
  132. text: "数量",
  133. xtype: 'numbercolumn',
  134. dataIndex: "pd_outqty",
  135. allowBlank : false,
  136. width: 110.0,
  137. editor : {
  138. xtype : "numberfield",
  139. decimalPrecision: 8,
  140. minValue:0
  141. },
  142. renderer : function(v) {
  143. var arr = (v + '.').split('.');
  144. var xr = (new Array(arr[1].length)).fill('0');
  145. var format = '0.' + xr.join();
  146. return Ext.util.Format.number(v, format);
  147. },
  148. summaryType: 'sum',
  149. summaryRenderer: function(v) {
  150. var arr = (v + '.').split('.');
  151. var xr = (new Array(arr[1].length)).fill('0');
  152. var format = '0.' + xr.join();
  153. return Ext.util.Format.number(v, format);
  154. }
  155. },{
  156. text: "仓库id",
  157. dataIndex: "pd_whid",
  158. xtype: "numbercolumn",
  159. hidden: true
  160. },
  161. {
  162. text: "仓库编号",
  163. dataIndex: "pd_whcode",
  164. hidden: true
  165. },
  166. {
  167. text: "仓库",
  168. dataIndex: "pd_whname",
  169. width: 150.0,
  170. allowBlank : false,
  171. editor: {
  172. displayField: "display",
  173. editable: true,
  174. format: "",
  175. hideTrigger: false,
  176. maxLength: 100.0,
  177. minValue: null,
  178. positiveNum: false,
  179. queryMode: "local",
  180. store: null,
  181. valueField: "value",
  182. xtype: "warehouseDbfindTrigger"
  183. }
  184. },
  185. {
  186. text: "单价",
  187. xtype: 'numbercolumn',
  188. dataIndex: "pd_orderprice",
  189. width : 110.0,
  190. editor : {
  191. xtype : "numberfield",
  192. decimalPrecision: 8,
  193. minValue:0
  194. },
  195. renderer : function(v) {
  196. var arr = (v + '.').split('.');
  197. var xr = (new Array(arr[1].length)).fill('0');
  198. var format = '0,000.' + xr.join();
  199. return Ext.util.Format.number(v, format);
  200. }
  201. },
  202. {
  203. text: "含税金额",
  204. xtype: 'numbercolumn',
  205. dataIndex: "pd_total",
  206. width: 110.0,
  207. editor : {
  208. xtype : "numberfield",
  209. decimalPrecision: 2,
  210. editable:false
  211. },
  212. renderer : function(v) {
  213. var arr = (v + '.').split('.');
  214. var xr = (new Array(arr[1].length)).fill('0');
  215. var format = '0,000.' + xr.join();
  216. return Ext.util.Format.number(v, format);
  217. },
  218. summaryType: 'sum',
  219. summaryRenderer: function(v) {
  220. var arr = (v + '.').split('.');
  221. var xr = (new Array(arr[1].length)).fill('0');
  222. var format = '0,000.' + xr.join();
  223. return Ext.util.Format.number(v, format);
  224. }
  225. }, {
  226. text: "税率",
  227. xtype: 'numbercolumn',
  228. dataIndex: "pd_taxrate",
  229. width : 80.0,
  230. editor : {
  231. xtype : "numberfield",
  232. decimalPrecision: 0,
  233. minValue: 0,
  234. maxValue: 100
  235. }
  236. },
  237. {
  238. text: "未税金额",
  239. xtype: 'numbercolumn',
  240. dataIndex: "pd_nettotal",
  241. width : 110.0,
  242. editor : {
  243. xtype : "numberfield",
  244. decimalPrecision: 2,
  245. editable:false
  246. },
  247. renderer : function(v) {
  248. var arr = (v + '.').split('.');
  249. var xr = (new Array(arr[1].length)).fill('0');
  250. var format = '0,000.' + xr.join();
  251. return Ext.util.Format.number(v, format);
  252. },
  253. summaryType: 'sum',
  254. summaryRenderer: function(v) {
  255. var arr = (v + '.').split('.');
  256. var xr = (new Array(arr[1].length)).fill('0');
  257. var format = '0,000.' + xr.join();
  258. return Ext.util.Format.number(v, format);
  259. }
  260. },{
  261. text : "备注",
  262. dataIndex : "pd_remark",
  263. width : 250,
  264. items : null,
  265. editor : {
  266. xtype : "textfield"
  267. },
  268. }
  269. ]
  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. });