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.

351 lines
12 KiB
JavaScript

Ext.namespace('Shipping');
Shipping.MsOpPriceHistoryView= function (config) {
Ext.applyIf(this, config);
this.initUIComponents();
window.Shipping.MsOpPriceHistoryView.superclass.constructor.call(this);
};
Ext.extend(Shipping.MsOpPriceHistoryView, Ext.Panel, {
ParentWin: null,
OpStatus: 'add',
StoreList: null,
editRecord: null,
region: 'north',
bsno: '',
feetype: 0,
oplb: '',
AccDate: null,
IsAccDate: '',
initUIComponents: function () {
//枚举参照相关
//编辑form
this.storeBodyList = Ext.create('Ext.data.Store', {
model: 'MsOpPriceItems',
remoteSort: false,
proxy: {
type: 'ajax',
url: '/MvcContainer/MsOpPrice/GetPriceItemsList',
reader: {
id: 'GId',
root: 'data',
totalProperty: 'totalCount'
}
}
});
this.bsno = getUrlParam('bsno');
//按钮Toolbar
this.GridCheckBoxModel = Ext.create('Ext.selection.CheckboxModel');
_this = this;
this.gridListBody = new Ext.grid.GridPanel({
store: this.storeBodyList,
enableHdMenu: false,
region: 'center',
loadMask: { msg: "数据加载中,请稍等..." },
trackMouseOver: true,
disableSelection: false,
selModel: this.GridCheckBoxModel,
selType: 'cellmodel',
//viewConfig: {
// autoFill: true,
// getRowClass: function (record, rowIndex, rowParams, store) {
// var feeStatus = record.get('FEESTATUS');
// return Shipping.FeeGetRowClass(feeStatus);
// }
//},
columns: [{
sortable: true,
dataIndex: 'GID',
header: '编号',
hidden: true,
width: 0
}, {
sortable: true,
dataIndex: 'LINKGID',
header: '业务编号',
hidden: true,
width: 0
}, {
sortable: true,
dataIndex: 'ITEMSNO',
header: '序号',
align: 'right',
width: 60
}, {
sortable: true,
dataIndex: 'CUSTOMERNAME',
header: '付款方',
width: 110
}, {
sortable: true,
dataIndex: 'FEENAME',
header: '费用名称',
width: 140
}, {
sortable: true,
dataIndex: 'UNIT',
header: '标准',
width: 100
}, {
sortable: true,
dataIndex: 'CURRENCY',
header: '币别',
width: 100
}, {
sortable: true,
dataIndex: 'UNITPRICE',
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; },
align: 'right',
width: 110
}, {
sortable: true,
dataIndex: 'REMARKS',
header: '备注',
width: 250
}, {
sortable: true,
dataIndex: 'PRICECLASS',
header: '类别归属',
width: 100
}, {
sortable: true,
dataIndex: 'ISSTOP',
header: '是否停用', //'是否海运',
width: 60,
renderer: function (value, cellmeta) {
if (value == '1' || value == true || value == 'true') {
return "是";
} else {
return "否";
}
}
}, {
sortable: true,
dataIndex: 'FEESTATUS_REF',
header: '费用状态',
width: 60
}, {
sortable: true,
dataIndex: 'INPUTBYREF',
header: '录入人',
width: 60
}, {
sortable: true,
dataIndex: 'INPUTTIME',
header: '录入日期',
width: 80
}, {
sortable: true,
dataIndex: 'AUDITNAME',
header: '审核人',
width: 60
}, {
sortable: true,
dataIndex: 'AUDITDATE',
header: '审核日期',
width: 80
}
]
});
this.panelTop = new Ext.Panel({
layout: "border",
region: "north",
height: 180,
id: "BillHead",
items: [this.gridListBody]
});
this.storeBodyModifyList = Ext.create('Ext.data.Store', {
model: 'MsOpPriceItems',
remoteSort: false,
proxy: {
type: 'ajax',
url: '/MvcContainer/MsOpPrice/GetModifyData',
reader: {
id: 'GId',
root: 'data',
totalProperty: 'totalCount'
}
}
});
this.gridListModify = new Ext.grid.GridPanel({
store: this.storeBodyModifyList,
enableHdMenu: false,
region: 'center',
loadMask: { msg: "数据加载中,请稍等..." },
trackMouseOver: true,
viewConfig: {
enableTextSelection: true, //允许复制数据
autoFill: true
},
disableSelection: false,
columns: [{
sortable: true,
dataIndex: 'GID',
header: '编号',
hidden: true,
width: 0
}, {
sortable: true,
dataIndex: 'LINKGID',
header: '业务编号',
hidden: true,
width: 0
}, {
sortable: true,
dataIndex: 'ITEMSNO',
header: '序号',
align: 'right',
width: 60
}, {
sortable: true,
dataIndex: 'CUSTOMERNAME',
header: '付款方',
width: 110
}, {
sortable: true,
dataIndex: 'FEENAME',
header: '费用名称',
width: 140
}, {
sortable: true,
dataIndex: 'UNIT',
header: '标准',
width: 100
}, {
sortable: true,
dataIndex: 'CURRENCY',
header: '币别',
width: 100
}, {
sortable: true,
dataIndex: 'UNITPRICE',
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; },
align: 'right',
width: 110
}, {
sortable: true,
dataIndex: 'REMARKS',
header: '备注',
width: 250
}, {
sortable: true,
dataIndex: 'PRICECLASS',
header: '类别归属',
width: 100
}, {
sortable: true,
dataIndex: 'ISSTOP',
header: '是否停用', //'是否海运',
width: 60,
renderer: function (value, cellmeta) {
if (value == '1' || value == true || value == 'true') {
return "是";
} else {
return "否";
}
}
}, {
sortable: true,
dataIndex: 'FEESTATUS_REF',
header: '费用状态',
width: 60
}, {
sortable: true,
dataIndex: 'INPUTBYREF',
header: '录入人',
width: 60
}, {
sortable: true,
dataIndex: 'INPUTTIME',
header: '录入日期',
width: 80
}, {
sortable: true,
dataIndex: 'AUDITNAME',
header: '审核人',
width: 60
}, {
sortable: true,
dataIndex: 'AUDITDATE',
header: '审核日期',
width: 80
}, {
sortable: true,
dataIndex: 'APPLYUSERREF',
header: '申请人',
width: 60
}, {
sortable: true,
dataIndex: 'APPLYTIME',
header: '申请时间',
width: 80
}
]
});
this.panelModify= new Ext.Panel({
layout: "border",
region: "center",
items: [this.gridListModify]
});
this.panelpage2 = new Ext.Panel({
title: '历史修改记录',
layout: "border",
region: 'center',
animate: true,
autoScroll: true,
containerScroll: true,
frame: false,
items: [this.panelModify]
});
this.gridListBody.getSelectionModel().on('select', function (model, record, index) {
var GId = record.data.GID;
this.storeBodyModifyList.load({ params: { FeeID: GId, ApplyType: "1"} });
}, this);
this.tabpanel = new Ext.TabPanel
({
activeTab: 0,
autoWidth: true,
border: false,
frame: false,
region: 'center',
id: "TabPanelID",
enableTabScroll: true,
items:
[
this.panelpage1,
this.panelpage2
]
});
Ext.apply(this, {
items: [this.panelTop, this.tabpanel]
});
var acondition = " LINKGID='" + this.bsno+"'";
this.storeBodyList.load({ params: { condition: acondition } });
}
});