ProdiodetailController.js 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. Ext.define('saas.view.stock.report.ProdiodetailController', {
  2. extend: 'saas.view.core.report.ReportPanelController',
  3. alias: 'controller.stock-report-prodiodetail',
  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. });
  107. }
  108. });