FormPanel.js 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  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. _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.58:8800/purchase/read/',
  14. _saveUrl:'http://192.168.253.58:8800/purchase/save',
  15. _auditUrl:'http://192.168.253.58:8800/purchase/audit',
  16. _deleteUrl:'http://192.168.253.58:8800/purchase/delete/',
  17. _deleteDetailUrl:'http://192.168.253.58:8800/purchase/deleteItem/',
  18. initId:0,
  19. toolBtns: [{
  20. xtype: 'button',
  21. text: '转单按钮',
  22. handler: function() {
  23. console.log('11');
  24. }
  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 : "textfield",
  87. name : "pi_pucode",
  88. bind : "{pi_pucode}",
  89. fieldLabel : "采购单号",
  90. allowBlank : true,
  91. columnWidth : 0.25
  92. }, {
  93. name : "detailGridField",
  94. xtype : "detailGridField",
  95. columns : [
  96. {
  97. text : "序号",
  98. dataIndex : "pd_pdno",
  99. width : 100,
  100. xtype : "numbercolumn",
  101. align : 'center',
  102. format:'0',
  103. summaryType: 'count',
  104. summaryRenderer: function(value, summaryData, dataIndex) {
  105. return Ext.String.format('合计: {0}条', value);
  106. },
  107. }, {
  108. text : "id",
  109. dataIndex : "id",
  110. xtype : "numbercolumn"
  111. },
  112. {
  113. text : "物料编号",
  114. width : 200.0,
  115. dataIndex : "pd_prodcode",
  116. xtype : "",
  117. items : null,
  118. editor : {
  119. displayField : "display",
  120. editable : true,
  121. format : "",
  122. hideTrigger : false,
  123. maxLength : 100.0,
  124. minValue : null,
  125. positiveNum : false,
  126. queryMode : "local",
  127. store : null,
  128. valueField : "value",
  129. xtype : "dbfindtrigger"
  130. }
  131. },
  132. {
  133. text : "名称",
  134. dataIndex : "pr_detail",
  135. ignore:true
  136. },
  137. {
  138. text : "规格",
  139. dataIndex : "pr_spec",
  140. ignore:true
  141. },
  142. {
  143. text : "验退数量",
  144. dataIndex : "pd_outqty",
  145. editor : {
  146. xtype : "numberfield"
  147. },
  148. width : 120.0,
  149. xtype : "numbercolumn",
  150. format:'0',
  151. items : null,
  152. summaryType: 'sum'
  153. },
  154. {
  155. text : "仓库",
  156. dataIndex : "pd_whname",
  157. width : 120.0,
  158. items : null,
  159. editor : {
  160. displayField : "display",
  161. editable : true,
  162. format : "",
  163. hideTrigger : false,
  164. maxLength : 100.0,
  165. minValue : null,
  166. positiveNum : false,
  167. queryMode : "local",
  168. store : null,
  169. valueField : "value",
  170. xtype : "dbfindtrigger"
  171. }
  172. },
  173. {
  174. text : "单价",
  175. dataIndex : "pd_orderprice",
  176. width : 120.0,
  177. xtype : "numbercolumn",
  178. items : null
  179. },
  180. {
  181. text : "含税金额",
  182. dataIndex : "pd_total",
  183. width : 120.0,
  184. xtype : "numbercolumn"
  185. }, {
  186. text : "税率",
  187. dataIndex : "pd_taxrate",
  188. width : 120.0,
  189. xtype : "numbercolumn",
  190. items : null
  191. },
  192. {
  193. text : "未税金额",
  194. dataIndex : "pd_nettotal",
  195. xtype : "numbercolumn"
  196. },
  197. {
  198. text : "采购单号",
  199. dataIndex : "pd_ordercode",
  200. width : 120.0
  201. },{
  202. text : "采购序号",
  203. dataIndex : "pd_orderdetno",
  204. xtype : "numbercolumn",
  205. flex:1
  206. }
  207. ]
  208. }, {
  209. format : "Y-m-d",
  210. xtype : "datefield",
  211. name : "createTime",
  212. bind : "{createTime}",
  213. fieldLabel : "创建时间",
  214. allowBlank : true,
  215. columnWidth : 0.25
  216. }, {
  217. xtype : "datefield",
  218. name : "updateTime",
  219. bind : "{updateTime}",
  220. fieldLabel : "更新时间",
  221. allowBlank : true,
  222. columnWidth : 0.25
  223. }, {
  224. xtype : "textfield",
  225. readOnly : true,
  226. editable : false,
  227. name : "pi_status",
  228. bind : "{pi_status}",
  229. fieldLabel : "单据状态",
  230. allowBlank : true,
  231. columnWidth : 0.25
  232. }, {
  233. xtype : "hidden",
  234. readOnly : true,
  235. editable : false,
  236. name : "pi_statuscode",
  237. bind : "{pi_statuscode}",
  238. fieldLabel : "单据状态码",
  239. allowBlank : true,
  240. columnWidth : 0.0
  241. }]
  242. });