FormPanel.js 9.9 KB

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