FormPanel.js 7.6 KB

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