QueryPanelController.js 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
  1. Ext.define('saas.view.money.paybalance.QueryPanelController', {
  2. extend: 'saas.view.core.query.QueryPanelController',
  3. alias: 'controller.money-paybalance-querypanel',
  4. init: function (form) {
  5. var me = this;
  6. this.control({
  7. //放大镜赋值关系 以及 tpl模板
  8. 'dbfindtrigger[name=pb_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_name',to:'pb_vendname'
  16. }],
  17. dbtpls:[{
  18. field:'ve_code',width:100
  19. },{
  20. field:'ve_name',width:100
  21. }],
  22. defaultCondition: "ve_statuscode='OPEN'",
  23. dbSearchFields:[{
  24. emptyText:'输入供应商编号或名称',
  25. xtype : "textfield",
  26. name : "search",
  27. getCondition: function(v) {
  28. return "(upper(ve_code) like '%"+v.toUpperCase()+"%' or upper(ve_name) like '%"+v.toUpperCase()+"%')";
  29. },
  30. allowBlank : true,
  31. columnWidth : 0.25
  32. }],
  33. dbColumns:[{
  34. "text": "供应商ID",
  35. "hidden": true,
  36. "dataIndex": "id",
  37. "width": 100,
  38. "xtype": "numbercolumn"
  39. },{
  40. "text": "供应商编号",
  41. "dataIndex": "ve_code",
  42. "width": 200
  43. }, {
  44. "text": "供应商名称",
  45. "dataIndex": "ve_name",
  46. "width": 200
  47. }, {
  48. "text": "供应商类型",
  49. "dataIndex": "ve_type",
  50. "width": 180,
  51. "items": null
  52. }, {
  53. "text": "税率",
  54. "dataIndex": "ve_taxrate",
  55. "width": 100
  56. }, {
  57. "text": "承付天数",
  58. "dataIndex": "ve_promisedays",
  59. "width": 100,
  60. xtype: 'numbercolumn',
  61. align: 'end',
  62. renderer : function(v) {
  63. return Ext.util.Format.number(v, '0');
  64. }
  65. }, {
  66. "text": "纳税人识别号",
  67. "dataIndex": "ve_bankaccount",
  68. "width": 150
  69. }, {
  70. "text": "开户银行",
  71. "dataIndex": "ve_bankaccount",
  72. "width": 100
  73. }, {
  74. "text": "银行账户",
  75. "dataIndex": "ve_bankcode",
  76. "width": 100
  77. }]
  78. }) ;
  79. }
  80. },
  81. //放大镜赋值关系 以及 tpl模板
  82. 'dbfindtrigger[name=pd_prodcode]':{
  83. beforerender:function(f){
  84. Ext.apply(f,{
  85. conditionCode:'pr_code',
  86. dataUrl:'/api/document/product/list',
  87. addXtype: 'document-product-formpanel',
  88. addTitle: '物料资料',
  89. dbfinds:[{
  90. from:'pr_code',to:'pd_prodcode',
  91. }, {
  92. from:'pr_detail',to:'pr_detail'
  93. }],
  94. dbtpls:[{
  95. field:'pr_code',width:100
  96. },{
  97. field:'pr_detail',width:100
  98. }],
  99. defaultCondition: "pr_statuscode='OPEN'",
  100. dbSearchFields:[{
  101. emptyText:'输入物料编号、名称或规格',
  102. xtype : "textfield",
  103. name : "search",
  104. width: 200,
  105. getCondition: function(v) {
  106. return "(upper(pr_spec) like '%" + v.toUpperCase()+"%' or upper(pr_code) like '%"+v.toUpperCase()+"%' or upper(pr_detail) like '%"+v.toUpperCase()+"%')";
  107. },
  108. allowBlank : true,
  109. columnWidth : 0.25
  110. }],
  111. dbColumns:[{
  112. "text": "物料ID",
  113. "hidden": true,
  114. "dataIndex": "id",
  115. }, {
  116. "text": "物料编号",
  117. "dataIndex": "pr_code",
  118. "width": 200,
  119. }, {
  120. "text": "物料名称",
  121. "width": 200,
  122. "dataIndex": "pr_detail",
  123. }, {
  124. "text": "规格",
  125. "dataIndex": "pr_spec",
  126. "width": 100,
  127. }, {
  128. "text": "单位",
  129. "dataIndex": "pr_spec",
  130. "width": 100,
  131. },{
  132. "text": "仓库id",
  133. "dataIndex": "pr_whid",
  134. "hidden": true,
  135. },{
  136. "text": "仓库编号",
  137. "dataIndex": "pr_whcode",
  138. "hidden": true,
  139. },{
  140. "text": "仓库",
  141. "dataIndex": "pr_whname",
  142. "width": 200,
  143. },{
  144. "text": "总库存数",
  145. "dataIndex": "po_onhand",
  146. "width": 100,
  147. xtype: 'numbercolumn',
  148. align: 'end'
  149. },{
  150. "text": "类型",
  151. "dataIndex": "pr_kind",
  152. "width": 100,
  153. },{
  154. "text": "型号",
  155. "dataIndex": "pr_orispeccode",
  156. "width": 100,
  157. },{
  158. "text": "品牌",
  159. "dataIndex": "pr_brand",
  160. "width": 100,
  161. },{
  162. "text": "供应商",
  163. "dataIndex": "pr_vendname",
  164. "width": 100,
  165. },{
  166. "text": "最小包装",
  167. "dataIndex": "pr_zxbzs",
  168. "width": 100,
  169. xtype: 'numbercolumn',
  170. },{
  171. "text": "L/T",
  172. "dataIndex": "pr_leadtime",
  173. "width": 100,
  174. }]
  175. }) ;
  176. }
  177. },
  178. 'dbfindtrigger[name=pd_bankname]':{
  179. beforerender: function (f) {
  180. Ext.apply(f, {
  181. dataUrl: '/api/document/bankinformation/list',
  182. addXtype: 'other-bankinformation',
  183. addTitle: '资金账户',
  184. dbfinds: [{
  185. from: 'id',
  186. to: 'pd_bankid',ignore:true
  187. }, {
  188. from: 'bk_bankcode',
  189. to: 'pd_bankcode'
  190. },{
  191. from: 'bk_bankname',
  192. to: 'pd_bankname'
  193. }],
  194. dbtpls: [{
  195. field: 'bk_bankcode',
  196. width: 100
  197. }, {
  198. field: 'bk_bankname',
  199. width: 100
  200. }],
  201. otherConditon:'',
  202. dbSearchFields: [{
  203. emptyText: '查找资金账户',
  204. xtype: "textfield",
  205. name: "search",
  206. getCondition: function (v) {
  207. return "(upper(bk_bankcode) like '%"+v.toUpperCase()+"%' or upper(bk_bankname) like '%"+v.toUpperCase()+"%')";
  208. },
  209. allowBlank: true,
  210. columnWidth: 0.25
  211. }],
  212. dbColumns: [{
  213. "text": "账户ID",
  214. "flex": 0,
  215. "dataIndex": "id",
  216. "width": 0,
  217. "xtype": ""
  218. }, {
  219. "text": "资金账户",
  220. "flex": 1,
  221. "dataIndex": "bk_bankcode",
  222. "width": 120,
  223. "xtype": ""
  224. }, {
  225. "text": "账户名称",
  226. "flex": 1,
  227. "dataIndex": "bk_bankname",
  228. "width": 150,
  229. "xtype": ""
  230. }, {
  231. "text": "账户类别",
  232. "flex": 1,
  233. "dataIndex": "bk_type",
  234. "width": 120,
  235. "xtype": ""
  236. }, {
  237. "text": "账户余额",
  238. "flex": 1,
  239. "dataIndex": "bk_thisamount",
  240. "width": 120,
  241. xtype: 'numbercolumn',
  242. }, {
  243. "text": "建帐日期",
  244. "flex": 1,
  245. "dataIndex": "bk_date",
  246. "width": 120,
  247. "xtype": "datecolumn"
  248. }]
  249. });
  250. }
  251. }
  252. });
  253. }
  254. });