|
|
|
|
//欠费统计
|
|
|
|
|
Ext.namespace('Shipping');
|
|
|
|
|
|
|
|
|
|
Shipping.MsRptZjTotalIndex = function (config) {
|
|
|
|
|
Ext.applyIf(this, config);
|
|
|
|
|
this.initUIComponents();
|
|
|
|
|
window.Shipping.MsRptZjTotalIndex.superclass.constructor.call(this);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Ext.extend(Shipping.MsRptZjTotalIndex, Ext.Panel, {
|
|
|
|
|
PageSize: 200,
|
|
|
|
|
OprationStatus: null, //仅当弹出界面时使用
|
|
|
|
|
SelectedRecord: null,
|
|
|
|
|
sqlcontext: '1=2',
|
|
|
|
|
|
|
|
|
|
initUIComponents: function () {
|
|
|
|
|
//定义数据集
|
|
|
|
|
|
|
|
|
|
this.formname = 'MsRptZjTotalIndex';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.storeCustList = Ext.create('Ext.data.Store', {
|
|
|
|
|
pageSize: this.PageSize,
|
|
|
|
|
fields: [
|
|
|
|
|
{ name: 'CUSTOMERNAME', type: 'string' },
|
|
|
|
|
{ name: 'TTLCR', type: 'number' },
|
|
|
|
|
{ name: 'TTLCRATS', type: 'string' },
|
|
|
|
|
{ name: 'TTLDR', type: 'number' },
|
|
|
|
|
{ name: 'TTLPROFIT', type: 'number' },
|
|
|
|
|
{ name: 'TTLPROFITATS', type: 'string' },
|
|
|
|
|
{ name: 'MONTH1ATS', type: 'string' },
|
|
|
|
|
{ name: 'MONTH2ATS', type: 'string' },
|
|
|
|
|
{ name: 'MONTH3ATS', type: 'string' },
|
|
|
|
|
{ name: 'OTMONTHATS', type: 'string' },
|
|
|
|
|
{ name: 'TTLDRATS', type: 'string' },
|
|
|
|
|
{ name: 'MONTH1CRATS', type: 'string' },
|
|
|
|
|
{ name: 'MONTH2CRATS', type: 'string' },
|
|
|
|
|
{ name: 'MONTH3CRATS', type: 'string' },
|
|
|
|
|
{ name: 'OTMONTHCRATS', type: 'string' },
|
|
|
|
|
{ name: 'TTLCRATS', type: 'string' },
|
|
|
|
|
{ name: 'TTLMONTHCRATS', type: 'string' }
|
|
|
|
|
],
|
|
|
|
|
remoteSort: true,
|
|
|
|
|
proxy: {
|
|
|
|
|
type: 'ajax',
|
|
|
|
|
url: '/MvcShipping/MsRptZjTotal/CustListData',
|
|
|
|
|
reader: {
|
|
|
|
|
id: '',
|
|
|
|
|
root: 'data',
|
|
|
|
|
totalProperty: 'totalCount'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
//定义Grid
|
|
|
|
|
this.gridListCust = new Ext.grid.GridPanel({
|
|
|
|
|
store: this.storeCustList,
|
|
|
|
|
enableHdMenu: false,
|
|
|
|
|
region: 'center',
|
|
|
|
|
loadMask: { msg: "数据加载中,请稍等..." },
|
|
|
|
|
trackMouseOver: true,
|
|
|
|
|
disableSelection: false,
|
|
|
|
|
columns: [{
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'CUSTOMERNAME',
|
|
|
|
|
header: '委托单位',
|
|
|
|
|
width: 120
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'TTLCR',
|
|
|
|
|
header: '资金占用量',
|
|
|
|
|
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; },
|
|
|
|
|
width: 136
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'TTLCRATS',
|
|
|
|
|
header: '资金占用率',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'TTLDR',
|
|
|
|
|
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
|
|
|
header: '合计应收',
|
|
|
|
|
width: 120
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'TTLPROFIT',
|
|
|
|
|
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
|
|
|
|
|
|
|
|
header: '合计利润',
|
|
|
|
|
width: 120
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'TTLPROFITATS',
|
|
|
|
|
header: '利润率',
|
|
|
|
|
width: 86
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'MONTH1ATS',
|
|
|
|
|
header: '当月回收率',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'MONTH2ATS',
|
|
|
|
|
header: '二月回收率',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'MONTH3ATS',
|
|
|
|
|
header: '三月回收率',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'OTMONTHATS',
|
|
|
|
|
header: '其他回收率',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'TTLDRATS',
|
|
|
|
|
header: '合计回收率',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'MONTH1CRATS',
|
|
|
|
|
header: '当月支付率',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'MONTH2CRATS',
|
|
|
|
|
header: '二月支付率',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'MONTH3CRATS',
|
|
|
|
|
header: '三月支付率',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'OTMONTHCRATS',
|
|
|
|
|
header: '其他支付率',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'TTLMONTHCRATS',
|
|
|
|
|
header: '合计支付率',
|
|
|
|
|
width: 80
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
],
|
|
|
|
|
// paging bar on the bottom
|
|
|
|
|
bbar: Ext.create('Ext.PagingToolbar', {
|
|
|
|
|
store: this.storeCustList,
|
|
|
|
|
displayInfo: true,
|
|
|
|
|
displayMsg: '当前显示 {0} - {1}条记录 /共 {2}条记录',
|
|
|
|
|
emptyMsg: "没有数据"
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.storeSaleList = Ext.create('Ext.data.Store', {
|
|
|
|
|
pageSize: this.PageSize,
|
|
|
|
|
fields: [
|
|
|
|
|
|
|
|
|
|
{ name: 'SALE', type: 'string' },
|
|
|
|
|
{ name: 'TTLCR', type: 'number' },
|
|
|
|
|
{ name: 'TTLCRATS', type: 'string' },
|
|
|
|
|
{ name: 'TTLDR', type: 'number' },
|
|
|
|
|
{ name: 'TTLPROFIT', type: 'number' },
|
|
|
|
|
{ name: 'TTLPROFITATS', type: 'string' },
|
|
|
|
|
{ name: 'MONTH1ATS', type: 'string' },
|
|
|
|
|
{ name: 'MONTH2ATS', type: 'string' },
|
|
|
|
|
{ name: 'MONTH3ATS', type: 'string' },
|
|
|
|
|
{ name: 'OTMONTHATS', type: 'string' },
|
|
|
|
|
{ name: 'TTLDRATS', type: 'string' },
|
|
|
|
|
{ name: 'MONTH1CRATS', type: 'string' },
|
|
|
|
|
{ name: 'MONTH2CRATS', type: 'string' },
|
|
|
|
|
{ name: 'MONTH3CRATS', type: 'string' },
|
|
|
|
|
{ name: 'OTMONTHCRATS', type: 'string' },
|
|
|
|
|
{ name: 'TTLCRATS', type: 'string' },
|
|
|
|
|
{ name: 'TTLMONTHCRATS', type: 'string' }
|
|
|
|
|
|
|
|
|
|
],
|
|
|
|
|
remoteSort: true,
|
|
|
|
|
proxy: {
|
|
|
|
|
type: 'ajax',
|
|
|
|
|
url: '/MvcShipping/MsRptZjTotal/SaleListData',
|
|
|
|
|
reader: {
|
|
|
|
|
id: '',
|
|
|
|
|
root: 'data',
|
|
|
|
|
totalProperty: 'totalCount'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
//定义Grid
|
|
|
|
|
this.gridListSale = new Ext.grid.GridPanel({
|
|
|
|
|
store: this.storeSaleList,
|
|
|
|
|
enableHdMenu: false,
|
|
|
|
|
region: 'center',
|
|
|
|
|
loadMask: { msg: "数据加载中,请稍等..." },
|
|
|
|
|
trackMouseOver: true,
|
|
|
|
|
disableSelection: false,
|
|
|
|
|
columns: [{
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'SALE',
|
|
|
|
|
header: '业务员',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'TTLCR',
|
|
|
|
|
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
|
|
|
header: '资金占用量',
|
|
|
|
|
width: 136
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'TTLCRATS',
|
|
|
|
|
header: '资金占用率',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'TTLDR',
|
|
|
|
|
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
|
|
|
header: '合计应收',
|
|
|
|
|
width: 120
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'TTLPROFIT',
|
|
|
|
|
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
|
|
|
header: '合计利润',
|
|
|
|
|
width: 120
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'TTLPROFITATS',
|
|
|
|
|
header: '利润率',
|
|
|
|
|
width: 86
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'MONTH1ATS',
|
|
|
|
|
header: '当月回收率',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'MONTH2ATS',
|
|
|
|
|
header: '二月回收率',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'MONTH3ATS',
|
|
|
|
|
header: '三月回收率',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'OTMONTHATS',
|
|
|
|
|
header: '其他回收率',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'TTLDRATS',
|
|
|
|
|
header: '合计回收率',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'MONTH1CRATS',
|
|
|
|
|
header: '当月支付率',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'MONTH2CRATS',
|
|
|
|
|
header: '二月支付率',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'MONTH3CRATS',
|
|
|
|
|
header: '三月支付率',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'OTMONTHCRATS',
|
|
|
|
|
header: '其他支付率',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'TTLMONTHCRATS',
|
|
|
|
|
header: '合计支付率',
|
|
|
|
|
width: 80
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
],
|
|
|
|
|
// paging bar on the bottom
|
|
|
|
|
bbar: Ext.create('Ext.PagingToolbar', {
|
|
|
|
|
store: this.storeSaleList,
|
|
|
|
|
displayInfo: true,
|
|
|
|
|
displayMsg: '当前显示 {0} - {1}条记录 /共 {2}条记录',
|
|
|
|
|
emptyMsg: "没有数据"
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.storeOpList = Ext.create('Ext.data.Store', {
|
|
|
|
|
pageSize: this.PageSize,
|
|
|
|
|
fields: [
|
|
|
|
|
{ name: 'OP', type: 'string' },
|
|
|
|
|
{ name: 'TTLCR', type: 'number' },
|
|
|
|
|
{ name: 'TTLCRATS', type: 'string' },
|
|
|
|
|
{ name: 'TTLDR', type: 'number' },
|
|
|
|
|
{ name: 'TTLPROFIT', type: 'number' },
|
|
|
|
|
{ name: 'TTLPROFITATS', type: 'string' },
|
|
|
|
|
{ name: 'MONTH1ATS', type: 'string' },
|
|
|
|
|
{ name: 'MONTH2ATS', type: 'string' },
|
|
|
|
|
{ name: 'MONTH3ATS', type: 'string' },
|
|
|
|
|
{ name: 'OTMONTHATS', type: 'string' },
|
|
|
|
|
{ name: 'TTLATS', type: 'string' },
|
|
|
|
|
{ name: 'MONTH1CRATS', type: 'string' },
|
|
|
|
|
{ name: 'MONTH2CRATS', type: 'string' },
|
|
|
|
|
{ name: 'MONTH3CRATS', type: 'string' },
|
|
|
|
|
{ name: 'OTMONTHCRATS', type: 'string' },
|
|
|
|
|
{ name: 'TTLCRATS', type: 'string' },
|
|
|
|
|
{ name: 'TTLMONTHCRATS', type: 'string' }
|
|
|
|
|
|
|
|
|
|
],
|
|
|
|
|
remoteSort: true,
|
|
|
|
|
proxy: {
|
|
|
|
|
type: 'ajax',
|
|
|
|
|
url: '/MvcShipping/MsRptZjTotal/OpListData',
|
|
|
|
|
reader: {
|
|
|
|
|
id: '',
|
|
|
|
|
root: 'data',
|
|
|
|
|
totalProperty: 'totalCount'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
//定义Grid
|
|
|
|
|
this.gridListOp = new Ext.grid.GridPanel({
|
|
|
|
|
store: this.storeOpList,
|
|
|
|
|
enableHdMenu: false,
|
|
|
|
|
region: 'center',
|
|
|
|
|
loadMask: { msg: "数据加载中,请稍等..." },
|
|
|
|
|
trackMouseOver: true,
|
|
|
|
|
disableSelection: false,
|
|
|
|
|
columns: [{
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'OP',
|
|
|
|
|
header: '操作员',
|
|
|
|
|
width: 120
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'TTLCR',
|
|
|
|
|
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
|
|
|
header: '资金占用量',
|
|
|
|
|
width: 136
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'TTLCRATS',
|
|
|
|
|
header: '资金占用率',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'TTLDR',
|
|
|
|
|
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
|
|
|
header: '合计应收',
|
|
|
|
|
width: 120
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'TTLPROFIT',
|
|
|
|
|
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
|
|
|
header: '合计利润',
|
|
|
|
|
width: 120
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'TTLPROFITATS',
|
|
|
|
|
header: '利润率',
|
|
|
|
|
width: 86
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'MONTH1ATS',
|
|
|
|
|
header: '当月回收率',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'MONTH2ATS',
|
|
|
|
|
header: '二月回收率',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'MONTH3ATS',
|
|
|
|
|
header: '三月回收率',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'OTMONTHATS',
|
|
|
|
|
header: '其他回收率',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'TTLATS',
|
|
|
|
|
header: '合计回收率',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'MONTH1CRATS',
|
|
|
|
|
header: '当月支付率',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'MONTH2CRATS',
|
|
|
|
|
header: '二月支付率',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'MONTH3CRATS',
|
|
|
|
|
header: '三月支付率',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'OTMONTHCRATS',
|
|
|
|
|
header: '其他支付率',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'TTLMONTHCRATS',
|
|
|
|
|
header: '合计支付率',
|
|
|
|
|
width: 80
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
],
|
|
|
|
|
// paging bar on the bottom
|
|
|
|
|
bbar: Ext.create('Ext.PagingToolbar', {
|
|
|
|
|
store: this.storeOpList,
|
|
|
|
|
displayInfo: true,
|
|
|
|
|
displayMsg: '当前显示 {0} - {1}条记录 /共 {2}条记录',
|
|
|
|
|
emptyMsg: "没有数据"
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.storeSumList = Ext.create('Ext.data.Store', {
|
|
|
|
|
pageSize: this.PageSize,
|
|
|
|
|
fields: [
|
|
|
|
|
{ name: 'TTLCR', type: 'number' },
|
|
|
|
|
{ name: 'TTLCRATS', type: 'string' },
|
|
|
|
|
{ name: 'TTLDR', type: 'number' },
|
|
|
|
|
{ name: 'TTLPROFIT', type: 'number' },
|
|
|
|
|
{ name: 'TTLPROFITATS', type: 'string' },
|
|
|
|
|
{ name: 'MONTH1ATS', type: 'string' },
|
|
|
|
|
{ name: 'MONTH2ATS', type: 'string' },
|
|
|
|
|
{ name: 'MONTH3ATS', type: 'string' },
|
|
|
|
|
{ name: 'OTMONTHATS', type: 'string' },
|
|
|
|
|
{ name: 'TTLDRATS', type: 'string' },
|
|
|
|
|
{ name: 'MONTH1CRATS', type: 'string' },
|
|
|
|
|
{ name: 'MONTH2CRATS', type: 'string' },
|
|
|
|
|
{ name: 'MONTH3CRATS', type: 'string' },
|
|
|
|
|
{ name: 'OTMONTHCRATS', type: 'string' },
|
|
|
|
|
{ name: 'TTLCRATS', type: 'string' },
|
|
|
|
|
{ name: 'TTLMONTHCRATS', type: 'string' }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
],
|
|
|
|
|
remoteSort: true,
|
|
|
|
|
proxy: {
|
|
|
|
|
type: 'ajax',
|
|
|
|
|
url: '/MvcShipping/MsRptZjTotal/SumListData',
|
|
|
|
|
reader: {
|
|
|
|
|
id: '',
|
|
|
|
|
root: 'data',
|
|
|
|
|
totalProperty: 'totalCount'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
//定义Grid
|
|
|
|
|
this.gridListSum = new Ext.grid.GridPanel({
|
|
|
|
|
store: this.storeSumList,
|
|
|
|
|
enableHdMenu: false,
|
|
|
|
|
region: 'center',
|
|
|
|
|
loadMask: { msg: "数据加载中,请稍等..." },
|
|
|
|
|
trackMouseOver: true,
|
|
|
|
|
disableSelection: false,
|
|
|
|
|
columns: [{
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'TTLCR',
|
|
|
|
|
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
|
|
|
header: '资金占用量',
|
|
|
|
|
width: 136
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'TTLCRATS',
|
|
|
|
|
header: '资金占用率',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'TTLDR',
|
|
|
|
|
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
|
|
|
header: '合计应收',
|
|
|
|
|
width: 120
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'TTLPROFIT',
|
|
|
|
|
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
|
|
|
header: '合计利润',
|
|
|
|
|
width: 120
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'TTLPROFITATS',
|
|
|
|
|
header: '利润率',
|
|
|
|
|
width: 86
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'MONTH1ATS',
|
|
|
|
|
header: '当月回收率',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'MONTH2ATS',
|
|
|
|
|
header: '二月回收率',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'MONTH3ATS',
|
|
|
|
|
header: '三月回收率',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'OTMONTHATS',
|
|
|
|
|
header: '其他回收率',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'TTLDRATS',
|
|
|
|
|
header: '合计回收率',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'MONTH1CRATS',
|
|
|
|
|
header: '当月支付率',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'MONTH2CRATS',
|
|
|
|
|
header: '二月支付率',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'MONTH3CRATS',
|
|
|
|
|
header: '三月支付率',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'OTMONTHCRATS',
|
|
|
|
|
header: '其他支付率',
|
|
|
|
|
width: 80
|
|
|
|
|
}, {
|
|
|
|
|
sortable: true,
|
|
|
|
|
dataIndex: 'TTLMONTHCRATS',
|
|
|
|
|
header: '合计支付率',
|
|
|
|
|
width: 80
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//#region formSearch
|
|
|
|
|
|
|
|
|
|
//#region formSearch枚举参照相关
|
|
|
|
|
|
|
|
|
|
this.StoreOpLb = Ext.create('Ext.data.Store', {
|
|
|
|
|
fields: ['OpLb']
|
|
|
|
|
});
|
|
|
|
|
this.StoreOpLb.add({ "OpLb": "海运出口" });
|
|
|
|
|
this.StoreOpLb.add({ "OpLb": "海运进口" });
|
|
|
|
|
this.StoreOpLb.add({ "OpLb": "报关业务" });
|
|
|
|
|
this.StoreOpLb.add({ "OpLb": "大宗散货" });
|
|
|
|
|
this.StoreOpLb.add({ "OpLb": "综合业务" });
|
|
|
|
|
|
|
|
|
|
this.comboxOpLb = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
|
|
fieldLabel: '业务类型',
|
|
|
|
|
store: this.StoreOpLb,
|
|
|
|
|
forceSelection: true,
|
|
|
|
|
name: 'PS_OPLB',
|
|
|
|
|
valueField: 'OpLb',
|
|
|
|
|
displayField: 'OpLb'
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
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'
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
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'
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.comboxOp = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
|
|
fieldLabel: '操 作',
|
|
|
|
|
store: this.storeSalesCode,
|
|
|
|
|
forceSelection: true,
|
|
|
|
|
name: 'PS_OP',
|
|
|
|
|
valueField: 'UserName',
|
|
|
|
|
displayField: 'CodeAndName'
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
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'
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.storeEnterpCode = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
|
|
model: 'DsShipping.ux.CustomerRefModel',
|
|
|
|
|
proxy: { url: '/MvcShipping/MsBaseInfo/GetCustomerRefList' }
|
|
|
|
|
});
|
|
|
|
|
this.storeEnterpCode.load({ params: { condition: "ISENTERP='1'"} });
|
|
|
|
|
|
|
|
|
|
this.comboxEnterp = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
|
|
fieldLabel: '经营单位',
|
|
|
|
|
store: this.storeEnterpCode,
|
|
|
|
|
forceSelection: true,
|
|
|
|
|
name: 'PS_ENTERP',
|
|
|
|
|
valueField: 'DESCRIPTION',
|
|
|
|
|
displayField: 'CodeAndName'
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Ext.define('SubComp', {
|
|
|
|
|
extend: 'Ext.data.Model',
|
|
|
|
|
fields: [
|
|
|
|
|
{ name: 'GID', type: 'string' },
|
|
|
|
|
{ name: 'NAME', type: 'string' },
|
|
|
|
|
{ name: 'ENNAME', type: 'string' }
|
|
|
|
|
]
|
|
|
|
|
});
|
|
|
|
|
this.StoreSubComp = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
|
|
model: 'SubComp',
|
|
|
|
|
proxy: { url: '/MvcShipping/MsBaseInfo/GetCompanyEN' }
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.StoreSubComp.load({ params: { condition: ""} });
|
|
|
|
|
|
|
|
|
|
this.comboxSubComp = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
|
|
fieldLabel: '所属公司',
|
|
|
|
|
store: this.StoreSubComp,
|
|
|
|
|
name: 'SUBCOMP',
|
|
|
|
|
valueField: 'GID',
|
|
|
|
|
displayField: 'NAME',
|
|
|
|
|
enableKeyEvents: true,
|
|
|
|
|
listeners: {
|
|
|
|
|
keyup: function (field, e) {
|
|
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
|
|
_this.onRefreshClick();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
//客户加载_订舱代理
|
|
|
|
|
this.storeFORWARDER = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
|
|
model: 'DsShipping.ux.CustomRefModel',
|
|
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetCustomRefListFORWARDER' }
|
|
|
|
|
});
|
|
|
|
|
// this.storeFORWARDER.load({ params: { condition: "ISBOOKING='1'"} });
|
|
|
|
|
//船公司
|
|
|
|
|
this.comboxFORWARDER = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
|
|
fieldLabel: '订舱代理', //'订舱代理',
|
|
|
|
|
store: this.storeFORWARDER,
|
|
|
|
|
queryMode: 'remote',
|
|
|
|
|
minChars: 1,
|
|
|
|
|
queryParam: 'CODENAME',
|
|
|
|
|
name: 'FORWARDER',
|
|
|
|
|
valueField: 'CustName',
|
|
|
|
|
displayField: 'CodeAndName'
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//#endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.formSearch = Ext.widget('form', {
|
|
|
|
|
frame: true,
|
|
|
|
|
region: 'center',
|
|
|
|
|
bodyPadding: 5,
|
|
|
|
|
fieldDefaults: {
|
|
|
|
|
margins: '2 2 2 2',
|
|
|
|
|
labelAlign: 'right',
|
|
|
|
|
flex: 1,
|
|
|
|
|
labelWidth: 90,
|
|
|
|
|
msgTarget: 'qtip'
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
items: [
|
|
|
|
|
{//fieldset 1
|
|
|
|
|
xtype: 'container',
|
|
|
|
|
defaultType: 'textfield',
|
|
|
|
|
layout: 'anchor',
|
|
|
|
|
defaults: {
|
|
|
|
|
anchor: '100%'
|
|
|
|
|
},
|
|
|
|
|
items: [ {
|
|
|
|
|
xtype: 'container',
|
|
|
|
|
layout: 'hbox',
|
|
|
|
|
defaultType: 'textfield',
|
|
|
|
|
items: [this.comboxOpLb, {
|
|
|
|
|
fieldLabel: '编号',
|
|
|
|
|
name: 'PS_MBLNO'
|
|
|
|
|
}, {
|
|
|
|
|
fieldLabel: '船名',
|
|
|
|
|
name: 'PS_VESSEL'
|
|
|
|
|
}, {
|
|
|
|
|
fieldLabel: '航次',
|
|
|
|
|
name: 'PS_VOYNO'
|
|
|
|
|
}, {
|
|
|
|
|
fieldLabel: '品名',
|
|
|
|
|
name: 'PS_GOODSNAME'
|
|
|
|
|
}, this.comboxSubComp
|
|
|
|
|
]
|
|
|
|
|
}, {
|
|
|
|
|
xtype: 'container',
|
|
|
|
|
layout: 'hbox',
|
|
|
|
|
defaultType: 'textfield',
|
|
|
|
|
items: [this.comboxBsType, this.comboxSalesCode, this.comboxCustCode, {
|
|
|
|
|
fieldLabel: '从业务日期',
|
|
|
|
|
format: 'Y-m-d',
|
|
|
|
|
xtype: 'datefield',
|
|
|
|
|
name: 'PS_EXPDATEBGN'
|
|
|
|
|
}, {
|
|
|
|
|
fieldLabel: '到业务日期',
|
|
|
|
|
format: 'Y-m-d',
|
|
|
|
|
xtype: 'datefield',
|
|
|
|
|
name: 'PS_EXPDATEEND'
|
|
|
|
|
}, { xtype: 'hiddenfield' }
|
|
|
|
|
]
|
|
|
|
|
}, {
|
|
|
|
|
xtype: 'container',
|
|
|
|
|
layout: 'hbox',
|
|
|
|
|
defaultType: 'textfield',
|
|
|
|
|
items: [this.comboxEnterp, {
|
|
|
|
|
fieldLabel: '从ETD',
|
|
|
|
|
format: 'Y-m-d',
|
|
|
|
|
xtype: 'datefield',
|
|
|
|
|
name: 'PS_ETDDATEBGN'
|
|
|
|
|
}, {
|
|
|
|
|
fieldLabel: '到ETD',
|
|
|
|
|
format: 'Y-m-d',
|
|
|
|
|
xtype: 'datefield',
|
|
|
|
|
name: 'PS_ETDDATEEND'
|
|
|
|
|
}, {
|
|
|
|
|
fieldLabel: '从会计期间',
|
|
|
|
|
xtype: 'monthfield',
|
|
|
|
|
name: 'PS_ACCDATEBGN'
|
|
|
|
|
}, {
|
|
|
|
|
fieldLabel: '从会计期间',
|
|
|
|
|
xtype: 'monthfield',
|
|
|
|
|
name: 'PS_ACCDATEEND'
|
|
|
|
|
}, this.comboxFORWARDER
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
]//end items(fieldset 1)
|
|
|
|
|
}//end fieldset 1
|
|
|
|
|
]//end root items
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
//#endregion formSearch
|
|
|
|
|
|
|
|
|
|
//查询工具条
|
|
|
|
|
|
|
|
|
|
_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);
|
|
|
|
|
},
|
|
|
|
|
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
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.panelTop = new Ext.Panel({
|
|
|
|
|
layout: "border",
|
|
|
|
|
region: "north",
|
|
|
|
|
height: 29,
|
|
|
|
|
items: [this.panelBtn]
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.panelSearch = new Ext.Panel({
|
|
|
|
|
layout: "border",
|
|
|
|
|
region: "north",
|
|
|
|
|
height: 100,
|
|
|
|
|
items: [this.formSearch]
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.panelSaleSum = new Ext.Panel({
|
|
|
|
|
title: '揽货人',
|
|
|
|
|
layout: "border",
|
|
|
|
|
region: 'center',
|
|
|
|
|
margin: '0 0',
|
|
|
|
|
frame: true,
|
|
|
|
|
items: [this.gridListSale]
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.panelOpSum = new Ext.Panel({
|
|
|
|
|
title: '操作员',
|
|
|
|
|
layout: "border",
|
|
|
|
|
region: 'center',
|
|
|
|
|
margin: '0 0',
|
|
|
|
|
frame: true,
|
|
|
|
|
items: [this.gridListOp]
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.panelCustSum = new Ext.Panel({
|
|
|
|
|
title: '委托单位',
|
|
|
|
|
layout: "border",
|
|
|
|
|
region: 'center',
|
|
|
|
|
margin: '0 0',
|
|
|
|
|
frame: true,
|
|
|
|
|
items: [this.gridListCust]
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
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.panelCustSum,
|
|
|
|
|
this.panelSaleSum,
|
|
|
|
|
this.panelOpSum
|
|
|
|
|
]
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Ext.apply(this, {
|
|
|
|
|
items: [this.panelTop, this.panelSearch, this.tabpanel, this.panelSum]
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.storeSaleList.on('beforeload', function (store) {
|
|
|
|
|
if (!this.checkSearchCondition())
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
var sql = this.getCondition();
|
|
|
|
|
Ext.apply(store.proxy.extraParams, { condition: sql });
|
|
|
|
|
}, this);
|
|
|
|
|
this.storeCustList.on('beforeload', function (store) {
|
|
|
|
|
if (!this.checkSearchCondition())
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
var sql = this.getCondition();
|
|
|
|
|
Ext.apply(store.proxy.extraParams, { condition: sql });
|
|
|
|
|
}, this);
|
|
|
|
|
|
|
|
|
|
this.storeOpList.on('beforeload', function (store) {
|
|
|
|
|
if (!this.checkSearchCondition())
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
var sql = this.getCondition();
|
|
|
|
|
Ext.apply(store.proxy.extraParams, { condition: sql });
|
|
|
|
|
}, this);
|
|
|
|
|
|
|
|
|
|
this.storeSumList.on('beforeload', function (store) {
|
|
|
|
|
if (!this.checkSearchCondition())
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
var sql = this.getCondition();
|
|
|
|
|
Ext.apply(store.proxy.extraParams, { condition: sql });
|
|
|
|
|
}, this);
|
|
|
|
|
|
|
|
|
|
}, //end initUIComponents
|
|
|
|
|
|
|
|
|
|
onRefreshClick: function (button, event) {
|
|
|
|
|
if (!this.checkSearchCondition())
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
var sql = this.getCondition();
|
|
|
|
|
|
|
|
|
|
this.sqlcontext = sql;
|
|
|
|
|
var Drsql = sql + getAndConSql(sql, '1=1', " F.FEETYPE=1");
|
|
|
|
|
var Crsql = sql + getAndConSql(sql, '1=1', " F.FEETYPE=2");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.storeCustList.load({
|
|
|
|
|
params: { start: 0, limit: this.PageSize, condition: sql },
|
|
|
|
|
waitMsg: "正在查询数据...",
|
|
|
|
|
scope: this
|
|
|
|
|
});
|
|
|
|
|
this.storeSaleList.load({
|
|
|
|
|
params: { start: 0, limit: this.PageSize, condition: sql },
|
|
|
|
|
waitMsg: "正在查询数据...",
|
|
|
|
|
scope: this
|
|
|
|
|
});
|
|
|
|
|
this.storeOpList.load({
|
|
|
|
|
params: { start: 0, limit: this.PageSize, condition: sql },
|
|
|
|
|
waitMsg: "正在查询数据...",
|
|
|
|
|
scope: this
|
|
|
|
|
});
|
|
|
|
|
this.storeSumList.load({
|
|
|
|
|
params: { start: 0, limit: this.PageSize, condition: sql },
|
|
|
|
|
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, " (isnull(b.CUSTNO,'')+' '+isnull(b.MBLNO,'')+' '+isnull(b.HBLNO,'')+' '+isnull(b.CUSTOMNO,'')+' '+isnull(b.ORDERNO,'') like '%" + mblNo + "%') ");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var expDate_Min = form.findField('PS_EXPDATEBGN').getRawValue();
|
|
|
|
|
sql = sql + getAndConSql(sql, expDate_Min, " B.OPDATE>='" + expDate_Min + "'");
|
|
|
|
|
|
|
|
|
|
var expDate_Max = form.findField('PS_EXPDATEEND').getRawValue();
|
|
|
|
|
sql = sql + getAndConSql(sql, expDate_Max, " B.OPDATE<='" + expDate_Max + " 23:59:59'");
|
|
|
|
|
|
|
|
|
|
var etdDate_Min = form.findField('PS_ETDDATEBGN').getRawValue();
|
|
|
|
|
sql = sql + getAndConSql(sql, etdDate_Min, " B.ETD>='" + etdDate_Min + "'");
|
|
|
|
|
|
|
|
|
|
var etdDate_Max = form.findField('PS_ETDDATEEND').getRawValue();
|
|
|
|
|
sql = sql + getAndConSql(sql, etdDate_Max, " B.ETD<='" + etdDate_Max + " 23:59:59'");
|
|
|
|
|
|
|
|
|
|
var accDate_Min = form.findField('PS_ACCDATEBGN').getRawValue();
|
|
|
|
|
sql = sql + getAndConSql(sql, accDate_Min, " B.ACCDATE>='" + accDate_Min + "'");
|
|
|
|
|
|
|
|
|
|
var accDate_Max = form.findField('PS_ACCDATEEND').getRawValue();
|
|
|
|
|
sql = sql + getAndConSql(sql, accDate_Max, " B.ACCDATE<='" + accDate_Max + "'");
|
|
|
|
|
|
|
|
|
|
var ENTERP = form.findField('PS_ENTERP').getValue();
|
|
|
|
|
sql = sql + getAndConSql(sql, ENTERP, "B.ENTERP='" + ENTERP + "'");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var SUBCOMP = form.findField('SUBCOMP').getValue();
|
|
|
|
|
sql = sql + getAndConSql(sql, SUBCOMP, "B.CORPID='" + SUBCOMP + "'");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var FORWARDER = form.findField('FORWARDER').getValue();
|
|
|
|
|
sql = sql + getAndConSql(sql, FORWARDER, "B.FORWARDER='" + FORWARDER + "'");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var CUSTOMERNAME = form.findField('PS_CUSTOMERNAME').getValue();
|
|
|
|
|
sql = sql + getAndConSql(sql, CUSTOMERNAME, "B.CUSTOMERNAME='" + CUSTOMERNAME + "'");
|
|
|
|
|
|
|
|
|
|
var SALE = form.findField('PS_SALE').getValue();
|
|
|
|
|
sql = sql + getAndConSql(sql, SALE, "B.SALE='" + SALE + "'");
|
|
|
|
|
|
|
|
|
|
var BSTYPE = form.findField('PS_BSTYPE').getValue();
|
|
|
|
|
sql = sql + getAndConSql(sql, BSTYPE, "B.BSTYPE='" + BSTYPE + "'");
|
|
|
|
|
|
|
|
|
|
var OPLB = form.findField('PS_OPLB').getValue();
|
|
|
|
|
sql = sql + getAndConSql(sql, OPLB, "B.OPLBNAME='" + OPLB + "'");
|
|
|
|
|
|
|
|
|
|
var VESSEL = form.findField('PS_VESSEL').getValue();
|
|
|
|
|
sql = sql + getAndConSql(sql, VESSEL, "B.VESSEL like '%" + VESSEL + "%'");
|
|
|
|
|
|
|
|
|
|
var VOYNO = form.findField('PS_VOYNO').getValue();
|
|
|
|
|
sql = sql + getAndConSql(sql, VOYNO, "B.VOYNO like '%" + VOYNO + "%'");
|
|
|
|
|
|
|
|
|
|
var GOODSNAME = form.findField('PS_GOODSNAME').getValue();
|
|
|
|
|
sql = sql + getAndConSql(sql, GOODSNAME, "B.GOODSNAME like '%" + GOODSNAME + "%'");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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] = "MsRptZjTotalIndex";
|
|
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
,
|
|
|
|
|
onExportClick: function (button, event) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (this.tabpanel.getActiveTab() == this.panelSaleSum) {
|
|
|
|
|
|
|
|
|
|
GridExportExcelPage(this.gridListSale);
|
|
|
|
|
} else if (this.tabpanel.getActiveTab() == this.panelCustSum) {
|
|
|
|
|
|
|
|
|
|
GridExportExcelPage(this.gridListCust);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Print: function () {
|
|
|
|
|
|
|
|
|
|
_this = this;
|
|
|
|
|
if (this.tabpanel.activeTab == this.panelSaleSum) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (this.storeSaleList.getCount() == 0) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Ext.Msg.wait('正在组织数据, 请稍侯..');
|
|
|
|
|
Ext.Ajax.request({
|
|
|
|
|
waitMsg: '正在组织数据...',
|
|
|
|
|
url: '/MvcShipping/MsRptZjTotal/SaleListData',
|
|
|
|
|
scope: this,
|
|
|
|
|
params: {
|
|
|
|
|
start: 0, limit: this.PageSize,
|
|
|
|
|
condition: _this.sqlcontext,
|
|
|
|
|
printstr: 'true'
|
|
|
|
|
},
|
|
|
|
|
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 = 'MSRPTZJTOTALSALE';
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
Ext.Msg.wait('正在组织数据, 请稍侯..');
|
|
|
|
|
Ext.Ajax.request({
|
|
|
|
|
waitMsg: '正在组织数据...',
|
|
|
|
|
url: '/MvcShipping/MsRptZjTotal/CustListData',
|
|
|
|
|
scope: this,
|
|
|
|
|
params: {
|
|
|
|
|
start: 0, limit: this.PageSize,
|
|
|
|
|
condition: _this.sqlcontext,
|
|
|
|
|
printstr: 'true'
|
|
|
|
|
},
|
|
|
|
|
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 = 'MSRPTZJTOTALCUST';
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
Ext.Msg.wait('正在组织数据, 请稍侯..');
|
|
|
|
|
Ext.Ajax.request({
|
|
|
|
|
waitMsg: '正在组织数据...',
|
|
|
|
|
url: '/MvcShipping/MsRptZjTotal/OpListData',
|
|
|
|
|
scope: this,
|
|
|
|
|
params: {
|
|
|
|
|
start: 0, limit: this.PageSize,
|
|
|
|
|
condition: _this.sqlcontext,
|
|
|
|
|
printstr: 'true'
|
|
|
|
|
},
|
|
|
|
|
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 = 'MSRPTZJTOTALOP';
|
|
|
|
|
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
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|