FormPanel.js 6.4 KB

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