FormPanel.js 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275
  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: 'pu_status',
  9. _statusCodeField: 'pu_statuscode',
  10. _idField: 'id',
  11. _detnoColumn: 'pd_pdno',
  12. _dataModelUrl:'http://192.168.253.58:8800/purchase/read/',
  13. _saveUrl:'http://192.168.253.58:8800/purchase/save',
  14. // _auditUrl:'http://192.168.253.58:8800/purchase/audit',
  15. _deleteUrl:'http://192.168.253.58:8800/purchase/delete/',
  16. _deleteDetailUrl:'http://192.168.253.58:8800/purchase/deleteItem/',
  17. initId:0,
  18. toolBtns: [{
  19. xtype: 'button',
  20. text: '转单按钮',
  21. handler: function() {
  22. console.log('11');
  23. }
  24. }],
  25. defaultItems: [{
  26. xtype: 'hidden',
  27. name: 'id',
  28. bind: '{id}',
  29. fieldLabel: 'id',
  30. allowBlank: true,
  31. columnWidth: 0
  32. }, {
  33. xtype : "textfield",
  34. name : "pi_inoutno",
  35. bind : "{pi_inoutno}",
  36. fieldLabel : "验收单号",
  37. allowBlank : true,
  38. columnWidth : 0.25
  39. },{
  40. xtype : "textfield",
  41. name : "pi_class",
  42. bind : "{pi_class}",
  43. fieldLabel : "类型",
  44. readOnly:true,
  45. allowBlank : true,
  46. columnWidth : 0.25
  47. }, {
  48. xtype : "hidden",
  49. name : "pu_vendid",
  50. bind : "{pu_vendid}",
  51. fieldLabel : "供应商ID",
  52. allowBlank : true,
  53. columnWidth : 0.0
  54. }, {
  55. xtype : "textfield",
  56. name : "pu_vendcode",
  57. bind : "{pu_vendcode}",
  58. fieldLabel : "供应商编号",
  59. hidden:true,
  60. allowBlank : true,
  61. columnWidth : 0,
  62. }, {
  63. xtype : "dbfindtrigger",
  64. name : "pu_vendname",
  65. bind : "{pu_vendname}",
  66. fieldLabel : "供应商名称",
  67. allowBlank : true,
  68. columnWidth : 0.25
  69. },{
  70. xtype : "datefield",
  71. name : "pu_date",
  72. bind : "{pu_date}",
  73. fieldLabel : "采购日期",
  74. allowBlank : false,
  75. columnWidth : 0.25
  76. }, {
  77. xtype : "hidden",
  78. name : "pu_buyerid",
  79. bind : "{pu_buyerid}",
  80. fieldLabel : "采购员ID",
  81. allowBlank : true,
  82. columnWidth : 0.0
  83. }, {
  84. xtype : "textfield",
  85. name : "pu_buyercode",
  86. bind : "{pu_buyercode}",
  87. fieldLabel : "采购员编号",
  88. allowBlank : true,
  89. hidden:true,
  90. columnWidth : 0
  91. }, {
  92. xtype : "dbfindtrigger",
  93. name : "pu_buyername",
  94. bind : "{pu_buyername}",
  95. fieldLabel : "采购员名称",
  96. allowBlank : true,
  97. columnWidth : 0.25
  98. }, {
  99. xtype : "textfield",
  100. name : "pu_shipaddresscode",
  101. bind : "{pu_shipaddresscode}",
  102. fieldLabel : "交货地址",
  103. allowBlank : true,
  104. columnWidth : 0.25
  105. }, {
  106. xtype : "textfield",
  107. name : "pu_total",
  108. bind : "{pu_total}",
  109. fieldLabel : "单据金额",
  110. allowBlank : true,
  111. columnWidth : 0.25
  112. }, {
  113. name : "detailGridField",
  114. xtype : "detailGridField",
  115. bind: {
  116. store:{
  117. data:'{detailGridField}'
  118. }
  119. },
  120. columns : [
  121. {
  122. text : "序号",
  123. dataIndex : "pd_pdno",
  124. width : 80.0,
  125. xtype : "rownumberer"
  126. }, {
  127. text : "id",
  128. dataIndex : "id",
  129. xtype : "numbercolumn"
  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_inqty",
  164. width : 120.0,
  165. xtype : "numbercolumn",
  166. items : null
  167. },
  168. {
  169. text : "仓库",
  170. dataIndex : "pd_whname",
  171. width : 120.0,
  172. xtype : "numbercolumn",
  173. items : null,
  174. editor : {
  175. displayField : "display",
  176. editable : true,
  177. format : "",
  178. hideTrigger : false,
  179. maxLength : 100.0,
  180. minValue : null,
  181. positiveNum : false,
  182. queryMode : "local",
  183. store : null,
  184. valueField : "value",
  185. xtype : "dbfindtrigger"
  186. }
  187. },
  188. {
  189. text : "单价",
  190. dataIndex : "pd_orderprice",
  191. width : 120.0,
  192. xtype : "numbercolumn",
  193. items : null
  194. },
  195. {
  196. text : "含税金额",
  197. dataIndex : "pd_total",
  198. width : 120.0,
  199. xtype : "numbercolumn"
  200. }, {
  201. text : "税率",
  202. dataIndex : "pd_taxrate",
  203. width : 120.0,
  204. xtype : "numbercolumn",
  205. items : null
  206. },
  207. {
  208. text : "未税金额",
  209. dataIndex : "pd_nettotal",
  210. xtype : "numbercolumn"
  211. },
  212. {
  213. text : "采购单号",
  214. dataIndex : "pd_ordercode",
  215. width : 120.0,
  216. flex : 1.0,
  217. editor : {
  218. displayField : "display",
  219. editable : true,
  220. format : "",
  221. hideTrigger : false,
  222. maxLength : 100.0,
  223. minValue : null,
  224. positiveNum : false,
  225. queryMode : "local",
  226. store : null,
  227. valueField : "value",
  228. xtype : "dbfindtrigger"
  229. }
  230. },{
  231. text : "采购序号",
  232. dataIndex : "pd_orderdetno",
  233. xtype : "numbercolumn",
  234. flex:1
  235. }
  236. ]
  237. }, {
  238. format : "Y-m-d",
  239. xtype : "datefield",
  240. name : "createTime",
  241. bind : "{createTime}",
  242. fieldLabel : "创建时间",
  243. allowBlank : true,
  244. columnWidth : 0.25
  245. }, {
  246. xtype : "datefield",
  247. name : "updateTime",
  248. bind : "{updateTime}",
  249. fieldLabel : "更新时间",
  250. allowBlank : true,
  251. columnWidth : 0.25
  252. }, {
  253. xtype : "textfield",
  254. readOnly : true,
  255. editable : false,
  256. name : "pu_status",
  257. bind : "{pu_status}",
  258. fieldLabel : "单据状态",
  259. allowBlank : true,
  260. columnWidth : 0.25
  261. }, {
  262. xtype : "hidden",
  263. readOnly : true,
  264. editable : false,
  265. name : "pu_statuscode",
  266. bind : "{pu_statuscode}",
  267. fieldLabel : "单据状态码",
  268. allowBlank : true,
  269. columnWidth : 0.0
  270. }]
  271. });