FormPanel.js 6.8 KB

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