FormPanel.js 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323
  1. Ext.define('saas.view.stock.appropriationInOut.FormPanel', {
  2. extend: 'saas.view.core.form.FormPanel',
  3. xtype: 'stock-appropriationinout-formpanel',
  4. controller: 'stock-appropriationinout-formpanel',
  5. viewModel: 'stock-appropriationinout-formpanel',
  6. viewName: 'stock-appropriationinout-formpanel',
  7. caller:'AppropriationInOut',
  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. initId:0,
  21. toolBtns: [],
  22. defaultItems: [{
  23. xtype: 'hidden',
  24. name: 'id',
  25. fieldLabel: 'id',
  26. allowBlank: true,
  27. columnWidth: 0
  28. },{
  29. xtype : "hidden",
  30. name : "pi_class",
  31. fieldLabel : "单据类型",
  32. readOnly:true,
  33. allowBlank : true,
  34. columnWidth : 0.25
  35. }, {
  36. xtype : "hidden",
  37. name : "pi_vendid",
  38. fieldLabel : "供应商ID",
  39. allowBlank : true,
  40. columnWidth : 0.0
  41. },{
  42. xtype: 'hidden',
  43. name: 'pi_vendcode',
  44. fieldLabel: '供应商编号'
  45. }, {
  46. xtype: 'hidden',
  47. name: 'pi_vendname',
  48. fieldLabel: '供应商名称'
  49. },{
  50. xtype : "hidden",
  51. name : "pi_custid",
  52. fieldLabel : "客户ID",
  53. allowBlank : true,
  54. columnWidth : 0.0
  55. },{
  56. xtype: 'hidden',
  57. name: 'pi_custcode',
  58. fieldLabel: '客户编号'
  59. }, {
  60. xtype: 'hidden',
  61. name: 'pi_custname',
  62. fieldLabel: '客户名称'
  63. },{
  64. xtype : "datefield",
  65. name : "pi_date",
  66. fieldLabel : "单据日期",
  67. allowBlank : false,
  68. columnWidth : 0.25,
  69. defaultValue: new Date()
  70. }, {
  71. name : "detailGridField",
  72. xtype : "detailGridField",
  73. storeModel:'saas.model.purchase.ProdIODetail',
  74. deleteDetailUrl:'/api/storage/prodinout/deleteDetail',
  75. detnoColumn: 'pd_pdno',
  76. columns : [
  77. {
  78. text : "id",
  79. dataIndex : "id",
  80. xtype : "numbercolumn",
  81. hidden:true
  82. },{
  83. text : "物料id",
  84. dataIndex : "pd_prodid",
  85. xtype : "numbercolumn",
  86. hidden:true
  87. },
  88. {
  89. text : "物料编号",
  90. width : 150.0,
  91. dataIndex : "pd_prodcode",
  92. xtype : "",
  93. items : null,
  94. allowBlank:false,
  95. editor : {
  96. displayField : "display",
  97. editable : true,
  98. format : "",
  99. hideTrigger : false,
  100. maxLength : 100.0,
  101. minValue : null,
  102. positiveNum : false,
  103. queryMode : "local",
  104. store : null,
  105. valueField : "value",
  106. xtype : "productMultiDbfindTrigger"
  107. }
  108. },{
  109. text: 'model映射需要',
  110. dataIndex: 'productDTO',
  111. hidden: true,
  112. },
  113. {
  114. text : "品牌",
  115. width : 150.0,
  116. dataIndex : "pr_brand",
  117. ignore:true,
  118. renderer: function (v, m, r) {
  119. if(!v){
  120. return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:null;
  121. }
  122. return v;
  123. }
  124. },
  125. {
  126. text : "名称",
  127. width : 200.0,
  128. dataIndex : "pr_detail",
  129. ignore:true,
  130. renderer: function (v, m, r) {
  131. if(!v){
  132. return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:null;
  133. }
  134. return v;
  135. }
  136. },
  137. {
  138. text : "型号",
  139. width : 200.0,
  140. dataIndex : "pr_orispeccode",
  141. ignore:true,
  142. renderer: function (v, m, r) {
  143. if(!v){
  144. return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:null;
  145. }
  146. return v;
  147. }
  148. },{
  149. text : "规格",
  150. width : 150,
  151. dataIndex : "pr_spec",
  152. ignore:true,
  153. renderer: function (v, m, r) {
  154. if(!v){
  155. return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:null;
  156. }
  157. return v;
  158. }
  159. },{
  160. text : "数量",
  161. xtype: 'numbercolumn',
  162. dataIndex : "pd_outqty",
  163. width : 110.0,
  164. allowBlank:false,
  165. editor : {
  166. xtype : "numberfield",
  167. decimalPrecision: 3,
  168. minValue:0
  169. },
  170. renderer : function(v) {
  171. var arr = (v + '.').split('.');
  172. var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
  173. var format = '0.' + xr.join('');
  174. return Ext.util.Format.number(v, format);
  175. },
  176. summaryType: 'sum',
  177. summaryRenderer: function(v) {
  178. var arr = (v + '.').split('.');
  179. var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
  180. var format = '0.' + xr.join('');
  181. return Ext.util.Format.number(v, format);
  182. }
  183. },{
  184. text : "单位",
  185. width : 80.0,
  186. dataIndex : "pr_unit",
  187. ignore:true,
  188. renderer: function (v, m, r) {
  189. if(!v){
  190. return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:null;
  191. }
  192. return v;
  193. }
  194. },{
  195. text : "拨出仓库id",
  196. dataIndex : "pd_whid",
  197. xtype : "numbercolumn",
  198. hidden:true
  199. },
  200. {
  201. text : "拨出仓库编号",
  202. dataIndex : "pd_whcode",
  203. hidden:true
  204. },
  205. {
  206. text : "拨出仓库",
  207. dataIndex : "pd_whname",
  208. width : 150.0,
  209. items : null,
  210. allowBlank:false,
  211. editor : {
  212. displayField : "display",
  213. editable : true,
  214. format : "",
  215. hideTrigger : false,
  216. maxLength : 100.0,
  217. minValue : null,
  218. positiveNum : false,
  219. queryMode : "local",
  220. store : null,
  221. valueField : "value",
  222. xtype : "warehouseDbfindTrigger"
  223. }
  224. },{
  225. text : "拨入仓库id",
  226. dataIndex : "pd_inwhid",
  227. xtype : "numbercolumn",
  228. hidden:true
  229. },
  230. {
  231. text : "拨入仓库编号",
  232. dataIndex : "pd_inwhcode",
  233. hidden:true
  234. },
  235. {
  236. text : "拨入仓库",
  237. dataIndex : "pd_inwhname",
  238. width : 150.0,
  239. allowBlank:false,
  240. items : null,
  241. editor : {
  242. displayField : "display",
  243. editable : true,
  244. format : "",
  245. hideTrigger : false,
  246. maxLength : 100.0,
  247. minValue : null,
  248. positiveNum : false,
  249. queryMode : "local",
  250. store : null,
  251. valueField : "value",
  252. xtype : "warehouseDbfindTrigger"
  253. }
  254. },{
  255. text : "备注",
  256. dataIndex : "pd_remark",
  257. width : 250,
  258. items : null,
  259. editor : {
  260. xtype : "textfield"
  261. },
  262. }
  263. ]
  264. }, {
  265. xtype : "textfield",
  266. name : "pi_remark",
  267. fieldLabel : "备注",
  268. columnWidth : 1
  269. },{
  270. xtype : "hidden",
  271. name : "creatorId",
  272. fieldLabel : "录入人ID",
  273. readOnly:true
  274. },
  275. {
  276. xtype : "textfield",
  277. name : "creatorName",
  278. fieldLabel : "录入人",
  279. readOnly:true
  280. }, {
  281. xtype : "datefield",
  282. name : "createTime",
  283. fieldLabel : "录入日期",
  284. readOnly:true,
  285. defaultValue: new Date()
  286. },{
  287. xtype : "hidden",
  288. name : "updaterId",
  289. fieldLabel : "更新人ID",
  290. readOnly:true,
  291. ignore:true
  292. },{
  293. xtype : "hidden",
  294. name : "updaterName",
  295. fieldLabel : "更新人",
  296. readOnly:true,
  297. ignore:true
  298. }, {
  299. xtype : "hidden",
  300. name : "updateTime",
  301. fieldLabel : "更新日期",
  302. readOnly:true,
  303. defaultValue: new Date(),
  304. ignore:true
  305. }, {
  306. xtype : "textfield",
  307. name : "pi_auditman",
  308. fieldLabel : "审核人",
  309. readOnly:true,
  310. ignore:true
  311. }, {
  312. xtype : "datefield",
  313. name : "pi_auditdate",
  314. fieldLabel : "审核日期",
  315. readOnly:true,
  316. ignore:true
  317. }]
  318. });