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

158 lines
4.7 KiB
JavaScript

3 years ago
Ext.namespace('Shipping');
Shipping.MsOpHistryListIndex = function (config) {
Ext.applyIf(this, config);
this.initUIComponents();
window.Shipping.MsOpHistryListIndex.superclass.constructor.call(this);
};
Ext.extend(Shipping.MsOpHistryListIndex, Ext.Panel, {
PageSize: 100,
OprationStatus: null, //仅当弹出界面时使用
SelectedRecord: null,
isShowAdvancedQuery: 0, //是否显示高级查询面板
IsAudit: false,
BillType: 1,
initUIComponents: function () {
this.formname = "formMsOpHistryListIndex"; //页面名称
//定义数据集
this.bsno = getUrlParam('bsno');
this.storeList = Ext.create('Ext.data.Store', {
pageSize: this.PageSize,
fields: [
{ name: 'GID', type: 'string' },
{ name: 'BSNO', type: 'string' },
{ name: 'HSTYPE', type: 'string' },
{ name: 'INPUTTIME', type: 'string' },
{ name: 'INPUTBYREF', type: 'string' },
],
remoteSort: true,
proxy: {
type: 'ajax',
url: '/MvcShipping/MsOpBill/GetHistryListData',
reader: {
id: 'GID',
root: 'data',
totalProperty: 'totalCount'
}
}
});
//#region List列表显示信息
Ext.grid.RowNumberer = Ext.extend(Ext.grid.RowNumberer, {
width: 30
});
this.girdcolums = [{
sortable: true,
dataIndex: 'GID',
hidden: true,
header: 'GID',
width: 0
},{
sortable: true,
dataIndex: 'BSNO',
hidden: true,
header: '业务编号',
width: 0
},
{
sortable: true,
dataIndex: 'HSTYPE',
header: '类型',
width: 100
}, {
dataIndex: 'INPUTBYREF',
header: '备份人',
width: 120
}, {
dataIndex: 'INPUTTIME',
header: '备份时间',
width: 120
}];
this.CheckBoxModel = Ext.create('Ext.selection.CheckboxModel');
//定义Grid
this.gridList = new Ext.grid.GridPanel({
store: this.storeList,
enableHdMenu: false,
region: 'center',
loadMask: { msg: "数据加载中,请稍等..." },
trackMouseOver: true,
disableSelection: false,
selModel: this.CheckBoxModel,
listeners: {
cellclick: function (thisTab, record, item, index, e, eOpts) {
if (index == 10) {//设置按钮列
// alert('用户编号=' + this.getStore().getAt(rowIndex).data.usercode);
}
}
},
columns: this.girdcolums,
// paging bar on the bottom
bbar: Ext.create('Ext.PagingToolbar', {
store: this.storeList,
displayInfo: true,
displayMsg: '当前显示 {0} - {1}条记录 /共 {2}条记录',
emptyMsg: "没有数据"
})
});
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 = "";
openUrl = "../../MvcShipping/MsOpSeae/EditView?handle=check&bsno=" + record.data.BSNO + "&HSGID=" + record.data.GID;
window.open(openUrl, openType, openSet);
// DsOpenEditWin("/TruckMng/MsWlPc/Edit");
}, this);
//#endregion
_this = this;
//按钮工具条
Ext.apply(this, {
items: [this.gridList]
});
// this.onRefreshClick();
var sql = " BSNO='" + this.bsno + "'";
this.storeList.load({
params: { start: 0, limit:100, sort: '', condition: sql },
waitMsg: "正在查询数据...",
scope: this
});
this.storeList.on('beforeload', function (store) {
var sql =" BSNO='"+this.bsno+"'";
Ext.apply(store.proxy.extraParams, { condition: sql });
}, this);
}, //end initUIComponents
OprationSwap: function () {
var ret = new Array();
ret[0] = this.OprationStatus;
ret[1] = this.storeList;
ret[2] = this.SelectedRecord;
ret[3] = this.IsAudit;
return ret;
}
});