FormPanel.js 6.9 KB

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