BasePanel.js 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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+'document/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+'document/customerkind/save',
  21. delUrl:basePath+'document/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+'document/customer/batchOpen',
  45. _batchCloseUrl:basePath+'document/customer/batchClose',
  46. _batchDeleteUrl:basePath+'document/customer/batchDelete',
  47. gridConfig: {
  48. idField: 'id',
  49. codeField: 'cu_code',
  50. statusCodeField:'cu_statuscode',
  51. dataUrl: basePath+'document/customer/list',
  52. columns : [{
  53. text : "客户id",
  54. width : 0,
  55. dataIndex : "id",
  56. xtype : "numbercolumn",
  57. },{
  58. text : "客户编号",
  59. width : 200.0,
  60. dataIndex : "cu_code",
  61. },
  62. {
  63. text : "客户名称",
  64. dataIndex : "cu_name",
  65. width : 120.0,
  66. },
  67. {
  68. text : "客户状态",
  69. dataIndex : "cu_status",
  70. width : 120.0,
  71. },
  72. {
  73. text : "客户状态码",
  74. dataIndex : "cu_statuscode",
  75. width : 0,
  76. },
  77. {
  78. text : "客户UU",
  79. dataIndex : "cu_uu",
  80. width : 120.0,
  81. },
  82. {
  83. text : "默认客户地址",
  84. dataIndex : "ca_address",
  85. width : 120.0,
  86. },
  87. {
  88. text : "默认客户联系人",
  89. dataIndex : "cc_name",
  90. flex : 1.0,
  91. }]
  92. },
  93. });