FormPanelController.js 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. Ext.define('saas.view.sale.saleIn.FormPanelController', {
  2. extend: 'saas.view.core.form.FormPanelController',
  3. alias: 'controller.sale-salein-formpanel',
  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:basePath+'document/customer/list',
  12. dbfinds:[
  13. {
  14. from:'id',to:'pi_custid'
  15. },{
  16. from:'cu_code',to:'pi_custcode'
  17. },{
  18. from:'cu_name',to:'pi_custname'
  19. }],
  20. dbtpls:[
  21. {
  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": 100,
  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": 0,
  54. "dataIndex": "cu_type",
  55. "width": 200,
  56. "xtype": "",
  57. "items": null
  58. }]
  59. }) ;
  60. }
  61. },
  62. 'dbfindtrigger[name=pd_prodcode]':{
  63. beforerender:function(f){
  64. Ext.apply(f,{
  65. conditionCode:'pr_code',
  66. dataUrl:basePath+'document/product/getProductsByCondition',
  67. dbfinds:[
  68. {
  69. from:'id',to:'pd_prodid'
  70. },
  71. {
  72. from:'pr_code',to:'pd_prodcode'
  73. }, {
  74. from:'pr_detail',to:'pr_detail'
  75. }, {
  76. from:'pr_spec',to:'pr_spec'
  77. }],
  78. dbtpls:[{
  79. field:'pr_code',width:100
  80. },{
  81. field:'pr_detail',width:100
  82. }],
  83. dbColumns:[{
  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": 0,
  106. "dataIndex": "pr_spec",
  107. "width": 200,
  108. "xtype": "",
  109. "items": null
  110. }, {
  111. "text": "物料单位",
  112. "flex": 0,
  113. "dataIndex": "pr_unit",
  114. "width": 200,
  115. "xtype": "",
  116. "items": null
  117. }]
  118. }) ;
  119. }
  120. },
  121. 'dbfindtrigger[name=pd_whname]':{
  122. beforerender:function(f){
  123. Ext.apply(f,{
  124. conditionCode:'wh_code',
  125. dataUrl:basePath+'document/warehouse/list',
  126. dbfinds:[{
  127. from:'id',to:'pd_whid',
  128. }, {
  129. from:'wh_code',to:'pd_whcode'
  130. }, {
  131. from:'wh_description',to:'pd_whname'
  132. }],
  133. dbtpls:[{
  134. field:'wh_code',width:100
  135. },{
  136. field:'wh_description',width:100
  137. }],
  138. dbColumns:[{
  139. "text": "仓库ID",
  140. "flex": 0,
  141. "dataIndex": "id",
  142. "width": 0,
  143. "xtype": "",
  144. "items": null
  145. },{
  146. "text": "仓库编号",
  147. "flex": 1,
  148. "dataIndex": "wh_code",
  149. "width": 100,
  150. "xtype": "",
  151. "items": null
  152. }, {
  153. "text": "仓库名称",
  154. "flex": 1,
  155. "dataIndex": "wh_description",
  156. "xtype": "",
  157. "items": null
  158. }, {
  159. "text": "仓库类型",
  160. "flex": 0,
  161. "dataIndex": "wh_type",
  162. "width": 200,
  163. "xtype": "",
  164. "items": null
  165. }, {
  166. "text": "仓库状态",
  167. "flex": 0,
  168. "dataIndex": "wh_status",
  169. "width": 200,
  170. "xtype": "",
  171. "items": null
  172. }]
  173. }) ;
  174. }
  175. }
  176. });
  177. }
  178. });