FormPanel.js 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267
  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:basePath+'purchase/purchase/read/',
  16. _saveUrl:basePath+'purchase/purchase/save',
  17. _auditUrl:basePath+'purchase/purchase/audit',
  18. _deleteUrl:basePath+'purchase/purchase/delete/',
  19. _deleteDetailUrl:basePath+'purchase/purchase/deleteItem/',
  20. _turnInUrl:basePath+'purchase/prodinout/turnProdin/',
  21. initId:0,
  22. toolBtns: [],
  23. defaultItems: [{
  24. xtype: 'hidden',
  25. name: 'id',
  26. fieldLabel: 'id',
  27. columnWidth: 0
  28. }, {
  29. xtype : "textfield",
  30. name : "ma_code",
  31. fieldLabel : "制造单号",
  32. columnWidth: 0.2
  33. }, {
  34. xtype : "textfield",
  35. name : "ma_type",
  36. fieldLabel : "类型",
  37. columnWidth: 0.2
  38. },{
  39. xtype: 'hidden',
  40. name: 'ma_prodid',
  41. fieldLabel: '产品id',
  42. columnWidth: 0
  43. },{
  44. xtype : "textfield",
  45. name : "ma_prodcode",
  46. fieldLabel : "产品编号",
  47. columnWidth: 0.2
  48. },{
  49. xtype : "textfield",
  50. name : "ma_proddetail",
  51. fieldLabel : "名称",
  52. columnWidth: 0.2
  53. },{
  54. xtype : "textfield",
  55. name : "ma_prodspec",
  56. fieldLabel : "规格",
  57. columnWidth: 0.2
  58. },{
  59. xtype : "textfield",
  60. name : "ma_version",
  61. fieldLabel : "版本",
  62. columnWidth: 0.2
  63. },{
  64. xtype : "textfield",
  65. name : "ma_produnit",
  66. fieldLabel : "单位",
  67. columnWidth: 0.2
  68. },
  69. {
  70. xtype : "textfield",
  71. name : "ma_qty",
  72. fieldLabel : "数量",
  73. columnWidth: 0.2
  74. },{
  75. xtype : "hidden",
  76. name : "ma_whid",
  77. fieldLabel : "仓库id",
  78. columnWidth: 0.2
  79. },{
  80. xtype : "textfield",
  81. name : "ma_whcode",
  82. fieldLabel : "仓库",
  83. columnWidth: 0.2
  84. },{
  85. name : "detailGridField",
  86. xtype : "detailGridField",
  87. storeModel:'saas.model.document.Product',
  88. detnoColumn: 'pd_detno',
  89. columns : [
  90. {
  91. text : "id",
  92. dataIndex : "id",
  93. xtype : "numbercolumn"
  94. },
  95. {
  96. text : "mm_prodidid",
  97. dataIndex : "mm_prodid",
  98. xtype : "numbercolumn"
  99. },
  100. {
  101. text : "物料编号",
  102. width : 200.0,
  103. dataIndex : "mm_prodcode",
  104. xtype : "",
  105. items : null,
  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 : "dbfindtrigger"
  118. }
  119. },
  120. {
  121. text : "名称",
  122. dataIndex : "pr_detail",
  123. ignore:true,
  124. renderer: function (v, m, r) {
  125. return r.data["product"]?r.data["product"][m.column.dataIndex]:'';
  126. }
  127. },
  128. {
  129. text : "规格",
  130. dataIndex : "pr_spec",
  131. ignore:true,
  132. renderer: function (v, m, r) {
  133. return r.data["product"]?r.data["product"][m.column.dataIndex]:'';
  134. }
  135. },
  136. {
  137. text : "数量",
  138. dataIndex : "pd_qty",
  139. editor : {
  140. xtype : "numberfield"
  141. },
  142. width : 120.0,
  143. xtype : "numbercolumn",
  144. format:'0',
  145. items : null,
  146. summaryType: 'sum'
  147. },
  148. {
  149. text : "已转数",
  150. dataIndex : "pd_yqty",
  151. editor : {
  152. xtype : "numberfield"
  153. },
  154. width : 120.0,
  155. xtype : "numbercolumn",
  156. format:'0',
  157. items : null,
  158. summaryType: 'sum'
  159. },
  160. {
  161. text : "单价",
  162. editor : {
  163. xtype : "numberfield"
  164. },
  165. format:'0,000.00',
  166. dataIndex : "pd_price",
  167. width : 120.0,
  168. xtype : "numbercolumn",
  169. items : null,
  170. summaryType: 'sum'
  171. },
  172. {
  173. text : "税率",
  174. editor : {
  175. xtype : "numberfield"
  176. },
  177. dataIndex : "pd_taxrate",
  178. width : 120.0,
  179. xtype : "numbercolumn",
  180. items : null
  181. },
  182. {
  183. text : "含税金额",
  184. dataIndex : "pd_total",
  185. width : 120.0,
  186. xtype : "numbercolumn"
  187. },
  188. {
  189. text : "未税金额",
  190. dataIndex : "pd_taxtotal",
  191. xtype : "numbercolumn"
  192. },{
  193. text : "需求日期",
  194. dataIndex : "pd_delivery",
  195. flex : 1.0,
  196. xtype:'datecolumn',
  197. format : "Y-m-d H:i:s",
  198. editor : {
  199. xtype : "datefield",
  200. editable : true,
  201. format : "Y-m-d H:i:s",
  202. hideTrigger : false
  203. }
  204. },
  205. {
  206. text : "关联销售单号",
  207. dataIndex : "pd_salecode",
  208. width : 120.0,
  209. flex : 1.0
  210. }
  211. ]
  212. },{
  213. format : "Y-m-d",
  214. xtype : "datefield",
  215. name : "createTime",
  216. bind : "{createTime}",
  217. fieldLabel : "制单日",
  218. allowBlank : true,
  219. columnWidth : 0.25
  220. },{
  221. xtype : "textfield",
  222. name : "ma_recorder",
  223. fieldLabel : "制单人",
  224. columnWidth: 0.2
  225. },{
  226. xtype : "numberfield",
  227. name : "ma_price",
  228. fieldLabel : "单位成本",
  229. columnWidth: 0.2
  230. },{
  231. xtype : "numberfield",
  232. name : "ma_total",
  233. fieldLabel : "总成本",
  234. columnWidth: 0.2
  235. }, {
  236. xtype : "datefield",
  237. name : "updateTime",
  238. bind : "{updateTime}",
  239. fieldLabel : "更新时间",
  240. allowBlank : true,
  241. columnWidth : 0.25
  242. }, {
  243. xtype : "textfield",
  244. readOnly : true,
  245. editable : false,
  246. name : "ma_status",
  247. bind : "{ma_status}",
  248. fieldLabel : "单据状态",
  249. allowBlank : true,
  250. columnWidth : 0.25
  251. }, {
  252. xtype : "hidden",
  253. readOnly : true,
  254. editable : false,
  255. name : "ma_statuscode",
  256. bind : "{ma_statuscode}",
  257. fieldLabel : "单据状态码",
  258. allowBlank : true,
  259. columnWidth : 0.0
  260. }]
  261. });