FormPanel.js 6.8 KB

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