ProdinoutCountController.js 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. Ext.define('saas.view.stock.report.ProdinoutCountController', {
  2. extend: 'saas.view.core.report.ReportPanelController',
  3. alias: 'controller.stock-report-prodinoutCount',
  4. init: function (form) {
  5. this.control({
  6. //放大镜赋值关系 以及 tpl模板
  7. 'dbfindtrigger[name=pd_prodcode]':{
  8. beforerender:function(f){
  9. Ext.apply(f,{
  10. dataUrl:'/api/document/product/list',
  11. addXtype: 'document-product-formpanel',
  12. addTitle: '物料资料',
  13. dbfinds:[
  14. {
  15. from:'pr_code',to:'pd_prodcode'
  16. }, {
  17. from:'pr_detail',to:'pr_detail'
  18. }, {
  19. from:'pr_spec',to:'pr_spec'
  20. }],
  21. dbtpls:[{
  22. field:'pr_code',width:100
  23. },{
  24. field:'pr_detail',width:100
  25. }],
  26. defaultCondition: "pr_statuscode='OPEN'",
  27. dbSearchFields:[{
  28. emptyText:'输入物料编号、名称或规格',
  29. xtype : "textfield",
  30. name : "search",
  31. width: 200,
  32. getCondition: function(v) {
  33. return "(upper(pr_spec) like '%" + v.toUpperCase()+"%' or upper(pr_code) like '%"+v.toUpperCase()+"%' or upper(pr_detail) like '%"+v.toUpperCase()+"%')";
  34. },
  35. allowBlank : true,
  36. columnWidth : 0.25
  37. }],
  38. dbColumns:[{
  39. "text": "物料ID",
  40. "hidden": true,
  41. "dataIndex": "id",
  42. }, {
  43. "text": "物料编号",
  44. "dataIndex": "pr_code",
  45. "width": 200,
  46. }, {
  47. "text": "物料名称",
  48. "width": 200,
  49. "dataIndex": "pr_detail",
  50. }, {
  51. "text": "规格",
  52. "dataIndex": "pr_spec",
  53. "width": 100,
  54. }, {
  55. "text": "单位",
  56. "dataIndex": "pr_unit",
  57. "width": 100,
  58. },{
  59. "text": "仓库id",
  60. "dataIndex": "pr_whid",
  61. "hidden": true,
  62. },{
  63. "text": "仓库编号",
  64. "dataIndex": "pr_whcode",
  65. "hidden": true,
  66. },{
  67. "text": "仓库",
  68. "dataIndex": "pr_whname",
  69. "width": 200,
  70. },{
  71. "text": "总库存数",
  72. "dataIndex": "po_onhand",
  73. "width": 100,
  74. align:'right'
  75. },{
  76. "text": "类型",
  77. "dataIndex": "pr_kind",
  78. "width": 100,
  79. },{
  80. "text": "型号",
  81. "dataIndex": "pr_orispeccode",
  82. "width": 100,
  83. },{
  84. "text": "品牌",
  85. "dataIndex": "pr_brand",
  86. "width": 100,
  87. },{
  88. "text": "供应商",
  89. "dataIndex": "pr_vendname",
  90. "width": 100,
  91. },{
  92. "text": "最小包装",
  93. "dataIndex": "pr_zxbzs",
  94. "width": 100,
  95. align:'right'
  96. },{
  97. "text": "L/T",
  98. "dataIndex": "pr_leadtime",
  99. "width": 100,
  100. }]
  101. }) ;
  102. }
  103. },
  104. 'dbfindtrigger[name=wh_description]':{
  105. beforerender:function(f){
  106. Ext.apply(f,{
  107. conditionCode:'wh_code',
  108. dataUrl:'/api/document/warehouse/list',
  109. addXtype: 'other-storeinformation',
  110. addTitle: '仓库资料',
  111. dbfinds:[{
  112. from:'id',to:'id',ignore:true
  113. }, {
  114. from:'wh_code',to:'wh_code'
  115. }, {
  116. from:'wh_description',to:'wh_description'
  117. }],
  118. dbtpls:[{
  119. field:'wh_code',width:100
  120. },{
  121. field:'wh_description',width:100
  122. }],
  123. defaultCondition: "wh_statuscode='OPEN'",
  124. dbSearchFields:[{
  125. emptyText:'输入物料编号、名称或规格',
  126. xtype : "textfield",
  127. name : "search",
  128. width: 200,
  129. getCondition: function(v) {
  130. return "(upper(wh_code) like '%" + v.toUpperCase()+"%' or upper(wh_description) like '%"+v.toUpperCase()+"%')";
  131. },
  132. allowBlank : true,
  133. columnWidth : 0.25
  134. }],
  135. dbColumns:[{
  136. "text": "仓库ID",
  137. "flex": 0,
  138. "dataIndex": "id",
  139. "width": 0,
  140. "xtype": "",
  141. "items": null
  142. },{
  143. "text": "仓库编号",
  144. "flex": 1,
  145. "dataIndex": "wh_code",
  146. "width": 100,
  147. "xtype": "",
  148. "items": null
  149. }, {
  150. "text": "仓库名称",
  151. "flex": 1,
  152. "dataIndex": "wh_description",
  153. "xtype": "",
  154. "items": null
  155. }, {
  156. "text": "仓库类型",
  157. "flex": 0,
  158. "dataIndex": "wh_type",
  159. "width": 200,
  160. "xtype": "",
  161. "items": null
  162. }, {
  163. "text": "仓库状态",
  164. "flex": 0,
  165. "dataIndex": "wh_status",
  166. "width": 200,
  167. "xtype": "",
  168. "items": null
  169. }]
  170. }) ;
  171. }
  172. }
  173. });
  174. }
  175. });