FormPanel.js 9.8 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_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. {
  131. text: "名称",
  132. dataIndex: "pr_detail",
  133. ignore: true,
  134. renderer: function (v, m, r) {
  135. return r.data["productDTO"] ? r.data["productDTO"][m.column.dataIndex] : v;
  136. }
  137. },
  138. {
  139. text: "规格",
  140. dataIndex: "pr_spec",
  141. ignore: true,
  142. renderer: function (v, m, r) {
  143. return r.data["productDTO"] ? r.data["productDTO"][m.column.dataIndex] : v;
  144. }
  145. },
  146. {
  147. text: "数量",
  148. dataIndex: "pd_outqty",
  149. allowBlank : false,
  150. width: 120.0,
  151. editor : {
  152. xtype : "numberfield",
  153. decimalPrecision: 8,
  154. minValue:0
  155. },
  156. renderer : function(v) {
  157. var arr = (v + '.').split('.');
  158. var xr = (new Array(arr[1].length)).fill('0');
  159. var format = '0.' + xr.join();
  160. return Ext.util.Format.number(v, format);
  161. },
  162. summaryType: 'sum',
  163. summaryRenderer: function(v) {
  164. var arr = (v + '.').split('.');
  165. var xr = (new Array(arr[1].length)).fill('0');
  166. var format = '0.' + xr.join();
  167. return Ext.util.Format.number(v, format);
  168. }
  169. },{
  170. text: "仓库id",
  171. dataIndex: "pd_whid",
  172. xtype: "numbercolumn",
  173. hidden: true
  174. },
  175. {
  176. text: "仓库编号",
  177. dataIndex: "pd_whcode",
  178. hidden: true
  179. },
  180. {
  181. text: "仓库",
  182. dataIndex: "pd_whname",
  183. width: 120.0,
  184. allowBlank : false,
  185. editor: {
  186. displayField: "display",
  187. editable: true,
  188. format: "",
  189. hideTrigger: false,
  190. maxLength: 100.0,
  191. minValue: null,
  192. positiveNum: false,
  193. queryMode: "local",
  194. store: null,
  195. valueField: "value",
  196. xtype: "dbfindtrigger"
  197. }
  198. },
  199. {
  200. text: "单价",
  201. dataIndex: "pd_orderprice",
  202. editor : {
  203. xtype : "numberfield",
  204. decimalPrecision: 8,
  205. minValue:0
  206. },
  207. renderer : function(v) {
  208. var arr = (v + '.').split('.');
  209. var xr = (new Array(arr[1].length)).fill('0');
  210. var format = '0,000.' + xr.join();
  211. return Ext.util.Format.number(v, format);
  212. },
  213. summaryType: 'sum',
  214. summaryRenderer: function(v) {
  215. var arr = (v + '.').split('.');
  216. var xr = (new Array(arr[1].length)).fill('0');
  217. var format = '0,000.' + xr.join();
  218. return Ext.util.Format.number(v, format);
  219. }
  220. },
  221. {
  222. text: "含税金额",
  223. dataIndex: "pd_total",
  224. width: 120.0,
  225. editor : {
  226. xtype : "numberfield",
  227. decimalPrecision: 2,
  228. editable:false
  229. },
  230. renderer : function(v) {
  231. var arr = (v + '.').split('.');
  232. var xr = (new Array(arr[1].length)).fill('0');
  233. var format = '0,000.' + xr.join();
  234. return Ext.util.Format.number(v, format);
  235. },
  236. summaryType: 'sum',
  237. summaryRenderer: 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. }, {
  244. text: "税率",
  245. dataIndex: "pd_taxrate",
  246. editor : {
  247. xtype : "numberfield",
  248. decimalPrecision: 0,
  249. minValue: 0,
  250. maxValue: 100
  251. }
  252. },
  253. {
  254. text: "未税金额",
  255. dataIndex: "pd_nettotal",
  256. editor : {
  257. xtype : "numberfield",
  258. decimalPrecision: 2,
  259. editable:false
  260. },
  261. renderer : 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. summaryType: 'sum',
  268. summaryRenderer: function(v) {
  269. var arr = (v + '.').split('.');
  270. var xr = (new Array(arr[1].length)).fill('0');
  271. var format = '0,000.' + xr.join();
  272. return Ext.util.Format.number(v, format);
  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. });