|
|
|
|
//欠费月度统计
|
|
|
|
|
Ext.namespace('Shipping');
|
|
|
|
|
|
|
|
|
|
Shipping.MsRptNoTotalMonthIndex = function (config) {
|
|
|
|
|
Ext.applyIf(this, config);
|
|
|
|
|
this.initUIComponents();
|
|
|
|
|
window.Shipping.MsRptNoTotalMonthIndex.superclass.constructor.call(this);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Ext.extend(Shipping.MsRptNoTotalMonthIndex, Ext.Panel, {
|
|
|
|
|
PageSize: 2000,
|
|
|
|
|
OprationStatus: null, //仅当弹出界面时使用
|
|
|
|
|
SelectedRecord: null,
|
|
|
|
|
sqlcontext: '1=2',
|
|
|
|
|
salesumsortfield: '',
|
|
|
|
|
salesumsortdire: '',
|
|
|
|
|
custsumsortfield: '',
|
|
|
|
|
custsumsortdire: '',
|
|
|
|
|
salecustsumsortfield: '',
|
|
|
|
|
salecustsumsortdire: '',
|
|
|
|
|
opcustsumsortfield: '',
|
|
|
|
|
opcustsumsortdire: '',
|
|
|
|
|
sqlselect: '1=2',
|
|
|
|
|
|
|
|
|
|
initUIComponents: function () {
|
|
|
|
|
//定义数据集
|
|
|
|
|
|
|
|
|
|
this.formname = 'MsRptNoTotalMonthIndex';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.storeSaleList = null;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// //定义Grid
|
|
|
|
|
this.girdcolumssale = [{
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'SALE',
|
|
|
|
|
text: Zi.LAN.SALE,
|
|
|
|
|
width: 100
|
|
|
|
|
}];
|
|
|
|
|
|
|
|
|
|
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 = null;
|
|
|
|
|
|
|
|
|
|
//定义Grid
|
|
|
|
|
|
|
|
|
|
this.girdcolumscust = [{
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'CUSTNAME',
|
|
|
|
|
text: Zi.LAN.CUSTNAME,
|
|
|
|
|
width: 100
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'CUSTFULLNAME',
|
|
|
|
|
text: Zi.LAN.CUSTFULLNAME,
|
|
|
|
|
width: 120
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 = null;
|
|
|
|
|
|
|
|
|
|
//定义Grid
|
|
|
|
|
this.girdcolumssalecust = [{
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'SALE',
|
|
|
|
|
text: Zi.LAN.PS_SALE,
|
|
|
|
|
width: 100
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'CUSTNAME',
|
|
|
|
|
text: Zi.LAN.CUSTNAME,
|
|
|
|
|
width: 100
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'CUSTFULLNAME',
|
|
|
|
|
text: Zi.LAN.CUSTFULLNAME,
|
|
|
|
|
width: 120
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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('sortchange', function (ct, column, direction, eOpts) {
|
|
|
|
|
this.salecustsumsortfield = column.dataIndex;
|
|
|
|
|
this.salecustsumsortdire = direction;
|
|
|
|
|
}, this);
|
|
|
|
|
|
|
|
|
|
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.storeOpCustList = null;
|
|
|
|
|
|
|
|
|
|
//定义Grid
|
|
|
|
|
this.girdcolumsopcust = [{
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'OP',
|
|
|
|
|
text: Zi.LAN.OP,
|
|
|
|
|
width: 100
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'CUSTNAME',
|
|
|
|
|
text: Zi.LAN.CUSTNAME,
|
|
|
|
|
width: 100
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'CUSTFULLNAME',
|
|
|
|
|
text: Zi.LAN.CUSTFULLNAME,
|
|
|
|
|
width: 120
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.gridListOpCust = new Ext.grid.GridPanel({
|
|
|
|
|
store: this.storeOpCustList,
|
|
|
|
|
enableHdMenu: false,
|
|
|
|
|
region: 'center',
|
|
|
|
|
loadMask: { msg: Zi.LAN.ShuJuJiaZaiZhongQingShaoDeng },
|
|
|
|
|
trackMouseOver: true,
|
|
|
|
|
disableSelection: false,
|
|
|
|
|
columns: this.girdcolumsopcust,
|
|
|
|
|
// paging bar on the bottom
|
|
|
|
|
bbar: Ext.create('Ext.PagingToolbar', {
|
|
|
|
|
store: this.storeOpCustList,
|
|
|
|
|
displayInfo: true,
|
|
|
|
|
displayMsg: Zi.LAN.displayMsg,
|
|
|
|
|
emptyMsg: Zi.LAN.emptyMsg
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.gridListOpCust.addListener('sortchange', function (ct, column, direction, eOpts) {
|
|
|
|
|
this.opcustsumsortfield = column.dataIndex;
|
|
|
|
|
this.opcustsumsortdire = direction;
|
|
|
|
|
}, this);
|
|
|
|
|
|
|
|
|
|
this.gridListOpCust.addListener('itemdblclick', function (dataview, record, item, index, e, b) {
|
|
|
|
|
this.sqlselect = " B.OP='" + record.data.OP + "' 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.storeSumList = null;
|
|
|
|
|
|
|
|
|
|
//定义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
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// //定义Grid
|
|
|
|
|
this.girdcolumssaledept = [{
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'SALEDEPT',
|
|
|
|
|
text: Zi.LAN.SALEDEPT,
|
|
|
|
|
width: 100
|
|
|
|
|
}];
|
|
|
|
|
|
|
|
|
|
this.gridListSaleDept = new Ext.grid.GridPanel({
|
|
|
|
|
store: this.storeSaleDeptList,
|
|
|
|
|
enableHdMenu: false,
|
|
|
|
|
region: 'center',
|
|
|
|
|
loadMask: { msg: Zi.LAN.ShuJuJiaZaiZhongQingShaoDeng},
|
|
|
|
|
trackMouseOver: true,
|
|
|
|
|
disableSelection: false,
|
|
|
|
|
columns: this.girdcolumssaledept,
|
|
|
|
|
// paging bar on the bottom
|
|
|
|
|
bbar: Ext.create('Ext.PagingToolbar', {
|
|
|
|
|
store: this.storeSaleList,
|
|
|
|
|
displayInfo: true,
|
|
|
|
|
displayMsg: Zi.LAN.displayMsg,
|
|
|
|
|
emptyMsg: Zi.LAN.emptyMsg
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.gridListSaleDept.addListener('sortchange', function (ct, column, direction, eOpts) {
|
|
|
|
|
this.saledeptsumsortfield = column.dataIndex;
|
|
|
|
|
this.saledeptsumsortdire = direction;
|
|
|
|
|
}, this);
|
|
|
|
|
|
|
|
|
|
this.gridListSaleDept.addListener('itemdblclick', function (dataview, record, item, index, e, b) {
|
|
|
|
|
this.sqlselect = " B.SALEDEPT= '" + record.data.SALEDEPT + "'";
|
|
|
|
|
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);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//#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.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.FEERANGAUDIT });
|
|
|
|
|
|
|
|
|
|
this.comboxFSTATUS = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
|
|
fieldLabel: Zi.LAN.fystate,
|
|
|
|
|
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.FEESTATUSREF,
|
|
|
|
|
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,
|
|
|
|
|
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.FeeType_Ref,
|
|
|
|
|
store: this.storeAddDCType,
|
|
|
|
|
valueField: 'DC',
|
|
|
|
|
displayField: 'NAME',
|
|
|
|
|
forceSelection: true,
|
|
|
|
|
name: 'DC',
|
|
|
|
|
value: '1',
|
|
|
|
|
enableKeyEvents: true,
|
|
|
|
|
listeners: {
|
|
|
|
|
keyup: function (field, e) {
|
|
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
|
|
_this.onRefreshClick();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.storeDATETYPE = Ext.create('Ext.data.Store', {
|
|
|
|
|
fields: ['FSTATUS', 'NAME']
|
|
|
|
|
});
|
|
|
|
|
this.storeDATETYPE.add({ "FSTATUS": "OPDATE", "NAME": Zi.LAN.OPDATE});
|
|
|
|
|
// this.storeBLNOTYPE.add({ "FSTATUS": "INVOICENO", "NAME": "发票号" });
|
|
|
|
|
this.storeDATETYPE.add({ "FSTATUS": "ACCDATE", "NAME": Zi.LAN.ACCDATE});
|
|
|
|
|
|
|
|
|
|
this.comboxDATETYPE = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
|
|
fieldLabel: Zi.LAN.DATETYPE,
|
|
|
|
|
store: this.storeDATETYPE,
|
|
|
|
|
valueField: 'FSTATUS',
|
|
|
|
|
displayField: 'NAME',
|
|
|
|
|
forceSelection: true,
|
|
|
|
|
name: 'DATETYPE',
|
|
|
|
|
value: 'OPDATE',
|
|
|
|
|
enableKeyEvents: true,
|
|
|
|
|
listeners: {
|
|
|
|
|
keyup: function (field, e) {
|
|
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
|
|
_this.onRefreshClick();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.StoreSaleCorp = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
|
|
model: 'SubComp',
|
|
|
|
|
proxy: { url: '/MvcShipping/MsBaseInfo/GetCompanyEN' }
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.StoreSaleCorp.load({ params: { condition: "" } });
|
|
|
|
|
|
|
|
|
|
this.comboxSaleCorp = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
|
|
fieldLabel: Zi.LAN.SALECORP,
|
|
|
|
|
store: this.StoreSaleCorp,
|
|
|
|
|
name: 'SALECORPID',
|
|
|
|
|
// flex: 0.5,
|
|
|
|
|
// labelWidth: 55,
|
|
|
|
|
valueField: 'GID',
|
|
|
|
|
displayField: 'NAME',
|
|
|
|
|
enableKeyEvents: true,
|
|
|
|
|
listeners: {
|
|
|
|
|
keyup: function (field, e) {
|
|
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
|
|
_this.onRefreshClick();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//#endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.formSearch = Ext.widget('form', {
|
|
|
|
|
frame: true,
|
|
|
|
|
region: 'center',
|
|
|
|
|
bodyPadding: 5,
|
|
|
|
|
fieldDefaults: {
|
|
|
|
|
margins: '2 2 2 2',
|
|
|
|
|
labelAlign: 'right',
|
|
|
|
|
flex: 1,
|
|
|
|
|
labelWidth: 90,
|
|
|
|
|
msgTarget: 'qtip'
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
items: [
|
|
|
|
|
{//fieldset 1
|
|
|
|
|
xtype: 'container',
|
|
|
|
|
defaultType: 'textfield',
|
|
|
|
|
layout: 'anchor',
|
|
|
|
|
defaults: {
|
|
|
|
|
anchor: '100%'
|
|
|
|
|
},
|
|
|
|
|
items: [{
|
|
|
|
|
xtype: 'container',
|
|
|
|
|
layout: 'hbox',
|
|
|
|
|
defaultType: 'textfield',
|
|
|
|
|
items: [this.comboxDATETYPE,{
|
|
|
|
|
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.comboxCustCode, this.comboxSubComp
|
|
|
|
|
]
|
|
|
|
|
}, {
|
|
|
|
|
xtype: 'container',
|
|
|
|
|
layout: 'hbox',
|
|
|
|
|
defaultType: 'textfield',
|
|
|
|
|
items: [this.comboxCust, this.comboxOp, this.comboxSalesCode, this.comboxOpLb, this.comboxBsType, this.comboxaddDCType, this.comboxSaleCorp
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
]//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: Zi.LAN.btnprint,
|
|
|
|
|
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
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
]
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
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.SaleCustSum,
|
|
|
|
|
layout: "border",
|
|
|
|
|
region: 'center',
|
|
|
|
|
margin: '0 0',
|
|
|
|
|
frame: true,
|
|
|
|
|
items: [this.gridListSaleCust]
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.panelSaleDeptSum = new Ext.Panel({
|
|
|
|
|
title: Zi.LAN.SALEDEPT,
|
|
|
|
|
layout: "border",
|
|
|
|
|
region: 'center',
|
|
|
|
|
margin: '0 0',
|
|
|
|
|
frame: true,
|
|
|
|
|
items: [this.gridListSaleDept]
|
|
|
|
|
});
|
|
|
|
|
this.panelOpCustSum = new Ext.Panel({
|
|
|
|
|
title: Zi.LAN.OPCUST ,
|
|
|
|
|
layout: "border",
|
|
|
|
|
region: 'center',
|
|
|
|
|
margin: '0 0',
|
|
|
|
|
frame: true,
|
|
|
|
|
items: [this.gridListOpCust]
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.panelSum = new Ext.Panel({
|
|
|
|
|
title: Zi.LAN.SUM,
|
|
|
|
|
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,
|
|
|
|
|
this.panelSaleDeptSum,
|
|
|
|
|
this.panelOpCustSum
|
|
|
|
|
]
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Ext.apply(this, {
|
|
|
|
|
items: [this.panelTop, this.panelSearch, this.tabpanel, this.panelSum]
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LoadQueryData(this.formname, this.formSearch, this.CheckSaveQuery);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, //end initUIComponents
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
InitGrid: function (datetype,startdate, enddate) {
|
|
|
|
|
|
|
|
|
|
_this = this;
|
|
|
|
|
var zlcolumn = [];
|
|
|
|
|
var myfield = [];
|
|
|
|
|
var salefield = [
|
|
|
|
|
{ name: 'SALE', type: 'string' }
|
|
|
|
|
];
|
|
|
|
|
var custfield = [
|
|
|
|
|
{ name: 'CUSTNAME', type: 'string' },
|
|
|
|
|
{ name: 'CUSTFULLNAME', type: 'string' },
|
|
|
|
|
{ name: 'CUSTZQ', type: 'string' }
|
|
|
|
|
];
|
|
|
|
|
var salecustfield = [
|
|
|
|
|
{ name: 'SALE', type: 'string' },
|
|
|
|
|
{ name: 'CUSTNAME', type: 'string' },
|
|
|
|
|
{ name: 'CUSTFULLNAME', type: 'string' },
|
|
|
|
|
{ name: 'CUSTZQ', type: 'string' }
|
|
|
|
|
];
|
|
|
|
|
var saledeptfield = [
|
|
|
|
|
{ name: 'SALEDEPT', type: 'string' }
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
var opcustfield = [
|
|
|
|
|
{ name: 'OP', type: 'string' },
|
|
|
|
|
{ name: 'CUSTNAME', type: 'string' },
|
|
|
|
|
{ name: 'CUSTFULLNAME', type: 'string' },
|
|
|
|
|
{ name: 'CUSTZQ', type: 'string' }
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
this.girdcolumssale = [{
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'SALE',
|
|
|
|
|
text: Zi.LAN.SALE,
|
|
|
|
|
width: 100
|
|
|
|
|
}];
|
|
|
|
|
this.girdcolumssaledept = [{
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'SALEDEPT',
|
|
|
|
|
text: Zi.LAN.SALEDEPT,
|
|
|
|
|
width: 100
|
|
|
|
|
}];
|
|
|
|
|
|
|
|
|
|
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: 'CUSTFULLNAME',
|
|
|
|
|
text: Zi.LAN.CUSTFULLNAME,
|
|
|
|
|
width: 120
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'CUSTZQ',
|
|
|
|
|
text: Zi.LAN.CUSTZQ,
|
|
|
|
|
width: 120
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.girdcolumscust = [{
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'CUSTNAME',
|
|
|
|
|
text: Zi.LAN.DRCUST ,
|
|
|
|
|
width: 100
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'CUSTFULLNAME',
|
|
|
|
|
text: Zi.LAN.DRCUSTFULLNAME,
|
|
|
|
|
width: 120
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'CUSTZQ',
|
|
|
|
|
text: Zi.LAN.DRCUSTZQ,
|
|
|
|
|
width: 120
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
];
|
|
|
|
|
this.girdcolumsopcust = [{
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'OP',
|
|
|
|
|
text: Zi.LAN.OP,
|
|
|
|
|
width: 100
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'CUSTNAME',
|
|
|
|
|
text: Zi.LAN.CUSTNAME,
|
|
|
|
|
width: 100
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'CUSTFULLNAME',
|
|
|
|
|
text: Zi.LAN.CUSTFULLNAME,
|
|
|
|
|
width: 120
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'CUSTZQ',
|
|
|
|
|
text: Zi.LAN.CUSTZQ,
|
|
|
|
|
width: 120
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var storeMonthData = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
|
|
fields: [
|
|
|
|
|
{ name: 'MONTHNAME', type: 'string' },
|
|
|
|
|
{ name: 'MONTHNO', type: 'number' },
|
|
|
|
|
{ name: 'MONTHFIELDNAME', type: 'string' }
|
|
|
|
|
|
|
|
|
|
],
|
|
|
|
|
proxy: { url: '/MvcShipping/MsRptNoTotalMonth/GetMonthsData' }
|
|
|
|
|
});
|
|
|
|
|
_this = this;
|
|
|
|
|
|
|
|
|
|
storeMonthData.load({
|
|
|
|
|
params: { datetype:datetype,startmonth: startdate, endmonth: enddate },
|
|
|
|
|
callback: function (r, options, success) {
|
|
|
|
|
if (success) {
|
|
|
|
|
if (r.length != 0) {
|
|
|
|
|
for (i = 0; i < storeMonthData.getCount(); i += 1) {
|
|
|
|
|
var itemindex = i + 1;
|
|
|
|
|
var memberyf = storeMonthData.getAt(i);
|
|
|
|
|
myfield.push({ name: 'ZL' + memberyf.data.MONTHNO + 'USD', type: 'number' });
|
|
|
|
|
myfield.push({ name: 'ZL' + memberyf.data.MONTHNO + 'RMB', type: 'number' });
|
|
|
|
|
myfield.push({ name: 'ZL' + memberyf.data.MONTHNO + 'OT', type: 'number' });
|
|
|
|
|
myfield.push({ name: 'ZL' + memberyf.data.MONTHNO + 'TTL', type: 'number' });
|
|
|
|
|
zlcolumn.push({
|
|
|
|
|
text: memberyf.data.MONTHNAME,
|
|
|
|
|
dataIndex: 'ZL' + memberyf.data.MONTHNAME,
|
|
|
|
|
columns: [{
|
|
|
|
|
dataIndex: 'ZL' + memberyf.data.MONTHNO + 'RMB',
|
|
|
|
|
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: 'ZL' + memberyf.data.MONTHNO + 'USD',
|
|
|
|
|
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: 'ZL' + memberyf.data.MONTHNO + 'OT',
|
|
|
|
|
text: Zi.LAN.QTBB,
|
|
|
|
|
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: 'ZL' + memberyf.data.MONTHNO + 'TTL',
|
|
|
|
|
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
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
myfield.push({ name: 'ZLTTLUSD', type: 'number' });
|
|
|
|
|
myfield.push({ name: 'ZLTTLRMB', type: 'number' });
|
|
|
|
|
myfield.push({ name: 'ZLTTLOT', type: 'number' });
|
|
|
|
|
myfield.push({ name: 'ZLTTLTTL', type: 'number' });
|
|
|
|
|
zlcolumn.push({
|
|
|
|
|
text: Zi.LAN.ZONGJI,
|
|
|
|
|
dataIndex: 'ZLTTL' ,
|
|
|
|
|
columns: [{
|
|
|
|
|
dataIndex: 'ZLTTLRMB',
|
|
|
|
|
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: 'ZLTTLUSD',
|
|
|
|
|
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: 'ZLTTLOT',
|
|
|
|
|
text: Zi.LAN.QTBB ,
|
|
|
|
|
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: 'ZLTTLTTL',
|
|
|
|
|
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
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (var k in myfield) {
|
|
|
|
|
salefield.push(myfield[k]);
|
|
|
|
|
custfield.push(myfield[k]);
|
|
|
|
|
salecustfield.push(myfield[k]);
|
|
|
|
|
saledeptfield.push(myfield[k]);
|
|
|
|
|
opcustfield.push(myfield[k]);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Ext.define('salemodel', {
|
|
|
|
|
extend: 'Ext.data.Model',
|
|
|
|
|
fields: salefield
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.storeSaleList = Ext.create('Ext.data.Store', {
|
|
|
|
|
pageSize: this.PageSize,
|
|
|
|
|
model: 'salemodel',
|
|
|
|
|
remoteSort: true,
|
|
|
|
|
proxy: {
|
|
|
|
|
type: 'ajax',
|
|
|
|
|
url: '/MvcShipping/MsRptNoTotalMonth/SaleListData',
|
|
|
|
|
reader: {
|
|
|
|
|
root: 'data',
|
|
|
|
|
totalProperty: 'totalCount'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Ext.define('custmodel', {
|
|
|
|
|
extend: 'Ext.data.Model',
|
|
|
|
|
fields: custfield
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.storeCustList = Ext.create('Ext.data.Store', {
|
|
|
|
|
pageSize: this.PageSize,
|
|
|
|
|
model: 'custmodel',
|
|
|
|
|
remoteSort: true,
|
|
|
|
|
proxy: {
|
|
|
|
|
type: 'ajax',
|
|
|
|
|
url: '/MvcShipping/MsRptNoTotalMonth/CustListData',
|
|
|
|
|
reader: {
|
|
|
|
|
root: 'data',
|
|
|
|
|
totalProperty: 'totalCount'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
Ext.define('salecustmodel', {
|
|
|
|
|
extend: 'Ext.data.Model',
|
|
|
|
|
fields: salecustfield
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.storeSaleCustList = Ext.create('Ext.data.Store', {
|
|
|
|
|
pageSize: this.PageSize,
|
|
|
|
|
model: 'salecustmodel',
|
|
|
|
|
remoteSort: true,
|
|
|
|
|
proxy: {
|
|
|
|
|
type: 'ajax',
|
|
|
|
|
url: '/MvcShipping/MsRptNoTotalMonth/SaleCustListData',
|
|
|
|
|
reader: {
|
|
|
|
|
root: 'data',
|
|
|
|
|
totalProperty: 'totalCount'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Ext.define('saledeptmodel', {
|
|
|
|
|
extend: 'Ext.data.Model',
|
|
|
|
|
fields: saledeptfield
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.storeSaleDeptList = Ext.create('Ext.data.Store', {
|
|
|
|
|
pageSize: this.PageSize,
|
|
|
|
|
model: 'saledeptmodel',
|
|
|
|
|
remoteSort: true,
|
|
|
|
|
proxy: {
|
|
|
|
|
type: 'ajax',
|
|
|
|
|
url: '/MvcShipping/MsRptNoTotalMonth/DeptListData',
|
|
|
|
|
reader: {
|
|
|
|
|
root: 'data',
|
|
|
|
|
totalProperty: 'totalCount'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Ext.define('opcustmodel', {
|
|
|
|
|
extend: 'Ext.data.Model',
|
|
|
|
|
fields: opcustfield
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.storeOpCustList = Ext.create('Ext.data.Store', {
|
|
|
|
|
pageSize: this.PageSize,
|
|
|
|
|
model: 'opcustmodel',
|
|
|
|
|
remoteSort: true,
|
|
|
|
|
proxy: {
|
|
|
|
|
type: 'ajax',
|
|
|
|
|
url: '/MvcShipping/MsRptNoTotalMonth/OpCustListData',
|
|
|
|
|
reader: {
|
|
|
|
|
root: 'data',
|
|
|
|
|
totalProperty: 'totalCount'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Ext.define('summodel', {
|
|
|
|
|
extend: 'Ext.data.Model',
|
|
|
|
|
fields: myfield
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.storeSumList = Ext.create('Ext.data.Store', {
|
|
|
|
|
pageSize: this.PageSize,
|
|
|
|
|
model: 'summodel',
|
|
|
|
|
remoteSort: true,
|
|
|
|
|
proxy: {
|
|
|
|
|
type: 'ajax',
|
|
|
|
|
url: '/MvcShipping/MsRptNoTotalMonth/SumListData',
|
|
|
|
|
reader: {
|
|
|
|
|
root: 'data',
|
|
|
|
|
totalProperty: 'totalCount'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
for (var k in zlcolumn) {
|
|
|
|
|
this.girdcolumssale.push(zlcolumn[k]);
|
|
|
|
|
this.girdcolumssalecust.push(zlcolumn[k]);
|
|
|
|
|
this.girdcolumscust.push(zlcolumn[k]);
|
|
|
|
|
this.girdcolumssaledept.push(zlcolumn[k]);
|
|
|
|
|
this.girdcolumsopcust.push(zlcolumn[k]);
|
|
|
|
|
}
|
|
|
|
|
this.gridListSale.columns = this.girdcolumssale;
|
|
|
|
|
this.gridListSale.reconfigure(this.storeSaleList, this.girdcolumssale);
|
|
|
|
|
this.gridListCust.reconfigure(this.storeCustList, this.girdcolumscust);
|
|
|
|
|
this.gridListSaleCust.reconfigure(this.storeSaleCustList, this.girdcolumssalecust);
|
|
|
|
|
this.gridListSaleDept.reconfigure(this.storeSaleDeptList, this.girdcolumssaledept);
|
|
|
|
|
this.gridListOpCust.reconfigure(this.storeOpCustList, this.girdcolumsopcust);
|
|
|
|
|
|
|
|
|
|
this.gridListSum.reconfigure(this.storeSumList, zlcolumn);
|
|
|
|
|
var sql = this.getCondition();
|
|
|
|
|
|
|
|
|
|
this.sqlcontext = sql;
|
|
|
|
|
this.storeCustList.load({
|
|
|
|
|
params: { start: 0, limit: this.PageSize, condition: sql, datetype: datetype, startmonth: startdate, endmonth: enddate },
|
|
|
|
|
waitMsg: "正在查询数据...",
|
|
|
|
|
scope: this
|
|
|
|
|
});
|
|
|
|
|
this.storeSaleList.load({
|
|
|
|
|
params: { start: 0, limit: this.PageSize, condition: sql, datetype: datetype,startmonth: startdate, endmonth: enddate },
|
|
|
|
|
waitMsg: "正在查询数据...",
|
|
|
|
|
scope: this
|
|
|
|
|
});
|
|
|
|
|
this.storeSaleCustList.load({
|
|
|
|
|
params: { start: 0, limit: this.PageSize, condition: sql, datetype: datetype,startmonth: startdate, endmonth: enddate },
|
|
|
|
|
waitMsg: "正在查询数据...",
|
|
|
|
|
scope: this
|
|
|
|
|
});
|
|
|
|
|
this.storeSaleDeptList.load({
|
|
|
|
|
params: { start: 0, limit: this.PageSize, condition: sql, datetype: datetype,startmonth: startdate, endmonth: enddate },
|
|
|
|
|
waitMsg: "正在查询数据...",
|
|
|
|
|
scope: this
|
|
|
|
|
});
|
|
|
|
|
this.storeOpCustList.load({
|
|
|
|
|
params: { start: 0, limit: this.PageSize, condition: sql, datetype: datetype, startmonth: startdate, endmonth: enddate },
|
|
|
|
|
waitMsg: "正在查询数据...",
|
|
|
|
|
scope: this
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.storeSumList.load({
|
|
|
|
|
params: { start: 0, limit: this.PageSize, condition: sql, datetype: datetype,startmonth: startdate, endmonth: enddate },
|
|
|
|
|
waitMsg: "正在查询数据...",
|
|
|
|
|
scope: this
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.storeSaleList.on('beforeload', function (store) {
|
|
|
|
|
if (!this.checkSearchCondition())
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
var sql = this.getCondition();
|
|
|
|
|
Ext.apply(store.proxy.extraParams, { condition: sql, datetype: datetype,startmonth: startdate, endmonth: enddate });
|
|
|
|
|
}, this);
|
|
|
|
|
this.storeSaleDeptList.on('beforeload', function (store) {
|
|
|
|
|
if (!this.checkSearchCondition())
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
var sql = this.getCondition();
|
|
|
|
|
Ext.apply(store.proxy.extraParams, { condition: sql, datetype: datetype,startmonth: startdate, endmonth: enddate });
|
|
|
|
|
}, this);
|
|
|
|
|
this.storeCustList.on('beforeload', function (store) {
|
|
|
|
|
if (!this.checkSearchCondition())
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
var sql = this.getCondition();
|
|
|
|
|
Ext.apply(store.proxy.extraParams, { condition: sql, datetype: datetype,startmonth: startdate, endmonth: enddate });
|
|
|
|
|
}, this);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.storeSaleCustList.on('beforeload', function (store) {
|
|
|
|
|
if (!this.checkSearchCondition())
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
var sql = this.getCondition();
|
|
|
|
|
Ext.apply(store.proxy.extraParams, { condition: sql, datetype: datetype,startmonth: startdate, endmonth: enddate });
|
|
|
|
|
}, this);
|
|
|
|
|
|
|
|
|
|
this.storeOpCustList.on('beforeload', function (store) {
|
|
|
|
|
if (!this.checkSearchCondition())
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
var sql = this.getCondition();
|
|
|
|
|
Ext.apply(store.proxy.extraParams, { condition: sql, datetype: datetype, startmonth: startdate, endmonth: enddate });
|
|
|
|
|
}, this);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.storeSumList.on('beforeload', function (store) {
|
|
|
|
|
if (!this.checkSearchCondition())
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
var sql = this.getCondition();
|
|
|
|
|
Ext.apply(store.proxy.extraParams, { condition: sql, datetype: datetype,startmonth: startdate, endmonth: enddate });
|
|
|
|
|
}, this);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
scope: this
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
onRefreshClick: function (button, event) {
|
|
|
|
|
if (!this.checkSearchCondition())
|
|
|
|
|
return;
|
|
|
|
|
var form = this.formSearch.getForm();
|
|
|
|
|
var datetype = form.findField('DATETYPE').getValue();
|
|
|
|
|
if (datetype == 'OPDATE') {
|
|
|
|
|
|
|
|
|
|
var expDate_Min = form.findField('PS_EXPDATEBGN').getRawValue();
|
|
|
|
|
var expDate_Max = form.findField('PS_EXPDATEEND').getRawValue();
|
|
|
|
|
if (expDate_Min == '' || expDate_Min == null || expDate_Min == undefined) {
|
|
|
|
|
Ext.Msg.alert(Zi.LAN.TiShi, Zi.LAN.KSRQBNWK );
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (expDate_Max == '' || expDate_Max == null || expDate_Max == undefined) {
|
|
|
|
|
Ext.Msg.alert(Zi.LAN.TiShi, Zi.LAN.JKRQBNWK);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var expDate_Mindate = form.findField('PS_EXPDATEBGN').getValue();
|
|
|
|
|
var expDate_Maxdate = form.findField('PS_EXPDATEEND').getValue();
|
|
|
|
|
|
|
|
|
|
if (expDate_Mindate > expDate_Maxdate) {
|
|
|
|
|
Ext.Msg.alert(Zi.LAN.TiShi, Zi.LAN.KSRQBNDYJSRQ );
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
this.InitGrid(datetype,expDate_Min, expDate_Max);
|
|
|
|
|
} else {
|
|
|
|
|
var expDate_Min = form.findField('PS_ACCDATEBGN').getRawValue();
|
|
|
|
|
var expDate_Max = form.findField('PS_ACCDATEEND').getRawValue();
|
|
|
|
|
if (expDate_Min == '' || expDate_Min == null || expDate_Min == undefined) {
|
|
|
|
|
Ext.Msg.alert(Zi.LAN.TiShi, Zi.LAN.KSKQQJBNWK);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (expDate_Max == '' || expDate_Max == null || expDate_Max == undefined) {
|
|
|
|
|
Ext.Msg.alert(Zi.LAN.TiShi, Zi.LAN.JSKQQJBNWK);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var expDate_Mindate = form.findField('PS_ACCDATEBGN').getValue();
|
|
|
|
|
var expDate_Maxdate = form.findField('PS_ACCDATEEND').getValue();
|
|
|
|
|
|
|
|
|
|
if (expDate_Mindate > expDate_Maxdate) {
|
|
|
|
|
Ext.Msg.alert(Zi.LAN.TiShi, Zi.LAN.KSQJQJBNDYJSKJQJ);
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
this.InitGrid(datetype, expDate_Min, expDate_Max);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
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 FEESTATUS = form.findField('FEESTATUS').getValue();
|
|
|
|
|
// sql = sql + getAndConSql(sql, FEESTATUS, "B.FEESTATUS=" + FEESTATUS);
|
|
|
|
|
|
|
|
|
|
var SUBCOMP = form.findField('SUBCOMP').getValue();
|
|
|
|
|
sql = sql + getAndConSql(sql, SUBCOMP, "B.CORPID='" + SUBCOMP + "'");
|
|
|
|
|
var SALECORPID = form.findField('SALECORPID').getValue();
|
|
|
|
|
sql = sql + getAndConSql(sql, SALECORPID, "B.SALECORPID='" + SALECORPID + "'");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.OprationStatus;
|
|
|
|
|
ret[1] = this.storeList;
|
|
|
|
|
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.panelSaleCustSum) {
|
|
|
|
|
this.girdcolumssalecust = DsTruck.SaveGridPanel(USERID, this.formname + 'salecust', this.gridListSaleCust.columns, this.girdcolumssalecust, 1, true);
|
|
|
|
|
} else if (this.tabpanel.getActiveTab() == this.panelOpCustSum) {
|
|
|
|
|
this.girdcolumsopcust = DsTruck.SaveGridPanel(USERID, this.formname + 'opcust', this.gridListOpCust.columns, this.girdcolumsopcust, 1, true);
|
|
|
|
|
} else if (this.tabpanel.getActiveTab() == this.panelSaleDeptSum) {
|
|
|
|
|
this.girdcolumssaledept = DsTruck.SaveGridPanel(USERID, this.formname + 'saledept', this.gridListSaleDept.columns, this.girdcolumssaledept, 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.panelSaleCustSum) {
|
|
|
|
|
this.gridListSaleCust.reconfigure(this.storeSaleCustList, this.initgirdcolumssalecust);
|
|
|
|
|
this.girdcolumssalecust = DsTruck.SaveGridPanel(USERID, this.formname + 'salecust', this.gridListSaleCust.columns, this.initgirdcolumssalecust, 1, true);
|
|
|
|
|
} else if (this.tabpanel.getActiveTab() == this.panelOpCustSum) {
|
|
|
|
|
this.gridListOpCust.reconfigure(this.storeOpCustList, this.initgirdcolumsopcust);
|
|
|
|
|
this.girdcolumsopcust = DsTruck.SaveGridPanel(USERID, this.formname + 'opcust', this.gridListOpCust.columns, this.initgirdcolumsopcust, 1, true);
|
|
|
|
|
} else if (this.tabpanel.getActiveTab() == this.panelSaleDeptSum) {
|
|
|
|
|
this.gridListSaleDept.reconfigure(this.storeSaleDeptList, this.initgirdcolumssaledept);
|
|
|
|
|
this.girdcolumssaledept = DsTruck.SaveGridPanel(USERID, this.formname + 'saledept', this.gridListSaleDept.columns, this.initgirdcolumssaledept, 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);
|
|
|
|
|
} else if (this.tabpanel.getActiveTab() == this.panelOpCustSum) {
|
|
|
|
|
grid2Excel(this.gridListOpCust, "操作客户欠费月度");
|
|
|
|
|
// GridExportExcelPage(this.gridListSaleCust);
|
|
|
|
|
} else if (this.tabpanel.getActiveTab() == this.panelSaleDeptSum) {
|
|
|
|
|
grid2Excel(this.gridListSaleDept, "部门欠费月度");
|
|
|
|
|
// GridExportExcelPage(this.gridListCust);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Print: function () {
|
|
|
|
|
var form = this.formSearch.getForm();
|
|
|
|
|
var expDate_Min = form.findField('PS_EXPDATEBGN').getRawValue();
|
|
|
|
|
var expDate_Max = form.findField('PS_EXPDATEEND').getRawValue();
|
|
|
|
|
if (expDate_Min == '' || expDate_Min == null || expDate_Min == undefined) {
|
|
|
|
|
Ext.Msg.alert(Zi.LAN.TiShi, Zi.LAN.KSRQBNWK);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (expDate_Max == '' || expDate_Max == null || expDate_Max == undefined) {
|
|
|
|
|
Ext.Msg.alert(Zi.LAN.TiShi, Zi.LAN.JKRQBNWK);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var expDate_Mindate = form.findField('PS_EXPDATEBGN').getValue();
|
|
|
|
|
var expDate_Maxdate = form.findField('PS_EXPDATEEND').getValue();
|
|
|
|
|
|
|
|
|
|
var startdate = expDate_Min;
|
|
|
|
|
var enddate = expDate_Min;
|
|
|
|
|
|
|
|
|
|
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/MsRptNoTotalMonth/SaleListData',
|
|
|
|
|
scope: this,
|
|
|
|
|
params: {
|
|
|
|
|
start: 0, limit: this.PageSize,
|
|
|
|
|
condition: _this.sqlcontext,
|
|
|
|
|
startmonth: startdate,
|
|
|
|
|
endmonth: enddate,
|
|
|
|
|
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 = 'MSRPTNOTOTALMONTHSALE';
|
|
|
|
|
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/MsRptNoTotalMonth/CustListData',
|
|
|
|
|
scope: this,
|
|
|
|
|
params: {
|
|
|
|
|
start: 0, limit: this.PageSize,
|
|
|
|
|
condition: _this.sqlcontext,
|
|
|
|
|
startmonth: startdate,
|
|
|
|
|
endmonth: enddate,
|
|
|
|
|
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 = 'MSRPTNOTOTALMONTHCUST';
|
|
|
|
|
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/MsRptNoTotalMonth/SaleCustListData',
|
|
|
|
|
scope: this,
|
|
|
|
|
params: {
|
|
|
|
|
start: 0, limit: this.PageSize,
|
|
|
|
|
condition: sql,
|
|
|
|
|
startmonth: startdate,
|
|
|
|
|
endmonth: enddate,
|
|
|
|
|
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 = 'MSRPTNOTOTALMONTHSALECUST';
|
|
|
|
|
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.panelOpCustSum) {
|
|
|
|
|
|
|
|
|
|
if (this.storeOpCustList.getCount() == 0) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
var sortstr = ' B.OP,F.CUSTOMERNAME';
|
|
|
|
|
if (this.opcustsumsortfield != '' && this.opcustsumsortdire != '') {
|
|
|
|
|
|
|
|
|
|
sortstr = this.opcustsumsortfield + ' ' + this.opcustsumsortdire;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Ext.Msg.wait('正在组织数据, 请稍侯..');
|
|
|
|
|
Ext.Ajax.request({
|
|
|
|
|
waitMsg: '正在组织数据...',
|
|
|
|
|
url: '/MvcShipping/MsRptNoTotalMonth/OpCustListData',
|
|
|
|
|
scope: this,
|
|
|
|
|
params: {
|
|
|
|
|
start: 0, limit: this.PageSize,
|
|
|
|
|
condition: sql,
|
|
|
|
|
startmonth: startdate,
|
|
|
|
|
endmonth: enddate,
|
|
|
|
|
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 = 'MSRPTNOTOTALMONTHOPCUST';
|
|
|
|
|
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.panelSaleDeptSum) {
|
|
|
|
|
|
|
|
|
|
if (this.storeSaleDeptList.getCount() == 0) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
var sortstr = ' B.SALEDEPT';
|
|
|
|
|
|
|
|
|
|
//if (this.salesumsortfield != '' && this.salesumsortdire != '') {
|
|
|
|
|
|
|
|
|
|
// sortstr = this.saledesumsortfield + ' ' + this.salesumsortdire;
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
Ext.Msg.wait('正在组织数据, 请稍侯..');
|
|
|
|
|
Ext.Ajax.request({
|
|
|
|
|
waitMsg: '正在组织数据...',
|
|
|
|
|
url: '/MvcShipping/MsRptNoTotalMonth/DeptListData',
|
|
|
|
|
scope: this,
|
|
|
|
|
params: {
|
|
|
|
|
start: 0, limit: this.PageSize,
|
|
|
|
|
condition: _this.sqlcontext,
|
|
|
|
|
startmonth: startdate,
|
|
|
|
|
endmonth: enddate,
|
|
|
|
|
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 = 'MSRPTNOTOTALMONTHSALE';
|
|
|
|
|
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
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|