FormPanelController.js 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  1. Ext.define('saas.view.stock.otherIn.FormPanelController', {
  2. extend: 'saas.view.core.form.FormPanelController',
  3. alias: 'controller.stock-otherin-formpanel',
  4. init: function (form) {
  5. var me = this;
  6. this.control({
  7. //放大镜赋值关系 以及 tpl模板
  8. 'dbfindtrigger[name=pi_vendname]':{
  9. beforerender:function(f){
  10. Ext.apply(f,{
  11. dataUrl:'/api/document/vendor/list',
  12. // dataUrl:'http://localhost:9480/vendor/list',
  13. addXtype: 'document-vendor-formpanel',
  14. addTitle: '供应商资料',
  15. dbfinds:[{
  16. from:'id',to:'pi_vendid'
  17. },{
  18. from:'ve_code',to:'pi_vendcode'
  19. },{
  20. from:'ve_name',to:'pi_vendname'
  21. }],
  22. dbtpls:[{
  23. field:'ve_code',width:100
  24. },{
  25. field:'ve_name',width:100
  26. }],
  27. dbColumns:[{
  28. conditionCode:'id',
  29. "text": "供应商ID",
  30. "flex": 0,
  31. "dataIndex": "id",
  32. "width": 0,
  33. "xtype": "",
  34. "items": null
  35. },{
  36. conditionCode:'ve_code',
  37. "text": "供应商编号",
  38. "flex": 1,
  39. "dataIndex": "ve_code",
  40. "width": 100,
  41. "xtype": "",
  42. "items": null
  43. }, {
  44. conditionCode:'ve_name',
  45. "text": "供应商名称",
  46. "flex": 1,
  47. "dataIndex": "ve_name",
  48. "xtype": "",
  49. "items": null
  50. }, {
  51. conditionCode:'ve_type',
  52. "text": "供应商类型",
  53. "flex": 0,
  54. "dataIndex": "ve_type",
  55. "width": 200,
  56. "xtype": "",
  57. "items": null
  58. }]
  59. }) ;
  60. }
  61. },
  62. //放大镜赋值关系 以及 tpl模板
  63. 'dbfindtrigger[name=pi_custname]': {
  64. beforerender: function (f) {
  65. Ext.apply(f, {
  66. dataUrl: '/api/document/vendor/list',
  67. // dataUrl:'http://localhost:9480/customer/list',
  68. dbfinds: [{
  69. from: 'id',
  70. to: 'pi_custid'
  71. }, {
  72. from: 'cu_code',
  73. to: 'pi_custcode'
  74. }, {
  75. from: 'cu_name',
  76. to: 'pi_custname'
  77. }],
  78. dbtpls: [{
  79. field: 'pi_custcode',
  80. width: 100
  81. }, {
  82. field: 'pi_custname',
  83. width: 100
  84. }],
  85. dbColumns: [{
  86. conditionCode: 'id',
  87. "text": "客户ID",
  88. "flex": 0,
  89. "dataIndex": "id",
  90. "width": 0,
  91. "xtype": "",
  92. "items": null
  93. }, {
  94. conditionCode: 'cu_code',
  95. "text": "客户编号",
  96. "flex": 1,
  97. "dataIndex": "cu_code",
  98. "width": 100,
  99. "xtype": "",
  100. "items": null
  101. }, {
  102. conditionCode: 'cu_name',
  103. "text": "客户名称",
  104. "flex": 1,
  105. "dataIndex": "cu_name",
  106. "xtype": "",
  107. "items": null
  108. }]
  109. });
  110. }
  111. },
  112. //放大镜赋值关系 以及 tpl模板
  113. 'multidbfindtrigger[name=pd_prodcode]': {
  114. beforerender: function (f) {
  115. Ext.apply(f, {
  116. dataUrl: '/api/document/product/list',
  117. // dataUrl:'http://localhost:9480/product/list',
  118. addXtype: 'document-product-formpanel',
  119. addTitle: '物料资料',
  120. dbfinds: [{
  121. from: 'id',
  122. to: 'pd_prodid'
  123. }, {
  124. from: 'pr_code',
  125. to: 'pd_prodcode'
  126. }, {
  127. from: 'pr_detail',
  128. to: 'pr_detail'
  129. }, {
  130. from: 'pr_spec',
  131. to: 'pr_spec'
  132. }],
  133. dbtpls: [{
  134. field: 'pr_code',
  135. width: 100
  136. }, {
  137. field: 'pr_detail',
  138. width: 100
  139. }, {
  140. field: 'pr_spec',
  141. width: 100
  142. }],
  143. dbColumns: [{
  144. "text": "物料ID",
  145. "flex": 0,
  146. "dataIndex": "pr_id",
  147. "width": 0,
  148. "xtype": "",
  149. "items": null
  150. }, {
  151. "text": "物料编号",
  152. "flex": 1,
  153. "dataIndex": "pr_code",
  154. "width": 100,
  155. "xtype": "",
  156. "items": null
  157. }, {
  158. "text": "物料名称",
  159. "flex": 1,
  160. "dataIndex": "pr_detail",
  161. "xtype": "",
  162. "items": null
  163. }, {
  164. "text": "物料规格",
  165. "flex": 0,
  166. "dataIndex": "pr_spec",
  167. "width": 200,
  168. "xtype": "",
  169. "items": null
  170. }, {
  171. "text": "物料单位",
  172. "flex": 0,
  173. "dataIndex": "pr_unit",
  174. "width": 200,
  175. "xtype": "",
  176. "items": null
  177. }]
  178. });
  179. }
  180. },
  181. //放大镜赋值关系 以及 tpl模板
  182. 'dbfindtrigger[name=pd_whname]': {
  183. beforerender: function (f) {
  184. Ext.apply(f, {
  185. dataUrl: '/api/document/warehouse/list',
  186. // dataUrl:'http://localhost:9480/warehouse/list',
  187. addXtype: 'other-warehouse',
  188. addTitle: '仓库资料',
  189. dbfinds: [{
  190. from: 'id',
  191. to: 'pd_whid'
  192. }, {
  193. from: 'wh_code',
  194. to: 'pd_whcode'
  195. }, {
  196. from: 'wh_description',
  197. to: 'pd_whname'
  198. }],
  199. dbtpls: [{
  200. field: 'pd_whcode',
  201. width: 100
  202. }, {
  203. field: 'pd_whname',
  204. width: 100
  205. }],
  206. dbColumns: [{
  207. "text": "仓库ID",
  208. "flex": 0,
  209. "dataIndex": "id",
  210. "width": 0,
  211. "xtype": "",
  212. "items": null
  213. }, {
  214. "text": "仓库编号",
  215. "flex": 1,
  216. "dataIndex": "wh_code",
  217. "width": 100,
  218. "xtype": "",
  219. "items": null
  220. }, {
  221. "text": "仓库名称",
  222. "flex": 1,
  223. "dataIndex": "wh_description",
  224. "xtype": "",
  225. "items": null
  226. }, ]
  227. });
  228. },
  229. },
  230. });
  231. }
  232. });