| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136 |
- 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_name",
- width:150,
- emptyText:'客户编号或名称',
- getCondition: function(value) {
- return ' (cu_code like\'%' + value + '%\''
- +' or cu_name like \'%'+value+'%\' ) ';
- }
- },{
- xtype : "remotecombo",
- storeUrl:'/api/document/customerkind/getCombo',
- name : "cu_type",
- emptyText : "类型",
- width:110,
- hiddenBtn:true
- },{
- xtype: 'combobox',
- name: 'cu_statuscode',
- queryMode: 'local',
- displayField: 'cu_status',
- valueField: 'cu_statuscode',
- emptyText :'状态',
- editable:false,
- width:90,
- store: Ext.create('Ext.data.ArrayStore', {
- fields: ['cu_statuscode', 'cu_status'],
- data: [
- ["ALL", "全部"],
- ["OPEN", "已开启"],
- ["CLOSE", "已关闭"]
- ]
- }),
- getCondition: function(value) {
- if(value == 'ALL'||value==null) {
- return '1=1';
- }else {
- return 'cu_statuscode=\'' + value + '\'';
- }
- }
- },{
- xtype : "textfield",
- name : "cu_sellername",
- emptyText : "业务员",
- width:110
- }],
- //字段属性
- 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',
- columns : [
- {
- text : "客户id",
- hidden:true,
- dataIndex : "id",
- xtype : "numbercolumn",
- },{
- text : "客户编号",
- width : 150.0,
- dataIndex : "cu_code"
- },
- {
- text : "客户名称",
- width : 250.0,
- dataIndex : "cu_name"
- }, {
- text : "状态",
- dataIndex : "cu_status",
- width : 90.0
- }, {
- text : "类型",
- dataIndex : "cu_type",
- width : 110.0
- }, {
- text : "税率",
- dataIndex : "cu_taxrate",
- xtype: 'numbercolumn',
- width : 110.0,
- renderer : function(v) {
- return Ext.util.Format.number(v, '0');
- }
- }, {
- 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) {
- var arr = (v + '.').split('.');
- var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
- var format = '0,000.' + xr.join();
- return Ext.util.Format.number(v, format);
- }
- }, {
- text : "业务员",
- dataIndex : "cu_sellername",
- width: 110
- }, {
- text : "备注",
- dataIndex : "cu_text1",
- width: 250
- }]
- },
- refresh:function(){
- this.items.items[0].store.load()
- }
- });
|