FormPanel.js 9.9 KB

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