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.
1685 lines
64 KiB
JavaScript
1685 lines
64 KiB
JavaScript
//欠费统计
|
|
Ext.namespace('Shipping');
|
|
|
|
Shipping.MsRptNoTotalCrIndex = function (config) {
|
|
Ext.applyIf(this, config);
|
|
this.initUIComponents();
|
|
window.Shipping.MsRptNoTotalCrIndex.superclass.constructor.call(this);
|
|
};
|
|
|
|
Ext.extend(Shipping.MsRptNoTotalCrIndex, 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.formname = 'MsRptNoTotalCrIndex';
|
|
this.sqlcontext = '1=2';
|
|
_this = this;
|
|
|
|
|
|
this.storeListCr = Ext.create('Ext.data.Store', {
|
|
pageSize: this.PageSize,
|
|
fields: [
|
|
{ name: 'BSNO', type: 'string' },
|
|
{ name: 'OPLB', type: 'string' },
|
|
{ name: 'OPLBNAME', type: 'string' },
|
|
{ name: 'BSTYPE', type: 'string' },
|
|
{ name: 'CUSTOMERNAME', type: 'string' },
|
|
{ name: 'CUSTNO', type: 'string' },
|
|
{ name: 'MBLNO', type: 'string' },
|
|
{ name: 'HBLNO', type: 'string' },
|
|
{ name: 'ETD', type: 'string' },
|
|
{ name: 'ACTUALDAY', type: 'number' },
|
|
{ name: 'NODAY', type: 'number' },
|
|
{ name: 'VESSEL', type: 'string' },
|
|
{ name: 'VOYNO', type: 'string' },
|
|
{ name: 'INPUTBY', type: 'string' },
|
|
{ name: 'CREATETIME', type: 'string' },
|
|
{ name: 'BSSTATUS', type: 'string' },
|
|
{ name: 'FEESTATUSREF', type: 'string' },
|
|
{ name: 'SALE', type: 'string' },
|
|
{ name: 'OP', type: 'string' },
|
|
{ name: 'DOC', type: 'string' },
|
|
{ name: 'CUSTSERVICE', type: 'string' },
|
|
{ name: 'PORTLOAD', type: 'string' },
|
|
{ name: 'PORTDISCHARGE', type: 'string' },
|
|
{ name: 'CUSTOMNO', type: 'string' },
|
|
{ name: 'ACCDATE', type: 'string' },
|
|
{ name: 'CARRIER', type: 'string' },
|
|
{ name: 'BSSOURCE', type: 'string' },
|
|
{ name: 'LANE', 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: 'NETWEIGHT', type: 'number' },
|
|
{ name: 'KGS', type: 'number' },
|
|
{ name: 'TEU', type: 'number' },
|
|
{ name: 'CUSTNAME', type: 'string' },
|
|
{ name: 'CUSTFULLNAME', type: 'string' },
|
|
{ name: 'RMBDR', type: 'number' },
|
|
{ name: 'RMBCR', type: 'number' },
|
|
{ name: 'STLRMBDR', type: 'number' },
|
|
{ name: 'STLRMBCR', type: 'number' },
|
|
{ name: 'BALRMBDR', type: 'number' },
|
|
{ name: 'BALRMBCR', type: 'number' },
|
|
{ name: 'USDDR', type: 'number' },
|
|
{ name: 'USDCR', type: 'number' },
|
|
{ name: 'STLUSDDR', type: 'number' },
|
|
{ name: 'STLUSDCR', type: 'number' },
|
|
{ name: 'BALUSDDR', type: 'number' },
|
|
{ name: 'BALUSDCR', type: 'number' },
|
|
{ name: 'OTDR', type: 'number' },
|
|
{ name: 'OTCR', type: 'number' },
|
|
{ name: 'STLOTDR', type: 'number' },
|
|
{ name: 'STLOTCR', type: 'number' },
|
|
{ name: 'BALOTDR', type: 'number' },
|
|
{ name: 'BALOTCR', type: 'number' },
|
|
{ name: 'INVUSD', type: 'number' },
|
|
{ name: 'INVRMB', type: 'number' },
|
|
{ name: 'TTLDR', type: 'number' },
|
|
{ name: 'TTLCR', type: 'number' },
|
|
{ name: 'STLTTLDR', type: 'number' },
|
|
{ name: 'STLTTLCR', type: 'number' },
|
|
{ name: 'BALTTLDR', type: 'number' },
|
|
{ name: 'BALTTLCR', type: 'number' }
|
|
|
|
],
|
|
remoteSort: true,
|
|
proxy: {
|
|
type: 'ajax',
|
|
url: '/MvcShipping/MsRptNoTotal/BsListData',
|
|
reader: {
|
|
id: '',
|
|
root: 'data',
|
|
totalProperty: 'totalCount'
|
|
}
|
|
}
|
|
});
|
|
|
|
this.Pagenum = Ext.create('Ext.form.field.Number', {
|
|
name: 'bottles',
|
|
fieldLabel: '每页记录数',
|
|
labelAlign: 'right',
|
|
value: this.PageSize,
|
|
maxValue: 100000,
|
|
width: 170,
|
|
minValue: 0
|
|
})
|
|
|
|
//定义Grid
|
|
|
|
this.initgirdcolumscr = [{
|
|
sortable: true,
|
|
dataIndex: 'BSNO',
|
|
header: '编号',
|
|
hidden: true,
|
|
width: 130
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'CUSTNAME',
|
|
header: '结算客户',
|
|
width: 80
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'CUSTFULLNAME',
|
|
header: '结算客户全称',
|
|
width: 120
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'OPLBNAME',
|
|
header: '业务类型',
|
|
width: 70
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'BSTYPE',
|
|
header: '运输类型',
|
|
width: 70
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'FEESTATUSREF',
|
|
header: '费用锁定',
|
|
width: 70
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'OPDATE',
|
|
header: '业务日期',
|
|
width: 86
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'CUSTOMDATE',
|
|
header: '报关日期',
|
|
width: 86
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'ACTUALDAY',
|
|
header: '实际天数',
|
|
width: 60
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'NODAY',
|
|
header: '超期天数',
|
|
width: 86
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'CUSTOMERNAME',
|
|
header: '委托单位',
|
|
width: 120
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'CUSTNO',
|
|
header: '委托编号',
|
|
width: 136
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'ENTERP',
|
|
header: '经营单位',
|
|
width: 100
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'MBLNO',
|
|
header: '主提单号',
|
|
width: 120
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'HBLNO',
|
|
header: '分提单号',
|
|
width: 120
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'ETD',
|
|
header: '开船日期',
|
|
width: 86
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'VESSEL',
|
|
header: '船名',
|
|
width: 200
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'VOYNO',
|
|
header: '航次',
|
|
width: 50
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'SALE',
|
|
header: '业务员',
|
|
width: 80
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'OP',
|
|
header: '操作',
|
|
width: 80
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'PORTLOAD',
|
|
header: '起运港',
|
|
width: 80
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'PORTDISCHARGE',
|
|
header: '目的港',
|
|
width: 150
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'ACCDATE',
|
|
header: '会计期间',
|
|
width: 80
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'CARRIER',
|
|
header: '船公司',
|
|
width: 80
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'BSSOURCE',
|
|
header: '业务来源',
|
|
width: 120
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'LANE',
|
|
header: '航线',
|
|
width: 150
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'TEU',
|
|
header: 'TEU',
|
|
width: 80
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'KGS',
|
|
header: 'KGS',
|
|
width: 80
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'GOODSNAME',
|
|
header: '品名',
|
|
width: 80
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'RMBCR',
|
|
header: '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: 'STLRMBCR',
|
|
header: '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: 'BALRMBCR',
|
|
header: '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: 'USDCR',
|
|
header: '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: 'STLUSDCR',
|
|
header: '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: 'BALUSDCR',
|
|
header: '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: 'OTCR',
|
|
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: 80
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'STLOTCR',
|
|
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: 80
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'BALOTCR',
|
|
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: 80
|
|
}, {
|
|
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;
|
|
},
|
|
align: 'right',
|
|
width: 80
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'STLTTLCR',
|
|
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: 80
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'BALTTLCR',
|
|
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: 80
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'INVRMB',
|
|
header: '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: 'INVUSD',
|
|
header: '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
|
|
}
|
|
|
|
];
|
|
|
|
this.girdcolumscr = DsTruck.GetGridPanel(USERID, this.formname + 'cr', this.initgirdcolumscr, 1);
|
|
|
|
|
|
this.gridListCr = new Ext.grid.GridPanel({
|
|
store: this.storeListCr,
|
|
enableHdMenu: false,
|
|
region: 'center',
|
|
loadMask: { msg: "数据加载中,请稍等..." },
|
|
trackMouseOver: true,
|
|
disableSelection: false,
|
|
columns: this.girdcolumscr,
|
|
// paging bar on the bottom
|
|
bbar: [Ext.create('Ext.PagingToolbar', {
|
|
store: this.storeListCr,
|
|
displayInfo: true,
|
|
displayMsg: '当前显示 {0} - {1}条记录 /共 {2}条记录',
|
|
emptyMsg: "没有数据"
|
|
}), this.Pagenum]
|
|
});
|
|
|
|
|
|
|
|
this.gridListCr.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/MsOpBill/MsOpFeeView?handle=check&bsno=" + record.data.BSNO;
|
|
|
|
window.open(openUrl, openType, openSet);
|
|
// DsOpenEditWin("/TruckMng/MsWlPc/Edit");
|
|
}, this);
|
|
|
|
this.gridListCr.addListener('sortchange', function (ct, column, direction, eOpts) {
|
|
this.bslistcrsortfield = column.dataIndex;
|
|
this.bslistcrsortdire = direction;
|
|
}, this);
|
|
|
|
this.storeFeeListCr = Ext.create('Ext.data.Store', {
|
|
pageSize: this.PageSize,
|
|
fields: [
|
|
{ name: 'BSNO', type: 'string' },
|
|
{ name: 'OPLB', type: 'string' },
|
|
{ name: 'OPLBNAME', type: 'string' },
|
|
{ name: 'BSTYPE', type: 'string' },
|
|
{ name: 'CUSTOMERNAME', type: 'string' },
|
|
{ name: 'CUSTNO', type: 'string' },
|
|
{ name: 'MBLNO', type: 'string' },
|
|
{ name: 'HBLNO', type: 'string' },
|
|
{ name: 'ETD', type: 'string' },
|
|
{ name: 'ACTUALDAY', type: 'number' },
|
|
{ name: 'NODAY', type: 'number' },
|
|
{ name: 'VESSEL', type: 'string' },
|
|
{ name: 'VOYNO', type: 'string' },
|
|
{ name: 'INPUTBY', type: 'string' },
|
|
{ name: 'CREATETIME', type: 'string' },
|
|
{ name: 'BSSTATUS', type: 'string' },
|
|
{ name: 'FEESTATUSREF', type: 'string' },
|
|
{ name: 'SALE', type: 'string' },
|
|
{ name: 'OP', type: 'string' },
|
|
{ name: 'DOC', type: 'string' },
|
|
{ name: 'CUSTSERVICE', type: 'string' },
|
|
{ name: 'PORTLOAD', type: 'string' },
|
|
{ name: 'PORTDISCHARGE', type: 'string' },
|
|
{ name: 'CUSTOMNO', type: 'string' },
|
|
{ name: 'ACCDATE', type: 'string' },
|
|
{ name: 'CARRIER', type: 'string' },
|
|
{ name: 'BSSOURCE', type: 'string' },
|
|
{ name: 'LANE', 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: 'NETWEIGHT', type: 'number' },
|
|
{ name: 'KGS', type: 'number' },
|
|
{ name: 'TEU', type: 'number' },
|
|
{ name: 'CUSTNAME', type: 'string' },
|
|
{ name: 'CUSTFULLNAME', type: 'string' },
|
|
{ name: 'FeeType_Ref', type: 'string' },
|
|
{ name: 'FEENAME', type: 'string' },
|
|
{ name: 'UNIT', type: 'string' },
|
|
{ name: 'CURRENCY', type: 'string' },
|
|
{ name: 'REMARK', type: 'string' },
|
|
{ name: 'UNITPRICE', type: 'number' },
|
|
{ name: 'QUANTITY', type: 'number' },
|
|
{ name: 'AMOUNT', type: 'number' },
|
|
{ name: 'EXCHANGERATE', type: 'number' },
|
|
{ name: 'TAXRATE', type: 'number' },
|
|
{ name: 'NOTAXAMOUNT', type: 'number' },
|
|
{ name: 'ACCTAXRATE', type: 'number' },
|
|
{ name: 'SETTLEMENT', type: 'number' },
|
|
{ name: 'INVOICE', type: 'number' }
|
|
|
|
],
|
|
remoteSort: true,
|
|
proxy: {
|
|
type: 'ajax',
|
|
url: '/MvcShipping/MsRptNoTotal/FeeListData',
|
|
reader: {
|
|
id: '',
|
|
root: 'data',
|
|
totalProperty: 'totalCount'
|
|
}
|
|
}
|
|
});
|
|
|
|
//定义Grid
|
|
|
|
this.initgirdcolumsfeecr = [{
|
|
sortable: true,
|
|
dataIndex: 'BSNO',
|
|
header: '编号',
|
|
hidden: true,
|
|
width: 130
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'CUSTNAME',
|
|
header: '结算客户',
|
|
width: 60
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'CUSTFULLNAME',
|
|
header: '结算客户全称',
|
|
width: 120
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'OPLBNAME',
|
|
header: '业务类型',
|
|
width: 70
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'BSTYPE',
|
|
header: '运输类型',
|
|
width: 70
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'OPDATE',
|
|
header: '业务日期',
|
|
width: 86
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'CUSTOMDATE',
|
|
header: '报关日期',
|
|
width: 86
|
|
},
|
|
{
|
|
sortable: true,
|
|
dataIndex: 'CUSTOMERNAME',
|
|
header: '委托单位',
|
|
width: 120
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'CUSTNO',
|
|
header: '委托编号',
|
|
width: 136
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'ENTERP',
|
|
header: '经营单位',
|
|
width: 100
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'MBLNO',
|
|
header: '主提单号',
|
|
width: 120
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'HBLNO',
|
|
header: '分提单号',
|
|
width: 120
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'ETD',
|
|
header: '开船日期',
|
|
width: 86
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'VESSEL',
|
|
header: '船名',
|
|
width: 200
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'VOYNO',
|
|
header: '航次',
|
|
width: 50
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'SALE',
|
|
header: '业务员',
|
|
width: 80
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'OP',
|
|
header: '操作',
|
|
width: 80
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'PORTLOAD',
|
|
header: '起运港',
|
|
width: 80
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'PORTDISCHARGE',
|
|
header: '目的港',
|
|
width: 150
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'ACCDATE',
|
|
header: '会计期间',
|
|
width: 80
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'CARRIER',
|
|
header: '船公司',
|
|
width: 80
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'BSSOURCE',
|
|
header: '业务来源',
|
|
width: 120
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'TEU',
|
|
header: 'TEU',
|
|
width: 80
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'KGS',
|
|
header: 'KGS',
|
|
width: 80
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'GOODSNAME',
|
|
header: '品名',
|
|
width: 80
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'FeeType_Ref',
|
|
header: '收付类型',
|
|
width: 60
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'FEENAME',
|
|
header: '费用名称',
|
|
width: 60
|
|
}, {
|
|
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: 80
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'QUANTITY',
|
|
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: 80
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'UNIT',
|
|
header: '单位',
|
|
width: 60
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'CURRENCY',
|
|
header: '币别',
|
|
width: 60
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'EXCHANGERATE',
|
|
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: 80
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'TAXRATE',
|
|
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: 80
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'NOTAXAMOUNT',
|
|
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: 80
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'AMOUNT',
|
|
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: 80
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'ACCTAXRATE',
|
|
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: 80
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'SETTLEMENT',
|
|
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: 80
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'INVOICE',
|
|
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: 80
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'REMARK',
|
|
header: '备注',
|
|
width: 60
|
|
}
|
|
|
|
];
|
|
|
|
this.girdcolumsfeecr = DsTruck.GetGridPanel(USERID, this.formname + 'feecr', this.initgirdcolumsfeecr, 1);
|
|
|
|
this.gridFeeListCr = new Ext.grid.GridPanel({
|
|
store: this.storeFeeListCr,
|
|
enableHdMenu: false,
|
|
region: 'center',
|
|
loadMask: { msg: "数据加载中,请稍等..." },
|
|
trackMouseOver: true,
|
|
disableSelection: false,
|
|
columns: this.girdcolumsfeecr,
|
|
// paging bar on the bottom
|
|
bbar: Ext.create('Ext.PagingToolbar', {
|
|
store: this.storeFeeListCr,
|
|
displayInfo: true,
|
|
displayMsg: '当前显示 {0} - {1}条记录 /共 {2}条记录',
|
|
emptyMsg: "没有数据"
|
|
})
|
|
});
|
|
|
|
this.gridFeeListCr.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/MsOpBill/MsOpFeeView?handle=check&bsno=" + record.data.BSNO;
|
|
|
|
window.open(openUrl, openType, openSet);
|
|
}, this);
|
|
|
|
this.gridFeeListCr.addListener('sortchange', function (ct, column, direction, eOpts) {
|
|
this.feelistcrsortfield = column.dataIndex;
|
|
this.feelistcrsortdire = direction;
|
|
}, this);
|
|
|
|
|
|
|
|
this.storeSumList = Ext.create('Ext.data.Store', {
|
|
pageSize: this.PageSize,
|
|
fields: [
|
|
{ name: 'RMBDR', type: 'number' },
|
|
{ name: 'RMBCR', type: 'number' },
|
|
{ name: 'STLRMBDR', type: 'number' },
|
|
{ name: 'STLRMBCR', type: 'number' },
|
|
{ name: 'BALRMBDR', type: 'number' },
|
|
{ name: 'BALRMBCR', type: 'number' },
|
|
{ name: 'USDDR', type: 'number' },
|
|
{ name: 'USDCR', type: 'number' },
|
|
{ name: 'STLUSDDR', type: 'number' },
|
|
{ name: 'STLUSDCR', type: 'number' },
|
|
{ name: 'BALUSDDR', type: 'number' },
|
|
{ name: 'BALUSDCR', type: 'number' },
|
|
{ name: 'OTDR', type: 'number' },
|
|
{ name: 'OTCR', type: 'number' },
|
|
{ name: 'STLOTDR', type: 'number' },
|
|
{ name: 'STLOTCR', type: 'number' },
|
|
{ name: 'BALOTDR', type: 'number' },
|
|
{ name: 'BALOTCR', type: 'number' },
|
|
{ name: 'TTLDR', type: 'number' },
|
|
{ name: 'TTLCR', type: 'number' },
|
|
{ name: 'STLTTLDR', type: 'number' },
|
|
{ name: 'STLTTLCR', type: 'number' },
|
|
{ name: 'BALTTLDR', type: 'number' },
|
|
{ name: 'BALTTLCR', type: 'number' }
|
|
|
|
],
|
|
remoteSort: true,
|
|
proxy: {
|
|
type: 'ajax',
|
|
url: '/MvcShipping/MsRptNoTotal/SumListData',
|
|
reader: {
|
|
id: '',
|
|
root: 'data',
|
|
totalProperty: 'totalCount'
|
|
}
|
|
}
|
|
});
|
|
|
|
//定义Grid
|
|
|
|
this.initgirdcolumssum = [{
|
|
sortable: true,
|
|
dataIndex: 'RMBDR',
|
|
header: '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: 'STLRMBDR',
|
|
header: '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: 'BALRMBDR',
|
|
header: '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',
|
|
header: '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: 'STLUSDDR',
|
|
header: '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: 'BALUSDDR',
|
|
header: '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',
|
|
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: 80
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'STLOTDR',
|
|
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: 80
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'BALOTDR',
|
|
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: 80
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'TTLDR',
|
|
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: 80
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'STLTTLDR',
|
|
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: 80
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'BALTTLDR',
|
|
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: 80
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'RMBCR',
|
|
header: '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: 'STLRMBCR',
|
|
header: '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: 'BALRMBCR',
|
|
header: '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: 'USDCR',
|
|
header: '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: 'STLUSDCR',
|
|
header: '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: 'BALUSDCR',
|
|
header: '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: 'OTCR',
|
|
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: 80
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'STLOTCR',
|
|
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: 80
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'BALOTCR',
|
|
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: 80
|
|
}, {
|
|
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; },
|
|
align: 'right',
|
|
width: 80
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'STLTTLCR',
|
|
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: 80
|
|
}, {
|
|
sortable: true,
|
|
dataIndex: 'BALTTLCR',
|
|
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: 80
|
|
}
|
|
|
|
];
|
|
this.girdcolumssum = DsTruck.GetGridPanel(USERID, this.formname + 'sum', this.initgirdcolumssum, 1);
|
|
|
|
this.gridListSum = new Ext.grid.GridPanel({
|
|
store: this.storeSumList,
|
|
enableHdMenu: false,
|
|
region: 'center',
|
|
loadMask: { msg: "数据加载中,请稍等..." },
|
|
trackMouseOver: true,
|
|
disableSelection: false,
|
|
columns: this.girdcolumssum
|
|
});
|
|
|
|
|
|
|
|
|
|
//查询工具条
|
|
|
|
|
|
|
|
|
|
_this = this;
|
|
|
|
|
|
this.panelBtn = new Ext.Panel({
|
|
region: "north",
|
|
tbar: [
|
|
{
|
|
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
|
|
}, '-', {
|
|
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.panelBodyChFeeCr = new Ext.Panel({
|
|
title: '应付单票',
|
|
layout: "border",
|
|
region: 'center',
|
|
margin: '0 0',
|
|
frame: true,
|
|
items: [this.gridListCr]
|
|
});
|
|
|
|
|
|
this.panelSum = new Ext.Panel({
|
|
title: '合 计',
|
|
layout: "border",
|
|
height: 120,
|
|
region: 'south',
|
|
margin: '0 0',
|
|
frame: true,
|
|
items: [this.gridListSum]
|
|
});
|
|
|
|
|
|
this.panelFeeListCr = new Ext.Panel({
|
|
title: '应付费用明细',
|
|
layout: "border",
|
|
region: 'center',
|
|
margin: '0 0',
|
|
frame: true,
|
|
items: [this.gridFeeListCr]
|
|
});
|
|
|
|
|
|
this.tabpanel = new Ext.TabPanel
|
|
({
|
|
activeTab: 0,
|
|
autoWidth: true,
|
|
border: false,
|
|
frame: false,
|
|
region: 'center',
|
|
id: "TabPanelID",
|
|
enableTabScroll: true,
|
|
items:
|
|
[
|
|
this.panelBodyChFeeCr,
|
|
this.panelFeeListCr
|
|
]
|
|
});
|
|
|
|
Ext.apply(this, {
|
|
items: [this.panelTop, this.tabpanel, this.panelSum]
|
|
});
|
|
|
|
|
|
this.storeListCr.on('beforeload', function (store) {
|
|
|
|
|
|
var sql = this.sqlcontext;
|
|
|
|
Ext.apply(store.proxy.extraParams, { condition: sql });
|
|
}, this);
|
|
|
|
|
|
|
|
this.storeFeeListCr.on('beforeload', function (store) {
|
|
var sql = this.sqlcontext;
|
|
|
|
Ext.apply(store.proxy.extraParams, { condition: sql });
|
|
}, this);
|
|
|
|
|
|
this.storeSumList.on('beforeload', function (store) {
|
|
var sql = this.sqlcontext;
|
|
Ext.apply(store.proxy.extraParams, { condition: sql });
|
|
}, this);
|
|
|
|
this.ParentWin = window.parent.opener._this;
|
|
if (this.ParentWin) {
|
|
this.sqlcontext = this.ParentWin.sqlcontext + ' AND ' + this.ParentWin.sqlselect;
|
|
}
|
|
|
|
this.onRefreshClick();
|
|
|
|
}, //end initUIComponents
|
|
|
|
onRefreshClick: function (button, event) {
|
|
|
|
|
|
var sql = this.sqlcontext;
|
|
|
|
|
|
this.PageSize = this.Pagenum.getValue();
|
|
|
|
|
|
|
|
this.storeListCr.load({
|
|
params: { start: 0, limit: this.PageSize, condition: sql },
|
|
waitMsg: "正在查询数据...",
|
|
scope: this
|
|
});
|
|
|
|
this.storeFeeListCr.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
|
|
});
|
|
},
|
|
|
|
onDsQuery: function (button, event) {
|
|
|
|
this.PageSize = this.Pagenum.getValue();
|
|
|
|
var sql = this.sqlcontext;
|
|
var Drsql = sql + getAndConSql(sql, '1=1', " F.FEETYPE=1");
|
|
var Crsql = sql + getAndConSql(sql, '1=1', " F.FEETYPE=2");
|
|
|
|
this.storeListCr.load({
|
|
params: { start: 0, limit: this.PageSize, condition: Crsql },
|
|
waitMsg: "正在查询数据...",
|
|
scope: this
|
|
});
|
|
|
|
this.storeFeeListCr.load({
|
|
params: { start: 0, limit: this.PageSize, condition: Crsql },
|
|
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();
|
|
},
|
|
|
|
|
|
|
|
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] = "MsRptNoTotalIndex";
|
|
|
|
return ret;
|
|
},
|
|
|
|
|
|
onSaveGridClick: function (button, event) {
|
|
|
|
|
|
|
|
if (this.tabpanel.getActiveTab() == this.panelBodyChFeeCr) {
|
|
this.girdcolumscr = DsTruck.SaveGridPanel(USERID, this.formname + 'cr', this.gridListCr.columns, this.girdcolumscr, 1, true);
|
|
} else if (this.tabpanel.getActiveTab() == this.panelFeeListCr) {
|
|
this.girdcolumsfeecr = DsTruck.SaveGridPanel(USERID, this.formname + 'feecr', this.gridFeeListCr.columns, this.girdcolumsfeecr, 1, true);
|
|
}
|
|
this.girdcolumssum = DsTruck.SaveGridPanel(USERID, this.formname + 'sum', this.gridListSum.columns, this.girdcolumssum, 1, true);
|
|
|
|
|
|
},
|
|
oninitGridClick: function (button, event) {
|
|
|
|
if (this.tabpanel.getActiveTab() == this.panelBodyChFeeCr) {
|
|
this.gridListCr.reconfigure(this.storeListCr, this.initgirdcolumscr);
|
|
this.girdcolumscr = DsTruck.SaveGridPanel(USERID, this.formname + 'cr', this.gridListCr.columns, this.initgirdcolumscr, 1, true);
|
|
} else if (this.tabpanel.getActiveTab() == this.panelFeeListDr) {
|
|
this.gridFeeListDr.reconfigure(this.storeFeeListDr, this.initgirdcolumsfeedr);
|
|
this.girdcolumsfeedr = DsTruck.SaveGridPanel(USERID, this.formname + 'feedr', this.gridFeeListDr.columns, this.initgirdcolumsfeedr, 1, true);
|
|
}
|
|
this.gridListSum.reconfigure(this.storeSumList, this.initgirdcolumssum);
|
|
this.girdcolumssum = DsTruck.SaveGridPanel(USERID, this.formname + 'sum', this.gridListSum.columns, this.initgirdcolumssum, 1, true);
|
|
|
|
|
|
|
|
},
|
|
onExportClick: function (button, event) {
|
|
|
|
_this = this;
|
|
if (this.tabpanel.getActiveTab() == this.panelBodyChFeeCr) {
|
|
GridExportExcelPage(this.gridListCr);
|
|
} else if (this.tabpanel.getActiveTab() == this.panelFeeListCr) {
|
|
|
|
GridExportExcelPage(this.gridFeeListCr);
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
Print: function () {
|
|
|
|
var sql = this.sqlcontext;
|
|
|
|
_this = this;
|
|
if (this.tabpanel.getActiveTab() == this.panelBodyChFeeCr) {
|
|
|
|
if (this.storeListCr.getCount() == 0) {
|
|
return;
|
|
}
|
|
|
|
var sortstr = ' CUSTOMERNAME,OPDATE';
|
|
|
|
if (this.bslistcrsortfield != '' && this.bslistcrsortdire != '') {
|
|
|
|
sortstr = this.bslistcrsortfield + ' ' + this.bslistcrsortdire;
|
|
}
|
|
|
|
Ext.Msg.wait('正在组织数据, 请稍侯..');
|
|
Ext.Ajax.request({
|
|
waitMsg: '正在组织数据...',
|
|
url: '/MvcShipping/MsRptNoTotal/BsListData',
|
|
scope: this,
|
|
params: {
|
|
start: 0, limit: this.PageSize,
|
|
condition: sql,
|
|
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 = 'MSRPTNOTOTALLISTCR';
|
|
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.panelFeeListCr) {
|
|
|
|
if (this.storeFeeListCr.getCount() == 0) {
|
|
return;
|
|
}
|
|
var sortstr = ' CUSTOMERNAME,OPDATE';
|
|
|
|
if (this.feelistcrsortfield != '' && this.feelistcrsortdire != '') {
|
|
|
|
sortstr = this.feelistcrsortfield + ' ' + this.feelistcrsortdire;
|
|
}
|
|
|
|
|
|
Ext.Msg.wait('正在组织数据, 请稍侯..');
|
|
Ext.Ajax.request({
|
|
waitMsg: '正在组织数据...',
|
|
url: '/MvcShipping/MsRptNoTotal/FeeListData',
|
|
scope: this,
|
|
params: {
|
|
start: 0, limit: this.PageSize,
|
|
condition: sql,
|
|
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 = 'MSRPTNOTOTALFEELISTDR';
|
|
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
|
|
});
|
|
}
|
|
}
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|