FormPanel.js 6.5 KB

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