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.

4070 lines
173 KiB
JavaScript

11 months 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: '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: '业务类型',
width: 70
}, {
sortable: true,
dataIndex: 'OPTYPE',
text: '更改单',
width: 70
}, {
sortable: true,
dataIndex: 'FEESTATUSREF',
text: '费用锁定',
width: 70
}, {
sortable: true,
dataIndex: 'BSSTATUS',
text: '业务锁定',
width: 70,
renderer: function (value, meta) {
if (value == '1')
return '锁定'; //是
else
return '未锁定';
}
}, {
sortable: true,
dataIndex: 'BSTYPE',
text: '运输类型',
width: 70
}, {
sortable: true,
dataIndex: 'BLTYPE',
text: '装运方式',
width: 70
}, {
sortable: true,
dataIndex: 'BLFRT',
text: '付费方式',
width: 70
}, {
sortable: true,
dataIndex: 'OPDATE',
text: '业务日期',
width: 86
}, {
sortable: true,
dataIndex: 'CUSTOMDATE',
text: '报关日期',
width: 86
}, {
sortable: true,
dataIndex: 'CUSTOMERNAME',
text: '委托单位',
width: 120
}, {
sortable: true,
dataIndex: 'CUSTNO',
text: '委托编号',
width: 136
}, {
sortable: true,
dataIndex: 'CUSTOMNO',
text: '报关单号',
width: 136
}, {
sortable: true,
dataIndex: 'ENTERP',
text: '经营单位',
width: 100
}, {
sortable: true,
dataIndex: 'MBLNO',
text: '主提单号',
width: 120
}, {
sortable: true,
dataIndex: 'HBLNO',
text: '分提单号',
width: 120
}, {
sortable: true,
dataIndex: 'ETD',
text: '开船日期',
width: 86
}, {
sortable: true,
dataIndex: 'VESSEL',
text: '船名',
width: 200
}, {
sortable: true,
dataIndex: 'VOYNO',
text: '航次',
width: 50
}, {
sortable: true,
dataIndex: 'SALE',
text: '业务员',
width: 80
}, {
sortable: true,
dataIndex: 'OP',
text: '操作',
width: 80
}, {
sortable: true,
dataIndex: 'DOC',
text: '单证',
width: 80
}, {
sortable: true,
dataIndex: 'CUSTSERVICE',
text: '客服员',
width: 80
}, {
sortable: true,
dataIndex: 'FRCUSTSERVICE',
text: '海外客服员',
width: 80
}, {
sortable: true,
dataIndex: 'CONTRACTNO',
text: '运费协议号',
width: 80
}, {
sortable: true,
dataIndex: 'PORTLOAD',
text: '起运港',
width: 80
}, {
sortable: true,
dataIndex: 'PORTDISCHARGE',
text: '卸货港',
width: 150
}, {
sortable: true,
dataIndex: 'DESTINATION',
header: '目的地',
width: 150
}, {
sortable: true,
dataIndex: 'ACCDATE',
text: '会计期间',
width: 80
}, {
sortable: true,
dataIndex: 'CARRIER',
text: '船公司',
width: 80
}, {
sortable: true,
dataIndex: 'LANE',
text: '航线',
width: 80
}, {
sortable: true,
dataIndex: 'BSSOURCE',
text: '业务来源',
width: 120
}, {
sortable: true,
dataIndex: 'YARD',
text: '场站',
width: 120
}, {
sortable: true,
dataIndex: 'REMARK',
text: '备注',
width: 120
}, {
sortable: true,
dataIndex: 'TEU',
text: 'TEU',
width: 80
}, {
sortable: true,
dataIndex: 'PKGS',
text: '件数',
width: 80
}, {
sortable: true,
dataIndex: 'KGS',
text: 'KGS',
width: 80
}, {
sortable: true,
dataIndex: 'CBM',
text: '尺码',
width: 80
}, {
sortable: true,
dataIndex: 'NETWEIGHT',
text: '计费重量(或净重)',
width: 80
}, {
sortable: true,
dataIndex: 'GOODSNAME',
text: '品名',
width: 80
}, {
sortable: true,
dataIndex: 'CREATETIME',
text: '创建时间',
width: 80
}, {
sortable: true,
dataIndex: 'CNTRTOTAL',
text: '集装箱',
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: '其他箱型',
width: 60
}, {
text: '含税',
dataIndex: 'ALLIN',
columns: [{
sortable: true,
dataIndex: 'RMBDR',
text: 'RMB应收',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'RMBCR',
text: 'RMB应付',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'RMBPROFIT',
text: 'RMB利润',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'USDDR',
text: 'USD应收',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'USDCR',
text: 'USD应付',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'USDPROFIT',
text: 'USD利润',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'OTDR',
text: '其他币别应收',
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: '其他币别应付',
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: '其他币别利润',
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: '合计应收',
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: '合计应付',
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: '合计利润',
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: '利润率',
width: 80,
renderer: function (value, meta) {
if (value != 0) value = value + '%';
return value;
}
}, {
sortable: true,
dataIndex: 'TTLTAXDR',
text: '应收税额',
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: '合计税额',
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: '合计税额差',
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: '未收未付',
dataIndex: 'ALLBALANCE',
columns: [{
sortable: true,
dataIndex: 'STLRMBDR',
text: 'RMB已收',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'RMBNODR',
text: 'RMB未收',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'STLUSDDR',
text: 'USD已收',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'USDNODR',
text: 'USD未收',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'STLOTDR',
text: '其他已收',
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: '其他未收',
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: '合计已收',
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: '合计未收',
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: 'RMB已付',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'RMBNOCR',
text: 'RMB未付',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'STLUSDCR',
text: 'USD已付',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'USDNOCR',
text: 'USD未付',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'STLOTCR',
text: '其他币别已付',
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: '其他未付',
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: '合计已付',
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: '合计未付',
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: '不含税',
dataIndex: 'ALLNOTAX',
columns: [{
sortable: true,
dataIndex: 'NOTAXRMBDR',
text: 'RMB应收',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 90
}, {
sortable: true,
dataIndex: 'NOTAXRMBCR',
text: 'RMB应付',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 90
}, {
sortable: true,
dataIndex: 'NOTAXRMBPROFIT',
text: 'RMB利润',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 90
}, {
sortable: true,
dataIndex: 'NOTAXUSDDR',
text: 'USD应收',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 90
}, {
sortable: true,
dataIndex: 'NOTAXUSDCR',
text: 'USD应付',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 90
}, {
sortable: true,
dataIndex: 'NOTAXUSDPROFIT',
text: 'USD利润',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 90
}, {
sortable: true,
dataIndex: 'NOTAXOTDR',
text: '其他币别应收',
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: '其他币别应付',
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: '其他币别利润',
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: '合计应收',
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: '合计应付',
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: '合计利润',
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: '财务不含税',
dataIndex: 'ALLNOACCTAX',
columns: [{
sortable: true,
dataIndex: 'NOACCTAXRMBDR',
text: 'RMB应收',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 90
}, {
sortable: true,
dataIndex: 'NOACCTAXRMBCR',
text: 'RMB应付',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 90
}, {
sortable: true,
dataIndex: 'NOACCTAXRMBPROFIT',
text: 'RMB利润',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 90
}, {
sortable: true,
dataIndex: 'NOACCTAXUSDDR',
text: 'USD应收',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 90
}, {
sortable: true,
dataIndex: 'NOACCTAXUSDCR',
text: 'USD应付',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 90
}, {
sortable: true,
dataIndex: 'NOACCTAXUSDPROFIT',
text: 'USD利润',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 90
}, {
sortable: true,
dataIndex: 'NOACCTAXOTDR',
text: '其他币别应收',
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: '其他币别应付',
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: '其他币别利润',
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: '合计应收',
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: '合计应付',
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: '合计利润',
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: '业务员',
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: '销售部门',
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: '操作员',
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: '操作部门',
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: '所属分部',
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: '委托单位',
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: '船公司',
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: '场站',
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: '航线',
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: '业务来源',
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: '业务来源',
width: 80
}, {
sortable: true,
dataIndex: 'BSSOURCEDETAIL',
text: '业务来源明细',
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: '业务类型',
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: '运输类型',
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: '揽货人',
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: '操 作',
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: '委托单位',
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: '船公司', //'船公司',
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: '场站', //'船公司',
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: '费用锁定',
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: '所属公司',
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: '所属分部',
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: '统计日期',
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: '从业务日期',
format: 'Y-m-d',
xtype: 'datefield',
name: 'PS_EXPDATEBGN',
enableKeyEvents: true,
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
}, {
fieldLabel: '结束业务日期',
format: 'Y-m-d',
xtype: 'datefield',
name: 'PS_EXPDATEEND',
enableKeyEvents: true,
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
}, {
fieldLabel: '从会计期间',
xtype: 'monthfield',
name: 'PS_ACCDATEBGN',
enableKeyEvents: true,
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
}, {
fieldLabel: '至会计期间',
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: '记忆查询条件',
checked: true,
width: 120
});
_this = this;
this.SearchBtn = new Ext.Button({
text: '隐藏查询',
handler: function () {
if (_this.SearchBtn.text == '隐藏查询') {
_this.panelSearch.hide();
_this.SearchBtn.setText("显示查询");
} else {
_this.panelSearch.show();
_this.SearchBtn.setText("隐藏查询");
}
}
});
this.panelBtn = new Ext.Panel({
region: "north",
tbar: [
{
text: "执行查询",
iconCls: "btnrefresh",
handler: function (button, event) {
this.onRefreshClick(button, event);
var isvisible = true;
var issavevalue = false;
if (_this.SearchBtn.text == '隐藏查询')
isvisible = true
else
isvisible = false;
if (this.CheckSaveQuery.checked)
issavevalue = true
saveQuerySetting(this.formname, this.formSearch, isvisible, issavevalue);
},
scope: this
}, {
text: "导出Excel",
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: "清空条件",
iconCls: "btnreset",
handler: function (button, event) {
this.onClearSql(button, event);
},
scope: this
}, '-', {
xtype: 'button',
text: "高级查询",
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: "利润列设置",
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: '金额类型',
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: "保存列表样式",
id: "btntest",
menu: [
{
text: "保存列表",
handler: function (button, event) {
_this.onSaveGridClick(button, event);
}
}, {
text: "列表初始化",
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: '业务明细',
layout: "border",
region: 'center',
margin: '0 0',
frame: true,
items: [this.gridList]
});
this.panelSaleSum = new Ext.Panel({
title: '揽货人',
layout: "border",
region: 'center',
margin: '0 0',
frame: true,
items: [this.gridListSale]
});
this.panelSaleDeptSum = new Ext.Panel({
title: '销售部门',
layout: "border",
region: 'center',
margin: '0 0',
frame: true,
items: [this.gridListSaleDept]
});
this.panelSaleCorpSum = new Ext.Panel({
title: '所属分部',
layout: "border",
region: 'center',
margin: '0 0',
frame: true,
items: [this.gridListSaleCorp]
});
this.panelOpSum = new Ext.Panel({
title: '操作员',
layout: "border",
region: 'center',
margin: '0 0',
frame: true,
items: [this.gridListOp]
});
this.panelOpDeptSum = new Ext.Panel({
title: '操作部门',
layout: "border",
region: 'center',
margin: '0 0',
frame: true,
items: [this.gridListOpDept]
});
this.panelCustSum = new Ext.Panel({
title: '委托单位',
layout: "border",
region: 'center',
margin: '0 0',
frame: true,
items: [this.gridListCust]
});
this.panelCarrierSum = new Ext.Panel({
title: '船公司',
layout: "border",
region: 'center',
margin: '0 0',
frame: true,
items: [this.gridListCarrier]
});
this.panelYardSum = new Ext.Panel({
title: '场站',
layout: "border",
region: 'center',
margin: '0 0',
frame: true,
items: [this.gridListYard]
});
this.panelLaneSum = new Ext.Panel({
title: '航线',
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: '业务来源',
layout: "border",
region: 'center',
margin: '0 0',
frame: true,
items: [this.gridListBsSource]
});
this.panelBsSourceDetailSum = new Ext.Panel({
title: '来源明细',
layout: "border",
region: 'center',
margin: '0 0',
frame: true,
items: [this.gridListBsSourceDetail]
});
this.panelSum = new Ext.Panel({
title: '合 计',
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: '业务员',
width: 100
}];
this.girdcolumssaledept = [{
sortable: true,
dataIndex: 'SALEDEPT',
text: '销售部门',
width: 100
}];
this.girdcolumssalecorp = [{
sortable: true,
dataIndex: 'SALECORP',
text: '所属分部',
width: 100
}];
this.girdcolumsop = [{
sortable: true,
dataIndex: 'OP',
text: '操作员',
width: 100
}];
this.girdcolumsopdept = [{
sortable: true,
dataIndex: 'OPDEPT',
text: '操作部门',
width: 100
}];
this.girdcolumscust = [{
sortable: true,
dataIndex: 'CUSTOMERNAME',
text: '委托单位',
width: 100
}
];
this.girdcolumsbssource = [{
sortable: true,
dataIndex: 'BSSOURCE',
text: '业务来源',
width: 80
}];
this.girdcolumsbssourcedetail = [{
sortable: true,
dataIndex: 'BSSOURCE',
text: '业务来源',
width: 80
}, {
sortable: true,
dataIndex: 'BSSOURCEDETAIL',
text: '业务来源明细',
width: 80
}];
this.girdcolumscarrier = [{
sortable: true,
dataIndex: 'CARRIER',
text: '船公司',
width: 100
}
];
this.girdcolumsyard = [{
sortable: true,
dataIndex: 'YARD',
text: '场站',
width: 100
}
];
this.girdcolumslane = [{
sortable: true,
dataIndex: 'LANE',
text: '航线',
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: 'RMB应收',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
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: 'RMB应付',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
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: 'USD应收',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
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: 'USD应付',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
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: '其他应收',
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: '其他应付',
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: '合计应收',
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: '合计应付',
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: 'RMB利润',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
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: 'USD利润',
sortable: true,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
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: '其他利润',
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: '合计利润',
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: '利润率',
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();
this.sqlcontext = sql;
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) {
if (!this.checkSearchCondition())
return;
var sql = this.getCondition();
Ext.apply(store.proxy.extraParams, { condition: sql, datetype: datetype, startmonth: startdate, endmonth: enddate, feetype: feetype });
}, this);
this.storeSaleDeptList.on('beforeload', function (store) {
if (!this.checkSearchCondition())
return;
var sql = this.getCondition();
Ext.apply(store.proxy.extraParams, { condition: sql, datetype: datetype, startmonth: startdate, endmonth: enddate, feetype: feetype });
}, this);
this.storeSaleCorpList.on('beforeload', function (store) {
if (!this.checkSearchCondition())
return;
var sql = this.getCondition();
Ext.apply(store.proxy.extraParams, { condition: sql, datetype: datetype, startmonth: startdate, endmonth: enddate, feetype: feetype });
}, this);
this.storeOpList.on('beforeload', function (store) {
if (!this.checkSearchCondition())
return;
var sql = this.getCondition();
Ext.apply(store.proxy.extraParams, { condition: sql, datetype: datetype, startmonth: startdate, endmonth: enddate, feetype: feetype });
}, this);
this.storeOpDeptList.on('beforeload', function (store) {
if (!this.checkSearchCondition())
return;
var sql = this.getCondition();
Ext.apply(store.proxy.extraParams, { condition: sql, datetype: datetype, startmonth: startdate, endmonth: enddate, feetype: feetype });
}, this);
this.storeCustList.on('beforeload', function (store) {
if (!this.checkSearchCondition())
return;
var sql = this.getCondition();
Ext.apply(store.proxy.extraParams, { condition: sql, datetype: datetype, startmonth: startdate, endmonth: enddate, 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) {
if (!this.checkSearchCondition())
return;
var sql = this.getCondition();
Ext.apply(store.proxy.extraParams, { condition: sql, datetype: datetype, startmonth: startdate, endmonth: enddate, feetype: feetype });
}, this);
this.storeBsSourceDetailList.on('beforeload', function (store) {
if (!this.checkSearchCondition())
return;
var sql = this.getCondition();
Ext.apply(store.proxy.extraParams, { condition: sql, datetype: datetype, startmonth: startdate, endmonth: enddate, feetype: feetype });
}, this);
this.storeCarrierList.on('beforeload', function (store) {
if (!this.checkSearchCondition())
return;
var sql = this.getCondition();
Ext.apply(store.proxy.extraParams, { condition: sql, datetype: datetype, startmonth: startdate, endmonth: enddate, feetype: feetype });
}, this);
this.storeYardList.on('beforeload', function (store) {
if (!this.checkSearchCondition())
return;
var sql = this.getCondition();
Ext.apply(store.proxy.extraParams, { condition: sql, datetype: datetype, startmonth: startdate, endmonth: enddate, feetype: feetype });
}, this);
this.storeLaneList.on('beforeload', function (store) {
if (!this.checkSearchCondition())
return;
var sql = this.getCondition();
Ext.apply(store.proxy.extraParams, { condition: sql, datetype: datetype, startmonth: startdate, endmonth: enddate, feetype: feetype });
}, this);
this.storeSumList.on('beforeload', function (store) {
if (!this.checkSearchCondition())
return;
var sql = this.getCondition();
Ext.apply(store.proxy.extraParams, { condition: sql, datetype: datetype, startmonth: startdate, endmonth: enddate, feetype: feetype });
}, this);
}
},
scope: this
});
},
onRefreshClick: 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.getCondition();
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 != '') {
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);
}
} 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
});
}
}
});
}
}
});