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/MsRptLhRptList/MsRptLhRptListIndex.js

5530 lines
212 KiB
JavaScript

//集运管理-路单查询
Ext.namespace('Shipping');
Shipping.MsRptLhRptListIndex = function (config) {
Ext.applyIf(this, config);
this.initUIComponents();
window.Shipping.MsRptLhRptListIndex.superclass.constructor.call(this);
};
Ext.extend(Shipping.MsRptLhRptListIndex, Ext.Panel, {
PageSize: 100,
OprationStatus: null, //仅当弹出界面时使用
SelectedRecord: null,
sqlcontext: '1=2',
sqlcontext2: '1=2',
feesqlcontext:'',
bslistsortfield: '',
bslistsortdire: '',
salelistsortfield: '',
salelistsortdire: '',
custlistsortfield: '',
custlistsortdire: '',
deptlistsortfield: '',
deptlistsortdire: '',
oplistsortfield: '',
oplistsortdire: '',
bssourcelistsortfield: '',
bssourcelistsortdire: '',
bssourcedetaillistsortfield: '',
bssourcedetaillistsortdire: '',
carrierlistsortfield: '',
carrierlistsortdire: '',
lanelistsortfield: '',
lanelistsortdire: '',
destinationlistsortfield: '',
destinationlistsortdire: '',
custservicelistsortfield: '',
custservicelistsortdire: '',
initUIComponents: function () {
this.isquery = false;
Ext.Ajax.timeout = 120000;
this.formname = 'MsRptLhRptListIndex';
this.storectndisp = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CtnDispModel',
proxy: { url: '/CommMng/BasicDataRef/GetCtnDisp' }
});
this.sqlcontext = '1=2';
this.sqlcontext2 = '1=2';
//定义数据集
this.storeList = Ext.create('Ext.data.Store', {
pageSize: this.PageSize,
fields: [
{ name: 'BSNO', type: 'string' },
{ name: 'OPTYPE', type: 'string' },
{ name: 'OPLBNAME', type: 'string' },
{ name: 'CUSTOMERNAME', type: 'string' },
{ name: 'CUSTNAME', type: 'string' },
{ name: 'CUSTNO', type: 'string' },
{ name: 'MBLNO', type: 'string' },
{ name: 'BILLNO', type: 'string' },
{ name: 'SETTLETIME', type: 'string' },
{ name: 'SALE', type: 'string' },
{ name: 'OPDATE', type: 'string' },
{ name: 'ACCDATE', type: 'string' },
{ name: 'CARRIER', type: 'string' },
{ name: 'BSSOURCE', type: 'string' },
{ name: 'ISWP', type: 'string' },
{ name: 'TTLNODR', type: 'string' },
{ name: 'CRDAY', type: 'number' },
{ name: 'GRACEDAY', type: 'number' },
{ name: 'EXRATE', type: 'number' },
{ name: 'STLRMB', type: 'number' },
{ name: 'STLUSD', type: 'number' },
{ name: 'STLTTL', type: 'number' },
{ name: 'HKDAYS', type: 'number' },
{ name: 'ZYCB', type: 'number' },
{ name: 'INTERESTDAYS', type: 'number' },
{ name: 'HXDAYS', type: 'number' },
{ name: 'CQLX', type: 'number' }
],
remoteSort: true,
proxy: {
type: 'ajax',
timeout: 1200000,
url: '/MvcShipping/MsRptLhRptList/LhRptListData',
reader: {
id: '',
root: 'data',
totalProperty: 'totalCount'
}
}
});
//定义Grid
this.initgirdcolums = [{
sortable: true,
dataIndex: 'BSNO',
text: Zi.LAN.BSNO,
//text:'编号',
hidden: true,
width: 130
}, {
sortable: true,
dataIndex: 'OPTYPE',
text: '更改单',
width: 70
}, {
sortable: true,
dataIndex: 'OPLBNAME',
text: Zi.LAN.OPLBNAME,
width: 70
}, {
sortable: true,
dataIndex: 'CUSTOMERNAME',
text: Zi.LAN.CUSTOMERNAME,
//text:'委托单位',
width: 120
}, {
sortable: true,
dataIndex: 'CUSTNAME',
text: '结算单位',
//text:'报关日期',
width: 86
}, {
sortable: true,
dataIndex: 'BILLNO',
text: '结算单号',
//text:'报关日期',
width: 86
}, {
sortable: true,
dataIndex: 'SETTLETIME',
text: '结算日期',
//text:'报关日期',
width: 86
}, {
sortable: true,
dataIndex: 'CUSTNO',
text: Zi.LAN.CUSTNO,
//text:'委托编号',
width: 136
}, {
sortable: true,
dataIndex: 'MBLNO',
text: '提单号',
//text:'主提单号',
width: 120
}, {
sortable: true,
dataIndex: 'OPDATE',
text:'开船日期',
//text:'开船日期',
width: 86
}, {
sortable: true,
dataIndex: 'SALE',
text: Zi.LAN.SALE,
//text:'业务员',
width: 80
}, {
sortable: true,
dataIndex: 'ACCDATE',
text: Zi.LAN.ACCDATE,
//text:'会计期间',
width: 80
}, {
sortable: true,
dataIndex: 'CARRIER',
text: Zi.LAN.CARRIER,
//text:'船公司',
width: 80
}, {
sortable: true,
dataIndex: 'BSSOURCE',
text: Zi.LAN.BSSOURCE,
//text:'业务来源',
width: 120
}, {
sortable: true,
dataIndex: 'CRDAY',
text: '应付账期',
//text:'业务来源',
width: 120
}, {
sortable: true,
dataIndex: 'GRACEDAY',
text: '宽限天数',
//text:'业务来源',
width: 120
}, {
sortable: true,
dataIndex: 'INTERESTDAYS',
text: '计息天数',
//text:'业务来源',
width: 120
}, {
sortable: true,
dataIndex: 'HXDAYS',
text: '核销天数',
//text:'业务来源',
width: 120
}, {
sortable: true,
dataIndex: 'STLRMB',
text: 'RMB实收',
//text:'业务来源',
width: 120,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
summaryType: 'sum', align: 'right',
summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
value = usMoney(value, 2, '', true);
return value;
}
}, {
sortable: true,
dataIndex: 'STLUSD',
text: 'USD实收',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
//text:'业务来源',
width: 120,
summaryType: 'sum', align: 'right',
summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
value = usMoney(value, 2, '', true);
return value;
}
}, {
sortable: true,
dataIndex: 'STLTTL',
text: '合计实收',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
//text:'业务来源',
width: 120,
summaryType: 'sum', align: 'right',
summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
value = usMoney(value, 2, '', true);
return value;
}
}, {
sortable: true,
dataIndex: 'HKDAYS',
text: '回款天数',
//text:'业务来源',
width: 120,
summaryType: 'average', align: 'right',
summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
value = usMoney(value, 2, '', true);
return value;
}
}, {
sortable: true,
dataIndex: 'ZYCB',
text: '资金占用成本',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
//text:'业务来源',
width: 120,
summaryType: 'sum', align: 'right',
summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
value = usMoney(value, 2, '', true);
return value;
}
}, {
sortable: true,
dataIndex: 'EXRATE',
text: '汇率',
//text:'业务来源',
width: 120
}, {
sortable: true,
dataIndex: 'TTLNODR',
text: '是否全部应收款回款',
//text:'业务来源',
width: 120
}, {
sortable: true,
dataIndex: 'ISWP',
text: '是否外配',
//text:'业务来源',
width: 120
}, {
sortable: true,
dataIndex: 'CQLX',
text: '超期利息',
//text:'业务来源',
width: 120,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
summaryType: 'sum', align: 'right',
summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
value = usMoney(value, 2, '', true);
return value;
}
}];
this.Pagenum = Ext.create('Ext.form.field.Number', {
name: 'bottles',
//fieldLabel: Zi.LAN.PS_OPLB,
//fieldLabel: '每页记录数',
fieldLabel: Zi.LAN.PageNum,
//fieldLabel: Zi.LAN.MYJLS,
labelAlign: 'right',
value: this.PageSize,
maxValue: 100000,
width: 180,
minValue: 0,
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
});
// this.girdcolums = this.initgirdcolums;
this.girdcolums = DsTruck.GetGridPanel(USERID, this.formname + 'bs', this.initgirdcolums, 1);
this.gridList = new Ext.grid.GridPanel({
store: this.storeList,
enableHdMenu: false,
region: 'center',
loadMask: { msg: Zi.LAN.LOADING },
trackMouseOver: true,
disableSelection: false,
viewConfig: {
enableTextSelection: true, //允许复制数据
autoFill: true
},
features: [{
ftype: 'summary'//Ext.grid.feature.Summary表格汇总特性
}],
columns: this.girdcolums,
// paging bar on the bottom
bbar: [Ext.create('Ext.PagingToolbar', {
store: this.storeList,
displayInfo: true,
displayMsg: Zi.LAN.displayMsg,//'当前显示 {0} - {1}条记录 /共 {2}条记录'
emptyMsg: Zi.LAN.emptyMsg//"没有数据"
}), this.Pagenum]
});
// this.girdcolums = DsTruck.GetGridPanel(USERID, this.formname + 'bs', this.girdcolums, 1);
// this.gridList.reconfigure(this.storeList, this.girdcolums);
this.gridList.addListener('itemdblclick', function (dataview, record, item, index, e, b) {
this.SelectedRecord = record;
var openSet = "height=700, width=1024, toolbar=no, menubar=no,scrollbars=1, resizable=1,location=no, status=no,Top= " + (screen.height - 750) / 2 + ",Left= " + (screen.width - 1100) / 2
var openType = "_blank";
var openUrl = "";
if (record.data.OPLBNAME == "报关业务") {
openUrl = "../MvcShipping/MsOpApply/ApplyFeeView?handle=check&bsno=" + record.data.BSNO;
} else {
openUrl = "../MvcShipping/MsOpBill/MsOpFeeView?handle=check&bsno=" + record.data.BSNO;
}
window.open(openUrl, openType, openSet);
}, this);
this.gridList.addListener('sortchange', function (ct, column, direction, eOpts) {
this.bslistsortfield = column.dataIndex;
this.bslistsortdire = direction;
}, this);
this.storeCustomerNameList = Ext.create('Ext.data.Store', {
pageSize: this.PageSize,
fields: [
{ name: 'CUSTOMERNAME', type: 'string' },
{ name: 'CRDAY', type: 'number' },
{ name: 'GRACEDAY', type: 'number' },
{ name: 'EXRATE', type: 'number' },
{ name: 'STLRMB', type: 'number' },
{ name: 'STLUSD', type: 'number' },
{ name: 'STLTTL', type: 'number' },
{ name: 'HKDAYS', type: 'number' },
{ name: 'ZYCB', type: 'number' },
{ name: 'CQLX', type: 'number' }
],
remoteSort: true,
proxy: {
type: 'ajax',
timeout: 1200000,
url: '/MvcShipping/MsRptLhRptList/CustomerNameLhRptListData',
reader: {
id: '',
root: 'data',
totalProperty: 'totalCount'
}
}
});
//定义Grid
this.initgirdcolumscustomername = [{
sortable: true,
dataIndex: 'CUSTOMERNAME',
text: Zi.LAN.CUSTOMERNAME,
//text:'委托单位',
width: 80
}, {
sortable: true,
dataIndex: 'STLRMB',
text: 'RMB实收',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
//text:'业务来源',
width: 120,
summaryType: 'sum', align: 'right',
summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
value = usMoney(value, 2, '', true);
return value;
}
}, {
sortable: true,
dataIndex: 'STLUSD',
text: 'USD实收',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
//text:'业务来源',
width: 120,
summaryType: 'sum', align: 'right',
summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
value = usMoney(value, 2, '', true);
return value;
}
}, {
sortable: true,
dataIndex: 'STLTTL',
text: '合计实收',
//text:'业务来源',
width: 120,
summaryType: 'sum', align: 'right',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
value = usMoney(value, 2, '', true);
return value;
}
}, {
sortable: true,
dataIndex: 'HKDAYS',
text: '回款天数',
//text:'业务来源',
width: 120,
summaryType: 'average', align: 'right',
summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
value = usMoney(value, 2, '', true);
return value;
}
}, {
sortable: true,
dataIndex: 'ZYCB',
text: '资金占用成本',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
//text:'业务来源',
width: 120,
summaryType: 'sum', align: 'right',
summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
value = usMoney(value, 2, '', true);
return value;
}
}, {
sortable: true,
dataIndex: 'CQLX',
text: '超期利息',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
//text:'业务来源',
width: 120,
summaryType: 'sum', align: 'right',
summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
value = usMoney(value, 2, '', true);
return value;
}
}
];
// this.girdcolumscust = this.initgirdcolumscust;
this.girdcolumscustomername = DsTruck.GetGridPanel(USERID, this.formname + 'customername', this.initgirdcolumscustomername, 1);
this.gridListCustomerName = new Ext.grid.GridPanel({
store: this.storeCustomerNameList,
enableHdMenu: false,
region: 'center',
loadMask: { msg: Zi.LAN.LOADING },//loadMask: { msg: Zi.LAN.LOADING },//msg: Zi.LAN.LOADING 数据加载中,请稍等...
trackMouseOver: true,
viewConfig: {
enableTextSelection: true, //允许复制数据
autoFill: true
},
features: [{
ftype: 'summary'//Ext.grid.feature.Summary表格汇总特性
}],
disableSelection: false,
columns: this.girdcolumscustomername,
// paging bar on the bottom
bbar: Ext.create('Ext.PagingToolbar', {
store: this.storeCustomerNameList,
displayInfo: true,
displayMsg: Zi.LAN.displayMsg,//'当前显示 {0} - {1}条记录 /共 {2}条记录'
emptyMsg: Zi.LAN.emptyMsg//"没有数据"
})
});
// this.gridListCust.reconfigure(this.storeCustList, this.girdcolumscust);
this.gridListCustomerName.addListener('sortchange', function (ct, column, direction, eOpts) {
this.customernamelistsortfield = column.dataIndex;
this.customernamelistsortdire = direction;
}, this);
this.storeCustList = Ext.create('Ext.data.Store', {
pageSize: this.PageSize,
fields: [
{ name: 'CUSTNAME', type: 'string' },
{ name: 'STLRMB', type: 'number' },
{ name: 'STLUSD', type: 'number' },
{ name: 'STLTTL', type: 'number' },
{ name: 'HKDAYS', type: 'number' },
{ name: 'ZYCB', type: 'number' },
{ name: 'CQLX', type: 'number' }
],
remoteSort: true,
proxy: {
type: 'ajax',
timeout: 1200000,
url: '/MvcShipping/MsRptLhRptList/CustNameLhRptListData',
reader: {
id: '',
root: 'data',
totalProperty: 'totalCount'
}
}
});
//定义Grid
this.initgirdcolumscust = [{
sortable: true,
dataIndex: 'CUSTNAME',
text: '结算单位',
width: 120
}, {
sortable: true,
dataIndex: 'STLRMB',
text: 'RMB实收',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
//text:'业务来源',
width: 120,
summaryType: 'sum', align: 'right',
summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
value = usMoney(value, 2, '', true);
return value;
}
}, {
sortable: true,
dataIndex: 'STLUSD',
text: 'USD实收',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
//text:'业务来源',
width: 120,
summaryType: 'sum', align: 'right',
summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
value = usMoney(value, 2, '', true);
return value;
}
}, {
sortable: true,
dataIndex: 'STLTTL',
text: '合计实收',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
//text:'业务来源',
width: 120,
summaryType: 'sum', align: 'right',
summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
value = usMoney(value, 2, '', true);
return value;
}
}, {
sortable: true,
dataIndex: 'HKDAYS',
text: '回款天数',
//text:'业务来源',
width: 120,
summaryType: 'average', align: 'right',
summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
value = usMoney(value, 2, '', true);
return value;
}
}, {
sortable: true,
dataIndex: 'ZYCB',
text: '资金占用成本',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
//text:'业务来源',
width: 120,
summaryType: 'sum', align: 'right',
summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
value = usMoney(value, 2, '', true);
return value;
}
}, {
sortable: true,
dataIndex: 'CQLX',
text: '超期利息',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
//text:'业务来源',
width: 120,
summaryType: 'sum', align: 'right',
summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
value = usMoney(value, 2, '', true);
return value;
}
}
];
// this.girdcolumscust = this.initgirdcolumscust;
this.girdcolumscust = DsTruck.GetGridPanel(USERID, this.formname + 'cust', this.initgirdcolumscust, 1);
this.gridListCust = new Ext.grid.GridPanel({
store: this.storeCustList,
enableHdMenu: false,
region: 'center',
loadMask: { msg: Zi.LAN.LOADING },//loadMask: { msg: Zi.LAN.LOADING },//msg: Zi.LAN.LOADING 数据加载中,请稍等...
trackMouseOver: true,
viewConfig: {
enableTextSelection: true, //允许复制数据
autoFill: true
},
features: [{
ftype: 'summary'//Ext.grid.feature.Summary表格汇总特性
}],
disableSelection: false,
columns: this.girdcolumscust,
// paging bar on the bottom
bbar: Ext.create('Ext.PagingToolbar', {
store: this.storeCustList,
displayInfo: true,
displayMsg: Zi.LAN.displayMsg,//'当前显示 {0} - {1}条记录 /共 {2}条记录'
emptyMsg: Zi.LAN.emptyMsg//"没有数据"
})
});
// this.gridListCust.reconfigure(this.storeCustList, this.girdcolumscust);
this.gridListCust.addListener('sortchange', function (ct, column, direction, eOpts) {
this.custlistsortfield = column.dataIndex;
this.custlistsortdire = direction;
}, this);
this.storeSumList = Ext.create('Ext.data.Store', {
pageSize: this.PageSize,
fields: [
{ name: 'STLRMB', type: 'number' },
{ name: 'STLUSD', type: 'number' },
{ name: 'STLTTL', type: 'number' },
{ name: 'STLRMBCR', type: 'number' },
{ name: 'STLUSDCR', type: 'number' },
{ name: 'STLTTLCR', type: 'number' },
{ name: 'HKDAYS', type: 'number' },
{ name: 'HKDAYSCR', type: 'number' },
{ name: 'ZYCB', type: 'number' },
{ name: 'SJZYCB', type: 'number' },
{ name: 'ZYDAYS', type: 'number' },
{ name: 'CQLX', type: 'number' }
],
remoteSort: true,
proxy: {
type: 'ajax',
timeout: 1200000,
url: '/MvcShipping/MsRptLhRptList/SumListData',
reader: {
id: '',
root: 'data',
totalProperty: 'totalCount'
}
}
});
this.initgridlistsumcolumn = [{
sortable: true,
dataIndex: 'STLRMB',
text: 'RMB实收',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
//text:'业务来源',
width: 120
}, {
sortable: true,
dataIndex: 'STLUSD',
text: 'USD实收',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
//text:'业务来源',
width: 120
}, {
sortable: true,
dataIndex: 'STLTTL',
text: '合计实收',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
//text:'业务来源',
width: 120
}, {
sortable: true,
dataIndex: 'STLRMBCR',
text: 'RMB实付',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
//text:'业务来源',
width: 120
}, {
sortable: true,
dataIndex: 'STLUSDCR',
text: 'USD实付',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
//text:'业务来源',
width: 120
}, {
sortable: true,
dataIndex: 'STLTTLCR',
text: '合计实付',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
//text:'业务来源',
width: 120
}, {
sortable: true,
dataIndex: 'HKDAYS',
text: '实际收款天数',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
//text:'业务来源',
width: 120
}, {
sortable: true,
dataIndex: 'HKDAYSCR',
text: '实际付款天数',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
//text:'业务来源',
width: 120
}, {
sortable: true,
dataIndex: 'ZYCB',
text: '资金占用成本',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
//text:'业务来源',
width: 120
}, {
sortable: true,
dataIndex: 'CQLX',
text: '超期利息',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
//text:'业务来源',
width: 120
}, {
sortable: true,
dataIndex: 'ZYDAYS',
text: '实际资金占用天数',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
//text:'业务来源',
width: 120
}, {
sortable: true,
dataIndex: 'SJZYCB',
text: '实际资金占用成本',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
//text:'业务来源',
width: 120
}];
this.gridlistsumcolumn = DsTruck.GetGridPanel(USERID, this.formname + 'sum', this.initgridlistsumcolumn, 1);
//定义Grid
this.gridListSum = new Ext.grid.GridPanel({
store: this.storeSumList,
enableHdMenu: false,
region: 'center',
loadMask: { msg: "数据加载中,请稍等..." },
trackMouseOver: true,
disableSelection: false,
columns: this.gridlistsumcolumn
});
//定义数据集
this.storeListzj = Ext.create('Ext.data.Store', {
pageSize: this.PageSize,
fields: [
{ name: 'BSNO', type: 'string' },
{ name: 'OPTYPE', type: 'string' },
{ name: 'OPLBNAME', type: 'string' },
{ name: 'CUSTOMERNAME', type: 'string' },
{ name: 'CUSTNAME', type: 'string' },
{ name: 'CUSTNO', type: 'string' },
{ name: 'MBLNO', type: 'string' },
{ name: 'BILLNO', type: 'string' },
{ name: 'SETTLETIME', type: 'string' },
{ name: 'SETTLENO', type: 'string' },
{ name: 'BSSTATUS', type: 'string' },
{ name: 'LANE', type: 'string' },
{ name: 'FORWARDER', type: 'string' },
{ name: 'SALE', type: 'string' },
{ name: 'OP', type: 'string' },
{ name: 'DOC', type: 'string' },
{ name: 'OPDATE', type: 'string' },
{ name: 'PORTLOAD', type: 'string' },
{ name: 'PORTDISCHARGE', type: 'string' },
{ name: 'ACCDATE', type: 'string' },
{ name: 'CARRIER', type: 'string' },
{ name: 'BSSOURCE', type: 'string' },
{ name: 'ISWP', type: 'string' },
{ name: 'TTLNODR', type: 'string' },
{ name: 'SETTLEUSERREF', type: 'string' },
{ name: 'SETTLETYPEREF', type: 'string' },
{ name: 'ACCOUNTRMBREF', type: 'string' },
{ name: 'ACCOUNTUSDREF', type: 'string' },
{ name: 'CREATEUSERREF', type: 'string' },
{ name: 'STLCREATETIME', type: 'string' },
{ name: 'CRDAY', type: 'number' },
{ name: 'NOTAXTTLPROFIT', type: 'number' },
{ name: 'GRACEDAY', type: 'number' },
{ name: 'EXRATE', type: 'number' },
{ name: 'STLRMB', type: 'number' },
{ name: 'STLUSD', type: 'number' },
{ name: 'STLTTL', type: 'number' },
{ name: 'STLRMBCR', type: 'number' },
{ name: 'STLUSDCR', type: 'number' },
{ name: 'STLTTLCR', type: 'number' },
{ name: 'HKDAYS', type: 'number' },
{ name: 'HKDAYSCR', type: 'number' },
{ name: 'ZYCB', type: 'number' },
{ name: 'ZYCB1', type: 'number' },
{ name: 'CQLX', type: 'number' }
],
remoteSort: true,
proxy: {
type: 'ajax',
timeout: 120000,
url: '/MvcShipping/MsRptLhRptList/LhRptListData',
reader: {
id: '',
root: 'data',
totalProperty: 'totalCount'
}
}
});
//定义Grid
this.initgirdcolumszj = [{
sortable: true,
dataIndex: 'BSNO',
text: Zi.LAN.BSNO,
//text:'编号',
hidden: true,
width: 130
}, {
sortable: true,
dataIndex: 'OPTYPE',
text: '更改单',
width: 70
}, {
sortable: true,
dataIndex: 'OPLBNAME',
text: Zi.LAN.OPLBNAME,
width: 70
}, {
sortable: true,
dataIndex: 'ZYCB1',
text: '整票资金占用合计',
width: 120,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
summaryType: 'sum', align: 'right',
summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
return usMoney(value, 2, '', true);
}
}, {
sortable: true,
dataIndex: 'NOTAXTTLPROFIT',
text: '税前毛利润',
width: 120,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
summaryType: 'sum', align: 'right',
summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
value = usMoney(value, 2, '', true);
return value;
}
}, {
sortable: true,
dataIndex: 'CUSTOMERNAME',
text: Zi.LAN.CUSTOMERNAME,
//text:'委托单位',
width: 120
}, {
sortable: true,
dataIndex: 'CUSTNAME',
text: '结算单位',
//text:'报关日期',
width: 86
}, {
sortable: true,
dataIndex: 'CUSTNO',
text: Zi.LAN.CUSTNO,
//text:'委托编号',
width: 136
}, {
sortable: true,
dataIndex: 'MBLNO',
text: '提单号',
//text:'主提单号',
width: 120
}, {
sortable: true,
dataIndex: 'OPDATE',
text: '开船日期',
//text:'开船日期',
width: 86
}, {
sortable: true,
dataIndex: 'SALE',
text: Zi.LAN.SALE,
//text:'业务员',
width: 80
}, {
sortable: true,
dataIndex: 'ACCDATE',
text: Zi.LAN.ACCDATE,
//text:'会计期间',
width: 80
}, {
sortable: true,
dataIndex: 'CARRIER',
text: Zi.LAN.CARRIER,
//text:'船公司',
width: 80
}, {
sortable: true,
dataIndex: 'BSSOURCE',
text: Zi.LAN.BSSOURCE,
//text:'业务来源',
width: 120
}, {
sortable: true,
dataIndex: 'BILLNO',
text: '结算单号',
//text:'业务来源',
width: 120
}, {
sortable: true,
dataIndex: 'SETTLETIME',
text: '结算日期',
//text:'业务来源',
width: 120
}, {
sortable: true,
dataIndex: 'SETTLENO',
text: '相关号码',
//text:'业务来源',
width: 120
}, {
sortable: true,
dataIndex: 'SETTLEUSERREF',
text: '结算人',
//text:'业务来源',
width: 120
}, {
sortable: true,
dataIndex: 'ACCOUNTRMBREF',
text: '人民币银行',
//text:'业务来源',
width: 120
}, {
sortable: true,
dataIndex: 'ACCOUNTUSDREF',
text: '美元银行',
//text:'业务来源',
width: 120
}, {
sortable: true,
dataIndex: 'CREATEUSERREF',
text: '录入人',
//text:'业务来源',
width: 120
}, {
sortable: true,
dataIndex: 'STLCREATETIME',
text: '录入时间',
//text:'业务来源',
width: 120
}, {
sortable: true,
dataIndex: 'BSSTATUS',
text: '业务锁定',
//text:'业务来源',
width: 120
}, {
sortable: true,
dataIndex: 'LANE',
text: '航线',
//text:'业务来源',
width: 120
}, {
sortable: true,
dataIndex: 'FORWARDER',
text: '订舱代理',
//text:'业务来源',
width: 120
}, {
sortable: true,
dataIndex: 'PORTLOAD',
text: '起运港',
//text:'业务来源',
width: 120
}, {
sortable: true,
dataIndex: 'PORTDISCHARGE',
text: '卸货港',
//text:'业务来源',
width: 120
}, {
sortable: true,
dataIndex: 'CRDAY',
text: '应付账期',
//text:'业务来源',
width: 120
}, {
sortable: true,
dataIndex: 'GRACEDAY',
text: '宽限天数',
//text:'业务来源',
width: 120
}, {
sortable: true,
dataIndex: 'STLRMB',
text: 'RMB实收',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
//text:'业务来源',
width: 120,
summaryType: 'sum', align: 'right',
summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
value = usMoney(value, 2, '', true);
return value;
}
}, {
sortable: true,
dataIndex: 'STLRMBCR',
text: 'RMB实付',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
//text:'业务来源',
width: 120,
summaryType: 'sum', align: 'right',
summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
value = usMoney(value, 2, '', true);
return value;
}
}, {
sortable: true,
dataIndex: 'STLUSD',
text: 'USD实收',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
//text:'业务来源',
width: 120,
summaryType: 'sum', align: 'right',
summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
value = usMoney(value, 2, '', true);
return value;
}
}, {
sortable: true,
dataIndex: 'STLUSDCR',
text: 'USD实付',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
//text:'业务来源',
width: 120,
summaryType: 'sum', align: 'right',
summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
value = usMoney(value, 2, '', true);
return value;
}
}, {
sortable: true,
dataIndex: 'STLTTL',
text: '合计实收',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
//text:'业务来源',
width: 120,
summaryType: 'sum', align: 'right',
summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
value = usMoney(value, 2, '', true);
return value;
}
}, {
sortable: true,
dataIndex: 'STLTTLCR',
text: '合计实付',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
//text:'业务来源',
width: 120,
summaryType: 'sum', align: 'right',
summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
value = usMoney(value, 2, '', true);
return value;
}
}, {
sortable: true,
dataIndex: 'HKDAYS',
text: '实际收款结算天数',
//text:'业务来源',
width: 120
}, {
sortable: true,
dataIndex: 'HKDAYSCR',
text: '实际付款结算天数',
//text:'业务来源',
width: 120
}, {
sortable: true,
dataIndex: 'ZYCB',
text: '资金占用成本',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
//text:'业务来源',
width: 120,
summaryType: 'average', align: 'right',
summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
value = usMoney(value, 2, '', true);
return value;
}
}, {
sortable: true,
dataIndex: 'EXRATE',
text: '汇率',
//text:'业务来源',
width: 120
}, {
sortable: true,
dataIndex: 'TTLNODR',
text: '是否全部应收款回款',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
//text:'业务来源',
width: 120
}, {
sortable: true,
dataIndex: 'ISWP',
text: '是否外配',
//text:'业务来源',
width: 120
}, {
sortable: true,
dataIndex: 'CQLX',
text: '超期利息',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
//text:'业务来源',
width: 120,
summaryType: 'sum', align: 'right',
summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
value = usMoney(value, 2, '', true);
return value;
}
}];
this.Pagenumzj = Ext.create('Ext.form.field.Number', {
name: 'bottles',
//fieldLabel: Zi.LAN.PS_OPLB,
//fieldLabel: '每页记录数',
fieldLabel: Zi.LAN.PageNum,
//fieldLabel: Zi.LAN.MYJLS,
labelAlign: 'right',
value: this.PageSize,
maxValue: 100000,
width: 180,
minValue: 0,
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
});
// this.girdcolums = this.initgirdcolums;
this.girdcolumszj = DsTruck.GetGridPanel(USERID, this.formname + 'zj', this.initgirdcolumszj, 1);
this.gridListzj = new Ext.grid.GridPanel({
store: this.storeListzj,
enableHdMenu: false,
region: 'center',
loadMask: { msg: Zi.LAN.LOADING },
trackMouseOver: true,
disableSelection: false,
viewConfig: {
enableTextSelection: true, //允许复制数据
autoFill: true
},
features: [{
ftype: 'summary'//Ext.grid.feature.Summary表格汇总特性
}],
columns: this.girdcolumszj,
// paging bar on the bottom
bbar: [Ext.create('Ext.PagingToolbar', {
store: this.storeListzj,
displayInfo: true,
displayMsg: Zi.LAN.displayMsg,//'当前显示 {0} - {1}条记录 /共 {2}条记录'
emptyMsg: Zi.LAN.emptyMsg//"没有数据"
}), this.Pagenumzj]
});
// this.girdcolums = DsTruck.GetGridPanel(USERID, this.formname + 'bs', this.girdcolums, 1);
// this.gridList.reconfigure(this.storeList, this.girdcolums);
this.gridListzj.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 = "";
if (record.data.OPLBNAME == "报关业务") {
openUrl = "../MvcShipping/MsOpApply/ApplyFeeView?handle=check&bsno=" + record.data.BSNO;
} else {
openUrl = "../MvcShipping/MsOpBill/MsOpFeeView?handle=check&bsno=" + record.data.BSNO;
}
window.open(openUrl, openType, openSet);
}, this);
this.gridListzj.addListener('sortchange', function (ct, column, direction, eOpts) {
this.bslistsortfield = column.dataIndex;
this.bslistsortdire = direction;
}, this);
//定义数据集
this.storeListbs = Ext.create('Ext.data.Store', {
pageSize: this.PageSize,
fields: [
{ name: 'BSNO', type: 'string' },
{ name: 'OPTYPE', type: 'string' },
{ name: 'OPLBNAME', type: 'string' },
{ name: 'CUSTOMERNAME', type: 'string' },
{ name: 'CUSTNAME', type: 'string' },
{ name: 'CUSTNO', type: 'string' },
{ name: 'MBLNO', type: 'string' },
{ name: 'BILLNO', type: 'string' },
{ name: 'SETTLETIME', type: 'string' },
{ name: 'SETTLENO', type: 'string' },
{ name: 'BSSTATUS', type: 'string' },
{ name: 'LANE', type: 'string' },
{ name: 'FORWARDER', type: 'string' },
{ name: 'SALE', type: 'string' },
{ name: 'OP', type: 'string' },
{ name: 'DOC', type: 'string' },
{ name: 'OPDATE', type: 'string' },
{ name: 'PORTLOAD', type: 'string' },
{ name: 'PORTDISCHARGE', type: 'string' },
{ name: 'ACCDATE', type: 'string' },
{ name: 'CARRIER', type: 'string' },
{ name: 'BSSOURCE', type: 'string' },
{ name: 'ISWP', type: 'string' },
{ name: 'TTLNODR', type: 'string' },
{ name: 'SETTLEUSERREF', type: 'string' },
{ name: 'SETTLETYPEREF', type: 'string' },
{ name: 'ACCOUNTRMBREF', type: 'string' },
{ name: 'ACCOUNTUSDREF', type: 'string' },
{ name: 'CREATEUSERREF', type: 'string' },
{ name: 'STLCREATETIME', type: 'string' },
{ name: 'CRDAY', type: 'number' },
{ name: 'NOTAXTTLPROFIT', type: 'number' },
{ name: 'GRACEDAY', type: 'number' },
{ name: 'EXRATE', type: 'number' },
{ name: 'STLRMB', type: 'number' },
{ name: 'STLUSD', type: 'number' },
{ name: 'STLTTL', type: 'number' },
{ name: 'STLRMBCR', type: 'number' },
{ name: 'STLUSDCR', type: 'number' },
{ name: 'STLTTLCR', type: 'number' },
{ name: 'HKDAYS', type: 'number' },
{ name: 'HKDAYSCR', type: 'number' },
{ name: 'ZYDAYS', type: 'number' },
{ name: 'ZYCB', type: 'number' },
{ name: 'SJZYCB', type: 'number' },
{ name: 'ZYCB1', type: 'number' },
{ name: 'CQLX', type: 'number' }
],
remoteSort: true,
proxy: {
type: 'ajax',
timeout: 1200000,
url: '/MvcShipping/MsRptLhRptList/LhRptListBsData',
reader: {
id: '',
root: 'data',
totalProperty: 'totalCount'
}
}
});
//定义Grid
this.initgirdcolumsbs= [{
sortable: true,
dataIndex: 'BSNO',
text: Zi.LAN.BSNO,
//text:'编号',
hidden: true,
width: 130
}, {
sortable: true,
dataIndex: 'OPTYPE',
text: '更改单',
width: 70
}, {
sortable: true,
dataIndex: 'OPLBNAME',
text: Zi.LAN.OPLBNAME,
width: 70
}, {
sortable: true,
dataIndex: 'ZYCB1',
text: '整票资金占用合计',
width: 120,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
summaryType: 'sum', align: 'right',
summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
return usMoney(value, 2, '', true);
}
}, {
sortable: true,
dataIndex: 'NOTAXTTLPROFIT',
text: '税前毛利润',
width: 120,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
summaryType: 'sum', align: 'right',
summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
value = usMoney(value, 2, '', true);
return value;
}
}, {
sortable: true,
dataIndex: 'CUSTOMERNAME',
text: Zi.LAN.CUSTOMERNAME,
//text:'委托单位',
width: 120
}, {
sortable: true,
dataIndex: 'CUSTNO',
text: Zi.LAN.CUSTNO,
//text:'委托编号',
width: 136
}, {
sortable: true,
dataIndex: 'MBLNO',
text: '提单号',
//text:'主提单号',
width: 120
}, {
sortable: true,
dataIndex: 'OPDATE',
text: '开船日期',
//text:'开船日期',
width: 86
}, {
sortable: true,
dataIndex: 'SALE',
text: Zi.LAN.SALE,
//text:'业务员',
width: 80
}, {
sortable: true,
dataIndex: 'ACCDATE',
text: Zi.LAN.ACCDATE,
//text:'会计期间',
width: 80
}, {
sortable: true,
dataIndex: 'CARRIER',
text: Zi.LAN.CARRIER,
//text:'船公司',
width: 80
}, {
sortable: true,
dataIndex: 'BSSOURCE',
text: Zi.LAN.BSSOURCE,
//text:'业务来源',
width: 120
}, {
sortable: true,
dataIndex: 'BSSTATUS',
text: '业务锁定',
//text:'业务来源',
width: 120
}, {
sortable: true,
dataIndex: 'LANE',
text: '航线',
//text:'业务来源',
width: 120
}, {
sortable: true,
dataIndex: 'FORWARDER',
text: '订舱代理',
//text:'业务来源',
width: 120
}, {
sortable: true,
dataIndex: 'PORTLOAD',
text: '起运港',
//text:'业务来源',
width: 120
}, {
sortable: true,
dataIndex: 'PORTDISCHARGE',
text: '卸货港',
//text:'业务来源',
width: 120
}, {
sortable: true,
dataIndex: 'STLRMB',
text: 'RMB实收',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
//text:'业务来源',
width: 120,
summaryType: 'sum', align: 'right',
summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
value = usMoney(value, 2, '', true);
return value;
}
}, {
sortable: true,
dataIndex: 'STLRMBCR',
text: 'RMB实付',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
//text:'业务来源',
width: 120,
summaryType: 'sum', align: 'right',
summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
value = usMoney(value, 2, '', true);
return value;
}
}, {
sortable: true,
dataIndex: 'STLUSD',
text: 'USD实收',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
//text:'业务来源',
width: 120,
summaryType: 'sum', align: 'right',
summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
value = usMoney(value, 2, '', true);
return value;
}
}, {
sortable: true,
dataIndex: 'STLUSDCR',
text: 'USD实付',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
//text:'业务来源',
width: 120,
summaryType: 'sum', align: 'right',
summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
value = usMoney(value, 2, '', true);
return value;
}
}, {
sortable: true,
dataIndex: 'STLTTL',
text: '合计实收',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
//text:'业务来源',
width: 120,
summaryType: 'sum', align: 'right',
summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
value = usMoney(value, 2, '', true);
return value;
}
}, {
sortable: true,
dataIndex: 'STLTTLCR',
text: '合计实付',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
//text:'业务来源',
width: 120,
summaryType: 'sum', align: 'right',
summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
value = usMoney(value, 2, '', true);
return value;
}
}, {
sortable: true,
dataIndex: 'HKDAYS',
text: '实际收款结算天数',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
//text:'业务来源',
width: 120
}, {
sortable: true,
dataIndex: 'HKDAYSCR',
text: '实际付款结算天数',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
//text:'业务来源',
width: 120
}, {
sortable: true,
dataIndex: 'ZYDAYS',
text: '实际资金占用天数',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
//text:'业务来源',
width: 120
}, {
sortable: true,
dataIndex: 'SJZYCB',
text: '实际资金占用成本',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
//text:'业务来源',
width: 120,
summaryType: 'average', align: 'right',
summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
value = usMoney(value, 2, '', true);
return value;
}
}];
this.Pagenumbs = Ext.create('Ext.form.field.Number', {
name: 'bottles',
//fieldLabel: Zi.LAN.PS_OPLB,
//fieldLabel: '每页记录数',
fieldLabel: Zi.LAN.PageNum,
//fieldLabel: Zi.LAN.MYJLS,
labelAlign: 'right',
value: this.PageSize,
maxValue: 100000,
width: 180,
minValue: 0,
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
});
// this.girdcolums = this.initgirdcolums;
this.girdcolumsbs = DsTruck.GetGridPanel(USERID, this.formname + 'bs', this.initgirdcolumsbs, 1);
this.gridListbs = new Ext.grid.GridPanel({
store: this.storeListbs,
enableHdMenu: false,
region: 'center',
loadMask: { msg: Zi.LAN.LOADING },
trackMouseOver: true,
disableSelection: false,
viewConfig: {
enableTextSelection: true, //允许复制数据
autoFill: true
},
features: [{
ftype: 'summary'//Ext.grid.feature.Summary表格汇总特性
}],
columns: this.girdcolumsbs,
// paging bar on the bottom
bbar: [Ext.create('Ext.PagingToolbar', {
store: this.storeListbs,
displayInfo: true,
displayMsg: Zi.LAN.displayMsg,//'当前显示 {0} - {1}条记录 /共 {2}条记录'
emptyMsg: Zi.LAN.emptyMsg//"没有数据"
}), this.Pagenumbs]
});
// this.girdcolums = DsTruck.GetGridPanel(USERID, this.formname + 'bs', this.girdcolums, 1);
// this.gridList.reconfigure(this.storeList, this.girdcolums);
this.gridListbs.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 = "";
if (record.data.OPLBNAME == "报关业务") {
openUrl = "../MvcShipping/MsOpApply/ApplyFeeView?handle=check&bsno=" + record.data.BSNO;
} else {
openUrl = "../MvcShipping/MsOpBill/MsOpFeeView?handle=check&bsno=" + record.data.BSNO;
}
window.open(openUrl, openType, openSet);
}, this);
this.gridListbs.addListener('sortchange', function (ct, column, direction, eOpts) {
this.bslistsortfield = column.dataIndex;
this.bslistsortdire = direction;
}, this);
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: 'HKDAYS', 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/MsRptLhRptList/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: 'HKDAYS',
header: '回款天数',
width: 80,
summaryType: 'average', align: 'right',
summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
var HKDAYS = value;
if (HKDAYS== '') {
value=0;
} else {
value = usMoney(value, 2, '', true);
}
return value;
}
}, {
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: '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: 'CUSTOMNO',
header: Zi.LAN.CUSTOMNO,
width: 80
}, {
sortable: true,
dataIndex: 'DELIVERYDATE',
header: Zi.LAN.DELIVERYDATE,
width: 80
}, {
sortable: true,
dataIndex: 'RMBDR',
header: 'RMB应收',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
try {
var lsValue = usMoney(value, 2, '', false);
if (lsValue != "NaN") {
value = lsValue; if (parseFloat(lsValue) < 0) {
return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>';
}
}
else {
return value;
}
}
catch (e) {
return value;
}
return value;
},
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'STLRMBDR',
header: 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: 'USD应收',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
try {
var lsValue = usMoney(value, 2, '', false);
if (lsValue != "NaN") {
value = lsValue; if (parseFloat(lsValue) < 0) {
return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>';
}
}
else {
return value;
}
}
catch (e) {
return value;
}
return value;
},
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'STLUSDDR',
header: Zi.LAN.STLUSDDR,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
try {
var lsValue = usMoney(value, 2, '', false);
if (lsValue != "NaN") {
value = lsValue; if (parseFloat(lsValue) < 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: '其他应收',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
try {
var lsValue = usMoney(value, 2, '', false);
if (lsValue != "NaN") {
value = lsValue; if (parseFloat(lsValue) < 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: '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';
}
}
},
features: [{
ftype: 'summary'//Ext.grid.feature.Summary表格汇总特性
}],
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.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: 'HKDAYS', 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/MsRptLhRptList/BsCrListData',
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: 'HKDAYS',
header: '回款天数',
width: 80,
summaryType: 'average', align: 'right',
summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
var HKDAYS = value;
if (HKDAYS == '') {
value = 0;
} else {
value = usMoney(value, 2, '', true);
}
return value;
}
}, {
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: '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: 'CUSTOMNO',
header: Zi.LAN.CUSTOMNO,
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: '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
},
features: [{
ftype: 'summary'//Ext.grid.feature.Summary表格汇总特性
}],
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);
//#region formSearch
//#region formSearch枚举参照相关
_this = this;
this.StoreOpLb = Ext.create('DsExt.ux.RefEnumStore', {});
this.StoreOpLb.load({ params: { enumTypeId: 96005} });
this.comboxOpLb = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.PS_OPLB,
//fieldLabel: '业务类型',
store: this.StoreOpLb,
forceSelection: true,
name: 'PS_OPLB',
valueField: 'EnumValueName',
displayField: Zi.LAN.displayField,//'EnumValueName',
enableKeyEvents: true,
listeners: {
keyup: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
});
this.storeBsType = Ext.create('DsExt.ux.RefEnumStore', {});
this.storeBsType.load({ params: { enumTypeId: 96004} });
this.comboxBsType = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.PS_BSTYPE,
//fieldLabel: '运输类型',
store: this.storeBsType,
name: 'PS_BSTYPE',
valueField: 'EnumValueName',
displayField: Zi.LAN.displayField,//'EnumValueName',
enableKeyEvents: true,
listeners: {
keyup: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
});
this.storeSalesCode = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.UserRefModel',
proxy: { url: '/CommMng/BasicDataRef/GetUserRefList' }
});
this.storeSalesCode.load();
this.comboxSalesCode = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.PS_SALE,
//fieldLabel: '揽货人',
store: this.storeSalesCode,
forceSelection: true,
name: 'PS_SALE',
valueField: 'UserName',
displayField: 'CodeAndName',
enableKeyEvents: true,
listeners: {
keyup: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
});
this.comboxOp = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.PS_OP,
//fieldLabel: '操 作',
store: this.storeSalesCode,
forceSelection: true,
name: 'PS_OP',
valueField: 'UserName',
displayField: 'CodeAndName',
enableKeyEvents: true,
listeners: {
keyup: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
});
this.comboxCUSTSERVICE = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.PS_CUSTSERVICE,
//fieldLabel: '客服',
store: this.storeSalesCode,
forceSelection: true,
name: 'PS_CUSTSERVICE',
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.PS_CUSTOMERNAME,
//fieldLabel: '委托单位',
store: this.storeCustCode,
name: 'PS_CUSTOMERNAME',
queryMode: 'remote',
minChars: 0,
queryParam: 'CODENAME',
valueField: 'CustName',
displayField: 'CodeAndName',
enableKeyEvents: true,
listeners: {
keyup: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
});
this.storeEnterpCode = Ext.create('DsExt.ux.RefTableStore', {
fields: [
{ name: 'CUSTOMER', type: 'string' },
{ name: 'ENTERPID', type: 'string' }
],
proxy: { url: '/MvcShipping/MsOpApply/GetENTERPLIST' }
});
this.storeEnterpCode.load();
this.comboxEnterp = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.ENTERP,
//fieldLabel: '经营单位',
store: this.storeEnterpCode,
name: 'PS_ENTERP',
valueField: 'CUSTOMER',
displayField: 'CUSTOMER',
enableKeyEvents: true,
listeners: {
keyup: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
});
//业务来源
this.storeSource = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.SourceModel',
proxy: { url: '/CommMng/BasicDataRef/GetSource' }
});
this.storeSource.load();
this.storeSourceDetail = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.SourceDetailModel',
proxy: { url: '/CommMng/BasicDataRef/GetSourceDetail2' }
});
this.comboxBSSOURCE = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.BSSOURCE,
//fieldLabel: '业务来源',
store: this.storeSource,
forceSelection: true,
name: 'BSSOURCE',
valueField: 'SourceName',
displayField: 'SourceName',
listeners: {
scope: this,
'select': function (combo, records, eOpts) {
if (records.length > 0) {
var recs = DsStoreQueryBy(this.storeSource, 'SourceID', records[0].data.SourceID);
if (recs.getCount() > 0) {
var data = recs.getAt(0).data;
var s = "SOURCEID='" + data.SourceID + "'";
this.storeSourceDetail.load({ params: { condition: s} });
} else {
var BSSOURCEDETAIL = this.formSearch.getForm().findField('BSSOURCEDETAIL');
BSSOURCEDETAIL.setValue('');
}
}
}
}
});
this.storeSourceDetail.load();
this.comboxBSSOURCEDETAIL = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.BSSOURCEDETAIL,
//fieldLabel: '来源明细',
store: this.storeSourceDetail,
forceSelection: true,
name: 'BSSOURCEDETAIL',
valueField: 'SourceDetail',
displayField: 'SourceDetail',
enableKeyEvents: true,
listeners: {
keyup: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
});
Ext.define('SubComp', {
extend: 'Ext.data.Model',
fields: [
{ name: 'GID', type: 'string' },
{ name: 'NAME', type: 'string' },
{ name: 'ENNAME', type: 'string' }
]
});
this.StoreSubComp = Ext.create('DsExt.ux.RefTableStore', {
model: 'SubComp',
proxy: { url: '/MvcShipping/MsBaseInfo/GetCompanyEN' }
});
this.StoreSubComp.load({ params: { condition: ""} });
this.comboxSubComp = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.SUBCOMP,
//fieldLabel: '所属公司',
store: this.StoreSubComp,
name: 'PS_SALECORPID',
// flex: 0.5,
// labelWidth: 55,
valueField: 'GID',
displayField: 'NAME',
enableKeyEvents: true,
listeners: {
keyup: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
});
this.StoreFeeLock = Ext.create('Ext.data.Store', {
fields: ['OpLb']
});
this.StoreFeeLock.add({ "OpLb": Zi.LAN.ALL });//"全部"
this.StoreFeeLock.add({ "OpLb": Zi.LAN.已锁定 });//"已锁定"
this.StoreFeeLock.add({ "OpLb": Zi.LAN.未锁定 });//"未锁定"
this.comboxFeeLock = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.FEELOCK,
//fieldLabel: '费用锁定',
store: this.StoreFeeLock,
forceSelection: true,
name: 'PS_FEELOCK',
// flex: 0.5,
// labelWidth: 55,
valueField: 'OpLb',
displayField: 'OpLb',
enableKeyEvents: true,
listeners: {
keyup: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
});
this.storeVoyVeg = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.VesselModel',
proxy: { url: '/CommMng/BasicDataRef/GetVesselList' }
});
this.storeVoyVeg.load({ params: { condition: ""} });
this.comboxVoyVeg = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.VESSEL,
//fieldLabel: '船 名',
store: this.storeVoyVeg,
valueField: 'VESSEL',
flex: 1.5,
name: 'PS_VESSEL',
displayField: 'VESSEL',
enableKeyEvents: true,
listeners: {
keyup: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
});
this.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.ALL });//"全部"
this.StoreFeeLock.add({ "OpLb": Zi.LAN.已锁定 });//"已锁定"
this.StoreFeeLock.add({ "OpLb": Zi.LAN.未锁定 });//"未锁定"
this.comboxFeeLock = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.FEELOCK,
//fieldLabel: '费用锁定',
store: this.StoreFeeLock,
forceSelection: true,
name: 'PS_FEELOCK',
// flex: 0.5,
// labelWidth: 55,
valueField: 'OpLb',
displayField: 'OpLb',
enableKeyEvents: true,
listeners: {
keyup: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
});
this.storeLANE = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.Lane',
proxy: { url: '/CommMng/BasicDataRef/GetCodeLaneList' }
});
this.storeLANE.load();
this.comboxLANE = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '航线', //'航线',
store: this.storeLANE,
// forceSelection: true,
name: 'LANE',
valueField: 'LANE',
displayField: 'LANE'
});
this.comboxCUSTSERVICE = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.PS_CUSTSERVICE,
//fieldLabel: '客服',
store: this.storeSalesCode,
forceSelection: true,
name: 'PS_CUSTSERVICE',
valueField: 'UserName',
displayField: 'CodeAndName',
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: 80,
msgTarget: 'qtip'
},
items: [
{//fieldset 1
xtype: 'container',
defaultType: 'textfield',
layout: 'anchor',
defaults: {
anchor: '100%'
},
items: [{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [this.comboxBSSOURCE,this.comboxOpLb, {
fieldLabel: '单号',
//fieldLabel: '编号',
name: 'PS_MBLNO',
enableKeyEvents: true,
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
}, this.comboxVoyVeg,
{
fieldLabel: Zi.LAN.VOYNO,
//fieldLabel: '航次',
name: 'PS_VOYNO',
labelWidth: 40,
flex: 0.5,
enableKeyEvents: true,
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
}, this.comboxOp, this.comboxSalesCode
]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [ {
fieldLabel: Zi.LAN.PS_EXPDATEBGN,
//fieldLabel: '业务日期',
format: 'Y-m-d',
xtype: 'datefield',
name: 'PS_EXPDATEBGN',
enableKeyEvents: true,
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
}, {
fieldLabel: Zi.LAN.PS_EXPDATEEND,
//fieldLabel: '到',
format: 'Y-m-d',
xtype: 'datefield',
name: 'PS_EXPDATEEND',
enableKeyEvents: true,
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
}, {
fieldLabel: Zi.LAN.PS_ACCDATEBGN,
//fieldLabel: '从会计期间',
xtype: 'monthfield',
name: 'PS_ACCDATEBGN',
enableKeyEvents: true,
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
}, {
fieldLabel: Zi.LAN.PS_ACCDATEEND,
//fieldLabel: '到',
xtype: 'monthfield',
name: 'PS_ACCDATEEND',
enableKeyEvents: true,
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
}, this.comboxCustCode, this.comboxBSSOURCEDETAIL, this.comboxLANE
]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [this.comboxCUSTSERVICE, this.comboxFeeLock, this.comboxSubComp,this.comboxCust, {
fieldLabel: '结算单号',
//fieldLabel: '编号',
name: 'PS_STLNO',
enableKeyEvents: true,
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
}, {
fieldLabel: '结算日期',
//fieldLabel: '业务日期',
format: 'Y-m-d',
xtype: 'datefield',
name: 'PS_STLDATEBGN',
enableKeyEvents: true,
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
}, {
fieldLabel: '结算日期',
//fieldLabel: '到',
format: 'Y-m-d',
xtype: 'datefield',
name: 'PS_STLDATEEND',
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,
//fieldLabel: '记忆查询条件',
checked: true,
width: 120
});
_this = this;
this.SearchBtn = new Ext.Button({
text: Zi.LAN.HideQuery,
//text:'隐藏查询',
handler: function () {
if (_this.SearchBtn.text == Zi.LAN.HideQuery) {//'隐藏查询'
_this.panelSearch.hide();
_this.SearchBtn.setText(Zi.LAN.SearchBtn2);//"显示查询"
} else {
_this.panelSearch.show();
_this.SearchBtn.setText(Zi.LAN.HideQuery);//"隐藏查询"
}
}
});
this.panelBtn = new Ext.Panel({
region: "north",
tbar: [
{
text: Zi.LAN.Refresh,
//text:"执行查询",
iconCls: "btnrefresh",
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.btnExportExcel,
//text:"导出Excel",
id: "btnExportExcel",
iconCls: 'btnexportexcel',
handler: function (button, event) {
this.onExportClick(button, event);
},
scope: this
}, '-',
{
text: Zi.LAN.btnprint,
//text:"打印",
iconCls: 'btnprint',
handler: function (button, event) {
this.Print();
},
scope: this
}, '-', this.SearchBtn, {
xtype: 'button',
width: 90,
text: Zi.LAN.ClearSql,
//text:"清空条件",
iconCls: "btnreset",
handler: function (button, event) {
this.onClearSql(button, event);
},
scope: this
}, '-', {
xtype: 'button',
text: Zi.LAN.DsQuery,
//text:"高级查询",
iconCls: "btnmore",
handler: function (button, event) {
var sql = this.getCondition();
var winAccess = new Shipping.DsQuery({
});
winAccess.StoreList = this.storeList;
winAccess.formname = this.formname;
winAccess.condition = sql;
winAccess.show();
return;
},
scope: this
}, '-', this.CheckSaveQuery, '-', {
text: Zi.LAN.SaveGrid,
//text:"保存列表样式",
id: "btntest",
menu: [
{
text: "保存列表",
//text:"保存列表",
handler: function (button, event) {
_this.onSaveGridClick(button, event);
}
}, {
text: "列表初始化",
//text:"列表初始化",
handler: function (button, event) {
_this.oninitGridClick(button, event);
}
}],
scope: this
}, '-',
{
text: '年利率',
handler: function (button, event) {
var openSet = "height=400, width=500, toolbar=no, menubar=no,scrollbars=1, resizable=1,location=no, status=no,Top= " + (screen.height - 400) / 2 + ",Left= " + (screen.width - 500) / 2
var openType = "_blank";
var openUrl = "";
openUrl = "../MvcShipping/MsCodeLhCustRate";
window.open(openUrl, openType, openSet);
},
scope: this
}, '-',
{
text: '应付账期设置',
handler: function (button, event) {
var openSet = "height=600, width=750, toolbar=no, menubar=no,scrollbars=1, resizable=1,location=no, status=no,Top= " + (screen.height - 600) / 2 + ",Left= " + (screen.width - 750) / 2
var openType = "_blank";
var openUrl = "";
openUrl = "../MvcShipping/MsCodeLhCustRate/LhCustCrStlDateIndex";
window.open(openUrl, openType, openSet);
},
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: 96,
items: [this.formSearch]
});
this.panelBodyChFee = new Ext.Panel({
title: '统计明细', //Zi.LAN.//'业务明细'
layout: "border",
region: 'center',
margin: '0 0',
frame: true,
items: [this.gridList]
});
this.panelCustomerNameSum = new Ext.Panel({
title: '委托单位',//Zi.LAN.//'委托单位'
layout: "border",
region: 'center',
margin: '0 0',
frame: true,
items: [this.gridListCustomerName]
});
this.panelCustSum = new Ext.Panel({
title: '结算单位',//Zi.LAN.//'委托单位'
layout: "border",
region: 'center',
margin: '0 0',
frame: true,
items: [this.gridListCust]
});
this.panelZj = new Ext.Panel({
title: '资金占用成本', //Zi.LAN.//'业务明细'
layout: "border",
region: 'center',
margin: '0 0',
frame: true,
items: [this.gridListzj]
});
this.panelBs = new Ext.Panel({
title: '资金占用成本按票合计', //Zi.LAN.//'业务明细'
layout: "border",
region: 'center',
margin: '0 0',
frame: true,
items: [this.gridListbs]
});
this.panelBodyChFeeDr = new Ext.Panel({
title: '应收单票',
layout: "border",
region: 'center',
margin: '0 0',
frame: true,
items: [this.gridListDr]
});
this.panelBodyChFeeCr = new Ext.Panel({
title: '应付单票',
layout: "border",
region: 'center',
margin: '0 0',
frame: true,
items: [this.gridListCr]
});
this.panelSum = new Ext.Panel({
title: Zi.LAN.SUM,//'合 计',
layout: "border",
height: 120,
region: 'south',
margin: '0 0',
frame: true,
items: [this.gridListSum]
});
this.tabpanel = new Ext.TabPanel
({
activeTab: 0,
autoWidth: true,
border: false,
frame: false,
region: 'center',
id: "TabPanelID",
enableTabScroll: true,
items:
[
this.panelBodyChFee,
this.panelCustomerNameSum,
this.panelCustSum,
this.panelZj,
this.panelBs,
this.panelBodyChFeeDr,
this.panelBodyChFeeCr
],
//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 = this;
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
});
_this = this;
this.storeList.on('beforeload', function (store) {
Ext.apply(store.proxy.extraParams, { condition: _this.sqlcontext });
}, this);
this.storeCustList.on('beforeload', function (store) {
// if (!this.checkSearchCondition())
// return;
// var sql = this.getCondition();
Ext.apply(store.proxy.extraParams, { condition: _this.sqlcontext});
}, this);
this.storeListzj.on('beforeload', function (store) {
Ext.apply(store.proxy.extraParams, { condition: _this.sqlcontext });
}, this);
this.storeListbs.on('beforeload', function (store) {
Ext.apply(store.proxy.extraParams, { condition: _this.sqlcontext });
}, this);
this.storeCustomerNameList.on('beforeload', function (store) {
// if (!this.checkSearchCondition())
// return;
// var sql = this.getCondition();
Ext.apply(store.proxy.extraParams, { condition: _this.sqlcontext });
}, this);
this.storeListDr.on('beforeload', function (store) {
Ext.apply(store.proxy.extraParams, { condition: _this.sqlcontext2 });
}, this);
this.storeListCr.on('beforeload', function (store) {
Ext.apply(store.proxy.extraParams, { condition: _this.sqlcontext2 });
}, this);
this.storeSumList.on('beforeload', function (store) {
// if (!this.checkSearchCondition())
// return;
// var sql = this.getCondition();
Ext.apply(store.proxy.extraParams, { condition: _this.sqlcontext });
}, this);
LoadQueryData(this.formname, this.formSearch, this.CheckSaveQuery);
}, //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;
this.isquery = true;
var sql = this.getCondition();
this.sqlcontext = sql;
this.PageSize = this.Pagenum.getValue();
this.storeList.pageSize = this.PageSize;
this.storeCustList.pageSize = this.PageSize;
if (this.tabpanel.getActiveTab() == this.panelBodyChFee) {
this.storeList.load({
params: { start: 0, limit: this.PageSize, condition: sql },
waitMsg: Zi.LAN.NowSelect,//"正在查询数据...",
scope: this
});
} else if (this.tabpanel.getActiveTab() == this.panelCustSum) {
this.storeCustList.load({
params: { start: 0, limit: this.PageSize, condition: sql },
waitMsg: Zi.LAN.NowSelect,//"正在查询数据...",
scope: this
});
} else if (this.tabpanel.getActiveTab() == this.panelCustomerNameSum) {
this.storeCustomerNameList.load({
params: { start: 0, limit: this.PageSize, condition: sql },
waitMsg: Zi.LAN.NowSelect,//"正在查询数据...",
scope: this
});
} else if (this.tabpanel.getActiveTab() == this.panelZj) {
this.storeListzj.load({
params: { start: 0, limit: this.PageSize, condition: sql },
waitMsg: Zi.LAN.NowSelect,//"正在查询数据...",
scope: this
});
} else if (this.tabpanel.getActiveTab() == this.panelBs) {
this.storeListbs.load({
params: { start: 0, limit: this.PageSize, condition: sql },
waitMsg: Zi.LAN.NowSelect,//"正在查询数据...",
scope: this
});
}
this.storeSumList.load({
params: { start: 0, limit: this.PageSize, condition: sql},
waitMsg: Zi.LAN.NowSelect,//"正在查询数据...",
scope: this
});
var sql2 = this.getConditionBs();
this.sqlcontext2 = sql2;
if (this.tabpanel.getActiveTab() == this.panelBodyChFeeDr) {
if (sql2 != '') sql2 = sql2 + " and F.FEETYPE=1 ";
else sql2 = " F.FEETYPE=1 ";
this.storeListDr.load({
params: { start: 0, limit: this.PageSize, condition: sql2 },
waitMsg: Zi.LAN.NowSelect,//"正在查询数据...",
scope: this
});
} else if (this.tabpanel.getActiveTab() == this.panelBodyChFeeCr) {
if (sql2 != '') sql2 = sql2 + " and F.FEETYPE=2 ";
else sql2 = " F.FEETYPE=2 ";
this.storeListCr.load({
params: { start: 0, limit: this.PageSize, condition: sql2 },
waitMsg: Zi.LAN.NowSelect,//"正在查询数据...",
scope: this
});
}
},
onDsQuery: function (button, event) {
var sql = this.sqlcontext;
if (this.tabpanel.getActiveTab() == this.panelBodyChFee) {
this.storeList.load({
params: { start: 0, limit: this.PageSize, condition: sql },
waitMsg: Zi.LAN.NowSelect,//"正在查询数据...",
scope: this
});
} else if (this.tabpanel.getActiveTab() == this.panelCustSum) {
this.storeCustList.load({
params: { start: 0, limit: this.PageSize, condition: sql },
waitMsg: Zi.LAN.NowSelect,//"正在查询数据...",
scope: this
});
} else if (this.tabpanel.getActiveTab() == this.panelCustomerNameSum) {
this.storeCustomerNameList.load({
params: { start: 0, limit: this.PageSize, condition: sql },
waitMsg: Zi.LAN.NowSelect,//"正在查询数据...",
scope: this
});
} else if (this.tabpanel.getActiveTab() == this.panelZj) {
this.storeListzj.load({
params: { start: 0, limit: this.PageSize, condition: sql },
waitMsg: Zi.LAN.NowSelect,//"正在查询数据...",
scope: this
});
} else if (this.tabpanel.getActiveTab() == this.panelBs) {
this.storeListbs.load({
params: { start: 0, limit: this.PageSize, condition: sql },
waitMsg: Zi.LAN.NowSelect,//"正在查询数据...",
scope: this
});
}
this.storeSumList.load({
params: { start: 0, limit: this.PageSize, condition: sql },
waitMsg: Zi.LAN.NowSelect,//"正在查询数据...",
scope: this
});
var sql2 = this.sqlcontext2
if (this.tabpanel.getActiveTab() == this.panelBodyChFeeDr) {
if (sql2 != '') sql2 = sql2 + " and F.FEETYPE=1 ";
else sql2 = " F.FEETYPE=1 ";
this.storeListDr.load({
params: { start: 0, limit: this.PageSize, condition: sql2 },
waitMsg: Zi.LAN.NowSelect,//"正在查询数据...",
scope: this
});
} else if (this.tabpanel.getActiveTab() == this.panelBodyChFeeCr) {
if (sql2 != '') sql2 = sql2 + " and F.FEETYPE=2 ";
else sql2 = " F.FEETYPE=2 ";
this.storeListCr.load({
params: { start: 0, limit: this.PageSize, condition: sql2 },
waitMsg: Zi.LAN.NowSelect,//"正在查询数据...",
scope: this
});
}
},
RpttabChange: function (tabPanel, newCard, oldCard, eOpts) {
if (!this.isquery) return;
var sql = this.sqlcontext;
var sql2 = this.sqlcontext2;
this.PageSize = this.Pagenum.getValue();
if (newCard == this.panelBodyChFee) {
this.storeList.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.load({
params: { start: 0, limit: this.PageSize, condition: sql},
waitMsg: "正在查询数据...",
scope: this
});
} else if (newCard == this.panelCustomerNameSum) {
this.storeCustomerNameList.load({
params: { start: 0, limit: this.PageSize, condition: sql},
waitMsg: "正在查询数据...",
scope: this
});
} else if (newCard == this.panelZj) {
this.storeListzj.load({
params: { start: 0, limit: this.PageSize, condition: sql},
waitMsg: "正在查询数据...",
scope: this
});
} else if (newCard == this.panelBs) {
this.storeListbs.load({
params: { start: 0, limit: this.PageSize, condition: sql },
waitMsg: "正在查询数据...",
scope: this
});
} else if (newCard == this.panelBodyChFeeDr) {
if (sql2 != '') sql2 = sql2 + " and F.FEETYPE=1 ";
else sql2 = " F.FEETYPE=1 ";
this.storeListDr.load({
params: { start: 0, limit: this.PageSize, condition: sql2},
waitMsg: "正在查询数据...",
scope: this
});
} else if (newCard == this.panelBodyChFeeCr) {
if (sql2 != '') sql2 = sql2 + " and F.FEETYPE=2 ";
else sql2 = " F.FEETYPE=2 ";
this.storeListCr.load({
params: { start: 0, limit: this.PageSize, condition: sql2 },
waitMsg: "正在查询数据...",
scope: this
});
}
},
getCondition: function () {
var form = this.formSearch.getForm();
var sql = '';
/*
var sqldata = form.getValues();
sql = Ext.JSON.encode(sqldata);
*/
var mblNo = form.findField('PS_MBLNO').getValue();
sql = sql + getAndConSql(sql, mblNo, " (B.MBLNO= '" + 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 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_STLDATEBGN').getRawValue();
sql = sql + getAndConSql(sql, etdDate_Min, " B.SETTLETIME>='" + etdDate_Min + "'");
var etdDate_Max = form.findField('PS_STLDATEEND').getRawValue();
sql = sql + getAndConSql(sql, etdDate_Max, " B.SETTLETIME<='" + 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 CUSTOMERNAME = form.findField('PS_CUSTOMERNAME').getValue();
sql = sql + getAndConSql(sql, CUSTOMERNAME, "B.CUSTOMERNAME='" + CUSTOMERNAME + "'");
var CUSTNAME = form.findField('CUSTNAME').getValue();
sql = sql + getAndConSql(sql, CUSTNAME, "B.CUSTNAME='" + CUSTNAME + "'");
var SALE = form.findField('PS_SALE').getValue();
sql = sql + getAndConSql(sql, SALE, "B.SALE='" + SALE + "'");
var OP = form.findField('PS_OP').getValue();
sql = sql + getAndConSql(sql, OP, "B.OP='" + OP + "'");
var PS_STLNO = form.findField('PS_STLNO').getValue();
sql = sql + getAndConSql(sql, PS_STLNO, "B.BILLNO='" + PS_STLNO + "'");
var OPLB = form.findField('PS_OPLB').getValue();
sql = sql + getAndConSql(sql, OPLB, "B.OPLBNAME='" + OPLB + "'");
var PS_SALECORPID = form.findField('PS_SALECORPID').getValue();
sql = sql + getAndConSql(sql, PS_SALECORPID, "B.SALECORPID='" + PS_SALECORPID + "'");
var PS_CUSTSERVICE = form.findField('PS_CUSTSERVICE').getValue();
sql = sql + getAndConSql(sql, PS_CUSTSERVICE, "B.CUSTSERVICE='" + PS_CUSTSERVICE + "'");
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 BSSOURCE = form.findField('BSSOURCE').getValue();
sql = sql + getAndConSql(sql, BSSOURCE, "B.BSSOURCE='" + BSSOURCE + "'");
var BSSOURCEDETAIL = form.findField('BSSOURCEDETAIL').getValue();
sql = sql + getAndConSql(sql, BSSOURCEDETAIL, "B.BSSOURCEDETAIL='" + BSSOURCEDETAIL + "'");
var PS_FEELOCK = form.findField('PS_FEELOCK').getValue();
if (PS_FEELOCK == '已锁定')
sql = sql + getAndConSql(sql, PS_FEELOCK, "B.FEESTATUS=1");
else if (PS_FEELOCK == '未锁定')
sql = sql + getAndConSql(sql, PS_FEELOCK, "B.FEESTATUS=0");
// var 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='海运费') ");
// }
return sql;
},
getConditionBs: function () {
var form = this.formSearch.getForm();
var sql = '';
/*
var sqldata = form.getValues();
sql = Ext.JSON.encode(sqldata);
*/
var mblNo = form.findField('PS_MBLNO').getValue();
sql = sql + getAndConSql(sql, mblNo, " (B.CUSTNO like '%" + mblNo + "%' or B.MBLNO like '%" + mblNo + "%') ");
//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 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 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 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 OP = form.findField('PS_OP').getValue();
sql = sql + getAndConSql(sql, OP, "B.OP='" + OP + "'");
var OPLB = form.findField('PS_OPLB').getValue();
sql = sql + getAndConSql(sql, OPLB, "B.OPLBNAME='" + OPLB + "'");
var PS_SALECORPID = form.findField('PS_SALECORPID').getValue();
sql = sql + getAndConSql(sql, PS_SALECORPID, "B.SALECORPID='" + PS_SALECORPID + "'");
var PS_CUSTSERVICE = form.findField('PS_CUSTSERVICE').getValue();
sql = sql + getAndConSql(sql, PS_CUSTSERVICE, "B.CUSTSERVICE='" + PS_CUSTSERVICE + "'");
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 BSSOURCE = form.findField('BSSOURCE').getValue();
sql = sql + getAndConSql(sql, BSSOURCE, "B.BSSOURCE='" + BSSOURCE + "'");
var BSSOURCEDETAIL = form.findField('BSSOURCEDETAIL').getValue();
sql = sql + getAndConSql(sql, BSSOURCEDETAIL, "B.BSSOURCEDETAIL='" + BSSOURCEDETAIL + "'");
var PS_FEELOCK = form.findField('PS_FEELOCK').getValue();
if (PS_FEELOCK == '已锁定')
sql = sql + getAndConSql(sql, PS_FEELOCK, "B.FEESTATUS=1");
else if (PS_FEELOCK == '未锁定')
sql = sql + getAndConSql(sql, PS_FEELOCK, "B.FEESTATUS=0");
// var 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='海运费') ");
// }
return sql;
},
checkSearchCondition: function () {
var form = this.formSearch.getForm();
if (!form.isValid()) {
Ext.Msg.alert(Zi.LAN.TiShi, Zi.LAN.SelectConditionValError);//'查询条件赋值错误,请检查。');
return false;
}
return true;
},
onClearSql: function () {
var form = this.formSearch.getForm();
form.reset();
},
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] = "MsRptOpProfitIndex";
return ret;
},
onSaveGridClick: function (button, event) {
if (this.tabpanel.getActiveTab() == this.panelBodyChFee) {
this.girdcolums = DsTruck.SaveGridPanel(USERID, this.formname + 'bs', this.gridList.columns, this.girdcolums, 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.panelCustomerNameSum) {
this.girdcolumscustomername = DsTruck.SaveGridPanel(USERID, this.formname + 'customername', this.gridListCustomerName.columns, this.girdcolumscustomername, 1, true);
} else if (this.tabpanel.getActiveTab() == this.panelZj) {
this.girdcolumszj = DsTruck.SaveGridPanel(USERID, this.formname + 'zj', this.gridListzj.columns, this.girdcolumszj, 1, true);
} else if (this.tabpanel.getActiveTab() == this.panelBs) {
this.girdcolumsbs = DsTruck.SaveGridPanel(USERID, this.formname + 'bs', this.gridListbs.columns, this.girdcolumsbs, 1, true);
} else if (this.tabpanel.getActiveTab() == this.panelBodyChFeeDr) {
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);
}
this.gridlistsumcolumn = DsTruck.SaveGridPanel(USERID, this.formname + 'sum', this.gridListSum.columns, this.gridlistsumcolumn, 1, true);
},
oninitGridClick: function (button, event) {
if (this.tabpanel.getActiveTab() == this.panelBodyChFee) {
var agirdcolums = this.initgirdcolums;
this.gridList.reconfigure(this.storeList, agirdcolums);
this.girdcolums = DsTruck.SaveGridPanel(USERID, this.formname + 'bs', this.gridList.columns, this.initgirdcolums, 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.panelCustomerNameSum) {
this.gridListCustomerName.reconfigure(this.storeCustomerNameList, this.initgirdcolumscustomername);
this.girdcolumscustomername = DsTruck.SaveGridPanel(USERID, this.formname + 'customername', this.gridListCustomerName.columns, this.initgirdcolumscustomername, 1, true);
} else if (this.tabpanel.getActiveTab() == this.panelZj) {
this.gridListzj.reconfigure(this.storeListzj, this.initgirdcolumszj);
this.girdcolumszj = DsTruck.SaveGridPanel(USERID, this.formname + 'zj', this.gridListzj.columns, this.initgirdcolumszj, 1, true);
} else if (this.tabpanel.getActiveTab() == this.panelBs) {
this.gridListbs.reconfigure(this.storeListbs, this.initgirdcolumsbs);
this.girdcolumsbs = DsTruck.SaveGridPanel(USERID, this.formname + 'bs', this.gridListbs.columns, this.initgirdcolumsbs, 1, true);
} else if (this.tabpanel.getActiveTab() == this.panelBodyChFeeDr) {
this.gridListDr.reconfigure(this.storeListDr, this.initgirdcolumsdr);
this.girdcolumsdr = DsTruck.SaveGridPanel(USERID, this.formname + 'dr', this.gridListDr.columns, this.initgirdcolumsdr, 1, true);
} else if (this.tabpanel.getActiveTab() == this.panelBodyChFeeCr) {
this.gridListCr.reconfigure(this.storeListCr, this.initgirdcolumscr);
this.girdcolumscr = DsTruck.SaveGridPanel(USERID, this.formname + 'cr', this.gridListCr.columns, this.initgirdcolumscr, 1, true);
}
},
onExportClick: function (button, event) {
_this = this;
if (this.tabpanel.getActiveTab() == this.panelBodyChFee) {
if (this.storeList.getCount() == 0) {
return;
}
var sortstr = ' CUSTOMERNAME,OPDATE';
if (this.bslistsortfield != '' && this.bslistsortdire != '') {
sortstr = this.bslistsortfield + ' ' + this.bslistsortdire;
}
Ext.Msg.wait('正在组织数据, 请稍侯..');//'正在组织数据, 请稍侯..'
Ext.Ajax.request({
waitMsg: '正在组织数据, 请稍侯..',//'正在组织数据...'
url: '/MvcShipping/MsRptLhRptList/LhRptListData',
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 sql1 = returnstr;
sql1 = sql1.replace(/\+/g, "@@@")
if (sql1 != '') {
GridExportBySql(sql1, this.formname + 'bs', '统计明细.xls');
}
} 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';
Ext.Msg.wait('正在组织数据, 请稍侯..');//'正在组织数据, 请稍侯..'
Ext.Ajax.request({
waitMsg: '正在组织数据, 请稍侯..',//'正在组织数据...'
url: '/MvcShipping/MsRptLhRptList/CustNameLhRptListData',
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 sql1 = returnstr;
sql1 = sql1.replace(/\+/g, "@@@")
if (sql1 != '') {
GridExportBySql(sql1, this.formname + 'cust', '结算单位.xls');//委托单位
}
} 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.panelCustomerNameSum) {
if (this.storeCustomerNameList.getCount() == 0) {
return;
}
var sortstr = ' CUSTOMERNAME';
Ext.Msg.wait('正在组织数据, 请稍侯..');//'正在组织数据, 请稍侯..'
Ext.Ajax.request({
waitMsg: '正在组织数据, 请稍侯..',//'正在组织数据...'
url: '/MvcShipping/MsRptLhRptList/CustomerNameLhRptListData',
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 sql1 = returnstr;
sql1 = sql1.replace(/\+/g, "@@@")
if (sql1 != '') {
GridExportBySql(sql1, this.formname + 'customername', '委托单位.xls');//委托单位
}
} 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.panelZj) {
if (this.storeListzj.getCount() == 0) {
return;
}
var sortstr = ' CUSTOMERNAME,OPDATE';
Ext.Msg.wait('正在组织数据, 请稍侯..');//'正在组织数据, 请稍侯..'
Ext.Ajax.request({
waitMsg: '正在组织数据, 请稍侯..',//'正在组织数据...'
url: '/MvcShipping/MsRptLhRptList/LhRptListData',
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 sql1 = returnstr;
sql1 = sql1.replace(/\+/g, "@@@")
if (sql1 != '') {
GridExportBySql(sql1, this.formname + 'zj', '资金占用成本.xls');//委托单位
}
} 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.panelBs) {
if (this.storeListbs.getCount() == 0) {
return;
}
var sortstr = ' CUSTOMERNAME,OPDATE';
Ext.Msg.wait('正在组织数据, 请稍侯..');//'正在组织数据, 请稍侯..'
Ext.Ajax.request({
waitMsg: '正在组织数据, 请稍侯..',//'正在组织数据...'
url: '/MvcShipping/MsRptLhRptList/LhRptListBsData',
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 sql1 = returnstr;
sql1 = sql1.replace(/\+/g, "@@@")
if (sql1 != '') {
GridExportBySql(sql1, this.formname + 'zj', '资金占用成本单票合计.xls');//委托单位
}
} 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.panelBodyChFeeDr) {
var sql2 = this.sqlcontext2;
if (sql2 != '') sql2 = sql2 + " and F.FEETYPE=1 ";
if (this.storeListDr.getCount() == 0) {
return;
}
var sortstr = ' CUSTNAME,OPDATE';
Ext.Msg.wait('正在组织数据, 请稍侯..');//'正在组织数据, 请稍侯..'
Ext.Ajax.request({
waitMsg: '正在组织数据, 请稍侯..',//'正在组织数据...'
url: '/MvcShipping/MsRptLhRptList/BsListData',
scope: this,
params: {
start: 0, limit: this.PageSize,
condition: sql2,
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 sql1 = returnstr;
sql1 = sql1.replace(/\+/g, "@@@")
if (sql1 != '') {
GridExportBySql(sql1, this.formname + 'dr', '应收单票.xls');//委托单位
}
} 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.panelBodyChFeeCr) {
var sql2 = this.sqlcontext2;
if (sql2 != '') sql2 = sql2 + " and F.FEETYPE=2 ";
if (this.storeListCr.getCount() == 0) {
return;
}
var sortstr = ' CUSTNAME,OPDATE';
Ext.Msg.wait('正在组织数据, 请稍侯..');//'正在组织数据, 请稍侯..'
Ext.Ajax.request({
waitMsg: '正在组织数据, 请稍侯..',//'正在组织数据...'
url: '/MvcShipping/MsRptLhRptList/BsCrListData',
scope: this,
params: {
start: 0, limit: this.PageSize,
condition: sql2,
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 sql1 = returnstr;
sql1 = sql1.replace(/\+/g, "@@@")
if (sql1 != '') {
GridExportBySql(sql1, this.formname + 'cr', '应付单票.xls');//委托单位
}
} 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 () {
_this = this;
if (this.tabpanel.getActiveTab() == this.panelBodyChFee) {
if (this.storeList.getCount() == 0) {
return;
}
var sortstr = ' B.CUSTOMERNAME,B.OPLB,B.CREATETIME DESC';
if (this.bslistsortfield != '' && this.bslistsortdire != '') {
sortstr = this.bslistsortfield + ' ' + this.bslistsortdire;
}
Ext.Msg.wait(Zi.LAN.HandlingDataAndWait);//'正在组织数据, 请稍侯..'
Ext.Ajax.request({
waitMsg: Zi.LAN.HandlingData,//'正在组织数据...'
url: '/MvcShipping/MsRptOpBsList/BsListData',
scope: this,
params: {
start: 0, limit: this.PageSize,
condition: _this.sqlcontext,
printstr: 'true',
sortstr: sortstr
},
callback: function (options, success, response) {
if (success) {
Ext.MessageBox.hide();
var jsonresult = Ext.JSON.decode(response.responseText);
if (jsonresult.Success) {
var returnstr = jsonresult.Data;
var condition = jsonresult.Message;
if (condition != '') condition = ' where ' + condition;
var printType = 'MSRPTBSLIST';
var sql1 = returnstr;
var sql2 = "";
var sql3 = "select CUSTOMERNAME,COUNT(BSNO) BLCOUNT,SUM(TEU) TEU from V_OP_BILL where BSNO IN (SELECT distinct B.BSNO FROM V_OP_BILL B LEFT JOIN v_op_gain_sum_INV G ON (G.BSNO=B.BSNO) " + condition + ") group by CUSTOMERNAME";
var sql4 = "select CARRIER,COUNT(BSNO) BLCOUNT,SUM(TEU) TEU from V_OP_BILL where BSNO IN (SELECT distinct B.BSNO FROM V_OP_BILL B LEFT JOIN v_op_gain_sum_INV G ON (G.BSNO=B.BSNO) " + condition + ") group by CARRIER";
var sql5 = "select OP,COUNT(BSNO) BLCOUNT,SUM(TEU) TEU from V_OP_BILL where BSNO IN (SELECT distinct B.BSNO FROM V_OP_BILL B LEFT JOIN v_op_gain_sum_INV G ON (G.BSNO=B.BSNO) " + condition + ") group by OP";
var sql6 = "select COUNT(BSNO) BLCOUNT,SUM(TEU) TEU from V_OP_BILL where BSNO IN (SELECT distinct B.BSNO FROM V_OP_BILL B LEFT JOIN v_op_gain_sum_INV G ON (G.BSNO=B.BSNO) " + condition + ") ";
PrintComm(printType, sql1, sql2, sql3, sql4, sql5, sql6);
} else {
Ext.Msg.show({ title: Zi.LAN.E, msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
}
} else {
Ext.Msg.show({ title: Zi.LAN.Retry,
msg: Zi.LAN.ServerResponseError,
icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK
});
}
}
});
} else if (this.tabpanel.activeTab == this.panelCustSum) {
if (this.storeCustList.getCount() == 0) {
return;
}
var sortstr = ' B.CUSTOMERNAME';
if (this.custlistsortfield != '' && this.custlistsortdire != '') {
sortstr = this.custlistsortfield + ' ' + this.custlistsortdire;
}
Ext.Msg.wait(Zi.LAN.HandlingDataAndWait);//'正在组织数据, 请稍侯..'
Ext.Ajax.request({
waitMsg: Zi.LAN.HandlingData,//'正在组织数据...'
url: '/MvcShipping/MsRptOpBsList/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 = 'MSRPTBSLISTCUST';
var sql1 = returnstr;
var sql2 = "";
var sql3 = "";
var sql4 = "";
var sql5 = "";
var sql6 = "";
PrintComm(printType, sql1, sql2, sql3, sql4, sql5, sql6);
} else {
Ext.Msg.show({ title: Zi.LAN.E, msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
}
} else {
Ext.Msg.show({ title: Zi.LAN.Retry,
msg: Zi.LAN.ServerResponseError,
icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK
});
}
}
});
}
}
});