FormPanel.js 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317
  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.stock.AppropriationInOut',
  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. return saas.util.BaseUtil.numberFormat(v, 3, false);
  172. },
  173. summaryType: 'sum',
  174. summaryRenderer: function(v) {
  175. return saas.util.BaseUtil.numberFormat(v, 3, false);
  176. }
  177. },{
  178. text : "单位",
  179. width : 80.0,
  180. dataIndex : "pr_unit",
  181. ignore:true,
  182. renderer: function (v, m, r) {
  183. if(!v){
  184. return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:null;
  185. }
  186. return v;
  187. }
  188. },{
  189. text : "拨出仓库id",
  190. dataIndex : "pd_whid",
  191. xtype : "numbercolumn",
  192. hidden:true
  193. },
  194. {
  195. text : "拨出仓库编号",
  196. dataIndex : "pd_whcode",
  197. hidden:true
  198. },
  199. {
  200. text : "拨出仓库",
  201. dataIndex : "pd_whname",
  202. width : 150.0,
  203. items : null,
  204. allowBlank:false,
  205. editor : {
  206. displayField : "display",
  207. editable : true,
  208. format : "",
  209. hideTrigger : false,
  210. maxLength : 100.0,
  211. minValue : null,
  212. positiveNum : false,
  213. queryMode : "local",
  214. store : null,
  215. valueField : "value",
  216. xtype : "warehouseDbfindTrigger"
  217. }
  218. },{
  219. text : "拨入仓库id",
  220. dataIndex : "pd_inwhid",
  221. xtype : "numbercolumn",
  222. hidden:true
  223. },
  224. {
  225. text : "拨入仓库编号",
  226. dataIndex : "pd_inwhcode",
  227. hidden:true
  228. },
  229. {
  230. text : "拨入仓库",
  231. dataIndex : "pd_inwhname",
  232. width : 150.0,
  233. allowBlank:false,
  234. items : null,
  235. editor : {
  236. displayField : "display",
  237. editable : true,
  238. format : "",
  239. hideTrigger : false,
  240. maxLength : 100.0,
  241. minValue : null,
  242. positiveNum : false,
  243. queryMode : "local",
  244. store : null,
  245. valueField : "value",
  246. xtype : "warehouseDbfindTrigger"
  247. }
  248. },{
  249. text : "备注",
  250. dataIndex : "pd_remark",
  251. width : 250,
  252. items : null,
  253. editor : {
  254. xtype : "textfield"
  255. },
  256. }
  257. ]
  258. }, {
  259. xtype : "textfield",
  260. name : "pi_remark",
  261. fieldLabel : "备注",
  262. columnWidth : 1
  263. },{
  264. xtype : "hidden",
  265. name : "creatorId",
  266. fieldLabel : "录入人ID",
  267. readOnly:true
  268. },
  269. {
  270. xtype : "textfield",
  271. name : "creatorName",
  272. fieldLabel : "录入人",
  273. readOnly:true
  274. }, {
  275. xtype : "datefield",
  276. name : "createTime",
  277. fieldLabel : "录入日期",
  278. readOnly:true,
  279. defaultValue: new Date()
  280. },{
  281. xtype : "hidden",
  282. name : "updaterId",
  283. fieldLabel : "更新人ID",
  284. readOnly:true,
  285. ignore:true
  286. },{
  287. xtype : "hidden",
  288. name : "updaterName",
  289. fieldLabel : "更新人",
  290. readOnly:true,
  291. ignore:true
  292. }, {
  293. xtype : "hidden",
  294. name : "updateTime",
  295. fieldLabel : "更新日期",
  296. readOnly:true,
  297. defaultValue: new Date(),
  298. ignore:true
  299. }, {
  300. xtype : "textfield",
  301. name : "pi_auditman",
  302. fieldLabel : "审核人",
  303. readOnly:true,
  304. ignore:true
  305. }, {
  306. xtype : "datefield",
  307. name : "pi_auditdate",
  308. fieldLabel : "审核日期",
  309. readOnly:true,
  310. ignore:true
  311. }]
  312. });