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/MsRptNoTotal/MsRptNoTotalIndex.js

8429 lines
356 KiB
JavaScript

//欠费统计
Ext.namespace('Shipping');
Shipping.MsRptNoTotalIndex = function (config) {
Ext.applyIf(this, config);
this.initUIComponents();
window.Shipping.MsRptNoTotalIndex.superclass.constructor.call(this);
};
var Pagenum = Ext.create('Ext.form.field.Number',
{
name: 'bottles',
fieldLabel: Zi.LAN.bottles,
labelAlign: 'right',
value: 500,
maxValue: 100000,
width: 170,
minValue: 0
});
Ext.extend(Shipping.MsRptNoTotalIndex, Ext.Panel, {
PageSize: 50,
OprationStatus: null, //仅当弹出界面时使用
SelectedRecord: null,
sqlcontext: '1=2',
bslistdrsortfield: '',
bslistdrsortdire: '',
bslistcrsortfield: '',
bslistcrsortdire: '',
feelistdrsortfield: '',
feelistdrsortdire: '',
feelistcrsortfield: '',
feelistcrsortdire: '',
salesumsortfield: '',
salesumsortdire: '',
custsumsortfield: '',
custsumsortdire: '',
salecustsumsortfield: '',
salecustsumsortdire: '',
vesselsumsortfield: '',
vesselsumsortdire: '',
bNoDrCr: '00',
initUIComponents: function () {
//定义数据集
this.formname = 'MsRptNoTotalIndex';
this.sqlcontext = '1=2';
this.isquery = false;
this.NORPTSTLDATETYPE = 0;
Ext.Ajax.timeout = 120000;
this.storectndisp = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CtnDispModel',
proxy: { url: '/CommMng/BasicDataRef/GetCtnDisp' }
});
this.storeListDr = Ext.create('Ext.data.Store', {
pageSize: this.PageSize,
fields: [
{ name: 'BSNO', type: 'string' },
{ name: 'OPLB', type: 'string' },
{ name: 'OPLBNAME', type: 'string' },
{ name: 'ORDERNO', type: 'string' },
{ name: 'BSTYPE', type: 'string' },
{ name: 'OPTYPE', 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: 'ETA', type: 'string' },
{ name: 'ATD', type: 'string' },
{ name: 'ACTUALDAY', type: 'number' },
{ name: 'NODAY', type: 'number' },
{ name: 'CONTRACTDAY', type: 'string' },
{ name: 'DELIVERYDATE', type: 'string' },
{ name: 'STLNAME', type: 'string' },
{ name: 'STLDATE', type: 'string' },
{ name: 'VESSEL', type: 'string' },
{ name: 'VOYNO', type: 'string' },
{ name: 'YARD', type: 'string' },
{ name: 'INPUTBY', type: 'string' },
{ name: 'CREATETIME', type: 'string' },
{ name: 'BSSTATUSREF', type: 'string' },
{ name: 'FEESTATUSREF', type: 'string' },
{ name: 'DRFEESTATUSREF', type: 'string' },
{ name: 'CRFEESTATUSREF', type: 'string' },
{ name: 'BLISSUESTATUS', 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: 'DESTINATION', type: 'string' },
{ name: 'CUSTOMNO', type: 'string' },
{ name: 'ACCDATE', type: 'string' },
{ name: 'CARRIER', type: 'string' },
{ name: 'BSSOURCE', type: 'string' },
{ name: 'BSSOURCEDETAIL', 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: 'SERVICECONTRACTNO', type: 'string' },
{ name: 'ENTERP', type: 'string' },
{ name: 'AGENTID', type: 'string' },
{ name: 'REMARK', type: 'string' },
{ name: 'NETWEIGHT', type: 'number' },
{ name: 'KGS', type: 'number' },
{ name: 'TEU', type: 'number' },
{ name: 'CNTR1', type: 'number' },
{ name: 'CNTR2', type: 'number' },
{ name: 'CNTR3', type: 'number' },
{ name: 'CNTR4', type: 'number' },
{ name: 'CNTR5', type: 'number' },
{ name: 'CNTR6', type: 'number' },
{ name: 'CNTR7', type: 'number' },
{ name: 'CNTR8', type: 'number' },
{ name: 'CNTR9', type: 'number' },
{ name: 'CNTR10', type: 'number' },
{ name: 'OTCNTR', type: 'number' },
{ name: 'PKGS', type: 'number' },
{ name: 'CBM', type: 'number' },
{ name: 'CUSTNAME', type: 'string' },
{ name: 'CUSTFULLNAME', type: 'string' },
{ name: 'INVOICENO', type: 'string' },
{ name: 'SALECORP', 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: 'INVUSD', type: 'number' },
{ name: 'INVRMB', type: 'number' },
{ name: 'STLTTLDR', type: 'number' },
{ name: 'STLTTLCR', type: 'number' },
{ name: 'BALTTLDR', type: 'number' },
{ name: 'BALTTLCR', type: 'number' },
{ name: 'ORDERRMBDR', type: 'number' },
{ name: 'ORDERRMBCR', type: 'number' },
{ name: 'ORDERUSDDR', type: 'number' },
{ name: 'ORDERUSDCR', type: 'number' },
{ name: 'ORDEROTDR', type: 'number' },
{ name: 'ORDEROTCR', type: 'number' },
{ name: 'ORDERTTLDR', type: 'number' },
{ name: 'ORDERTTLCR', type: 'number' },
{ name: 'PROFITRATE', type: 'string' }
],
remoteSort: true,
proxy: {
type: 'ajax',
url: '/MvcShipping/MsRptNoTotal/BsListData',
timeout: 120000,
reader: {
id: '',
root: 'data',
totalProperty: 'totalCount'
}
}
});
//定义Grid
this.initgirdcolumsdr = [{
sortable: true,
dataIndex: 'BSNO',
header: '编号',
hidden: true,
width: 130
}, {
sortable: true,
dataIndex: 'CUSTNAME',
header: Zi.LAN.CUSTNAME,
width: 80
}, {
sortable: true,
dataIndex: 'CUSTFULLNAME',
header: Zi.LAN.CUSTFULLNAME,
width: 120
}, {
sortable: true,
dataIndex: 'OPLBNAME',
header: Zi.LAN.OPLBNAME,
width: 70,
renderer: function (value, cellmeta) {
if (value == '海运出口') {
return Zi.LAN.HYCK;
} else if (value == '海运进口') {
return Zi.LAN.HYJK;
}
}
}, {
sortable: true,
dataIndex: 'BSTYPE',
header: Zi.LAN.BSTYPE,
width: 70,
renderer: function (value, cellmeta) {
if (value == '海运出口') {
return Zi.LAN.HYCK;
} else if (value == '海运进口') {
return Zi.LAN.HYJK;
}
}
}, {
sortable: true,
dataIndex: 'BLTYPE',
header: Zi.LAN.BLTYPE,
width: 70,
renderer: function (value, cellmeta) {
if (value == '整箱') {
return Zi.LAN.ZHENGXIANG;
} else if (value == '拼箱单票') {
return Zi.LAN.PINXIANGDANPIAO;
} else if (value == '拼箱分票') {
return Zi.LAN.PINXIANGFENPIAO;
} else if (value == '拼箱主票') {
return Zi.LAN.PINXIANGZHUPIAO;
} else if (value == '合票主票') {
return Zi.LAN.HEPIAOZHUPIAO;
} else if (value == '合票分票') {
return Zi.LAN.HEPIAOFENPIAO;
}
}
}, {
sortable: true,
dataIndex: 'OPTYPE',
header: Zi.LAN.OPTYPE,
width: 70,
renderer: function (value, meta) {
if (value == '普通货')
return Zi.LAN.PUTONGHUO; //是
else
return Zi.LAN.GENGGAIDAN;
}
}, {
sortable: true,
dataIndex: 'OPDATE',
header: Zi.LAN.OPDATE,
width: 86
}, {
sortable: true,
dataIndex: 'CUSTOMDATE',
header: Zi.LAN.CUSTOMDATE,
width: 86
}, {
sortable: true,
dataIndex: 'SERVICECONTRACTNO',
header: Zi.LAN.SERVICECONTRACTNO,
width: 86
}, {
sortable: true,
dataIndex: 'ACTUALDAY',
header: Zi.LAN.ACTUALDAY,
width: 60
}, {
sortable: true,
dataIndex: 'NODAY',
header: Zi.LAN.NODAY,
width: 86
}, {
sortable: true,
dataIndex: 'CONTRACTDAY',
header: Zi.LAN.CONTRACTDAY,
width: 86,
renderer: function (value, meta) {
if (value == '') { value = '0' } else value;
return value;
}
}, {
sortable: true,
dataIndex: 'STLDATE',
header: Zi.LAN.STLDATE,
width: 86
}, {
sortable: true,
dataIndex: 'STLNAME',
header: Zi.LAN.STLNAME,
width: 86
}, {
sortable: true,
dataIndex: 'CUSTOMERNAME',
header: Zi.LAN.CUSTOMERNAME,
width: 120
}, {
sortable: true,
dataIndex: 'CUSTNO',
header: Zi.LAN.CUSTNO,
width: 136
}, {
sortable: true,
dataIndex: 'FEESTATUSREF',
header: Zi.LAN.FEESTATUSREF,
width: 68,
renderer: function (value, meta) {
if (value == '锁定')
return Zi.LAN.LOCK; //是
else
return Zi.LAN.UNLOCK;
}
},
{
sortable: true,
id: '',
dataIndex: 'DRFEESTATUSREF',
header: Zi.LAN.DRFEESTATUSREF,
align: 'center',
width: 60,
renderer: function (value, meta) {
if (value == '审核通过') {
meta.tdCls = 'feestatus_pass';
value = Zi.LAN.SHENHETONGGUO;
} else if (value == '录入状态') {
value = Zi.LAN.LURUZHUAGNTAI;
} else if (value == '提交审核') {
meta.tdCls = 'feestatus_refer';
value = Zi.LAN.TIJIAOSHENHE;
} else if (value == '部分结算') {
meta.tdCls = 'feestatus_settlepart';
value = Zi.LAN.BUFENJIESUAN;
} else if (value == '结算完毕') {
meta.tdCls = 'feestatus_settle';
value = Zi.LAN.JIESUANWANBI;
} else if (value == '未录入') {
value = Zi.LAN.WEILURU;
} else if (value == '部分审核') {
meta.tdCls = 'feestatus_refer';
value = Zi.LAN.BUFENSHENHE;
} else if (value == '部分提交') {
meta.tdCls = 'feestatus_refer';
value = Zi.LAN.BUFENTIJIAO;
} else if (value == '驳回提交') {
meta.tdCls = 'feestatus_nopass';
value = Zi.LAN.BOHUITIJIAO;
} else if (value == '部分录入') {
value = Zi.LAN.BUFENLURU;
}
return value;
}
},
{
sortable: true,
id: '',
dataIndex: 'CRFEESTATUSREF',
header: Zi.LAN.CRFEESTATUSREF,
align: 'center',
width: 60,
renderer: function (value, meta) {
if (value == '审核通过') {
meta.tdCls = 'feestatus_pass';
value = Zi.LAN.SHENHETONGGUO;
} else if (value == '录入状态') {
value = Zi.LAN.LURUZHUAGNTAI;
} else if (value == '提交审核') {
meta.tdCls = 'feestatus_refer';
value = Zi.LAN.TIJIAOSHENHE;
} else if (value == '部分结算') {
meta.tdCls = 'feestatus_settlepart';
value = Zi.LAN.BUFENJIESUAN;
} else if (value == '结算完毕') {
meta.tdCls = 'feestatus_settle';
value = Zi.LAN.JIESUANWANBI;
} else if (value == '未录入') {
value = Zi.LAN.WEILURU;
} else if (value == '部分审核') {
meta.tdCls = 'feestatus_refer';
value = Zi.LAN.BUFENSHENHE;
} else if (value == '部分提交') {
meta.tdCls = 'feestatus_refer';
value = Zi.LAN.BUFENTIJIAO;
} else if (value == '驳回提交') {
meta.tdCls = 'feestatus_nopass';
value = Zi.LAN.BOHUITIJIAO;
} else if (value == '部分录入') {
value = Zi.LAN.BUFENLURU;
}
return value;
}
}, {
sortable: true,
dataIndex: 'ENTERP',
header: Zi.LAN.ENTERP,
width: 100
}, {
sortable: true,
dataIndex: 'FORWARDER',
header: Zi.LAN.FORWARDER,
width: 100
}, {
sortable: true,
dataIndex: 'MBLNO',
header: Zi.LAN.MBLNO,
width: 120
}, {
sortable: true,
dataIndex: 'HBLNO',
header: Zi.LAN.HBLNO,
width: 120
}, {
sortable: true,
dataIndex: 'ORDERNO',
header: Zi.LAN.ORDERNO,
width: 120
}, {
sortable: true,
dataIndex: 'SALECORP',
header: Zi.LAN.SALECORP,
width: 120
}, {
sortable: true,
dataIndex: 'ETD',
header: Zi.LAN.ETD,
width: 86
}, {
sortable: true,
dataIndex: 'ETA',
header: Zi.LAN.ETA,
width: 86
}, {
sortable: true,
dataIndex: 'ATD',
header: 'ATD',
width: 86
}, {
sortable: true,
dataIndex: 'VESSEL',
header: Zi.LAN.VESSEL,
width: 200
}, {
sortable: true,
dataIndex: 'VOYNO',
header: Zi.LAN.VOYNO,
width: 50
}, {
sortable: true,
dataIndex: 'SALE',
header: Zi.LAN.SALE,
width: 80
}, {
sortable: true,
dataIndex: 'OP',
header: Zi.LAN.OP,
width: 80
}, {
sortable: true,
dataIndex: 'CUSTSERVICE',
header: Zi.LAN.CUSTSERVICE,
width: 80
}, {
sortable: true,
dataIndex: 'PORTLOAD',
header: Zi.LAN.PORTLOAD,
width: 80
}, {
sortable: true,
dataIndex: 'PORTDISCHARGE',
header: Zi.LAN.PORTDISCHARGE,
width: 150
}, {
sortable: true,
dataIndex: 'DESTINATION',
header: Zi.LAN.DESTINATION,
width: 150
}, {
sortable: true,
dataIndex: 'LANE',
header: Zi.LAN.LANE,
width: 150
}, {
sortable: true,
dataIndex: 'ACCDATE',
header: Zi.LAN.ACCDATE,
width: 80
}, {
sortable: true,
dataIndex: 'CARRIER',
header: Zi.LAN.CARRIER,
width: 80
}, {
sortable: true,
dataIndex: 'AGENTID',
header: Zi.LAN.AGENTID,
width: 80
}, {
sortable: true,
dataIndex: 'BLISSUESTATUS',
header: Zi.LAN.BLISSUESTATUS,
width: 80
}, {
sortable: true,
dataIndex: 'YARD',
header: Zi.LAN.YARD,
width: 80
}, {
sortable: true,
dataIndex: 'BSSOURCE',
header: Zi.LAN.BSSOURCE,
width: 120
}, {
sortable: true,
dataIndex: 'BSSOURCEDETAIL',
header: Zi.LAN.BSSOURCEDETAIL,
width: 120
}, {
sortable: true,
dataIndex: 'CNTRTOTAL',
header: Zi.LAN.CNTRTOTAL,
width: 120
}, {
sortable: true,
dataIndex: 'REMARK',
header: Zi.LAN.REMARK,
width: 60
}, {
sortable: true,
dataIndex: 'PKGS',
header: Zi.LAN.PKGS,
width: 80
}, {
sortable: true,
dataIndex: 'CBM',
header: Zi.LAN.CBM,
width: 80
}, {
sortable: true,
dataIndex: 'TEU',
header: 'TEU',
width: 80
}, {
sortable: true,
dataIndex: 'KGS',
header: 'KGS',
width: 80
},
{
sortable: true,
id: '',
dataIndex: 'CNTR1',
text: '箱型1',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'CNTR2',
text: '箱型2',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'CNTR3',
text: '箱型3',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'CNTR4',
text: '箱型4',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'CNTR5',
text: '箱型5',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'CNTR6',
text: '箱型6',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'CNTR7',
text: '箱型7',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'CNTR8',
text: '箱型8',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'CNTR9',
text: '箱型9',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'CNTR10',
text: '箱型10',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'OTCNTR',
text: Zi.LAN.OTCNTR,
width: 60
}, {
sortable: true,
dataIndex: 'GOODSNAME',
header: Zi.LAN.GOODSNAME,
width: 80
}, {
sortable: true,
dataIndex: 'INVOICENO',
header: Zi.LAN.INVOICENO,
width: 80
}, {
sortable: true,
dataIndex: 'DELIVERYDATE',
header: Zi.LAN.DELIVERYDATE,
width: 80
}, {
sortable: true,
dataIndex: 'RMBDR',
header: Zi.LAN.RMBDR ,
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,
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: Zi.LAN.RMBNODR,
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: 'ORDERRMBDR',
header: Zi.LAN.ORDERRMBDR,
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: Zi.LAN.USDDR,
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,
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: Zi.LAN.USDNODR,
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: 'ORDERUSDDR',
header: Zi.LAN.ORDERUSDDR ,
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: Zi.LAN.OTDR ,
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 ,
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: Zi.LAN.OTNODR,
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: 'ORDEROTDR',
header: Zi.LAN.ORDEROTDR,
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: Zi.LAN.TTLDR,
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,
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: Zi.LAN.TTLNODR,
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: 'ORDERTTLDR',
header: Zi.LAN.ORDERTTLDR,
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: Zi.LAN.INVRMB ,
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: Zi.LAN.INVUSD ,
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: 'PROFITRATE',
header: Zi.LAN.PROFITRATE,
width: 80,
renderer: function (value, meta) {
if (value != 0) value = value + '%';
return value;
}
}
];
this.girdcolumsdr = DsTruck.GetGridPanel(USERID, this.formname + 'dr', this.initgirdcolumsdr, 1);
this.PagenumDr = Ext.create('Ext.form.field.Number', {
name: 'bottles',
fieldLabel: Zi.LAN.bottles,
labelAlign: 'right',
value: this.PageSize,
maxValue: 100000,
width: 180,
minValue: 0,
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
});
this.gridListDr = new Ext.grid.GridPanel({
store: this.storeListDr,
enableHdMenu: false,
region: 'center',
loadMask: { msg: Zi.LAN.ShuJuJiaZaiZhongQingShaoDeng },
trackMouseOver: true,
disableSelection: false,
viewConfig: {
enableTextSelection: true,
autoFill: true,
getRowClass: function (record, rowIndex, rowParams, store) {
var NODAY = record.get('NODAY');
if (NODAY > 0){
return '样本6';
}
}
},
columns: this.girdcolumsdr,
// paging bar on the bottom
bbar: [Ext.create('Ext.PagingToolbar', {
store: this.storeListDr,
displayInfo: true,
displayMsg: Zi.LAN.displayMsg,
emptyMsg: Zi.LAN.emptyMsg
}), this.PagenumDr]
});
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);
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: 'OPTYPE', type: 'string' },
{ name: 'CUSTOMERNAME', type: 'string' },
{ name: 'CUSTNO', type: 'string' },
{ name: 'MBLNO', type: 'string' },
{ name: 'HBLNO', type: 'string' },
{ name: 'ORDERNO', 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: 'SALECORP', type: 'string' },
{ name: 'LANE', type: 'string' },
{ name: 'YARD', type: 'string' },
{ name: 'BLISSUESTATUS', 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: 'ENTEROPERATORREF', type: 'string' },
{ name: 'FeeType_Ref', type: 'string' },
{ name: 'FEENAME', type: 'string' },
{ name: 'UNIT', type: 'string' },
{ name: 'CURRENCY', type: 'string' },
{ name: 'INPUTMODE', type: 'string' },
{ name: 'REMARK', type: 'string' },
{ name: 'INVOICENUM', type: 'string' },
{ name: 'DEBITNO', 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: 'NOACCTAXAMOUNT', type: 'number' },
{ name: 'ACCTAX', type: 'number' },
{ name: 'SETTLEMENT', type: 'number' },
{ name: 'NOSTLAMOUNT', type: 'number' },
{ name: 'INVOICE', type: 'number' }
],
remoteSort: true,
proxy: {
type: 'ajax',
url: '/MvcShipping/MsRptNoTotal/FeeListData',
timeout: 120000,
reader: {
id: '',
root: 'data',
totalProperty: 'totalCount'
}
}
});
//定义Grid
this.initgirdcolumsfeedr = [{
sortable: true,
dataIndex: 'BSNO',
header: '编号',
hidden: true,
width: 130
}, {
sortable: true,
dataIndex: 'CUSTNAME',
header: Zi.LAN.CUSTNAME,
width: 60
}, {
sortable: true,
dataIndex: 'CUSTFULLNAME',
header: Zi.LAN.CUSTFULLNAME,
width: 120
}, {
sortable: true,
dataIndex: 'OPLBNAME',
header: Zi.LAN.OPLBNAME,
width: 70,
renderer: function (value, cellmeta) {
if (value == '海运出口') {
return Zi.LAN.HYCK;
} else if (value == '海运进口') {
return Zi.LAN.HYJK;
}
}
}, {
sortable: true,
dataIndex: 'BSTYPE',
text: Zi.LAN.BSTYPE,
width: 70,
renderer: function (value, cellmeta) {
if (value == '海运出口') {
return Zi.LAN.HYCK;
} else if (value == '海运进口') {
return Zi.LAN.HYJK;
}
}
}, {
sortable: true,
dataIndex: 'OPTYPE',
text: Zi.LAN.OPTYPE,
width: 70,
renderer: function (value, meta) {
if (value == '普通货')
return Zi.LAN.PUTONGHUO; //是
else
return Zi.LAN.GENGGAIDAN;
}
}, {
sortable: true,
dataIndex: 'OPDATE',
header: Zi.LAN.OPDATE,
width: 86
}, {
sortable: true,
dataIndex: 'CUSTOMDATE',
header: Zi.LAN.CUSTOMDATE,
width: 86
},
{
sortable: true,
dataIndex: 'CUSTOMERNAME',
header: Zi.LAN.CUSTOMERNAME,
width: 120
}, {
sortable: true,
dataIndex: 'CUSTNO',
header: Zi.LAN.CUSTNO,
width: 136
}, {
sortable: true,
dataIndex: 'ENTERP',
header: Zi.LAN.ENTERP,
width: 100
}, {
sortable: true,
dataIndex: 'MBLNO',
header: Zi.LAN.MBLNO,
width: 120
}, {
sortable: true,
dataIndex: 'HBLNO',
header: Zi.LAN.HBLNO,
width: 120
}, {
sortable: true,
dataIndex: 'ORDERNO',
header: Zi.LAN.ORDERNO,
width: 120
}, {
sortable: true,
dataIndex: 'ETD',
header: Zi.LAN.ETD,
width: 86
}, {
sortable: true,
dataIndex: 'VESSEL',
header: Zi.LAN.VESSEL ,
width: 200
}, {
sortable: true,
dataIndex: 'VOYNO',
header: Zi.LAN.VOYNO,
width: 50
}, {
sortable: true,
dataIndex: 'SALE',
header: Zi.LAN.SALE,
width: 80
}, {
sortable: true,
dataIndex: 'OP',
header: Zi.LAN.OP,
width: 80
}, {
sortable: true,
dataIndex: 'CUSTSERVICE',
header: Zi.LAN.CUSTSERVICE,
width: 80
}, {
sortable: true,
dataIndex: 'PORTLOAD',
header: Zi.LAN.PORTLOAD,
width: 80
}, {
sortable: true,
dataIndex: 'PORTDISCHARGE',
header: Zi.LAN.PORTDISCHARGE,
width: 150
}, {
sortable: true,
dataIndex: 'ACCDATE',
header: Zi.LAN.ACCDATE,
width: 80
}, {
sortable: true,
dataIndex: 'CARRIER',
header: Zi.LAN.CARRIER,
width: 80
}, {
sortable: true,
dataIndex: 'BLISSUESTATUS',
header: Zi.LAN.BLISSUESTATUS,
width: 80
}, {
sortable: true,
dataIndex: 'YARD',
header: Zi.LAN.YARD,
width: 80
}, {
sortable: true,
dataIndex: 'LANE',
header: Zi.LAN.LANE,
width: 80
}, {
sortable: true,
dataIndex: 'BSSOURCE',
header: Zi.LAN.BSSOURCE,
width: 120
}, {
sortable: true,
dataIndex: 'TEU',
header: 'TEU',
width: 80
}, {
sortable: true,
dataIndex: 'KGS',
header: 'KGS',
width: 80
}, {
sortable: true,
dataIndex: 'GOODSNAME',
header: Zi.LAN.GOODSNAME,
width: 80
}, {
sortable: true,
dataIndex: 'FeeType_Ref',
header: Zi.LAN.FeeType_Ref,
width: 60
}, {
sortable: true,
dataIndex: 'FEENAME',
header: Zi.LAN.FEENAME,
width: 60
}, {
sortable: true,
dataIndex: 'UNITPRICE',
header: Zi.LAN.UNITPRICE,
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: Zi.LAN.QUANTITY,
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: Zi.LAN.UNIT,
width: 60
}, {
sortable: true,
dataIndex: 'CURRENCY',
header: Zi.LAN.CURRENCY,
width: 60
}, {
sortable: true,
dataIndex: 'EXCHANGERATE',
header: Zi.LAN.EXCHANGERATE,
// 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: Zi.LAN.TAXRATE,
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: Zi.LAN.NOTAXAMOUNT,
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: Zi.LAN.AMOUNT,
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: Zi.LAN.ACCTAXRATE ,
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: 'NOACCTAXAMOUNT',
header: Zi.LAN.NOACCTAXAMOUNT2,
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: 'ACCTAX',
header: Zi.LAN.TTLTAXDR ,
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: Zi.LAN.SETTLEMENT,
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: 'NOSTLAMOUNT',
header: Zi.LAN.NOSTLAMOUNT,
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: 'ORDERAMOUNT',
header: Zi.LAN.ORDERAMOUNT,
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: Zi.LAN.INV,
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: 'DEBITNO',
header: Zi.LAN.DEBITNO,
width: 60
}, {
sortable: true,
dataIndex: 'INPUTMODE',
header: Zi.LAN.INPUTMODE,
width: 60
}, {
sortable: true,
dataIndex: 'ENTEROPERATORREF',
header: Zi.LAN.ENTEROPERATORREF,
width: 60
}, {
sortable: true,
dataIndex: 'SALECORP',
header: Zi.LAN.SALECORP,
width: 120
}, {
sortable: true,
dataIndex: 'INVOICENUM',
header: Zi.LAN.INVOICENO,
width: 60,
renderer: function (value, meta, record) {
var openSet = "height=300, width=750, toolbar=no, menubar=no,scrollbars=1, resizable=1,location=no, status=no,Top= " + (screen.height - 350) / 2 + ",Left= " + (screen.width - 700) / 2
var openType = "_blank";
var openUrl = "";
openUrl = "../../Account/Chfee_invoice/DetailView?handle=check&bsno=" + record.data.INVOICENUM;
var winstr = "window.open(this.href,'" + openType + "','" + openSet + "')";
value = '<a href="' + openUrl + '" onclick="' + winstr + ';return false">'+value+'</a>'
return value;
}
}, {
sortable: true,
dataIndex: 'REMARK',
header: Zi.LAN.REMARK ,
width: 60
}
];
this.girdcolumsfeedr = DsTruck.GetGridPanel(USERID, this.formname + 'feedr', this.initgirdcolumsfeedr, 1);
this.PagenumFeeDr = Ext.create('Ext.form.field.Number', {
name: 'bottles',
fieldLabel: Zi.LAN.bottles,
labelAlign: 'right',
value: this.PageSize,
maxValue: 100000,
width: 180,
minValue: 0,
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
});
this.gridFeeListDr = new Ext.grid.GridPanel({
store: this.storeFeeListDr,
enableHdMenu: false,
region: 'center',
loadMask: { msg: Zi.LAN.ShuJuJiaZaiZhongQingShaoDeng},
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,
emptyMsg: Zi.LAN.emptyMsg
}), this.PagenumFeeDr]
});
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);
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: 'OPTYPE', type: 'string' },
{ name: 'ORDERNO', type: 'string' },
{ name: 'CUSTOMERNAME', type: 'string' },
{ name: 'CUSTNO', type: 'string' },
{ name: 'MBLNO', type: 'string' },
{ name: 'HBLNO', type: 'string' },
{ name: 'ETD', type: 'string' },
{ name: 'ETA', type: 'string' },
{ name: 'ATD', type: 'string' },
{ name: 'ACTUALDAY', type: 'number' },
{ name: 'NODAY', type: 'number' },
{ name: 'CONTRACTDAY', type: 'string' },
{ name: 'DELIVERYDATE', type: 'string' },
{ name: 'STLNAME', type: 'string' },
{ name: 'STLDATE', type: 'string' },
{ name: 'VESSEL', type: 'string' },
{ name: 'VOYNO', type: 'string' },
{ name: 'YARD', type: 'string' },
{ name: 'INPUTBY', type: 'string' },
{ name: 'CREATETIME', type: 'string' },
{ name: 'BSSTATUS', type: 'string' },
{ name: 'FEESTATUSREF', type: 'string' },
{ name: 'DRFEESTATUSREF', type: 'string' },
{ name: 'CRFEESTATUSREF', 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: 'DESTINATION', type: 'string' },
{ name: 'CUSTOMNO', type: 'string' },
{ name: 'ACCDATE', type: 'string' },
{ name: 'CARRIER', type: 'string' },
{ name: 'BSSOURCE', type: 'string' },
{ name: 'BSSOURCEDETAIL', type: 'string' },
{ name: 'BLISSUESTATUS', 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: 'SERVICECONTRACTNO', type: 'string' },
{ name: 'ENTERP', type: 'string' },
{ name: 'SALECORP', type: 'string' },
{ name: 'REMARK', type: 'string' },
{ name: 'NETWEIGHT', type: 'number' },
{ name: 'KGS', type: 'number' },
{ name: 'TEU', type: 'number' },
{ name: 'CNTR1', type: 'number' },
{ name: 'CNTR2', type: 'number' },
{ name: 'CNTR3', type: 'number' },
{ name: 'CNTR4', type: 'number' },
{ name: 'CNTR5', type: 'number' },
{ name: 'CNTR6', type: 'number' },
{ name: 'CNTR7', type: 'number' },
{ name: 'CNTR8', type: 'number' },
{ name: 'CNTR9', type: 'number' },
{ name: 'CNTR10', type: 'number' },
{ name: 'OTCNTR', type: 'number' },
{ name: 'PKGS', type: 'number' },
{ name: 'CBM', type: 'number' },
{ name: 'CUSTNAME', type: 'string' },
{ name: 'CUSTFULLNAME', type: 'string' },
{ name: 'INVOICENO', 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' },
{ name: 'ORDERRMBDR', type: 'number' },
{ name: 'ORDERRMBCR', type: 'number' },
{ name: 'ORDERUSDDR', type: 'number' },
{ name: 'ORDERUSDCR', type: 'number' },
{ name: 'ORDEROTDR', type: 'number' },
{ name: 'ORDEROTCR', type: 'number' },
{ name: 'ORDERTTLDR', type: 'number' },
{ name: 'ORDERTTLCR', type: 'number' },
{ name: 'PROFITRATE', type: 'string' }
],
remoteSort: true,
proxy: {
type: 'ajax',
url: '/MvcShipping/MsRptNoTotal/BsListData',
timeout: 120000,
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: Zi.LAN.CUSTNAME,
width: 80
}, {
sortable: true,
dataIndex: 'CUSTFULLNAME',
header: Zi.LAN.CUSTFULLNAME,
width: 120
}, {
sortable: true,
dataIndex: 'OPLBNAME',
header: Zi.LAN.OPLBNAME,
width: 70,
renderer: function (value, cellmeta) {
if (value == '海运出口') {
return Zi.LAN.HYCK;
} else if (value == '海运进口') {
return Zi.LAN.HYJK;
}
}
}, {
sortable: true,
dataIndex: 'BSTYPE',
header: Zi.LAN.BSTYPE,
width: 70,
renderer: function (value, cellmeta) {
if (value == '海运出口') {
return Zi.LAN.HYCK;
} else if (value == '海运进口') {
return Zi.LAN.HYJK;
}
}
}, {
sortable: true,
dataIndex: 'OPTYPE',
header: Zi.LAN.OPTYPE,
width: 70,
renderer: function (value, meta) {
if (value == '普通货')
return Zi.LAN.PUTONGHUO; //是
else
return Zi.LAN.GENGGAIDAN;
}
}, {
sortable: true,
dataIndex: 'FEESTATUSREF',
header: Zi.LAN.FEESTATUSREF,
width: 68,
renderer: function (value, meta) {
if (value == '锁定')
return Zi.LAN.LOCK; //是
else
return Zi.LAN.UNLOCK;
}
},
{
sortable: true,
id: '',
dataIndex: 'DRFEESTATUSREF',
header: Zi.LAN.DRFEESTATUSREF,
align: 'center',
width: 60,
renderer: function (value, meta) {
if (value == '审核通过') {
meta.tdCls = 'feestatus_pass';
value = Zi.LAN.SHENHETONGGUO;
} else if (value == '录入状态') {
value = Zi.LAN.LURUZHUAGNTAI;
} else if (value == '提交审核') {
meta.tdCls = 'feestatus_refer';
value = Zi.LAN.TIJIAOSHENHE;
} else if (value == '部分结算') {
meta.tdCls = 'feestatus_settlepart';
value = Zi.LAN.BUFENJIESUAN;
} else if (value == '结算完毕') {
meta.tdCls = 'feestatus_settle';
value = Zi.LAN.JIESUANWANBI;
} else if (value == '未录入') {
value = Zi.LAN.WEILURU;
} else if (value == '部分审核') {
meta.tdCls = 'feestatus_refer';
value = Zi.LAN.BUFENSHENHE;
} else if (value == '部分提交') {
meta.tdCls = 'feestatus_refer';
value = Zi.LAN.BUFENTIJIAO;
} else if (value == '驳回提交') {
meta.tdCls = 'feestatus_nopass';
value = Zi.LAN.BOHUITIJIAO;
} else if (value == '部分录入') {
value = Zi.LAN.BUFENLURU;
}
return value;
}
},
{
sortable: true,
id: '',
dataIndex: 'CRFEESTATUSREF',
header: Zi.LAN.CRFEESTATUSREF,
align: 'center',
width: 60,
renderer: function (value, meta) {
if (value == '审核通过') {
meta.tdCls = 'feestatus_pass';
value = Zi.LAN.SHENHETONGGUO;
} else if (value == '录入状态') {
value = Zi.LAN.LURUZHUAGNTAI;
} else if (value == '提交审核') {
meta.tdCls = 'feestatus_refer';
value = Zi.LAN.TIJIAOSHENHE;
} else if (value == '部分结算') {
meta.tdCls = 'feestatus_settlepart';
value = Zi.LAN.BUFENJIESUAN;
} else if (value == '结算完毕') {
meta.tdCls = 'feestatus_settle';
value = Zi.LAN.JIESUANWANBI;
} else if (value == '未录入') {
value = Zi.LAN.WEILURU;
} else if (value == '部分审核') {
meta.tdCls = 'feestatus_refer';
value = Zi.LAN.BUFENSHENHE;
} else if (value == '部分提交') {
meta.tdCls = 'feestatus_refer';
value = Zi.LAN.BUFENTIJIAO;
} else if (value == '驳回提交') {
meta.tdCls = 'feestatus_nopass';
value = Zi.LAN.BOHUITIJIAO;
} else if (value == '部分录入') {
value = Zi.LAN.BUFENLURU;
}
return value;
}
}, {
sortable: true,
dataIndex: 'OPDATE',
header: Zi.LAN.OPDATE,
width: 86
}, {
sortable: true,
dataIndex: 'CUSTOMDATE',
header: Zi.LAN.CUSTOMDATE,
width: 86
}, {
sortable: true,
dataIndex: 'ACTUALDAY',
header: Zi.LAN.ACTUALDAY,
width: 60
}, {
sortable: true,
dataIndex: 'NODAY',
header: Zi.LAN.NODAY,
width: 86
}, {
sortable: true,
dataIndex: 'STLDATE',
header: Zi.LAN.STLDATE,
width: 86
}, {
sortable: true,
dataIndex: 'STLNAME',
header: Zi.LAN.STLNAME,
width: 86
}, {
sortable: true,
dataIndex: 'CONTRACTDAY',
header: Zi.LAN.CONTRACTDAY,
width: 86,
renderer: function (value, meta) {
if (value == '') { value = '0' } else value;
return value;
}
}, {
sortable: true,
dataIndex: 'CUSTOMERNAME',
header: Zi.LAN.CUSTOMERNAME,
width: 120
}, {
sortable: true,
dataIndex: 'CUSTNO',
header: Zi.LAN.CUSTNO,
width: 136
}, {
sortable: true,
dataIndex: 'ENTERP',
header: Zi.LAN.ENTERP,
width: 100
}, {
sortable: true,
dataIndex: 'SERVICECONTRACTNO',
header: Zi.LAN.SERVICECONTRACTNO,
width: 86
}, {
sortable: true,
dataIndex: 'MBLNO',
header: Zi.LAN.MBLNO,
width: 120
}, {
sortable: true,
dataIndex: 'HBLNO',
header: Zi.LAN.HBLNO,
width: 120
}, {
sortable: true,
dataIndex: 'ORDERNO',
header: Zi.LAN.ORDERNO,
width: 120
}, {
sortable: true,
dataIndex: 'ETD',
header: Zi.LAN.ETD,
width: 86
}, {
sortable: true,
dataIndex: 'ETA',
header: Zi.LAN.ETA,
width: 86
}, {
sortable: true,
dataIndex: 'ATD',
header: 'ATD',
width: 86
}, {
sortable: true,
dataIndex: 'VESSEL',
header: Zi.LAN.VESSEL,
width: 200
}, {
sortable: true,
dataIndex: 'VOYNO',
header: Zi.LAN.VOYNO ,
width: 50
}, {
sortable: true,
dataIndex: 'SALE',
header: Zi.LAN.SALE,
width: 80
}, {
sortable: true,
dataIndex: 'OP',
header: Zi.LAN.OP,
width: 80
}, {
sortable: true,
dataIndex: 'CUSTSERVICE',
header: Zi.LAN.CUSTSERVICE,
width: 80
}, {
sortable: true,
dataIndex: 'PORTLOAD',
header: Zi.LAN.PORTLOAD,
width: 80
}, {
sortable: true,
dataIndex: 'PORTDISCHARGE',
header: Zi.LAN.PORTDISCHARGE,
width: 150
}, {
sortable: true,
dataIndex: 'DESTINATION',
header: Zi.LAN.DESTINATION,
width: 150
}, {
sortable: true,
dataIndex: 'ACCDATE',
header: Zi.LAN.ACCDATE,
width: 80
}, {
sortable: true,
dataIndex: 'BLISSUESTATUS',
header: Zi.LAN.BLISSUESTATUS,
width: 80
}, {
sortable: true,
dataIndex: 'CARRIER',
header: Zi.LAN.CARRIER,
width: 80
}, {
sortable: true,
dataIndex: 'YARD',
header: Zi.LAN.YARD,
width: 80
}, {
sortable: true,
dataIndex: 'BSSOURCE',
header: Zi.LAN.BSSOURCE,
width: 120
}, {
sortable: true,
dataIndex: 'BSSOURCEDETAIL',
header: Zi.LAN.BSSOURCEDETAIL,
width: 120
}, {
sortable: true,
dataIndex: 'DELIVERYDATE',
header: Zi.LAN.DELIVERYDATE,
width: 80
}, {
sortable: true,
dataIndex: 'CNTRTOTAL',
header: Zi.LAN.CNTRTOTAL,
width: 120
}, {
sortable: true,
dataIndex: 'REMARK',
header: Zi.LAN.REMARK,
width: 60
}, {
sortable: true,
dataIndex: 'SALECORP',
header: Zi.LAN.SALECORP,
width: 80
}, {
sortable: true,
dataIndex: 'PKGS',
header: Zi.LAN.PKGS ,
width: 80
}, {
sortable: true,
dataIndex: 'CBM',
header: Zi.LAN.CBM,
width: 80
}, {
sortable: true,
dataIndex: 'TEU',
header: 'TEU',
width: 80
}, {
sortable: true,
dataIndex: 'KGS',
header: 'KGS',
width: 80
},
{
sortable: true,
id: '',
dataIndex: 'CNTR1',
text: '箱型1',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'CNTR2',
text: '箱型2',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'CNTR3',
text: '箱型3',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'CNTR4',
text: '箱型4',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'CNTR5',
text: '箱型5',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'CNTR6',
text: '箱型6',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'CNTR7',
text: '箱型7',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'CNTR8',
text: '箱型8',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'CNTR9',
text: '箱型9',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'CNTR10',
text: '箱型10',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'OTCNTR',
text: Zi.LAN.OTCNTR,
width: 60
}, {
sortable: true,
dataIndex: 'GOODSNAME',
header: Zi.LAN.GOODSNAME,
width: 80
}, {
sortable: true,
dataIndex: 'INVOICENO',
header: Zi.LAN.INVOICENO,
width: 80
}, {
sortable: true,
dataIndex: 'RMBCR',
header: Zi.LAN.RMBCR,
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,
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: Zi.LAN.RMBNOCR,
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: 'ORDERRMBCR',
header: Zi.LAN.ORDERRMBCR,
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: Zi.LAN.USDCR,
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,
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: Zi.LAN.USDNOCR,
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: 'ORDERUSDCR',
header: Zi.LAN.ORDERUSDCR,
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: Zi.LAN.OTCR,
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,
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: Zi.LAN.OTNOCR,
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: 'ORDEROTCR',
header: Zi.LAN.ORDEROTCR,
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: Zi.LAN.TTLCR,
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,
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: Zi.LAN.TTLNOCR,
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: 'ORDERTTLCR',
header: Zi.LAN.ORDERTTLCR,
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: Zi.LAN.INVRMB,
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: Zi.LAN.INVUSD,
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: 'PROFITRATE',
header: Zi.LAN.PROFITRATE,
width: 80,
renderer: function (value, meta) {
if (value != 0) value = value + '%';
return value;
}
}
];
this.girdcolumscr = DsTruck.GetGridPanel(USERID, this.formname + 'cr', this.initgirdcolumscr, 1);
this.PagenumCr = Ext.create('Ext.form.field.Number', {
name: 'bottles',
fieldLabel: Zi.LAN.bottles,
labelAlign: 'right',
value: this.PageSize,
maxValue: 100000,
width: 180,
minValue: 0,
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
});
this.gridListCr = new Ext.grid.GridPanel({
store: this.storeListCr,
enableHdMenu: false,
region: 'center',
loadMask: { msg: Zi.LAN.ShuJuJiaZaiZhongQingShaoDeng},
trackMouseOver: true,
disableSelection: false,
viewConfig: {
enableTextSelection: true,
autoFill: true
},
columns: this.girdcolumscr,
// paging bar on the bottom
bbar: [Ext.create('Ext.PagingToolbar', {
store: this.storeListCr,
displayInfo: true,
displayMsg: Zi.LAN.displayMsg,
emptyMsg: Zi.LAN.emptyMsg
}), this.PagenumCr]
});
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: 'OPTYPE', type: 'string' },
{ name: 'ORDERNO', 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: 'SALECORP', 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: 'ENTEROPERATORREF', type: 'string' },
{ name: 'FeeType_Ref', type: 'string' },
{ name: 'FEENAME', type: 'string' },
{ name: 'UNIT', type: 'string' },
{ name: 'CURRENCY', type: 'string' },
{ name: 'INPUTMODE', type: 'string' },
{ name: 'DEBITNO', type: 'string' },
{ name: 'REMARK', type: 'string' },
{ name: 'UNITPRICE', type: 'number' },
{ name: 'QUANTITY', type: 'number' },
{ name: 'AMOUNT', type: 'number' },
{ name: 'ORDERAMOUNT', type: 'number' },
{ name: 'EXCHANGERATE', type: 'number' },
{ name: 'TAXRATE', type: 'number' },
{ name: 'NOTAXAMOUNT', type: 'number' },
{ name: 'ACCTAXRATE', type: 'number' },
{ name: 'NOACCTAXAMOUNT', type: 'number' },
{ name: 'ACCTAX', type: 'number' },
{ name: 'SETTLEMENT', type: 'number' },
{ name: 'NOSTLAMOUNT', type: 'number' },
{ name: 'INVOICE', type: 'number' }
],
remoteSort: true,
proxy: {
type: 'ajax',
url: '/MvcShipping/MsRptNoTotal/FeeListData',
timeout: 120000,
reader: {
id: '',
root: 'data',
totalProperty: 'totalCount'
}
}
});
//定义Grid
this.initgirdcolumsfeecr = [{
sortable: true,
dataIndex: 'BSNO',
header: '编号',
hidden: true,
width: 130
}, {
sortable: true,
dataIndex: 'CUSTNAME',
header: Zi.LAN.CUSTNAME,
width: 60
}, {
sortable: true,
dataIndex: 'CUSTFULLNAME',
header: Zi.LAN.CUSTFULLNAME,
width: 120
}, {
sortable: true,
dataIndex: 'OPLBNAME',
header: Zi.LAN.OPLBNAME,
width: 70,
renderer: function (value, cellmeta) {
if (value == '海运出口') {
return Zi.LAN.HYCK;
} else if (value == '海运进口') {
return Zi.LAN.HYJK;
}
}
}, {
sortable: true,
dataIndex: 'BSTYPE',
header: Zi.LAN.BSTYPE,
width: 70,
renderer: function (value, cellmeta) {
if (value == '海运出口') {
return Zi.LAN.HYCK;
} else if (value == '海运进口') {
return Zi.LAN.HYJK;
}
}
}, {
sortable: true,
dataIndex: 'OPTYPE',
header: Zi.LAN.OPTYPE,
width: 70,
renderer: function (value, meta) {
if (value == '普通货')
return Zi.LAN.PUTONGHUO; //是
else
return Zi.LAN.GENGGAIDAN;
}
}, {
sortable: true,
dataIndex: 'OPDATE',
header: Zi.LAN.OPDATE,
width: 86
}, {
sortable: true,
dataIndex: 'CUSTOMDATE',
header: Zi.LAN.CUSTOMDATE,
width: 86
},
{
sortable: true,
dataIndex: 'CUSTOMERNAME',
header: Zi.LAN.CUSTOMERNAME,
width: 120
}, {
sortable: true,
dataIndex: 'CUSTNO',
header: Zi.LAN.CUSTNO,
width: 136
}, {
sortable: true,
dataIndex: 'ENTERP',
header: Zi.LAN.ENTERP,
width: 100
}, {
sortable: true,
dataIndex: 'MBLNO',
header: Zi.LAN.MBLNO,
width: 120
}, {
sortable: true,
dataIndex: 'HBLNO',
header: Zi.LAN.HBLNO,
width: 120
}, {
sortable: true,
dataIndex: 'ORDERNO',
header: Zi.LAN.ORDERNO,
width: 120
}, {
sortable: true,
dataIndex: 'ETD',
header: Zi.LAN.ETD,
width: 86
}, {
sortable: true,
dataIndex: 'VESSEL',
header: Zi.LAN.VESSEL,
width: 200
}, {
sortable: true,
dataIndex: 'VOYNO',
header: Zi.LAN.VOYNO,
width: 50
}, {
sortable: true,
dataIndex: 'SALE',
header: Zi.LAN.SALE,
width: 80
}, {
sortable: true,
dataIndex: 'OP',
header: Zi.LAN.OP,
width: 80
}, {
sortable: true,
dataIndex: 'PORTLOAD',
header: Zi.LAN.PORTLOAD,
width: 80
}, {
sortable: true,
dataIndex: 'PORTDISCHARGE',
header: Zi.LAN.PORTDISCHARGE,
width: 150
}, {
sortable: true,
dataIndex: 'ACCDATE',
header: Zi.LAN.ACCDATE,
width: 80
}, {
sortable: true,
dataIndex: 'CARRIER',
header: Zi.LAN.CARRIER,
width: 80
}, {
sortable: true,
dataIndex: 'BSSOURCE',
header: Zi.LAN.BSSOURCE,
width: 120
}, {
sortable: true,
dataIndex: 'SALECORP',
header: Zi.LAN.SALECORP,
width: 120
}, {
sortable: true,
dataIndex: 'LANE',
header: Zi.LAN.LANE,
width: 150
}, {
sortable: true,
dataIndex: 'TEU',
header: 'TEU',
width: 80
}, {
sortable: true,
dataIndex: 'KGS',
header: 'KGS',
width: 80
}, {
sortable: true,
dataIndex: 'GOODSNAME',
header: Zi.LAN.GOODSNAME,
width: 80
}, {
sortable: true,
dataIndex: 'FeeType_Ref',
header: Zi.LAN.FeeType_Ref,
width: 60
}, {
sortable: true,
dataIndex: 'FEENAME',
header: Zi.LAN.FEENAME,
width: 60
}, {
sortable: true,
dataIndex: 'UNITPRICE',
header: Zi.LAN.UNITPRICE,
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: Zi.LAN.QUANTITY,
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: Zi.LAN.UNIT,
width: 60
}, {
sortable: true,
dataIndex: 'CURRENCY',
header: Zi.LAN.CURRENCY,
width: 60
}, {
sortable: true,
dataIndex: 'EXCHANGERATE',
header: Zi.LAN.EXCHANGERATE,
// 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: Zi.LAN.TAXRATE,
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: Zi.LAN.NOTAXAMOUNT,
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: Zi.LAN.AMOUNT,
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: Zi.LAN.ACCTAXRATE ,
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: 'NOACCTAXAMOUNT',
header: Zi.LAN.NOACCTAXAMOUNT,
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: 'ACCTAX',
header: Zi.LAN.TTLTAXCR ,
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: Zi.LAN.SETTLEMENT,
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: 'NOSTLAMOUNT',
header: Zi.LAN.NOSTLAMOUNT,
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: 'ORDERAMOUNT',
header: Zi.LAN.ORDERAMOUNT2,
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: Zi.LAN.INV,
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: 'INPUTMODE',
header: Zi.LAN.INPUTMODE,
width: 60
}, {
sortable: true,
dataIndex: 'ENTEROPERATORREF',
header: Zi.LAN.ENTEROPERATORREF,
width: 60
}, {
sortable: true,
dataIndex: 'DEBITNO',
header: Zi.LAN.DEBITNO,
width: 60
}, {
sortable: true,
dataIndex: 'REMARK',
header: Zi.LAN.REMARK ,
width: 60
}
];
this.girdcolumsfeecr = DsTruck.GetGridPanel(USERID, this.formname + 'feecr', this.initgirdcolumsfeecr, 1);
this.PagenumFeeCr = Ext.create('Ext.form.field.Number', {
name: 'bottles',
fieldLabel: Zi.LAN.bottles,
labelAlign: 'right',
value: this.PageSize,
maxValue: 100000,
width: 180,
minValue: 0,
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
});
this.gridFeeListCr = new Ext.grid.GridPanel({
store: this.storeFeeListCr,
enableHdMenu: false,
region: 'center',
loadMask: { msg: Zi.LAN.ShuJuJiaZaiZhongQingShaoDeng },
trackMouseOver: true,
disableSelection: false,
columns: this.girdcolumsfeecr,
// paging bar on the bottom
bbar:[Ext.create('Ext.PagingToolbar', {
store: this.storeFeeListCr,
displayInfo: true,
displayMsg: Zi.LAN.displayMsg,
emptyMsg: Zi.LAN.emptyMsg
}), this.PagenumFeeCr]
});
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.storeSaleList = Ext.create('Ext.data.Store', {
pageSize: this.PageSize,
fields: [
{ name: 'SALE', 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' },
{ name: 'ORDERRMBDR', type: 'number' },
{ name: 'ORDERRMBCR', type: 'number' },
{ name: 'ORDERUSDDR', type: 'number' },
{ name: 'ORDERUSDCR', type: 'number' },
{ name: 'ORDEROTDR', type: 'number' },
{ name: 'ORDEROTCR', type: 'number' },
{ name: 'ORDERTTLDR', type: 'number' },
{ name: 'ORDERTTLCR', type: 'number' }
],
remoteSort: true,
proxy: {
type: 'ajax',
url: '/MvcShipping/MsRptNoTotal/SaleListData',
timeout: 120000,
reader: {
id: '',
root: 'data',
totalProperty: 'totalCount'
}
}
});
//定义Grid
this.initgirdcolumssale = [{
sortable: true,
dataIndex: 'SALE',
header: Zi.LAN.SALE,
width: 80
}, {
sortable: true,
dataIndex: 'RMBDR',
header: Zi.LAN.RMBDR,
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,
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: Zi.LAN.RMBNODR,
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: Zi.LAN.USDDR,
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,
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: Zi.LAN.USDNODR,
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: Zi.LAN.OTDR ,
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,
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: Zi.LAN.OTNODR,
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: Zi.LAN.TTLDR,
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,
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: Zi.LAN.TTLNODR,
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: Zi.LAN.RMBCR,
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,
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: Zi.LAN.RMBNOCR,
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: Zi.LAN.USDCR,
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,
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: Zi.LAN.USDNOCR,
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: Zi.LAN.OTCR,
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,
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: Zi.LAN.OTNOCR,
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: Zi.LAN.TTLCR,
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,
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: Zi.LAN.TTLNOCR,
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.girdcolumssale = DsTruck.GetGridPanel(USERID, this.formname + 'sale', this.initgirdcolumssale, 1);
this.gridListSale = new Ext.grid.GridPanel({
store: this.storeSaleList,
enableHdMenu: false,
region: 'center',
loadMask: { msg: Zi.LAN.ShuJuJiaZaiZhongQingShaoDeng},
trackMouseOver: true,
disableSelection: false,
columns: this.girdcolumssale,
// paging bar on the bottom
bbar: Ext.create('Ext.PagingToolbar', {
store: this.storeSaleList,
displayInfo: true,
displayMsg: Zi.LAN.displayMsg,
emptyMsg: Zi.LAN.emptyMsg
})
});
this.gridListSale.addListener('sortchange', function (ct, column, direction, eOpts) {
this.salesumsortfield = column.dataIndex;
this.salesumsortdire = direction;
}, this);
this.storeCustList = Ext.create('Ext.data.Store', {
pageSize: this.PageSize,
fields: [
{ 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: 'TTLDR', type: 'number' },
{ name: 'TTLCR', type: 'number' },
{ name: 'STLTTLDR', type: 'number' },
{ name: 'STLTTLCR', type: 'number' },
{ name: 'BALTTLDR', type: 'number' },
{ name: 'BALTTLCR', type: 'number' },
{ name: 'ORDERRMBDR', type: 'number' },
{ name: 'ORDERRMBCR', type: 'number' },
{ name: 'ORDERUSDDR', type: 'number' },
{ name: 'ORDERUSDCR', type: 'number' },
{ name: 'ORDEROTDR', type: 'number' },
{ name: 'ORDEROTCR', type: 'number' },
{ name: 'ORDERTTLDR', type: 'number' },
{ name: 'ORDERTTLCR', type: 'number' },
{ name: 'INVOICERMBDR', type: 'number' },
{ name: 'INVOICEUSDDR', type: 'number' },
{ name: 'PRMBDR', type: 'number' },
{ name: 'PUSDDR', type: 'number' },
{ name: 'PRMBCR', type: 'number' },
{ name: 'PUSDCR', type: 'number' }
],
remoteSort: true,
proxy: {
type: 'ajax',
url: '/MvcShipping/MsRptNoTotal/CustListData',
timeout: 120000,
reader: {
id: '',
root: 'data',
totalProperty: 'totalCount'
}
}
});
//定义Grid
this.initgirdcolumscust = [{
sortable: true,
dataIndex: 'CUSTNAME',
header: Zi.LAN.CUSTNAME,
width: 80
}, {
sortable: true,
dataIndex: 'CUSTFULLNAME',
header: Zi.LAN.CUSTFULLNAME,
width: 120
}, {
sortable: true,
dataIndex: 'RMBDR',
header: Zi.LAN.RMBDR,
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,
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: Zi.LAN.RMBNODR,
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: Zi.LAN.USDDR,
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,
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: Zi.LAN.USDNODR,
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: Zi.LAN.OTDR ,
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,
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: Zi.LAN.OTNODR,
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: Zi.LAN.TTLDR,
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,
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: Zi.LAN.TTLNODR,
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: Zi.LAN.RMBCR,
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,
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: Zi.LAN.RMBNOCR,
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: Zi.LAN.USDCR,
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,
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: Zi.LAN.USDNOCR,
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: Zi.LAN.OTCR,
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,
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: Zi.LAN.OTNOCR,
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: Zi.LAN.TTLCR,
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,
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: Zi.LAN.TTLNOCR,
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: 'PRMBDR',
header: Zi.LAN.PRMBDR ,
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: 'PUSDDR',
header: Zi.LAN.PUSDDR ,
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: 'PRMBCR',
header: Zi.LAN.PRMBCR,
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: 'PUSDCR',
header: Zi.LAN.PUSDCR,
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: 'INVOICEUSDDR',
header: Zi.LAN.INVOICEUSDDR,
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: 'INVOICERMBDR',
header: Zi.LAN.INVOICERMBDR,
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.PagenumCust = Ext.create('Ext.form.field.Number', {
name: 'bottles',
fieldLabel: Zi.LAN.bottles,
labelAlign: 'right',
value: this.PageSize,
maxValue: 100000,
width: 180,
minValue: 0,
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
});
this.gridListCust = new Ext.grid.GridPanel({
store: this.storeCustList,
enableHdMenu: false,
region: 'center',
loadMask: { msg: Zi.LAN.ShuJuJiaZaiZhongQingShaoDeng },
trackMouseOver: true,
disableSelection: false,
columns: this.girdcolumscust,
// paging bar on the bottom
bbar:[Ext.create('Ext.PagingToolbar', {
store: this.storeCustList,
displayInfo: true,
displayMsg: Zi.LAN.displayMsg,
emptyMsg: Zi.LAN.emptyMsg
}), this.PagenumCust]
});
this.gridListCust.addListener('sortchange', function (ct, column, direction, eOpts) {
this.custsumsortfield = column.dataIndex;
this.custsumsortdire = direction;
}, this);
//#region 揽货人客户
this.storeSaleCustList = Ext.create('Ext.data.Store', {
pageSize: this.PageSize,
fields: [
{ name: 'SALE', type: 'string' },
{ 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: 'TTLDR', type: 'number' },
{ name: 'TTLCR', type: 'number' },
{ name: 'STLTTLDR', type: 'number' },
{ name: 'STLTTLCR', type: 'number' },
{ name: 'BALTTLDR', type: 'number' },
{ name: 'BALTTLCR', type: 'number' },
{ name: 'ORDERRMBDR', type: 'number' },
{ name: 'ORDERRMBCR', type: 'number' },
{ name: 'ORDERUSDDR', type: 'number' },
{ name: 'ORDERUSDCR', type: 'number' },
{ name: 'ORDEROTDR', type: 'number' },
{ name: 'ORDEROTCR', type: 'number' },
{ name: 'ORDERTTLDR', type: 'number' },
{ name: 'ORDERTTLCR', type: 'number' }
],
remoteSort: true,
proxy: {
type: 'ajax',
url: '/MvcShipping/MsRptNoTotal/SaleCustListData',
timeout: 120000,
reader: {
id: '',
root: 'data',
totalProperty: 'totalCount'
}
}
});
//定义Grid
this.initgirdcolumssalecust = [{
sortable: true,
dataIndex: 'SALE',
header: Zi.LAN.PS_SALE,
width: 80
}, {
sortable: true,
dataIndex: 'CUSTNAME',
header: Zi.LAN.CUSTNAME,
width: 80
}, {
sortable: true,
dataIndex: 'CUSTFULLNAME',
header: Zi.LAN.CUSTFULLNAME,
width: 120
}, {
sortable: true,
dataIndex: 'RMBDR',
header: Zi.LAN.RMBDR,
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,
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: Zi.LAN.RMBNODR,
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: Zi.LAN.USDDR,
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,
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: Zi.LAN.USDNODR,
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: Zi.LAN.OTDR ,
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,
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: Zi.LAN.OTNODR,
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: Zi.LAN.TTLDR,
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,
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: Zi.LAN.TTLNODR,
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: Zi.LAN.RMBCR,
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,
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: Zi.LAN.RMBNOCR,
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: Zi.LAN.USDCR,
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,
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: Zi.LAN.USDNOCR,
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: Zi.LAN.OTCR,
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,
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: Zi.LAN.OTNOCR,
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: Zi.LAN.TTLCR,
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,
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: Zi.LAN.TTLNOCR,
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.girdcolumssalecust = DsTruck.GetGridPanel(USERID, this.formname + 'salecust', this.initgirdcolumssalecust, 1);
this.gridListSaleCust = new Ext.grid.GridPanel({
store: this.storeSaleCustList,
enableHdMenu: false,
region: 'center',
loadMask: { msg: Zi.LAN.ShuJuJiaZaiZhongQingShaoDeng},
trackMouseOver: true,
disableSelection: false,
columns: this.girdcolumssalecust,
// paging bar on the bottom
bbar: Ext.create('Ext.PagingToolbar', {
store: this.storeSaleCustList,
displayInfo: true,
displayMsg: Zi.LAN.displayMsg,
emptyMsg: Zi.LAN.emptyMsg
})
});
this.gridListSaleCust.addListener('sortchange', function (ct, column, direction, eOpts) {
this.salecustsumsortfield = column.dataIndex;
this.salecustsumsortdire = direction;
}, this);
//#endregion
this.storeVesselList = Ext.create('Ext.data.Store', {
pageSize: this.PageSize,
fields: [
{ name: 'VESSEL', type: 'string' },
{ name: 'VOYNO', 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',
timeout: 120000,
url: '/MvcShipping/MsRptNoTotal/VesselVoyListData',
reader: {
id: '',
root: 'data',
totalProperty: 'totalCount'
}
}
});
//定义Grid
this.initgirdcolumsvessel = [{
sortable: true,
dataIndex: 'VESSEL',
header: Zi.LAN.VESSEL,
width: 160
}, {
sortable: true,
dataIndex: 'VOYNO',
header: Zi.LAN.VOYNO,
width: 80
}, {
sortable: true,
dataIndex: 'RMBDR',
header: Zi.LAN.RMBDR,
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,
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: Zi.LAN.RMBNODR,
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: Zi.LAN.USDDR,
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,
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: Zi.LAN.USDNODR,
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: Zi.LAN.OTDR ,
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,
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: Zi.LAN.OTNODR,
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: Zi.LAN.TTLDR,
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,
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: Zi.LAN.TTLNODR,
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: Zi.LAN.RMBCR,
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,
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: Zi.LAN.RMBNOCR,
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: Zi.LAN.USDCR,
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,
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: Zi.LAN.USDNOCR,
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: Zi.LAN.OTCR,
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,
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: Zi.LAN.OTNOCR,
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: Zi.LAN.TTLCR,
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,
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: Zi.LAN.TTLNOCR,
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.girdcolumsvesse = DsTruck.GetGridPanel(USERID, this.formname + 'vessel', this.initgirdcolumsvessel, 1);
this.gridListVessel = new Ext.grid.GridPanel({
store: this.storeVesselList,
enableHdMenu: false,
region: 'center',
loadMask: { msg: Zi.LAN.ShuJuJiaZaiZhongQingShaoDeng},
trackMouseOver: true,
disableSelection: false,
columns: this.girdcolumsvesse,
// paging bar on the bottom
bbar: Ext.create('Ext.PagingToolbar', {
store: this.storeVesselList,
displayInfo: true,
displayMsg: Zi.LAN.displayMsg,
emptyMsg: Zi.LAN.emptyMsg
})
});
this.gridListVessel.addListener('sortchange', function (ct, column, direction, eOpts) {
this.vesselsumsortfield = column.dataIndex;
this.vesselsumsortdire = direction;
}, this);
this.storeSaleDeptList = Ext.create('Ext.data.Store', {
pageSize: this.PageSize,
fields: [
{ name: 'SALEDEPT', 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' },
{ name: 'ORDERRMBDR', type: 'number' },
{ name: 'ORDERRMBCR', type: 'number' },
{ name: 'ORDERUSDDR', type: 'number' },
{ name: 'ORDERUSDCR', type: 'number' },
{ name: 'ORDEROTDR', type: 'number' },
{ name: 'ORDEROTCR', type: 'number' },
{ name: 'ORDERTTLDR', type: 'number' },
{ name: 'ORDERTTLCR', type: 'number' }
],
remoteSort: true,
proxy: {
type: 'ajax',
url: '/MvcShipping/MsRptNoTotal/DeptListData',
timeout: 120000,
reader: {
id: '',
root: 'data',
totalProperty: 'totalCount'
}
}
});
//定义Grid
this.initgirdcolumssaledept = [{
sortable: true,
dataIndex: 'SALEDEPT',
header: Zi.LAN.SALEDEPT,
width: 80
}, {
sortable: true,
dataIndex: 'RMBDR',
header: Zi.LAN.RMBDR,
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,
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: Zi.LAN.RMBNODR,
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: Zi.LAN.USDDR,
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,
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: Zi.LAN.USDNODR,
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: Zi.LAN.OTDR ,
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,
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: Zi.LAN.OTNODR,
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: Zi.LAN.TTLDR,
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,
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: Zi.LAN.TTLNODR,
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: Zi.LAN.RMBCR,
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,
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: Zi.LAN.RMBNOCR,
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: Zi.LAN.USDCR,
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,
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: Zi.LAN.USDNOCR,
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: Zi.LAN.OTCR,
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,
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: Zi.LAN.OTNOCR,
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: Zi.LAN.TTLCR,
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,
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: Zi.LAN.TTLNOCR,
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.girdcolumssaledept = DsTruck.GetGridPanel(USERID, this.formname + 'saledept', this.initgirdcolumssaledept, 1);
this.gridListSaleDept = new Ext.grid.GridPanel({
store: this.storeSaleDeptList,
enableHdMenu: false,
region: 'center',
loadMask: { msg: Zi.LAN.ShuJuJiaZaiZhongQingShaoDeng },
trackMouseOver: true,
disableSelection: false,
columns: this.girdcolumssaledept,
// paging bar on the bottom
bbar: Ext.create('Ext.PagingToolbar', {
store: this.storeSaleDeptList,
displayInfo: true,
displayMsg: Zi.LAN.displayMsg,
emptyMsg: Zi.LAN.emptyMsg
})
});
this.gridListSaleDept.addListener('sortchange', function (ct, column, direction, eOpts) {
this.salesumsortfield = column.dataIndex;
this.salesumsortdire = direction;
}, this);
this.storeSumList = Ext.create('Ext.data.Store', {
pageSize: this.PageSize,
fields: [
{ name: 'TEU', type: 'number' },
{ 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',
timeout: 120000,
url: '/MvcShipping/MsRptNoTotal/SumListData',
reader: {
id: '',
root: 'data',
totalProperty: 'totalCount'
}
}
});
//定义Grid
this.initgirdcolumssum = [{
sortable: true,
dataIndex: 'RMBDR',
header: Zi.LAN.RMBDR,
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,
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: Zi.LAN.RMBNODR,
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: Zi.LAN.USDDR,
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,
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: Zi.LAN.USDNODR,
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: Zi.LAN.OTDR ,
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,
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: Zi.LAN.OTNODR,
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: Zi.LAN.TTLDR,
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,
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: Zi.LAN.TTLNODR,
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: Zi.LAN.RMBCR,
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,
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: Zi.LAN.RMBNOCR,
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: Zi.LAN.USDCR,
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,
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: Zi.LAN.USDNOCR,
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: Zi.LAN.OTCR,
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,
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: Zi.LAN.OTNOCR,
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: Zi.LAN.TTLCR,
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,
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: Zi.LAN.TTLNOCR,
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: Zi.LAN.ShuJuJiaZaiZhongQingShaoDeng },
trackMouseOver: true,
disableSelection: false,
columns: this.girdcolumssum
});
//#region formSearch
//#region formSearch枚举参照相关
var BLTYPEDFIELDNAME = 'EnumValueName';
if (strLANGUAGES == "en-us") {
BLTYPEDFIELDNAME = 'EnumValueName_2';
}
_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,
store: this.StoreOpLb,
forceSelection: true,
name: 'PS_OPLB',
valueField: 'EnumValueName',
displayField: BLTYPEDFIELDNAME,
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.PS_BSTYPE,
store: this.storeBsType,
name: 'PS_BSTYPE',
valueField: 'EnumValueName',
displayField: BLTYPEDFIELDNAME,
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,
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,
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/GetCustomRefListController' }
});
this.comboxCustCode = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.CUSTOMERNAME,
store: this.storeCustCode,
forceSelection: true,
queryMode: 'remote',
minChars: 0,
queryParam: 'CODENAME',
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": Zi.LAN.FeeAll});
this.storeAddDCType.add({ "DC": "1", "NAME": Zi.LAN.FeeDr });
this.storeAddDCType.add({ "DC": "2", "NAME": Zi.LAN.FeeCr });
this.comboxaddDCType = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.FeeType_Ref,
store: this.storeAddDCType,
valueField: 'DC',
displayField: 'NAME',
flex: 0.6,
// 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,
store: this.StoreCurr,
forceSelection: true,
flex: 0.4,
labelWidth: 30,
name: 'Currency',
valueField: 'CURR',
displayField: 'CURR',
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({ "FSTATUS": "0", "NAME": Zi.LAN.FeeAll });
this.storeFSTATUS.add({ "FSTATUS": "1", "NAME": Zi.LAN.FEERANGAUDIT });
this.storeFSTATUS.add({ "FSTATUS": "2", "NAME": Zi.LAN.FEERANGNOAUDIT});
this.storeFSTATUS.add({ "FSTATUS": "3", "NAME": Zi.LAN.LURUZHUAGNTAI });
this.storeFSTATUS.add({ "FSTATUS": "4", "NAME": Zi.LAN.TIJIAOSHENHE });
//this.storeFSTATUS.add({ "FSTATUS": "5", "NAME": "审核通过" });
this.storeFSTATUS.add({ "FSTATUS": "6", "NAME": Zi.LAN.BOHUITIJIAO });
this.storeFSTATUS.add({ "FSTATUS": "7", "NAME": Zi.LAN.FEESHENMODIFY });
this.storeFSTATUS.add({ "FSTATUS": "8", "NAME": Zi.LAN.JIESUANWANBI});
this.comboxFSTATUS = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.fystate,
store: this.storeFSTATUS,
valueField: 'FSTATUS',
displayField: 'NAME',
forceSelection: true,
name: 'FSTATUS',
value: '',
enableKeyEvents: true,
listeners: {
keyup: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
});
this.storeHYF = Ext.create('Ext.data.Store', {
fields: ['FSTATUS', 'NAME']
});
this.storeHYF.add({ "FSTATUS": "", "NAME": Zi.LAN.YES});
this.storeHYF.add({ "FSTATUS": "0", "NAME": Zi.LAN.NO});
this.comboxHYF = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.HYF,
store: this.storeHYF,
valueField: 'FSTATUS',
displayField: 'NAME',
// flex: 0.7,
labelWidth: 90,
forceSelection: true,
name: 'ISHYF',
value: '',
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,
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.fyfanwei,
store: this.storeFeeType,
forceSelection: true,
name: 'FEERANGE',
displayField: BLTYPEDFIELDNAME,
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/GetCustomRefListRm' }
});
// this.storeCust.load({ params: { condition: ""} });
this.comboxCust = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.CUSTNAME,
store: this.storeCust,
queryMode: 'remote',
minChars: 0,
queryParam: 'CODENAME',
forceSelection: true,
name: 'CUSTNAME',
valueField: 'CustName',
displayField: 'CodeAndName',
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.FeeAll });
this.StoreFeeLock.add({ "OpLb": Zi.LAN.LOCK });
this.StoreFeeLock.add({ "OpLb": Zi.LAN.UNLOCK });
this.comboxFeeLock = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.FEESTATUSREF ,
store: this.StoreFeeLock,
forceSelection: true,
flex: 0.7,
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,
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', {
model: 'DsShipping.ux.CustomRefModel',
proxy: { url: '/CommMng/BasicDataRef/GetCustomRefListEnterp' }
});
this.comboxEnterp = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.ENTERP, //'经营单位',
store: this.storeEnterpCode,
queryMode: 'remote',
minChars: 0,
queryParam: 'CODENAME',
// forceSelection: true,
name: 'PS_ENTERP',
valueField: 'CustName',
displayField: 'CodeAndName',
value: '',
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.CORPID ,
store: this.StoreSubComp,
name: 'SUBCOMP',
valueField: 'GID',
displayField: 'NAME',
enableKeyEvents: true,
listeners: {
keyup: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
});
this.storeINVSTATUS = Ext.create('Ext.data.Store', {
fields: ['FSTATUS', 'NAME']
});
this.storeINVSTATUS.add({ "FSTATUS": "", "NAME": Zi.LAN.FeeAll });
this.storeINVSTATUS.add({ "FSTATUS": "0", "NAME": Zi.LAN.INVSTATUSYES});
this.storeINVSTATUS.add({ "FSTATUS": "1", "NAME": Zi.LAN.INVSTATUSNO });
this.comboxINVSTATUS = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.INVSTATUS,
store: this.storeINVSTATUS,
valueField: 'FSTATUS',
displayField: 'NAME',
forceSelection: true,
name: 'ISINVOICE',
flex: 0.7,
value: '',
enableKeyEvents: true,
listeners: {
keyup: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
});
this.storeISADVANCEDPAY = Ext.create('Ext.data.Store', {
fields: ['FSTATUS', 'NAME']
});
this.storeISADVANCEDPAY.add({ "FSTATUS": "", "NAME": Zi.LAN.FeeAll });
this.storeISADVANCEDPAY.add({ "FSTATUS": "0", "NAME": Zi.LAN.ISADVANCEDPAYNO});
this.storeISADVANCEDPAY.add({ "FSTATUS": "1", "NAME": Zi.LAN.ISADVANCEDPAYYES});
this.comboxISADVANCEDPAY = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.ISADVANCEDPAY, //是否开垫付
store: this.storeISADVANCEDPAY,
valueField: 'FSTATUS',
displayField: 'NAME',
forceSelection: true,
name: 'ISADVANCEDPAY',
value: '',
flex: 0.7,
enableKeyEvents: true,
listeners: {
keyup: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
});
//是否生成凭证
this.storeISVOUALLNO = Ext.create('Ext.data.Store', {
fields: ['ISVOUALLNO', 'NAME']
});
this.storeISVOUALLNO.add({ "ISVOUALLNO": "", "NAME": Zi.LAN.FeeAll });
this.storeISVOUALLNO.add({ "ISVOUALLNO": "0", "NAME": Zi.LAN.YES });
this.storeISVOUALLNO.add({ "ISVOUALLNO": "1", "NAME": Zi.LAN.NO });
this.comboxISVOUALLNO = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.ISVOUALLNO,
store: this.storeISVOUALLNO,
valueField: 'ISVOUALLNO',
displayField: 'NAME',
forceSelection: true,
name: 'ISVOUALLNO',
value: '',
enableKeyEvents: true,
flex: 0.7,
listeners: {
keyup: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
});
Ext.define('OpSeaeShipper', {
extend: 'Ext.data.Model',
idProperty: 'SHIPPERID',
fields: [
{ name: 'SHIPPERID', type: 'string' },
{ name: 'CODENAME', type: 'string' },
{ name: 'SHORTNAME', type: 'string' },
{ name: 'CodeAndName', type: 'string' },
{ name: 'SHIPPERDETAIL', type: 'string' },
{ name: 'SHIPPERTYPE', type: 'int' },
{ name: 'LOADADDRESS', type: 'string' },
{ name: 'DELIVERADDRESS', type: 'string' },
{ name: 'ISPUBLIC', type: 'bool' }
]
});
//客户加载_代理
this.storeagent = Ext.create('DsExt.ux.RefTableStore', {
model: 'OpSeaeShipper',
proxy: { url: '/MvcShipping/MsOpSeae/GetShipperList' }
});
this.storeagent.load({ params: { condition: "shippertype=4 AND ISPUBLIC=1 "} });
//收货人
this.comboxAgent = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.AGENTID,
store: this.storeagent,
forceSelection: true,
name: 'AGENTID',
valueField: 'SHORTNAME',
displayField: 'CodeAndName',
enableKeyEvents: true,
listeners: {
keyup: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
});
this.CheckAmend = new Ext.form.Checkbox({
fieldLabel: Zi.LAN.AMEND,
labelWidth: 70,
checked: false,
flex: 0.6
});
this.storeBLNOTYPE = Ext.create('Ext.data.Store', {
fields: ['FSTATUS', 'NAME']
});
this.storeBLNOTYPE.add({ "FSTATUS": "CUSTNO", "NAME": Zi.LAN.CUSTNO });
this.storeBLNOTYPE.add({ "FSTATUS": "INVOICENO", "NAME": Zi.LAN.INVOICENO});
this.storeBLNOTYPE.add({ "FSTATUS": "ORDERNO", "NAME": Zi.LAN.ORDERNO });
this.comboxBLNOTYPE = Ext.create('DsExt.ux.RefTableCombox', {
// fieldLabel: '费用状态',
store: this.storeBLNOTYPE,
valueField: 'FSTATUS',
displayField: 'NAME',
flex: 0.5,
forceSelection: true,
name: 'BLNOTYPE',
value: 'INVOICENO',
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: 60,
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.comboxFeeNameRef, this.comboxFeeType, {
fieldLabel: Zi.LAN.GOODSNAME,
name: 'PS_GOODSNAME',
enableKeyEvents: true,
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
}, this.comboxOp, this.comboxAgent, this.comboxSubComp
]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [this.comboxOpLb, {
fieldLabel: Zi.LAN.MBLNO,
name: 'PS_MBLNO',
enableKeyEvents: true,
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
}, this.comboxVoyVeg, {
fieldLabel: Zi.LAN.VOYNO,
labelWidth: 40,
flex: 0.5,
name: 'PS_VOYNO',
enableKeyEvents: true,
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
}, this.comboxaddDCType, this.comboxCurr, this.comboxFSTATUS, this.comboxHYF
]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [this.comboxBsType, this.comboxSalesCode, this.comboxCustCode, this.comboxFeeLock, this.comboxINVSTATUS, {
fieldLabel: Zi.LAN.NODAY,
flex: 0.6,
//xtype: 'numberfield',
name: 'PS_NODAY',
enableKeyEvents: true,
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
}, this.comboxISADVANCEDPAY, this.comboxISVOUALLNO, this.CheckAmend
]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [this.comboxEnterp, {
fieldLabel: Zi.LAN.PS_ETDDATEBGN,
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,
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.ACCDATE,
xtype: 'monthfield',
name: 'PS_ACCDATEBGN',
enableKeyEvents: true,
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
}, {
fieldLabel: Zi.LAN.PS_EXPDATEEND,
xtype: 'monthfield',
name: 'PS_ACCDATEEND',
enableKeyEvents: true,
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
}, this.comboxBLNOTYPE,{
// fieldLabel: '发票号',
name: 'PS_INVNO',
flex: 0.5,
enableKeyEvents: true,
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
}, {
fieldLabel: Zi.LAN.VOUALLNO,
name: 'VOUALLNO',
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.SaveQuery,
checked: true,
width: 120
});
_this = this;
this.SearchBtn = new Ext.Button({
text: Zi.LAN.HideQuery,
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,
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,
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,
id: "btnExportExcel",
iconCls: 'btnexportexcel',
handler: function (button, event) {
this.onExportClick(button, event);
},
scope: this
}, '-',
{
text: Zi.LAN.btnprint,
iconCls: 'btnprint',
handler: function (button, event) {
this.Print();
},
scope: this
}, '-', this.SearchBtn, {
xtype: 'button',
width: 90,
text: Zi.LAN.ClearSql,
iconCls: "btnreset",
handler: function (button, event) {
this.onClearSql(button, event);
},
scope: this
}, this.CheckSaveQuery, '-', {
text: Zi.LAN.SaveGrid,
id: "btntest",
menu: [
{
text: Zi.LAN.SaveGrid2,
handler: function (button, event) {
_this.onSaveGridClick(button, event);
}
}, {
text: Zi.LAN.InitGrid,
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.BodyChFee,
layout: "border",
region: 'center',
margin: '0 0',
frame: true,
items: [this.gridListDr]
});
this.panelBodyChFeeCr = new Ext.Panel({
title: Zi.LAN.BodyChFeeCr,
layout: "border",
region: 'center',
margin: '0 0',
frame: true,
items: [this.gridListCr]
});
this.panelSaleSum = new Ext.Panel({
title: Zi.LAN.PS_SALE,
layout: "border",
region: 'center',
margin: '0 0',
frame: true,
items: [this.gridListSale]
});
this.panelCustSum = new Ext.Panel({
title: Zi.LAN.CUSTNAME,
layout: "border",
region: 'center',
margin: '0 0',
frame: true,
items: [this.gridListCust]
});
this.panelSaleCustSum = new Ext.Panel({
title: Zi.LAN.SaleCustSum ,
layout: "border",
region: 'center',
margin: '0 0',
frame: true,
items: [this.gridListSaleCust]
});
this.panelVesselSum = new Ext.Panel({
title: Zi.LAN.VESSEL + Zi.LAN.VOYNO,
layout: "border",
region: 'center',
margin: '0 0',
frame: true,
items: [this.gridListVessel]
});
this.panelSaleDeptSum = new Ext.Panel({
title: Zi.LAN.SALEDEPT,
layout: "border",
region: 'center',
margin: '0 0',
frame: true,
items: [this.gridListSaleDept]
});
this.panelSum = new Ext.Panel({
title: Zi.LAN.SUM,
layout: "border",
height: 120,
region: 'south',
margin: '0 0',
frame: true,
items: [this.gridListSum]
});
this.panelFeeListDr = new Ext.Panel({
title: Zi.LAN.FeeListDr,
layout: "border",
region: 'center',
margin: '0 0',
frame: true,
items: [this.gridFeeListDr]
});
this.panelFeeListCr = new Ext.Panel({
title: Zi.LAN.FeeListCr,
layout: "border",
region: 'center',
margin: '0 0',
frame: true,
items: [this.gridFeeListCr]
});
this.IsNoDrCr();
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.panelBodyChFeeCr,
this.panelFeeListCr,
this.panelCustSum,
this.panelSaleSum,
this.panelSaleCustSum,
this.panelVesselSum,
this.panelSaleDeptSum
],
//tab切换事件
listeners: {
'tabchange': function (tabPanel, newCard, oldCard, eOpts) {
_this.RpttabChange(tabPanel, newCard, oldCard, eOpts);
}
}
});
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;
var Drsql = sql + getAndConSql(sql, '1=1', " F.FEETYPE=1");
var amendstr = 'false';
if (this.CheckAmend.checked == true) amendstr = 'true';
Ext.apply(store.proxy.extraParams, { condition: Drsql, amendstr: amendstr });
}, this);
this.storeListCr.on('beforeload', function (store) {
if (!this.checkSearchCondition())
return;
var sql = this.sqlcontext;
var Crsql = sql + getAndConSql(sql, '1=1', " F.FEETYPE=2");
var amendstr = 'false';
if (this.CheckAmend.checked == true) amendstr = 'true';
Ext.apply(store.proxy.extraParams, { condition: Crsql, amendstr: amendstr });
}, this);
this.storeSaleList.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.storeSaleCustList.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;
var Drsql = sql + getAndConSql(sql, '1=1', " F.FEETYPE=1");
Ext.apply(store.proxy.extraParams, { condition: Drsql });
}, this);
this.storeFeeListCr.on('beforeload', function (store) {
if (!this.checkSearchCondition())
return;
var sql = this.sqlcontext;
var Crsql = sql + getAndConSql(sql, '1=1', " F.FEETYPE=2");
Ext.apply(store.proxy.extraParams, { condition: Crsql });
}, this);
this.storeVesselList.on('beforeload', function (store) {
if (!this.checkSearchCondition())
return;
var sql = this.sqlcontext;
Ext.apply(store.proxy.extraParams, { condition: sql });
}, this);
this.storeSumList.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);
this.SetCurActiveTab();
this.storectndisp.load({
params: { condition: "" },
callback: function (r, options, success) {
if (success) {
if (r.length != 0) {
_this.InitGrid(_this.girdcolumsdr, _this.gridListDr, _this.storeListDr);
_this.InitGrid(_this.girdcolumscr, _this.gridListCr, _this.storeListCr);
}
}
},
scope: this
});
Ext.Ajax.request({
waitMsg: '',
url: '/MvcShipping/MsSysParamSet/GetData',
params: {
condition: "PARAMNAME='NORPTSTLDATETYPE'"
},
callback: function (options, success, response) {
if (success) {
var result = Ext.JSON.decode(response.responseText);
if (result.Success != true) {
} else {
var data = result.data;
if (data.PARAMVALUE == '1') {
this.NORPTSTLDATETYPE = 1;
} else {
}
}
} else {
}
},
scope: this
});
}, //end initUIComponents
InitGrid: function (grid, thgridList, thstoreList) {
var agirdcolums = grid;
for (i = 0; i < this.storectndisp.getCount(); i += 1) {
var itemindex = i + 1;
var memberyf = this.storectndisp.getAt(i);
for (var j = 0; j < agirdcolums.length; j++) {
if (agirdcolums[j].dataIndex == 'CNTR1') {
if (memberyf.data.CNT1 != '' && memberyf.data.CNT1 != null) {
agirdcolums[j].text = memberyf.data.CNT1;
agirdcolums[j].hidden = false;
} else {
agirdcolums[j].hidden = true;
}
}
if (agirdcolums[j].dataIndex == 'CNTR2') {
if (memberyf.data.CNT2 != '' && memberyf.data.CNT2 != null) {
agirdcolums[j].text = memberyf.data.CNT2;
agirdcolums[j].hidden = false;
} else {
agirdcolums[j].hidden = true;
}
}
if (agirdcolums[j].dataIndex == 'CNTR3') {
if (memberyf.data.CNT3 != '' && memberyf.data.CNT3 != null) {
agirdcolums[j].text = memberyf.data.CNT3;
agirdcolums[j].hidden = false;
} else {
agirdcolums[j].hidden = true;
}
}
if (agirdcolums[j].dataIndex == 'CNTR4') {
if (memberyf.data.CNT4 != '' && memberyf.data.CNT4 != null) {
agirdcolums[j].text = memberyf.data.CNT4;
agirdcolums[j].hidden = false;
} else {
agirdcolums[j].hidden = true;
}
}
if (agirdcolums[j].dataIndex == 'CNTR5') {
if (memberyf.data.CNT5 != '' && memberyf.data.CNT5 != null) {
agirdcolums[j].header = memberyf.data.CNT5;
agirdcolums[j].hidden = false;
} else {
agirdcolums[j].hidden = true;
}
}
if (agirdcolums[j].dataIndex == 'CNTR6') {
if (memberyf.data.CNT6 != '' && memberyf.data.CNT6 != null) {
agirdcolums[j].text = memberyf.data.CNT6;
agirdcolums[j].hidden = false;
} else {
agirdcolums[j].hidden = true;
}
}
if (agirdcolums[j].dataIndex == 'CNTR7') {
if (memberyf.data.CNT7 != '' && memberyf.data.CNT7 != null) {
agirdcolums[j].text = memberyf.data.CNT7;
agirdcolums[j].hidden = false;
} else {
agirdcolums[j].hidden = true;
}
}
if (agirdcolums[j].dataIndex == 'CNTR8') {
if (memberyf.data.CNT8 != '' && memberyf.data.CNT8 != null) {
agirdcolums[j].text = memberyf.data.CNT8;
agirdcolums[j].hidden = false;
} else {
agirdcolums[j].hidden = true;
}
}
if (agirdcolums[j].dataIndex == 'CNTR9') {
if (memberyf.data.CNT9 != '' && memberyf.data.CNT9 != null) {
agirdcolums[j].text = memberyf.data.CNT9;
agirdcolums[j].hidden = false;
} else {
agirdcolums[j].hidden = true;
}
}
if (agirdcolums[j].dataIndex == 'CNTR10') {
if (memberyf.data.CNT10 != '' && memberyf.data.CNT10 != null) {
agirdcolums[j].text = memberyf.data.CNT10;
agirdcolums[j].hidden = false;
} else {
agirdcolums[j].hidden = true;
}
}
}
};
thgridList.reconfigure(thstoreList, agirdcolums);
},
onRefreshClick: function (button, event) {
if (!this.checkSearchCondition())
return;
//var form = this.formSearch.getForm();
//var etdDate_Min = form.findField('PS_ETDDATEBGN').getRawValue();
//var etdDate_Max = form.findField('PS_ETDDATEEND').getRawValue();
//var accDate_Min = form.findField('PS_ACCDATEBGN').getRawValue();
//var accDate_Max = form.findField('PS_ACCDATEEND').getRawValue();
//if ((etdDate_Min == '' || etdDate_Min == null || etdDate_Min == undefined)
// && (etdDate_Max == '' || etdDate_Max == null || etdDate_Max == undefined)
// && (accDate_Min == '' || accDate_Min == null || accDate_Min == undefined)
// && (accDate_Max == '' || accDate_Max == null || accDate_Max == undefined)) {
// Ext.Msg.alert('提示', '开船日期或会计期间不能为空!');
// return;
//}
var sql = this.getCondition();
this.sqlcontext = sql;
var Drsql = sql + getAndConSql(sql, '1=1', " F.FEETYPE=1");
var Crsql = sql + getAndConSql(sql, '1=1', " F.FEETYPE=2");
var amendstr = 'false';
if (this.CheckAmend.checked == true) amendstr = 'true';
this.storeListDr.removeAll();
this.storeListCr.removeAll();
this.storeFeeListDr.removeAll();
this.storeFeeListCr.removeAll();
this.storeCustList.removeAll();
this.storeSaleCustList.removeAll();
this.storeSaleList.removeAll();
this.storeVesselList.removeAll();
this.storeSaleDeptList.removeAll();
if (this.tabpanel.getActiveTab() == this.panelBodyChFee) {
this.PageSize = this.PagenumDr.getValue();
this.storeListDr.pageSize = this.PageSize;
this.storeListDr.currentPage = 1;
this.storeListDr.load({
params: { start: 0, limit: this.PageSize, condition: Drsql, amendstr: amendstr },
callback: function (r, options, success) {
if (success) {
var ss = JSON.parse(options.response.responseText);
if (ss.Success != undefined) {
Ext.Msg.show({ title: '提示', msg: ss.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
}
},
waitMsg: "正在查询数据...",
scope: this
});
} else if (this.tabpanel.getActiveTab() == this.panelBodyChFeeCr) {
this.PageSize = this.PagenumCr.getValue();
this.storeListCr.pageSize = this.PageSize;
this.storeListCr.currentPage = 1;
this.storeListCr.load({
params: { start: 0, limit: this.PageSize, condition: Crsql, amendstr: amendstr },
callback: function (r, options, success) {
if (success) {
var ss = JSON.parse(options.response.responseText);
if (ss.Success != undefined) {
Ext.Msg.show({ title: '提示', msg: ss.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
}
},
waitMsg: "正在查询数据...",
scope: this
});
} else if (this.tabpanel.getActiveTab() == this.panelSaleSum) {
this.storeSaleList.load({
params: { start: 0, limit: this.PageSize, condition: sql },
callback: function (r, options, success) {
if (success) {
var ss = JSON.parse(options.response.responseText);
if (ss.Success != undefined) {
Ext.Msg.show({ title: '提示', msg: ss.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
}
},
waitMsg: "正在查询数据...",
scope: this
});
} else if (this.tabpanel.getActiveTab() == this.panelCustSum) {
this.PageSize = this.PagenumCust.getValue();
this.storeCustList.pageSize = this.PageSize;
this.storeCustList.currentPage = 1;
this.storeCustList.load({
params: { start: 0, limit: this.PageSize, condition: sql },
callback: function (r, options, success) {
if (success) {
var ss = JSON.parse(options.response.responseText);
if (ss.Success != undefined) {
Ext.Msg.show({ title: '提示', msg: ss.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
}
},
waitMsg: "正在查询数据...",
scope: this
});
} else if (this.tabpanel.getActiveTab() == this.panelSaleCustSum) {
this.storeSaleCustList.load({
params: { start: 0, limit: this.PageSize, condition: sql },
callback: function (r, options, success) {
if (success) {
var ss = JSON.parse(options.response.responseText);
if (ss.Success != undefined) {
Ext.Msg.show({ title: '提示', msg: ss.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
}
},
waitMsg: "正在查询数据...",
scope: this
});
} else if (this.tabpanel.getActiveTab() == this.panelSaleDeptSum) {
this.storeSaleDeptList.load({
params: { start: 0, limit: this.PageSize, condition: sql },
callback: function (r, options, success) {
if (success) {
var ss = JSON.parse(options.response.responseText);
if (ss.Success != undefined) {
Ext.Msg.show({ title: '提示', msg: ss.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
}
},
waitMsg: "正在查询数据...",
scope: this
});
} else if (this.tabpanel.getActiveTab() == this.panelFeeListDr) {
this.PageSize = this.PagenumFeeDr.getValue();
this.storeFeeListDr.pageSize = this.PageSize;
this.storeFeeListDr.currentPage = 1;
this.storeFeeListDr.load({
params: { start: 0, limit: this.PageSize, condition: Drsql },
callback: function (r, options, success) {
if (success) {
var ss = JSON.parse(options.response.responseText);
if (ss.Success != undefined) {
Ext.Msg.show({ title: '提示', msg: ss.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
}
},
waitMsg: "正在查询数据...",
scope: this
});
} else if (this.tabpanel.getActiveTab() == this.panelFeeListCr) {
this.PageSize = this.PagenumFeeCr.getValue();
this.storeFeeListCr.pageSize = this.PageSize;
this.storeFeeListCr.currentPage = 1;
this.storeFeeListCr.load({
params: { start: 0, limit: this.PageSize, condition: Crsql },
callback: function (r, options, success) {
if (success) {
var ss = JSON.parse(options.response.responseText);
if (ss.Success != undefined) {
Ext.Msg.show({ title: '提示', msg: ss.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
}
},
waitMsg: "正在查询数据...",
scope: this
});
} else if (this.tabpanel.getActiveTab() == this.panelVesselSum) {
this.storeVesselList.load({
params: { start: 0, limit: this.PageSize, condition: sql },
callback: function (r, options, success) {
if (success) {
var ss = JSON.parse(options.response.responseText);
if (ss.Success != undefined) {
Ext.Msg.show({ title: '提示', msg: ss.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
}
},
waitMsg: "正在查询数据...",
scope: this
});
}
this.isquery = true;
// this.storeFeeListDr.load({
// params: { start: 0, limit: this.PageSize, condition: Drsql },
// waitMsg: "正在查询数据...",
// scope: this
// });
// this.storeFeeListCr.load({
// params: { start: 0, limit: this.PageSize, condition: Crsql },
// waitMsg: "正在查询数据...",
// scope: this
// });
// this.storeCustList.load({
// params: { start: 0, limit: this.PageSize, condition: sql },
// waitMsg: "正在查询数据...",
// scope: this
// });
// this.storeSaleList.load({
// params: { start: 0, limit: this.PageSize, condition: sql },
// waitMsg: "正在查询数据...",
// scope: this
// });
// this.storeVesselList.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 = 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");
var amendstr = 'false';
if (this.CheckAmend.checked == true) amendstr = 'true';
this.storeListDr.removeAll();
this.storeListCr.removeAll();
this.storeFeeListDr.removeAll();
this.storeFeeListCr.removeAll();
this.storeCustList.removeAll();
this.storeSaleList.removeAll();
this.storeSaleCustList.removeAll();
this.storeVesselList.removeAll();
if (this.tabpanel.getActiveTab() == this.panelBodyChFee) {
this.PageSize = this.PagenumDr.getValue();
this.storeListDr.pageSize = this.PageSize;
this.storeListDr.currentPage = 1;
this.storeListDr.load({
params: { start: 0, limit: this.PageSize, condition: Drsql, amendstr: amendstr },
callback: function (r, options, success) {
if (success) {
var ss = JSON.parse(options.response.responseText);
if (ss.Success != undefined) {
Ext.Msg.show({ title: '提示', msg: ss.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
}
},
waitMsg: "正在查询数据...",
scope: this
});
} else if (this.tabpanel.getActiveTab() == this.panelBodyChFeeCr) {
this.PageSize = this.PagenumCr.getValue();
this.storeListCr.pageSize = this.PageSize;
this.storeListCr.currentPage = 1;
this.storeListCr.load({
params: { start: 0, limit: this.PageSize, condition: Crsql, amendstr: amendstr },
callback: function (r, options, success) {
if (success) {
var ss = JSON.parse(options.response.responseText);
if (ss.Success != undefined) {
Ext.Msg.show({ title: '提示', msg: ss.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
}
},
waitMsg: "正在查询数据...",
scope: this
});
} else if (this.tabpanel.getActiveTab() == this.panelSaleSum) {
this.storeSaleList.load({
params: { start: 0, limit: this.PageSize, condition: sql },
callback: function (r, options, success) {
if (success) {
var ss = JSON.parse(options.response.responseText);
if (ss.Success != undefined) {
Ext.Msg.show({ title: '提示', msg: ss.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
}
},
waitMsg: "正在查询数据...",
scope: this
});
} else if (this.tabpanel.getActiveTab() == this.panelCustSum) {
this.storeCustList.load({
params: { start: 0, limit: this.PageSize, condition: sql },
callback: function (r, options, success) {
if (success) {
var ss = JSON.parse(options.response.responseText);
if (ss.Success != undefined) {
Ext.Msg.show({ title: '提示', msg: ss.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
}
},
waitMsg: "正在查询数据...",
scope: this
});
} else if (this.tabpanel.getActiveTab() == this.panelSaleCustSum) {
this.storeSaleCustList.load({
params: { start: 0, limit: this.PageSize, condition: sql },
callback: function (r, options, success) {
if (success) {
var ss = JSON.parse(options.response.responseText);
if (ss.Success != undefined) {
Ext.Msg.show({ title: '提示', msg: ss.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
}
},
waitMsg: "正在查询数据...",
scope: this
});
} else if (this.tabpanel.getActiveTab() == this.panelSaleDeptSum) {
this.storeSaleDeptList.load({
params: { start: 0, limit: this.PageSize, condition: sql },
callback: function (r, options, success) {
if (success) {
var ss = JSON.parse(options.response.responseText);
if (ss.Success != undefined) {
Ext.Msg.show({ title: '提示', msg: ss.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
}
},
waitMsg: "正在查询数据...",
scope: this
});
} else if (this.tabpanel.getActiveTab() == this.panelFeeListDr) {
this.PageSize = this.PagenumFeeDr.getValue();
this.storeFeeListDr.pageSize = this.PageSize;
this.storeFeeListDr.currentPage = 1;
this.storeFeeListDr.load({
params: { start: 0, limit: this.PageSize, condition: Drsql },
callback: function (r, options, success) {
if (success) {
var ss = JSON.parse(options.response.responseText);
if (ss.Success != undefined) {
Ext.Msg.show({ title: '提示', msg: ss.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
}
},
waitMsg: "正在查询数据...",
scope: this
});
} else if (this.tabpanel.getActiveTab() == this.panelFeeListCr) {
this.PageSize = this.PagenumFeeCr.getValue();
this.storeFeeListCr.pageSize = this.PageSize;
this.storeFeeListCr.currentPage = 1;
this.storeFeeListCr.load({
params: { start: 0, limit: this.PageSize, condition: Crsql },
callback: function (r, options, success) {
if (success) {
var ss = JSON.parse(options.response.responseText);
if (ss.Success != undefined) {
Ext.Msg.show({ title: '提示', msg: ss.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
}
},
waitMsg: "正在查询数据...",
scope: this
});
} else if (this.tabpanel.getActiveTab() == this.panelVesselSum) {
this.storeVesselList.load({
params: { start: 0, limit: this.PageSize, condition: sql },
callback: function (r, options, success) {
if (success) {
var ss = JSON.parse(options.response.responseText);
if (ss.Success != undefined) {
Ext.Msg.show({ title: '提示', msg: ss.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
}
},
waitMsg: "正在查询数据...",
scope: this
});
}
this.isquery = true;
this.storeSumList.load({
params: { start: 0, limit: this.PageSize, condition: sql },
waitMsg: "正在查询数据...",
scope: this
});
},
RpttabChange: function (tabPanel, newCard, oldCard, eOpts) {
if (!this.isquery) return;
var sql = this.sqlcontext;
var Drsql = sql + getAndConSql(sql, '1=1', " F.FEETYPE=1");
var Crsql = sql + getAndConSql(sql, '1=1', " F.FEETYPE=2");
var amendstr = 'false';
if (this.CheckAmend.checked == true) amendstr = 'true';
this.PageSize = Pagenum.getValue();
if (newCard == this.panelBodyChFee && this.storeListDr.getCount() == 0) {
this.storeListDr.load({
params: { start: 0, limit: this.PageSize, condition: Drsql, amendstr: amendstr },
callback: function (r, options, success) {
if (success) {
var ss = JSON.parse(options.response.responseText);
if (ss.Success != undefined) {
Ext.Msg.show({ title: '提示', msg: ss.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
}
},
waitMsg: "正在查询数据...",
scope: this
});
} else if (newCard == this.panelBodyChFeeCr && this.storeListCr.getCount() == 0) {
this.PageSize = this.PagenumCr.getValue();
this.storeListCr.load({
params: { start: 0, limit: this.PageSize, condition: Crsql, amendstr: amendstr },
callback: function (r, options, success) {
if (success) {
var ss = JSON.parse(options.response.responseText);
if (ss.Success != undefined) {
Ext.Msg.show({ title: '提示', msg: ss.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
}
},
waitMsg: "正在查询数据...",
scope: this
});
} else if (newCard == this.panelSaleSum && this.storeSaleList.getCount() == 0) {
this.storeSaleList.load({
params: { start: 0, limit: this.PageSize, condition: sql },
callback: function (r, options, success) {
if (success) {
var ss = JSON.parse(options.response.responseText);
if (ss.Success != undefined) {
Ext.Msg.show({ title: '提示', msg: ss.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
}
},
waitMsg: "正在查询数据...",
scope: this
});
} else if (newCard == this.panelCustSum && this.storeCustList.getCount() == 0) {
this.storeCustList.load({
params: { start: 0, limit: this.PageSize, condition: sql },
callback: function (r, options, success) {
if (success) {
var ss = JSON.parse(options.response.responseText);
if (ss.Success != undefined) {
Ext.Msg.show({ title: '提示', msg: ss.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
}
},
waitMsg: "正在查询数据...",
scope: this
});
} else if (newCard == this.panelSaleCustSum && this.storeSaleCustList.getCount() == 0) {
this.storeSaleCustList.load({
params: { start: 0, limit: this.PageSize, condition: sql },
callback: function (r, options, success) {
if (success) {
var ss = JSON.parse(options.response.responseText);
if (ss.Success != undefined) {
Ext.Msg.show({ title: '提示', msg: ss.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
}
},
waitMsg: "正在查询数据...",
scope: this
});
} else if (newCard == this.panelSaleDeptSum && this.storeSaleDeptList.getCount() == 0) {
this.storeSaleDeptList.load({
params: { start: 0, limit: this.PageSize, condition: sql },
callback: function (r, options, success) {
if (success) {
var ss = JSON.parse(options.response.responseText);
if (ss.Success != undefined) {
Ext.Msg.show({ title: '提示', msg: ss.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
}
},
waitMsg: "正在查询数据...",
scope: this
});
} else if (newCard == this.panelFeeListDr && this.storeFeeListDr.getCount() == 0) {
this.PageSize = this.PagenumFeeDr.getValue();
this.storeFeeListDr.load({
params: { start: 0, limit: this.PageSize, condition: Drsql },
callback: function (r, options, success) {
if (success) {
var ss = JSON.parse(options.response.responseText);
if (ss.Success != undefined) {
Ext.Msg.show({ title: '提示', msg: ss.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
}
},
waitMsg: "正在查询数据...",
scope: this
});
} else if (newCard == this.panelFeeListCr && this.storeFeeListCr.getCount() == 0) {
this.PageSize = this.PagenumFeeCr.getValue();
this.storeFeeListCr.load({
params: { start: 0, limit: this.PageSize, condition: Crsql },
callback: function (r, options, success) {
if (success) {
var ss = JSON.parse(options.response.responseText);
if (ss.Success != undefined) {
Ext.Msg.show({ title: '提示', msg: ss.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
}
},
waitMsg: "正在查询数据...",
scope: this
});
} else if (newCard == this.panelVesselSum && this.storeVesselList.getCount() == 0) {
this.storeVesselList.load({
params: { start: 0, limit: this.PageSize, condition: sql },
callback: function (r, options, success) {
if (success) {
var ss = JSON.parse(options.response.responseText);
if (ss.Success != undefined) {
Ext.Msg.show({ title: '提示', msg: ss.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
}
},
waitMsg: "正在查询数据...",
scope: this
});
} else if (newCard == this.panelSaleDeptSum && this.storeSaleDeptList.getCount() == 0) {
this.storeSaleDeptList.load({
params: { start: 0, limit: this.PageSize, condition: sql },
callback: function (r, options, success) {
if (success) {
var ss = JSON.parse(options.response.responseText);
if (ss.Success != undefined) {
Ext.Msg.show({ title: '提示', msg: ss.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
}
},
waitMsg: "正在查询数据...",
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 = ' ISNULL(F.ISACC,0)=0 ';
/*
var sqldata = form.getValues();
sql = Ext.JSON.encode(sqldata);
*/
var mblNo = form.findField('PS_MBLNO').getValue();
sql = sql + getAndConSql(sql, mblNo, " (B.MBLNO like '%" + mblNo + "%' or B.HBLNO 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 == Zi.LAN.LOCK)
sql = sql + getAndConSql(sql, PS_FEELOCK, "B.FEESTATUS=1");
else if (PS_FEELOCK == Zi.LAN.UNLOCK)
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 AGENTID = form.findField('AGENTID').getValue();
sql = sql + getAndConSql(sql, AGENTID, "B.AGENTID like '%" + AGENTID + "%'");
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 ISHYF = form.findField('ISHYF').getValue();
if (ISHYF == '0') {
sql = sql + getAndConSql(sql, ISHYF, " NOT EXISTS (select 1 from ch_fee WHERE B.BSNO=ch_fee.BSNO AND ch_fee.FEENAME='海运费') ");
}
var DC = form.findField('DC').getValue();
sql = sql + getAndConSql(sql, DC, "F.FEETYPE=" + DC);
var ISINVOICE = form.findField('ISINVOICE').getValue();
sql = sql + getAndConSql(sql, ISINVOICE, "F.ISINVOICE=" + ISINVOICE);
var ISADVANCEDPAY = form.findField('ISADVANCEDPAY').getValue();
sql = sql + getAndConSql(sql, ISADVANCEDPAY, "F.ISADVANCEDPAY=" + ISADVANCEDPAY);
var ISVOUALLNO = form.findField('ISVOUALLNO').getValue();
if (ISVOUALLNO != "") {
if (ISVOUALLNO == "1") {
sql = sql + getAndConSql(sql, ISVOUALLNO, "F.GID in (select BSGID from cw_vouno_bs_gl where BSTABLENAME='ch_fee')");
}
else if (ISVOUALLNO == "0") {
sql = sql + getAndConSql(sql, ISVOUALLNO, "F.GID not in (select BSGID from cw_vouno_bs_gl where BSTABLENAME='ch_fee')");
}
}
var VOUALLNO = form.findField('VOUALLNO').getValue();
if (VOUALLNO != "") {
sql = sql + getAndConSql(sql, VOUALLNO, "F.GID in (select BSGID from cw_vouno_bs_gl where BSTABLENAME='ch_fee' and VOUALLNO like '%" + VOUALLNO + "%')");
}
var PS_NODAY = form.findField('PS_NODAY').getValue();
if (PS_NODAY != "") {
if (this.NORPTSTLDATETYPE == '1') {
var nostldatestr = "EXISTS (select 1 from v_op_gain_sum WHERE v_op_gain_sum.BSNO = B.BSNO AND(v_op_gain_sum.TTLDR <> v_op_gain_sum.STLTTLDR OR v_op_gain_sum.TTLCR <> v_op_gain_sum.STLTTLCR) "
+ "AND(case OPDATE when '' then 0 else DATEDIFF([day], CASE WHEN B.STLDATE IS NULL THEN B.OPDATE ELSE B.STLDATE END, GETDATE()) END) >= " + PS_NODAY + ") ";
sql = sql + getAndConSql(sql, PS_NODAY, nostldatestr);
}
else {
var nostldatestr = "EXISTS (select 1 from v_op_gain_sum WHERE v_op_gain_sum.BSNO = B.BSNO AND(v_op_gain_sum.TTLDR <> v_op_gain_sum.STLTTLDR OR v_op_gain_sum.TTLCR <> v_op_gain_sum.STLTTLCR) "
+ "AND(case OPDATE when '' then 0 else DATEDIFF([day], [dbo].[GetCustOplbStlDay](B.OPDATE,F.CUSTOMERNAME,B.SALE,B.OPLBNAME), GETDATE()) END) >= " + PS_NODAY + ") ";
sql = sql + getAndConSql(sql, PS_NODAY, nostldatestr);
}
}
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 PS_BLNOTYPE = form.findField('BLNOTYPE').getValue();
if (PS_BLNOTYPE != '' && PS_INVNO == null && PS_INVNO == undefined) {
var PS_INVNO = form.findField('PS_INVNO').getValue();
if (PS_INVNO == '' || PS_INVNO == null || PS_INVNO == undefined) {
}
else {
if (PS_BLNOTYPE == 'INVOICENO') {
if (sql == '') {
sql = " (F.GID IN (SELECT FEEID FROM CH_FEE_DO WHERE BILLNO IN (SELECT BILLNO FROM CH_FEE_INVOICE WHERE INVOICENO='" + PS_INVNO + "')) "
sql = sql + " OR F.GID IN (SELECT FEEID FROM ch_fee_do_invoice WHERE BILLNO IN (SELECT BILLNO FROM ch_fee_invoicehexiao WHERE INVNO='" + PS_INVNO + "'))) "
}
else {
sql = sql + " AND (F.GID IN (SELECT FEEID FROM CH_FEE_DO WHERE BILLNO IN (SELECT BILLNO FROM CH_FEE_INVOICE WHERE INVOICENO='" + PS_INVNO + "')) "
sql = sql + " OR F.GID IN (SELECT FEEID FROM ch_fee_do_invoice WHERE BILLNO IN (SELECT BILLNO FROM ch_fee_invoicehexiao WHERE INVNO='" + PS_INVNO + "'))) "
}
} else {
sql = sql + getAndConSql(sql, PS_INVNO, " B." + PS_BLNOTYPE + " like '%" + PS_INVNO + "%' ");
}
}
}
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 == '已开票未结算') {
sql = ' isnull(f.INVOICE,0)<>0 and F.SETTLEMENT=0 '
} else if (FEERANGE == '未开票未申请未结算') {
sql = ' (isnull(f.INVOICE,0)=0 and F.SETTLEMENT=0 and isnull(f.ORDERAMOUNT,0)=0) '
} else 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=v_op_gain_sum.TTLDR) '
} else 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=v_op_gain_sum.TTLCR) '
} else if (FEERANGE == '应收全部结算(含更改单)') {
sql = ' EXISTS (select 1 from v_op_gain_sum_ttl WHERE v_op_gain_sum_ttl.BSNO=B.PARENTID AND v_op_gain_sum_ttl.STLTTLDR=v_op_gain_sum_ttl.TTLDR) '
} else if (FEERANGE == '应付全部结算(含更改单)') {
sql = ' EXISTS (select 1 from v_op_gain_sum_ttl WHERE v_op_gain_sum_ttl.BSNO=B.PARENTID AND v_op_gain_sum_ttl.STLTTLCR=v_op_gain_sum_ttl.TTLCR) '
}
}
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 + ' and (isnull(f.INVOICE,0)=0 and isnull(f.SETTLEMENT,0)<>0) '
} else if (FEERANGE == '已开票未结算') {
sql = sql + ' and (isnull(f.INVOICE,0)<>0 and F.SETTLEMENT=0 ) '
} else if (FEERANGE == '未开票未申请未结算') {
sql = sql + ' and (isnull(f.INVOICE,0)=0 and F.SETTLEMENT=0 and isnull(f.ORDERAMOUNT,0)=0) '
}else 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.STLTTLCR=0) '
} else 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=v_op_gain_sum.TTLDR) '
} else 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=v_op_gain_sum.TTLCR) '
} else if (FEERANGE == '应收全部结算(含更改单)') {
sql = sql + ' and EXISTS (select 1 from v_op_gain_sum_ttl WHERE v_op_gain_sum_ttl.BSNO=B.PARENTID AND v_op_gain_sum_ttl.STLTTLDR=v_op_gain_sum_ttl.TTLDR) '
} else if (FEERANGE == '应付全部结算(含更改单)') {
sql = sql + ' and EXISTS (select 1 from v_op_gain_sum_ttl WHERE v_op_gain_sum_ttl.BSNO=B.PARENTID AND v_op_gain_sum_ttl.STLTTLCR=v_op_gain_sum_ttl.TTLCR) '
}
}
}
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 == 2) {
sql = ' (F.FEESTATUS!=0 and F.FEESTATUS!=8 and F.FEESTATUS!=9) '
} else if (FSTATUS == 3) {
sql = ' (F.FEESTATUS=1) '
} else if (FSTATUS == 4) {
sql = ' (F.FEESTATUS=2) '
} else if (FSTATUS == 5) {
sql = ' (F.FEESTATUS=0) '
} else if (FSTATUS == 6) {
sql = ' (F.FEESTATUS=6) '
} else if (FSTATUS == 7) {
sql = ' (F.FEESTATUS=3) '
} else if (FSTATUS == 8) {
sql = ' (F.FEESTATUS=9) '
}
}
else {
if (FSTATUS == 1) {
sql = sql + ' and (F.FEESTATUS=0 or F.FEESTATUS=8 or F.FEESTATUS=9)'
} else if (FSTATUS == 2) {
sql = sql + ' and (F.FEESTATUS!=0 and F.FEESTATUS!=8 and F.FEESTATUS!=9) '
} else if (FSTATUS == 3) {
sql = sql + ' and (F.FEESTATUS=1) '
} else if (FSTATUS == 4) {
sql = sql + ' and (F.FEESTATUS=2) '
} else if (FSTATUS == 5) {
sql = sql + ' and (F.FEESTATUS=0) '
} else if (FSTATUS == 6) {
sql = sql + ' and (F.FEESTATUS=6) '
} else if (FSTATUS == 7) {
sql = sql + ' and (F.FEESTATUS=3) '
} else if (FSTATUS == 8) {
sql = sql + ' and (F.FEESTATUS=9) '
}
}
}
return sql;
},
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.panelBodyChFee) {
this.girdcolumsdr = DsTruck.SaveGridPanel(USERID, this.formname + 'dr', this.gridListDr.columns, this.girdcolumsdr, 1, true);
} else 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.panelSaleSum) {
this.girdcolumssale = DsTruck.SaveGridPanel(USERID, this.formname + 'sale', this.gridListSale.columns, this.girdcolumssale, 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.panelSaleCustSum) {
this.girdcolumscust = DsTruck.SaveGridPanel(USERID, this.formname + 'salecust', this.gridListSaleCust.columns, this.girdcolumssalecust, 1, true);
} else if (this.tabpanel.getActiveTab() == this.panelFeeListDr) {
this.girdcolumsfeedr = DsTruck.SaveGridPanel(USERID, this.formname + 'feedr', this.gridFeeListDr.columns, this.girdcolumsfeedr, 1, true);
} else if (this.tabpanel.getActiveTab() == this.panelFeeListCr) {
this.girdcolumsfeecr = DsTruck.SaveGridPanel(USERID, this.formname + 'feecr', this.gridFeeListCr.columns, this.girdcolumsfeecr, 1, true);
} else if (this.tabpanel.getActiveTab() == this.panelVesselSum) {
this.girdcolumsvessel = DsTruck.SaveGridPanel(USERID, this.formname + 'vessel', this.gridListVessel.columns, this.girdcolumsvessel, 1, true);
} else if (this.tabpanel.getActiveTab() == this.panelSaleDeptSum) {
this.girdcolumssaledept = DsTruck.SaveGridPanel(USERID, this.formname + 'saledept', this.gridListSaleDept.columns, this.girdcolumssaledept, 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.panelBodyChFee) {
this.gridListDr.reconfigure(this.storeListDr, this.initgirdcolumsdr);
this.girdcolumsdr = DsTruck.SaveGridPanel(USERID, this.formname + 'dr', this.gridListDr.columns, this.initgirdcolumsdr, 1, true);
this.gridListSum.reconfigure(this.storeSumList, this.initgirdcolumssum);
this.girdcolumssum = DsTruck.SaveGridPanel(USERID, this.formname + 'sum', this.gridListSum.columns, this.initgirdcolumssum, 1, true);
} else 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.panelSaleSum) {
this.gridListSale.reconfigure(this.storeSaleList, this.initgirdcolumssale);
this.girdcolumssale = DsTruck.SaveGridPanel(USERID, this.formname + 'sale', this.gridListSale.columns, this.initgirdcolumssale, 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.panelSaleCustSum) {
this.gridListSaleCust.reconfigure(this.storeSaleCustList, this.initgirdcolumssalecust);
this.girdcolumssalecust = DsTruck.SaveGridPanel(USERID, this.formname + 'salecust', this.gridListSaleCust.columns, this.initgirdcolumssalecust, 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);
} else if (this.tabpanel.getActiveTab() == this.panelFeeListCr) {
this.gridFeeListCr.reconfigure(this.storeFeeListCr, this.initgirdcolumsfeecr);
this.girdcolumsfeecr = DsTruck.SaveGridPanel(USERID, this.formname + 'feecr', this.gridFeeListCr.columns, this.initgirdcolumsfeecr, 1, true);
} else if (this.tabpanel.getActiveTab() == this.panelVesselSum) {
this.gridListVessel.reconfigure(this.storeVesselList, this.initgirdcolumsvessel);
this.girdcolumsvessel = DsTruck.SaveGridPanel(USERID, this.formname + 'vessel', this.gridListVessel.columns, this.initgirdcolumsvessel, 1, true);
} else if (this.tabpanel.getActiveTab() == this.panelSaleDeptSum) {
this.gridListSaleDept.reconfigure(this.storeSaleDeptList, this.initgirdcolumssaledept);
this.girdcolumssaledept = DsTruck.SaveGridPanel(USERID, this.formname + 'saledept', this.gridListSaleDept.columns, this.initgirdcolumssaledept, 1, true);
}
},
//onExportClick: function (button, event) {
// _this = this;
// if (this.tabpanel.getActiveTab() == this.panelBodyChFee) {
// GridExportExcelPage(this.gridListDr);
// } else if (this.tabpanel.getActiveTab() == this.panelBodyChFeeCr) {
// GridExportExcelPage(this.gridListCr);
// } else if (this.tabpanel.getActiveTab() == this.panelSaleSum) {
// GridExportExcelPage(this.gridListSale);
// } else if (this.tabpanel.getActiveTab() == this.panelCustSum) {
// GridExportExcelPage(this.gridListCust);
// } else if (this.tabpanel.getActiveTab() == this.panelSaleCustSum) {
// GridExportExcelPage(this.gridListSaleCust);
// } else if (this.tabpanel.getActiveTab() == this.panelFeeListDr) {
// GridExportExcelPage(this.gridFeeListDr);
// } else if (this.tabpanel.getActiveTab() == this.panelFeeListCr) {
// GridExportExcelPage(this.gridFeeListCr);
// } else if (this.tabpanel.getActiveTab() == this.panelVesselSum) {
// GridExportExcelPage(this.gridListVessel);
// } else if (this.tabpanel.getActiveTab() == this.panelSaleDeptSum) {
// GridExportExcelPage(this.gridListSaleDept);
// }
// // _this = this;
// // Ext.Msg.wait('正在组织数据, 请稍侯..');
// // Ext.Ajax.request({
// // waitMsg: '正在组织数据...',
// // url: '/MvcShipping/MsRptNoTotal/GetSqlStr',
// // scope: this,
// // params: {
// // condition: _this.sqlcontext
// // },
// // callback: function (options, success, response) {
// // if (success) {
// // Ext.MessageBox.hide();
// // var jsonresult = Ext.JSON.decode(response.responseText);
// // if (jsonresult.Success) {
// // var sql = jsonresult.Data;
// // if (sql != "") {
// // var openSet = "height=1, width=400, toolbar=no, menubar=no,scrollbars=no, resizable=no,location=no, status=no,Top=" + (screen.height - 200) / 2 + ",Left=" + (screen.width - 400) / 2;
// // var openType = "_blank";
// // var openUrl = "../../Reports/RptExport.aspx?handle=MsRptNoTotalIndex&formname=" + this.formname + "&condition1=" + sql;
// // window.open(openUrl, openType, openSet);
// // }
// // } 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
// // });
// // }
// // }
// // });
//},
//根据禁止应收,禁止应付权限,设置显示
IsNoDrCr: function () {
_this = this;
Ext.Ajax.request({
waitMsg: '正在组织数据...',
url: '/MvcShipping/MsRptNoTotal/GetNoDrCrAuth',
scope: this,
async: false,
callback: function (options, success, response) {
if (success) {
var jsonresult = Ext.JSON.decode(response.responseText);
if (jsonresult.Success) {
_this.bNoDrCr = jsonresult.noDrCr;
switch (_this.bNoDrCr) {
case "11":
_this.gridListCr.hidden = true;
_this.gridListDr.hidden = true;
_this.gridFeeListDr.hidden = true;
_this.gridFeeListCr.hidden = true;
_this.panelBodyChFee.hidden = true;
_this.panelBodyChFeeCr.hidden = true;
_this.panelFeeListDr.hidden = true;
_this.panelFeeListCr.hidden = true;
//_this.panelCustSum.hidden = true;
//_this.panelSaleSum.hidden = true;
//_this.panelSaleCustSum.hidden = true;
//_this.panelVesselSum.hidden = true;
//_this.panelSaleDeptSum.hidden = true;
break;
case "10":
_this.panelBodyChFee.hidden = true;
_this.panelFeeListDr.hidden = true;
//_this.panelCustSum.hidden = true;
//_this.panelSaleSum.hidden = true;
//_this.panelSaleCustSum.hidden = true;
//_this.panelVesselSum.hidden = true;
//_this.panelSaleDeptSum.hidden = true;
break;
case "01":
_this.panelBodyChFeeCr.hidden = true;
_this.panelFeeListCr.hidden = true;
//_this.panelCustSum.hidden = true;
//_this.panelSaleSum.hidden = true;
//_this.panelSaleCustSum.hidden = true;
//_this.panelVesselSum.hidden = true;
//_this.panelSaleDeptSum.hidden = true;
break;
default:
break;
}
}
} else {
Ext.Msg.show({
title: '请重试',
msg: '服务器响应出错',
icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK
});
}
}
});
},
SetCurActiveTab() {
if (this.bNoDrCr == "11")
this.tabpanel.setActiveTab(this.panelCustSum);
else if (this.bNoDrCr == "10")
this.tabpanel.setActiveTab(this.panelBodyChFeeCr);
else if (this.bNoDrCr == "01")
this.tabpanel.setActiveTab(this.panelBodyChFee);
},
onExportClick: function () {
var sql = this.sqlcontext;
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 amendstr = 'false';
if (this.CheckAmend.checked == true) amendstr = 'true';
var sortstr = ' CUSTNAME,OPDATE,MBLNO';
if (this.bslistdrsortfield != '' && this.bslistdrsortdire != '') {
sortstr = this.bslistdrsortfield + ' ' + this.bslistdrsortdire;
}
Ext.Msg.wait('正在组织数据, 请稍侯..');
Ext.Ajax.request({
waitMsg: '正在组织数据...',
url: '/MvcShipping/MsRptNoTotal/BsListData',
scope: this,
params: {
start: 0, limit: this.PageSize,
condition: Drsql,
printstr: 'true',
sortstr: sortstr,
amendstr: amendstr
},
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 = 'MSRPTNOTOTALLISTDR';
var sql1 = returnstr;
sql1 = sql1.replace(/\+/g, "@@@")
if (sql1 != '') {
GridExportBySql(sql1, this.formname + 'dr', '欠费统计-应收列表.xls');
//var openSet = "height=1, width=400, toolbar=no, menubar=no,scrollbars=no, resizable=no,location=no, status=no,Top=" + (screen.height - 200) / 2 + ",Left=" + (screen.width - 400) / 2;
//var openType = "_blank";
// var openUrl = "../../Reports/RptExport.aspx?handle=DsRptExcel&formname=" + this.formname + 'dr'+ "&condition1=" + sql1;
//window.open(openUrl, openType, openSet);
}
} 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.getActiveTab() == this.panelBodyChFeeCr) {
if (this.storeListCr.getCount() == 0) {
return;
}
var sortstr = ' CUSTNAME,OPDATE,MBLNO';
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: Crsql,
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;
sql1 = sql1.replace(/\+/g, "@@@")
if (sql1 != '') {
GridExportBySql(sql1, this.formname + 'cr', '欠费统计-应付列表.xls');
//var openSet = "height=1, width=400, toolbar=no, menubar=no,scrollbars=no, resizable=no,location=no, status=no,Top=" + (screen.height - 200) / 2 + ",Left=" + (screen.width - 400) / 2;
//var openType = "_blank";
//var openUrl = "../../Reports/RptExport.aspx?handle=DsRptExcel&formname=" + this.formname + 'cr' + "&condition1=" + sql1;
//window.open(openUrl, openType, openSet);
}
} 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.panelSaleSum) {
if (this.storeSaleList.getCount() == 0) {
return;
}
var sortstr = ' SALE';
if (this.salesumsortfield != '' && this.salesumsortdire != '') {
sortstr = this.salesumsortfield + ' ' + this.salesumsortdire;
}
Ext.Msg.wait('正在组织数据, 请稍侯..');
Ext.Ajax.request({
waitMsg: '正在组织数据...',
url: '/MvcShipping/MsRptNoTotal/SaleListData',
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 = 'MSRPTNOTOTALSALE';
var sql1 = returnstr;
sql1 = sql1.replace(/\+/g, "@@@")
if (sql1 != '') {
GridExportBySql(sql1, this.formname + 'sale', '欠费统计-揽货人.xls');
//var openSet = "height=1, width=400, toolbar=no, menubar=no,scrollbars=no, resizable=no,location=no, status=no,Top=" + (screen.height - 200) / 2 + ",Left=" + (screen.width - 400) / 2;
//var openType = "_blank";
//var openUrl = "../../Reports/RptExport.aspx?handle=DsRptExcel&formname=" + this.formname + 'sale' + "&condition1=" + sql1;
//window.open(openUrl, openType, openSet);
}
} 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.panelCustSum) {
if (this.storeCustList.getCount() == 0) {
return;
}
var sortstr = ' CUSTNAME';
if (this.custsumsortfield != '' && this.custsumsortdire != '') {
sortstr = this.custsumsortfield + ' ' + this.custsumsortdire;
}
Ext.Msg.wait('正在组织数据, 请稍侯..');
Ext.Ajax.request({
waitMsg: '正在组织数据...',
url: '/MvcShipping/MsRptNoTotal/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 = 'MSRPTNOTOTALCUST';
var sql1 = returnstr;
sql1 = sql1.replace(/\+/g, "@@@")
if (sql1 != '') {
GridExportBySql(sql1, this.formname + 'cust', '欠费统计-客户.xls');
//var openSet = "height=1, width=400, toolbar=no, menubar=no,scrollbars=no, resizable=no,location=no, status=no,Top=" + (screen.height - 200) / 2 + ",Left=" + (screen.width - 400) / 2;
//var openType = "_blank";
//var openUrl = "../../Reports/RptExport.aspx?handle=DsRptExcel&formname=" + this.formname + 'cust' + "&condition1=" + sql1;
//window.open(openUrl, openType, openSet);
}
} 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.panelSaleCustSum) {
if (this.storeSaleCustList.getCount() == 0) {
return;
}
var sortstr = ' SALE';
if (this.salecustsumsortfield != '' && this.salecustsumsortdire != '') {
sortstr = this.salecustsumsortfield + ' ' + this.salecustsumsortdire;
}
Ext.Msg.wait('正在组织数据, 请稍侯..');
Ext.Ajax.request({
waitMsg: '正在组织数据...',
url: '/MvcShipping/MsRptNoTotal/SaleCustListData',
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 = 'MSRPTNOTOTALSALECUST';
var sql1 = returnstr;
sql1 = sql1.replace(/\+/g, "@@@")
if (sql1 != '') {
GridExportBySql(sql1, this.formname + 'salecust', '欠费统计-揽货人客户.xls');
//var openSet = "height=1, width=400, toolbar=no, menubar=no,scrollbars=no, resizable=no,location=no, status=no,Top=" + (screen.height - 200) / 2 + ",Left=" + (screen.width - 400) / 2;
//var openType = "_blank";
//var openUrl = "../../Reports/RptExport.aspx?handle=DsRptExcel&formname=" + this.formname + 'salecust' + "&condition1=" + sql1;
//window.open(openUrl, openType, openSet);
}
} 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.panelFeeListDr) {
if (this.storeFeeListDr.getCount() == 0) {
return;
}
var sortstr = ' CUSTOMERNAME,OPDATE';
if (this.feelistdrsortfield != '' && this.feelistdrsortdire != '') {
sortstr = this.feelistdrsortfield + ' ' + this.feelistdrsortdire;
}
Ext.Msg.wait('正在组织数据, 请稍侯..');
Ext.Ajax.request({
waitMsg: '正在组织数据...',
url: '/MvcShipping/MsRptNoTotal/FeeListData',
scope: this,
params: {
start: 0, limit: this.PageSize,
condition: Drsql,
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;
sql1 = sql1.replace(/\+/g, "@@@")
if (sql1 != '') {
GridExportBySql(sql1, this.formname + 'feedr', '欠费统计-应收费用明细.xls');
//var openSet = "height=1, width=400, toolbar=no, menubar=no,scrollbars=no, resizable=no,location=no, status=no,Top=" + (screen.height - 200) / 2 + ",Left=" + (screen.width - 400) / 2;
//var openType = "_blank";
//var openUrl = "../../Reports/RptExport.aspx?handle=DsRptExcel&formname=" + this.formname + 'feedr' + "&condition1=" + sql1;
//window.open(openUrl, openType, openSet);
}
} 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: Crsql,
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;
sql1 = sql1.replace(/\+/g, "@@@")
if (sql1 != '') {
GridExportBySql(sql1, this.formname + 'feecr', '欠费统计-应付费用明细.xls');
//var openSet = "height=1, width=400, toolbar=no, menubar=no,scrollbars=no, resizable=no,location=no, status=no,Top=" + (screen.height - 200) / 2 + ",Left=" + (screen.width - 400) / 2;
//var openType = "_blank";
//var openUrl = "../../Reports/RptExport.aspx?handle=DsRptExcel&formname=" + this.formname + 'feecr' + "&condition1=" + sql1;
//window.open(openUrl, openType, openSet);
}
} 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.panelVesselSum) {
if (this.storeVesselList.getCount() == 0) {
return;
}
var sortstr = ' VESSEL,VOYNO';
if (this.vesselsumsortfield != '' && this.vesselsumsortdire != '') {
sortstr = this.vesselsumsortfield + ' ' + this.vesselsumsortdire;
}
Ext.Msg.wait('正在组织数据, 请稍侯..');
Ext.Ajax.request({
waitMsg: '正在组织数据...',
url: '/MvcShipping/MsRptNoTotal/VesselVoyListData',
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 = 'MSRPTNOTOTALVESSELVOY';
var sql1 = returnstr;
sql1 = sql1.replace(/\+/g, "@@@")
if (sql1 != '') {
GridExportBySql(sql1, this.formname + 'vessel', '欠费统计-船名航次.xls');
//var openSet = "height=1, width=400, toolbar=no, menubar=no,scrollbars=no, resizable=no,location=no, status=no,Top=" + (screen.height - 200) / 2 + ",Left=" + (screen.width - 400) / 2;
//var openType = "_blank";
//var openUrl = "../../Reports/RptExport.aspx?handle=DsRptExcel&formname=" + this.formname + 'vessel' + "&condition1=" + sql1;
//window.open(openUrl, openType, openSet);
}
} 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.panelSaleDeptSum) {
if (this.storeSaleDeptList.getCount() == 0) {
return;
}
var sortstr = ' SALEDEPT';
//if (this.salesumsortfield != '' && this.salesumsortdire != '') {
// sortstr = this.salesumsortfield + ' ' + this.salesumsortdire;
//}
Ext.Msg.wait('正在组织数据, 请稍侯..');
Ext.Ajax.request({
waitMsg: '正在组织数据...',
url: '/MvcShipping/MsRptNoTotal/DeptListData',
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 = 'MSRPTNOTOTALSALEDEPT';
var sql1 = returnstr;
sql1 = sql1.replace(/\+/g, "@@@")
if (sql1 != '') {
GridExportBySql(sql1, this.formname + 'saledept', '欠费统计-部门.xls');
//var openSet = "height=1, width=400, toolbar=no, menubar=no,scrollbars=no, resizable=no,location=no, status=no,Top=" + (screen.height - 200) / 2 + ",Left=" + (screen.width - 400) / 2;
//var openType = "_blank";
//var openUrl = "../../Reports/RptExport.aspx?handle=DsRptExcel&formname=" + this.formname + 'saledept' + "&condition1=" + sql1;
//window.open(openUrl, openType, openSet);
}
} 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
});
}
}
});
}
},
Print: function () {
var sql = this.sqlcontext;
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 = ' CUSTNAME,OPDATE,MBLNO';
if (this.bslistdrsortfield != '' && this.bslistdrsortdire != '') {
sortstr = this.bslistdrsortfield + ' ' + this.bslistdrsortdire;
}
Ext.Msg.wait('正在组织数据, 请稍侯..');
Ext.Ajax.request({
waitMsg: '正在组织数据...',
url: '/MvcShipping/MsRptNoTotal/BsListData',
scope: this,
params: {
start: 0, limit: this.PageSize,
condition: Drsql,
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 = 'MSRPTNOTOTALLISTDR';
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.getActiveTab() == this.panelBodyChFeeCr) {
if (this.storeListCr.getCount() == 0) {
return;
}
var sortstr = ' CUSTNAME,OPDATE,MBLNO';
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: Crsql,
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.panelSaleSum) {
if (this.storeSaleList.getCount() == 0) {
return;
}
var sortstr = ' B.SALE';
if (this.salesumsortfield != '' && this.salesumsortdire != '') {
sortstr = this.salesumsortfield + ' ' + this.salesumsortdire;
}
Ext.Msg.wait('正在组织数据, 请稍侯..');
Ext.Ajax.request({
waitMsg: '正在组织数据...',
url: '/MvcShipping/MsRptNoTotal/SaleListData',
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 = 'MSRPTNOTOTALSALE';
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.panelCustSum) {
if (this.storeCustList.getCount() == 0) {
return;
}
var sortstr = ' F.CUSTOMERNAME';
if (this.custsumsortfield != '' && this.custsumsortdire != '') {
sortstr = this.custsumsortfield + ' ' + this.custsumsortdire;
}
Ext.Msg.wait('正在组织数据, 请稍侯..');
Ext.Ajax.request({
waitMsg: '正在组织数据...',
url: '/MvcShipping/MsRptNoTotal/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 = 'MSRPTNOTOTALCUST';
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.panelSaleCustSum) {
if (this.storeSaleCustList.getCount() == 0) {
return;
}
var sortstr = ' B.SALE';
if (this.salecustsumsortfield != '' && this.salecustsumsortdire != '') {
sortstr = this.salecustsumsortfield + ' ' + this.salecustsumsortdire;
}
Ext.Msg.wait('正在组织数据, 请稍侯..');
Ext.Ajax.request({
waitMsg: '正在组织数据...',
url: '/MvcShipping/MsRptNoTotal/SaleCustListData',
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 = 'MSRPTNOTOTALSALECUST';
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.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('正在组织数据, 请稍侯..');
Ext.Ajax.request({
waitMsg: '正在组织数据...',
url: '/MvcShipping/MsRptNoTotal/FeeListData',
scope: this,
params: {
start: 0, limit: this.PageSize,
condition: Drsql,
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
});
}
}
});
} else if (this.tabpanel.activeTab == this.panelFeeListCr) {
if (this.storeFeeListCr.getCount() == 0) {
return;
}
var sortstr = ' F.CUSTOMERNAME,B.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: Crsql,
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
});
}
}
});
} else if (this.tabpanel.activeTab == this.panelVesselSum) {
if (this.storeVesselList.getCount() == 0) {
return;
}
var sortstr = ' B.VESSEL,B.VOYNO';
if (this.vesselsumsortfield != '' && this.vesselsumsortdire != '') {
sortstr = this.vesselsumsortfield + ' ' + this.vesselsumsortdire;
}
Ext.Msg.wait('正在组织数据, 请稍侯..');
Ext.Ajax.request({
waitMsg: '正在组织数据...',
url: '/MvcShipping/MsRptNoTotal/VesselVoyListData',
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 = 'MSRPTNOTOTALVESSELVOY';
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.panelSaleDeptSum) {
if (this.storeSaleDeptList.getCount() == 0) {
return;
}
var sortstr = ' B.SALEDEPT';
//if (this.salesumsortfield != '' && this.salesumsortdire != '') {
// sortstr = this.salesumsortfield + ' ' + this.salesumsortdire;
//}
Ext.Msg.wait('正在组织数据, 请稍侯..');
Ext.Ajax.request({
waitMsg: '正在组织数据...',
url: '/MvcShipping/MsRptNoTotal/DeptListData',
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 = 'MSRPTNOTOTALSALEDEPT';
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
});
}
}
});
}
}
});