ProdinoutCountController.js 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  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. xtype: 'numbercolumn',
  75. align:'end'
  76. },{
  77. "text": "类型",
  78. "dataIndex": "pr_kind",
  79. "width": 100,
  80. },{
  81. "text": "型号",
  82. "dataIndex": "pr_orispeccode",
  83. "width": 100,
  84. },{
  85. "text": "品牌",
  86. "dataIndex": "pr_brand",
  87. "width": 100,
  88. },{
  89. "text": "供应商",
  90. "dataIndex": "pr_vendname",
  91. "width": 100,
  92. },{
  93. "text": "最小包装",
  94. "dataIndex": "pr_zxbzs",
  95. "width": 100,
  96. xtype: 'numbercolumn',
  97. align:'end'
  98. },{
  99. "text": "L/T",
  100. "dataIndex": "pr_leadtime",
  101. "width": 100,
  102. }]
  103. }) ;
  104. }
  105. },
  106. 'dbfindtrigger[name=wh_description]':{
  107. beforerender:function(f){
  108. Ext.apply(f,{
  109. conditionCode:'wh_code',
  110. dataUrl:'/api/document/warehouse/list',
  111. addXtype: 'other-storeinformation',
  112. addTitle: '仓库资料',
  113. dbfinds:[{
  114. from:'id',to:'id',ignore:true
  115. }, {
  116. from:'wh_code',to:'wh_code'
  117. }, {
  118. from:'wh_description',to:'wh_description'
  119. }],
  120. dbtpls:[{
  121. field:'wh_code',width:100
  122. },{
  123. field:'wh_description',width:100
  124. }],
  125. defaultCondition: "wh_statuscode='OPEN'",
  126. dbSearchFields:[{
  127. emptyText:'输入物料编号、名称或规格',
  128. xtype : "textfield",
  129. name : "search",
  130. width: 200,
  131. getCondition: function(v) {
  132. return "(upper(wh_code) like '%" + v.toUpperCase()+"%' or upper(wh_description) like '%"+v.toUpperCase()+"%')";
  133. },
  134. allowBlank : true,
  135. columnWidth : 0.25
  136. }],
  137. dbColumns:[{
  138. "text": "仓库ID",
  139. "flex": 0,
  140. "dataIndex": "id",
  141. "width": 0,
  142. "xtype": "",
  143. "items": null
  144. },{
  145. "text": "仓库编号",
  146. "flex": 1,
  147. "dataIndex": "wh_code",
  148. "width": 100,
  149. "xtype": "",
  150. "items": null
  151. }, {
  152. "text": "仓库名称",
  153. "flex": 1,
  154. "dataIndex": "wh_description",
  155. "xtype": "",
  156. "items": null
  157. }, {
  158. "text": "仓库类型",
  159. "flex": 0,
  160. "dataIndex": "wh_type",
  161. "width": 200,
  162. "xtype": "",
  163. "items": null
  164. }, {
  165. "text": "仓库状态",
  166. "flex": 0,
  167. "dataIndex": "wh_status",
  168. "width": 200,
  169. "xtype": "",
  170. "items": null
  171. }]
  172. }) ;
  173. }
  174. }
  175. });
  176. }
  177. });