FormPanel.js 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  1. Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
  2. extend: 'saas.view.core.form.FormPanel',
  3. xtype: 'purchase-purchaseIn-formpanel',
  4. controller: 'purchase-purchaseIn-formcontroller',
  5. viewModel: 'purchase-purchaseIn-formmodel',
  6. _title:'采购验收单',
  7. _codeField: 'pi_inoutno',
  8. _statusField: 'pi_statuscode',
  9. _idField: 'id',
  10. _detnoColumn: 'pd_pdno',
  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 : "pi_inoutno",
  34. bind : "{pi_inoutno}",
  35. fieldLabel : "验收单号",
  36. allowBlank : true,
  37. columnWidth : 0.25
  38. },{
  39. xtype : "textfield",
  40. name : "pi_class",
  41. bind : "{pi_class}",
  42. fieldLabel : "类型",
  43. readOnly:true,
  44. allowBlank : true,
  45. columnWidth : 0.25
  46. }, {
  47. xtype : "hidden",
  48. name : "pu_vendid",
  49. bind : "{pu_vendid}",
  50. fieldLabel : "供应商ID",
  51. allowBlank : true,
  52. columnWidth : 0.0
  53. }, {
  54. xtype : "textfield",
  55. name : "pu_vendcode",
  56. bind : "{pu_vendcode}",
  57. fieldLabel : "供应商编号",
  58. hidden:true,
  59. allowBlank : true,
  60. columnWidth : 0,
  61. }, {
  62. xtype : "dbfindtrigger",
  63. name : "pu_vendname",
  64. bind : "{pu_vendname}",
  65. fieldLabel : "供应商名称",
  66. allowBlank : true,
  67. columnWidth : 0.25
  68. },{
  69. xtype : "datefield",
  70. name : "pu_date",
  71. bind : "{pu_date}",
  72. fieldLabel : "采购日期",
  73. allowBlank : false,
  74. columnWidth : 0.25
  75. }, {
  76. xtype : "hidden",
  77. name : "pu_buyerid",
  78. bind : "{pu_buyerid}",
  79. fieldLabel : "采购员ID",
  80. allowBlank : true,
  81. columnWidth : 0.0
  82. }, {
  83. xtype : "textfield",
  84. name : "pu_buyercode",
  85. bind : "{pu_buyercode}",
  86. fieldLabel : "采购员编号",
  87. allowBlank : true,
  88. hidden:true,
  89. columnWidth : 0
  90. }, {
  91. xtype : "dbfindtrigger",
  92. name : "pu_buyername",
  93. bind : "{pu_buyername}",
  94. fieldLabel : "采购员名称",
  95. allowBlank : true,
  96. columnWidth : 0.25
  97. }, {
  98. xtype : "textfield",
  99. name : "pu_shipaddresscode",
  100. bind : "{pu_shipaddresscode}",
  101. fieldLabel : "交货地址",
  102. allowBlank : true,
  103. columnWidth : 0.25
  104. }, {
  105. xtype : "textfield",
  106. name : "pu_total",
  107. bind : "{pu_total}",
  108. fieldLabel : "单据金额",
  109. allowBlank : true,
  110. columnWidth : 0.25
  111. }, {
  112. name : "detailGridField",
  113. xtype : "detailGridField",
  114. bind: {
  115. store:{
  116. data:'{detailGridField}'
  117. }
  118. },
  119. columns : [
  120. {
  121. text : "序号",
  122. dataIndex : "pdDetno",
  123. width : 80.0,
  124. xtype : "rownumberer"
  125. }, {
  126. text : "id",
  127. dataIndex : "id",
  128. xtype : "numbercolumn"
  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 : "numbercolumn",
  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_taxrate",
  177. width : 120.0,
  178. xtype : "numbercolumn",
  179. items : null
  180. },
  181. {
  182. text : "含税金额",
  183. dataIndex : "pd_total",
  184. width : 120.0,
  185. xtype : "numbercolumn"
  186. },
  187. {
  188. text : "未税金额",
  189. dataIndex : "pd_taxtotal",
  190. xtype : "numbercolumn"
  191. },{
  192. text : "需求日期",
  193. dataIndex : "pd_delivery",
  194. flex : 1.0,
  195. xtype:'datecolumn',
  196. format : "Y-m-d H:i:s",
  197. editor : {
  198. xtype : "datetimefield",
  199. editable : true,
  200. format : "Y-m-d H:i:s",
  201. hideTrigger : false
  202. }
  203. },
  204. {
  205. text : "关联销售单号",
  206. dataIndex : "pd_salecode",
  207. width : 120.0,
  208. flex : 1.0
  209. }
  210. ]
  211. }, {
  212. format : "Y-m-d",
  213. xtype : "datetimefield",
  214. name : "createTime",
  215. bind : "{createTime}",
  216. fieldLabel : "创建时间",
  217. allowBlank : true,
  218. columnWidth : 0.25
  219. }, {
  220. xtype : "datefield",
  221. name : "updateTime",
  222. bind : "{updateTime}",
  223. fieldLabel : "更新时间",
  224. allowBlank : true,
  225. columnWidth : 0.25
  226. }, {
  227. xtype : "textfield",
  228. readOnly : true,
  229. editable : false,
  230. name : "puStatus",
  231. bind : "{puStatus}",
  232. fieldLabel : "单据状态",
  233. allowBlank : true,
  234. columnWidth : 0.25
  235. }, {
  236. xtype : "hidden",
  237. readOnly : true,
  238. editable : false,
  239. name : "pu_statuscode",
  240. bind : "{pu_statuscode}",
  241. fieldLabel : "单据状态码",
  242. allowBlank : true,
  243. columnWidth : 0.0
  244. }]
  245. });