FormPanel.js 6.7 KB

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