FormPanel.js 7.9 KB

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