ProdiodetailController.js 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. Ext.define('saas.view.stock.report.ProdiodetailController', {
  2. extend: 'saas.view.core.report.ReportPanelController',
  3. alias: '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. 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. });
  105. }
  106. });