FormPanel.js 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277
  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: '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. _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. text : "物料id",
  122. dataIndex : "pd_prodid",
  123. xtype : "numbercolumn",
  124. hidden:true
  125. },
  126. {
  127. text : "物料编号",
  128. width : 200.0,
  129. dataIndex : "pd_prodcode",
  130. xtype : "",
  131. items : null,
  132. editor : {
  133. displayField : "display",
  134. editable : true,
  135. format : "",
  136. hideTrigger : false,
  137. maxLength : 100.0,
  138. minValue : null,
  139. positiveNum : false,
  140. queryMode : "local",
  141. store : null,
  142. valueField : "value",
  143. xtype : "dbfindtrigger"
  144. }
  145. },
  146. {
  147. text : "名称",
  148. dataIndex : "pr_detail",
  149. ignore:true
  150. },
  151. {
  152. text : "规格",
  153. dataIndex : "pr_spec",
  154. ignore:true
  155. },
  156. {
  157. text : "数量",
  158. dataIndex : "pd_inqty",
  159. editor : {
  160. xtype : "numberfield"
  161. },
  162. width : 120.0,
  163. xtype : "numbercolumn",
  164. format:'0',
  165. items : null,
  166. summaryType: 'sum'
  167. }, {
  168. text : "已转数",
  169. dataIndex : "pd_yqty",
  170. editor : {
  171. xtype : "numberfield"
  172. },
  173. width : 120.0,
  174. xtype : "numbercolumn",
  175. format:'0',
  176. items : null,
  177. summaryType: 'sum'
  178. },
  179. {
  180. text : "仓库",
  181. dataIndex : "pd_whname",
  182. width : 120.0,
  183. items : null,
  184. editor : {
  185. displayField : "display",
  186. editable : true,
  187. format : "",
  188. hideTrigger : false,
  189. maxLength : 100.0,
  190. minValue : null,
  191. positiveNum : false,
  192. queryMode : "local",
  193. store : null,
  194. valueField : "value",
  195. xtype : "dbfindtrigger"
  196. }
  197. },
  198. {
  199. text : "单价",
  200. dataIndex : "pd_orderprice",
  201. width : 120.0,
  202. xtype : "numbercolumn",
  203. items : null
  204. },
  205. {
  206. text : "含税金额",
  207. dataIndex : "pd_total",
  208. width : 120.0,
  209. xtype : "numbercolumn"
  210. }, {
  211. text : "税率",
  212. dataIndex : "pd_taxrate",
  213. width : 120.0,
  214. xtype : "numbercolumn",
  215. items : null
  216. },
  217. {
  218. text : "未税金额",
  219. dataIndex : "pd_nettotal",
  220. xtype : "numbercolumn"
  221. },
  222. {
  223. text : "采购单明细id",
  224. dataIndex : "pd_orderid",
  225. width : 120.0,
  226. hidden:true
  227. },
  228. {
  229. text : "采购单号",
  230. dataIndex : "pd_ordercode",
  231. width : 120.0
  232. },{
  233. text : "采购序号",
  234. dataIndex : "pd_orderdetno",
  235. xtype : "numbercolumn",
  236. flex:1
  237. }
  238. ]
  239. }, {
  240. format : "Y-m-d",
  241. xtype : "datefield",
  242. name : "createTime",
  243. bind : "{createTime}",
  244. fieldLabel : "创建时间",
  245. allowBlank : true,
  246. columnWidth : 0.25
  247. }, {
  248. xtype : "datefield",
  249. name : "updateTime",
  250. bind : "{updateTime}",
  251. fieldLabel : "更新时间",
  252. allowBlank : true,
  253. columnWidth : 0.25
  254. }, {
  255. xtype : "textfield",
  256. readOnly : true,
  257. editable : false,
  258. name : "pi_status",
  259. bind : "{pi_status}",
  260. fieldLabel : "单据状态",
  261. allowBlank : true,
  262. columnWidth : 0.25
  263. }, {
  264. xtype : "hidden",
  265. readOnly : true,
  266. editable : false,
  267. name : "pi_statuscode",
  268. bind : "{pi_statuscode}",
  269. fieldLabel : "单据状态码",
  270. allowBlank : true,
  271. columnWidth : 0.0
  272. }]
  273. });