FormPanel.js 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285
  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 : "textfield",
  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. dataIndex : "pr_detail",
  116. width : 200.0,
  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. dataIndex : "pr_spec",
  128. width : 150.0,
  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. xtype: 'numbercolumn',
  140. dataIndex : "pd_outqty",
  141. width : 110.0,
  142. allowBlank:false,
  143. editor : {
  144. xtype : "numberfield",
  145. decimalPrecision: 3,
  146. minValue:0
  147. },
  148. renderer : function(v) {
  149. var arr = (v + '.').split('.');
  150. var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
  151. var format = '0.' + xr.join();
  152. return Ext.util.Format.number(v, format);
  153. },
  154. summaryType: 'sum',
  155. summaryRenderer: function(v) {
  156. var arr = (v + '.').split('.');
  157. var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
  158. var format = '0.' + xr.join();
  159. return Ext.util.Format.number(v, format);
  160. }
  161. },{
  162. text : "拨出仓库id",
  163. dataIndex : "pd_whid",
  164. xtype : "numbercolumn",
  165. hidden:true
  166. },
  167. {
  168. text : "拨出仓库编号",
  169. dataIndex : "pd_whcode",
  170. hidden:true
  171. },
  172. {
  173. text : "拨出仓库",
  174. dataIndex : "pd_whname",
  175. width : 150.0,
  176. items : null,
  177. allowBlank:false,
  178. editor : {
  179. displayField : "display",
  180. editable : true,
  181. format : "",
  182. hideTrigger : false,
  183. maxLength : 100.0,
  184. minValue : null,
  185. positiveNum : false,
  186. queryMode : "local",
  187. store : null,
  188. valueField : "value",
  189. xtype : "warehouseDbfindTrigger"
  190. }
  191. },{
  192. text : "拨入仓库id",
  193. dataIndex : "pd_inwhid",
  194. xtype : "numbercolumn",
  195. hidden:true
  196. },
  197. {
  198. text : "拨入仓库编号",
  199. dataIndex : "pd_inwhcode",
  200. hidden:true
  201. },
  202. {
  203. text : "拨入仓库",
  204. dataIndex : "pd_inwhname",
  205. width : 150.0,
  206. allowBlank:false,
  207. items : null,
  208. editor : {
  209. displayField : "display",
  210. editable : true,
  211. format : "",
  212. hideTrigger : false,
  213. maxLength : 100.0,
  214. minValue : null,
  215. positiveNum : false,
  216. queryMode : "local",
  217. store : null,
  218. valueField : "value",
  219. xtype : "warehouseDbfindTrigger"
  220. }
  221. },{
  222. text : "备注",
  223. dataIndex : "pd_remark",
  224. width : 250,
  225. items : null,
  226. editor : {
  227. xtype : "textfield"
  228. },
  229. }
  230. ]
  231. }, {
  232. xtype : "textfield",
  233. name : "pi_remark",
  234. fieldLabel : "备注",
  235. columnWidth : 1
  236. },{
  237. xtype : "hidden",
  238. name : "creatorId",
  239. fieldLabel : "录入人ID",
  240. readOnly:true
  241. },
  242. {
  243. xtype : "textfield",
  244. name : "creatorName",
  245. fieldLabel : "录入人",
  246. readOnly:true
  247. }, {
  248. xtype : "datefield",
  249. name : "createTime",
  250. fieldLabel : "录入日期",
  251. readOnly:true,
  252. defaultValue: new Date()
  253. },{
  254. xtype : "hidden",
  255. name : "updaterId",
  256. fieldLabel : "更新人ID",
  257. readOnly:true
  258. },{
  259. xtype : "hidden",
  260. name : "updaterName",
  261. fieldLabel : "更新人",
  262. readOnly:true
  263. }, {
  264. xtype : "hidden",
  265. name : "updateTime",
  266. fieldLabel : "更新日期",
  267. readOnly:true,
  268. defaultValue: new Date()
  269. }, {
  270. xtype : "textfield",
  271. name : "pi_auditman",
  272. fieldLabel : "审核人",
  273. readOnly:true
  274. }, {
  275. xtype : "datefield",
  276. name : "pi_auditdate",
  277. fieldLabel : "审核日期",
  278. readOnly:true
  279. }]
  280. });