You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1700 lines
74 KiB
JavaScript
1700 lines
74 KiB
JavaScript
//欠费账龄统计
|
|
|
|
|
|
Ext.namespace('Shipping');
|
|
|
|
Shipping.MsRptNoTotalZlIndex = function (config) {
|
|
Ext.applyIf(this, config);
|
|
this.initUIComponents();
|
|
window.Shipping.MsRptNoTotalZlIndex.superclass.constructor.call(this);
|
|
};
|
|
|
|
Ext.extend(Shipping.MsRptNoTotalZlIndex, Ext.Panel, {
|
|
PageSize: 2000,
|
|
OprationStatus: null, //仅当弹出界面时使用
|
|
SelectedRecord: null,
|
|
sqlcontext: '1=2',
|
|
salesumsortfield: '',
|
|
salesumsortdire: '',
|
|
custsumsortfield: '',
|
|
custsumsortdire: '',
|
|
salecustsumsortfield: '',
|
|
salecustsumsortdire: '',
|
|
sqlselect: '1=2',
|
|
|
|
initUIComponents: function () {
|
|
//定义数据集
|
|
|
|
this.formname = 'MsRptNoTotalZlIndex';
|
|
|
|
|
|
this.storeSaleList = Ext.create('Ext.data.Store', {
|
|
pageSize: this.PageSize,
|
|
fields: [
|
|
|
|
{ name: 'SALE', type: 'string' },
|
|
{ name: 'ZL1NAME', type: 'string' },
|
|
{ name: 'ZL1USD', type: 'number' },
|
|
{ name: 'ZL1RMB', type: 'number' },
|
|
{ name: 'ZL1TTL', type: 'number' },
|
|
{ name: 'ZL2NAME', type: 'string' },
|
|
{ name: 'ZL2USD', type: 'number' },
|
|
{ name: 'ZL2RMB', type: 'number' },
|
|
{ name: 'ZL2TTL', type: 'number' },
|
|
{ name: 'ZL3NAME', type: 'string' },
|
|
{ name: 'ZL3USD', type: 'number' },
|
|
{ name: 'ZL3RMB', type: 'number' },
|
|
{ name: 'ZL3TTL', type: 'number' },
|
|
{ name: 'ZL4NAME', type: 'string' },
|
|
{ name: 'ZL4USD', type: 'number' },
|
|
{ name: 'ZL4RMB', type: 'number' },
|
|
{ name: 'ZL4TTL', type: 'number' },
|
|
{ name: 'ZL5NAME', type: 'string' },
|
|
{ name: 'ZL5USD', type: 'number' },
|
|
{ name: 'ZL5RMB', type: 'number' },
|
|
{ name: 'ZL5TTL', type: 'number' },
|
|
{ name: 'ZL6NAME', type: 'string' },
|
|
{ name: 'ZL6USD', type: 'number' },
|
|
{ name: 'ZL6RMB', type: 'number' },
|
|
{ name: 'ZL6TTL', type: 'number' },
|
|
{ name: 'ZL7NAME', type: 'string' },
|
|
{ name: 'ZL7USD', type: 'number' },
|
|
{ name: 'ZL7RMB', type: 'number' },
|
|
{ name: 'ZL7TTL', type: 'number' },
|
|
{ name: 'ZL8NAME', type: 'string' },
|
|
{ name: 'ZL8USD', type: 'number' },
|
|
{ name: 'ZL8RMB', type: 'number' },
|
|
{ name: 'ZL8TTL', type: 'number' },
|
|
{ name: 'ZLTTLUSD', type: 'number' },
|
|
{ name: 'ZLTTLRMB', type: 'number' },
|
|
{ name: 'ZLTTLTTL', type: 'number' }
|
|
|
|
],
|
|
remoteSort: true,
|
|
proxy: {
|
|
type: 'ajax',
|
|
url: '/MvcShipping/MsRptNoTotalZl/SaleListData',
|
|
reader: {
|
|
id: '',
|
|
root: 'data',
|
|
totalProperty: 'totalCount'
|
|
}
|
|
}
|
|
});
|
|
|
|
//定义Grid
|
|
this.girdcolumssale = [{
|
|
sortable: true,
|
|
dataIndex: 'SALE',
|
|
text: Zi.LAN.PS_SALE ,
|
|
width: 100
|
|
}];
|
|
|
|
// this.girdcolumssale = DsTruck.GetGridPanel(USERID, this.formname + 'sale', this.initgirdcolumssale, 1);
|
|
|
|
|
|
this.gridListSale = new Ext.grid.GridPanel({
|
|
store: this.storeSaleList,
|
|
enableHdMenu: false,
|
|
region: 'center',
|
|
loadMask: { msg: Zi.LAN.ShuJuJiaZaiZhongQingShaoDeng},
|
|
trackMouseOver: true,
|
|
disableSelection: false,
|
|
columns: this.girdcolumssale,
|
|
// paging bar on the bottom
|
|
bbar: Ext.create('Ext.PagingToolbar', {
|
|
store: this.storeSaleList,
|
|
displayInfo: true,
|
|
displayMsg: Zi.LAN.displayMsg,
|
|
emptyMsg: Zi.LAN.emptyMsg
|
|
})
|
|
});
|
|
|
|
this.gridListSale.addListener('sortchange', function (ct, column, direction, eOpts) {
|
|
this.salesumsortfield = column.dataIndex;
|
|
this.salesumsortdire = direction;
|
|
}, this);
|
|
|
|
this.gridListSale.addListener('itemdblclick', function (dataview, record, item, index, e, b) {
|
|
this.sqlselect = " B.SALE= '" + record.data.SALE + "'";
|
|
var openSet = "height=700, width=1024, toolbar=no, menubar=no,scrollbars=1, resizable=1,location=no, status=no,Top= " + (screen.height - 750) / 2 + ",Left= " + (screen.width - 1100) / 2
|
|
var openType = "_blank";
|
|
var openUrl = "";
|
|
var form = this.formSearch.getForm();
|
|
var DC = form.findField('DC').getValue();
|
|
if (DC == '2')
|
|
openUrl = "../MvcShipping/MsRptNoTotal/CrIndex";
|
|
else
|
|
openUrl = "../MvcShipping/MsRptNoTotal/DrIndex";
|
|
|
|
window.open(openUrl, openType, openSet);
|
|
// DsOpenEditWin("/TruckMng/MsWlPc/Edit");
|
|
}, this);
|
|
|
|
|
|
this.storeCustList = Ext.create('Ext.data.Store', {
|
|
pageSize: this.PageSize,
|
|
fields: [
|
|
{ name: 'CUSTNAME', type: 'string' },
|
|
{ name: 'ZLSTR', type: 'string' },
|
|
{ name: 'CONTRACTDAY', type: 'string' },
|
|
{ name: 'ZL1NAME', type: 'string' },
|
|
{ name: 'ZL1USD', type: 'number' },
|
|
{ name: 'ZL1RMB', type: 'number' },
|
|
{ name: 'ZL1TTL', type: 'number' },
|
|
{ name: 'ZL2NAME', type: 'string' },
|
|
{ name: 'ZL2USD', type: 'number' },
|
|
{ name: 'ZL2RMB', type: 'number' },
|
|
{ name: 'ZL2TTL', type: 'number' },
|
|
{ name: 'ZL3NAME', type: 'string' },
|
|
{ name: 'ZL3USD', type: 'number' },
|
|
{ name: 'ZL3RMB', type: 'number' },
|
|
{ name: 'ZL3TTL', type: 'number' },
|
|
{ name: 'ZL4NAME', type: 'string' },
|
|
{ name: 'ZL4USD', type: 'number' },
|
|
{ name: 'ZL4RMB', type: 'number' },
|
|
{ name: 'ZL4TTL', type: 'number' },
|
|
{ name: 'ZL5NAME', type: 'string' },
|
|
{ name: 'ZL5USD', type: 'number' },
|
|
{ name: 'ZL5RMB', type: 'number' },
|
|
{ name: 'ZL5TTL', type: 'number' },
|
|
{ name: 'ZL6NAME', type: 'string' },
|
|
{ name: 'ZL6USD', type: 'number' },
|
|
{ name: 'ZL6RMB', type: 'number' },
|
|
{ name: 'ZL6TTL', type: 'number' },
|
|
{ name: 'ZL7NAME', type: 'string' },
|
|
{ name: 'ZL7USD', type: 'number' },
|
|
{ name: 'ZL7RMB', type: 'number' },
|
|
{ name: 'ZL7TTL', type: 'number' },
|
|
{ name: 'ZL8NAME', type: 'string' },
|
|
{ name: 'ZL8USD', type: 'number' },
|
|
{ name: 'ZL8RMB', type: 'number' },
|
|
{ name: 'ZL8TTL', type: 'number' },
|
|
{ name: 'ZLTTLUSD', type: 'number' },
|
|
{ name: 'ZLTTLRMB', type: 'number' },
|
|
{ name: 'ZLTTLTTL', type: 'number' }
|
|
|
|
],
|
|
remoteSort: true,
|
|
proxy: {
|
|
type: 'ajax',
|
|
url: '/MvcShipping/MsRptNoTotalZl/CustListData',
|
|
reader: {
|
|
id: '',
|
|
root: 'data',
|
|
totalProperty: 'totalCount'
|
|
}
|
|
}
|
|
});
|
|
|
|
//定义Grid
|
|
|
|
this.girdcolumscust = [{
|
|
sortable: true,
|
|
dataIndex: 'CUSTNAME',
|
|
text: Zi.LAN.DRCUST,
|
|
width: 100
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'ZLSTR',
|
|
text: Zi.LAN.CUSTZQ,
|
|
width: 100
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'CONTRACTDAY',
|
|
header: Zi.LAN.CONTRACTDAY,
|
|
width: 86,
|
|
renderer: function (value, meta) {
|
|
if (value == '') { value = '0' } else value;
|
|
return value;
|
|
}
|
|
}
|
|
|
|
];
|
|
|
|
// this.girdcolumscust = DsTruck.GetGridPanel(USERID, this.formname + 'cust', this.initgirdcolumscust, 1);
|
|
|
|
|
|
this.gridListCust = new Ext.grid.GridPanel({
|
|
store: this.storeCustList,
|
|
enableHdMenu: false,
|
|
region: 'center',
|
|
loadMask: { msg: Zi.LAN.ShuJuJiaZaiZhongQingShaoDeng },
|
|
trackMouseOver: true,
|
|
disableSelection: false,
|
|
columns: this.girdcolumscust,
|
|
// paging bar on the bottom
|
|
bbar: Ext.create('Ext.PagingToolbar', {
|
|
store: this.storeCustList,
|
|
displayInfo: true,
|
|
displayMsg: Zi.LAN.displayMsg,
|
|
emptyMsg: Zi.LAN.emptyMsg
|
|
})
|
|
});
|
|
|
|
this.gridListCust.addListener('sortchange', function (ct, column, direction, eOpts) {
|
|
this.custsumsortfield = column.dataIndex;
|
|
this.custsumsortdire = direction;
|
|
}, this);
|
|
|
|
this.gridListCust.addListener('itemdblclick', function (dataview, record, item, index, e, b) {
|
|
this.sqlselect = " F.CUSTOMERNAME= '" + record.data.CUSTNAME + "'";
|
|
var openSet = "height=700, width=1024, toolbar=no, menubar=no,scrollbars=1, resizable=1,location=no, status=no,Top= " + (screen.height - 750) / 2 + ",Left= " + (screen.width - 1100) / 2
|
|
var openType = "_blank";
|
|
var openUrl = "";
|
|
var form = this.formSearch.getForm();
|
|
var DC = form.findField('DC').getValue();
|
|
if (DC == '2')
|
|
openUrl = "../MvcShipping/MsRptNoTotal/CrIndex";
|
|
else
|
|
openUrl = "../MvcShipping/MsRptNoTotal/DrIndex";
|
|
|
|
window.open(openUrl, openType, openSet);
|
|
// DsOpenEditWin("/TruckMng/MsWlPc/Edit");
|
|
}, this);
|
|
|
|
|
|
this.storeSaleCustList = Ext.create('Ext.data.Store', {
|
|
pageSize: this.PageSize,
|
|
fields: [
|
|
{ name: 'SALE', type: 'string' },
|
|
{ name: 'CUSTNAME', type: 'string' },
|
|
{ name: 'CONTRACTDAY', type: 'string' },
|
|
{ name: 'ZL1NAME', type: 'string' },
|
|
{ name: 'ZL1USD', type: 'number' },
|
|
{ name: 'ZL1RMB', type: 'number' },
|
|
{ name: 'ZL1TTL', type: 'number' },
|
|
{ name: 'ZL2NAME', type: 'string' },
|
|
{ name: 'ZL2USD', type: 'number' },
|
|
{ name: 'ZL2RMB', type: 'number' },
|
|
{ name: 'ZL2TTL', type: 'number' },
|
|
{ name: 'ZL3NAME', type: 'string' },
|
|
{ name: 'ZL3USD', type: 'number' },
|
|
{ name: 'ZL3RMB', type: 'number' },
|
|
{ name: 'ZL3TTL', type: 'number' },
|
|
{ name: 'ZL4NAME', type: 'string' },
|
|
{ name: 'ZL4USD', type: 'number' },
|
|
{ name: 'ZL4RMB', type: 'number' },
|
|
{ name: 'ZL4TTL', type: 'number' },
|
|
{ name: 'ZL5NAME', type: 'string' },
|
|
{ name: 'ZL5USD', type: 'number' },
|
|
{ name: 'ZL5RMB', type: 'number' },
|
|
{ name: 'ZL5TTL', type: 'number' },
|
|
{ name: 'ZL6NAME', type: 'string' },
|
|
{ name: 'ZL6USD', type: 'number' },
|
|
{ name: 'ZL6RMB', type: 'number' },
|
|
{ name: 'ZL6TTL', type: 'number' },
|
|
{ name: 'ZL7NAME', type: 'string' },
|
|
{ name: 'ZL7USD', type: 'number' },
|
|
{ name: 'ZL7RMB', type: 'number' },
|
|
{ name: 'ZL7TTL', type: 'number' },
|
|
{ name: 'ZL8NAME', type: 'string' },
|
|
{ name: 'ZL8USD', type: 'number' },
|
|
{ name: 'ZL8RMB', type: 'number' },
|
|
{ name: 'ZL8TTL', type: 'number' },
|
|
{ name: 'ZLTTLUSD', type: 'number' },
|
|
{ name: 'ZLTTLRMB', type: 'number' },
|
|
{ name: 'ZLTTLTTL', type: 'number' }
|
|
|
|
],
|
|
remoteSort: true,
|
|
proxy: {
|
|
type: 'ajax',
|
|
url: '/MvcShipping/MsRptNoTotalZl/SaleCustListData',
|
|
reader: {
|
|
id: '',
|
|
root: 'data',
|
|
totalProperty: 'totalCount'
|
|
}
|
|
}
|
|
});
|
|
|
|
//定义Grid
|
|
this.girdcolumssalecust = [{
|
|
sortable: true,
|
|
dataIndex: 'SALE',
|
|
text: Zi.LAN.PS_SALE,
|
|
width: 100
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'CUSTNAME',
|
|
text: Zi.LAN.CUST,
|
|
width: 100
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'CONTRACTDAY',
|
|
header: Zi.LAN.CONTRACTDAY,
|
|
width: 86,
|
|
renderer: function (value, meta) {
|
|
if (value == '') { value = '0' } else value;
|
|
return value;
|
|
}
|
|
}
|
|
|
|
];
|
|
|
|
|
|
// this.girdcolumssalecust = DsTruck.GetGridPanel(USERID, this.formname + 'salecust', this.initgirdcolumssalecust, 1);
|
|
|
|
|
|
this.gridListSaleCust = new Ext.grid.GridPanel({
|
|
store: this.storeSaleCustList,
|
|
enableHdMenu: false,
|
|
region: 'center',
|
|
loadMask: { msg: Zi.LAN.ShuJuJiaZaiZhongQingShaoDeng },
|
|
trackMouseOver: true,
|
|
disableSelection: false,
|
|
columns: this.girdcolumssalecust,
|
|
// paging bar on the bottom
|
|
bbar: Ext.create('Ext.PagingToolbar', {
|
|
store: this.storeSaleCustList,
|
|
displayInfo: true,
|
|
displayMsg: Zi.LAN.displayMsg,
|
|
emptyMsg: Zi.LAN.emptyMsg
|
|
})
|
|
});
|
|
|
|
this.gridListSaleCust.addListener('itemdblclick', function (dataview, record, item, index, e, b) {
|
|
this.sqlselect = " B.SALE='" + record.data.SALE + "' AND F.CUSTOMERNAME= '" + record.data.CUSTNAME + "'";
|
|
var openSet = "height=700, width=1024, toolbar=no, menubar=no,scrollbars=1, resizable=1,location=no, status=no,Top= " + (screen.height - 750) / 2 + ",Left= " + (screen.width - 1100) / 2
|
|
var openType = "_blank";
|
|
var openUrl = "";
|
|
var form = this.formSearch.getForm();
|
|
var DC = form.findField('DC').getValue();
|
|
if (DC == '2')
|
|
openUrl = "../MvcShipping/MsRptNoTotal/CrIndex";
|
|
else
|
|
openUrl = "../MvcShipping/MsRptNoTotal/DrIndex";
|
|
|
|
window.open(openUrl, openType, openSet);
|
|
// DsOpenEditWin("/TruckMng/MsWlPc/Edit");
|
|
}, this);
|
|
|
|
this.gridListSaleCust.addListener('sortchange', function (ct, column, direction, eOpts) {
|
|
this.salecustsumsortfield = column.dataIndex;
|
|
this.salecustsumsortdire = direction;
|
|
}, this);
|
|
|
|
this.storeSumList = Ext.create('Ext.data.Store', {
|
|
pageSize: this.PageSize,
|
|
fields: [
|
|
{ name: 'ZL1NAME', type: 'string' },
|
|
{ name: 'ZL1USD', type: 'number' },
|
|
{ name: 'ZL1RMB', type: 'number' },
|
|
{ name: 'ZL1TTL', type: 'number' },
|
|
{ name: 'ZL2NAME', type: 'string' },
|
|
{ name: 'ZL2USD', type: 'number' },
|
|
{ name: 'ZL2RMB', type: 'number' },
|
|
{ name: 'ZL2TTL', type: 'number' },
|
|
{ name: 'ZL3NAME', type: 'string' },
|
|
{ name: 'ZL3USD', type: 'number' },
|
|
{ name: 'ZL3RMB', type: 'number' },
|
|
{ name: 'ZL3TTL', type: 'number' },
|
|
{ name: 'ZL4NAME', type: 'string' },
|
|
{ name: 'ZL4USD', type: 'number' },
|
|
{ name: 'ZL4RMB', type: 'number' },
|
|
{ name: 'ZL4TTL', type: 'number' },
|
|
{ name: 'ZL5NAME', type: 'string' },
|
|
{ name: 'ZL5USD', type: 'number' },
|
|
{ name: 'ZL5RMB', type: 'number' },
|
|
{ name: 'ZL5TTL', type: 'number' },
|
|
{ name: 'ZL6NAME', type: 'string' },
|
|
{ name: 'ZL6USD', type: 'number' },
|
|
{ name: 'ZL6RMB', type: 'number' },
|
|
{ name: 'ZL6TTL', type: 'number' },
|
|
{ name: 'ZL7NAME', type: 'string' },
|
|
{ name: 'ZL7USD', type: 'number' },
|
|
{ name: 'ZL7RMB', type: 'number' },
|
|
{ name: 'ZL7TTL', type: 'number' },
|
|
{ name: 'ZL8NAME', type: 'string' },
|
|
{ name: 'ZL8USD', type: 'number' },
|
|
{ name: 'ZL8RMB', type: 'number' },
|
|
{ name: 'ZL8TTL', type: 'number' },
|
|
{ name: 'ZLTTLUSD', type: 'number' },
|
|
{ name: 'ZLTTLRMB', type: 'number' },
|
|
{ name: 'ZLTTLTTL', type: 'number' }
|
|
|
|
],
|
|
remoteSort: true,
|
|
proxy: {
|
|
type: 'ajax',
|
|
url: '/MvcShipping/MsRptNoTotalZl/SumListData',
|
|
reader: {
|
|
id: '',
|
|
root: 'data',
|
|
totalProperty: 'totalCount'
|
|
}
|
|
}
|
|
});
|
|
|
|
//定义Grid
|
|
this.gridListSum = new Ext.grid.GridPanel({
|
|
store: this.storeSumList,
|
|
enableHdMenu: false,
|
|
region: 'center',
|
|
loadMask: { msg: Zi.LAN.ShuJuJiaZaiZhongQingShaoDeng },
|
|
trackMouseOver: true,
|
|
disableSelection: false,
|
|
columns: this.girdcolumssalecust
|
|
});
|
|
|
|
|
|
//#region formSearch
|
|
|
|
//#region formSearch枚举参照相关
|
|
_this = this;
|
|
|
|
var BLTYPEDFIELDNAME = 'EnumValueName';
|
|
if (strLANGUAGES == "en-us") {
|
|
BLTYPEDFIELDNAME = 'EnumValueName_2';
|
|
}
|
|
|
|
this.StoreOpLb = Ext.create('DsExt.ux.RefEnumStore', {});
|
|
this.StoreOpLb.load({ params: { enumTypeId: 96005} });
|
|
|
|
this.comboxOpLb = Ext.create('DsExt.ux.RefTableCombox', {
|
|
fieldLabel: Zi.LAN.PS_OPLB,
|
|
store: this.StoreOpLb,
|
|
forceSelection: true,
|
|
name: 'PS_OPLB',
|
|
valueField: 'EnumValueName',
|
|
displayField: BLTYPEDFIELDNAME,
|
|
enableKeyEvents: true,
|
|
listeners: {
|
|
keyup: function (field, e) {
|
|
if (e.getKey() == e.ENTER) {
|
|
_this.onRefreshClick();
|
|
}
|
|
}
|
|
}
|
|
});
|
|
|
|
this.storeBsType = Ext.create('DsExt.ux.RefEnumStore', {});
|
|
this.storeBsType.load({ params: { enumTypeId: 96004} });
|
|
|
|
this.comboxBsType = Ext.create('DsExt.ux.RefTableCombox', {
|
|
fieldLabel: Zi.LAN.PS_BSTYPE,
|
|
store: this.storeBsType,
|
|
name: 'PS_BSTYPE',
|
|
valueField: 'EnumValueName',
|
|
displayField: BLTYPEDFIELDNAME,
|
|
enableKeyEvents: true,
|
|
listeners: {
|
|
keyup: function (field, e) {
|
|
if (e.getKey() == e.ENTER) {
|
|
_this.onRefreshClick();
|
|
}
|
|
}
|
|
}
|
|
});
|
|
|
|
this.storeSalesCode = Ext.create('DsExt.ux.RefTableStore', {
|
|
model: 'DsShipping.ux.UserRefModel',
|
|
proxy: { url: '/CommMng/BasicDataRef/GetUserRefList' }
|
|
});
|
|
|
|
this.storeSalesCode.load();
|
|
this.comboxSalesCode = Ext.create('DsExt.ux.RefTableCombox', {
|
|
fieldLabel: Zi.LAN.PS_SALE,
|
|
store: this.storeSalesCode,
|
|
forceSelection: true,
|
|
name: 'PS_SALE',
|
|
valueField: 'UserName',
|
|
displayField: 'CodeAndName',
|
|
enableKeyEvents: true,
|
|
listeners: {
|
|
keyup: function (field, e) {
|
|
if (e.getKey() == e.ENTER) {
|
|
_this.onRefreshClick();
|
|
}
|
|
}
|
|
}
|
|
});
|
|
|
|
this.comboxOp = Ext.create('DsExt.ux.RefTableCombox', {
|
|
fieldLabel: Zi.LAN.PS_OP,
|
|
store: this.storeSalesCode,
|
|
forceSelection: true,
|
|
name: 'PS_OP',
|
|
valueField: 'UserName',
|
|
displayField: 'CodeAndName',
|
|
enableKeyEvents: true,
|
|
listeners: {
|
|
keyup: function (field, e) {
|
|
if (e.getKey() == e.ENTER) {
|
|
_this.onRefreshClick();
|
|
}
|
|
}
|
|
}
|
|
});
|
|
|
|
this.storeCustCode = Ext.create('DsExt.ux.RefTableStore', {
|
|
model: 'DsShipping.ux.CustomRefModel',
|
|
proxy: { url: '/CommMng/BasicDataRef/GetCustomRefList' }
|
|
});
|
|
|
|
this.storeCustCode.load({ params: { condition: "ISCONTROLLER='1'"} });
|
|
this.comboxCustCode = Ext.create('DsExt.ux.RefTableCombox', {
|
|
fieldLabel: Zi.LAN.CUSTOMERNAME,
|
|
store: this.storeCustCode,
|
|
forceSelection: true,
|
|
name: 'PS_CUSTOMERNAME',
|
|
valueField: 'CustName',
|
|
displayField: 'CodeAndName',
|
|
enableKeyEvents: true,
|
|
listeners: {
|
|
keyup: function (field, e) {
|
|
if (e.getKey() == e.ENTER) {
|
|
_this.onRefreshClick();
|
|
}
|
|
}
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.storeCust = Ext.create('DsExt.ux.RefTableStore', {
|
|
model: 'DsShipping.ux.CustomRefModel',
|
|
proxy: { url: '/CommMng/BasicDataRef/GetCustomRefList' }
|
|
});
|
|
|
|
this.storeCust.load({ params: { condition: ""} });
|
|
this.comboxCust = Ext.create('DsExt.ux.RefTableCombox', {
|
|
fieldLabel: Zi.LAN.CUSTNAME ,
|
|
store: this.storeCust,
|
|
forceSelection: true,
|
|
name: 'CUSTNAME',
|
|
valueField: 'CustName',
|
|
displayField: 'CodeAndName',
|
|
enableKeyEvents: true,
|
|
listeners: {
|
|
keyup: function (field, e) {
|
|
if (e.getKey() == e.ENTER) {
|
|
_this.onRefreshClick();
|
|
}
|
|
}
|
|
}
|
|
|
|
});
|
|
|
|
this.storeFSTATUS = Ext.create('Ext.data.Store', {
|
|
fields: ['FSTATUS', 'NAME']
|
|
});
|
|
this.storeFSTATUS.add({ "DC": "0", "NAME": Zi.LAN.FeeAll });
|
|
this.storeFSTATUS.add({ "DC": "1", "NAME": Zi.LAN.Audit });
|
|
|
|
this.comboxFSTATUS = Ext.create('DsExt.ux.RefTableCombox', {
|
|
fieldLabel: Zi.LAN.FeeStatus,
|
|
store: this.storeFSTATUS,
|
|
valueField: 'FSTATUS',
|
|
displayField: 'NAME',
|
|
forceSelection: true,
|
|
name: 'FSTATUS',
|
|
value: '0',
|
|
enableKeyEvents: true,
|
|
listeners: {
|
|
keyup: function (field, e) {
|
|
if (e.getKey() == e.ENTER) {
|
|
_this.onRefreshClick();
|
|
}
|
|
}
|
|
}
|
|
});
|
|
|
|
//状态_业务状态
|
|
Ext.define('BSSTATUSModel', {
|
|
extend: 'Ext.data.Model',
|
|
fields: [
|
|
{ name: 'Name', type: 'string' },
|
|
{ name: 'Value', type: 'string' }
|
|
]
|
|
});
|
|
var dataBSSTATUS = [{ "Name": Zi.LAN.UNLOCK, "Value": 0 }, { "Name": Zi.LAN.LOCK, "Value": 1}];
|
|
var storeBSSTATUS = Ext.create('Ext.data.Store', {
|
|
model: 'BSSTATUSModel',
|
|
data: dataBSSTATUS
|
|
});
|
|
|
|
//费用状态
|
|
this.comboxFEESTATUS = Ext.create('DsExt.ux.RefTableCombox', {
|
|
fieldLabel: Zi.LAN.FEELOCK,
|
|
forceSelection: true,
|
|
store: storeBSSTATUS,
|
|
name: 'FEESTATUS',
|
|
valueField: 'Name',
|
|
displayField: 'Name',
|
|
enableKeyEvents: true,
|
|
listeners: {
|
|
keyup: function (field, e) {
|
|
if (e.getKey() == e.ENTER) {
|
|
_this.onRefreshClick();
|
|
}
|
|
}
|
|
}
|
|
});
|
|
|
|
|
|
Ext.define('SubComp', {
|
|
extend: 'Ext.data.Model',
|
|
fields: [
|
|
{ name: 'GID', type: 'string' },
|
|
{ name: 'NAME', type: 'string' },
|
|
{ name: 'ENNAME', type: 'string' }
|
|
]
|
|
});
|
|
this.StoreSubComp = Ext.create('DsExt.ux.RefTableStore', {
|
|
model: 'SubComp',
|
|
proxy: { url: '/MvcShipping/MsBaseInfo/GetCompanyEN' }
|
|
});
|
|
|
|
this.StoreSubComp.load({ params: { condition: ""} });
|
|
|
|
this.comboxSubComp = Ext.create('DsExt.ux.RefTableCombox', {
|
|
fieldLabel: Zi.LAN.CORPID ,
|
|
store: this.StoreSubComp,
|
|
forceSelection: true,
|
|
name: 'SUBCOMP',
|
|
valueField: 'GID',
|
|
displayField: 'NAME',
|
|
enableKeyEvents: true,
|
|
listeners: {
|
|
keyup: function (field, e) {
|
|
if (e.getKey() == e.ENTER) {
|
|
_this.onRefreshClick();
|
|
}
|
|
}
|
|
}
|
|
|
|
});
|
|
|
|
this.storeAddDCType = Ext.create('Ext.data.Store', {
|
|
fields: ['DC', 'NAME']
|
|
});
|
|
this.storeAddDCType.add({ "DC": "1", "NAME": Zi.LAN.FeeDr });
|
|
this.storeAddDCType.add({ "DC": "2", "NAME": Zi.LAN.FeeCr });
|
|
|
|
this.comboxaddDCType = Ext.create('DsExt.ux.RefTableCombox', {
|
|
fieldLabel: Zi.LAN.DC,
|
|
store: this.storeAddDCType,
|
|
valueField: 'DC',
|
|
flex: 0.5,
|
|
labelWidth: 50,
|
|
displayField: 'NAME',
|
|
forceSelection: true,
|
|
name: 'DC',
|
|
value:'1',
|
|
enableKeyEvents: true,
|
|
listeners: {
|
|
keyup: function (field, e) {
|
|
if (e.getKey() == e.ENTER) {
|
|
_this.onRefreshClick();
|
|
}
|
|
}
|
|
}
|
|
});
|
|
|
|
this.CheckChaoQi = new Ext.form.Checkbox({
|
|
fieldLabel: Zi.LAN.CQZL,
|
|
labelWidth: 60,
|
|
checked: false,
|
|
flex: 0.5
|
|
});
|
|
|
|
//#endregion
|
|
|
|
|
|
this.formSearch = Ext.widget('form', {
|
|
frame: true,
|
|
region: 'center',
|
|
bodyPadding: 5,
|
|
fieldDefaults: {
|
|
margins: '2 2 2 2',
|
|
labelAlign: 'right',
|
|
flex: 1,
|
|
labelWidth: 70,
|
|
msgTarget: 'qtip'
|
|
},
|
|
|
|
items: [
|
|
{//fieldset 1
|
|
xtype: 'container',
|
|
defaultType: 'textfield',
|
|
layout: 'anchor',
|
|
defaults: {
|
|
anchor: '100%'
|
|
},
|
|
items: [{
|
|
xtype: 'container',
|
|
layout: 'hbox',
|
|
defaultType: 'textfield',
|
|
items: [this.comboxCust, this.comboxOp, this.comboxSalesCode, this.comboxOpLb, this.comboxBsType, this.comboxSubComp
|
|
]
|
|
}, {
|
|
xtype: 'container',
|
|
layout: 'hbox',
|
|
defaultType: 'textfield',
|
|
items: [this.comboxCustCode, {
|
|
fieldLabel: Zi.LAN.PS_EXPDATEBGN,
|
|
format: 'Y-m-d',
|
|
xtype: 'datefield',
|
|
name: 'PS_EXPDATEBGN',
|
|
enableKeyEvents: true,
|
|
listeners: {
|
|
specialkey: function (field, e) {
|
|
if (e.getKey() == e.ENTER) {
|
|
_this.onRefreshClick();
|
|
}
|
|
}
|
|
}
|
|
}, {
|
|
fieldLabel: Zi.LAN.PS_EXPDATEEND,
|
|
format: 'Y-m-d',
|
|
xtype: 'datefield',
|
|
name: 'PS_EXPDATEEND',
|
|
enableKeyEvents: true,
|
|
listeners: {
|
|
specialkey: function (field, e) {
|
|
if (e.getKey() == e.ENTER) {
|
|
_this.onRefreshClick();
|
|
}
|
|
}
|
|
}
|
|
}, {
|
|
fieldLabel: Zi.LAN.PS_ACCDATEBGN,
|
|
xtype: 'monthfield',
|
|
name: 'PS_ACCDATEBGN',
|
|
enableKeyEvents: true,
|
|
listeners: {
|
|
specialkey: function (field, e) {
|
|
if (e.getKey() == e.ENTER) {
|
|
_this.onRefreshClick();
|
|
}
|
|
}
|
|
}
|
|
}, {
|
|
fieldLabel: Zi.LAN.PS_ACCDATEEND,
|
|
xtype: 'monthfield',
|
|
name: 'PS_ACCDATEEND',
|
|
enableKeyEvents: true,
|
|
listeners: {
|
|
specialkey: function (field, e) {
|
|
if (e.getKey() == e.ENTER) {
|
|
_this.onRefreshClick();
|
|
}
|
|
}
|
|
}
|
|
}, this.comboxaddDCType, this.CheckChaoQi
|
|
]
|
|
}
|
|
]//end items(fieldset 1)
|
|
}//end fieldset 1
|
|
]//end root items
|
|
|
|
});
|
|
|
|
//#endregion formSearch
|
|
|
|
//查询工具条
|
|
|
|
this.CheckSaveQuery = new Ext.form.Checkbox({
|
|
fieldLabel: Zi.LAN.SaveQuery,
|
|
checked: true,
|
|
width: 120
|
|
});
|
|
|
|
|
|
_this = this;
|
|
this.SearchBtn = new Ext.Button({
|
|
text: Zi.LAN.HideQuery ,
|
|
handler: function () {
|
|
if (_this.SearchBtn.text == Zi.LAN.HideQuery ) {
|
|
_this.panelSearch.hide();
|
|
_this.SearchBtn.setText(Zi.LAN.SearchBtn2);
|
|
|
|
} else {
|
|
|
|
_this.panelSearch.show();
|
|
_this.SearchBtn.setText(Zi.LAN.HideQuery );
|
|
|
|
|
|
}
|
|
}
|
|
});
|
|
|
|
this.panelBtn = new Ext.Panel({
|
|
region: "north",
|
|
tbar: [
|
|
{
|
|
text: Zi.LAN.Refresh,
|
|
iconCls: "btnrefresh",
|
|
handler: function (button, event) {
|
|
this.onRefreshClick(button, event);
|
|
var isvisible = true;
|
|
var issavevalue = false;
|
|
|
|
if (_this.SearchBtn.text == Zi.LAN.HideQuery )
|
|
isvisible = true
|
|
else
|
|
isvisible = false;
|
|
if (this.CheckSaveQuery.checked)
|
|
issavevalue = true
|
|
|
|
saveQuerySetting(this.formname, this.formSearch, isvisible, issavevalue);
|
|
},
|
|
scope: this
|
|
}, {
|
|
text: Zi.LAN.btnExportExcel,
|
|
id: "btnExportExcel",
|
|
iconCls: 'btnexportexcel',
|
|
handler: function (button, event) {
|
|
this.onExportClick(button, event);
|
|
},
|
|
scope: this
|
|
}
|
|
|
|
// , '-',
|
|
// {
|
|
// text: "打印",
|
|
// iconCls: 'btnprint',
|
|
// handler: function (button, event) {
|
|
// this.Print();
|
|
// },
|
|
// scope: this
|
|
// }
|
|
, '-', this.SearchBtn, {
|
|
xtype: 'button',
|
|
width: 90,
|
|
text: Zi.LAN.ClearSql,
|
|
iconCls: "btnreset",
|
|
handler: function (button, event) {
|
|
this.onClearSql(button, event);
|
|
},
|
|
scope: this
|
|
}, '-',
|
|
{
|
|
text: Zi.LAN.ZLSET,
|
|
handler: function (button, event) {
|
|
window.open('/MvcShipping/MsRptNoTotalZl/ZlSet', "ZLSET", 'width=800,height=600,top=0,left=0,resizable=yes,status=yes,menubar=no,scrollbars=yes');
|
|
|
|
},
|
|
scope: this
|
|
}
|
|
|
|
]
|
|
});
|
|
|
|
this.panelTop = new Ext.Panel({
|
|
layout: "border",
|
|
region: "north",
|
|
height: 29,
|
|
items: [this.panelBtn]
|
|
});
|
|
|
|
this.panelSearch = new Ext.Panel({
|
|
layout: "border",
|
|
region: "north",
|
|
height: 80,
|
|
items: [this.formSearch]
|
|
});
|
|
|
|
|
|
|
|
this.panelSaleSum = new Ext.Panel({
|
|
title: Zi.LAN.PS_SALE,
|
|
layout: "border",
|
|
region: 'center',
|
|
margin: '0 0',
|
|
frame: true,
|
|
items: [this.gridListSale]
|
|
});
|
|
|
|
this.panelCustSum = new Ext.Panel({
|
|
title: Zi.LAN.CUST,
|
|
layout: "border",
|
|
region: 'center',
|
|
margin: '0 0',
|
|
frame: true,
|
|
items: [this.gridListCust]
|
|
});
|
|
this.panelSaleCustSum = new Ext.Panel({
|
|
title: Zi.LAN.SALECUST,
|
|
layout: "border",
|
|
region: 'center',
|
|
margin: '0 0',
|
|
frame: true,
|
|
items: [this.gridListSaleCust]
|
|
});
|
|
|
|
this.panelSum = new Ext.Panel({
|
|
title: Zi.LAN.HEJI,
|
|
layout: "border",
|
|
height: 120,
|
|
region: 'south',
|
|
margin: '0 0',
|
|
frame: true,
|
|
items: [this.gridListSum]
|
|
});
|
|
|
|
|
|
|
|
|
|
this.tabpanel = new Ext.TabPanel
|
|
({
|
|
activeTab: 0,
|
|
autoWidth: true,
|
|
border: false,
|
|
frame: false,
|
|
region: 'center',
|
|
id: "TabPanelID",
|
|
enableTabScroll: true,
|
|
items:
|
|
[
|
|
this.panelCustSum,
|
|
this.panelSaleSum,
|
|
this.panelSaleCustSum
|
|
]
|
|
});
|
|
|
|
Ext.apply(this, {
|
|
items: [this.panelTop, this.panelSearch, this.tabpanel, this.panelSum]
|
|
});
|
|
|
|
this.InitGrid();
|
|
|
|
this.storeSaleList.on('beforeload', function (store) {
|
|
if (!this.checkSearchCondition())
|
|
return;
|
|
var datetype = 'OPDATE';
|
|
if (this.CheckChaoQi.checked == true) datetype = 'STLDATE';
|
|
var sql = this.getCondition();
|
|
Ext.apply(store.proxy.extraParams, { condition: sql, strdate: datetype });
|
|
}, this);
|
|
this.storeCustList.on('beforeload', function (store) {
|
|
if (!this.checkSearchCondition())
|
|
return;
|
|
var datetype = 'OPDATE';
|
|
if (this.CheckChaoQi.checked == true) datetype = 'STLDATE';
|
|
var sql = this.getCondition();
|
|
Ext.apply(store.proxy.extraParams, { condition: sql, strdate: datetype });
|
|
}, this);
|
|
|
|
|
|
this.storeSaleCustList.on('beforeload', function (store) {
|
|
if (!this.checkSearchCondition())
|
|
return;
|
|
var datetype = 'OPDATE';
|
|
if (this.CheckChaoQi.checked == true) datetype = 'STLDATE';
|
|
var sql = this.getCondition();
|
|
Ext.apply(store.proxy.extraParams, { condition: sql, strdate: datetype });
|
|
}, this);
|
|
|
|
|
|
this.storeSumList.on('beforeload', function (store) {
|
|
if (!this.checkSearchCondition())
|
|
return;
|
|
var datetype = 'OPDATE';
|
|
if (this.CheckChaoQi.checked == true) datetype = 'STLDATE';
|
|
var sql = this.getCondition();
|
|
Ext.apply(store.proxy.extraParams, { condition: sql, strdate: datetype });
|
|
}, this);
|
|
|
|
LoadQueryData(this.formname, this.formSearch, this.CheckSaveQuery);
|
|
|
|
|
|
}, //end initUIComponents
|
|
|
|
|
|
InitGrid: function (grid) {
|
|
|
|
_this = this;
|
|
var zlcolumn = [];
|
|
Ext.Ajax.request({
|
|
waitMsg: '正在生成...',
|
|
url: '/MvcShipping/MsRptNoTotalZl/GetZlSet',
|
|
callback: function (options, success, response) {
|
|
if (success) {
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
if (!result.Success) {
|
|
Ext.Msg.show({
|
|
title: '提示',
|
|
msg: result.Message,
|
|
icon: Ext.MessageBox.ERROR,
|
|
buttons: Ext.Msg.OK
|
|
});
|
|
return;
|
|
} else {
|
|
data = result.data;
|
|
if (data.ZL1NAME != '' && data.ZL1DAY != 0) {
|
|
zlcolumn.push({
|
|
text: data.ZL1NAME,
|
|
columns: [{
|
|
dataIndex: 'ZL1RMB',
|
|
sortable: true,
|
|
text: 'RMB',
|
|
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
align: 'right',
|
|
width: 80
|
|
}, {
|
|
dataIndex: 'ZL1USD',
|
|
sortable: true,
|
|
text: 'USD',
|
|
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
align: 'right',
|
|
width: 80
|
|
}, {
|
|
dataIndex: 'ZL1TTL',
|
|
text: Zi.LAN.HEJI,
|
|
sortable: true,
|
|
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
align: 'right',
|
|
width: 80
|
|
}
|
|
]
|
|
});
|
|
if (data.ZL2NAME != '' && data.ZL2DAY != 0) {
|
|
zlcolumn.push({
|
|
text: data.ZL2NAME,
|
|
columns: [{
|
|
dataIndex: 'ZL2RMB',
|
|
text: 'RMB',
|
|
sortable: true,
|
|
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
align: 'right',
|
|
width: 80
|
|
}, {
|
|
dataIndex: 'ZL2USD',
|
|
text: 'USD',
|
|
sortable: true,
|
|
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
align: 'right',
|
|
width: 80
|
|
}, {
|
|
dataIndex: 'ZL2TTL',
|
|
text: Zi.LAN.HEJI,
|
|
sortable: true,
|
|
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
align: 'right',
|
|
width: 80
|
|
}
|
|
]
|
|
});
|
|
if (data.ZL3NAME != '' && data.ZL3DAY != 0) {
|
|
zlcolumn.push({
|
|
text: data.ZL3NAME,
|
|
columns: [{
|
|
dataIndex: 'ZL3RMB',
|
|
text: 'RMB',
|
|
sortable: true,
|
|
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
align: 'right',
|
|
width: 80
|
|
}, {
|
|
dataIndex: 'ZL3USD',
|
|
text: 'USD',
|
|
sortable: true,
|
|
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
align: 'right',
|
|
width: 80
|
|
}, {
|
|
dataIndex: 'ZL3TTL',
|
|
sortable: true,
|
|
text: Zi.LAN.HEJI,
|
|
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
align: 'right',
|
|
width: 80
|
|
}
|
|
]
|
|
});
|
|
if (data.ZL4NAME != '' && data.ZL4DAY != 0) {
|
|
zlcolumn.push({
|
|
text: data.ZL4NAME,
|
|
columns: [{
|
|
dataIndex: 'ZL4RMB',
|
|
sortable: true,
|
|
text: 'RMB',
|
|
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
align: 'right',
|
|
width: 80
|
|
}, {
|
|
dataIndex: 'ZL4USD',
|
|
sortable: true,
|
|
text: 'USD',
|
|
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
align: 'right',
|
|
width: 80
|
|
}, {
|
|
dataIndex: 'ZL4TTL',
|
|
sortable: true,
|
|
text: Zi.LAN.HEJI,
|
|
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
align: 'right',
|
|
width: 80
|
|
}
|
|
]
|
|
});
|
|
if (data.ZL5NAME != '' && data.ZL5DAY != 0) {
|
|
zlcolumn.push({
|
|
text: data.ZL5NAME,
|
|
columns: [{
|
|
dataIndex: 'ZL5RMB',
|
|
text: 'RMB',
|
|
sortable: true,
|
|
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
align: 'right',
|
|
width: 80
|
|
}, {
|
|
dataIndex: 'ZL5USD',
|
|
text: 'USD',
|
|
sortable: true,
|
|
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
align: 'right',
|
|
width: 80
|
|
}, {
|
|
dataIndex: 'ZL5TTL',
|
|
text: Zi.LAN.HEJI,
|
|
sortable: true,
|
|
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
align: 'right',
|
|
width: 80
|
|
}
|
|
]
|
|
});
|
|
if (data.ZL6NAME != '' && data.ZL6DAY != 0) {
|
|
zlcolumn.push({
|
|
text: data.ZL6NAME,
|
|
columns: [{
|
|
sortable: true,
|
|
dataIndex: 'ZL6RMB',
|
|
text: 'RMB',
|
|
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
align: 'right',
|
|
width: 80
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'ZL6USD',
|
|
text: 'USD',
|
|
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
align: 'right',
|
|
width: 80
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'ZL6TTL',
|
|
text: Zi.LAN.HEJI,
|
|
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
align: 'right',
|
|
width: 80
|
|
}
|
|
]
|
|
});
|
|
if (data.ZL7NAME != '' && data.ZL7DAY != 0) {
|
|
zlcolumn.push({
|
|
text: data.ZL7NAME,
|
|
columns: [{
|
|
sortable: true,
|
|
dataIndex: 'ZL7RMB',
|
|
text: 'RMB',
|
|
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
align: 'right',
|
|
width: 80
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'ZL7USD',
|
|
text: 'USD',
|
|
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
align: 'right',
|
|
width: 80
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'ZL7TTL',
|
|
text: Zi.LAN.HEJI,
|
|
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
align: 'right',
|
|
width: 80
|
|
}
|
|
]
|
|
});
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (data.ZL8NAME != '') {
|
|
zlcolumn.push({
|
|
text: data.ZL8NAME,
|
|
columns: [{
|
|
sortable: true,
|
|
dataIndex: 'ZL8RMB',
|
|
text: 'RMB',
|
|
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
align: 'right',
|
|
width: 80
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'ZL8USD',
|
|
text: 'USD',
|
|
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
align: 'right',
|
|
width: 80
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'ZL8TTL',
|
|
text: Zi.LAN.HEJI,
|
|
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
align: 'right',
|
|
width: 80
|
|
}
|
|
]
|
|
});
|
|
|
|
}
|
|
|
|
zlcolumn.push({
|
|
text: Zi.LAN.ZONGJI,
|
|
columns: [{
|
|
sortable: true,
|
|
dataIndex: 'ZLTTLRMB',
|
|
text: 'RMB',
|
|
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
align: 'right',
|
|
width: 80
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'ZLTTLUSD',
|
|
text: 'USD',
|
|
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
align: 'right',
|
|
width: 80
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'ZLTTLTTL',
|
|
text: Zi.LAN.HEJI,
|
|
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
align: 'right',
|
|
width: 80
|
|
}
|
|
]
|
|
});
|
|
|
|
for (var k in zlcolumn) {
|
|
this.girdcolumssale.push(zlcolumn[k]);
|
|
this.girdcolumssalecust.push(zlcolumn[k]);
|
|
this.girdcolumscust.push(zlcolumn[k]);
|
|
}
|
|
|
|
this.gridListSale.reconfigure(this.storeSaleList, this.girdcolumssale);
|
|
this.gridListCust.reconfigure(this.storeCustList, this.girdcolumscust);
|
|
this.gridListSaleCust.reconfigure(this.storeSaleCustList, this.girdcolumssalecust);
|
|
this.gridListSum.reconfigure(this.storeSumList, zlcolumn);
|
|
}
|
|
}
|
|
},
|
|
scope: this
|
|
});
|
|
},
|
|
|
|
onRefreshClick: function (button, event) {
|
|
if (!this.checkSearchCondition())
|
|
return;
|
|
|
|
var sql = this.getCondition();
|
|
// this.PageSize = this.Pagenum.getValue();
|
|
|
|
var datetype = 'OPDATE';
|
|
if (this.CheckChaoQi.checked == true) datetype = 'STLDATE';
|
|
this.sqlcontext = sql;
|
|
var Drsql = sql + getAndConSql(sql, '1=1', " F.FEETYPE=1 ");
|
|
var Crsql = sql + getAndConSql(sql, '1=1', " F.FEETYPE=2 ");
|
|
this.storeCustList.load({
|
|
params: { start: 0, limit: this.PageSize, condition: sql, strdate: datetype },
|
|
waitMsg: "正在查询数据...",
|
|
scope: this
|
|
});
|
|
this.storeSaleList.load({
|
|
params: { start: 0, limit: this.PageSize, condition: sql, strdate: datetype },
|
|
waitMsg: "正在查询数据...",
|
|
scope: this
|
|
});
|
|
this.storeSaleCustList.load({
|
|
params: { start: 0, limit: this.PageSize, condition: sql, strdate: datetype },
|
|
waitMsg: "正在查询数据...",
|
|
scope: this
|
|
});
|
|
|
|
this.storeSumList.load({
|
|
params: { start: 0, limit: this.PageSize, condition: sql, strdate: datetype },
|
|
waitMsg: "正在查询数据...",
|
|
scope: this
|
|
});
|
|
},
|
|
|
|
onClearSql: function () {
|
|
var form = this.formSearch.getForm();
|
|
form.reset();
|
|
},
|
|
getCondition: function () {
|
|
var form = this.formSearch.getForm();
|
|
var sql = '';
|
|
/*
|
|
var sqldata = form.getValues();
|
|
sql = Ext.JSON.encode(sqldata);
|
|
*/
|
|
|
|
// var mblNo = form.findField('PS_MBLNO').getValue();
|
|
// sql = sql + getAndConSql(sql, mblNo, " (B.CUSTNO like '%" + mblNo + "%' or B.MBLNO like '%" + mblNo + "%' or B.HBLNO like '%" + mblNo + "%' or B.CUSTOMNO like '%" + mblNo + "%' or B.ORDERNO like '%" + mblNo + "%') ");
|
|
|
|
|
|
var expDate_Min = form.findField('PS_EXPDATEBGN').getRawValue();
|
|
sql = sql + getAndConSql(sql, expDate_Min, " B.OPDATE>='" + expDate_Min + "'");
|
|
|
|
var expDate_Max = form.findField('PS_EXPDATEEND').getRawValue();
|
|
sql = sql + getAndConSql(sql, expDate_Max, " B.OPDATE<='" + expDate_Max + " 23:59:59'");
|
|
|
|
// var etdDate_Min = form.findField('PS_ETDDATEBGN').getRawValue();
|
|
// sql = sql + getAndConSql(sql, etdDate_Min, " B.ETD>='" + etdDate_Min + "'");
|
|
|
|
// var etdDate_Max = form.findField('PS_ETDDATEEND').getRawValue();
|
|
// sql = sql + getAndConSql(sql, etdDate_Max, " B.ETD<='" + etdDate_Max + " 23:59:59'");
|
|
|
|
var accDate_Min = form.findField('PS_ACCDATEBGN').getRawValue();
|
|
sql = sql + getAndConSql(sql, accDate_Min, " B.ACCDATE>='" + accDate_Min + "'");
|
|
|
|
var accDate_Max = form.findField('PS_ACCDATEEND').getRawValue();
|
|
sql = sql + getAndConSql(sql, accDate_Max, " B.ACCDATE<='" + accDate_Max + "'");
|
|
|
|
var CUSTOMERNAME = form.findField('PS_CUSTOMERNAME').getValue();
|
|
sql = sql + getAndConSql(sql, CUSTOMERNAME, "B.CUSTOMERNAME='" + CUSTOMERNAME + "'");
|
|
|
|
var SALE = form.findField('PS_SALE').getValue();
|
|
sql = sql + getAndConSql(sql, SALE, "B.SALE='" + SALE + "'");
|
|
|
|
var SUBCOMP = form.findField('SUBCOMP').getValue();
|
|
sql = sql + getAndConSql(sql, SUBCOMP, "B.CORPID='" + SUBCOMP + "'");
|
|
|
|
|
|
|
|
|
|
// var FEESTATUS = form.findField('FEESTATUS').getValue();
|
|
// sql = sql + getAndConSql(sql, FEESTATUS, "B.FEESTATUS=" + FEESTATUS);
|
|
|
|
|
|
|
|
var OP = form.findField('PS_OP').getValue();
|
|
sql = sql + getAndConSql(sql, OP, "B.OP='" + OP + "'");
|
|
|
|
var BSTYPE = form.findField('PS_BSTYPE').getValue();
|
|
sql = sql + getAndConSql(sql, BSTYPE, "B.BSTYPE='" + BSTYPE + "'");
|
|
|
|
var OPLB = form.findField('PS_OPLB').getValue();
|
|
sql = sql + getAndConSql(sql, OPLB, "B.OPLBNAME='" + OPLB + "'");
|
|
|
|
|
|
var CUSTNAME = form.findField('CUSTNAME').getValue();
|
|
sql = sql + getAndConSql(sql, CUSTNAME, "F.CUSTOMERNAME='" + CUSTNAME + "'");
|
|
|
|
var DC = form.findField('DC').getValue();
|
|
sql = sql + getAndConSql(sql, DC, " F.FEETYPE=" + DC);
|
|
|
|
|
|
|
|
|
|
var FEERANGE = 'B';
|
|
|
|
|
|
if (FEERANGE == '' || FEERANGE == null || FEERANGE == undefined) {
|
|
|
|
}
|
|
else {
|
|
|
|
if (sql == '') {
|
|
if (FEERANGE == 'B') {
|
|
sql = ' F.AMOUNT<>F.SETTLEMENT '
|
|
}
|
|
}
|
|
else {
|
|
if (FEERANGE == 'B') {
|
|
sql = sql + ' and F.AMOUNT<>F.SETTLEMENT '
|
|
}
|
|
}
|
|
}
|
|
|
|
var FSTATUS = 1;
|
|
|
|
if (FSTATUS == '' || FSTATUS == null || FSTATUS == undefined || FSTATUS == 0) {
|
|
|
|
}
|
|
else {
|
|
|
|
if (sql == '') {
|
|
if (FSTATUS == 1) {
|
|
sql = ' (F.FEESTATUS=0 or F.FEESTATUS=8 or F.FEESTATUS=9) '
|
|
}
|
|
}
|
|
else {
|
|
if (FSTATUS == 1) {
|
|
sql = sql + 'and (F.FEESTATUS=0 or F.FEESTATUS=8 or F.FEESTATUS=9) '
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
return sql;
|
|
},
|
|
|
|
|
|
|
|
checkSearchCondition: function () {
|
|
var form = this.formSearch.getForm();
|
|
if (!form.isValid()) {
|
|
Ext.Msg.alert(Zi.LAN.TiShi, Zi.LAN.FUZHICUOWU);
|
|
return false;
|
|
}
|
|
|
|
return true;
|
|
},
|
|
OprationSwap: function () {
|
|
var ret = new Array();
|
|
ret[0] = this.sqlcontext;
|
|
ret[1] = this.sqlselect;
|
|
ret[2] = this.SelectedRecord;
|
|
ret[3] = this.SelectedRecord.data.BSNO;
|
|
ret[4] = "MsRptOpProfitIndex";
|
|
|
|
return ret;
|
|
},
|
|
|
|
onSaveGridClick: function (button, event) {
|
|
|
|
if (this.tabpanel.getActiveTab() == this.panelSaleSum) {
|
|
this.girdcolumssale = DsTruck.SaveGridPanel(USERID, this.formname + 'sale', this.gridListSale.columns, this.girdcolumssale, 1, true);
|
|
} else if (this.tabpanel.getActiveTab() == this.panelCustSum) {
|
|
this.girdcolumscust = DsTruck.SaveGridPanel(USERID, this.formname + 'cust', this.gridListCust.columns, this.girdcolumscust, 1, true);
|
|
} else if (this.tabpanel.getActiveTab() == this.panelVesselSum) {
|
|
this.girdcolumsvessel = DsTruck.SaveGridPanel(USERID, this.formname + 'vessel', this.gridListVessel.columns, this.girdcolumsvessel, 1, true);
|
|
}
|
|
|
|
},
|
|
oninitGridClick: function (button, event) {
|
|
|
|
if (this.tabpanel.getActiveTab() == this.panelSaleSum) {
|
|
this.gridListSale.reconfigure(this.storeSaleList, this.initgirdcolumssale);
|
|
this.girdcolumssale = DsTruck.SaveGridPanel(USERID, this.formname + 'sale', this.gridListSale.columns, this.initgirdcolumssale, 1, true);
|
|
} else if (this.tabpanel.getActiveTab() == this.panelCustSum) {
|
|
this.gridListCust.reconfigure(this.storeCustList, this.initgirdcolumscust);
|
|
this.girdcolumscust = DsTruck.SaveGridPanel(USERID, this.formname + 'cust', this.gridListCust.columns, this.initgirdcolumscust, 1, true);
|
|
} else if (this.tabpanel.getActiveTab() == this.panelVesselSum) {
|
|
this.gridListVessel.reconfigure(this.storeVesselList, this.initgirdcolumsvessel);
|
|
this.girdcolumsvessel = DsTruck.SaveGridPanel(USERID, this.formname + 'vessel', this.gridListVessel.columns, this.initgirdcolumsvessel, 1, true);
|
|
}
|
|
|
|
},
|
|
onExportClick: function (button, event) {
|
|
|
|
_this = this;
|
|
|
|
|
|
if (this.tabpanel.getActiveTab() == this.panelSaleSum) {
|
|
grid2Excel(this.gridListSale, "业务员账龄");
|
|
// GridExportExcelPage(this.gridListSale);
|
|
} else if (this.tabpanel.getActiveTab() == this.panelCustSum) {
|
|
grid2Excel(this.gridListCust, "客户账龄");
|
|
// GridExportExcelPage(this.gridListCust);
|
|
} else if (this.tabpanel.getActiveTab() == this.panelSaleCustSum) {
|
|
grid2Excel(this.gridListSaleCust, "业务员客户账龄");
|
|
// GridExportExcelPage(this.gridListSaleCust);
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
Print: function () {
|
|
|
|
var sql = this.getCondition();
|
|
var Crsql = sql + getAndConSql(sql, '1=1', " F.FEETYPE=2");
|
|
var Drsql = sql + getAndConSql(sql, '1=1', " F.FEETYPE=1");
|
|
|
|
_this = this;
|
|
if (this.tabpanel.activeTab == this.panelSaleSum) {
|
|
|
|
|
|
|
|
if (this.storeSaleList.getCount() == 0) {
|
|
return;
|
|
}
|
|
var sortstr = ' B.SALE';
|
|
|
|
if (this.salesumsortfield != '' && this.salesumsortdire != '') {
|
|
|
|
sortstr = this.salesumsortfield + ' ' + this.salesumsortdire;
|
|
}
|
|
|
|
Ext.Msg.wait('正在组织数据, 请稍侯..');
|
|
Ext.Ajax.request({
|
|
waitMsg: '正在组织数据...',
|
|
url: '/MvcShipping/MsRptNoTotalZl/SaleListData',
|
|
scope: this,
|
|
params: {
|
|
start: 0, limit: this.PageSize,
|
|
condition: _this.sqlcontext,
|
|
printstr: 'true',
|
|
sortstr: sortstr
|
|
},
|
|
callback: function (options, success, response) {
|
|
if (success) {
|
|
Ext.MessageBox.hide();
|
|
var jsonresult = Ext.JSON.decode(response.responseText);
|
|
if (jsonresult.Success) {
|
|
var returnstr = jsonresult.Data;
|
|
var printType = 'MSRPTNOTOTALZLSALE';
|
|
var sql1 = returnstr;
|
|
var sql2 = "";
|
|
var sql3 = "";
|
|
var sql4 = "";
|
|
var sql5 = "";
|
|
var sql6 = "";
|
|
|
|
PrintComm(printType, sql1, sql2, sql3, sql4, sql5, sql6);
|
|
|
|
} else {
|
|
Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
}
|
|
} else {
|
|
Ext.Msg.show({ title: '请重试',
|
|
msg: '服务器响应出错',
|
|
icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK
|
|
});
|
|
}
|
|
}
|
|
});
|
|
|
|
|
|
} else if (this.tabpanel.activeTab == this.panelCustSum) {
|
|
|
|
|
|
|
|
if (this.storeCustList.getCount() == 0) {
|
|
return;
|
|
}
|
|
var sortstr = ' F.CUSTOMERNAME';
|
|
|
|
if (this.custsumsortfield != '' && this.custsumsortdire != '') {
|
|
|
|
sortstr = this.custsumsortfield + ' ' + this.custsumsortdire;
|
|
}
|
|
|
|
|
|
Ext.Msg.wait('正在组织数据, 请稍侯..');
|
|
Ext.Ajax.request({
|
|
waitMsg: '正在组织数据...',
|
|
url: '/MvcShipping/MsRptNoTotalZl/CustListData',
|
|
scope: this,
|
|
params: {
|
|
start: 0, limit: this.PageSize,
|
|
condition: _this.sqlcontext,
|
|
printstr: 'true',
|
|
sortstr: sortstr
|
|
},
|
|
callback: function (options, success, response) {
|
|
if (success) {
|
|
Ext.MessageBox.hide();
|
|
var jsonresult = Ext.JSON.decode(response.responseText);
|
|
if (jsonresult.Success) {
|
|
var returnstr = jsonresult.Data;
|
|
var printType = 'MSRPTNOTOTALZLCUST';
|
|
var sql1 = returnstr;
|
|
var sql2 = "";
|
|
var sql3 = "";
|
|
var sql4 = "";
|
|
var sql5 = "";
|
|
var sql6 = "";
|
|
|
|
PrintComm(printType, sql1, sql2, sql3, sql4, sql5, sql6);
|
|
|
|
} else {
|
|
Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
}
|
|
} else {
|
|
Ext.Msg.show({ title: '请重试',
|
|
msg: '服务器响应出错',
|
|
icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK
|
|
});
|
|
}
|
|
}
|
|
});
|
|
} else if (this.tabpanel.activeTab == this.panelSaleCustSum) {
|
|
|
|
if (this.storeSaleCustList.getCount() == 0) {
|
|
return;
|
|
}
|
|
var sortstr = ' B.SALE,F.CUSTOMERNAME';
|
|
if (this.salecustsumsortfield != '' && this.salecustsumsortdire != '') {
|
|
|
|
sortstr = this.salecustsumsortfield + ' ' + this.salecustsumsortdire;
|
|
}
|
|
|
|
Ext.Msg.wait('正在组织数据, 请稍侯..');
|
|
Ext.Ajax.request({
|
|
waitMsg: '正在组织数据...',
|
|
url: '/MvcShipping/MsRptNoTotalZl/SaleCustListData',
|
|
scope: this,
|
|
params: {
|
|
start: 0, limit: this.PageSize,
|
|
condition: sql,
|
|
printstr: 'true',
|
|
sortstr: sortstr
|
|
},
|
|
callback: function (options, success, response) {
|
|
if (success) {
|
|
Ext.MessageBox.hide();
|
|
var jsonresult = Ext.JSON.decode(response.responseText);
|
|
if (jsonresult.Success) {
|
|
var returnstr = jsonresult.Data;
|
|
var printType = 'MSRPTNOTOTALZLSALECUST';
|
|
var sql1 = returnstr;
|
|
var sql2 = "";
|
|
var sql3 = "";
|
|
var sql4 = "";
|
|
var sql5 = "";
|
|
var sql6 = "";
|
|
|
|
PrintComm(printType, sql1, sql2, sql3, sql4, sql5, sql6);
|
|
|
|
} else {
|
|
Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
}
|
|
} else {
|
|
Ext.Msg.show({ title: '请重试',
|
|
msg: '服务器响应出错',
|
|
icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK
|
|
});
|
|
}
|
|
}
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|