FormPanelController.js 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  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:'/api/document/customer/list',
  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. 'dbfindtrigger[name=pd_prodcode]':{
  65. beforerender:function(f){
  66. Ext.apply(f,{
  67. dataUrl:'/api/document/product/list',
  68. addXtype: 'document-product-formpanel',
  69. addTitle: '物料资料',
  70. dbfinds:[
  71. {
  72. from:'id',to:'pd_prodid'
  73. },
  74. {
  75. from:'pr_code',to:'pd_prodcode'
  76. }, {
  77. from:'pr_detail',to:'pr_detail'
  78. }, {
  79. from:'pr_spec',to:'pr_spec'
  80. }],
  81. dbtpls:[{
  82. field:'pr_code',width:100
  83. },{
  84. field:'pr_detail',width:100
  85. }],
  86. dbColumns:[{
  87. "text": "物料ID",
  88. "flex": 0,
  89. "dataIndex": "id",
  90. "width": 0,
  91. "xtype": "",
  92. "items": null
  93. },{
  94. "text": "物料编号",
  95. "flex": 1,
  96. "dataIndex": "pr_code",
  97. "width": 100,
  98. "xtype": "",
  99. "items": null
  100. }, {
  101. "text": "物料名称",
  102. "flex": 1,
  103. "dataIndex": "pr_detail",
  104. "xtype": "",
  105. "items": null
  106. }, {
  107. "text": "物料规格",
  108. "flex": 0,
  109. "dataIndex": "pr_spec",
  110. "width": 200,
  111. "xtype": "",
  112. "items": null
  113. }, {
  114. "text": "物料单位",
  115. "flex": 0,
  116. "dataIndex": "pr_unit",
  117. "width": 200,
  118. "xtype": "",
  119. "items": null
  120. }]
  121. }) ;
  122. }
  123. },
  124. 'dbfindtrigger[name=pd_whname]':{
  125. beforerender:function(f){
  126. Ext.apply(f,{
  127. dataUrl:'/api/document/warehouse/list',
  128. addXtype: 'other-storeinformation',
  129. addTitle: '仓库资料',
  130. dbfinds:[{
  131. from:'id',to:'pd_whid',
  132. }, {
  133. from:'wh_code',to:'pd_whcode'
  134. }, {
  135. from:'wh_description',to:'pd_whname'
  136. }],
  137. dbtpls:[{
  138. field:'wh_code',width:100
  139. },{
  140. field:'wh_description',width:100
  141. }],
  142. dbColumns:[{
  143. "text": "仓库ID",
  144. "flex": 0,
  145. "dataIndex": "id",
  146. "width": 0,
  147. "xtype": "",
  148. "items": null
  149. },{
  150. "text": "仓库编号",
  151. "flex": 1,
  152. "dataIndex": "wh_code",
  153. "width": 100,
  154. "xtype": "",
  155. "items": null
  156. }, {
  157. "text": "仓库名称",
  158. "flex": 1,
  159. "dataIndex": "wh_description",
  160. "xtype": "",
  161. "items": null
  162. }, {
  163. "text": "仓库类型",
  164. "flex": 0,
  165. "dataIndex": "wh_type",
  166. "width": 200,
  167. "xtype": "",
  168. "items": null
  169. }, {
  170. "text": "仓库状态",
  171. "flex": 0,
  172. "dataIndex": "wh_status",
  173. "width": 200,
  174. "xtype": "",
  175. "items": null
  176. }]
  177. }) ;
  178. }
  179. }
  180. });
  181. }
  182. });