FormPanel.js 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  1. Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
  2. extend: 'saas.view.core.form.FormPanel',
  3. xtype: 'purchase-purchaseOut-formpanel',
  4. controller: 'purchase-purchaseOut-formcontroller',
  5. viewModel: 'purchase-purchaseOut-formmodel',
  6. _title:'采购验退单',
  7. _idField: 'id',
  8. _codeField: 'pi_inoutno',
  9. _statusField: 'pu_status',
  10. _statusCodeField: 'pu_statuscode',
  11. _detnoColumn: 'pd_pdno',
  12. _relationColumn: 'pd_piid',
  13. _readUrl:'http://192.168.253.228:8800/prodinout/read/',
  14. _saveUrl:'http://192.168.253.228:8800/prodinout/save',
  15. _auditUrl:'http://192.168.253.228:8800/prodinout/audit',
  16. _deleteUrl:'http://192.168.253.228:8800/prodinout/delete/',
  17. _deleteDetailUrl:'http://192.168.253.228:8800/prodinout/deleteItem/',
  18. initId:11,
  19. toolBtns: [],
  20. defaultItems: [{
  21. xtype: 'hidden',
  22. name: 'id',
  23. bind: '{id}',
  24. fieldLabel: 'id',
  25. allowBlank: true,
  26. columnWidth: 0
  27. }, {
  28. xtype : "textfield",
  29. name : "pi_inoutno",
  30. bind : "{pi_inoutno}",
  31. fieldLabel : "验退单号",
  32. allowBlank : true,
  33. columnWidth : 0.25
  34. },{
  35. xtype : "textfield",
  36. name : "pi_class",
  37. bind : "{pi_class}",
  38. fieldLabel : "单据类型",
  39. readOnly:true,
  40. allowBlank : true,
  41. columnWidth : 0.25
  42. }, {
  43. xtype : "hidden",
  44. name : "pi_vendid",
  45. bind : "{pi_vendid}",
  46. fieldLabel : "供应商ID",
  47. allowBlank : true,
  48. columnWidth : 0.0
  49. }, {
  50. xtype : "textfield",
  51. name : "pi_vendcode",
  52. bind : "{pi_vendcode}",
  53. fieldLabel : "供应商编号",
  54. hidden:true,
  55. allowBlank : true,
  56. columnWidth : 0,
  57. }, {
  58. xtype : "dbfindtrigger",
  59. name : "pi_vendname",
  60. bind : "{pi_vendname}",
  61. fieldLabel : "供应商名称",
  62. allowBlank : true,
  63. columnWidth : 0.25
  64. },{
  65. xtype : "datefield",
  66. name : "pi_date",
  67. bind : "{pi_date}",
  68. fieldLabel : "单据日期",
  69. allowBlank : false,
  70. columnWidth : 0.25
  71. },{
  72. xtype : "textfield",
  73. name : "pi_total",
  74. bind : "{pi_total}",
  75. fieldLabel : "总额",
  76. allowBlank : true,
  77. readOnly: true,
  78. columnWidth : 0.25
  79. }, {
  80. xtype : "textfield",
  81. name : "pi_pucode",
  82. bind : "{pi_pucode}",
  83. fieldLabel : "采购单号",
  84. allowBlank : true,
  85. columnWidth : 0.25
  86. }, {
  87. name : "detailGridField",
  88. xtype : "detailGridField",
  89. columns : [
  90. {
  91. text : "序号",
  92. dataIndex : "pd_pdno",
  93. width : 100,
  94. xtype : "numbercolumn",
  95. align : 'center',
  96. format:'0',
  97. summaryType: 'count',
  98. summaryRenderer: function(value, summaryData, dataIndex) {
  99. return Ext.String.format('合计: {0}条', value);
  100. },
  101. }, {
  102. text : "id",
  103. dataIndex : "id",
  104. xtype : "numbercolumn"
  105. },
  106. {
  107. text : "物料编号",
  108. width : 200.0,
  109. dataIndex : "pd_prodcode",
  110. xtype : "",
  111. items : null,
  112. editor : {
  113. displayField : "display",
  114. editable : true,
  115. format : "",
  116. hideTrigger : false,
  117. maxLength : 100.0,
  118. minValue : null,
  119. positiveNum : false,
  120. queryMode : "local",
  121. store : null,
  122. valueField : "value",
  123. xtype : "dbfindtrigger"
  124. }
  125. },
  126. {
  127. text : "名称",
  128. dataIndex : "pr_detail",
  129. ignore:true
  130. },
  131. {
  132. text : "规格",
  133. dataIndex : "pr_spec",
  134. ignore:true
  135. },
  136. {
  137. text : "验退数量",
  138. dataIndex : "pd_outqty",
  139. editor : {
  140. xtype : "numberfield"
  141. },
  142. width : 120.0,
  143. xtype : "numbercolumn",
  144. format:'0',
  145. items : null,
  146. summaryType: 'sum'
  147. },
  148. {
  149. text : "仓库",
  150. dataIndex : "pd_whname",
  151. width : 120.0,
  152. items : null,
  153. editor : {
  154. displayField : "display",
  155. editable : true,
  156. format : "",
  157. hideTrigger : false,
  158. maxLength : 100.0,
  159. minValue : null,
  160. positiveNum : false,
  161. queryMode : "local",
  162. store : null,
  163. valueField : "value",
  164. xtype : "dbfindtrigger"
  165. }
  166. },
  167. {
  168. text : "单价",
  169. dataIndex : "pd_orderprice",
  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. text : "税率",
  181. dataIndex : "pd_taxrate",
  182. width : 120.0,
  183. xtype : "numbercolumn",
  184. items : null
  185. },
  186. {
  187. text : "未税金额",
  188. dataIndex : "pd_nettotal",
  189. xtype : "numbercolumn"
  190. },
  191. {
  192. text : "采购单号",
  193. dataIndex : "pd_ordercode",
  194. width : 120.0
  195. },{
  196. text : "采购序号",
  197. dataIndex : "pd_orderdetno",
  198. xtype : "numbercolumn",
  199. flex:1
  200. }
  201. ]
  202. }, {
  203. format : "Y-m-d",
  204. xtype : "datefield",
  205. name : "createTime",
  206. bind : "{createTime}",
  207. fieldLabel : "创建时间",
  208. allowBlank : true,
  209. columnWidth : 0.25
  210. }, {
  211. xtype : "datefield",
  212. name : "updateTime",
  213. bind : "{updateTime}",
  214. fieldLabel : "更新时间",
  215. allowBlank : true,
  216. columnWidth : 0.25
  217. }, {
  218. xtype : "textfield",
  219. readOnly : true,
  220. editable : false,
  221. name : "pi_status",
  222. bind : "{pi_status}",
  223. fieldLabel : "单据状态",
  224. allowBlank : true,
  225. columnWidth : 0.25
  226. }, {
  227. xtype : "hidden",
  228. readOnly : true,
  229. editable : false,
  230. name : "pi_statuscode",
  231. bind : "{pi_statuscode}",
  232. fieldLabel : "单据状态码",
  233. allowBlank : true,
  234. columnWidth : 0.0
  235. }]
  236. });