QueryPanelController.js 7.6 KB

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