FormPanel.js 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  1. Ext.define('saas.view.stock.otherIn.FormPanel', {
  2. extend: 'saas.view.core.form.FormPanel',
  3. xtype: 'stock-otherin-formpanel',
  4. controller: 'stock-otherin-formpanel',
  5. viewModel: 'stock-otherin-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. _turnInUrl:'http://localhost:9000/prodinout/turnProdin/',
  19. initId:0,
  20. toolBtns: [{
  21. xtype: 'button',
  22. text: '转其他出库',
  23. handler: 'turnIn'
  24. }],
  25. defaultItems: [{
  26. xtype: 'hidden',
  27. name: 'id',
  28. bind: '{id}',
  29. fieldLabel: 'id',
  30. allowBlank: true,
  31. columnWidth: 0
  32. },{
  33. xtype : "textfield",
  34. name : "pi_inoutno",
  35. bind : "{pi_inoutno}",
  36. fieldLabel : "入库单号",
  37. allowBlank : true,
  38. columnWidth : 0.25
  39. },{
  40. xtype : "textfield",
  41. name : "pi_class",
  42. bind : "{pi_class}",
  43. fieldLabel : "单据类型",
  44. readOnly:false,
  45. allowBlank : true,
  46. defaultValue:"其它入库单",
  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 : true,
  76. columnWidth : 0.25
  77. },{
  78. xtype : "numberfield",
  79. name : "pi_total",
  80. bind : "{pi_total}",
  81. fieldLabel : "单据金额",
  82. allowBlank : true,
  83. columnWidth : 0.25
  84. }, {
  85. name : "detailGridField",
  86. xtype : "detailGridField",
  87. _detnoColumn: 'pd_pdno',
  88. columns : [
  89. {
  90. text : "序号",
  91. dataIndex : "pd_pdno",
  92. width : 100,
  93. xtype : "numbercolumn",
  94. align : 'center',
  95. format:'0',
  96. summaryType: 'count',
  97. summaryRenderer: function(value, summaryData, dataIndex) {
  98. return Ext.String.format('合计: {0}条', value);
  99. },
  100. }, {
  101. text : "id",
  102. dataIndex : "id",
  103. xtype : "numbercolumn",
  104. hidden:true
  105. },{
  106. text : "pd_piid",
  107. dataIndex : "pd_piid",
  108. xtype : "numbercolumn",
  109. hidden:true
  110. },
  111. {
  112. text : "物料编号",
  113. width : 200.0,
  114. dataIndex : "pd_prodcode",
  115. xtype : "",
  116. items : null,
  117. editor : {
  118. displayField : "display",
  119. editable : true,
  120. format : "",
  121. hideTrigger : false,
  122. maxLength : 100.0,
  123. minValue : null,
  124. positiveNum : false,
  125. queryMode : "local",
  126. store : null,
  127. valueField : "value",
  128. xtype : "dbfindtrigger"
  129. }
  130. },
  131. {
  132. text : "名称",
  133. dataIndex : "pr_detail",
  134. ignore:true
  135. },
  136. {
  137. text : "规格",
  138. dataIndex : "pr_spec",
  139. ignore:true
  140. },
  141. {
  142. text : "单位",
  143. dataIndex : "pr_unit",
  144. ignore:true
  145. },
  146. {
  147. text : "数量",
  148. dataIndex : "pd_inqty",
  149. editor : {
  150. xtype : "numberfield"
  151. },
  152. width : 120.0,
  153. xtype : "numbercolumn",
  154. format:'0',
  155. items : null,
  156. summaryType: 'sum'
  157. },
  158. {
  159. text : "已转数",
  160. dataIndex : "pd_yqty",
  161. editor : {
  162. xtype : "numberfield"
  163. },
  164. width : 120.0,
  165. xtype : "numbercolumn",
  166. format:'0',
  167. items : null,
  168. summaryType: 'sum'
  169. },
  170. {
  171. text : "单价",
  172. editor : {
  173. xtype : "numberfield"
  174. },
  175. format:'0,000.00',
  176. dataIndex : "pd_price",
  177. width : 120.0,
  178. xtype : "numbercolumn",
  179. items : null,
  180. summaryType: 'sum'
  181. },
  182. {
  183. text : "税率",
  184. editor : {
  185. xtype : "numberfield"
  186. },
  187. dataIndex : "pd_taxrate",
  188. width : 120.0,
  189. xtype : "numbercolumn",
  190. items : null
  191. },
  192. {
  193. text : "未税金额",
  194. dataIndex : "pd_taxtotal",
  195. xtype : "numbercolumn"
  196. },
  197. {
  198. text : "销售单明细id",
  199. dataIndex : "pd_sdid",
  200. width : 120.0,
  201. flex : 1.0,
  202. hidden:true
  203. },{
  204. text : "销售单单号",
  205. dataIndex : "pd_sdid",
  206. width : 120.0,
  207. flex : 1.0
  208. },{
  209. text : "销售序号",
  210. dataIndex : "pd_sdid",
  211. width : 120.0,
  212. flex : 1.0
  213. }
  214. ]
  215. }, {
  216. format : "Y-m-d",
  217. xtype : "datefield",
  218. name : "createTime",
  219. bind : "{createTime}",
  220. fieldLabel : "创建时间",
  221. allowBlank : true,
  222. columnWidth : 0.25
  223. }, {
  224. xtype : "datefield",
  225. name : "updateTime",
  226. bind : "{updateTime}",
  227. fieldLabel : "更新时间",
  228. allowBlank : true,
  229. columnWidth : 0.25
  230. }, {
  231. xtype : "textfield",
  232. readOnly : true,
  233. editable : false,
  234. name : "pu_status",
  235. bind : "{pi_status}",
  236. fieldLabel : "单据状态",
  237. allowBlank : true,
  238. columnWidth : 0.25
  239. }, {
  240. xtype : "hidden",
  241. readOnly : true,
  242. editable : false,
  243. name : "pi_statuscode",
  244. bind : "{pi_statuscode}",
  245. fieldLabel : "单据状态码",
  246. allowBlank : true,
  247. columnWidth : 0.0
  248. }]
  249. });