FormPanel.js 8.0 KB

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