| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189 |
- 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',
- searchField:[{
- xtype : "textfield",
- name : "cu_code",
- emptyText : "客户编号",
- width:90,
- },{
- xtype : "textfield",
- name : "cu_name",
- emptyText : "客户名称",
- width:90,
- },{
- editable:false,
- hiddenBtn:true,
- xtype : "remotecombo",
- storeUrl:'/api/document/customerkind/getCombo',
- name : "cu_type",
- emptyText : "客户类型",
- width:120,
- },{
- xtype : "textfield",
- name : "cu_sellername",
- emptyText : "业务员",
- width:120,
- },{
- xtype : "textfield",
- name : "cu_promisedays",
- emptyText : "承付天数",
- width:120,
- getCondition: function(value) {
- if(value.indexOf("=")>=0||value.indexOf("<")>=0||value.indexOf(">")>=0){
- return ' cu_promisedays ' + value;
- }else if(value){
- return ' cu_promisedays = ' + value;
- }else{
- return '1=1';
- }
- }
- },{
- xtype : "textfield",
- name : "cu_credit",
- emptyText : "额度",
- width:70,
- dataIndex : "cu_credit",
- getCondition: function(value) {
- if(value.indexOf("=")>=0||value.indexOf("<")>=0||value.indexOf(">")>=0){
- return ' cu_credit ' + value;
- }else if(value){
- return ' cu_credit = ' + value;
- }else{
- return '1=1';
- }
- }
- },{
- xtype: 'combobox',
- name: 'cu_statuscode',
- queryMode: 'local',
- displayField: 'cu_status',
- valueField: 'cu_statuscode',
- emptyText :'状态',
- editable:false,
- width:100,
- 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 + '\'';
- }
- }
- }],
- //字段属性
- _formXtype:'document-customer-formpanel',
- _title:'客户资料',
- _deleteUrl:'/api/document/customer/delete/',
- // _dataUrl:'/api/ducument/customer/list',
- _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 : 200.0,
- dataIndex : "cu_code",
- },
- {
- text : "客户名称",
- dataIndex : "cu_name"
- },
- {
- text : "客户UU",
- dataIndex : "cu_uu"
- },
- {
- text : "类型",
- dataIndex : "cu_type"
- },
- {
- text : "业务员编号",
- dataIndex : "cu_sellercode"
- },
- {
- text : "业务员",
- dataIndex : "cu_sellername"
- },{
- text : "税率",
- dataIndex : "cu_taxrate",
- xtype: 'numbercolumn'
- }, {
- text: '应收款余额',
- dataIndex: 'cu_leftamount',
- width: 120,
- xtype: 'numbercolumn'
- }, {
- text : "承付天数",
- xtype: 'numbercolumn',
- dataIndex : "cu_promisedays",
- renderer : function(v) {
- return Ext.util.Format.number(v, '0');
- }
- },
- {
- text : "额度",
- xtype: 'numbercolumn',
- dataIndex : "cu_credit",
- renderer : function(v) {
- var arr = (v + '.').split('.');
- var xr = (new Array(arr[1].length)).fill('0');
- var format = '0,000.' + xr.join();
- return Ext.util.Format.number(v, format);
- }
- },
- {
- text : "开户银行",
- dataIndex : "cu_bankaccount"
- },{
- text : "银行账户",
- dataIndex : "cu_bankcode"
- },{
- text : "客户状态",
- dataIndex : "cu_status",
- },
- {
- text : "客户状态码",
- dataIndex : "cu_statuscode",
- hidden:true
- },
- {
- text : "默认客户地址",
- dataIndex : "ca_address",
- hidden:true
- },
- {
- text : "默认客户联系人",
- dataIndex : "cc_name",
- hidden:true
- }]
- },
- refresh:function(){
- this.items.items[0].store.load()
- }
- });
|