FormPanel.js 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258
  1. Ext.define('saas.view.stock.make.FormPanel', {
  2. extend: 'saas.view.core.form.FormPanel',
  3. xtype: 'stock-make-formpanel',
  4. controller: 'stock-make-formpanel',
  5. viewModel: 'stock-make-formpanel',
  6. viewName: 'stock-make-formpanel',
  7. caller:'Make',
  8. //字段属性
  9. _title:'制造单',
  10. _idField: 'id',
  11. _codeField: 'ma_code',
  12. _statusField: 'ma_status',
  13. _statusCodeField: 'ma_statuscode',
  14. _relationColumn: 'mm_maid',
  15. _readUrl:'/api/storage/make/read/',
  16. _saveUrl:'/api/storage/make/save',
  17. _auditUrl:'/api/storage/make/audit',
  18. _unAuditUrl: '/api/storage/make/unAudit/',
  19. _deleteUrl:'/api/storage/make/delete/',
  20. initId:0,
  21. toolBtns: [],
  22. defaultItems: [{
  23. xtype: 'hidden',
  24. name: 'id',
  25. fieldLabel: 'id',
  26. columnWidth: 0
  27. }, {
  28. xtype : "textfield",
  29. name : "ma_code",
  30. fieldLabel : "制造单号",
  31. columnWidth: 0.2
  32. }, {
  33. xtype : "textfield",
  34. name : "ma_type",
  35. fieldLabel : "类型",
  36. columnWidth: 0.2
  37. },{
  38. xtype: 'hidden',
  39. name: 'ma_prodid',
  40. fieldLabel: '产品id',
  41. columnWidth: 0
  42. },{
  43. xtype : "textfield",
  44. name : "ma_prodcode",
  45. fieldLabel : "产品编号",
  46. columnWidth: 0.2
  47. },{
  48. xtype : "textfield",
  49. name : "ma_proddetail",
  50. fieldLabel : "名称",
  51. columnWidth: 0.2
  52. },{
  53. xtype : "textfield",
  54. name : "ma_prodspec",
  55. fieldLabel : "规格",
  56. columnWidth: 0.2
  57. },{
  58. xtype : "textfield",
  59. name : "ma_version",
  60. fieldLabel : "版本",
  61. columnWidth: 0.2
  62. },{
  63. xtype : "textfield",
  64. name : "ma_produnit",
  65. fieldLabel : "单位",
  66. columnWidth: 0.2
  67. },
  68. {
  69. xtype : "textfield",
  70. name : "ma_qty",
  71. fieldLabel : "数量",
  72. columnWidth: 0.2
  73. },{
  74. xtype : "hidden",
  75. name : "ma_whid",
  76. fieldLabel : "仓库id",
  77. columnWidth: 0.2
  78. },{
  79. xtype : "hidden",
  80. name : "ma_whcode",
  81. fieldLabel : "仓库编号",
  82. columnWidth: 0.2
  83. },{
  84. xtype : "dbfindtrigger",
  85. name : "ma_whname",
  86. fieldLabel : "仓库名称",
  87. columnWidth: 0.2
  88. },
  89. {
  90. name : "detailGridField",
  91. xtype : "detailGridField",
  92. storeModel:'saas.model.stock.Makematerial',
  93. detnoColumn: 'mm_detno',
  94. deleteDetailUrl:'/api/storage/make/deleteDetail/',
  95. columns : [
  96. {
  97. text : "id",
  98. dataIndex : "id",
  99. xtype : "numbercolumn"
  100. },
  101. {
  102. text : "mm_prodidid",
  103. dataIndex : "mm_prodid",
  104. xtype : "numbercolumn"
  105. },
  106. {
  107. text : "物料编号",
  108. width : 200.0,
  109. dataIndex : "mm_prodcode",
  110. xtype : "",
  111. items : null,
  112. editor : {
  113. displayField : "display",
  114. editable : true,
  115. format : "",
  116. hideTrigger : false,
  117. maxLength : 100.0,
  118. minValue : null,
  119. positiveNum : false,
  120. queryMode : "local",
  121. store : null,
  122. valueField : "value",
  123. xtype : "multidbfindtrigger"
  124. }
  125. },
  126. {
  127. text : "名称",
  128. dataIndex : "pr_detail",
  129. width : 100.0,
  130. ignore:true,
  131. renderer: function (v, m, r) {
  132. return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:v;
  133. }
  134. },
  135. {
  136. text : "规格",
  137. dataIndex : "pr_spec",
  138. width : 100.0,
  139. ignore:true,
  140. renderer: function (v, m, r) {
  141. return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:v;
  142. }
  143. },
  144. {
  145. text : "单位",
  146. dataIndex : "pr_unit",
  147. width : 100.0,
  148. ignore:true,
  149. renderer: function (v, m, r) {
  150. return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:'';
  151. }
  152. },
  153. {
  154. text : "数量",
  155. dataIndex : "pd_qty",
  156. editor : {
  157. xtype : "numberfield"
  158. },
  159. width : 120.0,
  160. xtype : "numbercolumn",
  161. format:'0',
  162. items : null,
  163. summaryType: 'sum'
  164. },{
  165. text : "仓库id",
  166. dataIndex : "mm_whid",
  167. xtype : "numbercolumn",
  168. hidden:true
  169. },
  170. {
  171. text : "仓库编号",
  172. dataIndex : "mm_whcode",
  173. hidden:true
  174. },
  175. {
  176. text : "仓库",
  177. dataIndex : "mm_whname",
  178. width : 120.0,
  179. items : null,
  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 : "dbfindtrigger"
  192. }
  193. },{
  194. text : "替代料",
  195. dataIndex : "mm_repprodcode",
  196. width : 200.0,
  197. hidden:true
  198. }, {
  199. text : "备注",
  200. dataIndex : "mm_remark",
  201. width : 120.0,
  202. hidden:true
  203. }]
  204. },{
  205. xtype : "datefield",
  206. name : "createTime",
  207. bind : "{createTime}",
  208. fieldLabel : "制单日",
  209. allowBlank : true,
  210. columnWidth : 0.25
  211. },{
  212. xtype : "textfield",
  213. name : "ma_recorder",
  214. fieldLabel : "制单人",
  215. columnWidth: 0.2
  216. },{
  217. xtype : "numberfield",
  218. name : "ma_price",
  219. fieldLabel : "单位成本",
  220. columnWidth: 0.2
  221. },{
  222. xtype : "numberfield",
  223. name : "ma_total",
  224. fieldLabel : "总成本",
  225. columnWidth: 0.2
  226. }, {
  227. xtype : "datefield",
  228. name : "updateTime",
  229. bind : "{updateTime}",
  230. fieldLabel : "更新时间",
  231. allowBlank : true,
  232. columnWidth : 0.25
  233. }, {
  234. xtype : "textfield",
  235. readOnly : true,
  236. editable : false,
  237. name : "ma_status",
  238. bind : "{ma_status}",
  239. fieldLabel : "单据状态",
  240. allowBlank : true,
  241. columnWidth : 0.25
  242. }, {
  243. xtype : "hidden",
  244. readOnly : true,
  245. editable : false,
  246. name : "ma_statuscode",
  247. bind : "{ma_statuscode}",
  248. fieldLabel : "单据状态码",
  249. allowBlank : true,
  250. columnWidth : 0.0
  251. }]
  252. });