QueryPanelController.js 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. Ext.define('saas.view.stock.otherIn.QueryPanelController', {
  2. extend: 'saas.view.core.query.QueryPanelController',
  3. alias: 'controller.stock-otherin-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. "text": "供应商ID",
  37. "hidden": true,
  38. "dataIndex": "id",
  39. "width": 100,
  40. "xtype": "numbercolumn"
  41. },{
  42. "text": "供应商编号",
  43. "flex": 1,
  44. "dataIndex": "ve_code",
  45. "width": 100
  46. }, {
  47. "text": "供应商名称",
  48. "flex": 1,
  49. "dataIndex": "ve_name",
  50. "width": 100
  51. }, {
  52. "text": "供应商类型",
  53. "flex": 0,
  54. "dataIndex": "ve_type",
  55. "width": 200,
  56. "items": null
  57. }, {
  58. "text": "税率",
  59. "flex": 1,
  60. "dataIndex": "ve_taxrate",
  61. "width": 100
  62. }, {
  63. "text": "承付天数",
  64. "flex": 1,
  65. "dataIndex": "ve_promisedays",
  66. "width": 100
  67. }, {
  68. "text": "纳税人识别号",
  69. "flex": 1,
  70. "dataIndex": "ve_bankaccount",
  71. "width": 100
  72. }, {
  73. "text": "开户银行",
  74. "flex": 1,
  75. "dataIndex": "ve_bankaccount",
  76. "width": 100
  77. }, {
  78. "text": "银行账户",
  79. "flex": 1,
  80. "dataIndex": "ve_bankcode",
  81. "width": 100
  82. }]
  83. }) ;
  84. }
  85. },
  86. //放大镜赋值关系 以及 tpl模板
  87. 'dbfindtrigger[name=pd_prodcode]':{
  88. beforerender:function(f){
  89. Ext.apply(f,{
  90. conditionCode:'pr_code',
  91. dataUrl:'/api/document/product/list',
  92. addXtype: 'document-product-formpanel',
  93. addTitle: '物料资料',
  94. dbfinds:[{
  95. from:'pr_code',to:'pd_prodcode',
  96. from:'pr_unit',to:'pd_unit'
  97. }],
  98. dbtpls:[{
  99. field:'pr_code',width:100
  100. },{
  101. field:'pr_detail',width:100
  102. }],
  103. defaultCondition: "pr_statuscode='OPEN'",
  104. dbSearchFields:[{
  105. emptyText:'输入物料编号、名称或规格',
  106. xtype : "textfield",
  107. name : "search",
  108. width: 200,
  109. getCondition: function(v) {
  110. return "(upper(pr_spec) like '%" + v.toUpperCase()+"%' or upper(pr_code) like '%"+v.toUpperCase()+"%' or upper(pr_detail) like '%"+v.toUpperCase()+"%')";
  111. },
  112. allowBlank : true,
  113. columnWidth : 0.25
  114. }],
  115. dbColumns:[{
  116. "text": "物料ID",
  117. "hidden": true,
  118. "dataIndex": "pr_id",
  119. "width": 0,
  120. "xtype": "",
  121. "items": null
  122. },{
  123. "text": "物料编号",
  124. "flex": 1,
  125. "dataIndex": "pr_code",
  126. "width": 100,
  127. "xtype": "",
  128. "items": null
  129. }, {
  130. "text": "物料名称",
  131. "flex": 1,
  132. "dataIndex": "pr_detail",
  133. "xtype": "",
  134. "items": null
  135. }, {
  136. "text": "物料规格",
  137. "flex": 0,
  138. "dataIndex": "pr_spec",
  139. "width": 200,
  140. "xtype": "",
  141. "items": null
  142. }, {
  143. "text": "物料单位",
  144. "flex": 0,
  145. "dataIndex": "pr_unit",
  146. "width": 200,
  147. "xtype": "",
  148. "items": null
  149. }]
  150. }) ;
  151. }
  152. }
  153. });
  154. }
  155. });