FormPanel.js 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301
  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. editor: {
  116. displayField: "display",
  117. editable: true,
  118. format: "",
  119. hideTrigger: false,
  120. maxLength: 100.0,
  121. minValue: null,
  122. positiveNum: false,
  123. queryMode: "local",
  124. store: null,
  125. valueField: "value",
  126. xtype: "multidbfindtrigger"
  127. }
  128. },
  129. {
  130. text: "名称",
  131. dataIndex: "pr_detail",
  132. ignore: true,
  133. renderer: function (v, m, r) {
  134. return r.data["productDTO"] ? r.data["productDTO"][m.column.dataIndex] : v;
  135. }
  136. },
  137. {
  138. text: "规格",
  139. dataIndex: "pr_spec",
  140. ignore: true,
  141. renderer: function (v, m, r) {
  142. return r.data["productDTO"] ? r.data["productDTO"][m.column.dataIndex] : v;
  143. }
  144. },
  145. {
  146. text: "数量",
  147. dataIndex: "pd_outqty",
  148. width: 120.0,
  149. editor : {
  150. xtype : "numberfield",
  151. decimalPrecision: 8,
  152. minValue:0
  153. },
  154. renderer : function(v) {
  155. var arr = (v + '.').split('.');
  156. var xr = (new Array(arr[1].length)).fill('0');
  157. var format = '0.' + xr.join();
  158. return Ext.util.Format.number(v, format);
  159. },
  160. summaryType: 'sum',
  161. summaryRenderer: 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. },{
  168. text: "仓库id",
  169. dataIndex: "pd_whid",
  170. xtype: "numbercolumn",
  171. hidden: true
  172. },
  173. {
  174. text: "仓库编号",
  175. dataIndex: "pd_whcode",
  176. hidden: true
  177. },
  178. {
  179. text: "仓库",
  180. dataIndex: "pd_whname",
  181. width: 120.0,
  182. allowBlank : false,
  183. editor: {
  184. displayField: "display",
  185. editable: true,
  186. format: "",
  187. hideTrigger: false,
  188. maxLength: 100.0,
  189. minValue: null,
  190. positiveNum: false,
  191. queryMode: "local",
  192. store: null,
  193. valueField: "value",
  194. xtype: "dbfindtrigger"
  195. }
  196. },
  197. {
  198. text: "单价",
  199. dataIndex: "pd_orderprice",
  200. editor : {
  201. xtype : "numberfield",
  202. decimalPrecision: 8,
  203. minValue:0
  204. },
  205. renderer : function(v) {
  206. var arr = (v + '.').split('.');
  207. var xr = (new Array(arr[1].length)).fill('0');
  208. var format = '0,000.' + xr.join();
  209. return Ext.util.Format.number(v, format);
  210. },
  211. summaryType: 'sum',
  212. summaryRenderer: function(v) {
  213. var arr = (v + '.').split('.');
  214. var xr = (new Array(arr[1].length)).fill('0');
  215. var format = '0,000.' + xr.join();
  216. return Ext.util.Format.number(v, format);
  217. }
  218. },
  219. {
  220. text: "含税金额",
  221. dataIndex: "pd_total",
  222. width: 120.0,
  223. editor : {
  224. xtype : "numberfield",
  225. decimalPrecision: 2
  226. },
  227. renderer : 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. summaryType: 'sum',
  234. summaryRenderer: function(v) {
  235. var arr = (v + '.').split('.');
  236. var xr = (new Array(arr[1].length)).fill('0');
  237. var format = '0,000.' + xr.join();
  238. return Ext.util.Format.number(v, format);
  239. }
  240. }, {
  241. text: "税率",
  242. dataIndex: "pd_taxrate",
  243. editor : {
  244. xtype : "numberfield",
  245. decimalPrecision: 0,
  246. minValue: 0,
  247. maxValue: 100
  248. }
  249. },
  250. {
  251. text: "未税金额",
  252. dataIndex: "pd_nettotal",
  253. editor : {
  254. xtype : "numberfield",
  255. decimalPrecision: 2
  256. },
  257. renderer : function(v) {
  258. var arr = (v + '.').split('.');
  259. var xr = (new Array(arr[1].length)).fill('0');
  260. var format = '0,000.' + xr.join();
  261. return Ext.util.Format.number(v, format);
  262. },
  263. summaryType: 'sum',
  264. summaryRenderer: function(v) {
  265. var arr = (v + '.').split('.');
  266. var xr = (new Array(arr[1].length)).fill('0');
  267. var format = '0,000.' + xr.join();
  268. return Ext.util.Format.number(v, format);
  269. }
  270. }
  271. ]
  272. },{
  273. xtype : "textfield",
  274. name : "pi_recordman",
  275. fieldLabel : "录入人",
  276. readOnly:true
  277. }, {
  278. xtype : "datefield",
  279. name : "createTime",
  280. fieldLabel : "录入日期",
  281. readOnly:true
  282. }, {
  283. xtype : "textfield",
  284. name : "pi_auditman",
  285. fieldLabel : "审核人",
  286. readOnly:true
  287. }, {
  288. xtype : "datefield",
  289. name : "pi_auditdate",
  290. fieldLabel : "审核日期",
  291. readOnly:true
  292. }]
  293. });