FormPanel.js 7.4 KB

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