FormPanel.js 7.2 KB

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