| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111 |
- Ext.define('saas.view.sale.report.SaleController', {
- extend: 'saas.view.core.report.ReportPanelController',
- alias: 'controller.sale-report-sale',
- init: function (form) {
- this.control({
- //放大镜赋值关系 以及 tpl模板
- 'dbfindtrigger[name=sa_custname]':{
- beforerender:function(f){
- Ext.apply(f,{
- dataUrl:'/api/document/customer/dbfind',
- addXtype: 'document-customer-formpanel',
- addTitle: '客户资料',
- defaultCondition:"cu_statuscode='OPEN'",
- dbfinds:[
- {
- from:'id',to:'id',ignore:true
- },{
- from:'cu_code',to:'cu_code'
- },{
- from:'cu_name',to:'sa_custname'
- },{
- from:'ca_address',to:'ca_address'
- }],
- dbtpls:[{
- field:'cu_code',width:100
- },{
- field:'cu_name',width:100
- }],
- dbSearchFields:[{
- emptyText:'输入客户编号或客户名称',
- xtype : "textfield",
- name : "search",
- getCondition: function(v) {
- return "(upper(cu_code) like '%"+v.toUpperCase()+"%' or upper(cu_name) like '%"+v.toUpperCase()+"%')";
- },
- allowBlank : true,
- columnWidth : 0.25
- }],
- dbColumns:[
- {
- conditionCode:'id',
- "text": "客户ID",
- "flex": 0,
- "dataIndex": "id",
- "width": 0,
- "xtype": "",
- "items": null
- },{
- conditionCode:'cu_code',
- "text": "客户编号",
- "flex": 1,
- "dataIndex": "cu_code",
- "width": 100,
- "xtype": "",
- "items": null
- }, {
- conditionCode:'cu_name',
- "text": "客户名称",
- "flex": 1,
- "dataIndex": "cu_name",
- "xtype": "",
- "items": null
- }, {
- conditionCode:'cu_type',
- "text": "客户类型",
- "flex": 1,
- "dataIndex": "cu_type",
- "width": 200,
- "xtype": "",
- "items": null
- }, {
- "text": "业务员编号",
- "flex": 1,
- "dataIndex": "cu_sellercode",
- "width": 100
- }, {
- "text": "业务员",
- "flex": 1,
- "dataIndex": "cu_sellername",
- "width": 100
- }, {
- "text": "税率",
- "flex": 1,
- "dataIndex": "cu_taxrate",
- "width": 100,
- xtype: 'numbercolumn',
- }, {
- "text": "承付天数",
- "flex": 1,
- "dataIndex": "cu_promisedays",
- "width": 100,
- xtype: 'numbercolumn',
- align: 'end'
- }, {
- "text": "额度",
- "flex": 1,
- "dataIndex": "cu_credit",
- "width": 100,
- xtype: 'numbercolumn',
- }, {
- "text": "客户地址",
- "flex": 1,
- "dataIndex": "ca_address",
- "width": 250
- }]
- }) ;
- }
- }
- });
- }
- });
|