FormPanel.js 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  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/deletdetail',
  16. initId:37,
  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. bind: {
  120. store:{
  121. data:'{detailGridField}'
  122. }
  123. },
  124. columns : [
  125. {
  126. text : "序号",
  127. dataIndex : "pdDetno",
  128. width : 80.0,
  129. xtype : "rownumberer"
  130. },
  131. {
  132. editor : {
  133. displayField : "display",
  134. editable : true,
  135. format : "",
  136. hideTrigger : false,
  137. maxLength : 100.0,
  138. minValue : null,
  139. positiveNum : false,
  140. queryMode : "local",
  141. store : null,
  142. valueField : "value",
  143. xtype : "dbfindtrigger"
  144. },
  145. text : "物料编号",
  146. width : 200.0,
  147. dataIndex : "pd_prodcode",
  148. xtype : "",
  149. items : null
  150. },
  151. {
  152. text : "单位",
  153. editor : {
  154. xtype : "textfield"
  155. },
  156. dataIndex : "pd_unit",
  157. width : 120.0,
  158. xtype : "",
  159. items : null
  160. },
  161. {
  162. text : "数量",
  163. dataIndex : "pd_yqty",
  164. width : 120.0,
  165. xtype : "",
  166. items : null
  167. },
  168. {
  169. text : "单价",
  170. dataIndex : "pd_price",
  171. width : 120.0,
  172. xtype : "numbercolumn",
  173. items : null
  174. },
  175. {
  176. text : "总额",
  177. dataIndex : "pd_total",
  178. width : 120.0,
  179. xtype : "numbercolumn"
  180. },
  181. {
  182. text : "税额",
  183. dataIndex : "pd_taxtotal",
  184. flex : 1.0,
  185. xtype : "numbercolumn"
  186. },
  187. {
  188. text : "id",
  189. dataIndex : "id",
  190. flex : 1.0,
  191. xtype : "numbercolumn"
  192. }
  193. ]
  194. }, {
  195. format : "Y-m-d",
  196. xtype : "datetimefield",
  197. name : "createTime",
  198. bind : "{createTime}",
  199. fieldLabel : "创建时间",
  200. allowBlank : true,
  201. columnWidth : 0.25
  202. }, {
  203. xtype : "datefield",
  204. name : "updateTime",
  205. bind : "{updateTime}",
  206. fieldLabel : "更新时间",
  207. allowBlank : true,
  208. columnWidth : 0.25
  209. }, {
  210. xtype : "textfield",
  211. readOnly : true,
  212. editable : false,
  213. name : "puStatus",
  214. bind : "{puStatus}",
  215. fieldLabel : "单据状态",
  216. allowBlank : true,
  217. columnWidth : 0.25
  218. }, {
  219. xtype : "hidden",
  220. readOnly : true,
  221. editable : false,
  222. name : "pu_statuscode",
  223. bind : "{pu_statuscode}",
  224. fieldLabel : "单据状态码",
  225. allowBlank : true,
  226. columnWidth : 0.0
  227. }]
  228. });