FormPanel.js 9.6 KB

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