B2CSetting.js 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  1. Ext.define('erp.view.b2c.B2CSetting',{
  2. extend: 'Ext.Viewport',
  3. layout: 'anchor',
  4. hideBorders: true,
  5. initComponent : function(){
  6. var me = this;
  7. Ext.apply(me, {
  8. items: [{
  9. id:'form',
  10. xtype: 'form',
  11. anchor: '100% 100%',
  12. bodyStyle: 'background: #f1f1f1;',
  13. bodyPadding:5,
  14. autoScroll: true,
  15. scrollable: true,
  16. buttonAlign:'center',
  17. /*dockedItems: [{
  18. xtype: 'toolbar',
  19. dock: 'top',
  20. padding:'8 5 8 20',
  21. items: [
  22. '->', {
  23. xtype: 'button',
  24. text: '启 用',
  25. id :'startB2C',
  26. name:'startB2C',
  27. iconCls: 'x-button-icon-delete',
  28. cls: 'x-btn-gray',
  29. width: 90,
  30. scale : 'medium'
  31. },'->'
  32. ]
  33. }],*/
  34. items:[{
  35. xtype: 'checkbox',
  36. boxLabel: '启用优软商城',
  37. name: 'startCheck',
  38. id: 'startCheck',
  39. checked: 0,
  40. margin: '4 8 4 8'
  41. },{
  42. html: '<span>--勾选启用优软商城,系统会进行商城启用必填项数据设置和检测</span>' ,
  43. bodyStyle: 'background: #f1f1f1;border:none',
  44. margin:'0 5 20 40'
  45. },{
  46. xtype: "form",
  47. anchor: '100% 10%',
  48. hidden: true,
  49. bodyStyle: 'background: #f1f1f1;border:none',
  50. items:[{
  51. id:'tips',
  52. html:'<span style="color: gray;">提示信息</span>',
  53. bodyStyle: 'background: #f1f1f1;border:none',
  54. margin:'0 3 3 30'
  55. }]
  56. },{
  57. xtype: 'fieldset',
  58. title: '优软商城客户设置',
  59. defaults: {
  60. labelWidth:150,
  61. margin:'5 5 2 5'
  62. },
  63. layout: 'anchor',
  64. items:[{
  65. layout: 'hbox',
  66. bodyStyle: 'background: #f1f1f1;border:none',
  67. defaults: {
  68. labelWidth:150,
  69. labelAlign:'right',
  70. margin:'5 5 2 5'
  71. },
  72. items: [{
  73. xtype: 'dbfindtrigger',
  74. fieldLabel: '客户编号',
  75. allowBlank:false,
  76. id:'b2ccusomter',
  77. name:'b2ccusomter',
  78. width:350,
  79. dbCaller:'Sale',
  80. triggerName:'sa_custcode',
  81. listeners:{
  82. aftertrigger:function(t, d){
  83. t.ownerCt.down('textfield[name=b2ccusomter]').setValue(d.get('cu_code'));
  84. t.ownerCt.down('textfield[name=b2ccusomtername]').setValue(d.get('cu_name'));
  85. }
  86. }
  87. },{
  88. xtype: 'textfield',
  89. allowBlank:false,
  90. id:'b2ccusomtername',
  91. name:'b2ccusomtername',
  92. width:200,
  93. readOnly:true
  94. },{
  95. xtype: 'button',
  96. text: '新增',
  97. id:'newCustomer',
  98. iconCls: 'x-button-icon-add',
  99. cls: 'x-btn-gray'
  100. }]
  101. },{
  102. html: '<span>【优软商城客户】指平台生成的销售订单 用户确认接收后 在UAS系统产生的销售订单所取的客户信息</span>' ,
  103. bodyStyle: 'background: #f1f1f1;border:none',
  104. margin:'0 5 20 50'
  105. }]
  106. },{
  107. xtype: 'fieldset',
  108. title: '优软商城供应商设置',
  109. defaults: {
  110. labelWidth:150,
  111. margin:'5 5 2 5'
  112. },
  113. layout: 'anchor',
  114. items:[{
  115. xtype: 'fieldcontainer',
  116. defaults: {
  117. labelWidth:150,
  118. labelAlign:'right',
  119. margin:'5 5 2 5'
  120. },
  121. layout: 'hbox',
  122. items: [{
  123. xtype: 'dbfindtrigger',
  124. fieldLabel: '供应商编号',
  125. allowBlank:false,
  126. id:'b2cvendor',
  127. name:'b2cvendor',
  128. width:350,
  129. dbCaller:'Purchase',
  130. triggerName:'pu_vendcode',
  131. listeners:{
  132. aftertrigger:function(t, d){
  133. t.ownerCt.down('textfield[name=b2cvendor]').setValue(d.get('ve_code'));
  134. t.ownerCt.down('textfield[name=b2cvendorname]').setValue(d.get('ve_name'));
  135. }
  136. }
  137. },{
  138. xtype: 'textfield',
  139. allowBlank:false,
  140. id:'b2cvendorname',
  141. name:'b2cvendorname',
  142. width:200,
  143. readOnly:true
  144. },{
  145. xtype: 'button',
  146. text: '新增',
  147. id:'newVendor',
  148. iconCls: 'x-button-icon-add',
  149. cls: 'x-btn-gray'
  150. }]
  151. },{
  152. html: '<span>【优软商城供应商】指平台购买生成的采购订单在UAS系统产生的采购订单所取的供应商信息</span>' ,
  153. bodyStyle: 'background: #f1f1f1;border:none;margin:3 3 3 3;',
  154. margin:'0 5 20 40'
  155. }]
  156. },{
  157. xtype: 'fieldset',
  158. title: '优软商城销售类型设置',
  159. defaults: {
  160. labelWidth:150,
  161. margin:'5 5 2 5'
  162. },
  163. layout: 'anchor',
  164. items:[{
  165. xtype: 'fieldcontainer',
  166. defaults: {
  167. labelWidth:150,
  168. labelAlign:'right',
  169. margin:'5 5 5 5'
  170. },
  171. layout: 'hbox',
  172. items: [{
  173. xtype: 'dbfindtrigger',
  174. fieldLabel: '销售类型编号',
  175. id:'b2csalekind',
  176. name:'b2csalekind',
  177. width:350,
  178. dbCaller:'Sale',
  179. triggerName:'sa_kind',
  180. listeners:{
  181. aftertrigger:function(t, d){
  182. t.ownerCt.down('textfield[name=b2csalekind]').setValue(d.get('sk_code'));
  183. t.ownerCt.down('textfield[name=b2csalekindname]').setValue(d.get('sk_name'));
  184. }
  185. }
  186. },{
  187. xtype: 'textfield',
  188. allowBlank:false,
  189. id:'b2csalekindname',
  190. name:'b2csalekindname',
  191. width:200,
  192. readOnly:true
  193. }]
  194. },{
  195. html: '<span>【优软商城销售类型】指平台生成的销售订单 用户确认接收后 在UAS系统产生的销售订单所取的销售订单类型</span>' ,
  196. bodyStyle: 'background: #f1f1f1;border:none;margin:3 3 3 3;',
  197. margin:'0 5 20 40'
  198. }]
  199. }],
  200. buttons: [{
  201. text: '保存',
  202. id:'save',
  203. name:'save',
  204. /* formBind: true, //only enabled once the form is valid
  205. disabled: true,*/
  206. height:30,
  207. handler: function() {
  208. var form = this.up('form').getForm();
  209. /* if (form.isValid()) {
  210. form.submit({
  211. success: function(form, action) {
  212. Ext.Msg.alert('保存成功', action.result.msg);
  213. },
  214. failure: function(form, action) {
  215. Ext.Msg.alert('操作失败', action.result.msg);
  216. }
  217. });
  218. }*/
  219. }
  220. }]
  221. }]
  222. });
  223. me.callParent(arguments);
  224. }
  225. });