QueryPanelController.js 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  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. xtype: 'numbercolumn',
  74. }, {
  75. "text": "承付天数",
  76. "flex": 1,
  77. "dataIndex": "cu_promisedays",
  78. align: 'end',
  79. xtype: 'numbercolumn',
  80. "width": 100
  81. }, {
  82. "text": "额度",
  83. "flex": 1,
  84. "dataIndex": "cu_credit",
  85. "width": 100,
  86. xtype: 'numbercolumn',
  87. }, {
  88. "text": "客户地址",
  89. "flex": 1,
  90. "dataIndex": "ca_address",
  91. "width": 250
  92. }]
  93. }) ;
  94. }
  95. },
  96. //放大镜赋值关系 以及 tpl模板
  97. 'dbfindtrigger[name=or_bankname]':{
  98. beforerender:function(f){
  99. Ext.apply(f,{
  100. dataUrl:'/api/document/bankinformation/list',
  101. dbfinds:[{
  102. from:'bk_bankcode',to:'or_bankcode'
  103. },{
  104. from:'bk_bankname',to:'or_bankname'
  105. },{
  106. from:'id',to:'or_bankid'
  107. }],
  108. dbtpls:[{
  109. field:'bk_bankcode',width:100
  110. },{
  111. field:'bk_bankname',width:100
  112. }],
  113. dbColumns:[{
  114. "text": "账户ID",
  115. "flex": 0,
  116. "dataIndex": "id",
  117. "width": 0,
  118. "xtype": ""
  119. },{
  120. "text": "账户编号",
  121. "flex": 1,
  122. "dataIndex": "bk_bankcode",
  123. "width": 120,
  124. "xtype": ""
  125. }, {
  126. "text": "账户名称",
  127. "flex": 1,
  128. "dataIndex": "bk_bankname",
  129. "width": 150,
  130. "xtype": ""
  131. }, {
  132. "text": "账户类型",
  133. "flex": 1,
  134. "dataIndex": "bk_type",
  135. "width": 120,
  136. "xtype": ""
  137. }, {
  138. "text": "账户余额",
  139. "flex": 1,
  140. "dataIndex": "bk_thisamount",
  141. "width": 120,
  142. xtype: 'numbercolumn',
  143. }, {
  144. "text": "建帐日期",
  145. "flex": 1,
  146. "dataIndex": "bk_date",
  147. "width": 120,
  148. "xtype": "datecolumn"
  149. }]
  150. }) ;
  151. }
  152. }
  153. });
  154. }
  155. });