FormPanel.js 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316
  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. 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:'http://localhost:9000/prodinout/deleteDetail/',
  76. deleteDetailUrl: '/api/storage/prodinout/deleteDetail/',
  77. detnoColumn: 'pd_pdno',
  78. columns: [{
  79. text: "id",
  80. dataIndex: "id",
  81. xtype: "numbercolumn",
  82. hidden: true
  83. }, {
  84. text: "物料id",
  85. dataIndex: "pd_prodid",
  86. xtype: "numbercolumn",
  87. hidden: true
  88. },
  89. {
  90. text: "物料编号",
  91. width: 200.0,
  92. dataIndex: "pd_prodcode",
  93. xtype: "",
  94. items: null,
  95. allowBlank : false,
  96. editor: {
  97. displayField: "display",
  98. editable: true,
  99. format: "",
  100. hideTrigger: false,
  101. maxLength: 100.0,
  102. minValue: null,
  103. positiveNum: false,
  104. queryMode: "local",
  105. store: null,
  106. valueField: "value",
  107. xtype: "productMultiDbfindTrigger"
  108. }
  109. },{
  110. text: 'model映射需要',
  111. dataIndex: 'productDTO',
  112. hidden: true,
  113. },
  114. {
  115. text: "名称",
  116. dataIndex: "pr_detail",
  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. ignore: true,
  126. renderer: function (v, m, r) {
  127. return r.data["productDTO"] ? r.data["productDTO"][m.column.dataIndex] : v;
  128. }
  129. },
  130. {
  131. text: "数量",
  132. xtype: 'numbercolumn',
  133. dataIndex: "pd_outqty",
  134. allowBlank : false,
  135. width: 120.0,
  136. editor : {
  137. xtype : "numberfield",
  138. decimalPrecision: 8,
  139. minValue:0
  140. },
  141. renderer : function(v) {
  142. var arr = (v + '.').split('.');
  143. var xr = (new Array(arr[1].length)).fill('0');
  144. var format = '0.' + xr.join();
  145. return Ext.util.Format.number(v, format);
  146. },
  147. summaryType: 'sum',
  148. summaryRenderer: function(v) {
  149. var arr = (v + '.').split('.');
  150. var xr = (new Array(arr[1].length)).fill('0');
  151. var format = '0.' + xr.join();
  152. return Ext.util.Format.number(v, format);
  153. }
  154. },{
  155. text: "仓库id",
  156. dataIndex: "pd_whid",
  157. xtype: "numbercolumn",
  158. hidden: true
  159. },
  160. {
  161. text: "仓库编号",
  162. dataIndex: "pd_whcode",
  163. hidden: true
  164. },
  165. {
  166. text: "仓库",
  167. dataIndex: "pd_whname",
  168. width: 120.0,
  169. allowBlank : false,
  170. editor: {
  171. displayField: "display",
  172. editable: true,
  173. format: "",
  174. hideTrigger: false,
  175. maxLength: 100.0,
  176. minValue: null,
  177. positiveNum: false,
  178. queryMode: "local",
  179. store: null,
  180. valueField: "value",
  181. xtype: "warehouseDbfindTrigger"
  182. }
  183. },
  184. {
  185. text: "单价",
  186. xtype: 'numbercolumn',
  187. dataIndex: "pd_orderprice",
  188. editor : {
  189. xtype : "numberfield",
  190. decimalPrecision: 8,
  191. minValue:0
  192. },
  193. renderer : function(v) {
  194. var arr = (v + '.').split('.');
  195. var xr = (new Array(arr[1].length)).fill('0');
  196. var format = '0,000.' + xr.join();
  197. return Ext.util.Format.number(v, format);
  198. }
  199. },
  200. {
  201. text: "含税金额",
  202. xtype: 'numbercolumn',
  203. dataIndex: "pd_total",
  204. width: 120.0,
  205. editor : {
  206. xtype : "numberfield",
  207. decimalPrecision: 2,
  208. editable:false
  209. },
  210. renderer : function(v) {
  211. var arr = (v + '.').split('.');
  212. var xr = (new Array(arr[1].length)).fill('0');
  213. var format = '0,000.' + xr.join();
  214. return Ext.util.Format.number(v, format);
  215. },
  216. summaryType: 'sum',
  217. summaryRenderer: function(v) {
  218. var arr = (v + '.').split('.');
  219. var xr = (new Array(arr[1].length)).fill('0');
  220. var format = '0,000.' + xr.join();
  221. return Ext.util.Format.number(v, format);
  222. }
  223. }, {
  224. text: "税率",
  225. xtype: 'numbercolumn',
  226. dataIndex: "pd_taxrate",
  227. editor : {
  228. xtype : "numberfield",
  229. decimalPrecision: 0,
  230. minValue: 0,
  231. maxValue: 100
  232. }
  233. },
  234. {
  235. text: "未税金额",
  236. xtype: 'numbercolumn',
  237. dataIndex: "pd_nettotal",
  238. editor : {
  239. xtype : "numberfield",
  240. decimalPrecision: 2,
  241. editable:false
  242. },
  243. renderer : function(v) {
  244. var arr = (v + '.').split('.');
  245. var xr = (new Array(arr[1].length)).fill('0');
  246. var format = '0,000.' + xr.join();
  247. return Ext.util.Format.number(v, format);
  248. },
  249. summaryType: 'sum',
  250. summaryRenderer: function(v) {
  251. var arr = (v + '.').split('.');
  252. var xr = (new Array(arr[1].length)).fill('0');
  253. var format = '0,000.' + xr.join();
  254. return Ext.util.Format.number(v, format);
  255. }
  256. },{
  257. text : "备注",
  258. dataIndex : "pd_remark",
  259. width : 250,
  260. items : null,
  261. editor : {
  262. xtype : "textfield"
  263. },
  264. }
  265. ]
  266. },{
  267. xtype : "hidden",
  268. name : "creatorId",
  269. fieldLabel : "录入人ID",
  270. readOnly:true
  271. },
  272. {
  273. xtype : "textfield",
  274. name : "creatorName",
  275. fieldLabel : "录入人",
  276. readOnly:true
  277. }, {
  278. xtype : "datefield",
  279. name : "createTime",
  280. fieldLabel : "录入日期",
  281. readOnly:true,
  282. defaultValue: new Date()
  283. },{
  284. xtype : "hidden",
  285. name : "updaterId",
  286. fieldLabel : "更新人ID",
  287. readOnly:true
  288. },{
  289. xtype : "hidden",
  290. name : "updaterName",
  291. fieldLabel : "更新人",
  292. readOnly:true
  293. }, {
  294. xtype : "hidden",
  295. name : "updateTime",
  296. fieldLabel : "更新日期",
  297. readOnly:true,
  298. defaultValue: new Date()
  299. }, {
  300. xtype : "textfield",
  301. name : "pi_auditman",
  302. fieldLabel : "审核人",
  303. readOnly:true
  304. }, {
  305. xtype : "datefield",
  306. name : "pi_auditdate",
  307. fieldLabel : "审核日期",
  308. readOnly:true
  309. }]
  310. });