FormPanel.js 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  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 : false,
  47. columnWidth : 0.25,
  48. format:'Y-m-d'
  49. }, {
  50. xtype : "hidden",
  51. name : "pu_vendid",
  52. bind : "{pu_vendid}",
  53. fieldLabel : "供应商ID",
  54. allowBlank : true,
  55. columnWidth : 0.0
  56. }, {
  57. xtype : "dbfindtrigger",
  58. name : "pu_vendcode",
  59. bind : "{pu_vendcode}",
  60. fieldLabel : "供应商编号",
  61. allowBlank : true,
  62. columnWidth : 0.25,
  63. }, {
  64. xtype : "textfield",
  65. name : "pu_vendname",
  66. bind : "{pu_vendname}",
  67. fieldLabel : "供应商名称",
  68. allowBlank : true,
  69. columnWidth : 0.25
  70. }, {
  71. xtype : "hidden",
  72. name : "pu_buyerid",
  73. bind : "{pu_buyerid}",
  74. fieldLabel : "采购员ID",
  75. allowBlank : true,
  76. columnWidth : 0.0
  77. }, {
  78. xtype : "dbfindtrigger",
  79. name : "pu_buyercode",
  80. bind : "{pu_buyercode}",
  81. fieldLabel : "采购员编号",
  82. allowBlank : true,
  83. columnWidth : 0.25
  84. }, {
  85. xtype : "textfield",
  86. name : "pu_buyername",
  87. bind : "{pu_buyername}",
  88. fieldLabel : "采购员名称",
  89. allowBlank : true,
  90. columnWidth : 0.25
  91. },{
  92. xtype : "combo",
  93. name : "pu_total",
  94. bind : "{pu_total}",
  95. fieldLabel : "下拉框",
  96. allowBlank : true,
  97. queryMode: 'local',
  98. displayField: 'display',
  99. valueField: 'value',
  100. store:{
  101. fields: ['display', 'value'],
  102. data : [
  103. {"display":"1", "value":"1"},
  104. {"display":"2", "value":"2"},
  105. {"display":"3", "value":"3"}
  106. ]
  107. },
  108. columnWidth : 0.25
  109. },{
  110. xtype : "remotecombo",
  111. storeUrl:"http://192.168.253.41:9480/api/document/product/getProdUnit",
  112. name : "pu_text1",
  113. bind : "{pu_text1}",
  114. fieldLabel : "物料下拉框",
  115. allowBlank : true,
  116. queryMode: 'local',
  117. displayField: 'display',
  118. valueField: 'value',
  119. columnWidth : 0.25
  120. }, {
  121. name : "detailGridField",
  122. xtype : "detailGridField",
  123. columns : [
  124. {
  125. text : "序号",
  126. dataIndex : "pd_detno",
  127. width : 80.0,
  128. xtype : "rownumberer"
  129. },
  130. {
  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. text : "物料编号",
  145. width : 200.0,
  146. dataIndex : "pd_prodcode",
  147. xtype : "",
  148. items : null
  149. },
  150. {
  151. text : "单位",
  152. editor : {
  153. xtype : "textfield"
  154. },
  155. dataIndex : "pd_unit",
  156. width : 120.0,
  157. xtype : "",
  158. items : null
  159. },
  160. {
  161. text : "数量",
  162. dataIndex : "pd_yqty",
  163. width : 120.0,
  164. xtype : "",
  165. items : null
  166. },
  167. {
  168. text : "单价",
  169. dataIndex : "pd_price",
  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. flex : 1.0,
  184. xtype : "numbercolumn"
  185. }
  186. ]
  187. }, {
  188. format : "Y-m-d",
  189. xtype : "datefield",
  190. name : "createTime",
  191. bind : "{createTime}",
  192. fieldLabel : "创建时间",
  193. allowBlank : true,
  194. columnWidth : 0.25
  195. }, {
  196. format : "Y-m-d",
  197. xtype : "datefield",
  198. name : "updateTime",
  199. bind : "{updateTime}",
  200. fieldLabel : "更新时间",
  201. allowBlank : true,
  202. columnWidth : 0.25
  203. }, {
  204. xtype : "textfield",
  205. readOnly : true,
  206. editable : false,
  207. name : "pu_status",
  208. bind : "{pu_status}",
  209. fieldLabel : "单据状态",
  210. allowBlank : true,
  211. columnWidth : 0.25
  212. },
  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. {
  224. xtype : "textfield",
  225. name : "pu_statuscode",
  226. bind : "{pu_statuscode}",
  227. fieldLabel : "忽略字段",
  228. ignore:true,
  229. allowBlank : true,
  230. columnWidth : 0.25
  231. }]
  232. });