BasePanel.js 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. Ext.define('saas.view.document.customer.BasePanel', {
  2. extend: 'saas.view.core.base.BasePanel',
  3. xtype: 'document-customer-basepanel',
  4. controller: 'document-customer-basepanel',
  5. viewModel: 'document-customer-basepanel',
  6. searchField:[{
  7. xtype : "remotecombo",
  8. storeUrl:basePath+'ducument/customerkind/getCombo',
  9. name : "cu_type",
  10. emptyText : "请选择客户类型",
  11. allowBlank : true,
  12. queryMode: 'local',
  13. displayField: 'display',
  14. valueField: 'value',
  15. columnWidth : 0.25,
  16. etc:{
  17. customerkind:{
  18. keyField:'id',
  19. dataField:'ck_name',
  20. reqUrl:basePath+'ducument/customerkind/save',
  21. delUrl:basePath+'ducument/customerkind/delete'
  22. }
  23. },
  24. addHandler:function(b){
  25. var form = this.ownerCmp.ownerCt.ownerCt;
  26. this.dialog = form.getController().getView().add({
  27. xtype: 'document-kind-childwin',
  28. bind: {
  29. title: '新增客户类型'
  30. },
  31. dataKind:'customerkind',
  32. belong:this.ownerCmp.etc['customerkind'],
  33. _parent:form,
  34. record:null,
  35. session: true
  36. });
  37. this.dialog.show();
  38. }
  39. }],
  40. //字段属性
  41. _formXtype:'document-customer-formpanel',
  42. _title:'客户资料',
  43. // _dataUrl:basePath+'ducument/customer/list',
  44. _batchOpenUrl:basePath+'ducument/customer/batchOpen',
  45. _batchCloseUrl:basePath+'ducument/customer/batchClose',
  46. _batchDeleteUrl:basePath+'ducument/customer/batchDelete',
  47. gridConfig: {
  48. idField: 'id',
  49. codeField: 'cu_code',
  50. dataUrl: basePath+'ducument/customer/list',
  51. columns : [{
  52. text : "客户id",
  53. width : 0,
  54. dataIndex : "id",
  55. xtype : "numbercolumn",
  56. },{
  57. text : "客户编号",
  58. width : 200.0,
  59. dataIndex : "cu_code",
  60. },
  61. {
  62. text : "客户名称",
  63. dataIndex : "cu_name",
  64. width : 120.0,
  65. },
  66. {
  67. text : "客户状态",
  68. dataIndex : "cu_status",
  69. width : 120.0,
  70. },
  71. {
  72. text : "客户UU",
  73. dataIndex : "cu_uu",
  74. width : 120.0,
  75. },
  76. {
  77. text : "默认客户地址",
  78. dataIndex : "ca_address",
  79. width : 120.0,
  80. },
  81. {
  82. text : "默认客户联系人",
  83. dataIndex : "cc_name",
  84. flex : 1.0,
  85. }]
  86. },
  87. });