FormPanel.js 9.9 KB

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