QueryPanelController.js 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276
  1. Ext.define('saas.view.money.recBalance.QueryPanelController', {
  2. extend: 'saas.view.core.query.QueryPanelController',
  3. alias: 'controller.money-recbalance-querypanel',
  4. init: function (form) {
  5. var me = this;
  6. this.control({
  7. //放大镜赋值关系 以及 tpl模板
  8. 'dbfindtrigger[name=rd_bankname]':{
  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. xtype: 'numbercolumn',
  59. }, {
  60. "text": "承付天数",
  61. "dataIndex": "ve_promisedays",
  62. "width": 100,
  63. xtype: 'numbercolumn',
  64. align: 'end',
  65. renderer : function(v) {
  66. return Ext.util.Format.number(v, '0');
  67. }
  68. }, {
  69. "text": "纳税人识别号",
  70. "dataIndex": "ve_bankaccount",
  71. "width": 150
  72. }, {
  73. "text": "开户银行",
  74. "dataIndex": "ve_bankaccount",
  75. "width": 100
  76. }, {
  77. "text": "银行账户",
  78. "dataIndex": "ve_bankcode",
  79. "width": 100
  80. }]
  81. }) ;
  82. }
  83. },
  84. //放大镜赋值关系 以及 tpl模板
  85. 'dbfindtrigger[name=pd_prodcode]':{
  86. beforerender:function(f){
  87. Ext.apply(f,{
  88. conditionCode:'pr_code',
  89. dataUrl: '/api/document/product/list',
  90. addXtype: 'document-product-formpanel',
  91. addTitle: '物料资料',
  92. dbfinds:[{
  93. from:'pr_code',to:'pd_prodcode',
  94. }, {
  95. from:'pr_detail',to:'pr_detail'
  96. }],
  97. dbtpls:[{
  98. field:'pr_code',width:100
  99. },{
  100. field:'pr_detail',width:100
  101. }],
  102. defaultCondition: "pr_statuscode='OPEN'",
  103. dbSearchFields:[{
  104. emptyText:'输入物料编号、名称或规格',
  105. xtype : "textfield",
  106. name : "search",
  107. width: 200,
  108. getCondition: function(v) {
  109. return "(upper(pr_spec) like '%" + v.toUpperCase()+"%' or upper(pr_code) like '%"+v.toUpperCase()+"%' or upper(pr_detail) like '%"+v.toUpperCase()+"%')";
  110. },
  111. allowBlank : true,
  112. columnWidth : 0.25
  113. }],
  114. dbColumns:[{
  115. "text": "物料ID",
  116. "hidden": true,
  117. "dataIndex": "id",
  118. }, {
  119. "text": "物料编号",
  120. "dataIndex": "pr_code",
  121. "width": 200,
  122. }, {
  123. "text": "物料名称",
  124. "width": 200,
  125. "dataIndex": "pr_detail",
  126. }, {
  127. "text": "规格",
  128. "dataIndex": "pr_spec",
  129. "width": 100,
  130. }, {
  131. "text": "单位",
  132. "dataIndex": "pr_spec",
  133. "width": 100,
  134. },{
  135. "text": "仓库id",
  136. "dataIndex": "pr_whid",
  137. "hidden": true,
  138. },{
  139. "text": "仓库编号",
  140. "dataIndex": "pr_whcode",
  141. "hidden": true,
  142. },{
  143. "text": "仓库",
  144. "dataIndex": "pr_whname",
  145. "width": 200,
  146. },{
  147. "text": "总库存数",
  148. "dataIndex": "po_onhand",
  149. "width": 100,
  150. xtype: 'numbercolumn',
  151. align: 'end'
  152. },{
  153. "text": "类型",
  154. "dataIndex": "pr_kind",
  155. "width": 100,
  156. },{
  157. "text": "型号",
  158. "dataIndex": "pr_orispeccode",
  159. "width": 100,
  160. },{
  161. "text": "品牌",
  162. "dataIndex": "pr_brand",
  163. "width": 100,
  164. },{
  165. "text": "供应商",
  166. "dataIndex": "pr_vendname",
  167. "width": 100,
  168. },{
  169. "text": "最小包装",
  170. "dataIndex": "pr_zxbzs",
  171. "width": 100,
  172. xtype: 'numbercolumn',
  173. },{
  174. "text": "L/T",
  175. "dataIndex": "pr_leadtime",
  176. "width": 100,
  177. }]
  178. }) ;
  179. }
  180. },
  181. 'dbfindtrigger[name=rb_custname]':{
  182. beforerender:function(f){
  183. Ext.apply(f,{
  184. //数据接口
  185. dataUrl: '/api/document/customer/list',
  186. addXtype: 'document-customer-formpanel',
  187. addTitle: '客户资料',
  188. //赋值
  189. dbfinds:[{
  190. from: 'id', to: 'rb_custid'
  191. }, {
  192. from:'cu_code', to:'rb_custcode'
  193. },{
  194. from:'cu_name', to:'rb_custname'
  195. },{
  196. from:'cu_leftamount', to:'cu_leftamount'
  197. }],
  198. //联想设置
  199. dbtpls:[{
  200. field:'cu_code',width:100
  201. },{
  202. field:'cu_name',width:100
  203. },{
  204. field:'cu_leftamount',width:100
  205. }],
  206. defaultCondition: 'cu_statuscode="OPEN"',
  207. dbSearchFields:[{
  208. emptyText:'输入客户编号或名称',
  209. xtype : "textfield",
  210. name : "search",
  211. getCondition: function(v) {
  212. return "(upper(cu_code) like '%"+v.toUpperCase()+"%' or upper(cu_name) like '%"+v.toUpperCase()+"%')";
  213. },
  214. allowBlank : true,
  215. columnWidth : 0.25
  216. }],
  217. //放大镜窗口列表
  218. dbColumns:[{
  219. "text": "客户ID",
  220. "hidden": true,
  221. "dataIndex": "id",
  222. },{
  223. "text": "客户编号",
  224. "dataIndex": "cu_code",
  225. "width": 200,
  226. }, {
  227. "text": "客户名称",
  228. "dataIndex": "cu_name",
  229. "width": 200
  230. },{
  231. "text": "客户类型",
  232. "dataIndex": "cu_name",
  233. "width": 100
  234. },{
  235. "text": "业务员",
  236. "dataIndex": "cu_sellername",
  237. "width": 100
  238. },{
  239. "text": "应收款余额",
  240. "dataIndex": "cu_leftamount",
  241. "width": 100,
  242. xtype: 'numbercolumn',
  243. align:'end'
  244. },{
  245. "text": "税率",
  246. "dataIndex": "cu_taxrate",
  247. "width": 100,
  248. xtype: 'numbercolumn',
  249. align:'end'
  250. },{
  251. "text": "承付天数",
  252. "dataIndex": "cu_promisedays",
  253. "width": 100,
  254. xtype: 'numbercolumn',
  255. align:'end',
  256. renderer : function(v) {
  257. return Ext.util.Format.number(v, '0');
  258. }
  259. },{
  260. "text": "额度",
  261. "dataIndex": "cu_credit",
  262. "width": 100,
  263. xtype: 'numbercolumn',
  264. align:'end'
  265. }]
  266. }) ;
  267. }
  268. },
  269. });
  270. }
  271. });