FormPanel.js 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269
  1. Ext.define('saas.view.storage.prodInOutOtherIn.FormPanel', {
  2. extend: 'saas.view.core.form.FormPanel',
  3. xtype: 'storage-prodinoutotherin-formpanel',
  4. controller: 'storage-prodinoutotherin-formcontroller',
  5. viewModel: 'storage-prodinoutotherin-formmodel',
  6. //字段属性
  7. _title:'采购单',
  8. _idField: 'id',
  9. _codeField: 'pu_code',
  10. _statusField: 'pu_status',
  11. _statusCodeField: 'pu_statuscode',
  12. _detnoColumn: 'pd_detno',
  13. _relationColumn: 'pd_puid',
  14. _readUrl:'http://localhost:8800/purchase/read/',
  15. _saveUrl:'http://localhost:8800/purchase/save',
  16. _auditUrl:'http://localhost:8800/purchase/audit',
  17. _deleteUrl:'http://localhost:8800/purchase/delete/',
  18. _deleteDetailUrl:'http://localhost:8800/purchase/deleteItem/',
  19. _turnInUrl:'http://localhost:8800/purchase/turnProdin/',
  20. initId:0,
  21. toolBtns: [{
  22. xtype: 'button',
  23. text: '转验收单按钮',
  24. handler: 'turnIn'
  25. }],
  26. defaultItems: [{
  27. xtype: 'hidden',
  28. name: 'id',
  29. bind: '{id}',
  30. fieldLabel: 'id',
  31. allowBlank: true,
  32. columnWidth: 0
  33. }, {
  34. xtype : "textfield",
  35. name : "pu_code",
  36. bind : "{pu_code}",
  37. fieldLabel : "采购单号",
  38. allowBlank : true,
  39. columnWidth : 0.25
  40. }, {
  41. xtype : "hidden",
  42. name : "pu_vendid",
  43. bind : "{pu_vendid}",
  44. fieldLabel : "供应商ID",
  45. allowBlank : true,
  46. columnWidth : 0.0
  47. }, {
  48. xtype : "textfield",
  49. name : "pu_vendcode",
  50. bind : "{pu_vendcode}",
  51. fieldLabel : "供应商编号",
  52. hidden:true,
  53. allowBlank : true,
  54. columnWidth : 0,
  55. }, {
  56. xtype : "dbfindtrigger",
  57. name : "pu_vendname",
  58. bind : "{pu_vendname}",
  59. fieldLabel : "供应商名称",
  60. allowBlank : true,
  61. columnWidth : 0.25
  62. },{
  63. xtype : "datefield",
  64. name : "pu_date",
  65. bind : "{pu_date}",
  66. fieldLabel : "采购日期",
  67. allowBlank : false,
  68. columnWidth : 0.25
  69. }, {
  70. xtype : "hidden",
  71. name : "pu_buyerid",
  72. bind : "{pu_buyerid}",
  73. fieldLabel : "采购员ID",
  74. allowBlank : true,
  75. columnWidth : 0.0
  76. }, {
  77. xtype : "textfield",
  78. name : "pu_buyercode",
  79. bind : "{pu_buyercode}",
  80. fieldLabel : "采购员编号",
  81. allowBlank : true,
  82. hidden:true,
  83. columnWidth : 0
  84. }, {
  85. xtype : "dbfindtrigger",
  86. name : "pu_buyername",
  87. bind : "{pu_buyername}",
  88. fieldLabel : "采购员名称",
  89. allowBlank : true,
  90. columnWidth : 0.25
  91. }, {
  92. xtype : "textfield",
  93. name : "pu_shipaddresscode",
  94. bind : "{pu_shipaddresscode}",
  95. fieldLabel : "交货地址",
  96. allowBlank : true,
  97. columnWidth : 0.25
  98. }, {
  99. xtype : "textfield",
  100. name : "pu_total",
  101. bind : "{pu_total}",
  102. fieldLabel : "单据金额",
  103. allowBlank : true,
  104. columnWidth : 0.25
  105. }, {
  106. name : "detailGridField",
  107. xtype : "detailGridField",
  108. columns : [
  109. {
  110. text : "序号",
  111. dataIndex : "pd_detno",
  112. width : 100,
  113. xtype : "numbercolumn",
  114. align : 'center',
  115. format:'0',
  116. summaryType: 'count',
  117. summaryRenderer: function(value, summaryData, dataIndex) {
  118. return Ext.String.format('合计: {0}条', value);
  119. },
  120. }, {
  121. text : "id",
  122. dataIndex : "id",
  123. xtype : "numbercolumn"
  124. },
  125. {
  126. text : "物料编号",
  127. width : 200.0,
  128. dataIndex : "pd_prodcode",
  129. xtype : "",
  130. items : null,
  131. editor : {
  132. displayField : "display",
  133. editable : true,
  134. format : "",
  135. hideTrigger : false,
  136. maxLength : 100.0,
  137. minValue : null,
  138. positiveNum : false,
  139. queryMode : "local",
  140. store : null,
  141. valueField : "value",
  142. xtype : "dbfindtrigger"
  143. }
  144. },
  145. {
  146. text : "名称",
  147. dataIndex : "pr_detail",
  148. ignore:true
  149. },
  150. {
  151. text : "规格",
  152. dataIndex : "pr_spec",
  153. ignore:true
  154. },
  155. {
  156. text : "数量",
  157. dataIndex : "pd_qty",
  158. editor : {
  159. xtype : "numberfield"
  160. },
  161. width : 120.0,
  162. xtype : "numbercolumn",
  163. format:'0',
  164. items : null,
  165. summaryType: 'sum'
  166. },
  167. {
  168. text : "已转数",
  169. dataIndex : "pd_yqty",
  170. editor : {
  171. xtype : "numberfield"
  172. },
  173. width : 120.0,
  174. xtype : "numbercolumn",
  175. format:'0',
  176. items : null,
  177. summaryType: 'sum'
  178. },
  179. {
  180. text : "单价",
  181. editor : {
  182. xtype : "numberfield"
  183. },
  184. format:'0,000.00',
  185. dataIndex : "pd_price",
  186. width : 120.0,
  187. xtype : "numbercolumn",
  188. items : null,
  189. summaryType: 'sum'
  190. },
  191. {
  192. text : "税率",
  193. editor : {
  194. xtype : "numberfield"
  195. },
  196. dataIndex : "pd_taxrate",
  197. width : 120.0,
  198. xtype : "numbercolumn",
  199. items : null
  200. },
  201. {
  202. text : "含税金额",
  203. dataIndex : "pd_total",
  204. width : 120.0,
  205. xtype : "numbercolumn"
  206. },
  207. {
  208. text : "未税金额",
  209. dataIndex : "pd_taxtotal",
  210. xtype : "numbercolumn"
  211. },{
  212. text : "需求日期",
  213. dataIndex : "pd_delivery",
  214. flex : 1.0,
  215. xtype:'datecolumn',
  216. format : "Y-m-d H:i:s",
  217. editor : {
  218. xtype : "datefield",
  219. editable : true,
  220. format : "Y-m-d H:i:s",
  221. hideTrigger : false
  222. }
  223. },
  224. {
  225. text : "关联销售单号",
  226. dataIndex : "pd_salecode",
  227. width : 120.0,
  228. flex : 1.0
  229. }
  230. ]
  231. }, {
  232. format : "Y-m-d",
  233. xtype : "datefield",
  234. name : "createTime",
  235. bind : "{createTime}",
  236. fieldLabel : "创建时间",
  237. allowBlank : true,
  238. columnWidth : 0.25
  239. }, {
  240. xtype : "datefield",
  241. name : "updateTime",
  242. bind : "{updateTime}",
  243. fieldLabel : "更新时间",
  244. allowBlank : true,
  245. columnWidth : 0.25
  246. }, {
  247. xtype : "textfield",
  248. readOnly : true,
  249. editable : false,
  250. name : "pu_status",
  251. bind : "{pu_status}",
  252. fieldLabel : "单据状态",
  253. allowBlank : true,
  254. columnWidth : 0.25
  255. }, {
  256. xtype : "hidden",
  257. readOnly : true,
  258. editable : false,
  259. name : "pu_statuscode",
  260. bind : "{pu_statuscode}",
  261. fieldLabel : "单据状态码",
  262. allowBlank : true,
  263. columnWidth : 0.0
  264. }]
  265. });