FormPanel.js 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  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. viewName: 'stock-otherout-formpanel',
  7. caller:'OtherOut',
  8. //字段属性
  9. _title:'其它出库单',
  10. _idField: 'id',
  11. _codeField: 'pi_inoutno',
  12. _statusField: 'pi_status',
  13. _statusCodeField: 'pi_statuscode',
  14. _relationColumn: 'pd_piid',
  15. _readUrl:basePath+'storage/prodinout/read/',
  16. _saveUrl:basePath+'storage/prodinout/save',
  17. _auditUrl:basePath+'storage/prodinout/audit',
  18. _deleteUrl:basePath+'storage/prodinout/delete/',
  19. _deleteDetailUrl:basePath+'storage/prodinout/deleteItem/',
  20. initId:0,
  21. toolBtns: [],
  22. defaultItems: [{
  23. xtype: 'hidden',
  24. name: 'id',
  25. fieldLabel: 'id',
  26. columnWidth: 0
  27. },{
  28. xtype : "textfield",
  29. name : "pi_class",
  30. fieldLabel : "单据类型",
  31. readOnly:true,
  32. allowBlank : false,
  33. defaultValue:'其它出库单'
  34. },{
  35. xtype : "hidden",
  36. name : "pi_total",
  37. fieldLabel : "单据金额"
  38. }, {
  39. name : "detailGridField",
  40. xtype : "detailGridField",
  41. storeModel:'saas.model.stock.ProdIODetail',
  42. _detnoColumn: 'pd_pdno',
  43. columns : [
  44. {
  45. text : "序号",
  46. dataIndex : "pd_pdno",
  47. width : 100,
  48. xtype : "numbercolumn",
  49. align : 'center',
  50. format:'0',
  51. summaryType: 'count',
  52. summaryRenderer: function(value, summaryData, dataIndex) {
  53. return Ext.String.format('合计: {0}条', value);
  54. },
  55. }, {
  56. text : "id",
  57. dataIndex : "id",
  58. xtype : "numbercolumn",
  59. hidden:true
  60. },{
  61. text : "pd_piid",
  62. dataIndex : "pd_piid",
  63. xtype : "numbercolumn",
  64. hidden:true
  65. },
  66. {
  67. text : "物料编号",
  68. width : 200.0,
  69. dataIndex : "pd_prodcode",
  70. xtype : "",
  71. items : null,
  72. editor : {
  73. displayField : "display",
  74. editable : true,
  75. format : "",
  76. hideTrigger : false,
  77. maxLength : 100.0,
  78. minValue : null,
  79. positiveNum : false,
  80. queryMode : "local",
  81. store : null,
  82. valueField : "value",
  83. xtype : "dbfindtrigger"
  84. }
  85. },
  86. {
  87. text : "名称",
  88. dataIndex : "pr_detail",
  89. ignore:true
  90. },
  91. {
  92. text : "规格",
  93. dataIndex : "pr_spec",
  94. ignore:true
  95. },
  96. {
  97. text : "单位",
  98. dataIndex : "pr_unit",
  99. ignore:true
  100. },
  101. {
  102. text : "数量",
  103. dataIndex : "pd_outqty",
  104. editor : {
  105. xtype : "numberfield"
  106. },
  107. width : 120.0,
  108. xtype : "numbercolumn",
  109. format:'0',
  110. items : null,
  111. summaryType: 'sum'
  112. },
  113. {
  114. text : "已转数",
  115. dataIndex : "pd_yqty",
  116. editor : {
  117. xtype : "numberfield"
  118. },
  119. width : 120.0,
  120. xtype : "numbercolumn",
  121. format:'0',
  122. items : null,
  123. summaryType: 'sum'
  124. },
  125. {
  126. text : "单价",
  127. editor : {
  128. xtype : "numberfield"
  129. },
  130. format:'0,000.00',
  131. dataIndex : "pd_price",
  132. width : 120.0,
  133. xtype : "numbercolumn",
  134. items : null,
  135. summaryType: 'sum'
  136. },
  137. {
  138. text : "税率",
  139. editor : {
  140. xtype : "numberfield"
  141. },
  142. dataIndex : "pd_taxrate",
  143. width : 120.0,
  144. xtype : "numbercolumn",
  145. items : null
  146. },
  147. {
  148. text : "未税金额",
  149. dataIndex : "pd_taxtotal",
  150. xtype : "numbercolumn"
  151. },
  152. {
  153. text : "销售单明细id",
  154. dataIndex : "pd_sdid",
  155. width : 120.0,
  156. flex : 1.0,
  157. hidden:true
  158. },{
  159. text : "销售单单号",
  160. dataIndex : "pd_sdid",
  161. width : 120.0,
  162. flex : 1.0
  163. },{
  164. text : "销售序号",
  165. dataIndex : "pd_sdid",
  166. width : 120.0,
  167. flex : 1.0
  168. }
  169. ]
  170. }, {
  171. format : "Y-m-d",
  172. xtype : "datefield",
  173. name : "createTime",
  174. bind : "{createTime}",
  175. fieldLabel : "创建时间",
  176. allowBlank : true,
  177. columnWidth : 0.25
  178. }, {
  179. xtype : "datefield",
  180. name : "updateTime",
  181. bind : "{updateTime}",
  182. fieldLabel : "更新时间",
  183. allowBlank : true,
  184. columnWidth : 0.25
  185. }, {
  186. xtype : "textfield",
  187. readOnly : true,
  188. editable : false,
  189. name : "pu_status",
  190. bind : "{pi_status}",
  191. fieldLabel : "单据状态",
  192. allowBlank : true,
  193. columnWidth : 0.25
  194. }, {
  195. xtype : "hidden",
  196. readOnly : true,
  197. editable : false,
  198. name : "pi_statuscode",
  199. bind : "{pi_statuscode}",
  200. fieldLabel : "单据状态码",
  201. allowBlank : true,
  202. columnWidth : 0.0
  203. }]
  204. });