FormPanelController.js 9.5 KB

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