FormPanel.js 10 KB

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