QueryPanelController.js 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264
  1. Ext.define('saas.view.stock.otherOut.QueryPanelController', {
  2. extend: 'saas.view.core.query.QueryPanelController',
  3. alias: 'controller.stock-otherout-querypanel',
  4. init: function (form) {
  5. var me = this;
  6. this.control({
  7. // 供应商名称
  8. 'dbfindtrigger[name=pi_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_code',to:'pi_vendname'
  16. },{
  17. from:'ve_name',to:'pi_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 : "ve_name",
  29. allowBlank : true,
  30. columnWidth : 0.25,
  31. getCondition:function(v){
  32. return "(upper(ve_name) like '%"+v.toUpperCase()+"%' or upper(ve_code) like '%"+v.toUpperCase()+"%')";
  33. }
  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. align: 'end'
  60. }, {
  61. "text": "承付天数",
  62. "dataIndex": "ve_promisedays",
  63. "width": 100,
  64. xtype: 'numbercolumn',
  65. align: 'end'
  66. }, {
  67. "text": "纳税人识别号",
  68. "dataIndex": "ve_bankaccount",
  69. "width": 150
  70. }, {
  71. "text": "开户银行",
  72. "dataIndex": "ve_bankaccount",
  73. "width": 100
  74. }, {
  75. "text": "银行账户",
  76. "dataIndex": "ve_bankcode",
  77. "width": 100
  78. }]
  79. }) ;
  80. }
  81. },
  82. // 物料名称
  83. 'dbfindtrigger[name=pr_detail]':{
  84. beforerender:function(f){
  85. Ext.apply(f,{
  86. conditionCode:'pr_code',
  87. dataUrl:'/api/document/product/list',
  88. addXtype: 'document-product-formpanel',
  89. addTitle: '物料资料',
  90. dbfinds:[{
  91. from:'pr_detail',to:'pr_detail',
  92. },{
  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. align: 'end'
  174. },{
  175. "text": "L/T",
  176. "dataIndex": "pr_leadtime",
  177. "width": 100,
  178. }]
  179. }) ;
  180. }
  181. },
  182. 'dbfindtrigger[name=pi_custname]': {
  183. beforerender: function (f) {
  184. Ext.apply(f, {
  185. addXtype: 'document-customer-formpanel',
  186. addTitle: '客户资料',
  187. dataUrl: '/api/document/customer/list',
  188. // dataUrl:'http://localhost:9480/customer/list',
  189. dbfinds: [{
  190. from: 'id',to: 'pi_custid',ignore:true
  191. }, {
  192. from: 'cu_code',to: 'pi_custcode'
  193. }, {
  194. from: 'cu_name',to: 'pi_custname'
  195. }],
  196. dbtpls: [{
  197. field: 'cu_code',
  198. width: 100
  199. }, {
  200. field: 'cu_name',
  201. width: 100
  202. }],
  203. defaultCondition:"cu_statuscode='OPEN'",
  204. //放大镜窗口字段
  205. dbSearchFields:[{
  206. emptyText:'输入客户编号或名称',
  207. xtype : "textfield",
  208. name : "cu_name",
  209. allowBlank : true,
  210. columnWidth : 0.25,
  211. getCondition:function(v){
  212. return "(upper(cu_name) like '%"+v.toUpperCase()+"%' or upper(cu_code) like '%"+v.toUpperCase()+"%')";
  213. }
  214. }],
  215. dbColumns:[{
  216. "text": "客户ID",
  217. "hidden": true,
  218. "dataIndex": "id",
  219. },{
  220. "text": "客户编号",
  221. "dataIndex": "cu_code",
  222. "width": 200,
  223. }, {
  224. "text": "客户名称",
  225. "dataIndex": "cu_name",
  226. "width": 200
  227. },{
  228. "text": "客户类型",
  229. "dataIndex": "cu_name",
  230. "width": 100
  231. },{
  232. "text": "业务员",
  233. "dataIndex": "cu_sellername",
  234. "width": 100
  235. },{
  236. "text": "税率",
  237. "dataIndex": "cu_taxrate",
  238. "width": 100,
  239. xtype: 'numbercolumn',
  240. align:'end'
  241. },{
  242. "text": "承付天数",
  243. "dataIndex": "cu_promisedays",
  244. "width": 100,
  245. xtype: 'numbercolumn',
  246. align:'end'
  247. },{
  248. "text": "额度",
  249. "dataIndex": "cu_credit",
  250. "width": 100,
  251. xtype: 'numbercolumn',
  252. align:'end'
  253. }]
  254. });
  255. }
  256. },
  257. });
  258. }
  259. });