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/MsRptFeeSettleStatus/MsRptFeeSettleStatusIndex.js

3154 lines
128 KiB
JavaScript

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

//结算费用统计
Ext.namespace('Shipping');
Shipping.MsRptFeeSettleStatusIndex = function (config) {
Ext.applyIf(this, config);
this.initUIComponents();
window.Shipping.MsRptFeeSettleStatusIndex.superclass.constructor.call(this);
};
Ext.extend(Shipping.MsRptFeeSettleStatusIndex, 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.sqlcontext = '1=2';
this.formname = 'MsRptFeeSettleStatusIndex';
this.storeListDr = Ext.create('Ext.data.Store', {
pageSize: this.PageSize,
fields: [
{ name: 'BSNO', type: 'string' },
{ name: 'OPTYPE', type: 'string' },
{ name: 'OPLBNAME', type: 'string' },
{ name: 'BSTYPE', type: 'string' },
{ name: 'CUSTOMERNAME', type: 'string' },
{ name: 'CUSTNAME', type: 'string' },
{ name: 'CUSTNO', type: 'string' },
{ name: 'MBLNO', type: 'string' },
{ name: 'HBLNO', type: 'string' },
{ name: 'VESSEL', type: 'string' },
{ name: 'VOYNO', type: 'string' },
{ name: 'INPUTBY', type: 'string' },
{ name: 'CREATETIME', type: 'string' },
{ name: 'BSSTATUS', type: 'string' },
{ name: 'SALE', type: 'string' },
{ name: 'OP', type: 'string' },
{ name: 'DOC', type: 'string' },
{ name: 'ETD', type: 'string' },
{ name: 'OPDATE', type: 'string' },
{ name: 'ENTERP', type: 'string' },
{ name: 'CUSTOMDATE', type: 'string' },
{ name: 'STLDATE', 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: 'NETWEIGHT', type: 'string' },
{ name: 'KGS', type: 'string' },
{ name: 'TEU', type: 'string' },
{ name: 'CNTRTOTAL', type: 'string' },
{ name: 'CORPID', type: 'string' },
{ name: 'TRADETYPE', type: 'string' },
{ name: 'GOODSNAME', type: 'string' },
{ name: 'FEESTATUS', type: 'string' },
{ name: 'FEESTATUSREF', type: 'string' },
{ name: 'BILLNO', type: 'string' },
{ name: 'SETTLETIME', type: 'string' },
{ name: 'SETTLENO', type: 'string' },
{ name: 'SETTLEUSERREF', type: 'string' },
{ name: 'SETTLETYPEREF', type: 'string' },
{ name: 'ACCOUNTRMBREF', type: 'string' },
{ name: 'ACCOUNTUSDREF', type: 'string' },
{ name: 'RMBDR', type: 'number' },
{ name: 'RMBCR', type: 'number' },
{ name: 'USDDR', type: 'number' },
{ name: 'USDCR', type: 'number' },
{ name: 'OTDR', type: 'number' },
{ name: 'OTCR', type: 'number' }
],
remoteSort: true,
proxy: {
type: 'ajax',
url: '/MvcShipping/MsRptFeeSettleStatus/BsListData',
timeout: 120000,
reader: {
id: '',
root: 'data',
totalProperty: 'totalCount'
}
}
});
this.Pagenum = Ext.create('Ext.form.field.Number', {
name: 'bottles',
fieldLabel: Zi.LAN.bottles,//'每页记录数',
labelAlign: 'right',
value: this.PageSize,
maxValue: 100000,
width: 170,
minValue: 0,
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
})
//#region 单票业务统计
this.initgirdcolumsdr = [{
sortable: true, hidden: true,
dataIndex: 'BSNO',
header: Zi.LAN.BSNO,
//header: '业务编号',
width: 80
},
{
sortable: true,
dataIndex: 'OPTYPE',
header: Zi.LAN.OPTYPE,
//header: '更改单',
width: 80
},
{
sortable: true,
dataIndex: 'OPLBNAME',
header: Zi.LAN.OPLBNAME,
//header: '业务类型',
width: 80
},
{
sortable: true,
dataIndex: 'BSTYPE',
header: Zi.LAN.BSTYPE,
//header: '运输方式',
width: 80,
renderer:function(value,cellmeta){
switch (value){
case "仓储业务":
return Zi.LAN.仓储业务 ;
case "海运出口":
return Zi.LAN.海运出口 ;
case "海运进口":
return Zi.LAN.海运进口 ;
case "空运出口":
return Zi.LAN.空运出口 ;
case "空运进口":
return Zi.LAN.空运进口 ;
case "陆运派车单":
return Zi.LAN.陆运派车单 ;
default :
"" // 如果没有与表达式相同的值,则执行该代码
}
}
}, {
},
{
sortable: true,
dataIndex: 'CUSTOMERNAME',
header: Zi.LAN.CUSTOMERNAME,
//header: '委托单位',
width: 80
},
{
sortable: true,
dataIndex: 'CUSTNAME',
header: Zi.LAN.CUSTNAME,
//header: '结算客户',
width: 80
},
{
sortable: true,
dataIndex: 'CUSTNO',
header: Zi.LAN.CUSTNO,
//header: '委托编号',
width: 80
},
{
sortable: true,
dataIndex: 'MBLNO',
header: Zi.LAN.MBLNO,
//header: '主提单号',
width: 80
},
{
sortable: true,
dataIndex: 'HBLNO',
header: Zi.LAN.HBLNO,
//header: '分提单号',
width: 80
},
{
sortable: true,
dataIndex: 'VESSEL',
header: Zi.LAN.VESSEL,
//header: '船名',
width: 80
},
{
sortable: true,
dataIndex: 'VOYNO',
header: Zi.LAN.VOYNO,
//header: '航次',
width: 80
},
{
sortable: true,
dataIndex: 'BILLNO',
header: Zi.LAN.BILLNO,
//header: '结算单号',
width: 80
},
{
sortable: true,
dataIndex: 'SETTLETIME',
header: Zi.LAN.SETTLETIME,
//header: '结算日期',
width: 80
},
{
sortable: true,
dataIndex: 'STLDATE',
header: Zi.LAN.STLDATE,
//header: '应结日期',
width: 80
},
{
sortable: true,
dataIndex: 'SETTLENO',
header: Zi.LAN.SETTLENO,
//header: '相关号码',
width: 80
},
{
sortable: true,
dataIndex: 'SETTLEUSERREF',
header: Zi.LAN.SETTLEUSERREF,
//header: '结算人',
width: 80
},
{
sortable: true,
dataIndex: 'SETTLETYPEREF',
header: Zi.LAN.SETTLETYPEREF,
//header: '结算方式',
width: 80
},
{
sortable: true,
dataIndex: 'ACCOUNTRMBREF',
header: Zi.LAN.ACCOUNTRMBREF,
//header: 'RMB银行',
width: 100
},
{
sortable: true,
dataIndex: 'ACCOUNTUSDREF',
header: Zi.LAN.ACCOUNTUSDREF,
//header: 'USD银行',
width: 100
},
{
sortable: true,
dataIndex: 'INPUTBY',
header: Zi.LAN.INPUTBY,
//header: '录入人',
width: 80
},
{
sortable: true,
dataIndex: 'CREATETIME',
header: Zi.LAN.CREATETIME,
//header: '录入时间',
width: 80
},
{
sortable: true, hidden: true,
dataIndex: 'BSSTATUS',
header: Zi.LAN.BSSTATUS,
//header: 'BSSTATUS',
width: 80
},
{
sortable: true,
dataIndex: 'SALE',
header: Zi.LAN.SALE,
//header: '业务员',
width: 80
},
{
sortable: true,
dataIndex: 'OP',
header: Zi.LAN.OP,
//header: '操作',
width: 80
},
{
sortable: true, hidden: true,
dataIndex: 'DOC',
header: Zi.LAN.DOC,
//header: 'DOC',
width: 80
},
{
sortable: true,
dataIndex: 'ETD',
header: Zi.LAN.ETD,
//header: '开船日期',
width: 80
},
{
sortable: true,
dataIndex: 'OPDATE',
header: Zi.LAN.OPDATE,
//header: '业务日期',
width: 80
},
{
sortable: true,
dataIndex: 'ENTERP',
header: Zi.LAN.ENTERP,
//header: '经营单位',
width: 80
},
{
sortable: true,
dataIndex: 'CUSTOMDATE',
header: Zi.LAN.CUSTOMDATE,
//header: '报关日期',
width: 80
},
{
sortable: true, hidden: true,
dataIndex: 'CUSTSERVICE',
header: Zi.LAN.CUSTSERVICE,
//header: 'CUSTSERVICE',
width: 80
},
{
sortable: true,
dataIndex: 'PORTLOAD',
header: Zi.LAN.PORTLOAD,
//header: '起运港',
width: 80
},
{
sortable: true,
dataIndex: 'PORTDISCHARGE',
header: Zi.LAN.PORTDISCHARGE,
//header: '目的港',
width: 80
},
{
sortable: true, hidden: true,
dataIndex: 'CUSTOMNO',
header: Zi.LAN.CUSTOMNO,
//header: 'CUSTOMNO',
width: 80
},
{
sortable: true,
dataIndex: 'ACCDATE',
header: Zi.LAN.ACCDATE,
//header: '会计期间',
width: 80
},
{
sortable: true,
dataIndex: 'CARRIER',
header: Zi.LAN.CARRIER,
//header: '船公司',
width: 80
},
{
sortable: true,
dataIndex: 'BSSOURCE',
header: Zi.LAN.BSSOURCE,
//header: '业务来源',
width: 80
},
{
sortable: true, hidden: true,
dataIndex: 'LANE',
header: Zi.LAN.LANE,
//header: 'LANE',
width: 80
},
{
sortable: true, hidden: true,
dataIndex: 'FORWARDER',
header: Zi.LAN.FORWARDER,
//header: 'FORWARDER',
width: 80
},
{
sortable: true, hidden: true,
dataIndex: 'NETWEIGHT',
header: Zi.LAN.NETWEIGHT,
//header: 'NETWEIGHT',
width: 80
},
{
sortable: true,
dataIndex: 'KGS',
header: Zi.LAN.KGS,
//header: 'KGS',
width: 80
},
{
sortable: true,
dataIndex: 'TEU',
header: Zi.LAN.TEU,
//header: 'TEU',
width: 80
},
{
sortable: true, hidden: true,
dataIndex: 'CNTRTOTAL',
header: Zi.LAN.CNTRTOTAL,
//header: 'CNTRTOTAL',
width: 80
},
{
sortable: true, hidden: true,
dataIndex: 'CORPID',
header: Zi.LAN.CORPID,
//header: 'CORPID',
width: 80
},
{
sortable: true, hidden: true,
dataIndex: 'TRADETYPE',
header: Zi.LAN.TRADETYPE,
//header: 'TRADETYPE',
width: 80
},
{
sortable: true,
dataIndex: 'GOODSNAME',
header: Zi.LAN.GOODSNAME,
//header: '品名',
width: 80
},
{
sortable: true, hidden: true,
dataIndex: 'FEESTATUS',
header: Zi.LAN.FEESTATUSREF,
//header: 'FEESTATUS',
width: 80
},
{
sortable: true,
dataIndex: 'FEESTATUSREF',
header: Zi.LAN.FEESTATUSREF,
//header: '费用锁定',
width: 80
},
{
sortable: true,
dataIndex: 'RMBDR',
header: Zi.LAN.RMBDR,
//header: 'RMB实收',
width: 80
},
{
sortable: true,
dataIndex: 'RMBCR',
header: Zi.LAN.RMBCR,
//header: 'RMB实付',
width: 80
},
{
sortable: true,
dataIndex: 'USDDR',
header: Zi.LAN.USDDR,
//header: 'USD实收',
width: 80
},
{
sortable: true,
dataIndex: 'USDCR',
header: Zi.LAN.USDCR,
//header: 'USD实付',
width: 80
},
{
sortable: true,
dataIndex: 'OTDR',
header: Zi.LAN.OTDR,
//header: '其他实收',
width: 80
},
{
sortable: true,
dataIndex: 'OTCR',
header: Zi.LAN.OTCR,
//header: '其他实付',
width: 80
}
];
this.girdcolumsdr = DsTruck.GetGridPanel(USERID, this.formname + 'dr', this.initgirdcolumsdr, 1);
this.gridListDr = new Ext.grid.GridPanel({
store: this.storeListDr,
enableHdMenu: false,
region: 'center',
loadMask: { msg: Zi.LAN.LOADING },//msg: Zi.LAN.LOADING 数据加载中,请稍等...
trackMouseOver: true,
disableSelection: false,
columns: this.girdcolumsdr,
// paging bar on the bottom
bbar: [Ext.create('Ext.PagingToolbar', {
store: this.storeListDr,
displayInfo: true,
displayMsg: Zi.LAN.displayMsg,//'当前显示 {0} - {1}条记录 /共 {2}条记录'
emptyMsg: Zi.LAN.emptyMsg//"没有数据"
}), this.Pagenum]
});
this.gridListDr.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.gridListDr.addListener('sortchange', function (ct, column, direction, eOpts) {
this.bslistdrsortfield = column.dataIndex;
this.bslistdrsortdire = direction;
}, this);
//#endregion
//////////////////////////////////////////
//#region 费用统计
this.storeFeeListDr = 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: 'BLTYPE', 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: 'LANE', 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: 'CBM', type: 'number' },
{ name: 'TEU', type: 'number' },
{ name: 'CUSTNAME', 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: 'RATE', type: 'number' },
{ name: 'TAXRATE', type: 'number' },
{ name: 'NOTAXAMOUNT', type: 'number' },
{ name: 'ACCTAXRATE', type: 'number' },
{ name: 'SETTLEMENT', type: 'number' },
{ name: 'BILLNO', type: 'string' },
{ name: 'SETTLETIME', type: 'string' },
{ name: 'SETTLENO', type: 'string' },
{ name: 'SETTLEUSERREF', type: 'string' },
{ name: 'SETTLETYPEREF', type: 'string' },
{ name: 'INVOICE', type: 'number' },
{ name: 'RMBDR', type: 'number' },
{ name: 'RMBCR', type: 'number' },
{ name: 'USDDR', type: 'number' },
{ name: 'USDCR', type: 'number' },
{ name: 'OTDR', type: 'number' },
{ name: 'OTCR', type: 'number' }
],
remoteSort: true,
proxy: {
type: 'ajax',
url: '/MvcShipping/MsRptFeeSettleStatus/FeeListData',
timeout: 120000,
reader: {
id: '',
root: 'data',
totalProperty: 'totalCount'
}
}
});
//定义Grid
this.initgirdcolumsfeedr = [{
sortable: true,
dataIndex: 'BSNO',
text: Zi.LAN.BSNO,
//text: '编号',
hidden: true,
width: 130
}, {
sortable: true,
dataIndex: 'CUSTNAME',
text: Zi.LAN.CUSTNAME,
//text: '结算客户',
width: 60
}, {
sortable: true,
dataIndex: 'OPLBNAME',
text: Zi.LAN.OPLBNAME,
//text: '业务类型',
width: 70,
renderer:function(value,cellmeta){
switch (value){
case "海运出口":
return Zi.LAN.op_seae ;
break;
case "海运进口":
return Zi.LAN.op_seai ;
break;
case "空运出口":
return Zi.LAN.op_aire ;
case "空运进口":
return Zi.LAN.op_airi ;
case "仓储月结账单":
return Zi.LAN.OP_WMS_FEEDUI ;
case "入库执行":
return Zi.LAN.OP_WMS_IN_DO ;
case "移库业务":
return Zi.LAN.OP_WMS_MOVE ;
case "出库作业":
return Zi.LAN.OP_WMS_OUT_DO ;
case "陆运派车单":
return Zi.LAN.tMsWlPcHead ;
default :
"" // 如果没有与表达式相同的值,则执行该代码
}
}
}, {
sortable: true,
dataIndex: 'BSTYPE',
text: Zi.LAN.BSTYPE,
//text: '运输类型',
width: 70,
renderer:function(value,cellmeta){
switch (value){
case "仓储业务":
return Zi.LAN.仓储业务 ;
case "海运出口":
return Zi.LAN.海运出口 ;
case "海运进口":
return Zi.LAN.海运进口 ;
case "空运出口":
return Zi.LAN.空运出口 ;
case "空运进口":
return Zi.LAN.空运进口 ;
case "陆运派车单":
return Zi.LAN.陆运派车单 ;
default :
"" // 如果没有与表达式相同的值,则执行该代码
}
}
}, {
sortable: true,
dataIndex: 'BLTYPE',
text: Zi.LAN.BLTYPE,
//text: '装运方式',
width: 70,
renderer:function(value,cellmeta){
switch (value){
case "仓储月结":
return Zi.LAN.仓储月结 ;
case "出库明细":
return Zi.LAN.出库明细 ;
case "出库受理":
return Zi.LAN.出库受理 ;
case "出库作业":
return Zi.LAN.出库作业 ;
case "滚装":
return Zi.LAN.滚装 ;
case "空运单票":
return Zi.LAN.空运单票 ;
case "派车单票":
return Zi.LAN.派车单票 ;
case "拼箱":
return Zi.LAN.拼箱 ;
case "入库执行":
return Zi.LAN.入库执行 ;
case "散杂":
return Zi.LAN.散杂 ;
case "移库业务":
return Zi.LAN.移库业务 ;
case "整箱":
return Zi.LAN.整箱 ;
default :
"" // 如果没有与表达式相同的值,则执行该代码
}
}
}, {
sortable: true,
dataIndex: 'OPDATE',
text: Zi.LAN.OPDATE,
//text: '业务日期',
width: 86
}, {
sortable: true,
dataIndex: 'CUSTOMDATE',
text: Zi.LAN.CUSTOMDATE,
//text: '报关日期',
width: 86
},
{
sortable: true,
dataIndex: 'CUSTOMERNAME',
text: Zi.LAN.CUSTOMERNAME,
//text: '委托单位',
width: 120
}, {
sortable: true,
dataIndex: 'CUSTNO',
text: Zi.LAN.CUSTNO,
//text: '委托编号',
width: 136
}, {
sortable: true,
dataIndex: 'ENTERP',
text: Zi.LAN.ENTERP,
//text: '经营单位',
width: 100
}, {
sortable: true,
dataIndex: 'MBLNO',
text: Zi.LAN.MBLNO,
//text: '主提单号',
width: 120
}, {
sortable: true,
dataIndex: 'HBLNO',
text: Zi.LAN.HBLNO,
//text: '分提单号',
width: 120
}, {
sortable: true,
dataIndex: 'ETD',
text: Zi.LAN.ETD,
//text: '开船日期',
width: 86
}, {
sortable: true,
dataIndex: 'VESSEL',
text: Zi.LAN.VESSEL,
//text: '船名',
width: 200
}, {
sortable: true,
dataIndex: 'VOYNO',
text: Zi.LAN.VOYNO,
//text: '航次',
width: 50
}, {
sortable: true,
dataIndex: 'LANE',
text: Zi.LAN.LANE,
//text: '航线',
width: 50
},
{
sortable: true,
dataIndex: 'BILLNO',
text: Zi.LAN.BillNo,
//text: '结算单号',
width: 80
},
{
sortable: true,
dataIndex: 'SETTLETIME',
text: Zi.LAN.SETTLETIME,
//text: '结算日期',
width: 80
},
{
sortable: true,
dataIndex: 'SETTLENO',
header: Zi.LAN.SETTLENO,
//header: '相关号码',
width: 80
},
{
sortable: true,
dataIndex: 'SETTLEUSERREF',
header: Zi.LAN.SETTLEUSERREF,
//header: '结算人',
width: 80
},
{
sortable: true,
dataIndex: 'SETTLETYPEREF',
header: Zi.LAN.SETTLETYPEREF,
//header: '结算方式',
width: 80
}, {
sortable: true,
dataIndex: 'SALE',
text: Zi.LAN.SALE,
//text: '业务员',
width: 80
}, {
sortable: true,
dataIndex: 'OP',
text: Zi.LAN.OP,
//text: '操作',
width: 80
}, {
sortable: true,
dataIndex: 'PORTLOAD',
text: Zi.LAN.PORTLOAD,
//text: '起运港',
width: 80
}, {
sortable: true,
dataIndex: 'PORTDISCHARGE',
text: Zi.LAN.PORTDISCHARGE,
//text: '目的港',
width: 150
}, {
sortable: true,
dataIndex: 'ACCDATE',
text: Zi.LAN.ACCDATE,
//text: '会计期间',
width: 80
}, {
sortable: true,
dataIndex: 'CARRIER',
text: Zi.LAN.CARRIER,
//text: '船公司',
width: 80
}, {
sortable: true,
dataIndex: 'BSSOURCE',
text: Zi.LAN.BSSOURCE,
//text: '业务来源',
width: 120
}, {
sortable: true,
dataIndex: 'TEU',
text: Zi.LAN.TEU,
//text: 'TEU',
width: 80
}, {
sortable: true,
dataIndex: 'KGS',
text: Zi.LAN.KGS,
//text: 'KGS',
width: 80
}, {
sortable: true,
dataIndex: 'CNTRTOTAL',
text: Zi.LAN.CNTRTOTAL,
//text: '集装箱',
width: 80
}, {
sortable: true,
dataIndex: 'GOODSNAME',
text: Zi.LAN.GOODSNAME,
//text: '品名',
width: 80
}, {
sortable: true,
dataIndex: 'FeeType_Ref',
text: Zi.LAN.FeeType_Ref,
//text: '收付类型',
width: 60
}, {
sortable: true,
dataIndex: 'FEENAME',
text: Zi.LAN.FEENAME,
//text: '费用名称',
width: 60
}, {
sortable: true,
dataIndex: 'UNITPRICE',
text: Zi.LAN.UNITPRICE,
//text: '单价',
align: 'right',
width: 80,
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;
}
}, {
sortable: true,
dataIndex: 'QUANTITY',
text: Zi.LAN.QUANTITY,
//text: '数量',
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',
text: Zi.LAN.UNIT,
//text: '单位',
width: 60
}, {
sortable: true,
dataIndex: 'CURRENCY',
text: Zi.LAN.CURRENCY,
//text: '币别',
width: 60
}, {
sortable: true,
dataIndex: 'EXCHANGERATE',
text: Zi.LAN.EXCHANGERATE,
//text: '汇率',
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: 'RATE',
text: Zi.LAN.RATE,
//text: '折算汇率',
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',
text: Zi.LAN.TAXRATE,
//text: '税率',
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',
text: Zi.LAN.NOTAXAMOUNT,
//text: '不含税金额',
align: 'right',
width: 80,
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;
}
}, {
sortable: true,
dataIndex: 'AMOUNT',
text: Zi.LAN.AMOUNT,
//text: '金额',
align: 'right',
width: 80,
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;
}
}, {
sortable: true,
dataIndex: 'ACCTAXRATE',
text: Zi.LAN.ACCTAXRATE,
//text: '财务税额',
align: 'right',
width: 80,
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;
}
}, {
sortable: true,
dataIndex: 'SETTLEMENT',
text: Zi.LAN.SETTLEMENT,
//text: '结算金额',
align: 'right',
width: 80,
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;
}
}, {
sortable: true,
dataIndex: 'INVOICE',
text: Zi.LAN.INVOICE,
//text: '开票金额',
align: 'right',
width: 80,
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;
}
}, {
sortable: true,
dataIndex: 'REMARK',
text: Zi.LAN.REMARK,
//text: '备注',
width: 60
}
];
this.girdcolumsfeedr = DsTruck.GetGridPanel(USERID, this.formname + 'feedr', this.initgirdcolumsfeedr, 1);
this.gridFeeListDr = new Ext.grid.GridPanel({
store: this.storeFeeListDr,
enableHdMenu: false,
region: 'center',
loadMask: { msg: Zi.LAN.LOADING },//msg: Zi.LAN.LOADING 数据加载中,请稍等...
trackMouseOver: true,
disableSelection: false,
columns: this.girdcolumsfeedr,
// paging bar on the bottom
bbar: Ext.create('Ext.PagingToolbar', {
store: this.storeFeeListDr,
displayInfo: true,
displayMsg: Zi.LAN.displayMsg,//'当前显示 {0} - {1}条记录 /共 {2}条记录'
emptyMsg: Zi.LAN.emptyMsg//"没有数据"
})
});
this.gridFeeListDr.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.gridFeeListDr.addListener('sortchange', function (ct, column, direction, eOpts) {
this.feelistdrsortfield = column.dataIndex;
this.feelistdrsortdire = direction;
}, this);
//#endregion
///////////////////////////////////////////
//#region 按客户统计
this.storeCustList = Ext.create('Ext.data.Store', {
pageSize: this.PageSize,
fields: [
{ name: 'CUSTNAME', 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: '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/MsRptFeeSettleStatus/CustListData',
timeout: 120000,
reader: {
id: '',
root: 'data',
totalProperty: 'totalCount'
}
}
});
//定义Grid
this.initgirdcolumscust = [{
sortable: true,
dataIndex: 'CUSTNAME',
header: Zi.LAN.CUSTNAME,
//header: '结算客户',
width: 80
}, {
sortable: true, hidden: true,
dataIndex: 'RMBDR',
header: Zi.LAN.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: Zi.LAN.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, hidden: true,
dataIndex: 'BALRMBDR',
header: Zi.LAN.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, hidden: true,
dataIndex: 'USDDR',
header: Zi.LAN.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: Zi.LAN.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, hidden: true,
dataIndex: 'BALUSDDR',
header: Zi.LAN.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', hidden: true,
header: Zi.LAN.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: Zi.LAN.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, hidden: true,
dataIndex: 'BALOTDR',
header: Zi.LAN.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, hidden: true,
dataIndex: 'TTLDR',
header: Zi.LAN.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: Zi.LAN.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, hidden: true,
dataIndex: 'BALTTLDR',
header: Zi.LAN.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, hidden: true,
dataIndex: 'RMBCR',
header: Zi.LAN.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: Zi.LAN.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, hidden: true,
dataIndex: 'BALRMBCR',
header: Zi.LAN.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, hidden: true,
dataIndex: 'USDCR',
header: Zi.LAN.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: Zi.LAN.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, hidden: true,
dataIndex: 'BALUSDCR',
header: Zi.LAN.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, hidden: true,
dataIndex: 'OTCR',
header: Zi.LAN.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: Zi.LAN.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, hidden: true,
dataIndex: 'BALOTCR',
header: Zi.LAN.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, hidden: true,
dataIndex: 'TTLCR',
header: Zi.LAN.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: Zi.LAN.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, hidden: true,
dataIndex: 'BALTTLCR',
header: Zi.LAN.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.girdcolumscust = DsTruck.GetGridPanel(USERID, this.formname + 'cust', this.initgirdcolumscust, 1);
this.gridListCust = new Ext.grid.GridPanel({
store: this.storeCustList,
enableHdMenu: false,
region: 'center',
loadMask: { msg: Zi.LAN.LOADING },//msg: Zi.LAN.LOADING 数据加载中,请稍等...
trackMouseOver: true,
disableSelection: false,
columns: this.girdcolumscust,
// paging bar on the bottom
bbar: Ext.create('Ext.PagingToolbar', {
store: this.storeList,
displayInfo: true,
displayMsg: Zi.LAN.displayMsg,//'当前显示 {0} - {1}条记录 /共 {2}条记录'
emptyMsg: Zi.LAN.emptyMsg//"没有数据"
})
});
this.gridListCust.addListener('sortchange', function (ct, column, direction, eOpts) {
this.custsumsortfield = column.dataIndex;
this.custsumsortdire = direction;
}, this);
//#endregion
////////////////
//#region 合计
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/MsRptFeeSettleStatus/SumListData',
timeout: 120000,
reader: {
id: '',
root: 'data',
totalProperty: 'totalCount'
}
}
});
//定义Grid
this.initgirdcolumssum = [{
sortable: true, hidden: true,
dataIndex: 'RMBDR',
header: Zi.LAN.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: Zi.LAN.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, hidden: true,
dataIndex: 'BALRMBDR',
header: Zi.LAN.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, hidden: true,
dataIndex: 'USDDR',
header: Zi.LAN.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: Zi.LAN.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, hidden: true,
dataIndex: 'BALUSDDR',
header: Zi.LAN.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', hidden: true,
header: Zi.LAN.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: Zi.LAN.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, hidden: true,
dataIndex: 'BALOTDR',
header: Zi.LAN.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, hidden: true,
dataIndex: 'TTLDR',
header: Zi.LAN.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: Zi.LAN.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, hidden: true,
dataIndex: 'BALTTLDR',
header: Zi.LAN.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, hidden: true,
dataIndex: 'RMBCR',
header: Zi.LAN.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: Zi.LAN.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, hidden: true,
dataIndex: 'BALRMBCR',
header: Zi.LAN.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, hidden: true,
dataIndex: 'USDCR',
header: Zi.LAN.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: Zi.LAN.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, hidden: true,
dataIndex: 'BALUSDCR',
header: Zi.LAN.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, hidden: true,
dataIndex: 'OTCR',
header: Zi.LAN.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: Zi.LAN.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, hidden: true,
dataIndex: 'BALOTCR',
header: Zi.LAN.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, hidden: true,
dataIndex: 'TTLCR',
header: Zi.LAN.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: Zi.LAN.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, hidden: true,
dataIndex: 'BALTTLCR',
header: Zi.LAN.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.gridListSum = new Ext.grid.GridPanel({
store: this.storeSumList,
enableHdMenu: false,
region: 'center',
loadMask: { msg: Zi.LAN.LOADING },//msg: Zi.LAN.LOADING 数据加载中,请稍等...
trackMouseOver: true,
disableSelection: false,
columns: this.initgirdcolumssum
});
//#endregion
//#region formSearch
//#region formSearch枚举参照相关
_this = this;
this.StoreOpLb = Ext.create('DsExt.ux.RefEnumStore', {});
this.StoreOpLb.load({ params: { enumTypeId: 96005} });
this.comboxOpLb = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.PS_OPLB,
//fieldLabel: Zi.LAN.BLANKFIELD,
//fieldLabel: '业务类型',
store: this.StoreOpLb,
forceSelection: true,
name: 'PS_OPLB',
valueField: 'EnumValueName',
displayField: Zi.LAN.displayField,//'EnumValueName',
enableKeyEvents: true,
listeners: {
keyup: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
});
this.storeBsType = Ext.create('DsExt.ux.RefEnumStore', {});
this.storeBsType.load({ params: { enumTypeId: 96004} });
this.comboxBsType = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.BSTYPE,//'运输类型',
store: this.storeBsType,
name: 'PS_BSTYPE',
valueField: 'EnumValueName',
displayField: Zi.LAN.displayField,//'EnumValueName',
enableKeyEvents: true,
listeners: {
keyup: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
});
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: Zi.LAN.PS_SALE,
//fieldLabel: '揽货人',
store: this.storeSalesCode,
forceSelection: true,
name: 'PS_SALE',
valueField: 'UserName',
displayField: 'CodeAndName',
enableKeyEvents: true,
listeners: {
keyup: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
});
this.comboxOp = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.PS_OP,
//fieldLabel: '操 作',
store: this.storeSalesCode,
forceSelection: true,
name: 'PS_OP',
valueField: 'UserName',
displayField: 'CodeAndName',
enableKeyEvents: true,
listeners: {
keyup: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
});
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: Zi.LAN.PS_CUSTOMERNAME,
//fieldLabel: '委托单位',
store: this.storeCustCode,
forceSelection: true,
name: 'PS_CUSTOMERNAME',
valueField: 'CustName',
displayField: 'CodeAndName',
enableKeyEvents: true,
listeners: {
keyup: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
});
this.storeAddDCType = Ext.create('Ext.data.Store', {
fields: ['DC', 'NAME']
});
this.storeAddDCType.add({ "DC": "", "NAME": "全部" });
this.storeAddDCType.add({ "DC": "1", "NAME": "应收" });
this.storeAddDCType.add({ "DC": "2", "NAME": "应付" });
this.comboxaddDCType = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.DCTYPE,
//fieldLabel: '收付',
store: this.storeAddDCType,
valueField: 'DC',
displayField: 'NAME',
flex: 0.5,
labelWidth: 50,
forceSelection: true,
name: 'DC',
enableKeyEvents: true,
listeners: {
keyup: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
});
this.StoreCurr = Ext.create('DsExt.ux.RefTableStore', {
model: 'MsFeeCurr',
proxy: { url: '/MvcShipping/MsChFee/GetFeeCurrList' }
});
this.StoreCurr.load({ params: { condition: ""} });
this.comboxCurr = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.Currency,
//fieldLabel: '币别',
store: this.StoreCurr,
forceSelection: true,
flex: 0.5,
labelWidth: 50,
name: 'Currency',
valueField: 'CURR',
displayField: 'CURR',
enableKeyEvents: true,
listeners: {
keyup: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
});
this.storeFeeNameRef = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.FeeTypeRefModel',
proxy: { url: '/MvcShipping/MsChFee/GetFeeTypeRefList' }
});
this.comboxFeeNameRef = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.FeeName,
//fieldLabel: '费用名称',
store: this.storeFeeNameRef,
forceSelection: true,
name: 'FeeName',
valueField: 'Name',
displayField: 'CodeAndName',
enableKeyEvents: true,
listeners: {
keyup: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
});
this.storeFeeNameRef.load({ params: { condition: ""} });
this.storeFeeType = Ext.create('DsExt.ux.RefEnumStore', {});
this.storeFeeType.load({ params: { enumTypeId: 96009} });
this.comboxFeeType = Ext.create('DsExt.ux.RefEnumCombox', {
fieldLabel: Zi.LAN.FEERANGE,
//fieldLabel: '费用范围',
store: this.storeFeeType,
forceSelection: true,
name: 'FEERANGE',
enableKeyEvents: true,
listeners: {
keyup: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
});
this.storeCust = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CustomRefModel',
proxy: { url: '/CommMng/BasicDataRef/GetCustomRefList' }
});
this.storeCust.load({ params: { condition: ""} });
this.comboxCust = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.CUSTNAME,
//fieldLabel: '结算客户',
store: this.storeCust,
// forceSelection: true,
name: 'CUSTNAME',
valueField: 'CustName',
displayField: 'CodeAndName',
enableKeyEvents: true,
listeners: {
keyup: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
});
this.storeFSTATUS = Ext.create('Ext.data.Store', {
fields: ['FSTATUS', 'NAME']
});
this.storeFSTATUS.add({ "DC": "0", "NAME": Zi.LAN.ALL });//"全部"
this.storeFSTATUS.add({ "DC": "1", "NAME": Zi.LAN.Audited });//"仅已审核"
this.comboxFSTATUS = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.FSTATUS,
//fieldLabel: '费用状态',
store: this.storeFSTATUS,
valueField: 'FSTATUS',
displayField: 'NAME',
forceSelection: true,
name: 'FSTATUS',
value: '0',
enableKeyEvents: true,
listeners: {
keyup: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
});
//状态_业务状态
this.StoreFeeLock = Ext.create('Ext.data.Store', {
fields: ['OpLb']
});
this.StoreFeeLock.add({ "OpLb": Zi.LAN.ALL });//"全部"
this.StoreFeeLock.add({ "OpLb": Zi.LAN.已锁定 });//"已锁定"
this.StoreFeeLock.add({ "OpLb": Zi.LAN.未锁定 });//"未锁定"
this.comboxFeeLock = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.PS_FEELOCK,
//fieldLabel: '费用锁定',
store: this.StoreFeeLock,
forceSelection: true,
name: 'PS_FEELOCK',
valueField: 'OpLb',
displayField: 'OpLb'
});
this.storeVoyVeg = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.VesselModel',
proxy: { url: '/CommMng/BasicDataRef/GetVesselList' }
});
this.storeVoyVeg.load({ params: { condition: ""} });
this.comboxVoyVeg = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.VESSEL,
//fieldLabel: '船 名',
store: this.storeVoyVeg,
valueField: 'VESSEL',
flex: 1.5,
name: 'PS_VESSEL',
displayField: 'VESSEL',
enableKeyEvents: true,
listeners: {
keyup: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
});
this.storeEnterpCode = Ext.create('DsExt.ux.RefTableStore', {
fields: [
{ name: 'CUSTOMER', type: 'string' },
{ name: 'ENTERPID', type: 'string' }
],
proxy: { url: '/MvcShipping/MsOpApply/GetENTERPLIST' }
});
this.storeEnterpCode.load();
this.comboxEnterp = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.ENTERP,
//fieldLabel: '经营单位',
store: this.storeEnterpCode,
name: 'PS_ENTERP',
valueField: 'CUSTOMER',
displayField: 'CUSTOMER',
enableKeyEvents: true,
listeners: {
keyup: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
});
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: Zi.LAN.SUBCOMP,
//fieldLabel: '所属公司',
store: this.StoreSubComp,
name: 'SUBCOMP',
valueField: 'GID',
displayField: 'NAME',
enableKeyEvents: true,
listeners: {
keyup: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
});
//#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.comboxCust, this.comboxFeeType, this.comboxFeeNameRef
, this.comboxCurr, this.comboxaddDCType, this.comboxOp, this.comboxSubComp
]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [this.comboxOpLb, {
fieldLabel: Zi.LAN.PS_MBLNO,
//fieldLabel: '编号',
name: 'PS_MBLNO',
enableKeyEvents: true,
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
}, this.comboxVoyVeg, {
fieldLabel: Zi.LAN.VOYNO,
//fieldLabel: '航次',
labelWidth: 40,
flex: 0.5,
name: 'PS_VOYNO',
enableKeyEvents: true,
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
}, {
fieldLabel: Zi.LAN.GOODSNAME,
//fieldLabel: '品名',
name: 'PS_GOODSNAME',
enableKeyEvents: true,
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
}, this.comboxFSTATUS
]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [this.comboxBsType, this.comboxSalesCode, this.comboxCustCode,
this.comboxEnterp, {
fieldLabel: Zi.LAN.PS_EXPDATEBGN,
//fieldLabel: '从业务日期',
format: 'Y-m-d',
xtype: 'datefield',
name: 'PS_EXPDATEBGN',
enableKeyEvents: true,
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
}, {
fieldLabel: Zi.LAN.PS_EXPDATEEND,
//fieldLabel: '到业务日期',
format: 'Y-m-d',
xtype: 'datefield',
name: 'PS_EXPDATEEND',
enableKeyEvents: true,
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
}//, this.comboxFeeLock
]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: Zi.LAN.PS_ETDDATEBGN,
//fieldLabel: '从ETD',
format: 'Y-m-d',
xtype: 'datefield',
name: 'PS_ETDDATEBGN',
enableKeyEvents: true,
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
}, {
fieldLabel: Zi.LAN.PS_ETDDATEEND,
//fieldLabel: '到ETD',
format: 'Y-m-d',
xtype: 'datefield',
name: 'PS_ETDDATEEND',
enableKeyEvents: true,
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
}, {
fieldLabel: Zi.LAN.PS_ACCDATEBGN,
//fieldLabel: '从会计期间',
xtype: 'monthfield',
name: 'PS_ACCDATEBGN',
enableKeyEvents: true,
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
}, {
fieldLabel: Zi.LAN.PS_ACCDATEEND,
//fieldLabel: '至会计期间',
xtype: 'monthfield',
name: 'PS_ACCDATEEND',
enableKeyEvents: true,
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
}, {
fieldLabel: Zi.LAN.SETTLEDATEBGN,
//fieldLabel: '从结算日期',
format: 'Y-m-d',
xtype: 'datefield',
name: 'SETTLEDATEBGN',
enableKeyEvents: true,
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
}, {
fieldLabel: Zi.LAN.SETTLEDATEEND,
//fieldLabel: '到结算日期',
format: 'Y-m-d',
xtype: 'datefield',
name: 'SETTLEDATEEND',
enableKeyEvents: true,
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
}
]
}
]//end items(fieldset 1)
}//end fieldset 1
]//end root items
});
//#endregion formSearch
//查询工具条
this.CheckSaveQuery = new Ext.form.Checkbox({
fieldLabel: Zi.LAN.BLANKFIELD,
//fieldLabel: '记忆查询条件',
checked: true,
width: 120
});
_this = this;
this.SearchBtn = new Ext.Button({
text: Zi.LAN.HideQuery,
//text:'隐藏查询',
handler: function () {
if (_this.SearchBtn.text == Zi.LAN.HideQuery) {//'隐藏查询'
_this.panelSearch.hide();
_this.SearchBtn.setText(Zi.LAN.SearchBtn2);//"显示查询"
} else {
_this.panelSearch.show();
_this.SearchBtn.setText(Zi.LAN.HideQuery);//"隐藏查询"
}
}
});
this.panelBtn = new Ext.Panel({
region: "north",
tbar: [
{
text: Zi.LAN.Refresh,
//text: "执行查询",
iconCls: "btnrefresh",
id: "btnrefresh",
handler: function (button, event) {
this.onRefreshClick(button, event);
var isvisible = true;
var issavevalue = false;
if (_this.SearchBtn.text == Zi.LAN.HideQuery)//'隐藏查询'
isvisible = true
else
isvisible = false;
if (this.CheckSaveQuery.checked)
issavevalue = true
saveQuerySetting(this.formname, this.formSearch, isvisible, issavevalue);
},
scope: this
}, '-', {
text: Zi.LAN.DsQuery,
//text: "高级查询",
iconCls: "btnmore",
handler: function (button, event) {
var sql = this.getCondition();
var winAccess = new Shipping.DsQuery({
});
winAccess.StoreList = this.storeList;
winAccess.formname = this.formname;
winAccess.condition = sql;
winAccess.show();
return;
},
scope: this
}, {
text: Zi.LAN.btnExportExcel,
//text: "导出Excel",
id: "btnExportExcel",
iconCls: 'btnexportexcel',
handler: function (button, event) {
this.onExportClick(button, event);
},
scope: this
}, '-',
{
text: Zi.LAN.btnprint,
//text: "打印",
iconCls: 'btnprint',
handler: function (button, event) {
this.Print();
},
scope: this
}, '-', this.SearchBtn, {
xtype: 'button',
width: 90,
text: Zi.LAN.ClearSql,
//text: "清空条件",
iconCls: "btnreset",
handler: function (button, event) {
this.onClearSql(button, event);
},
scope: this
}, this.CheckSaveQuery, '-', {
text: Zi.LAN.SaveGrid,
//text: "保存列表样式",
id: "btntest",
menu: [
{ text: Zi.LAN.SaveGrid2,
//text: "保存列表",
handler: function (button, event) {
_this.onSaveGridClick(button, event);
}
}, { text: Zi.LAN.RefreshGrid,
//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.panelSearch = new Ext.Panel({
layout: "border",
region: "north",
height: 121,
items: [this.formSearch]
});
this.panelBodyChFee = new Ext.Panel({
title: Zi.LAN.按单票业务统计,//'按单票业务统计',
layout: "border",
region: 'center',
margin: '0 0',
frame: true,
items: [this.gridListDr]
});
this.panelFeeListDr = new Ext.Panel({
title: Zi.LAN.ChargeDetails,//'费用明细',
layout: "border",
region: 'center',
margin: '0 0',
frame: true,
items: [this.gridFeeListDr]
});
this.panelCustSum = new Ext.Panel({
title: Zi.LAN.按客户统计,//'按客户统计',
layout: "border",
region: 'center',
margin: '0 0',
frame: true,
items: [this.gridListCust]
});
this.panelSum = new Ext.Panel({
title: Zi.LAN.SUM,//'合 计',
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.panelBodyChFee,
this.panelFeeListDr,
this.panelCustSum
]
});
Ext.apply(this, {
items: [this.panelTop, this.panelSearch, this.tabpanel, this.panelSum]
});
this.storeListDr.on('beforeload', function (store) {
if (!this.checkSearchCondition())
return;
var sql = this.sqlcontext;
Ext.apply(store.proxy.extraParams, { condition: sql });
}, this);
this.storeCustList.on('beforeload', function (store) {
if (!this.checkSearchCondition())
return;
var sql = this.sqlcontext;
Ext.apply(store.proxy.extraParams, { condition: sql });
}, this);
this.storeFeeListDr.on('beforeload', function (store) {
if (!this.checkSearchCondition())
return;
var sql = this.sqlcontext;
Ext.apply(store.proxy.extraParams, { condition: sql });
}, this);
LoadQueryData(this.formname, this.formSearch, this.CheckSaveQuery);
}, //end initUIComponents
onRefreshClick: function (button, event) {
if (!this.checkSearchCondition())
return;
var sql = this.getCondition();
this.PageSize = this.Pagenum.getValue();
this.storeListDr.currentPage = 1;
this.sqlcontext = sql;
//var Drsql = sql + getAndConSql(sql, '1=1', "");
//var Crsql = sql + getAndConSql(sql, '1=1', " F.FEETYPE=2");
this.storeListDr.pageSize = this.PageSize;
this.storeListDr.load({
params: { start: 0, limit: this.PageSize, condition: sql },
waitMsg: Zi.LAN.NowSelect,//"正在查询数据...",
scope: this
});
this.storeFeeListDr.currentPage = 1;
this.storeFeeListDr.pageSize = this.PageSize;
this.storeFeeListDr.load({
params: { start: 0, limit: this.PageSize, condition: sql },
waitMsg: Zi.LAN.NowSelect,//"正在查询数据...",
scope: this
});
this.storeCustList.currentPage = 1;
this.storeCustList.pageSize = this.PageSize;
this.storeCustList.load({
params: { start: 0, limit: this.PageSize, condition: sql },
waitMsg: Zi.LAN.NowSelect,//"正在查询数据...",
scope: this
});
this.storeSumList.load({
params: { start: 0, limit: this.PageSize, condition: sql },
waitMsg: Zi.LAN.NowSelect,//"正在查询数据...",
scope: this
});
},
onDsQuery: function (button, event) {
this.PageSize = this.Pagenum.getValue();
var sql = this.sqlcontext;
this.storeListDr.load({
params: { start: 0, limit: this.PageSize, condition: sql },
waitMsg: Zi.LAN.NowSelect,//"正在查询数据...",
scope: this
});
this.storeFeeListDr.load({
params: { start: 0, limit: this.PageSize, condition: sql },
waitMsg: Zi.LAN.NowSelect,//"正在查询数据...",
scope: this
});
this.storeCustList.load({
params: { start: 0, limit: this.PageSize, condition: sql },
waitMsg: Zi.LAN.NowSelect,//"正在查询数据...",
scope: this
});
this.storeSumList.load({
params: { start: 0, limit: this.PageSize, condition: sql },
waitMsg: Zi.LAN.NowSelect,//"正在查询数据...",
scope: this
});
},
onClearSql: function () {
var form = this.formSearch.getForm();
form.reset();
},
getCondition: function () {
var form = this.formSearch.getForm();
var data = this.formSearch.getForm().getValues(false, false, false);
var sql = '';
var stlsql = '';
/*
var sqldata = form.getValues();
sql = Ext.JSON.encode(sqldata);
*/
var mblNo = form.findField('PS_MBLNO').getValue();
sql = sql + getAndConSql(sql, mblNo, " (B.CUSTNO like '%" + mblNo + "%' or B.MBLNO like '%" + mblNo + "%' or B.HBLNO like '%" + mblNo + "%' or B.CUSTOMNO like '%" + mblNo + "%' or 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 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 PS_FEELOCK = form.findField('PS_FEELOCK').getValue();
if (PS_FEELOCK == '已锁定')
sql = sql + getAndConSql(sql, PS_FEELOCK, "B.FEESTATUS=1");
else if (PS_FEELOCK == '未锁定')
sql = sql + getAndConSql(sql, PS_FEELOCK, "B.FEESTATUS=0");
*/
var OP = form.findField('PS_OP').getValue();
sql = sql + getAndConSql(sql, OP, "B.OP='" + OP + "'");
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 + "%'");
var CUSTNAME = form.findField('CUSTNAME').getValue();
sql = sql + getAndConSql(sql, CUSTNAME, "F.CUSTOMERNAME='" + CUSTNAME + "'");
var SUBCOMP = form.findField('SUBCOMP').getValue();
sql = sql + getAndConSql(sql, SUBCOMP, "B.CORPID='" + SUBCOMP + "'");
var DC = form.findField('DC').getValue();
sql = sql + getAndConSql(sql, DC, "F.FEETYPE=" + DC);
var Currency = form.findField('Currency').getValue();
sql = sql + getAndConSql(sql, Currency, "F.Currency='" + Currency + "'");
var FeeName = form.findField('FeeName').getValue();
sql = sql + getAndConSql(sql, FeeName, "F.FeeName='" + FeeName + "'");
var FEERANGE = form.findField('FEERANGE').getValue();
if (FEERANGE == '' || FEERANGE == null || FEERANGE == undefined) {
}
else {
if (sql == '') {
if (FEERANGE == 'B') {
sql = ' F.AMOUNT<>F.SETTLEMENT '
}
if (FEERANGE == 'S') {
sql = ' F.SETTLEMENT<>0 '
}
if (FEERANGE == '已付未收') {
sql = ' EXISTS (select 1 from v_op_gain_sum WHERE v_op_gain_sum.BSNO=B.BSNO AND v_op_gain_sum.STLTTLCR<>0 AND (v_op_gain_sum.TTLDR=0 OR v_op_gain_sum.TTLDR<>v_op_gain_sum.STLTTLDR) ) '
}
if (FEERANGE == '已收未付') {
sql = ' EXISTS (select 1 from v_op_gain_sum WHERE v_op_gain_sum.BSNO=B.BSNO AND v_op_gain_sum.STLTTLDR<>0 AND (v_op_gain_sum.TTLCR=0 OR v_op_gain_sum.TTLCR<>v_op_gain_sum.STLTTLCR) ) '
} if (FEERANGE == '未申请未结算') {
sql = ' (f.AMOUNT-isnull(f.SETTLEMENT,0)-isnull(f.ORDERAMOUNT,0)+isnull(f.ORDERSETTLEMENT,0))<>0 '
} else if (FEERANGE == '未对账未结算') {
sql = ' (f.ISDEBIT=0 and isnull(f.SETTLEMENT,0)=0) '
} else if (FEERANGE == '已对账未结算') {
sql = ' (f.ISDEBIT=1 and isnull(f.SETTLEMENT,0)<>isnull(f.AMOUNT,0)) '
} else if (FEERANGE == '未开票未结算') {
sql = ' (isnull(f.INVOICE,0)=0 and isnull(f.SETTLEMENT,0)=0) '
} else if (FEERANGE == '已结算未开票') {
sql = ' (isnull(f.INVOICE,0)=0 and isnull(f.SETTLEMENT,0)<>0) '
}
if (FEERANGE == '未收未付') {
sql = ' EXISTS (select 1 from v_op_gain_sum WHERE v_op_gain_sum.BSNO=B.BSNO AND v_op_gain_sum.STLTTLDR=0 AND v_op_gain_sum.STLTTLCR=0) '
}
}
else {
if (FEERANGE == 'B') {
sql = sql + ' and F.AMOUNT<>F.SETTLEMENT '
}
if (FEERANGE == 'S') {
sql = sql + ' and F.SETTLEMENT<>0 '
}
if (FEERANGE == '已付未收') {
sql = sql + ' and EXISTS (select 1 from v_op_gain_sum WHERE v_op_gain_sum.BSNO=B.BSNO AND v_op_gain_sum.STLTTLCR<>0 AND (v_op_gain_sum.TTLDR=0 OR v_op_gain_sum.TTLDR<>v_op_gain_sum.STLTTLDR) ) '
}
if (FEERANGE == '已收未付') {
sql = sql + ' and EXISTS (select 1 from v_op_gain_sum WHERE v_op_gain_sum.BSNO=B.BSNO AND v_op_gain_sum.STLTTLDR<>0 AND (v_op_gain_sum.TTLCR=0 OR v_op_gain_sum.TTLCR<>v_op_gain_sum.STLTTLCR) ) '
} if (FEERANGE == '未申请未结算') {
sql = sql + ' and (f.AMOUNT-isnull(f.SETTLEMENT,0)-isnull(f.ORDERAMOUNT,0)+isnull(f.ORDERSETTLEMENT,0))<>0 '
} if (FEERANGE == '未对账未结算') {
sql = sql + ' and (f.ISDEBIT=0 and isnull(f.SETTLEMENT,0)=0) '
} else if (FEERANGE == '已对账未结算') {
sql = sql + ' and (f.ISDEBIT=1 and isnull(f.SETTLEMENT,0)<>isnull(f.AMOUNT,0)) '
} if (FEERANGE == '未开票未结算') {
sql = sql + ' and (isnull(f.INVOICE,0)=0 and F.AMOUNT<>F.SETTLEMENT ) '
} else if (FEERANGE == '已结算未开票') {
sql = sql +' (isnull(f.INVOICE,0)=0 and isnull(f.SETTLEMENT,0)<>0) '
}
if (FEERANGE == '未收未付') {
sql = sql + ' EXISTS (select 1 from v_op_gain_sum WHERE v_op_gain_sum.BSNO=B.BSNO AND v_op_gain_sum.STLTTLDR=0 AND v_op_gain_sum.STLTTLCR=0) '
}
}
}
var FSTATUS = form.findField('FSTATUS').getValue();
if (FSTATUS == '' || FSTATUS == null || FSTATUS == undefined || FSTATUS == 0) {
}
else {
if (sql == '') {
if (FSTATUS == 1) {
sql = ' F.FEESTATUS=0 or F.FEESTATUS=8 or F.FEESTATUS=9 '
}
}
else {
if (FSTATUS == 1) {
sql = sql + ' and F.FEESTATUS=0 or F.FEESTATUS=8 or F.FEESTATUS=9'
}
}
}
var CREATETIME_MIN = form.findField('SETTLEDATEBGN').getRawValue();
sql = sql + getAndConSql(sql, CREATETIME_MIN, " s.SETTLETIME>='" + CREATETIME_MIN + "'");
var CREATETIME_MAX = form.findField('SETTLEDATEEND').getRawValue();
sql = sql + getAndConSql(sql, CREATETIME_MAX, " s.SETTLETIME<='" + CREATETIME_MAX + " 23:59:59'");
// if (stlsql != '') {
// sql = sql + getAndConSql(sql, stlsql, "D.BILLNO IN (SELECT BILLNO FROM ch_fee_settlement S WHERE " + stlsql+" )");
//
// }
return sql;
},
checkSearchCondition: function () {
var form = this.formSearch.getForm();
if (!form.isValid()) {
Ext.Msg.alert(Zi.LAN.TiShi, Zi.LAN.SelectConditionValError);//'查询条件赋值错误,请检查。
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] = "MsRptFeeSettleStatusIndex";
return ret;
},
onSaveGridClick: function (button, event) {
if (this.tabpanel.getActiveTab() == this.panelBodyChFee) {
this.girdcolumsdr = DsTruck.SaveGridPanel(USERID, this.formname + 'dr', this.gridListDr.columns, this.girdcolumsdr, 1, true);
} else if (this.tabpanel.getActiveTab() == this.panelCustSum) {
this.girdcolumscust = DsTruck.SaveGridPanel(USERID, this.formname + 'cust', this.gridListCust.columns, this.girdcolumscust, 1, true);
} else if (this.tabpanel.getActiveTab() == this.panelFeeListDr) {
this.girdcolumsfeedr = DsTruck.SaveGridPanel(USERID, this.formname + 'feedr', this.gridFeeListDr.columns, this.girdcolumsfeedr, 1, true);
}
},
oninitGridClick: function (button, event) {
if (this.tabpanel.getActiveTab() == this.panelBodyChFee) {
this.gridListDr.reconfigure(this.storeListDr, this.initgirdcolumsdr);
this.girdcolumsdr = DsTruck.SaveGridPanel(USERID, this.formname + 'dr', this.gridListDr.columns, this.initgirdcolumsdr, 1, true);
} else if (this.tabpanel.getActiveTab() == this.panelCustSum) {
this.gridListCust.reconfigure(this.storeCustList, this.initgirdcolumscust);
this.girdcolumscust = DsTruck.SaveGridPanel(USERID, this.formname + 'cust', this.gridListCust.columns, this.initgirdcolumscust, 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);
}
},
// onExportClick: function (button, event) {
// _this = this;
// if (this.tabpanel.getActiveTab() == this.panelBodyChFee) {
// GridExportExcelPage(this.gridListDr);
// } else if (this.tabpanel.getActiveTab() == this.panelCustSum) {
// GridExportExcelPage(this.gridListCust);
// } else if (this.tabpanel.getActiveTab() == this.panelFeeListDr) {
// grid2Excel(this.gridFeeListDr, "结算费用明细");
//// GridExportExcelPage(this.gridFeeListDr);
// }
// },
onExportClick: function () {
var sql = this.getCondition();
//var Crsql = sql + getAndConSql(sql, '1=1', " F.FEETYPE=2");
//var Drsql = sql + getAndConSql(sql, '1=1', " F.FEETYPE=1");
_this = this;
if (this.tabpanel.getActiveTab() == this.panelBodyChFee) {
if (this.storeListDr.getCount() == 0) {
return;
}
var sortstr = ' B.OPDATE,B.CUSTNO';
if (this.bslistdrsortfield != '' && this.bslistdrsortdire != '') {
sortstr = this.bslistdrsortfield + ' ' + this.bslistdrsortdire;
}
Ext.Msg.wait(Zi.LAN.HandlingDataAndWait);//'正在组织数据, 请稍侯..'
Ext.Ajax.request({
waitMsg: Zi.LAN.HandlingData,//'正在组织数据...'
url: '/MvcShipping/MsRptFeeSettleStatus/BsListData',
scope: this,
params: {
start: 0, limit: this.PageSize,
condition: _this.sqlcontext,
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 = 'MsRptFeeSettleStatusLISTDR';
var sql1 = returnstr;
sql1 = sql1.replace(/\+/g, "@@@")
if (sql1 != '') {
GridExportBySql(sql1, this.formname + 'dr', Zi.LAN.结算费用统计_业务列表+'.xls');
}
} else {
Ext.Msg.show({ title: Zi.LAN.E, msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
}
} else {
Ext.Msg.show({ title: Zi.LAN.Retry ,
msg: Zi.LAN.ServerResponseError,
icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK
});
}
}
});
} else if (this.tabpanel.activeTab == this.panelCustSum) {
if (this.storeCustList.getCount() == 0) {
return;
}
var sortstr = ' CUSTNAME ';
if (this.custsumsortfield != '' && this.custsumsortdire != '') {
sortstr = this.custsumsortfield + ' ' + this.custsumsortdire;
}
Ext.Msg.wait(Zi.LAN.HandlingDataAndWait);//'正在组织数据, 请稍侯..'
Ext.Ajax.request({
waitMsg: Zi.LAN.HandlingData,//'正在组织数据...'
url: '/MvcShipping/MsRptFeeSettleStatus/CustListData',
scope: this,
params: {
start: 0, limit: this.PageSize,
condition: _this.sqlcontext,
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 = 'MsRptFeeSettleStatusCUST';
var sql1 = returnstr;
sql1 = sql1.replace(/\+/g, "@@@")
if (sql1 != '') {
GridExportBySql(sql1, this.formname + 'cust', Zi.LAN.结算费用统计_客户合计+'.xls');
}
} else {
Ext.Msg.show({ title: Zi.LAN.E, msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
//Ext.Msg.show({ title: Zi.LAN.E, msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
//
}
} else {
Ext.Msg.show({ title: Zi.LAN.Retry ,
msg: Zi.LAN.ServerResponseError,
icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK
});
}
}
});
} else if (this.tabpanel.activeTab == this.panelFeeListDr) {
if (this.storeFeeListDr.getCount() == 0) {
return;
}
var sortstr = ' CUSTOMERNAME,OPDATE';
if (this.feelistdrsortfield != '' && this.feelistdrsortdire != '') {
sortstr = this.feelistdrsortfield + ' ' + this.feelistdrsortdire;
}
Ext.Msg.wait(Zi.LAN.HandlingDataAndWait);//'正在组织数据, 请稍侯..'
Ext.Ajax.request({
waitMsg: Zi.LAN.HandlingData,//'正在组织数据...'
url: '/MvcShipping/MsRptFeeSettleStatus/FeeListData',
scope: this,
params: {
start: 0, limit: this.PageSize,
condition: _this.sqlcontext,
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 = 'MsRptFeeSettleStatusFEELISTDR';
var sql1 = returnstr;
sql1 = sql1.replace(/\+/g, "@@@")
if (sql1 != '') {
GridExportBySql(sql1, this.formname + 'feedr', Zi.LAN.结算费用统计_费用明细+'.xls');
}
} else {
Ext.Msg.show({ title: Zi.LAN.E, msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
//
}
} else {
Ext.Msg.show({ title: Zi.LAN.Retry ,
msg: Zi.LAN.ServerResponseError,
icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK
});
}
}
});
}
},
Print: function () {
var sql = this.getCondition();
//var Crsql = sql + getAndConSql(sql, '1=1', " F.FEETYPE=2");
//var Drsql = sql + getAndConSql(sql, '1=1', " F.FEETYPE=1");
_this = this;
if (this.tabpanel.getActiveTab() == this.panelBodyChFee) {
if (this.storeListDr.getCount() == 0) {
return;
}
var sortstr = ' B.OPDATE,B.CUSTNO';
if (this.bslistdrsortfield != '' && this.bslistdrsortdire != '') {
sortstr = this.bslistdrsortfield + ' ' + this.bslistdrsortdire;
}
Ext.Msg.wait(Zi.LAN.HandlingDataAndWait);//'正在组织数据, 请稍侯..'
Ext.Ajax.request({
waitMsg: Zi.LAN.HandlingData,//'正在组织数据...'
url: '/MvcShipping/MsRptFeeSettleStatus/BsListData',
scope: this,
params: {
start: 0, limit: this.PageSize,
condition: _this.sqlcontext,
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 = 'MsRptFeeSettleStatusLISTDR';
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: Zi.LAN.E, msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
//
}
} else {
Ext.Msg.show({ title: Zi.LAN.Retry ,
msg: Zi.LAN.ServerResponseError,
icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK
});
}
}
});
} else if (this.tabpanel.activeTab == this.panelCustSum) {
if (this.storeCustList.getCount() == 0) {
return;
}
var sortstr = ' F.CUSTOMERNAME';
if (this.custsumsortfield != '' && this.custsumsortdire != '') {
sortstr = this.custsumsortfield + ' ' + this.custsumsortdire;
}
Ext.Msg.wait(Zi.LAN.HandlingDataAndWait);//'正在组织数据, 请稍侯..'
Ext.Ajax.request({
waitMsg: Zi.LAN.HandlingData,//'正在组织数据...'
url: '/MvcShipping/MsRptFeeSettleStatus/CustListData',
scope: this,
params: {
start: 0, limit: this.PageSize,
condition: _this.sqlcontext,
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 = 'MsRptFeeSettleStatusCUST';
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: Zi.LAN.E, msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
//
}
} else {
Ext.Msg.show({ title: Zi.LAN.Retry ,
msg: Zi.LAN.ServerResponseError,
icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK
});
}
}
});
} else if (this.tabpanel.activeTab == this.panelFeeListDr) {
if (this.storeFeeListDr.getCount() == 0) {
return;
}
var sortstr = ' F.CUSTOMERNAME,B.OPDATE';
if (this.feelistdrsortfield != '' && this.feelistdrsortdire != '') {
sortstr = this.feelistdrsortfield + ' ' + this.feelistdrsortdire;
}
Ext.Msg.wait(Zi.LAN.HandlingDataAndWait);//'正在组织数据, 请稍侯..'
Ext.Ajax.request({
waitMsg: Zi.LAN.HandlingData,//'正在组织数据...'
url: '/MvcShipping/MsRptFeeSettleStatus/FeeListData',
scope: this,
params: {
start: 0, limit: this.PageSize,
condition: _this.sqlcontext,
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 = 'MsRptFeeSettleStatusFEELISTDR';
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: Zi.LAN.E, msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
//
}
} else {
Ext.Msg.show({ title: Zi.LAN.Retry ,
msg: Zi.LAN.ServerResponseError,
icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK
});
}
}
});
}
}
});