FormPanel.js 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  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. caller:'PurchaseOut',
  7. //字段属性
  8. _title:'采购验退单',
  9. _idField: 'id',
  10. _codeField: 'pi_inoutno',
  11. _statusField: 'pi_status',
  12. _statusCodeField: 'pi_statuscode',
  13. _detnoColumn: 'pd_pdno',
  14. _relationColumn: 'pd_piid',
  15. _readUrl:'http://192.168.253.228:8800/prodinout/read/',
  16. _saveUrl:'http://192.168.253.228:8800/prodinout/save',
  17. _auditUrl:'http://192.168.253.228:8800/prodinout/audit',
  18. _deleteUrl:'http://192.168.253.228:8800/prodinout/delete/',
  19. _deleteDetailUrl:'http://192.168.253.228:8800/prodinout/deleteItem/',
  20. initId:0,
  21. toolBtns: [],
  22. defaultItems: [{
  23. xtype: 'hidden',
  24. name: 'id',
  25. bind: '{id}',
  26. fieldLabel: 'id',
  27. allowBlank: true,
  28. columnWidth: 0
  29. }, {
  30. xtype : "textfield",
  31. name : "pi_inoutno",
  32. bind : "{pi_inoutno}",
  33. fieldLabel : "验退单号",
  34. allowBlank : true,
  35. columnWidth : 0.25
  36. },{
  37. xtype : "textfield",
  38. name : "pi_class",
  39. bind : "{pi_class}",
  40. fieldLabel : "单据类型",
  41. readOnly:true,
  42. allowBlank : true,
  43. columnWidth : 0.25
  44. }, {
  45. xtype : "hidden",
  46. name : "pi_vendid",
  47. bind : "{pi_vendid}",
  48. fieldLabel : "供应商ID",
  49. allowBlank : true,
  50. columnWidth : 0.0
  51. }, {
  52. xtype : "textfield",
  53. name : "pi_vendcode",
  54. bind : "{pi_vendcode}",
  55. fieldLabel : "供应商编号",
  56. hidden:true,
  57. allowBlank : true,
  58. columnWidth : 0,
  59. }, {
  60. xtype : "dbfindtrigger",
  61. name : "pi_vendname",
  62. bind : "{pi_vendname}",
  63. fieldLabel : "供应商名称",
  64. allowBlank : true,
  65. columnWidth : 0.25
  66. },{
  67. xtype : "datefield",
  68. name : "pi_date",
  69. bind : "{pi_date}",
  70. fieldLabel : "单据日期",
  71. allowBlank : false,
  72. columnWidth : 0.25
  73. },{
  74. xtype : "textfield",
  75. name : "pi_total",
  76. bind : "{pi_total}",
  77. fieldLabel : "总额",
  78. allowBlank : true,
  79. readOnly: true,
  80. columnWidth : 0.25
  81. }, {
  82. xtype : "textfield",
  83. name : "pi_puid",
  84. bind : "{pi_puid}",
  85. fieldLabel : "采购单id",
  86. allowBlank : true,
  87. columnWidth : 0.25
  88. },{
  89. xtype : "textfield",
  90. name : "pi_pucode",
  91. bind : "{pi_pucode}",
  92. fieldLabel : "采购单号",
  93. allowBlank : true,
  94. columnWidth : 0.25
  95. },{
  96. name : "detailGridField",
  97. xtype : "detailGridField",
  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. });