| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138 |
- Ext.define('saas.view.document.customer.BasePanel', {
- extend: 'saas.view.core.base.BasePanel',
- xtype: 'document-customer-basepanel',
- controller: 'document-customer-basepanel',
- viewModel: 'document-customer-basepanel',
- deleteMoreMsg: '删除的客户资料将不能恢复,请确认是否删除?',
- deleteOneMsg: '删除的客户资料将不能恢复,请确认是否删除?',
- searchField:[{
- xtype : "textfield",
- name : "cu_code",
- width:200,
- emptyText:'请输入客户编号或名称',
- getCondition: function (v) {
- return "(upper(CONCAT(cu_code,'#',cu_name)) like '%" + v.toUpperCase() + "%' )";
- }
- }, {
- xtype : "remotecombo",
- storeUrl:'/api/document/customerkind/getCombo',
- name : "cu_type",
- fieldLabel : "客户类型",
- emptyText: '全部',
- hiddenBtn:true
- }, {
- xtype : "employeeDbfindTrigger",
- name : "cu_sellername",
- fieldLabel:'业务员',
- emptyText: '输入人员编号或姓名',
- },{
- xtype: 'combobox',
- name: 'cu_statuscode',
- queryMode: 'local',
- displayField: 'cu_status',
- valueField: 'cu_statuscode',
- fieldLabel :'状态',
- emptyText: '全部',
- editable:false,
- store: Ext.create('Ext.data.ArrayStore', {
- fields: ['cu_statuscode', 'cu_status'],
- data: [
- ["ALL", "全部"],
- ["ENABLE", "已启用"],
- ["BANNED", "已禁用"]
- ]
- }),
- getCondition: function(value) {
- if(value == 'ALL'||value==null) {
- return '1=1';
- }else {
- return 'cu_statuscode=\'' + value + '\'';
- }
- }
- }],
- //字段属性
- caller:'Customer',
- _formXtype:'document-customer-formpanel',
- _title:'客户资料',
- _deleteUrl:'/api/document/customer/delete',
- _batchOpenUrl:'/api/document/customer/batchOpen',
- _batchCloseUrl:'/api/document/customer/batchClose',
- _batchDeleteUrl:'/api/document/customer/batchDelete',
- gridConfig: {
- idField: 'id',
- codeField: 'cu_code',
- statusCodeField:'cu_statuscode',
- dataUrl: '/api/document/customer/list',
- caller: 'Customer',
- columns : [
- {
- text : "客户id",
- hidden:true,
- dataIndex : "id",
- xtype : "numbercolumn",
- },{
- text : "客户编号",
- width : 150.0,
- dataIndex : "cu_code"
- },{
- text : "客户简称",
- width : 150.0,
- dataIndex : "cu_shortname",
- hidden: true
- },
- {
- text : "客户名称",
- width : 250.0,
- dataIndex : "cu_name"
- }, {
- text : "状态",
- dataIndex : "cu_status",
- width : 80.0
- }, {
- text : "类型",
- dataIndex : "cu_type",
- width : 100.0
- }, {
- text : "税率(%)",
- dataIndex : "cu_taxrate",
- xtype: 'numbercolumn',
- width : 80.0,
- renderer : function(v) {
- return saas.util.BaseUtil.numberFormat(v, 2, false);
- }
- }, {
- text : "结算天数",
- xtype: 'numbercolumn',
- dataIndex : "cu_promisedays",
- renderer : function(v) {
- return Ext.util.Format.number(v, '0');
- }
- }, {
- text: '应收余额',
- xtype: 'numbercolumn',
- dataIndex: 'cu_leftamount',
- width: 120,
- renderer : function(v) {
- return saas.util.BaseUtil.numberFormat(v, 2, true);
- }
- }, {
- text : "业务员",
- dataIndex : "cu_sellername",
- width: 110
- }, {
- text : "备注",
- dataIndex : "cu_remark",
- width: 250
- }]
- },
- refresh:function(){
- this.items.items[0].store.load()
- }
- });
|