FormPanel.js 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313
  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: "numberfield",
  75. name: "pi_costtotal",
  76. fieldLabel: "金额(元)",
  77. allowBlank: true,
  78. readOnly: true,
  79. columnWidth: 0.25,
  80. thousandSeparator: ','
  81. }, {
  82. name : "detailGridField",
  83. xtype : "detailGridField",
  84. storeModel:'saas.model.stock.OtherIn',
  85. deleteDetailUrl:'/api/storage/prodinout/deleteDetail',
  86. detnoColumn: 'pd_pdno',
  87. columns : [
  88. {
  89. text : "id",
  90. dataIndex : "id",
  91. xtype : "numbercolumn",
  92. hidden:true
  93. },{
  94. text : "物料id",
  95. dataIndex : "pd_prodid",
  96. xtype : "numbercolumn",
  97. hidden:true
  98. },
  99. {
  100. text : "物料编号",
  101. width : 150.0,
  102. dataIndex : "pd_prodcode",
  103. xtype : "",
  104. items : null,
  105. allowBlank : false,
  106. editor : {
  107. displayField : "display",
  108. editable : true,
  109. format : "",
  110. hideTrigger : false,
  111. maxLength : 100.0,
  112. minValue : null,
  113. positiveNum : false,
  114. queryMode : "local",
  115. store : null,
  116. valueField : "value",
  117. xtype : "productMultiDbfindTrigger"
  118. }
  119. }, {
  120. text: 'model映射需要',
  121. dataIndex: 'productDTO',
  122. hidden: true,
  123. }, {
  124. text : "品牌",
  125. width : 100.0,
  126. dataIndex : "pr_brand",
  127. ignore:true,
  128. renderer: function (v, m, r) {
  129. if(!v){
  130. return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:null;
  131. }
  132. return v;
  133. }
  134. }, {
  135. text : "物料名称",
  136. width : 150.0,
  137. dataIndex : "pr_detail",
  138. ignore:true,
  139. renderer: function (v, m, r) {
  140. if(!v){
  141. return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:null;
  142. }
  143. return v;
  144. }
  145. }, {
  146. text : "型号",
  147. width : 200.0,
  148. dataIndex : "pr_orispeccode",
  149. ignore:true,
  150. renderer: function (v, m, r) {
  151. if(!v){
  152. return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:null;
  153. }
  154. return v;
  155. }
  156. }, {
  157. text : "规格",
  158. width : 200,
  159. dataIndex : "pr_spec",
  160. ignore:true,
  161. renderer: function (v, m, r) {
  162. if(!v){
  163. return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:null;
  164. }
  165. return v;
  166. }
  167. }, {
  168. text : "仓库id",
  169. dataIndex : "pd_whid",
  170. xtype : "numbercolumn",
  171. hidden:true
  172. }, {
  173. text : "仓库编号",
  174. dataIndex : "pd_whcode",
  175. hidden:true
  176. }, {
  177. text : "仓库",
  178. dataIndex : "pd_whname",
  179. width : 80.0,
  180. allowBlank : false,
  181. editor : {
  182. displayField : "display",
  183. editable : true,
  184. format : "",
  185. hideTrigger : false,
  186. maxLength : 100.0,
  187. minValue : null,
  188. positiveNum : false,
  189. queryMode : "local",
  190. store : null,
  191. valueField : "value",
  192. xtype : "warehouseDbfindTrigger"
  193. }
  194. }, {
  195. text : "数量",
  196. xtype: 'numbercolumn',
  197. dataIndex : "pd_inqty",
  198. width : 110.0,
  199. allowBlank : false,
  200. editor : {
  201. xtype : "numberfield",
  202. decimalPrecision: 3,
  203. minValue:0
  204. },
  205. renderer : function(v) {
  206. return saas.util.BaseUtil.numberFormat(v, 3, false);
  207. },
  208. summaryType: 'sum',
  209. summaryRenderer: function(v) {
  210. return saas.util.BaseUtil.numberFormat(v, 3, false);
  211. }
  212. },{
  213. text : "单位",
  214. width : 80.0,
  215. dataIndex : "pr_unit",
  216. ignore:true,
  217. renderer: function (v, m, r) {
  218. if(!v){
  219. return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:null;
  220. }
  221. return v;
  222. }
  223. },{
  224. text : "单价(元)",
  225. xtype: 'numbercolumn',
  226. dataIndex : "pd_price",
  227. width : 120.0,
  228. editor : {
  229. xtype : "numberfield",
  230. decimalPrecision: 4,
  231. minValue:0
  232. },
  233. renderer : function(v) {
  234. return saas.util.BaseUtil.numberFormat(v, 4, true);
  235. }
  236. }, {
  237. text : "金额(元)",
  238. xtype: 'numbercolumn',
  239. dataIndex : "pd_total",
  240. width : 120.0,
  241. renderer : function(v) {
  242. return saas.util.BaseUtil.numberFormat(v, 2, true);
  243. },
  244. summaryType: 'sum',
  245. summaryRenderer: function(v) {
  246. return saas.util.BaseUtil.numberFormat(v, 2, true);
  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. },{
  286. xtype : "hidden",
  287. name : "updaterName",
  288. fieldLabel : "更新人",
  289. readOnly:true
  290. }, {
  291. xtype : "hidden",
  292. name : "updateTime",
  293. fieldLabel : "更新日期",
  294. readOnly:true,
  295. defaultValue: new Date()
  296. }, {
  297. xtype : "textfield",
  298. name : "pi_auditman",
  299. fieldLabel : "审核人",
  300. readOnly:true
  301. }, {
  302. xtype : "datefield",
  303. name : "pi_auditdate",
  304. fieldLabel : "审核日期",
  305. readOnly:true
  306. }]
  307. });