FormPanel.js 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252
  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:0,
  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. xtype : "hidden",
  88. name : "pi_inid",
  89. bind : "{pi_inid}",
  90. fieldLabel : "出入库单id",
  91. allowBlank : true,
  92. columnWidth : 0.25
  93. },{
  94. name : "detailGridField",
  95. xtype : "detailGridField",
  96. columns : [
  97. {
  98. text : "序号",
  99. dataIndex : "pd_pdno",
  100. width : 100,
  101. xtype : "numbercolumn",
  102. align : 'center',
  103. format:'0',
  104. summaryType: 'count',
  105. summaryRenderer: function(value, summaryData, dataIndex) {
  106. return Ext.String.format('合计: {0}条', value);
  107. },
  108. }, {
  109. text : "id",
  110. dataIndex : "id",
  111. xtype : "numbercolumn"
  112. },
  113. {
  114. text : "物料编号",
  115. width : 200.0,
  116. dataIndex : "pd_prodcode",
  117. xtype : "",
  118. items : null,
  119. editor : {
  120. displayField : "display",
  121. editable : true,
  122. format : "",
  123. hideTrigger : false,
  124. maxLength : 100.0,
  125. minValue : null,
  126. positiveNum : false,
  127. queryMode : "local",
  128. store : null,
  129. valueField : "value",
  130. xtype : "dbfindtrigger"
  131. }
  132. },
  133. {
  134. text : "名称",
  135. dataIndex : "pr_detail",
  136. ignore:true
  137. },
  138. {
  139. text : "规格",
  140. dataIndex : "pr_spec",
  141. ignore:true
  142. },
  143. {
  144. text : "验退数量",
  145. dataIndex : "pd_outqty",
  146. editor : {
  147. xtype : "numberfield"
  148. },
  149. width : 120.0,
  150. xtype : "numbercolumn",
  151. format:'0',
  152. items : null,
  153. summaryType: 'sum'
  154. },
  155. {
  156. text : "仓库",
  157. dataIndex : "pd_whname",
  158. width : 120.0,
  159. items : null,
  160. editor : {
  161. displayField : "display",
  162. editable : true,
  163. format : "",
  164. hideTrigger : false,
  165. maxLength : 100.0,
  166. minValue : null,
  167. positiveNum : false,
  168. queryMode : "local",
  169. store : null,
  170. valueField : "value",
  171. xtype : "dbfindtrigger"
  172. }
  173. },
  174. {
  175. text : "单价",
  176. dataIndex : "pd_orderprice",
  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. text : "税率",
  188. dataIndex : "pd_taxrate",
  189. width : 120.0,
  190. xtype : "numbercolumn",
  191. items : null
  192. },
  193. {
  194. text : "未税金额",
  195. dataIndex : "pd_nettotal",
  196. xtype : "numbercolumn"
  197. },
  198. {
  199. text : "采购单号",
  200. dataIndex : "pd_ordercode",
  201. width : 120.0
  202. },{
  203. text : "采购序号",
  204. dataIndex : "pd_orderdetno",
  205. xtype : "numbercolumn",
  206. flex:1
  207. }, {
  208. text : "出入库明细id",
  209. dataIndex : "pd_ioid",
  210. width : 120.0,
  211. hidden:true
  212. }
  213. ]
  214. }, {
  215. format : "Y-m-d",
  216. xtype : "datefield",
  217. name : "createTime",
  218. bind : "{createTime}",
  219. fieldLabel : "创建时间",
  220. allowBlank : true,
  221. columnWidth : 0.25
  222. }, {
  223. xtype : "datefield",
  224. name : "updateTime",
  225. bind : "{updateTime}",
  226. fieldLabel : "更新时间",
  227. allowBlank : true,
  228. columnWidth : 0.25
  229. }, {
  230. xtype : "textfield",
  231. readOnly : true,
  232. editable : false,
  233. name : "pi_status",
  234. bind : "{pi_status}",
  235. fieldLabel : "单据状态",
  236. allowBlank : true,
  237. columnWidth : 0.25
  238. }, {
  239. xtype : "hidden",
  240. readOnly : true,
  241. editable : false,
  242. name : "pi_statuscode",
  243. bind : "{pi_statuscode}",
  244. fieldLabel : "单据状态码",
  245. allowBlank : true,
  246. columnWidth : 0.0
  247. }]
  248. });