QueryPanelController.js 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. Ext.define('saas.view.sale.saleIn.QueryPanelController', {
  2. extend: 'saas.view.core.query.QueryPanelController',
  3. alias: 'controller.sale-salein-querypanel',
  4. init: function (form) {
  5. var me = this;
  6. this.control({
  7. // 客户名称
  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. dbtpls:[
  23. {
  24. field:'cu_code',width:100
  25. },{
  26. field:'cu_name',width:100
  27. }],
  28. dbColumns:[
  29. {
  30. conditionCode:'id',
  31. "text": "客户ID",
  32. "flex": 0,
  33. "dataIndex": "id",
  34. "width": 100,
  35. "xtype": "",
  36. "items": null
  37. },{
  38. conditionCode:'cu_code',
  39. "text": "客户编号",
  40. "flex": 1,
  41. "dataIndex": "cu_code",
  42. "width": 100,
  43. "xtype": "",
  44. "items": null
  45. }, {
  46. conditionCode:'cu_name',
  47. "text": "客户名称",
  48. "flex": 1,
  49. "dataIndex": "cu_name",
  50. "xtype": "",
  51. "items": null
  52. }, {
  53. conditionCode:'cu_type',
  54. "text": "客户类型",
  55. "flex": 0,
  56. "dataIndex": "cu_type",
  57. "width": 200,
  58. "xtype": "",
  59. "items": null
  60. }]
  61. }) ;
  62. }
  63. },
  64. // 物料编号
  65. 'dbfindtrigger[name=pd_prodcode]':{
  66. beforerender:function(f){
  67. Ext.apply(f,{
  68. dataUrl:'/api/document/product/list',
  69. addXtype: 'document-product-formpanel',
  70. addTitle: '物料资料',
  71. dbfinds:[{
  72. from:'pr_code',to:'pd_prodcode'
  73. }, {
  74. from:'pr_detail',to:'pr_detail'
  75. }],
  76. dbtpls:[
  77. {
  78. field:'pr_code',width:100
  79. },{
  80. field:'pr_detail',width:100
  81. }],
  82. dbColumns:[
  83. {
  84. "text": "物料ID",
  85. "flex": 0,
  86. "dataIndex": "id",
  87. "width": 0,
  88. "xtype": "",
  89. "items": null
  90. },{
  91. "text": "物料编号",
  92. "flex": 1,
  93. "dataIndex": "pr_code",
  94. "width": 100,
  95. "xtype": "",
  96. "items": null
  97. }, {
  98. "text": "物料名称",
  99. "flex": 1,
  100. "dataIndex": "pr_detail",
  101. "xtype": "",
  102. "items": null
  103. }, {
  104. "text": "规格",
  105. "flex": 1,
  106. "dataIndex": "pr_spec",
  107. "width": 200,
  108. "xtype": "",
  109. "items": null
  110. }, {
  111. "text": "单位",
  112. "flex": 1,
  113. "dataIndex": "pr_unit",
  114. "width": 200,
  115. "xtype": "",
  116. "items": null
  117. }, {
  118. "text": "品牌",
  119. "flex": 1,
  120. "dataIndex": "pr_brand",
  121. "width": 200,
  122. "xtype": "",
  123. "items": null
  124. }, {
  125. "text": "供应商ID",
  126. "flex": 0,
  127. "dataIndex": "pr_vendid",
  128. "width": 0,
  129. "xtype": "",
  130. "items": null
  131. }, {
  132. "text": "供应商编号",
  133. "flex": 1,
  134. "dataIndex": "pr_vendcode",
  135. "width": 200,
  136. "xtype": "",
  137. "items": null
  138. }, {
  139. "text": "供应商名称",
  140. "flex": 1,
  141. "dataIndex": "pr_vendname",
  142. "width": 200,
  143. "xtype": "",
  144. "items": null
  145. }, {
  146. "text": "最小包装量",
  147. "flex": 1,
  148. "dataIndex": "pr_zxbzs",
  149. "width": 200,
  150. "xtype": "",
  151. "items": null
  152. }]
  153. }) ;
  154. }
  155. }
  156. });
  157. }
  158. });