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.
DS7/DSWeb/Areas/MvcShipping/Viewsjs/MsRptOpProfitMonth/MsRptOpProfitMonthIndex.js

4041 lines
173 KiB
JavaScript

3 years ago
//欠费月度统计
Ext.namespace('Shipping');
Shipping.MsRptOpProfitMonthIndex = function (config) {
Ext.applyIf(this, config);
this.initUIComponents();
window.Shipping.MsRptOpProfitMonthIndex.superclass.constructor.call(this);
};
Ext.extend(Shipping.MsRptOpProfitMonthIndex, Ext.Panel, {
PageSize: 500,
OprationStatus: null, //仅当弹出界面时使用
SelectedRecord: null,
sqlcontext: '1=2',
salesumsortfield: '',
salesumsortdire: '',
saledeptsumsortfield: '',
saledeptsumsortdire: '',
salecorpsumsortfield: '',
salecorpsumsortdire: '',
opsumsortfield: '',
opsumsortdire: '',
opdeptsumsortfield: '',
opdeptsumsortdire: '',
custsumsortfield: '',
custsumsortdire: '',
carriersumsortfield: '',
carriersumsortdire: '',
yardsumsortfield: '',
yardsumsortdire: '',
lanesumsortfield: '',
lanesumsortdire: '',
bslistsortfield: '',
bslistsortdire: '',
initUIComponents: function () {
//定义数据集
this.formname = 'MsRptOpProfitMonthIndex';
//定义数据集
this.storeList = Ext.create('Ext.data.Store', {
pageSize: this.PageSize,
fields: [
{ name: 'BSNO', type: 'string' },
{ name: 'OPLB', type: 'string' },
{ name: 'OPLBNAME', type: 'string' },
{ name: 'OPTYPE', type: 'string' },
{ name: 'BSTYPE', type: 'string' },
{ name: 'BLTYPE', type: 'string' },
{ name: 'BLFRT', type: 'string' },
{ name: 'FEESTATUSREF', type: 'string' },
{ name: 'CUSTOMERNAME', type: 'string' },
{ name: 'AGENTID', type: 'string' },
// { name: 'CUSTFULLNAME', type: 'string' },
{ name: 'CUSTNO', type: 'string' },
{ name: 'MBLNO', type: 'string' },
{ name: 'HBLNO', type: 'string' },
{ name: 'ETD', type: 'string' },
{ name: 'VESSEL', type: 'string' },
{ name: 'VOYNO', type: 'string' },
{ name: 'INPUTBY', type: 'string' },
{ name: 'CREATETIME', type: 'string' },
{ name: 'BSSTATUS', type: 'string' },
{ name: 'SALE', type: 'string' },
{ name: 'OP', type: 'string' },
{ name: 'DOC', type: 'string' },
{ name: 'CUSTSERVICE', type: 'string' },
{ name: 'FRCUSTSERVICE', type: 'string' },
{ name: 'PORTLOAD', type: 'string' },
{ name: 'PORTDISCHARGE', type: 'string' },
{ name: 'DESTINATION', type: 'string' },
{ name: 'CUSTOMNO', type: 'string' },
{ name: 'ACCDATE', type: 'string' },
{ name: 'CARRIER', type: 'string' },
{ name: 'BSSOURCE', type: 'string' },
{ name: 'LANE', type: 'string' },
{ name: 'CONTRACTNO', type: 'string' },
{ name: 'FORWARDER', type: 'string' },
{ name: 'CNTRTOTAL', type: 'string' },
{ name: 'TRADETYPE', type: 'string' },
{ name: 'GOODSNAME', type: 'string' },
{ name: 'OPDATE', type: 'string' },
{ name: 'CUSTOMDATE', type: 'string' },
{ name: 'ENTERP', type: 'string' },
{ name: 'REMARK', type: 'string' },
{ name: 'YARD', type: 'string' },
{ name: 'PKGS', type: 'number' },
{ name: 'CBM', type: 'number' },
{ name: 'KGS', type: 'number' },
{ name: 'NETWEIGHT', type: 'number' },
{ name: 'TEU', type: 'number' },
{ name: 'CNTR1', type: 'number' },
{ name: 'CNTR2', type: 'number' },
{ name: 'CNTR3', type: 'number' },
{ name: 'CNTR4', type: 'number' },
{ name: 'CNTR5', type: 'number' },
{ name: 'CNTR6', type: 'number' },
{ name: 'CNTR7', type: 'number' },
{ name: 'CNTR8', type: 'number' },
{ name: 'CNTR9', type: 'number' },
{ name: 'CNTR10', type: 'number' },
{ name: 'OTCNTR', type: 'number' },
{ name: 'RMBDR', type: 'number' },
{ name: 'RMBCR', type: 'number' },
{ name: 'USDDR', type: 'number' },
{ name: 'USDCR', type: 'number' },
{ name: 'OTDR', type: 'number' },
{ name: 'OTCR', type: 'number' },
{ name: 'TTLDR', type: 'number' },
{ name: 'TTLCR', type: 'number' },
{ name: 'TTLTAXDR', type: 'number' },
{ name: 'TTLTAXCR', type: 'number' },
{ name: 'TTLTAXPROFIT', type: 'number' },
{ name: 'RMBPROFIT', type: 'number' },
{ name: 'USDPROFIT', type: 'number' },
{ name: 'OTPROFIT', type: 'number' },
{ name: 'TTLPROFIT', type: 'number' },
{ name: 'NOTAXRMBDR', type: 'number' },
{ name: 'NOTAXRMBCR', type: 'number' },
{ name: 'NOTAXUSDDR', type: 'number' },
{ name: 'NOTAXUSDCR', type: 'number' },
{ name: 'NOTAXOTDR', type: 'number' },
{ name: 'NOTAXOTCR', type: 'number' },
{ name: 'NOTAXTTLDR', type: 'number' },
{ name: 'NOTAXTTLCR', type: 'number' },
{ name: 'NOTAXRMBPROFIT', type: 'number' },
{ name: 'NOTAXUSDPROFIT', type: 'number' },
{ name: 'NOTAXOTPROFIT', type: 'number' },
{ name: 'NOTAXTTLPROFIT', type: 'number' },
{ name: 'NOACCTAXRMBDR', type: 'number' },
{ name: 'NOACCTAXRMBCR', type: 'number' },
{ name: 'NOACCTAXUSDDR', type: 'number' },
{ name: 'NOACCTAXUSDCR', type: 'number' },
{ name: 'NOACCTAXOTDR', type: 'number' },
{ name: 'NOACCTAXOTCR', type: 'number' },
{ name: 'NOACCTAXTTLDR', type: 'number' },
{ name: 'NOACCTAXTTLCR', type: 'number' },
{ name: 'NOACCTAXRMBPROFIT', type: 'number' },
{ name: 'NOACCTAXUSDPROFIT', type: 'number' },
{ name: 'NOACCTAXOTPROFIT', type: 'number' },
{ name: 'NOACCTAXTTLPROFIT', type: 'number' },
{ name: 'RMBNODR', type: 'number' },
{ name: 'USDNODR', type: 'number' },
{ name: 'OTNODR', type: 'number' },
{ name: 'TTLNODR', type: 'number' },
{ name: 'RMBNOCR', type: 'number' },
{ name: 'USDNOCR', type: 'number' },
{ name: 'OTNOCR', type: 'number' },
{ name: 'TTLNOCR', type: 'number' },
{ name: 'STLRMBDR', type: 'number' },
{ name: 'STLUSDDR', type: 'number' },
{ name: 'STLOTDR', type: 'number' },
{ name: 'STLTTLDR', type: 'number' },
{ name: 'STLRMBCR', type: 'number' },
{ name: 'STLUSDCR', type: 'number' },
{ name: 'STLOTCR', type: 'number' },
{ name: 'STLTTLCR', type: 'number' },
{ name: 'PROFITRATE', type: 'number' }
],
remoteSort: true,
proxy: {
type: 'ajax',
timeout: 120000,
url: '/MvcShipping/MsRptOpProfitMonth/BsListData',
reader: {
id: '',
root: 'data',
totalProperty: 'totalCount'
}
}
});
//定义Grid
this.initgirdcolums = [{
sortable: true,
dataIndex: 'BSNO',
text: '编号',
hidden: true,
width: 130
}, {
sortable: true,
dataIndex: 'OPLBNAME',
text: Zi.LAN.OPLBNAME,
width: 70
}, {
sortable: true,
dataIndex: 'OPTYPE',
text: Zi.LAN.OPTYPE,
width: 70
}, {
sortable: true,
dataIndex: 'FEESTATUSREF',
text: Zi.LAN.FEESTATUSREF,
width: 70
}, {
sortable: true,
dataIndex: 'BSSTATUS',
text: Zi.LAN.BSSTATUS,
width: 70,
renderer: function (value, meta) {
if (value == '1')
return '锁定'; //是
else
return '未锁定';
}
}, {
sortable: true,
dataIndex: 'BSTYPE',
text: Zi.LAN.BSTYPE,
width: 70
}, {
sortable: true,
dataIndex: 'BLTYPE',
text: Zi.LAN.BLTYPE,
width: 70
}, {
sortable: true,
dataIndex: 'BLFRT',
text: Zi.LAN.BLFRT,
width: 70
}, {
sortable: true,
dataIndex: 'OPDATE',
text: Zi.LAN.OPDATE,
width: 86
}, {
sortable: true,
dataIndex: 'CUSTOMDATE',
text: Zi.LAN.CUSTOMDATE,
width: 86
}, {
sortable: true,
dataIndex: 'CUSTOMERNAME',
text: Zi.LAN.CUSTOMERNAME,
width: 120
}, {
sortable: true,
dataIndex: 'AGENTID',
text: Zi.LAN.AGENTID,
width: 120
}, {
sortable: true,
dataIndex: 'CUSTNO',
text: Zi.LAN.CUSTNO,
width: 136
}, {
sortable: true,
dataIndex: 'CUSTOMNO',
text: Zi.LAN.CUSTOMNO,
width: 136
}, {
sortable: true,
dataIndex: 'ENTERP',
text: Zi.LAN.ENTERP,
width: 100
}, {
sortable: true,
dataIndex: 'MBLNO',
text: Zi.LAN.MBLNO,
width: 120
}, {
sortable: true,
dataIndex: 'HBLNO',
text: Zi.LAN.HBLNO ,
width: 120
}, {
sortable: true,
dataIndex: 'ETD',
text: Zi.LAN.ETD,
width: 86
}, {
sortable: true,
dataIndex: 'VESSEL',
text: Zi.LAN.VESSEL,
width: 200
}, {
sortable: true,
dataIndex: 'VOYNO',
text: Zi.LAN.VOYNO,
width: 50
}, {
sortable: true,
dataIndex: 'SALE',
text: Zi.LAN.SALE,
width: 80
}, {
sortable: true,
dataIndex: 'OP',
text: Zi.LAN.OP,
width: 80
}, {
sortable: true,
dataIndex: 'DOC',
text: Zi.LAN.DOC,
width: 80
}, {
sortable: true,
dataIndex: 'CUSTSERVICE',
text: Zi.LAN.CUSTSERVICE,
width: 80
}, {
sortable: true,
dataIndex: 'FRCUSTSERVICE',
text: Zi.LAN.FRCUSTSERVICE,
width: 80
}, {
sortable: true,
dataIndex: 'CONTRACTNO',
text: Zi.LAN.CONTRACTNO,
width: 80
}, {
sortable: true,
dataIndex: 'PORTLOAD',
text: Zi.LAN.PORTLOAD,
width: 80
}, {
sortable: true,
dataIndex: 'PORTDISCHARGE',
text: Zi.LAN.PORTDISCHARGE,
width: 150
}, {
sortable: true,
dataIndex: 'DESTINATION',
header: Zi.LAN.DESTINATION,
width: 150
}, {
sortable: true,
dataIndex: 'ACCDATE',
text: Zi.LAN.ACCDATE,
width: 80
}, {
sortable: true,
dataIndex: 'CARRIER',
text: Zi.LAN.CARRIER,
width: 80
}, {
sortable: true,
dataIndex: 'LANE',
text: Zi.LAN.LANE,
width: 80
}, {
sortable: true,
dataIndex: 'BSSOURCE',
text: Zi.LAN.BSSOURCE,
width: 120
}, {
sortable: true,
dataIndex: 'YARD',
text: Zi.LAN.YARD,
width: 120
}, {
sortable: true,
dataIndex: 'REMARK',
text: Zi.LAN.REMARK,
width: 120
}, {
sortable: true,
dataIndex: 'TEU',
text: 'TEU',
width: 80
}, {
sortable: true,
dataIndex: 'PKGS',
text: Zi.LAN.PKGS,
width: 80
}, {
sortable: true,
dataIndex: 'KGS',
text: 'KGS',
width: 80
}, {
sortable: true,
dataIndex: 'CBM',
text: Zi.LAN.CBM,
width: 80
}, {
sortable: true,
dataIndex: 'NETWEIGHT',
text: Zi.LAN.NETWEIGHT,
width: 80
}, {
sortable: true,
dataIndex: 'GOODSNAME',
text: Zi.LAN.GOODSNAME,
width: 80
}, {
sortable: true,
dataIndex: 'CREATETIME',
text: Zi.LAN.CREATETIME,
width: 80
}, {
sortable: true,
dataIndex: 'CNTRTOTAL',
text: Zi.LAN.CNTRTOTAL,
width: 80
},
{
sortable: true,
id: '',
dataIndex: 'CNTR1',
text: '箱型1',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'CNTR2',
text: '箱型2',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'CNTR3',
text: '箱型3',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'CNTR4',
text: '箱型4',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'CNTR5',
text: '箱型5',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'CNTR6',
text: '箱型6',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'CNTR7',
text: '箱型7',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'CNTR8',
text: '箱型8',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'CNTR9',
text: '箱型9',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'CNTR10',
text: '箱型10',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'OTCNTR',
text: Zi.LAN.OTCNTR,
width: 60
}, {
text: Zi.LAN.ALLIN,
dataIndex: 'ALLIN',
columns: [{
sortable: true,
dataIndex: 'RMBDR',
text: Zi.LAN.RMBDR,
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: 'RMBCR',
text: Zi.LAN.RMBCR,
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: 'RMBPROFIT',
text: Zi.LAN.RMBPROFIT,
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: 'USDDR',
text: Zi.LAN.USDDR,
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: 'USDCR',
text: Zi.LAN.USDCR,
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: 'USDPROFIT',
text: Zi.LAN.USDPROFIT,
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: 'OTDR',
text: Zi.LAN.OTDR,
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: 'OTCR',
text: Zi.LAN.OTCR,
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: 'OTPROFIT',
text: Zi.LAN.OTPROFIT,
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: 'TTLDR',
text: Zi.LAN.TTLDR,
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: 'TTLCR',
text: Zi.LAN.TTLCR,
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: 'TTLPROFIT',
text: Zi.LAN.TTLPROFIT,
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: 'PROFITRATE',
text: Zi.LAN.PROFITRATE ,
width: 80,
renderer: function (value, meta) {
if (value != 0) value = value + '%';
return value;
}
}, {
sortable: true,
dataIndex: 'TTLTAXDR',
text: Zi.LAN.TTLTAXDR,
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: 'TTLTAXCR',
text: Zi.LAN.TTLTAXCR,
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: 'TTLTAXPROFIT',
text: Zi.LAN.TTLTAXPROFIT,
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
}]
}, {
text: Zi.LAN.ALLBALANCE,
dataIndex: 'ALLBALANCE',
columns: [{
sortable: true,
dataIndex: 'STLRMBDR',
text: Zi.LAN.STLRMBDR,
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: 'RMBNODR',
text: Zi.LAN.RMBNODR,
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: 'STLUSDDR',
text: Zi.LAN.STLUSDDR,
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: 'USDNODR',
text: Zi.LAN.USDNODR,
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: 'STLOTDR',
text: Zi.LAN.STLOTDR,
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: 'OTNODR',
text: Zi.LAN.OTNODR,
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: 'STLTTLDR',
text: Zi.LAN.STLTTLDR,
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: 'TTLNODR',
text: Zi.LAN.TTLNODR,
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: 'STLRMBCR',
text: Zi.LAN.STLRMBCR,
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: 'RMBNOCR',
text: Zi.LAN.RMBNOCR,
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: 'STLUSDCR',
text: Zi.LAN.STLUSDCR,
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: 'USDNOCR',
text: Zi.LAN.USDNOCR,
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: 'STLOTCR',
text: Zi.LAN.STLOTCR,
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: 'OTNOCR',
text: Zi.LAN.OTNOCR,
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: 'STLTTLCR',
text: Zi.LAN.STLTTLCR,
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: 'TTLNOCR',
text: Zi.LAN.TTLNOCR,
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
}]
}, {
text: Zi.LAN.ALLNOTAX,
dataIndex: 'ALLNOTAX',
columns: [{
sortable: true,
dataIndex: 'NOTAXRMBDR',
text: Zi.LAN.NOTAXRMBDR,
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: 90
}, {
sortable: true,
dataIndex: 'NOTAXRMBCR',
text: Zi.LAN.NOTAXRMBCR,
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: 90
}, {
sortable: true,
dataIndex: 'NOTAXRMBPROFIT',
text: Zi.LAN.NOTAXRMBPROFIT,
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: 90
}, {
sortable: true,
dataIndex: 'NOTAXUSDDR',
text: Zi.LAN.NOTAXUSDDR,
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: 90
}, {
sortable: true,
dataIndex: 'NOTAXUSDCR',
text: Zi.LAN.NOTAXUSDCR,
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: 90
}, {
sortable: true,
dataIndex: 'NOTAXUSDPROFIT',
text: Zi.LAN.NOTAXUSDPROFIT,
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: 90
}, {
sortable: true,
dataIndex: 'NOTAXOTDR',
text: Zi.LAN.NOTAXOTDR,
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: 90
}, {
sortable: true,
dataIndex: 'NOTAXOTCR',
text: Zi.LAN.NOTAXOTCR,
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: 90
}, {
sortable: true,
dataIndex: 'NOTAXOTPROFIT',
text: Zi.LAN.NOTAXOTPROFIT,
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: 90
}, {
sortable: true,
dataIndex: 'NOTAXTTLDR',
text: Zi.LAN.NOTAXTTLDR,
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: 90
}, {
sortable: true,
dataIndex: 'NOTAXTTLCR',
text: Zi.LAN.NOTAXTTLCR,
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: 90
}, {
sortable: true,
dataIndex: 'NOTAXTTLPROFIT',
text: Zi.LAN.NOTAXTTLPROFIT,
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: 90
}]
}, {
text: Zi.LAN.ALLNOACCTAX,
dataIndex: 'ALLNOACCTAX',
columns: [{
sortable: true,
dataIndex: 'NOACCTAXRMBDR',
text: Zi.LAN.NOACCTAXRMBDR,
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: 90
}, {
sortable: true,
dataIndex: 'NOACCTAXRMBCR',
text: Zi.LAN.NOACCTAXRMBCR,
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: 90
}, {
sortable: true,
dataIndex: 'NOACCTAXRMBPROFIT',
text: Zi.LAN.NOACCTAXRMBPROFIT,
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: 90
}, {
sortable: true,
dataIndex: 'NOACCTAXUSDDR',
text: Zi.LAN.NOACCTAXUSDDR,
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: 90
}, {
sortable: true,
dataIndex: 'NOACCTAXUSDCR',
text: Zi.LAN.NOACCTAXUSDCR,
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: 90
}, {
sortable: true,
dataIndex: 'NOACCTAXUSDPROFIT',
text: Zi.LAN.NOACCTAXUSDPROFIT,
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: 90
}, {
sortable: true,
dataIndex: 'NOACCTAXOTDR',
text: Zi.LAN.NOACCTAXOTDR,
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: 90
}, {
sortable: true,
dataIndex: 'NOACCTAXOTCR',
text: Zi.LAN.NOACCTAXOTCR,
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: 90
}, {
sortable: true,
dataIndex: 'NOACCTAXOTPROFIT',
text: Zi.LAN.NOACCTAXOTPROFIT,
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: 90
}, {
sortable: true,
dataIndex: 'NOACCTAXTTLDR',
text: Zi.LAN.NOACCTAXTTLDR,
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: 90
}, {
sortable: true,
dataIndex: 'NOACCTAXTTLCR',
text: Zi.LAN.NOACCTAXTTLCR,
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: 90
}, {
sortable: true,
dataIndex: 'NOACCTAXTTLPROFIT',
text: Zi.LAN.NOACCTAXTTLPROFIT,
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: 90
}]
}
];
this.Pagenum = Ext.create('Ext.form.field.Number', {
name: 'bottles',
fieldLabel: '每页记录数',
labelAlign: 'right',
value: this.PageSize,
maxValue: 100000,
width: 180,
minValue: 0,
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
});
// this.girdcolums = this.initgirdcolums;
this.girdcolums = DsTruck.GetGridPanel(USERID, this.formname + 'bs', this.initgirdcolums, 1);
this.gridList = new Ext.grid.GridPanel({
store: this.storeList,
enableHdMenu: false,
region: 'center',
loadMask: { msg: "数据加载中,请稍等..." },
trackMouseOver: true,
disableSelection: false,
columns: this.girdcolums,
// paging bar on the bottom
bbar: [Ext.create('Ext.PagingToolbar', {
store: this.storeList,
displayInfo: true,
displayMsg: '当前显示 {0} - {1}条记录 /共 {2}条记录',
emptyMsg: "没有数据"
}), this.Pagenum]
});
// this.girdcolums = DsTruck.GetGridPanel(USERID, this.formname + 'bs', this.girdcolums, 1);
// this.gridList.reconfigure(this.storeList, this.girdcolums);
this.gridList.addListener('itemdblclick', function (dataview, record, item, index, e, b) {
this.SelectedRecord = record;
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 = "";
if (record.data.OPLBNAME == "报关业务") {
openUrl = "../MvcShipping/MsOpApply/ApplyFeeView?handle=check&bsno=" + record.data.BSNO;
} else {
openUrl = "../MvcShipping/MsOpBill/MsOpFeeView?handle=check&bsno=" + record.data.BSNO;
}
window.open(openUrl, openType, openSet);
}, this);
this.gridList.addListener('sortchange', function (ct, column, direction, eOpts) {
this.bslistsortfield = column.dataIndex;
this.bslistsortdire = direction;
}, this);
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: "数据加载中,请稍等..." },
trackMouseOver: true,
disableSelection: false,
columns: this.girdcolumssale,
// paging bar on the bottom
bbar: Ext.create('Ext.PagingToolbar', {
store: this.storeSaleList,
displayInfo: true,
displayMsg: '当前显示 {0} - {1}条记录 /共 {2}条记录',
emptyMsg: "没有数据"
})
});
this.gridListSale.addListener('sortchange', function (ct, column, direction, eOpts) {
this.salesumsortfield = column.dataIndex;
this.salesumsortdire = direction;
}, this);
this.storeSaleDeptList = null;
// //定义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: "数据加载中,请稍等..." },
trackMouseOver: true,
disableSelection: false,
columns: this.girdcolumssaledept,
// paging bar on the bottom
bbar: Ext.create('Ext.PagingToolbar', {
store: this.storeSaleDeptList,
displayInfo: true,
displayMsg: '当前显示 {0} - {1}条记录 /共 {2}条记录',
emptyMsg: "没有数据"
})
});
this.gridListSaleDept.addListener('sortchange', function (ct, column, direction, eOpts) {
this.saledeptsumsortfield = column.dataIndex;
this.saledeptsumsortdire = direction;
}, this);
this.storeOpList = null;
// //定义Grid
this.girdcolumsop = [{
sortable: true,
dataIndex: 'OP',
text: Zi.LAN.OP,
width: 100
}];
this.gridListOp = new Ext.grid.GridPanel({
store: this.storeOpList,
enableHdMenu: false,
region: 'center',
loadMask: { msg: "数据加载中,请稍等..." },
trackMouseOver: true,
disableSelection: false,
columns: this.girdcolumsop,
// paging bar on the bottom
bbar: Ext.create('Ext.PagingToolbar', {
store: this.storeOpList,
displayInfo: true,
displayMsg: '当前显示 {0} - {1}条记录 /共 {2}条记录',
emptyMsg: "没有数据"
})
});
this.gridListOp.addListener('sortchange', function (ct, column, direction, eOpts) {
this.opsumsortfield = column.dataIndex;
this.opsumsortdire = direction;
}, this);
this.storeOpDeptList = null;
// //定义Grid
this.girdcolumsopdept = [{
sortable: true,
dataIndex: 'OPDEPT',
text: Zi.LAN.OPDEPT,
width: 100
}];
this.gridListOpDept = new Ext.grid.GridPanel({
store: this.storeOpDeptList,
enableHdMenu: false,
region: 'center',
loadMask: { msg: "数据加载中,请稍等..." },
trackMouseOver: true,
disableSelection: false,
columns: this.girdcolumsopdept,
// paging bar on the bottom
bbar: Ext.create('Ext.PagingToolbar', {
store: this.storeOpDeptList,
displayInfo: true,
displayMsg: '当前显示 {0} - {1}条记录 /共 {2}条记录',
emptyMsg: "没有数据"
})
});
this.gridListOpDept.addListener('sortchange', function (ct, column, direction, eOpts) {
this.opdeptsumsortfield = column.dataIndex;
this.opdeptsumsortdire = direction;
}, this);
this.storeSaleCorpList = null;
// //定义Grid
this.girdcolumssalecorp = [{
sortable: true,
dataIndex: 'SALECORP',
text: Zi.LAN.SALECORP,
width: 100
}];
this.gridListSaleCorp = new Ext.grid.GridPanel({
store: this.storeSaleCorpList,
enableHdMenu: false,
region: 'center',
loadMask: { msg: "数据加载中,请稍等..." },
trackMouseOver: true,
disableSelection: false,
columns: this.girdcolumssalecorp,
// paging bar on the bottom
bbar: Ext.create('Ext.PagingToolbar', {
store: this.storeSaleCorpList,
displayInfo: true,
displayMsg: '当前显示 {0} - {1}条记录 /共 {2}条记录',
emptyMsg: "没有数据"
})
});
this.gridListSaleCorp.addListener('sortchange', function (ct, column, direction, eOpts) {
this.salecorpsumsortfield = column.dataIndex;
this.salecorpsumsortdire = direction;
}, this);
this.storeCustList = null;
//定义Grid
this.girdcolumscust = [{
sortable: true,
dataIndex: 'CUSTOMERNAME',
text: Zi.LAN.CUSTOMERNAME,
width: 100
}
];
this.gridListCust = new Ext.grid.GridPanel({
store: this.storeCustList,
enableHdMenu: false,
region: 'center',
loadMask: { msg: "数据加载中,请稍等..." },
trackMouseOver: true,
disableSelection: false,
columns: this.girdcolumscust,
// paging bar on the bottom
bbar: Ext.create('Ext.PagingToolbar', {
store: this.storeCustList,
displayInfo: true,
displayMsg: '当前显示 {0} - {1}条记录 /共 {2}条记录',
emptyMsg: "没有数据"
})
});
this.gridListCust.addListener('sortchange', function (ct, column, direction, eOpts) {
this.custsumsortfield = column.dataIndex;
this.custsumsortdire = direction;
}, this);
this.storeCarrierList = null;
//定义Grid
this.girdcolumscarrier = [{
sortable: true,
dataIndex: 'CARRIER',
text: Zi.LAN.CARRIER,
width: 100
}
];
this.gridListCarrier= new Ext.grid.GridPanel({
store: this.storeCarrierList,
enableHdMenu: false,
region: 'center',
loadMask: { msg: "数据加载中,请稍等..." },
trackMouseOver: true,
disableSelection: false,
columns: this.girdcolumscarrier,
// paging bar on the bottom
bbar: Ext.create('Ext.PagingToolbar', {
store: this.storeCarrierList,
displayInfo: true,
displayMsg: '当前显示 {0} - {1}条记录 /共 {2}条记录',
emptyMsg: "没有数据"
})
});
this.gridListCarrier.addListener('sortchange', function (ct, column, direction, eOpts) {
this.carriersumsortfield = column.dataIndex;
this.carriersumsortdire = direction;
}, this);
this.storeYardList = null;
//定义Grid
this.girdcolumsyard = [{
sortable: true,
dataIndex: 'YARD',
text: Zi.LAN.YARD,
width: 100
}
];
this.gridListYard = new Ext.grid.GridPanel({
store: this.storeYardList,
enableHdMenu: false,
region: 'center',
loadMask: { msg: "数据加载中,请稍等..." },
trackMouseOver: true,
disableSelection: false,
columns: this.girdcolumsyard,
// paging bar on the bottom
bbar: Ext.create('Ext.PagingToolbar', {
store: this.storeYardList,
displayInfo: true,
displayMsg: '当前显示 {0} - {1}条记录 /共 {2}条记录',
emptyMsg: "没有数据"
})
});
this.gridListYard.addListener('sortchange', function (ct, column, direction, eOpts) {
this.yardsumsortfield = column.dataIndex;
this.yardsumsortdire = direction;
}, this);
this.storeLaneList = null;
//定义Grid
this.girdcolumslane = [{
sortable: true,
dataIndex: 'LANE',
text: Zi.LAN.LANE,
width: 100
}
];
this.gridListLane = new Ext.grid.GridPanel({
store: this.storeLaneList,
enableHdMenu: false,
region: 'center',
loadMask: { msg: "数据加载中,请稍等..." },
trackMouseOver: true,
disableSelection: false,
columns: this.girdcolumslane,
// paging bar on the bottom
bbar: Ext.create('Ext.PagingToolbar', {
store: this.storeLaneList,
displayInfo: true,
displayMsg: '当前显示 {0} - {1}条记录 /共 {2}条记录',
emptyMsg: "没有数据"
})
});
this.gridListLane.addListener('sortchange', function (ct, column, direction, eOpts) {
this.lanesumsortfield = column.dataIndex;
this.lanesumsortdire = direction;
}, this);
// this.storeSaleCustList = null;
// //定义Grid
// this.girdcolumssalecust = [{
// sortable: true,
// dataIndex: 'SALE',
// header: '揽货人',
// width: 100
// }, {
// sortable: true,
// dataIndex: 'CUSTNAME',
// header: '客户',
// width: 100
// }
// ];
// this.gridListSaleCust = new Ext.grid.GridPanel({
// store: this.storeSaleCustList,
// enableHdMenu: false,
// region: 'center',
// loadMask: { msg: "数据加载中,请稍等..." },
// trackMouseOver: true,
// disableSelection: false,
// columns: this.girdcolumssalecust,
// // paging bar on the bottom
// bbar: Ext.create('Ext.PagingToolbar', {
// store: this.storeSaleCustList,
// displayInfo: true,
// displayMsg: '当前显示 {0} - {1}条记录 /共 {2}条记录',
// emptyMsg: "没有数据"
// })
// });
// this.gridListSaleCust.addListener('sortchange', function (ct, column, direction, eOpts) {
// this.salecustsumsortfield = column.dataIndex;
// this.salecustsumsortdire = direction;
// }, this);
this.storeBsSourceList = null;
this.girdcolumsbssource = [{
sortable: true,
dataIndex: 'BSSOURCE',
text: Zi.LAN.BSSOURCE,
width: 80
}];
this.gridListBsSource = new Ext.grid.GridPanel({
store: this.storeBsSourceList,
enableHdMenu: false,
region: 'center',
loadMask: { msg: "数据加载中,请稍等..." },
trackMouseOver: true,
disableSelection: false,
columns: this.girdcolumsbssource,
bbar: Ext.create('Ext.PagingToolbar', {
store: this.storeBsSourceList,
displayInfo: true,
displayMsg: '当前显示 {0} - {1}条记录 /共 {2}条记录',
emptyMsg: "没有数据"
})
});
this.storeBsSourceDetailList = null;
this.girdcolumsbssourcedetail = [{
sortable: true,
dataIndex: 'BSSOURCE',
text: Zi.LAN.BSSOURCE,
width: 80
}, {
sortable: true,
dataIndex: 'BSSOURCEDETAIL',
text: Zi.LAN.BSSOURCEDETAIL,
width: 80
}];
this.gridListBsSourceDetail = new Ext.grid.GridPanel({
store: this.storeBsSourceDetailList,
enableHdMenu: false,
region: 'center',
loadMask: { msg: "数据加载中,请稍等..." },
trackMouseOver: true,
disableSelection: false,
columns: this.girdcolumsbssourcedetail,
bbar: Ext.create('Ext.PagingToolbar', {
store: this.storeBsSourceDetailList,
displayInfo: true,
displayMsg: '当前显示 {0} - {1}条记录 /共 {2}条记录',
emptyMsg: "没有数据"
})
});
this.storeSumList = null;
//定义Grid
this.gridListSum = new Ext.grid.GridPanel({
store: this.storeSumList,
enableHdMenu: false,
region: 'center',
loadMask: { msg: "数据加载中,请稍等..." },
trackMouseOver: true,
disableSelection: false,
columns: this.girdcolumsbssource
});
//#region formSearch
//#region formSearch枚举参照相关
_this = this;
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: 'EnumValueName',
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: 'EnumValueName',
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.PS_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.storeCARRIER = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CustomRefModel',
proxy: { url: '/CommMng/BasicDataRef/GetCustomRefListCARRIER' }
});
//船公司
this.comboxCARRIER = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.CARRIER, //'船公司',
store: this.storeCARRIER,
// labelWidth: 48,
// flex: 0.7,
forceSelection: true,
queryMode: 'remote',
minChars: 0,
queryParam: 'CODENAME',
name: 'CARRIER',
valueField: 'CustName',
displayField: 'CodeAndName',
enableKeyEvents: true,
listeners: {
keyup: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
});
//客户加载_船公司
this.storeYARD = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CustomRefModel',
proxy: { url: '/CommMng/BasicDataRef/GetCustomRefListYARD' }
});
//船公司
this.comboxYARD = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.YARD, //'船公司',
store: this.storeYARD,
// labelWidth: 48,
// flex: 0.7,
forceSelection: true,
queryMode: 'remote',
minChars: 0,
queryParam: 'CODENAME',
name: 'YARD',
valueField: 'CustName',
displayField: 'CodeAndName',
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": "未锁定", "Value": 0 }, { "Name": "锁定", "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.StoreCorp = Ext.create('DsExt.ux.RefTableStore', {
model: 'SubComp',
proxy: { url: '/MvcShipping/MsBaseInfo/GetCompanyEN' }
});
this.StoreCorp.load({ params: { condition: ""} });
this.comboxCorp= Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.CORPID,
store: this.StoreCorp,
name: 'CORPID',
valueField: 'GID',
displayField: 'NAME',
enableKeyEvents: true,
listeners: {
keyup: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
});
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.SALECORP,
store: this.StoreSubComp,
name: 'SUBCOMP',
valueField: 'GID',
displayField: 'NAME',
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": "业务日期" });
// this.storeBLNOTYPE.add({ "FSTATUS": "INVOICENO", "NAME": "发票号" });
this.storeDATETYPE.add({ "FSTATUS": "ACCDATE", "NAME": "会计期间" });
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();
}
}
}
});
//#endregion
this.formSearch = Ext.widget('form', {
frame: true,
region: 'center',
bodyPadding: 5,
fieldDefaults: {
margins: '2 2 2 2',
labelAlign: 'right',
flex: 1,
labelWidth: 80,
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.comboxCorp
]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [this.comboxOp, this.comboxSalesCode, this.comboxOpLb, this.comboxBsType, this.comboxCARRIER, this.comboxYARD, this.comboxSubComp
]
}
]//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
}, '-', {
xtype: 'button',
text: Zi.LAN.DsQuery,
iconCls: "btnmore",
handler: function (button, event) {
var sql = this.getCondition();
var winAccess = new Shipping.DsQuery({
});
winAccess.StoreList = this.storeList;
winAccess.formname = this.formname;
winAccess.condition = sql;
winAccess.show();
return;
},
scope: this
}, '-',
{
text: Zi.LAN.FIELDSET,
handler: function (button, event) {
window.open('/MvcShipping/MsRptOpProfitMonth/ProfitFieldSet', "FIELDSET", 'width=800,height=200,top=0,left=0,resizable=yes,status=yes,menubar=no,scrollbars=yes');
},
scope: this
}, '-', {
xtype: 'radiogroup',
fieldLabel: Zi.LAN.AMOUNTTYPE,
id: 'rdOBJNUM',
flex: 5,
columns: 8,
vertical: true,
items: [
{ id: 'rdoGain', boxLabel: '含税', name: 'OBJNUM', inputValue: '0', checked: true },
{ id: 'rdoArrearage', boxLabel: '不含税', name: 'OBJNUM', inputValue: '1' },
{ id: 'rdoTeu', boxLabel: '税前', name: 'OBJNUM', inputValue: '2' }
],
listeners: {
change: function (rd, newValue, oldValue, eOpts) {
if (_this.isquery)
_this.onRefreshClick();
}
}
}, '-', {
text: Zi.LAN.SaveGrid,
id: "btntest",
menu: [
{
text: Zi.LAN.SaveGrid2,
handler: function (button, event) {
_this.onSaveGridClick(button, event);
}
}, {
text: Zi.LAN.InitGrid,
handler: function (button, event) {
_this.oninitGridClick(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.panelBodyChFee = new Ext.Panel({
title: Zi.LAN.BodyChFee,
layout: "border",
region: 'center',
margin: '0 0',
frame: true,
items: [this.gridList]
});
this.panelSaleSum = new Ext.Panel({
title: Zi.LAN.SALE,
layout: "border",
region: 'center',
margin: '0 0',
frame: true,
items: [this.gridListSale]
});
this.panelSaleDeptSum = new Ext.Panel({
title: Zi.LAN.SALEDEPT,
layout: "border",
region: 'center',
margin: '0 0',
frame: true,
items: [this.gridListSaleDept]
});
this.panelSaleCorpSum = new Ext.Panel({
title: Zi.LAN.SALECORP,
layout: "border",
region: 'center',
margin: '0 0',
frame: true,
items: [this.gridListSaleCorp]
});
this.panelOpSum = new Ext.Panel({
title: Zi.LAN.OP,
layout: "border",
region: 'center',
margin: '0 0',
frame: true,
items: [this.gridListOp]
});
this.panelOpDeptSum = new Ext.Panel({
title: Zi.LAN.OPDEPT,
layout: "border",
region: 'center',
margin: '0 0',
frame: true,
items: [this.gridListOpDept]
});
this.panelCustSum = new Ext.Panel({
title: Zi.LAN.CUSTOMERNAME,
layout: "border",
region: 'center',
margin: '0 0',
frame: true,
items: [this.gridListCust]
});
this.panelCarrierSum = new Ext.Panel({
title: Zi.LAN.CARRIER,
layout: "border",
region: 'center',
margin: '0 0',
frame: true,
items: [this.gridListCarrier]
});
this.panelYardSum = new Ext.Panel({
title: Zi.LAN.YARD,
layout: "border",
region: 'center',
margin: '0 0',
frame: true,
items: [this.gridListYard]
});
this.panelLaneSum = new Ext.Panel({
title: Zi.LAN.LANE,
layout: "border",
region: 'center',
margin: '0 0',
frame: true,
items: [this.gridListLane]
});
// this.panelSaleCustSum = new Ext.Panel({
// title: '揽货人客户',
// layout: "border",
// region: 'center',
// margin: '0 0',
// frame: true,
// items: [this.gridListSaleCust]
// });
this.panelBsSourceSum = new Ext.Panel({
title: Zi.LAN.BSSOURCE,
layout: "border",
region: 'center',
margin: '0 0',
frame: true,
items: [this.gridListBsSource]
});
this.panelBsSourceDetailSum = new Ext.Panel({
title: Zi.LAN.BSSOURCEDETAIL,
layout: "border",
region: 'center',
margin: '0 0',
frame: true,
items: [this.gridListBsSourceDetail]
});
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.panelBodyChFee,
this.panelCustSum,
this.panelSaleSum,
this.panelSaleDeptSum,
this.panelSaleCorpSum,
this.panelOpSum,
this.panelOpDeptSum,
// this.panelSaleCustSum,
this.panelBsSourceSum,
this.panelBsSourceDetailSum,
this.panelCarrierSum,
this.panelYardSum,
this.panelLaneSum
],
//tab切换事件
listeners: {
'tabchange': function (tabPanel, newCard, oldCard, eOpts) {
_this.RpttabChange(tabPanel, newCard, oldCard, eOpts);
}
}
});
Ext.apply(this, {
items: [this.panelTop, this.panelSearch, this.tabpanel, this.panelSum]
});
this.storeList.on('beforeload', function (store) {
Ext.apply(store.proxy.extraParams, { condition: _this.sqlcontext });
}, this);
LoadQueryData(this.formname, this.formSearch, this.CheckSaveQuery);
}, //end initUIComponents
InitGrid: function (datetype, startdate, enddate, feetype) {
_this = this;
var zlcolumn = [];
var myfield = [];
var salefield = [
{ name: 'SALE', type: 'string' }
];
var saledeptfield = [
{ name: 'SALEDEPT', type: 'string' }
];
var salecorpfield = [
{ name: 'SALECORP', type: 'string' }
];
var opfield = [
{ name: 'OP', type: 'string' }
];
var opdeptfield = [
{ name: 'OPDEPT', type: 'string' }
];
var custfield = [
{ name: 'CUSTOMERNAME', type: 'string' }
];
// var salecustfield = [
// { name: 'SALE', type: 'string' },
// { name: 'CUSTNAME', type: 'string' }
// ];
var bssourcefield = [
{ name: 'BSSOURCE', type: 'string' }
];
var bssourcedetailfield = [
{ name: 'BSSOURCE', type: 'string' },
{ name: 'BSSOURCEDETAIL', type: 'string' }
];
var carrierfield = [
{ name: 'CARRIER', type: 'string' }
];
var yardfield = [
{ name: 'YARD', type: 'string' }
];
var lanefield = [
{ name: 'LANE', 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.girdcolumssalecorp = [{
sortable: true,
dataIndex: 'SALECORP',
text: Zi.LAN.SALECORP,
width: 100
}];
this.girdcolumsop = [{
sortable: true,
dataIndex: 'OP',
text: Zi.LAN.SALEDEPT,
width: 100
}];
this.girdcolumsopdept = [{
sortable: true,
dataIndex: 'OPDEPT',
text: Zi.LAN.OPDEPT,
width: 100
}];
this.girdcolumscust = [{
sortable: true,
dataIndex: 'CUSTOMERNAME',
text: Zi.LAN.CUSTOMERNAME,
width: 100
}
];
this.girdcolumsbssource = [{
sortable: true,
dataIndex: 'BSSOURCE',
text: Zi.LAN.BSSOURCE,
width: 80
}];
this.girdcolumsbssourcedetail = [{
sortable: true,
dataIndex: 'BSSOURCE',
text: Zi.LAN.BSSOURCE,
width: 80
}, {
sortable: true,
dataIndex: 'BSSOURCEDETAIL',
text: Zi.LAN.BSSOURCEDETAIL,
width: 80
}];
this.girdcolumscarrier = [{
sortable: true,
dataIndex: 'CARRIER',
text: Zi.LAN.CARRIER,
width: 100
}
];
this.girdcolumsyard = [{
sortable: true,
dataIndex: 'YARD',
text: Zi.LAN.YARD,
width: 100
}
];
this.girdcolumslane = [{
sortable: true,
dataIndex: 'LANE',
text: Zi.LAN.LANE,
width: 100
}
];
var storeMonthData = Ext.create('DsExt.ux.RefTableStore', {
fields: [
{ name: 'MONTHNAME', type: 'string' },
{ name: 'MONTHNO', type: 'number' },
{ name: 'MONTHFIELDNAME', type: 'string' },
{ name: 'RMBDR', type: 'bool' },
{ name: 'RMBCR', type: 'bool' },
{ name: 'USDDR', type: 'bool' },
{ name: 'USDCR', type: 'bool' },
{ name: 'OTDR', type: 'bool' },
{ name: 'OTCR', type: 'bool' },
{ name: 'TTLDR', type: 'bool' },
{ name: 'TTLCR', type: 'bool' },
{ name: 'RMBPROFIT', type: 'bool' },
{ name: 'USDPROFIT', type: 'bool' },
{ name: 'OTPROFIT', type: 'bool' },
{ name: 'TTLPROFIT', type: 'bool' },
{ name: 'PROFITRATE', type: 'bool' },
{ name: 'TEU', type: 'bool' }
],
proxy: { url: '/MvcShipping/MsRptOpProfitMonth/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);
var acolumn = [];
if (memberyf.data.RMBDR) {
myfield.push({ name: 'ZL' + memberyf.data.MONTHNO + 'RMBDR', type: 'number' });
acolumn.push({
dataIndex: 'ZL' + memberyf.data.MONTHNO + 'RMBDR',
text: Zi.LAN.RMBDR,
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',
sortable: true,
summaryType: 'sum',
summaryRenderer: Ext.util.Format.numberRenderer('00.00'),
width: 80
});
}
if (memberyf.data.RMBCR) {
myfield.push({ name: 'ZL' + memberyf.data.MONTHNO + 'RMBCR', type: 'number' });
acolumn.push({
dataIndex: 'ZL' + memberyf.data.MONTHNO + 'RMBCR',
text: Zi.LAN.RMBCR,
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',
sortable: true,
summaryType: 'sum',
summaryRenderer: Ext.util.Format.numberRenderer('00.00'),
width: 80
});
}
if (memberyf.data.USDDR) {
myfield.push({ name: 'ZL' + memberyf.data.MONTHNO + 'USDDR', type: 'number' });
acolumn.push({
dataIndex: 'ZL' + memberyf.data.MONTHNO + 'USDDR',
text: Zi.LAN.USDDR,
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',
sortable: true,
summaryType: 'sum',
summaryRenderer: Ext.util.Format.numberRenderer('00.00'),
width: 80
});
}
if (memberyf.data.USDCR) {
myfield.push({ name: 'ZL' + memberyf.data.MONTHNO + 'USDCR', type: 'number' });
acolumn.push({
dataIndex: 'ZL' + memberyf.data.MONTHNO + 'USDCR',
text: Zi.LAN.USDCR,
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',
sortable: true,
summaryType: 'sum',
summaryRenderer: Ext.util.Format.numberRenderer('00.00'),
width: 80
});
}
if (memberyf.data.OTDR) {
myfield.push({ name: 'ZL' + memberyf.data.MONTHNO + 'OTDR', type: 'number' });
acolumn.push({
dataIndex: 'ZL' + memberyf.data.MONTHNO + 'OTDR',
text: Zi.LAN.OTDR,
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',
sortable: true,
summaryType: 'sum',
summaryRenderer: Ext.util.Format.numberRenderer('00.00'),
width: 80
});
}
if (memberyf.data.OTCR) {
myfield.push({ name: 'ZL' + memberyf.data.MONTHNO + 'OTCR', type: 'number' });
acolumn.push({
dataIndex: 'ZL' + memberyf.data.MONTHNO + 'OTCR',
text: Zi.LAN.OTCR,
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',
sortable: true,
summaryType: 'sum',
summaryRenderer: Ext.util.Format.numberRenderer('00.00'),
width: 80
});
}
if (memberyf.data.TTLDR) {
myfield.push({ name: 'ZL' + memberyf.data.MONTHNO + 'TTLDR', type: 'number' });
acolumn.push({
dataIndex: 'ZL' + memberyf.data.MONTHNO + 'TTLDR',
text: Zi.LAN.TTLDR,
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; },
sortable: true,
align: 'right',
summaryType: 'sum',
summaryRenderer: Ext.util.Format.numberRenderer('00.00'),
width: 80
});
}
if (memberyf.data.TTLCR) {
myfield.push({ name: 'ZL' + memberyf.data.MONTHNO + 'TTLCR', type: 'number' });
acolumn.push({
dataIndex: 'ZL' + memberyf.data.MONTHNO + 'TTLCR',
text: Zi.LAN.TTLCR,
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; },
sortable: true,
align: 'right',
summaryType: 'sum',
summaryRenderer: Ext.util.Format.numberRenderer('00.00'),
width: 80
});
}
if (memberyf.data.RMBPROFIT) {
myfield.push({ name: 'ZL' + memberyf.data.MONTHNO + 'RMBPROFIT', type: 'number' });
acolumn.push({
dataIndex: 'ZL' + memberyf.data.MONTHNO + 'RMBPROFIT',
text: Zi.LAN.RMBPROFIT,
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; },
sortable: true,
align: 'right',
summaryType: 'sum',
summaryRenderer: Ext.util.Format.numberRenderer('00.00'),
width: 80
});
}
if (memberyf.data.USDPROFIT) {
myfield.push({ name: 'ZL' + memberyf.data.MONTHNO + 'USDPROFIT', type: 'number' });
acolumn.push({
dataIndex: 'ZL' + memberyf.data.MONTHNO + 'USDPROFIT',
text: Zi.LAN.USDPROFIT,
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',
summaryType: 'sum',
summaryRenderer: Ext.util.Format.numberRenderer('00.00'),
width: 80
});
}
if (memberyf.data.OTPROFIT) {
myfield.push({ name: 'ZL' + memberyf.data.MONTHNO + 'OTPROFIT', type: 'number' });
acolumn.push({
dataIndex: 'ZL' + memberyf.data.MONTHNO + 'OTPROFIT',
text: Zi.LAN.OTPROFIT,
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; },
sortable: true,
align: 'right',
summaryType: 'sum',
summaryRenderer: Ext.util.Format.numberRenderer('00.00'),
width: 80
});
}
if (memberyf.data.TTLPROFIT) {
myfield.push({ name: 'ZL' + memberyf.data.MONTHNO + 'TTLPROFIT', type: 'number' });
acolumn.push({
dataIndex: 'ZL' + memberyf.data.MONTHNO + 'TTLPROFIT',
text: Zi.LAN.TTLPROFIT,
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; },
sortable: true,
align: 'right',
summaryType: 'sum',
summaryRenderer: Ext.util.Format.numberRenderer('00.00'),
width: 80
});
}
if (memberyf.data.PROFITRATE) {
myfield.push({ name: 'ZL' + memberyf.data.MONTHNO + 'PROFITRATE', type: 'number' });
acolumn.push({
dataIndex: 'ZL' + memberyf.data.MONTHNO + 'PROFITRATE',
text: Zi.LAN.PROFITRATE,
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; },
sortable: true,
align: 'right',
summaryType: 'sum',
summaryRenderer: Ext.util.Format.numberRenderer('00.00'),
width: 80
});
}
if (memberyf.data.TEU) {
myfield.push({ name: 'ZL' + memberyf.data.MONTHNO + 'TEU', type: 'number' });
acolumn.push({
dataIndex: 'ZL' + memberyf.data.MONTHNO + 'TEU',
text: 'TEU',
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; },
sortable: true,
align: 'right',
summaryType: 'sum',
summaryRenderer: Ext.util.Format.numberRenderer('00.00'),
width: 80
});
}
zlcolumn.push({
text: memberyf.data.MONTHNAME,
columns: acolumn
});
};
}
for (var k in myfield) {
salefield.push(myfield[k]);
saledeptfield.push(myfield[k]);
salecorpfield.push(myfield[k]);
opfield.push(myfield[k]);
opdeptfield.push(myfield[k]);
custfield.push(myfield[k]);
// salecustfield.push(myfield[k]);
bssourcefield.push(myfield[k]);
bssourcedetailfield.push(myfield[k]);
carrierfield.push(myfield[k]);
yardfield.push(myfield[k]);
lanefield.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/MsRptOpProfitMonth/SaleListData',
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/MsRptOpProfitMonth/SaleDeptListData',
reader: {
root: 'data',
totalProperty: 'totalCount'
}
}
});
Ext.define('salecorpmodel', {
extend: 'Ext.data.Model',
fields: salecorpfield
});
this.storeSaleCorpList = Ext.create('Ext.data.Store', {
pageSize: this.PageSize,
model: 'salecorpmodel',
remoteSort: true,
proxy: {
type: 'ajax',
url: '/MvcShipping/MsRptOpProfitMonth/SaleCorpListData',
reader: {
root: 'data',
totalProperty: 'totalCount'
}
}
});
Ext.define('opmodel', {
extend: 'Ext.data.Model',
fields: opfield
});
this.storeOpList = Ext.create('Ext.data.Store', {
pageSize: this.PageSize,
model: 'opmodel',
remoteSort: true,
proxy: {
type: 'ajax',
url: '/MvcShipping/MsRptOpProfitMonth/OpListData',
reader: {
root: 'data',
totalProperty: 'totalCount'
}
}
});
Ext.define('opdeptmodel', {
extend: 'Ext.data.Model',
fields: opdeptfield
});
this.storeOpDeptList = Ext.create('Ext.data.Store', {
pageSize: this.PageSize,
model: 'opdeptmodel',
remoteSort: true,
proxy: {
type: 'ajax',
url: '/MvcShipping/MsRptOpProfitMonth/OpDeptListData',
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/MsRptOpProfitMonth/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/MsRptOpProfitMonth/SaleCustListData',
// reader: {
// root: 'data',
// totalProperty: 'totalCount'
// }
// }
// });
Ext.define('bssourcemodel', {
extend: 'Ext.data.Model',
fields: bssourcefield
});
this.storeBsSourceList = Ext.create('Ext.data.Store', {
pageSize: this.PageSize,
model: 'bssourcemodel',
remoteSort: true,
proxy: {
type: 'ajax',
url: '/MvcShipping/MsRptOpProfitMonth/BsSourceListData',
reader: {
root: 'data',
totalProperty: 'totalCount'
}
}
});
Ext.define('bssourcedetailmodel', {
extend: 'Ext.data.Model',
fields: bssourcedetailfield
});
this.storeBsSourceDetailList = Ext.create('Ext.data.Store', {
pageSize: this.PageSize,
model: 'bssourcedetailmodel',
remoteSort: true,
proxy: {
type: 'ajax',
url: '/MvcShipping/MsRptOpProfitMonth/BsSourceDetailListData',
reader: {
root: 'data',
totalProperty: 'totalCount'
}
}
});
Ext.define('carriermodel', {
extend: 'Ext.data.Model',
fields: carrierfield
});
this.storeCarrierList = Ext.create('Ext.data.Store', {
pageSize: this.PageSize,
model: 'carriermodel',
remoteSort: true,
proxy: {
type: 'ajax',
url: '/MvcShipping/MsRptOpProfitMonth/CarrierListData',
reader: {
root: 'data',
totalProperty: 'totalCount'
}
}
});
Ext.define('yardmodel', {
extend: 'Ext.data.Model',
fields: yardfield
});
this.storeYardList = Ext.create('Ext.data.Store', {
pageSize: this.PageSize,
model: 'yardmodel',
remoteSort: true,
proxy: {
type: 'ajax',
url: '/MvcShipping/MsRptOpProfitMonth/YardListData',
reader: {
root: 'data',
totalProperty: 'totalCount'
}
}
});
Ext.define('lanemodel', {
extend: 'Ext.data.Model',
fields: lanefield
});
this.storeLaneList = Ext.create('Ext.data.Store', {
pageSize: this.PageSize,
model: 'lanemodel',
remoteSort: true,
proxy: {
type: 'ajax',
url: '/MvcShipping/MsRptOpProfitMonth/LaneListData',
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/MsRptOpProfitMonth/SumListData',
reader: {
root: 'data',
totalProperty: 'totalCount'
}
}
});
for (var k in zlcolumn) {
this.girdcolumssale.push(zlcolumn[k]);
this.girdcolumssaledept.push(zlcolumn[k]);
this.girdcolumsop.push(zlcolumn[k]);
this.girdcolumsopdept.push(zlcolumn[k]);
this.girdcolumssalecorp.push(zlcolumn[k]);
// this.girdcolumssalecust.push(zlcolumn[k]);
this.girdcolumscust.push(zlcolumn[k]);
this.girdcolumsbssource.push(zlcolumn[k]);
this.girdcolumsbssourcedetail.push(zlcolumn[k]);
this.girdcolumsyard.push(zlcolumn[k]);
this.girdcolumscarrier.push(zlcolumn[k]);
this.girdcolumslane.push(zlcolumn[k]);
}
this.gridListSale.reconfigure(this.storeSaleList, this.girdcolumssale);
this.gridListSaleDept.reconfigure(this.storeSaleDeptList, this.girdcolumssaledept);
this.gridListSaleCorp.reconfigure(this.storeSaleCorpList, this.girdcolumssalecorp);
this.gridListOp.reconfigure(this.storeOpList, this.girdcolumsop);
this.gridListOpDept.reconfigure(this.storeOpDeptList, this.girdcolumsopdept);
this.gridListCust.reconfigure(this.storeCustList, this.girdcolumscust);
// this.gridListSaleCust.reconfigure(this.storeSaleCustList, this.girdcolumssalecust);
this.gridListBsSource.reconfigure(this.storeBsSourceList, this.girdcolumsbssource);
this.gridListBsSourceDetail.reconfigure(this.storeBsSourceDetailList, this.girdcolumsbssourcedetail);
this.gridListCarrier.reconfigure(this.storeCarrierList, this.girdcolumscarrier);
this.gridListYard.reconfigure(this.storeYardList, this.girdcolumsyard);
this.gridListLane.reconfigure(this.storeLaneList, this.girdcolumslane);
this.gridListSum.reconfigure(this.storeSumList, zlcolumn);
//var sql = this.getCondition();
var sql=this.sqlcontext;
if (this.tabpanel.getActiveTab() == this.panelCustSum) {
this.storeCustList.load({
params: { start: 0, limit: this.PageSize, condition: sql, datetype: datetype, startmonth: startdate, endmonth: enddate, feetype: feetype },
waitMsg: "正在查询数据...",
scope: this
});
}
if (this.tabpanel.getActiveTab() == this.panelSaleSum) {
this.storeSaleList.load({
params: { start: 0, limit: this.PageSize, condition: sql, datetype: datetype, startmonth: startdate, endmonth: enddate, feetype: feetype },
waitMsg: "正在查询数据...",
scope: this
});
}
if (this.tabpanel.getActiveTab() == this.panelSaleDeptSum) {
this.storeSaleDeptList.load({
params: { start: 0, limit: this.PageSize, condition: sql, datetype: datetype, startmonth: startdate, endmonth: enddate, feetype: feetype },
waitMsg: "正在查询数据...",
scope: this
});
}
if (this.tabpanel.getActiveTab() == this.panelSaleCorpSum) {
this.storeSaleCorpList.load({
params: { start: 0, limit: this.PageSize, condition: sql, datetype: datetype, startmonth: startdate, endmonth: enddate, feetype: feetype },
waitMsg: "正在查询数据...",
scope: this
});
}
if (this.tabpanel.getActiveTab() == this.panelOpSum) {
this.storeOpList.load({
params: { start: 0, limit: this.PageSize, condition: sql, datetype: datetype, startmonth: startdate, endmonth: enddate, feetype: feetype },
waitMsg: "正在查询数据...",
scope: this
});
}
if (this.tabpanel.getActiveTab() == this.panelOpDeptSum) {
this.storeOpDeptList.load({
params: { start: 0, limit: this.PageSize, condition: sql, datetype: datetype, startmonth: startdate, endmonth: enddate, feetype: feetype },
waitMsg: "正在查询数据...",
scope: this
});
}
if (this.tabpanel.getActiveTab() == this.panelBsSourceSum) {
this.storeBsSourceList.load({
params: { start: 0, limit: this.PageSize, condition: sql, datetype: datetype, startmonth: startdate, endmonth: enddate, feetype: feetype },
waitMsg: "正在查询数据...",
scope: this
});
}
if (this.tabpanel.getActiveTab() == this.panelBsSourceDetailSum) {
this.storeBsSourceDetailList.load({
params: { start: 0, limit: this.PageSize, condition: sql, datetype: datetype, startmonth: startdate, endmonth: enddate, feetype: feetype },
waitMsg: "正在查询数据...",
scope: this
});
}
if (this.tabpanel.getActiveTab() == this.panelYardSum) {
this.storeYardList.load({
params: { start: 0, limit: this.PageSize, condition: sql, datetype: datetype, startmonth: startdate, endmonth: enddate, feetype: feetype },
waitMsg: "正在查询数据...",
scope: this
});
}
if (this.tabpanel.getActiveTab() == this.panelCarrierSum) {
this.storeCarrierList.load({
params: { start: 0, limit: this.PageSize, condition: sql, datetype: datetype, startmonth: startdate, endmonth: enddate, feetype: feetype },
waitMsg: "正在查询数据...",
scope: this
});
}
if (this.tabpanel.getActiveTab() == this.panelLaneSum) {
this.storeLaneList.load({
params: { start: 0, limit: this.PageSize, condition: sql, datetype: datetype, startmonth: startdate, endmonth: enddate, feetype: feetype },
waitMsg: "正在查询数据...",
scope: this
});
}
this.storeSumList.load({
params: { start: 0, limit: this.PageSize, condition: sql, datetype: datetype, startmonth: startdate, endmonth: enddate, feetype: feetype },
waitMsg: "正在查询数据...",
scope: this
});
this.storeSaleList.on('beforeload', function (store) {
var sql = this.sqlcontext;
Ext.apply(store.proxy.extraParams, { condition: sql, datetype: datetype, startmonth: startdate, endmonth: enddate, feetype: feetype });
}, this);
this.storeSaleDeptList.on('beforeload', function (store) {
var sql = this.sqlcontext;
Ext.apply(store.proxy.extraParams, { condition: sql, datetype: datetype, startmonth: startdate, endmonth: enddate, feetype: feetype });
}, this);
this.storeSaleCorpList.on('beforeload', function (store) {
var sql = this.sqlcontext;
Ext.apply(store.proxy.extraParams, { condition: sql, datetype: datetype, startmonth: startdate, endmonth: enddate, feetype: feetype });
}, this);
this.storeOpList.on('beforeload', function (store) {
var sql = this.sqlcontext;
Ext.apply(store.proxy.extraParams, { condition: sql, datetype: datetype, startmonth: startdate, endmonth: enddate, feetype: feetype });
}, this);
this.storeOpDeptList.on('beforeload', function (store) {
var sql = this.sqlcontext;
Ext.apply(store.proxy.extraParams, { condition: sql, datetype: datetype, startmonth: startdate, endmonth: enddate, feetype: feetype });
}, this);
this.storeCustList.on('beforeload', function (store) {
var sql = this.sqlcontext;
Ext.apply(store.proxy.extraParams, { condition: sql, datetype: datetype, startmonth: startdate, endmonth: enddate, feetype: feetype });
}, this);
// this.storeSaleCustList.on('beforeload', function (store) {
// if (!this.checkSearchCondition())
// return;
// var sql = this.getCondition();
// Ext.apply(store.proxy.extraParams, { condition: sql });
// }, this);
this.storeBsSourceList.on('beforeload', function (store) {
var sql = this.sqlcontext;
Ext.apply(store.proxy.extraParams, { condition: sql, datetype: datetype, startmonth: startdate, endmonth: enddate, feetype: feetype });
}, this);
this.storeBsSourceDetailList.on('beforeload', function (store) {
var sql = this.sqlcontext;
Ext.apply(store.proxy.extraParams, { condition: sql, datetype: datetype, startmonth: startdate, endmonth: enddate, feetype: feetype });
}, this);
this.storeCarrierList.on('beforeload', function (store) {
var sql = this.sqlcontext;
Ext.apply(store.proxy.extraParams, { condition: sql, datetype: datetype, startmonth: startdate, endmonth: enddate, feetype: feetype });
}, this);
this.storeYardList.on('beforeload', function (store) {
var sql = this.sqlcontext;
Ext.apply(store.proxy.extraParams, { condition: sql, datetype: datetype, startmonth: startdate, endmonth: enddate, feetype: feetype });
}, this);
this.storeLaneList.on('beforeload', function (store) {
var sql = this.sqlcontext;
Ext.apply(store.proxy.extraParams, { condition: sql, datetype: datetype, startmonth: startdate, endmonth: enddate, feetype: feetype });
}, this);
this.storeSumList.on('beforeload', function (store) {
var sql = this.sqlcontext;
Ext.apply(store.proxy.extraParams, { condition: sql, datetype: datetype, startmonth: startdate, endmonth: enddate, feetype: feetype });
}, this);
}
},
scope: this
});
},
onRefreshClick: function (button, event) {
if (!this.checkSearchCondition())
return;
var sql = this.getCondition();
this.sqlcontext = sql;
var rdOBJNUM = Ext.getCmp('rdOBJNUM');
var feetype = rdOBJNUM.getValue();
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('提示', '开始业务日期不能为空!');
return;
}
if (expDate_Max == '' || expDate_Max == null || expDate_Max == undefined) {
Ext.Msg.alert('提示', '结束业务日期不能为空!');
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('提示', '业务开始日期不能大于结束日期!');
return;
}
this.InitGrid(datetype, expDate_Min, expDate_Max, feetype);
} 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('提示', '开始会计期间不能为空!');
return;
}
if (expDate_Max == '' || expDate_Max == null || expDate_Max == undefined) {
Ext.Msg.alert('提示', '结束会计期间不能为空!');
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('提示', '会计期间开始日期不能大于结束日期!');
return;
}
this.InitGrid(datetype, expDate_Min, expDate_Max, feetype);
}
this.storeList.load({
params: { start: 0, limit: this.PageSize, condition: sql },
waitMsg: "正在查询数据...",
scope: this
});
},
onDsQuery: function (button, event) {
if (!this.checkSearchCondition())
return;
var rdOBJNUM = Ext.getCmp('rdOBJNUM');
var feetype = rdOBJNUM.getValue();
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('提示', '开始业务日期不能为空!');
return;
}
if (expDate_Max == '' || expDate_Max == null || expDate_Max == undefined) {
Ext.Msg.alert('提示', '结束业务日期不能为空!');
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('提示', '业务开始日期不能大于结束日期!');
return;
}
this.InitGrid(datetype, expDate_Min, expDate_Max, feetype);
} 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('提示', '开始会计期间不能为空!');
return;
}
if (expDate_Max == '' || expDate_Max == null || expDate_Max == undefined) {
Ext.Msg.alert('提示', '结束会计期间不能为空!');
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('提示', '会计期间开始日期不能大于结束日期!');
return;
}
this.InitGrid(datetype, expDate_Min, expDate_Max, feetype);
}
var sql = this.sqlcontext;
this.storeList.load({
params: { start: 0, limit: this.PageSize, condition: sql },
waitMsg: "正在查询数据...",
scope: this
});
},
RpttabChange: function (tabPanel, newCard, oldCard, eOpts) {
var sql = this.sqlcontext;
var form = this.formSearch.getForm();
var datetype = form.findField('DATETYPE').getValue();
if (datetype == 'OPDATE') {
var startdate = form.findField('PS_EXPDATEBGN').getRawValue();
var enddate = form.findField('PS_EXPDATEEND').getRawValue();
} else {
var startdate = form.findField('PS_ACCDATEBGN').getRawValue();
var enddate = form.findField('PS_ACCDATEEND').getRawValue();
}
var rdOBJNUM = Ext.getCmp('rdOBJNUM');
var feetype = rdOBJNUM.getValue();
if (this.tabpanel.getActiveTab() == this.panelCustSum) {
this.storeCustList.load({
params: { start: 0, limit: this.PageSize, condition: sql, datetype: datetype, startmonth: startdate, endmonth: enddate, feetype: feetype },
waitMsg: "正在查询数据...",
scope: this
});
}
if (this.tabpanel.getActiveTab() == this.panelSaleSum) {
this.storeSaleList.load({
params: { start: 0, limit: this.PageSize, condition: sql, datetype: datetype, startmonth: startdate, endmonth: enddate, feetype: feetype },
waitMsg: "正在查询数据...",
scope: this
});
}
if (this.tabpanel.getActiveTab() == this.panelSaleDeptSum) {
this.storeSaleDeptList.load({
params: { start: 0, limit: this.PageSize, condition: sql, datetype: datetype, startmonth: startdate, endmonth: enddate, feetype: feetype },
waitMsg: "正在查询数据...",
scope: this
});
}
if (this.tabpanel.getActiveTab() == this.panelSaleCorpSum) {
this.storeSaleCorpList.load({
params: { start: 0, limit: this.PageSize, condition: sql, datetype: datetype, startmonth: startdate, endmonth: enddate, feetype: feetype },
waitMsg: "正在查询数据...",
scope: this
});
}
if (this.tabpanel.getActiveTab() == this.panelOpSum) {
this.storeOpList.load({
params: { start: 0, limit: this.PageSize, condition: sql, datetype: datetype, startmonth: startdate, endmonth: enddate, feetype: feetype },
waitMsg: "正在查询数据...",
scope: this
});
}
if (this.tabpanel.getActiveTab() == this.panelOpDeptSum) {
this.storeOpDeptList.load({
params: { start: 0, limit: this.PageSize, condition: sql, datetype: datetype, startmonth: startdate, endmonth: enddate, feetype: feetype },
waitMsg: "正在查询数据...",
scope: this
});
}
if (this.tabpanel.getActiveTab() == this.panelBsSourceSum) {
this.storeBsSourceList.load({
params: { start: 0, limit: this.PageSize, condition: sql, datetype: datetype, startmonth: startdate, endmonth: enddate, feetype: feetype },
waitMsg: "正在查询数据...",
scope: this
});
}
if (this.tabpanel.getActiveTab() == this.panelBsSourceDetailSum) {
this.storeBsSourceDetailList.load({
params: { start: 0, limit: this.PageSize, condition: sql, datetype: datetype, startmonth: startdate, endmonth: enddate, feetype: feetype },
waitMsg: "正在查询数据...",
scope: this
});
}
if (this.tabpanel.getActiveTab() == this.panelYardSum) {
this.storeYardList.load({
params: { start: 0, limit: this.PageSize, condition: sql, datetype: datetype, startmonth: startdate, endmonth: enddate, feetype: feetype },
waitMsg: "正在查询数据...",
scope: this
});
}
if (this.tabpanel.getActiveTab() == this.panelCarrierSum) {
this.storeCarrierList.load({
params: { start: 0, limit: this.PageSize, condition: sql, datetype: datetype, startmonth: startdate, endmonth: enddate, feetype: feetype },
waitMsg: "正在查询数据...",
scope: this
});
}
if (this.tabpanel.getActiveTab() == this.panelLaneSum) {
this.storeLaneList.load({
params: { start: 0, limit: this.PageSize, condition: sql, datetype: datetype, startmonth: startdate, endmonth: enddate, feetype: feetype },
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 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 CARRIER = form.findField('CARRIER').getValue();
sql = sql + getAndConSql(sql, CARRIER, "B.CARRIER='" + CARRIER + "'");
var YARD = form.findField('YARD').getValue();
sql = sql + getAndConSql(sql, YARD, "B.YARD='" + YARD + "'");
var CORPID = form.findField('CORPID').getValue();
sql = sql + getAndConSql(sql, CORPID, "B.CORPID='" + CORPID + "'");
var SUBCOMP = form.findField('SUBCOMP').getValue();
sql = sql + getAndConSql(sql, SUBCOMP, "B.SALECORPID='" + SUBCOMP + "'");
var SALE = form.findField('PS_SALE').getValue();
sql = sql + getAndConSql(sql, SALE, "B.SALE='" + SALE + "'");
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 + "'");
return sql;
},
checkSearchCondition: function () {
var form = this.formSearch.getForm();
if (!form.isValid()) {
Ext.Msg.alert('提示', '查询条件赋值错误,请检查。');
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] = "MsRptOpProfitMonthIndex";
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);
} else if (this.tabpanel.getActiveTab() == this.panelCarrierSum) {
this.girdcolumscarrier = DsTruck.SaveGridPanel(USERID, this.formname + 'carrier', this.gridListCarrier.columns, this.girdcolumscarrier, 1, true);
} else if (this.tabpanel.getActiveTab() == this.panelYardSum) {
this.girdcolumsyard = DsTruck.SaveGridPanel(USERID, this.formname + 'yard', this.gridListYard.columns, this.girdcolumsyard, 1, true);
} else if (this.tabpanel.getActiveTab() == this.panelBodyChFee) {
this.girdcolums = DsTruck.SaveGridPanel(USERID, this.formname + 'bs', this.gridList.columns, this.girdcolums, 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);
} else if (this.tabpanel.getActiveTab() == this.panelCarrierSum) {
this.gridListCarrier.reconfigure(this.storeCarrierList, this.initgirdcolumscarrier);
this.girdcolumscarrier = DsTruck.SaveGridPanel(USERID, this.formname + 'carrier', this.gridListCarrier.columns, this.initgirdcolumscarrier, 1, true);
} else if (this.tabpanel.getActiveTab() == this.panelYardSum) {
this.gridListYard.reconfigure(this.storeYardList, this.initgirdcolumsyard);
this.girdcolumsyard = DsTruck.SaveGridPanel(USERID, this.formname + 'yard', this.gridListYard.columns, this.initgirdcolumsyard, 1, true);
} else if (this.tabpanel.getActiveTab() == this.panelBodyChFee) {
this.gridList.reconfigure(this.storeList, this.initgirdcolums);
this.girdcolums = DsTruck.SaveGridPanel(USERID, this.formname + 'bs', this.gridList.columns, this.initgirdcolums, 1, true);
}
},
onExportClick: function (button, event) {
_this = this;
if (this.tabpanel.getActiveTab() == this.panelSaleSum) {
grid2Excel(this.gridListSale, "业务员利润月度");
// GridExportExcelPage(this.gridListSale);
} if (this.tabpanel.getActiveTab() == this.panelSaleDeptSum) {
grid2Excel(this.gridListSaleDept, "销售部门利润月度");
// GridExportExcelPage(this.gridListSale);
} if (this.tabpanel.getActiveTab() == this.panelOpSum) {
grid2Excel(this.gridListOp, "操作员利润月度");
// GridExportExcelPage(this.gridListSale);
} if (this.tabpanel.getActiveTab() == this.panelOpDeptSum) {
grid2Excel(this.gridListOpDept, "操作部门利润月度");
// GridExportExcelPage(this.gridListSale);
} if (this.tabpanel.getActiveTab() == this.panelSaleCorpSum) {
grid2Excel(this.gridListSaleCorp, "所属分部利润月度");
// GridExportExcelPage(this.gridListSale);
} else if (this.tabpanel.getActiveTab() == this.panelCustSum) {
grid2Excel(this.gridListCust, "客户利润月度");
// GridExportExcelPage(this.gridListCust);
} else if (this.tabpanel.getActiveTab() == this.panelBsSourceSum) {
grid2Excel(this.gridListBsSource, "业务来源利润月度");
// GridExportExcelPage(this.gridListBsSource);
} else if (this.tabpanel.getActiveTab() == this.panelBsSourceDetailSum) {
grid2Excel(this.gridListBsSourceDetail, "来源明细利润月度");
// GridExportExcelPage(this.gridListBsSourceDetail);
} else if (this.tabpanel.getActiveTab() == this.panelCarrierSum) {
grid2Excel(this.gridListCarrier, "船公司利润月度");
// GridExportExcelPage(this.gridListCust);
} else if (this.tabpanel.getActiveTab() == this.panelYardSum) {
grid2Excel(this.gridListYard, "场站利润月度");
// GridExportExcelPage(this.gridListCust);
} else if (this.tabpanel.getActiveTab() == this.panelLaneSum) {
grid2Excel(this.gridListLane, "航线利润月度");
// GridExportExcelPage(this.gridListCust);
} else if (this.tabpanel.getActiveTab() == this.panelBodyChFee) {
if (this.storeList.getCount() == 0) {
return;
}
var sortstr = ' ETD';
if (this.bslistsortfield != '' && this.bslistsortdire != '') {
sortstr = this.bslistsortfield + ' ' + this.bslistsortdire;
}
Ext.Msg.wait('正在组织数据, 请稍侯..');
Ext.Ajax.request({
waitMsg: '正在组织数据...',
url: '/MvcShipping/MsRptOpProfitMonth/BsListData',
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 = 'MSRPTPROFITMONTHLIST';
var sql1 = returnstr;
sql1 = sql1.replace(/\+/g, "@@@")
if (sql1 != '') {
2 years ago
GridExportBySql(sql1, this.formname + 'bs', '业务利润月度分析.xls');
//var openSet = "height=1, width=400, toolbar=no, menubar=no,scrollbars=no, resizable=no,location=no, status=no,Top=" + (screen.height - 200) / 2 + ",Left=" + (screen.width - 400) / 2;
//var openType = "_blank";
//var openUrl = "../../Reports/RptExport.aspx?handle=DsRptExcel&formname=" + this.formname + 'bs' + "&condition1=" + sql1;
//window.open(openUrl, openType, openSet);
3 years ago
}
} 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
});
}
}
});
// GridExportExcelPage(this.gridListCust);
}
},
Print: function () {
var rdOBJNUM = Ext.getCmp('rdOBJNUM');
var feetype = rdOBJNUM.getValue();
var sql = this.getCondition();
var startdate = form.findField('PS_EXPDATEBGN').getRawValue();
var enddate = form.findField('PS_EXPDATEEND').getRawValue();
_this = this;
if (this.tabpanel.activeTab == this.panelBodyChFee) {
if (this.storeList.getCount() == 0) {
return;
}
var sortstr = ' B.ETD';
if (this.bslistsortfield != '' && this.bslistsortdire != '') {
sortstr = this.bslistsortfield + ' ' + this.bslistsortdire;
}
Ext.Msg.wait('正在组织数据, 请稍侯..');
Ext.Ajax.request({
waitMsg: '正在组织数据...',
url: '/MvcShipping/MsRptOpProfitMonth/BsListData',
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 = 'MSRPTPROFITMONTHLIST';
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.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/MsRptOpProfitMonth/SaleListData',
scope: this,
params: {
start: 0, limit: this.PageSize,
condition: _this.sqlcontext,
printstr: 'true',
sortstr: sortstr, startmonth: startdate, endmonth: enddate, feetype: feetype
},
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 = 'MSRPTPROFITMONTHSALE';
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.saledeptsumsortfield != '' && this.saledeptsumsortdire != '') {
sortstr = this.saledeptsumsortfield + ' ' + this.saledeptsumsortdire;
}
Ext.Msg.wait('正在组织数据, 请稍侯..');
Ext.Ajax.request({
waitMsg: '正在组织数据...',
url: '/MvcShipping/MsRptOpProfitMonth/SaleDeptListData',
scope: this,
params: {
start: 0, limit: this.PageSize,
condition: _this.sqlcontext,
printstr: 'true',
sortstr: sortstr, startmonth: startdate, endmonth: enddate, feetype: feetype
},
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 = 'MSRPTPROFITMONTHSALEDEPT';
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.panelSaleCorpSum) {
if (this.storeSaleCorpList.getCount() == 0) {
return;
}
var sortstr = ' B.SALECORP';
if (this.salecorpsumsortfield != '' && this.salecorpsumsortdire != '') {
sortstr = this.salecorpsumsortfield + ' ' + this.salecorpsumsortdire;
}
Ext.Msg.wait('正在组织数据, 请稍侯..');
Ext.Ajax.request({
waitMsg: '正在组织数据...',
url: '/MvcShipping/MsRptOpProfitMonth/SaleCorpListData',
scope: this,
params: {
start: 0, limit: this.PageSize,
condition: _this.sqlcontext,
printstr: 'true',
sortstr: sortstr, startmonth: startdate, endmonth: enddate, feetype: feetype
},
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 = 'MSRPTPROFITMONTHSALECORP';
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.panelOpSum) {
if (this.storeOpList.getCount() == 0) {
return;
}
var sortstr = ' B.OP';
if (this.opsumsortfield != '' && this.opsumsortdire != '') {
sortstr = this.opsumsortfield + ' ' + this.opsumsortdire;
}
Ext.Msg.wait('正在组织数据, 请稍侯..');
Ext.Ajax.request({
waitMsg: '正在组织数据...',
url: '/MvcShipping/MsRptOpProfitMonth/OpListData',
scope: this,
params: {
start: 0, limit: this.PageSize,
condition: _this.sqlcontext,
printstr: 'true',
sortstr: sortstr, startmonth: startdate, endmonth: enddate, feetype: feetype
},
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 = 'MSRPTPROFITMONTHOP';
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
});
}
}
});
} if (this.tabpanel.activeTab == this.panelOpDeptSum) {
if (this.storeOpDeptList.getCount() == 0) {
return;
}
var sortstr = ' D.DEPTNAME';
if (this.opdeptsumsortfield != '' && this.opdeptsumsortdire != '') {
sortstr = this.opdeptsumsortfield + ' ' + this.opdeptsumsortdire;
}
Ext.Msg.wait('正在组织数据, 请稍侯..');
Ext.Ajax.request({
waitMsg: '正在组织数据...',
url: '/MvcShipping/MsRptOpProfitMonth/OpDeptListData',
scope: this,
params: {
start: 0, limit: this.PageSize,
condition: _this.sqlcontext,
printstr: 'true',
sortstr: sortstr, startmonth: startdate, endmonth: enddate, feetype: feetype
},
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 = 'MSRPTPROFITMONTHOPDEPT';
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 = ' B.CUSTOMERNAME';
if (this.custsumsortfield != '' && this.custsumsortdire != '') {
sortstr = this.custsumsortfield + ' ' + this.custsumsortdire;
}
Ext.Msg.wait('正在组织数据, 请稍侯..');
Ext.Ajax.request({
waitMsg: '正在组织数据...',
url: '/MvcShipping/MsRptOpProfitMonth/CustListData',
scope: this,
params: {
start: 0, limit: this.PageSize,
condition: _this.sqlcontext,
printstr: 'true',
sortstr: sortstr, startmonth: startdate, endmonth: enddate, feetype: feetype
},
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 = 'MSRPTPROFITMONTHCUST';
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.panelBsSourceSum) {
if (this.storeBsSourceList.getCount() == 0) {
return;
}
var sortstr = ' B.BSSOURCE';
if (this.salecustsumsortfield != '' && this.salecustsumsortdire != '') {
sortstr = this.salecustsumsortfield + ' ' + this.salecustsumsortdire;
}
Ext.Msg.wait('正在组织数据, 请稍侯..');
Ext.Ajax.request({
waitMsg: '正在组织数据...',
url: '/MvcShipping/MsRptOpProfitMonth/BsSourceListData',
scope: this,
params: {
start: 0, limit: this.PageSize,
condition: sql,
printstr: 'true',
sortstr: sortstr, startmonth: startdate, endmonth: enddate, feetype: feetype
},
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 = 'MSRPTPROFITMONTHBSSOURCE';
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.panelBsSourceDetailSum) {
if (this.storeBsSourceList.getCount() == 0) {
return;
}
var sortstr = ' B.BSSOURCE,B.BSSOURCEDETAIL';
Ext.Msg.wait('正在组织数据, 请稍侯..');
Ext.Ajax.request({
waitMsg: '正在组织数据...',
url: '/MvcShipping/MsRptOpProfitMonth/BsSourceDetailListData',
scope: this,
params: {
start: 0, limit: this.PageSize,
condition: sql,
printstr: 'true',
sortstr: sortstr, startmonth: startdate, endmonth: enddate, feetype: feetype
},
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 = 'MSRPTPROFITMONTHBSSOURCEDETAIL';
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.panelCarrierSum) {
if (this.storeCarrierList.getCount() == 0) {
return;
}
var sortstr = ' B.CARRIER';
if (this.carriersumsortfield != '' && this.carriersumsortdire != '') {
sortstr = this.carriersumsortfield + ' ' + this.carriersumsortdire;
}
Ext.Msg.wait('正在组织数据, 请稍侯..');
Ext.Ajax.request({
waitMsg: '正在组织数据...',
url: '/MvcShipping/MsRptOpProfitMonth/CarrierListData',
scope: this,
params: {
start: 0, limit: this.PageSize,
condition: _this.sqlcontext,
printstr: 'true',
sortstr: sortstr, startmonth: startdate, endmonth: enddate, feetype: feetype
},
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 = 'MSRPTPROFITMONTHCARRIER';
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.panelYardSum) {
if (this.storeYardList.getCount() == 0) {
return;
}
var sortstr = ' B.YARD';
if (this.yardsumsortfield != '' && this.yardsumsortdire != '') {
sortstr = this.yardsumsortfield + ' ' + this.yardsumsortdire;
}
Ext.Msg.wait('正在组织数据, 请稍侯..');
Ext.Ajax.request({
waitMsg: '正在组织数据...',
url: '/MvcShipping/MsRptOpProfitMonth/YardListData',
scope: this,
params: {
start: 0, limit: this.PageSize,
condition: _this.sqlcontext,
printstr: 'true',
sortstr: sortstr, startmonth: startdate, endmonth: enddate, feetype: feetype
},
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 = 'MSRPTPROFITMONTHYARD';
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.panelLaneSum) {
if (this.storeLaneList.getCount() == 0) {
return;
}
var sortstr = ' B.LANE';
if (this.lanesumsortfield != '' && this.lanesumsortdire != '') {
sortstr = this.lanesumsortfield + ' ' + this.lanesumsortdire;
}
Ext.Msg.wait('正在组织数据, 请稍侯..');
Ext.Ajax.request({
waitMsg: '正在组织数据...',
url: '/MvcShipping/MsRptOpProfitMonth/LaneListData',
scope: this,
params: {
start: 0, limit: this.PageSize,
condition: _this.sqlcontext,
printstr: 'true',
sortstr: sortstr, startmonth: startdate, endmonth: enddate, feetype: feetype
},
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 = 'MSRPTPROFITMONTHLANE';
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
});
}
}
});
}
}
});