QueryPanelController.js 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. Ext.define('saas.view.stock.appropriationInOut.QueryPanelController', {
  2. extend: 'saas.view.core.query.QueryPanelController',
  3. alias: 'controller.stock-appropriationinout-querypanel',
  4. init: function (form) {
  5. var me = this;
  6. this.control({
  7. //放大镜赋值关系 以及 tpl模板
  8. 'dbfindtrigger[name=pu_vendname]':{
  9. beforerender:function(f){
  10. Ext.apply(f,{
  11. dataUrl:'/api/document/vendor/list',
  12. addXtype: 'document-vendor-formpanel',
  13. addTitle: '供应商资料',
  14. dbfinds:[{
  15. from:'ve_code',to:'pu_vendcode'
  16. },{
  17. from:'ve_name',to:'pu_vendname'
  18. }],
  19. dbtpls:[{
  20. field:'ve_code',width:100
  21. },{
  22. field:'ve_name',width:100
  23. }],
  24. defaultCondition: "ve_statuscode='OPEN'",
  25. dbSearchFields:[{
  26. emptyText:'输入供应商编号或名称',
  27. xtype : "textfield",
  28. name : "search",
  29. getCondition: function(v) {
  30. return "(upper(ve_code) like '%"+v.toUpperCase()+"%' or upper(ve_name) like '%"+v.toUpperCase()+"%')";
  31. },
  32. allowBlank : true,
  33. columnWidth : 0.25
  34. }],
  35. dbColumns:[{
  36. conditionCode:'ve_id',
  37. "text": "供应商ID",
  38. "hidden": true,
  39. "dataIndex": "ve_id",
  40. "width": 0,
  41. "xtype": "",
  42. "items": null
  43. },{
  44. conditionCode:'ve_code',
  45. "text": "供应商编号",
  46. "flex": 1,
  47. "dataIndex": "ve_code",
  48. "width": 100,
  49. "xtype": "",
  50. "items": null
  51. }, {
  52. conditionCode:'ve_name',
  53. "text": "供应商名称",
  54. "flex": 1,
  55. "dataIndex": "ve_name",
  56. "xtype": "",
  57. "items": null
  58. }, {
  59. conditionCode:'ve_type',
  60. "text": "供应商类型",
  61. "flex": 0,
  62. "dataIndex": "ve_type",
  63. "width": 200,
  64. "xtype": "",
  65. "items": null
  66. }]
  67. }) ;
  68. }
  69. },
  70. //放大镜赋值关系 以及 tpl模板
  71. 'dbfindtrigger[name=pd_prodcode]':{
  72. beforerender:function(f){
  73. Ext.apply(f,{
  74. dataUrl:'/api/document/product/list',
  75. addXtype: 'document-product-formpanel',
  76. addTitle: '物料资料',
  77. dbfinds:[{
  78. from:'pr_code',to:'pd_prodcode',
  79. from:'pr_unit',to:'pd_unit'
  80. }],
  81. dbtpls:[{
  82. field:'pr_code',width:100
  83. },{
  84. field:'pr_detail',width:100
  85. }],
  86. defaultCondition: "pr_statuscode='OPEN'",
  87. dbSearchFields:[{
  88. emptyText:'输入物料编号、名称或规格',
  89. xtype : "textfield",
  90. name : "search",
  91. width: 200,
  92. getCondition: function(v) {
  93. return "(upper(pr_spec) like '%" + v.toUpperCase()+"%' or upper(pr_code) like '%"+v.toUpperCase()+"%' or upper(pr_detail) like '%"+v.toUpperCase()+"%')";
  94. },
  95. allowBlank : true,
  96. columnWidth : 0.25
  97. }],
  98. dbColumns:[{
  99. "text": "物料ID",
  100. "hidden": true,
  101. "dataIndex": "id",
  102. },{
  103. "text": "物料ID",
  104. "flex": 0,
  105. "dataIndex": "pr_id",
  106. "width": 0,
  107. "xtype": "",
  108. "items": null
  109. },{
  110. "text": "物料编号",
  111. "flex": 1,
  112. "dataIndex": "pr_code",
  113. "width": 100,
  114. "xtype": "",
  115. "items": null
  116. }, {
  117. "text": "物料名称",
  118. "flex": 1,
  119. "dataIndex": "pr_detail",
  120. "xtype": "",
  121. "items": null
  122. }, {
  123. "text": "物料规格",
  124. "flex": 0,
  125. "dataIndex": "pr_spec",
  126. "width": 200,
  127. "xtype": "",
  128. "items": null
  129. }, {
  130. "text": "物料单位",
  131. "flex": 0,
  132. "dataIndex": "pr_unit",
  133. "width": 200,
  134. "xtype": "",
  135. "items": null
  136. }]
  137. }) ;
  138. }
  139. }
  140. });
  141. }
  142. });