FormPanel.js 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  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: 'puCode',
  8. _statusField: 'puStatuscode',
  9. _idField: 'id',
  10. _detnoColumn: 'pdDetno',
  11. _dataModelUrl:'http://192.168.253.58:8800/purchase/form?id={id}',
  12. _saveUrl:'http://192.168.253.58:8800/purchase/form',
  13. _auditUrl:'http://192.168.253.58:8800/purchase/audit',
  14. _deleteUrl:'http://192.168.253.58:8800/purchase/detele',
  15. initId:0,
  16. _baseItems:[{
  17. "xtype": "hidden",
  18. "name": "id",
  19. "bind": "{id}",
  20. "fieldLabel": "ID",
  21. "allowBlank": true,
  22. "columnWidth": 0.0
  23. },
  24. {
  25. "xtype": "textfield",
  26. "name": "puCode",
  27. "bind": "{puCode}",
  28. "fieldLabel": "采购单号",
  29. "allowBlank": true,
  30. "columnWidth": 0.25
  31. },
  32. {
  33. "xtype": "datefield",
  34. "name": "puDate",
  35. "bind": "{puDate}",
  36. "fieldLabel": "采购日期",
  37. "allowBlank": true,
  38. "columnWidth": 0.25
  39. },
  40. {
  41. "xtype": "hidden",
  42. "name": "puVendid",
  43. "bind": "{puVendid}",
  44. "fieldLabel": "供应商ID",
  45. "allowBlank": true,
  46. "columnWidth": 0.0
  47. },
  48. {
  49. "xtype": "dbfindtrigger",
  50. "name": "puVendcode",
  51. "bind": "{puVendcode}",
  52. "fieldLabel": "供应商编号",
  53. "allowBlank": true,
  54. "columnWidth": 0.25,
  55. "configUrl": "resources/json/purchase/vendorColumnsDbfind.json",
  56. "dataUrl": "resources/json/purchase/vendorDataDbfind.json"
  57. },
  58. {
  59. "xtype": "textfield",
  60. "name": "puVendname",
  61. "bind": "{puVendname}",
  62. "fieldLabel": "供应商名称",
  63. "allowBlank": true,
  64. "columnWidth": 0.25
  65. },
  66. {
  67. "xtype": "hidden",
  68. "name": "puBuyerid",
  69. "bind": "{puBuyerid}",
  70. "fieldLabel": "采购员ID",
  71. "allowBlank": true,
  72. "columnWidth": 0.0
  73. },
  74. {
  75. "xtype": "dbfindtrigger",
  76. "name": "puBuyercode",
  77. "bind": "{puBuyercode}",
  78. "fieldLabel": "采购员编号",
  79. "allowBlank": true,
  80. "columnWidth": 0.25
  81. },
  82. {
  83. "xtype": "textfield",
  84. "name": "puBuyername",
  85. "bind": "{puBuyername}",
  86. "fieldLabel": "采购员名称",
  87. "allowBlank": true,
  88. "columnWidth": 0.25
  89. },
  90. {
  91. "name": "detailGridField",
  92. "xtype": "detailGridField",
  93. "columnWidth": 1.0,
  94. "frame": true,
  95. "bind": {
  96. "store": "{detailGridStore}"
  97. },
  98. "margin": 3.0,
  99. "columns": [
  100. {
  101. "text": "序号",
  102. "dataIndex": "pdDetno",
  103. "width": 80.0,
  104. "xtype": "rownumberer"
  105. },
  106. {
  107. "editor": {
  108. "displayField": "display",
  109. "editable": true,
  110. "format": "",
  111. "hideTrigger": false,
  112. "maxLength": 100.0,
  113. "minValue": null,
  114. "positiveNum": false,
  115. "queryMode": "local",
  116. "store": null,
  117. "valueField": "value",
  118. "xtype": "dbfindtrigger"
  119. },
  120. "text": "物料编号",
  121. "width": 200.0,
  122. "dataIndex": "pdProdcode",
  123. "xtype": "",
  124. "items": null
  125. },
  126. {
  127. "text": "单位",
  128. "editor": {
  129. "xtype": "textfield"
  130. },
  131. "dataIndex": "pdUnit",
  132. "width": 120.0,
  133. "xtype": "",
  134. "items": null
  135. },
  136. {
  137. "text": "数量",
  138. "dataIndex": "pdQty",
  139. "width": 120.0,
  140. "format":'0',
  141. "xtype": "numbercolumn",
  142. "items": null
  143. },
  144. {
  145. "text": "单价",
  146. "dataIndex": "pdPrice",
  147. "width": 120.0,
  148. "xtype": "numbercolumn",
  149. "items": null
  150. },
  151. {
  152. "text": "总额",
  153. "dataIndex": "pdTotal",
  154. "width": 120.0,
  155. "xtype": "numbercolumn"
  156. },
  157. {
  158. "text": "税额",
  159. "dataIndex": "pdTaxtotal",
  160. "flex": 1.0,
  161. "xtype": "numbercolumn"
  162. },
  163. {
  164. "text": "id",
  165. "dataIndex": "id",
  166. "flex": 1.0,
  167. "xtype": "numbercolumn"
  168. }
  169. ]
  170. },
  171. {
  172. "format": "Y-m-d",
  173. "xtype": "datetimefield",
  174. "name": "createTime",
  175. "bind": "{createTime}",
  176. "fieldLabel": "创建时间",
  177. "allowBlank": true,
  178. "columnWidth": 0.25
  179. },
  180. {
  181. "xtype": "datefield",
  182. "name": "updateTime",
  183. "bind": "{updateTime}",
  184. "fieldLabel": "更新时间",
  185. "allowBlank": true,
  186. "columnWidth": 0.25
  187. },
  188. {
  189. "xtype": "textfield",
  190. "readOnly": true,
  191. "editable": false,
  192. "name": "puStatus",
  193. "bind": "{puStatus}",
  194. "fieldLabel": "单据状态",
  195. "allowBlank": true,
  196. "columnWidth": 0.25
  197. },
  198. {
  199. "xtype": "hidden",
  200. "readOnly": true,
  201. "editable": false,
  202. "name": "puStatuscode",
  203. "bind": "{puStatuscode}",
  204. "fieldLabel": "单据状态码",
  205. "allowBlank": true,
  206. "columnWidth": 0.0
  207. }],
  208. toolBtns: [{
  209. xtype: 'button',
  210. text: '转单按钮',
  211. handler: function() {
  212. console.log('11');
  213. }
  214. }]
  215. });