QueryPanelController.js 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. Ext.define('saas.view.sale.saleout.QueryPanelController', {
  2. extend: 'saas.view.core.query.QueryPanelController',
  3. alias: 'controller.sale-saleout-querypanel',
  4. init: function (form) {
  5. var me = this;
  6. this.control({
  7. //放大镜赋值关系 以及 tpl模板
  8. 'dbfindtrigger[name=pi_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. {
  16. from:'id',to:'pi_custid'
  17. },{
  18. from:'cu_code',to:'pi_custcode'
  19. },{
  20. from:'cu_name',to:'pi_custname'
  21. },{
  22. from:'ca_address',to:'pi_address'
  23. }],
  24. dbtpls:[
  25. {
  26. field:'cu_code',width:100
  27. },{
  28. field:'cu_name',width:100
  29. }],
  30. dbColumns:[
  31. {
  32. conditionCode:'id',
  33. "text": "客户ID",
  34. "flex": 0,
  35. "dataIndex": "id",
  36. "width": 0,
  37. "xtype": "",
  38. "items": null
  39. },{
  40. conditionCode:'cu_code',
  41. "text": "客户编号",
  42. "flex": 1,
  43. "dataIndex": "cu_code",
  44. "width": 100,
  45. "xtype": "",
  46. "items": null
  47. }, {
  48. conditionCode:'cu_name',
  49. "text": "客户名称",
  50. "flex": 1,
  51. "dataIndex": "cu_name",
  52. "xtype": "",
  53. "items": null
  54. }, {
  55. conditionCode:'cu_type',
  56. "text": "客户类型",
  57. "flex": 1,
  58. "dataIndex": "cu_type",
  59. "width": 200,
  60. "xtype": "",
  61. "items": null
  62. }, {
  63. "text": "业务员编号",
  64. "flex": 1,
  65. "dataIndex": "cu_sellercode",
  66. "width": 100
  67. }, {
  68. "text": "业务员",
  69. "flex": 1,
  70. "dataIndex": "cu_sellername",
  71. "width": 100
  72. }, {
  73. "text": "税率",
  74. "flex": 1,
  75. "dataIndex": "cu_taxrate",
  76. "width": 100
  77. }, {
  78. "text": "承付天数",
  79. "flex": 1,
  80. "dataIndex": "cu_promisedays",
  81. "width": 100
  82. }, {
  83. "text": "额度",
  84. "flex": 1,
  85. "dataIndex": "cu_credit",
  86. "width": 100
  87. }, {
  88. "text": "客户地址",
  89. "flex": 1,
  90. "dataIndex": "ca_address",
  91. "width": 250
  92. }]
  93. }) ;
  94. }
  95. },
  96. 'dbfindtrigger[name=pd_prodcode]':{
  97. beforerender:function(f){
  98. Ext.apply(f,{
  99. conditionCode:'pr_code',
  100. dataUrl:'/api/document/product/list',
  101. addXtype: 'document-product-formpanel',
  102. addTitle: '物料资料',
  103. dbfinds:[{
  104. from:'pr_code',to:'pd_prodcode'
  105. }, {
  106. from:'pr_detail',to:'pr_detail'
  107. }],
  108. dbtpls:[
  109. {
  110. field:'pr_code',width:100
  111. },{
  112. field:'pr_detail',width:100
  113. }],
  114. defaultCondition: "pr_statuscode='OPEN'",
  115. dbSearchFields:[{
  116. emptyText:'输入物料编号、名称或规格',
  117. xtype : "textfield",
  118. name : "search",
  119. width: 200,
  120. getCondition: function(v) {
  121. return "(upper(pr_spec) like '%" + v.toUpperCase()+"%' or upper(pr_code) like '%"+v.toUpperCase()+"%' or upper(pr_detail) like '%"+v.toUpperCase()+"%')";
  122. },
  123. allowBlank : true,
  124. columnWidth : 0.25
  125. }],
  126. dbColumns:[{
  127. "text": "物料ID",
  128. "hidden": true,
  129. "dataIndex": "id",
  130. }, {
  131. "text": "物料编号",
  132. "dataIndex": "pr_code",
  133. "width": 200,
  134. }, {
  135. "text": "物料名称",
  136. "width": 200,
  137. "dataIndex": "pr_detail",
  138. }, {
  139. "text": "规格",
  140. "dataIndex": "pr_spec",
  141. "width": 100,
  142. }, {
  143. "text": "单位",
  144. "dataIndex": "pr_spec",
  145. "width": 100,
  146. },{
  147. "text": "仓库id",
  148. "dataIndex": "pr_whid",
  149. "hidden": true,
  150. },{
  151. "text": "仓库编号",
  152. "dataIndex": "pr_whcode",
  153. "hidden": true,
  154. },{
  155. "text": "仓库",
  156. "dataIndex": "pr_whname",
  157. "width": 200,
  158. },{
  159. "text": "总库存数",
  160. "dataIndex": "po_onhand",
  161. "width": 100,
  162. },{
  163. "text": "类型",
  164. "dataIndex": "pr_kind",
  165. "width": 100,
  166. },{
  167. "text": "型号",
  168. "dataIndex": "pr_orispeccode",
  169. "width": 100,
  170. },{
  171. "text": "品牌",
  172. "dataIndex": "pr_brand",
  173. "width": 100,
  174. },{
  175. "text": "供应商",
  176. "dataIndex": "pr_vendname",
  177. "width": 100,
  178. },{
  179. "text": "最小包装",
  180. "dataIndex": "pr_zxbzs",
  181. "width": 100,
  182. },{
  183. "text": "L/T",
  184. "dataIndex": "pr_leadtime",
  185. "width": 100,
  186. }]
  187. }) ;
  188. }
  189. }
  190. });
  191. }
  192. });