QueryPanelController.js 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. Ext.define('saas.view.money.othreceipts.QueryPanelController', {
  2. extend: 'saas.view.core.query.QueryPanelController',
  3. alias: 'controller.money-othreceipts-querypanel',
  4. init: function (form) {
  5. var me = this;
  6. this.control({
  7. //放大镜赋值关系 以及 tpl模板
  8. 'dbfindtrigger[name=or_custname]':{
  9. beforerender:function(f){
  10. Ext.apply(f,{
  11. dataUrl:'/api/document/customer/dbfind',
  12. addXtype: 'document-customer-formpanel',
  13. addTitle: '客户资料',
  14. dbfinds:[{
  15. from:'id',to:'or_custid'
  16. },{
  17. from:'cu_code',to:'or_custcode'
  18. },{
  19. from:'cu_name',to:'or_custname'
  20. }],
  21. dbtpls:[{
  22. field:'cu_code',width:100
  23. },{
  24. field:'cu_name',width:100
  25. }],
  26. dbColumns:[
  27. {
  28. conditionCode:'id',
  29. "text": "客户ID",
  30. "flex": 0,
  31. "dataIndex": "id",
  32. "width": 0,
  33. "xtype": "",
  34. "items": null
  35. },{
  36. conditionCode:'cu_code',
  37. "text": "客户编号",
  38. "flex": 1,
  39. "dataIndex": "cu_code",
  40. "width": 100,
  41. "xtype": "",
  42. "items": null
  43. }, {
  44. conditionCode:'cu_name',
  45. "text": "客户名称",
  46. "flex": 1,
  47. "dataIndex": "cu_name",
  48. "xtype": "",
  49. "items": null
  50. }, {
  51. conditionCode:'cu_type',
  52. "text": "客户类型",
  53. "flex": 1,
  54. "dataIndex": "cu_type",
  55. "width": 200,
  56. "xtype": "",
  57. "items": null
  58. }, {
  59. "text": "业务员编号",
  60. "flex": 1,
  61. "dataIndex": "cu_sellercode",
  62. "width": 100
  63. }, {
  64. "text": "业务员",
  65. "flex": 1,
  66. "dataIndex": "cu_sellername",
  67. "width": 100
  68. }, {
  69. "text": "税率",
  70. "flex": 1,
  71. "dataIndex": "cu_taxrate",
  72. "width": 100
  73. }, {
  74. "text": "承付天数",
  75. "flex": 1,
  76. "dataIndex": "cu_promisedays",
  77. "width": 100
  78. }, {
  79. "text": "额度",
  80. "flex": 1,
  81. "dataIndex": "cu_credit",
  82. "width": 100
  83. }, {
  84. "text": "客户地址",
  85. "flex": 1,
  86. "dataIndex": "ca_address",
  87. "width": 250
  88. }]
  89. }) ;
  90. }
  91. },
  92. //放大镜赋值关系 以及 tpl模板
  93. 'dbfindtrigger[name=or_bankname]':{
  94. beforerender:function(f){
  95. Ext.apply(f,{
  96. dataUrl:'/api/document/bankinformation/list',
  97. dbfinds:[{
  98. from:'bk_bankcode',to:'or_bankcode'
  99. },{
  100. from:'bk_bankname',to:'or_bankname'
  101. },{
  102. from:'id',to:'or_bankid'
  103. }],
  104. dbtpls:[{
  105. field:'bk_bankcode',width:100
  106. },{
  107. field:'bk_bankname',width:100
  108. }],
  109. dbColumns:[{
  110. "text": "账户ID",
  111. "flex": 0,
  112. "dataIndex": "id",
  113. "width": 0,
  114. "xtype": ""
  115. },{
  116. "text": "账户编号",
  117. "flex": 1,
  118. "dataIndex": "bk_bankcode",
  119. "width": 120,
  120. "xtype": ""
  121. }, {
  122. "text": "账户名称",
  123. "flex": 1,
  124. "dataIndex": "bk_bankname",
  125. "width": 150,
  126. "xtype": ""
  127. }, {
  128. "text": "账户类型",
  129. "flex": 1,
  130. "dataIndex": "bk_type",
  131. "width": 120,
  132. "xtype": ""
  133. }, {
  134. "text": "账户余额",
  135. "flex": 1,
  136. "dataIndex": "bk_thisamount",
  137. "width": 120,
  138. "xtype": ""
  139. }, {
  140. "text": "建帐日期",
  141. "flex": 1,
  142. "dataIndex": "bk_date",
  143. "width": 120,
  144. "xtype": "datecolumn"
  145. }]
  146. }) ;
  147. }
  148. }
  149. });
  150. }
  151. });