You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
DS7/DSWeb/MvcShipping/Viewsjs/MsOpBill/MsCtnStatusView.js

240 lines
6.4 KiB
JavaScript

//发票综合统计
Ext.namespace('Shipping');
Shipping.MsCtnStatusView = function (config) {
Ext.applyIf(this, config);
this.initUIComponents();
window.Shipping.MsCtnStatusView.superclass.constructor.call(this);
};
Ext.extend(Shipping.MsCtnStatusView, Ext.Panel, {
PageSize: 2000,
OprationStatus: null, //仅当弹出界面时使用
SelectedRecord: null,
sqlcontext: '1=2',
bslistdrsortfield: '',
bslistdrsortdire: '',
bslistcrsortfield: '',
bslistcrsortdire: '',
feelistdrsortfield: '',
feelistdrsortdire: '',
feelistcrsortfield: '',
feelistcrsortdire: '',
salesumsortfield: '',
salesumsortdire: '',
custsumsortfield: '',
custsumsortdire: '',
vesselsumsortfield: '',
vesselsumsortdire: '',
initUIComponents: function () {
//定义数据集
this.mblno = getUrlParam('mblno');
this.bsno = getUrlParam('bsno');
if (this.bsno == undefined || this.bsno == '') {
this.bsno = "111";
}
this.formname = 'MsCtnStatusView';
this.storeListDr = Ext.create('Ext.data.Store', {
pageSize: this.PageSize,
fields: [
{ name: 'MBLNO', type: 'string' },
{ name: 'YARD', type: 'string' },
{ name: 'CNTRNO', type: 'string' },
{ name: 'SEALNO', type: 'string' },
{ name: 'CTNALL', type: 'string' },
{ name: 'TXSJ', type: 'string' },
{ name: 'FCSJ', type: 'string' },
{ name: 'JGSJ', type: 'string' },
{ name: 'TRUCKNO', type: 'string' },
{ name: 'ZZXC', type: 'string' },
{ name: 'ZZZC', type: 'string' },
{ name: 'HZSJ', type: 'string' },
{ name: 'HGFX', type: 'string' },
{ name: 'DGSJ', type: 'string' },
{ name: 'THSJ', type: 'string' },
{ name: 'ZCCY', type: 'string' },
{ name: 'FKSJ', type: 'string' }
],
remoteSort: true,
proxy: {
type: 'ajax',
url: '/MvcShipping/MsOpBill/GetCtnStatus',
reader: {
id: '',
root: 'data',
totalProperty: 'totalCount'
}
}
});
//定义Grid
this.initgirdcolumsdr = [{
sortable: true,
dataIndex: 'MBLNO',
header: '提单号',
width: 120
}, {
sortable: true,
dataIndex: 'CNTRNO',
header: '箱号',
width: 100
}, {
sortable: true,
dataIndex: 'SEALNO',
header: '封号',
width: 80
}, {
sortable: true,
dataIndex: 'TXSJ',
header: '提箱时间',
width: 100
}, {
sortable: true,
dataIndex: 'FCSJ',
header: '返箱时间',
width: 100
}, {
sortable: true,
dataIndex: 'JGSJ',
header: '集港时间',
width: 100
}, {
sortable: true,
dataIndex: 'HZSJ',
header: '运抵时间',
width: 100
}, {
sortable: true,
dataIndex: 'HGFX',
header: '海关放行',
width: 100
}, {
sortable: true,
dataIndex: 'ZCCY',
header: '装船出运',
width: 100
}, {
sortable: true,
dataIndex: 'ZZXC',
header: '中转港卸船',
width: 100
}, {
sortable: true,
dataIndex: 'ZZZC',
header: '中转港装船',
width: 100
}, {
sortable: true,
dataIndex: 'DGSJ',
header: '到港',
width: 100
}, {
sortable: true,
dataIndex: 'THSJ',
header: '目的港提箱',
width: 100
}, {
sortable: true,
dataIndex: 'FKSJ',
header: '目的港返空',
width: 100
}, {
sortable: true,
dataIndex: 'TRUCKNO',
header: '车号',
width: 80
}
];
this.gridListDr = new Ext.grid.GridPanel({
store: this.storeListDr,
enableHdMenu: false,
region: 'center',
loadMask: { msg: "数据加载中,请稍等..." },
trackMouseOver: true,
disableSelection: false,
columns: this.initgirdcolumsdr
});
this.gridListDr.addListener('sortchange', function (ct, column, direction, eOpts) {
this.bslistdrsortfield = column.dataIndex;
this.bslistdrsortdire = direction;
}, this);
_this = this;
this.panelBtn = new Ext.Panel({
region: "north",
tbar: [
{
text: "关闭",
handler: function (button, event) {
window.close();
},
scope: this
}
]
});
this.panelTop = new Ext.Panel({
layout: "border",
region: "north",
height: 29,
items: [this.panelBtn]
});
this.panelBodyChFee = new Ext.Panel({
layout: "border",
region: 'center',
margin: '0 0',
frame: true,
items: [this.gridListDr]
});
_this = this;
Ext.apply(this, {
items: [this.panelTop, this.panelBodyChFee]
});
this.storeListDr.on('beforeload', function (store) {
Ext.apply(store.proxy.extraParams, { mblno: _this.mblno, bsno: _this.bsno });
}, this);
this.onRefreshClick();
}, //end initUIComponents
onRefreshClick: function (button, event) {
this.storeListDr.load({
params: { start: 0, limit: this.PageSize, mblno: _this.mblno, bsno: _this.bsno },
waitMsg: "正在查询数据...",
scope: this
});
}
});