FormPanel.js 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  1. Ext.define('saas.view.stock.appropriationInOut.FormPanel', {
  2. extend: 'saas.view.core.form.FormPanel',
  3. xtype: 'stock-appropriationinout-formpanel',
  4. controller: 'stock-appropriationinout-formpanel',
  5. viewModel: 'stock-appropriationinout-formpanel',
  6. //字段属性
  7. _title:'其它入库单',
  8. _idField: 'id',
  9. _codeField: 'pi_inoutno',
  10. _statusField: 'pi_status',
  11. _statusCodeField: 'pi_statuscode',
  12. _relationColumn: 'pd_piid',
  13. _readUrl:'http://localhost:9000/prodinout/read/',
  14. _saveUrl:'http://localhost:9000/prodinout/save',
  15. _auditUrl:'http://localhost:9000/prodinout/audit',
  16. _deleteUrl:'http://localhost:9000/prodinout/delete/',
  17. _deleteDetailUrl:'http://localhost:9000/prodinout/deleteItem/',
  18. initId:0,
  19. toolBtns: [{
  20. xtype: 'button',
  21. text: '转其他出库',
  22. handler: 'turnIn'
  23. }],
  24. defaultItems: [{
  25. xtype: 'hidden',
  26. name: 'id',
  27. bind: '{id}',
  28. fieldLabel: 'id',
  29. allowBlank: true,
  30. columnWidth: 0
  31. },{
  32. xtype : "textfield",
  33. name : "pi_inoutno",
  34. bind : "{pi_inoutno}",
  35. fieldLabel : "调拨单号",
  36. allowBlank : true,
  37. columnWidth : 0.25
  38. },{
  39. xtype : "textfield",
  40. name : "pi_class",
  41. bind : "{pi_class}",
  42. fieldLabel : "单据类型",
  43. readOnly:true,
  44. allowBlank : true,
  45. hidden:true,
  46. columnWidth : 0.25
  47. },{
  48. xtype : "datefield",
  49. name : "pi_date",
  50. bind : "{pi_date}",
  51. fieldLabel : "单据日期",
  52. allowBlank : true,
  53. columnWidth : 0.25
  54. },{
  55. name : "detailGridField",
  56. xtype : "detailGridField",
  57. _detnoColumn: 'pd_pdno',
  58. columns : [
  59. {
  60. text : "序号",
  61. dataIndex : "pd_pdno",
  62. width : 100,
  63. xtype : "numbercolumn",
  64. align : 'center',
  65. format:'0',
  66. summaryType: 'count',
  67. summaryRenderer: function(value, summaryData, dataIndex) {
  68. return Ext.String.format('合计: {0}条', value);
  69. },
  70. }, {
  71. text : "id",
  72. dataIndex : "id",
  73. xtype : "numbercolumn",
  74. hidden:true
  75. },{
  76. text : "pd_piid",
  77. dataIndex : "pd_piid",
  78. xtype : "numbercolumn",
  79. hidden:true
  80. },
  81. {
  82. text : "物料编号",
  83. width : 200.0,
  84. dataIndex : "pd_prodcode",
  85. xtype : "",
  86. items : null,
  87. editor : {
  88. displayField : "display",
  89. editable : true,
  90. format : "",
  91. hideTrigger : false,
  92. maxLength : 100.0,
  93. minValue : null,
  94. positiveNum : false,
  95. queryMode : "local",
  96. store : null,
  97. valueField : "value",
  98. xtype : "dbfindtrigger"
  99. }
  100. },
  101. {
  102. text : "名称",
  103. dataIndex : "pr_detail",
  104. ignore:true
  105. },
  106. {
  107. text : "规格",
  108. dataIndex : "pr_spec",
  109. ignore:true
  110. },
  111. {
  112. text : "单位",
  113. dataIndex : "pr_unit",
  114. ignore:true
  115. },
  116. {
  117. text : "数量",
  118. dataIndex : "pd_qty",
  119. editor : {
  120. xtype : "numberfield"
  121. },
  122. width : 120.0,
  123. xtype : "numbercolumn",
  124. format:'0',
  125. items : null,
  126. summaryType: 'sum'
  127. }, {
  128. text : "拨出仓库id",
  129. dataIndex : "pd_whid",
  130. xtype : "numbercolumn",
  131. hidden:true
  132. },
  133. {
  134. text : "拨出仓库编号",
  135. dataIndex : "pd_whcode",
  136. width : 120.0,
  137. items : null,
  138. editor : {
  139. displayField : "display",
  140. editable : true,
  141. format : "",
  142. hideTrigger : false,
  143. maxLength : 100.0,
  144. minValue : null,
  145. positiveNum : false,
  146. queryMode : "local",
  147. store : null,
  148. valueField : "value",
  149. xtype : "dbfindtrigger"
  150. }
  151. },{
  152. text : "拨出仓库名称",
  153. dataIndex : "pd_whname",
  154. width : 120.0
  155. },{
  156. text : "拨入仓库id",
  157. dataIndex : "pd_inwhid",
  158. xtype : "numbercolumn",
  159. hidden:true
  160. },{
  161. text : "拨入仓库编号",
  162. dataIndex : "pd_inwhcode",
  163. width : 120.0,
  164. items : null,
  165. editor : {
  166. displayField : "display",
  167. editable : true,
  168. format : "",
  169. hideTrigger : false,
  170. maxLength : 100.0,
  171. minValue : null,
  172. positiveNum : false,
  173. queryMode : "local",
  174. store : null,
  175. valueField : "value",
  176. xtype : "dbfindtrigger"
  177. }
  178. },{
  179. text : "拨入仓库名称",
  180. dataIndex : "pd_inwhname",
  181. width : 120.0
  182. }
  183. ]
  184. }, {
  185. format : "Y-m-d",
  186. xtype : "datefield",
  187. name : "createTime",
  188. bind : "{createTime}",
  189. fieldLabel : "创建时间",
  190. allowBlank : true,
  191. columnWidth : 0.25
  192. }, {
  193. xtype : "datefield",
  194. name : "updateTime",
  195. bind : "{updateTime}",
  196. fieldLabel : "更新时间",
  197. allowBlank : true,
  198. columnWidth : 0.25
  199. }, {
  200. xtype : "textfield",
  201. readOnly : true,
  202. editable : false,
  203. name : "pu_status",
  204. bind : "{pi_status}",
  205. fieldLabel : "单据状态",
  206. allowBlank : true,
  207. columnWidth : 0.25
  208. }, {
  209. xtype : "hidden",
  210. readOnly : true,
  211. editable : false,
  212. name : "pi_statuscode",
  213. bind : "{pi_statuscode}",
  214. fieldLabel : "单据状态码",
  215. allowBlank : true,
  216. columnWidth : 0.0
  217. }]
  218. });