FormPanel.js 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309
  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. dataIndex: "pd_outqty",
  153. allowBlank : false,
  154. width: 120.0,
  155. editor : {
  156. xtype : "numberfield",
  157. decimalPrecision: 8,
  158. minValue:0
  159. },
  160. renderer : function(v) {
  161. var arr = (v + '.').split('.');
  162. var xr = (new Array(arr[1].length)).fill('0');
  163. var format = '0.' + xr.join();
  164. return Ext.util.Format.number(v, format);
  165. },
  166. summaryType: 'sum',
  167. summaryRenderer: function(v) {
  168. var arr = (v + '.').split('.');
  169. var xr = (new Array(arr[1].length)).fill('0');
  170. var format = '0.' + xr.join();
  171. return Ext.util.Format.number(v, format);
  172. }
  173. },{
  174. text: "仓库id",
  175. dataIndex: "pd_whid",
  176. xtype: "numbercolumn",
  177. hidden: true
  178. },
  179. {
  180. text: "仓库编号",
  181. dataIndex: "pd_whcode",
  182. hidden: true
  183. },
  184. {
  185. text: "仓库",
  186. dataIndex: "pd_whname",
  187. width: 120.0,
  188. allowBlank : false,
  189. editor: {
  190. displayField: "display",
  191. editable: true,
  192. format: "",
  193. hideTrigger: false,
  194. maxLength: 100.0,
  195. minValue: null,
  196. positiveNum: false,
  197. queryMode: "local",
  198. store: null,
  199. valueField: "value",
  200. xtype: "dbfindtrigger"
  201. }
  202. },
  203. {
  204. text: "单价",
  205. dataIndex: "pd_orderprice",
  206. editor : {
  207. xtype : "numberfield",
  208. decimalPrecision: 8,
  209. minValue:0
  210. },
  211. renderer : function(v) {
  212. var arr = (v + '.').split('.');
  213. var xr = (new Array(arr[1].length)).fill('0');
  214. var format = '0,000.' + xr.join();
  215. return Ext.util.Format.number(v, format);
  216. },
  217. summaryType: 'sum',
  218. summaryRenderer: function(v) {
  219. var arr = (v + '.').split('.');
  220. var xr = (new Array(arr[1].length)).fill('0');
  221. var format = '0,000.' + xr.join();
  222. return Ext.util.Format.number(v, format);
  223. }
  224. },
  225. {
  226. text: "含税金额",
  227. dataIndex: "pd_total",
  228. width: 120.0,
  229. editor : {
  230. xtype : "numberfield",
  231. decimalPrecision: 2,
  232. editable:false
  233. },
  234. renderer : 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. summaryType: 'sum',
  241. summaryRenderer: function(v) {
  242. var arr = (v + '.').split('.');
  243. var xr = (new Array(arr[1].length)).fill('0');
  244. var format = '0,000.' + xr.join();
  245. return Ext.util.Format.number(v, format);
  246. }
  247. }, {
  248. text: "税率",
  249. dataIndex: "pd_taxrate",
  250. editor : {
  251. xtype : "numberfield",
  252. decimalPrecision: 0,
  253. minValue: 0,
  254. maxValue: 100
  255. }
  256. },
  257. {
  258. text: "未税金额",
  259. dataIndex: "pd_nettotal",
  260. editor : {
  261. xtype : "numberfield",
  262. decimalPrecision: 2,
  263. editable:false
  264. },
  265. renderer : function(v) {
  266. var arr = (v + '.').split('.');
  267. var xr = (new Array(arr[1].length)).fill('0');
  268. var format = '0,000.' + xr.join();
  269. return Ext.util.Format.number(v, format);
  270. },
  271. summaryType: 'sum',
  272. summaryRenderer: function(v) {
  273. var arr = (v + '.').split('.');
  274. var xr = (new Array(arr[1].length)).fill('0');
  275. var format = '0,000.' + xr.join();
  276. return Ext.util.Format.number(v, format);
  277. }
  278. }
  279. ]
  280. },{
  281. xtype : "textfield",
  282. name : "pi_recordman",
  283. fieldLabel : "录入人",
  284. readOnly:true
  285. }, {
  286. xtype : "datefield",
  287. name : "createTime",
  288. fieldLabel : "录入日期",
  289. readOnly:true
  290. }, {
  291. xtype : "textfield",
  292. name : "pi_auditman",
  293. fieldLabel : "审核人",
  294. readOnly:true
  295. }, {
  296. xtype : "datefield",
  297. name : "pi_auditdate",
  298. fieldLabel : "审核日期",
  299. readOnly:true
  300. }]
  301. });