BasePanel.js 2.8 KB

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