FormPanel.js 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  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. viewName: 'stock-otherin-formpanel',
  7. caller:'OtherIn',
  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. // _relationColumn: 'pd_piid',
  21. // _readUrl:'http://localhost:9000/prodinout/read/',
  22. // _saveUrl:'http://localhost:9000/prodinout/save',
  23. // _auditUrl:'http://localhost:9000/prodinout/audit',
  24. // _deleteUrl:'http://localhost:9000/prodinout/delete/',
  25. // _baseVastUrl:'http://localhost:9000/prodinout/',
  26. initId:0,
  27. toolBtns: [],
  28. defaultItems: [{
  29. xtype: 'hidden',
  30. name: 'id',
  31. fieldLabel: 'id',
  32. columnWidth: 0
  33. },{
  34. xtype : "textfield",
  35. name : "pi_class",
  36. fieldLabel : "单据类型",
  37. readOnly:true,
  38. allowBlank : false,
  39. defaultValue:'其它入库单'
  40. },{
  41. xtype : "hidden",
  42. name : "pi_total",
  43. fieldLabel : "单据金额"
  44. }, {
  45. name : "detailGridField",
  46. xtype : "detailGridField",
  47. storeModel:'saas.model.document.ProductDTO',
  48. _detnoColumn: 'pd_pdno',
  49. columns : [
  50. {
  51. text : "id",
  52. dataIndex : "id",
  53. xtype : "numbercolumn",
  54. hidden:true
  55. },{
  56. text : "pd_piid",
  57. dataIndex : "pd_piid",
  58. xtype : "numbercolumn",
  59. hidden:true
  60. },{
  61. text : "物料id",
  62. dataIndex : "pd_prodid",
  63. xtype : "numbercolumn"
  64. },{
  65. text : "物料编号",
  66. width : 200.0,
  67. dataIndex : "pd_prodcode",
  68. xtype : "",
  69. items : null,
  70. editor : {
  71. displayField : "display",
  72. editable : true,
  73. format : "",
  74. hideTrigger : false,
  75. maxLength : 100.0,
  76. minValue : null,
  77. positiveNum : false,
  78. queryMode : "local",
  79. store : null,
  80. valueField : "value",
  81. xtype : "dbfindtrigger"
  82. }
  83. },
  84. {
  85. text : "名称",
  86. dataIndex : "pr_detail",
  87. ignore:true,
  88. renderer: function (v, m, r) {
  89. return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:'';
  90. }
  91. },
  92. {
  93. text : "规格",
  94. dataIndex : "pr_spec",
  95. ignore:true,
  96. renderer: function (v, m, r) {
  97. return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:'';
  98. }
  99. },
  100. {
  101. text : "单位",
  102. dataIndex : "pr_unit",
  103. ignore:true,
  104. renderer: function (v, m, r) {
  105. return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:'';
  106. }
  107. },
  108. {
  109. text : "数量",
  110. dataIndex : "pd_inqty",
  111. editor : {
  112. xtype : "numberfield"
  113. },
  114. width : 120.0,
  115. xtype : "numbercolumn",
  116. format:'0',
  117. items : null,
  118. summaryType: 'sum'
  119. },
  120. {
  121. text : "已转数",
  122. dataIndex : "pd_yqty",
  123. editor : {
  124. xtype : "numberfield"
  125. },
  126. width : 120.0,
  127. xtype : "numbercolumn",
  128. format:'0',
  129. items : null,
  130. summaryType: 'sum'
  131. },
  132. {
  133. text : "单价",
  134. editor : {
  135. xtype : "numberfield"
  136. },
  137. format:'0,000.00',
  138. dataIndex : "pd_price",
  139. width : 120.0,
  140. xtype : "numbercolumn",
  141. items : null,
  142. summaryType: 'sum'
  143. },
  144. {
  145. text : "税率",
  146. editor : {
  147. xtype : "numberfield"
  148. },
  149. dataIndex : "pd_taxrate",
  150. width : 120.0,
  151. xtype : "numbercolumn",
  152. items : null
  153. },
  154. {
  155. text : "未税金额",
  156. dataIndex : "pd_taxtotal",
  157. xtype : "numbercolumn"
  158. },
  159. {
  160. text : "销售单明细id",
  161. dataIndex : "pd_sdid",
  162. width : 120.0,
  163. flex : 1.0,
  164. hidden:true
  165. },{
  166. text : "销售单单号",
  167. dataIndex : "pd_sdid",
  168. width : 120.0,
  169. flex : 1.0
  170. },{
  171. text : "销售序号",
  172. dataIndex : "pd_sdid",
  173. width : 120.0,
  174. flex : 1.0
  175. }
  176. ]
  177. },{
  178. xtype : "textfield",
  179. name : "pi_recordman",
  180. fieldLabel : "录入人",
  181. readOnly:true,
  182. }, {
  183. format : "Y-m-d",
  184. xtype : "datefield",
  185. name : "createTime",
  186. fieldLabel : "创建时间"
  187. }, {
  188. xtype : "textfield",
  189. name : "pi_auditman",
  190. fieldLabel : "过账人"
  191. }, {
  192. format : "Y-m-d",
  193. xtype : "datefield",
  194. name : "pi_auditman",
  195. fieldLabel : "过账时间"
  196. }]
  197. });