FormPanel.js 7.2 KB

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