//集运管理-路单查询
Ext.namespace('Shipping');
Shipping.MsRptProfitViewIndex = function (config) {
Ext.applyIf(this, config);
this.initUIComponents();
window.Shipping.MsRptProfitViewIndex.superclass.constructor.call(this);
};
Ext.extend(Shipping.MsRptProfitViewIndex, Ext.Panel, {
PageSize: 30,
OprationStatus: null, //仅当弹出界面时使用
SelectedRecord: null,
sqlcontext: '1=2',
initUIComponents: function () {
//定义数据集
this.formname = 'MsRptOpProfitIndex';
this.storeList = Ext.create('Ext.data.Store', {
pageSize: this.PageSize,
fields: [
{ name: 'BSNO', type: 'string' },
{ name: 'OPLB', type: 'string' },
{ name: 'OPLBNAME', type: 'string' },
{ name: 'OPTYPE', type: 'string' },
{ name: 'BLTYPE', type: 'string' },
{ name: 'BSTYPE', type: 'string' },
{ name: 'BLFRT', type: 'string' },
{ name: 'FEESTATUSREF', type: 'string' },
{ name: 'CUSTOMERNAME', type: 'string' },
{ name: 'CUSTFULLNAME', type: 'string' },
{ name: 'CUSTNO', type: 'string' },
{ name: 'MBLNO', type: 'string' },
{ name: 'HBLNO', type: 'string' },
{ name: 'ETD', type: 'string' },
{ name: 'ATD', type: 'string' },
{ name: 'VESSEL', type: 'string' },
{ name: 'VOYNO', type: 'string' },
{ name: 'INPUTBY', type: 'string' },
{ name: 'CREATETIME', type: 'string' },
{ name: 'BSSTATUS', type: 'string' },
{ name: 'SALE', type: 'string' },
{ name: 'OP', type: 'string' },
{ name: 'DOC', type: 'string' },
{ name: 'CUSTSERVICE', type: 'string' },
{ name: 'FRCUSTSERVICE', 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: 'CARGOID', type: 'string' },
{ name: 'BSSOURCE', type: 'string' },
{ name: 'BSSOURCEDETAIL', type: 'string' },
{ name: 'LANE', type: 'string' },
{ name: 'ISCANCEL', type: 'string' },
{ name: 'CONTRACTNO', type: 'string' },
{ name: 'ORDERNO', 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: 'FEECLOSETIME', type: 'string' },
{ name: 'ENTERP', type: 'string' },
{ name: 'REMARK', type: 'string' },
{ name: 'REMARK2', type: 'string' },
{ name: 'AGENTID', type: 'string' },
{ name: 'ETA', type: 'string' },
{ name: 'SALEDEPT', type: 'string' },
{ name: 'ISSUETYPE', type: 'string' },
{ name: 'CNTRSEALNO', type: 'string' },
{ name: 'TRUCKER', type: 'string' },
{ name: 'SERVICECONTRACTNO', type: 'string' },
{ name: 'CUSTOMSER', type: 'string' },
{ name: 'CLOSINGDATE', type: 'string' },
{ name: 'KINDPKGS', type: 'string' },
{ name: 'SALECORP', type: 'string' },
{ name: 'YARD', type: 'string' },
{ name: 'PKGS', type: 'number' },
{ name: 'CBM', type: 'number' },
{ name: 'KGS', type: 'number' },
{ name: 'NETWEIGHT', 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: 'RMBDR', type: 'number' },
{ name: 'RMBCR', type: 'number' },
{ name: 'USDDR', type: 'number' },
{ name: 'USDCR', type: 'number' },
{ name: 'OTDR', type: 'number' },
{ name: 'OTCR', type: 'number' },
{ name: 'TTLDR', type: 'number' },
{ name: 'TTLCR', type: 'number' },
{ name: 'TTLTAXDR', type: 'number' },
{ name: 'TTLTAXCR', type: 'number' },
{ name: 'TTLTAXPROFIT', type: 'number' },
{ name: 'RMBPROFIT', type: 'number' },
{ name: 'USDPROFIT', type: 'number' },
{ name: 'OTPROFIT', type: 'number' },
{ name: 'TTLPROFIT', type: 'number' },
{ name: 'NOTAXRMBDR', type: 'number' },
{ name: 'NOTAXRMBCR', type: 'number' },
{ name: 'NOTAXUSDDR', type: 'number' },
{ name: 'NOTAXUSDCR', type: 'number' },
{ name: 'NOTAXOTDR', type: 'number' },
{ name: 'NOTAXOTCR', type: 'number' },
{ name: 'NOTAXTTLDR', type: 'number' },
{ name: 'NOTAXTTLCR', type: 'number' },
{ name: 'NOTAXRMBPROFIT', type: 'number' },
{ name: 'NOTAXUSDPROFIT', type: 'number' },
{ name: 'NOTAXOTPROFIT', type: 'number' },
{ name: 'NOTAXTTLPROFIT', type: 'number' },
{ name: 'NOACCTAXRMBDR', type: 'number' },
{ name: 'NOACCTAXRMBCR', type: 'number' },
{ name: 'NOACCTAXUSDDR', type: 'number' },
{ name: 'NOACCTAXUSDCR', type: 'number' },
{ name: 'NOACCTAXOTDR', type: 'number' },
{ name: 'NOACCTAXOTCR', type: 'number' },
{ name: 'NOACCTAXTTLDR', type: 'number' },
{ name: 'NOACCTAXTTLCR', type: 'number' },
{ name: 'NOACCTAXRMBPROFIT', type: 'number' },
{ name: 'NOACCTAXUSDPROFIT', type: 'number' },
{ name: 'NOACCTAXOTPROFIT', type: 'number' },
{ name: 'NOACCTAXTTLPROFIT', type: 'number' },
{ name: 'RMBNODR', type: 'number' },
{ name: 'USDNODR', type: 'number' },
{ name: 'OTNODR', type: 'number' },
{ name: 'TTLNODR', type: 'number' },
{ name: 'RMBNOCR', type: 'number' },
{ name: 'USDNOCR', type: 'number' },
{ name: 'OTNOCR', type: 'number' },
{ name: 'TTLNOCR', type: 'number' },
{ name: 'STLRMBDR', type: 'number' },
{ name: 'STLUSDDR', type: 'number' },
{ name: 'STLOTDR', type: 'number' },
{ name: 'STLTTLDR', type: 'number' },
{ name: 'STLRMBCR', type: 'number' },
{ name: 'STLUSDCR', type: 'number' },
{ name: 'STLOTCR', type: 'number' },
{ name: 'STLTTLCR', type: 'number' },
{ name: 'PROFITRATE', type: 'number' },
{ name: 'NOTAXPROFITRATE', type: 'number' }
],
remoteSort: true,
proxy: {
type: 'ajax',
timeout: 120000,
url: '/MvcShipping/MsRptOpProfit/BsListData',
reader: {
id: '',
root: 'data',
totalProperty: 'totalCount'
}
}
});
//定义Grid
this.initgirdcolums = [{
sortable: true,
dataIndex: 'BSNO',
text: '编号',
hidden: true,
width: 130
}, {
sortable: true,
dataIndex: 'OPLBNAME',
text: Zi.LAN.OPLBNAME,
width: 70,
renderer: function (value, cellmeta) {
if (value == '海运出口') {
return Zi.LAN.HYCK;
} else if (value == '海运进口') {
return Zi.LAN.HYJK;
} else {
return value;
}
}
}, {
sortable: true,
dataIndex: 'OPTYPE',
text: Zi.LAN.OPTYPE,
width: 70,
renderer: function (value, meta) {
if (value == '普通货')
return Zi.LAN.PUTONGHUO; //是
else
return Zi.LAN.GENGGAIDAN;
}
}, {
sortable: true,
dataIndex: 'FEESTATUSREF',
text: Zi.LAN.FEESTATUSREF,
width: 70,
renderer: function (value, meta) {
if (value == '锁定')
return Zi.LAN.LOCK; //是
else
return Zi.LAN.UNLOCK;
}
}, {
sortable: true,
dataIndex: 'BSSTATUS',
text: Zi.LAN.BSSTATUS,
width: 70,
renderer: function (value, meta) {
if (value == '1')
return Zi.LAN.LOCK; //是
else
return Zi.LAN.UNLOCK;
}
}, {
dataIndex: 'ISCANCEL',
header: Zi.LAN.ISCANCEL, //'退舱',
width: 60,
renderer: function (value, meta, record) {
if (value == '1')
return '√';
else if (value == '2')
return '申请退舱';
else if (value == '4')
return '驳回申请';
else
return '';
}
}, {
sortable: true,
dataIndex: 'BSTYPE',
text: Zi.LAN.BSTYPE,
width: 70,
renderer: function (value, cellmeta) {
if (value == '海运出口') {
return Zi.LAN.HYCK;
} else if (value == '海运进口') {
return Zi.LAN.HYJK;
}
}
}, {
sortable: true,
dataIndex: 'BLTYPE',
text: 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: 'BLFRT',
text: Zi.LAN.BLFRT,
width: 70
}, {
sortable: true,
dataIndex: 'ISSUETYPE',
text: Zi.LAN.ISSUETYPE,
width: 70
}, {
sortable: true,
dataIndex: 'OPDATE',
text: Zi.LAN.OPDATE,
width: 86
}, {
sortable: true,
dataIndex: 'CUSTOMDATE',
text: Zi.LAN.CUSTOMDATE,
width: 86
}, {
sortable: true,
dataIndex: 'CUSTOMERNAME',
text: Zi.LAN.CUSTOMERNAME,
width: 120
}, {
sortable: true,
dataIndex: 'CUSTFULLNAME',
text: Zi.LAN.CUSTFULLNAME,
width: 140
}, {
sortable: true,
dataIndex: 'CUSTNO',
text: Zi.LAN.CUSTNO,
width: 136
}, {
sortable: true,
dataIndex: 'CUSTOMNO',
text: Zi.LAN.CUSTOMNO,
width: 136
}, {
sortable: true,
dataIndex: 'ENTERP',
text: Zi.LAN.ENTERP,
width: 100
}, {
sortable: true,
dataIndex: 'CUSTOMSER',
text: Zi.LAN.CUSTOMSER,
width: 100
}, {
sortable: true,
dataIndex: 'FORWARDER',
text: Zi.LAN.FORWARDER,
width: 100
}, {
sortable: true,
dataIndex: 'MBLNO',
text: Zi.LAN.MBLNO,
width: 120
}, {
sortable: true,
dataIndex: 'HBLNO',
text: Zi.LAN.HBLNO,
width: 120
}, {
sortable: true,
dataIndex: 'ETD',
text: Zi.LAN.ETD,
width: 86
}, {
sortable: true,
dataIndex: 'ETA',
text: Zi.LAN.ETA,
width: 86
}, {
sortable: true,
dataIndex: 'ATD',
text: Zi.LAN.ATD,
width: 86
}, {
sortable: true,
dataIndex: 'VESSEL',
text: Zi.LAN.VESSEL,
width: 200
}, {
sortable: true,
dataIndex: 'VOYNO',
text: Zi.LAN.VOYNO,
width: 50
}, {
sortable: true,
dataIndex: 'SALE',
text: Zi.LAN.SALE,
width: 80
}, {
sortable: true,
dataIndex: 'OP',
text: Zi.LAN.OP,
width: 80
}, {
sortable: true,
dataIndex: 'DOC',
text: Zi.LAN.DOC,
width: 80
}, {
sortable: true,
dataIndex: 'SALEDEPT',
text: Zi.LAN.SALEDEPT,
width: 80
}, {
sortable: true,
dataIndex: 'CUSTSERVICE',
text: Zi.LAN.CUSTSERVICE,
width: 80
}, {
sortable: true,
dataIndex: 'FRCUSTSERVICE',
text: Zi.LAN.FRCUSTSERVICE,
width: 80
}, {
sortable: true,
dataIndex: 'CONTRACTNO',
text: Zi.LAN.CONTRACTNO,
width: 80
}, {
sortable: true,
dataIndex: 'ORDERNO',
text: Zi.LAN.ORDERNO,
width: 80
}, {
sortable: true,
dataIndex: 'PORTLOAD',
text: Zi.LAN.PORTLOAD,
width: 80
}, {
sortable: true,
dataIndex: 'PORTDISCHARGE',
text: Zi.LAN.PORTDISCHARGE,
width: 150
}, {
sortable: true,
dataIndex: 'DESTINATION',
header: Zi.LAN.DESTINATION,
width: 150
}, {
sortable: true,
dataIndex: 'ACCDATE',
text: Zi.LAN.ACCDATE,
width: 80
}, {
sortable: true,
dataIndex: 'CARRIER',
text: Zi.LAN.CARRIER,
width: 80
}, {
sortable: true,
dataIndex: 'LANE',
text: Zi.LAN.LANE,
width: 80
}, {
sortable: true,
dataIndex: 'BSSOURCE',
text: Zi.LAN.BSSOURCE,
width: 120
}, {
sortable: true,
dataIndex: 'BSSOURCEDETAIL',
text: Zi.LAN.BSSOURCEDETAIL,
width: 120
}, {
sortable: true,
dataIndex: 'YARD',
text: Zi.LAN.YARD,
width: 120
}, {
sortable: true,
dataIndex: 'AGENTID',
text: Zi.LAN.AGENTID,
width: 120
}, {
dataIndex: 'CARGOID',
header: Zi.LAN.CARGOID, //'货物标识',
width: 120
}, {
sortable: true,
dataIndex: 'REMARK',
text: Zi.LAN.REMARK,
width: 120
}, {
sortable: true,
dataIndex: 'REMARK2',
text: Zi.LAN.REMARK2,
width: 120
}, {
sortable: true,
dataIndex: 'TEU',
text: Zi.LAN.TEU,
width: 80
}, {
sortable: true,
dataIndex: 'PKGS',
text: Zi.LAN.PKGS,
width: 80
}, {
sortable: true,
dataIndex: 'KINDPKGS',
text: Zi.LAN.KINDPKGS,
width: 80
}, {
sortable: true,
dataIndex: 'KGS',
text: Zi.LAN.KGS,
width: 80
}, {
sortable: true,
dataIndex: 'CBM',
text: Zi.LAN.CBM,
width: 80
}, {
sortable: true,
dataIndex: 'NETWEIGHT',
text: Zi.LAN.NETWEIGHT,
width: 80
}, {
sortable: true,
dataIndex: 'GOODSNAME',
text: Zi.LAN.GOODSNAME,
width: 80
}, {
sortable: true,
dataIndex: 'CREATETIME',
text: Zi.LAN.CREATETIME,
width: 80
}, {
sortable: true,
dataIndex: 'CNTRTOTAL',
text: Zi.LAN.CNTRTOTAL,
width: 80
}, {
sortable: true,
dataIndex: 'CNTRSEALNO',
text: Zi.LAN.CNTRSEALNO,
width: 80
}, {
sortable: true,
dataIndex: 'TRUCKER',
text: Zi.LAN.TRUCKER,
width: 80
}, {
sortable: true,
dataIndex: 'SERVICECONTRACTNO',
text: Zi.LAN.SERVICECONTRACTNO,
width: 80
}, {
sortable: true,
dataIndex: 'SALECORP',
text: Zi.LAN.SALECORP,
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
}, {
text: Zi.LAN.ALLIN,
dataIndex: 'ALLIN',
columns: [{
sortable: true,
dataIndex: 'RMBDR',
text: Zi.LAN.RMBDR,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'RMBCR',
text: 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 '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'RMBPROFIT',
text: Zi.LAN.RMBPROFIT,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'USDDR',
text: Zi.LAN.USDDR,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'USDCR',
text: 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 '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'USDPROFIT',
text: Zi.LAN.USDPROFIT,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'OTDR',
text: Zi.LAN.OTDR,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'OTCR',
text: 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 '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'OTPROFIT',
text: Zi.LAN.OTPROFIT,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'TTLDR',
text: 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 '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'TTLCR',
text: 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 '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'TTLPROFIT',
text: Zi.LAN.TTLPROFIT,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'PROFITRATE',
text: Zi.LAN.PROFITRATE,
width: 80,
renderer: function (value, meta) {
if (value != 0) value = value + '%';
return value;
}
}, {
sortable: true,
dataIndex: 'TTLTAXDR',
text: Zi.LAN.TTLTAXDR,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'TTLTAXCR',
text: Zi.LAN.TTLTAXCR,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'TTLTAXPROFIT',
text: Zi.LAN.TTLTAXPROFIT,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 80
}]
}, {
text: Zi.LAN.ALLBALANCE,
dataIndex: 'ALLBALANCE',
columns: [{
sortable: true,
dataIndex: 'STLRMBDR',
text: 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 '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'RMBNODR',
text: 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 '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'STLUSDDR',
text: 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 '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'USDNODR',
text: 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 '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'STLOTDR',
text: 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 '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'OTNODR',
text: 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 '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'STLTTLDR',
text: 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 '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'TTLNODR',
text: 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 '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'STLRMBCR',
text: 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 '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'RMBNOCR',
text: 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 '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'STLUSDCR',
text: 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 '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'USDNOCR',
text: 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 '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'STLOTCR',
text: 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 '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'OTNOCR',
text: 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 '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'STLTTLCR',
text: 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 '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'TTLNOCR',
text: 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 '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 80
}]
}, {
text: Zi.LAN.ALLNOTAX,
dataIndex: 'ALLNOTAX',
columns: [{
sortable: true,
dataIndex: 'NOTAXRMBDR',
text: Zi.LAN.NOTAXRMBDR,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 90
}, {
sortable: true,
dataIndex: 'NOTAXRMBCR',
text: Zi.LAN.NOTAXRMBCR,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 90
}, {
sortable: true,
dataIndex: 'NOTAXRMBPROFIT',
text: Zi.LAN.NOTAXRMBPROFIT,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 90
}, {
sortable: true,
dataIndex: 'NOTAXUSDDR',
text: Zi.LAN.NOTAXUSDDR,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 90
}, {
sortable: true,
dataIndex: 'NOTAXUSDCR',
text: Zi.LAN.NOTAXUSDCR,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 90
}, {
sortable: true,
dataIndex: 'NOTAXUSDPROFIT',
text: Zi.LAN.NOTAXUSDPROFIT,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 90
}, {
sortable: true,
dataIndex: 'NOTAXOTDR',
text: Zi.LAN.NOTAXOTDR,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 90
}, {
sortable: true,
dataIndex: 'NOTAXOTCR',
text: Zi.LAN.NOTAXOTCR,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 90
}, {
sortable: true,
dataIndex: 'NOTAXOTPROFIT',
text: Zi.LAN.NOTAXOTPROFIT,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 90
}, {
sortable: true,
dataIndex: 'NOTAXTTLDR',
text: Zi.LAN.NOTAXTTLDR,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 90
}, {
sortable: true,
dataIndex: 'NOTAXTTLCR',
text: Zi.LAN.NOTAXTTLCR,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 90
}, {
sortable: true,
dataIndex: 'NOTAXTTLPROFIT',
text: Zi.LAN.NOTAXTTLPROFIT,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 90
}, {
sortable: true,
dataIndex: 'NOTAXPROFITRATE',
text: Zi.LAN.NOTAXPROFITRATE,
width: 80,
renderer: function (value, meta) {
if (value != 0) value = value + '%';
return value;
}
}]
}, {
text: Zi.LAN.ALLNOACCTAX,
dataIndex: 'ALLNOACCTAX',
columns: [{
sortable: true,
dataIndex: 'NOACCTAXRMBDR',
text: Zi.LAN.NOACCTAXRMBDR,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 90
}, {
sortable: true,
dataIndex: 'NOACCTAXRMBCR',
text: Zi.LAN.NOACCTAXRMBCR,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 90
}, {
sortable: true,
dataIndex: 'NOACCTAXRMBPROFIT',
text: Zi.LAN.NOACCTAXRMBPROFIT,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 90
}, {
sortable: true,
dataIndex: 'NOACCTAXUSDDR',
text: Zi.LAN.NOACCTAXUSDDR,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 90
}, {
sortable: true,
dataIndex: 'NOACCTAXUSDCR',
text: Zi.LAN.NOACCTAXUSDCR,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 90
}, {
sortable: true,
dataIndex: 'NOACCTAXUSDPROFIT',
text: Zi.LAN.NOACCTAXUSDPROFIT,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 90
}, {
sortable: true,
dataIndex: 'NOACCTAXOTDR',
text: Zi.LAN.NOACCTAXOTDR,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 90
}, {
sortable: true,
dataIndex: 'NOACCTAXOTCR',
text: Zi.LAN.NOACCTAXOTCR,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 90
}, {
sortable: true,
dataIndex: 'NOACCTAXOTPROFIT',
text: Zi.LAN.NOACCTAXOTPROFIT,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 90
}, {
sortable: true,
dataIndex: 'NOACCTAXTTLDR',
text: Zi.LAN.NOACCTAXTTLDR,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 90
}, {
sortable: true,
dataIndex: 'NOACCTAXTTLCR',
text: Zi.LAN.NOACCTAXTTLCR,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 90
}, {
sortable: true,
dataIndex: 'NOACCTAXTTLPROFIT',
text: Zi.LAN.NOACCTAXTTLPROFIT,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '' + lsValue + ''; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 90
}]
}
];
this.Pagenum = 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.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.ShuJuJiaZaiZhongQingShaoDeng },
trackMouseOver: true,
disableSelection: false,
viewConfig: {
enableTextSelection: true, //允许复制数据
autoFill: true,
getRowClass: function (record, rowIndex, rowParams, store) {
var ISCANCEL = record.get('ISCANCEL');
if (ISCANCEL == '1')
return 'feestatus_Del';
}
},
columns: this.girdcolums,
// paging bar on the bottom
bbar: [Ext.create('Ext.PagingToolbar', {
store: this.storeList,
displayInfo: true,
displayMsg: Zi.LAN.displayMsg,
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 = this;
this.SearchBtn = new Ext.Button({
text: '隐藏查询',
handler: function () {
if (_this.SearchBtn.text == '隐藏查询') {
_this.panelSearch.hide();
_this.SearchBtn.setText("显示查询");
} else {
_this.panelSearch.show();
_this.SearchBtn.setText("隐藏查询");
}
}
});
this.panelBtn = new Ext.Panel({
region: "north",
tbar: [
{
text: "关闭",
iconCls: "btnrefresh",
handler: function (button, event) {
window.close();
},
scope: this
}
]
});
this.panelBodyChFee = new Ext.Panel({
title: '业务明细',
layout: "border",
region: 'center',
margin: '0 0',
frame: true,
items: [this.gridList]
});
Ext.apply(this, {
items: [this.panelBodyChFee]
});
this.storeList.on('beforeload', function (store) {
Ext.apply(store.proxy.extraParams, { condition: this.sqlcontext });
}, this);
this.ParentWin = window.parent.opener._this;
if (this.ParentWin) {
this.sqlcontext = this.ParentWin.sqlcontext + ' AND ' + this.ParentWin.sqlselect;
}
this.onRefreshClick();
}, //end initUIComponents
onRefreshClick: function (button, event) {
this.storeList.load({
params: { start: 0, limit: this.PageSize, condition: this.sqlcontext },
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.CUSTNO like '%" + mblNo + "%' or B.MBLNO like '%" + mblNo + "%' or B.HBLNO like '%" + mblNo + "%' or B.CUSTOMNO like '%" + mblNo + "%' or B.ORDERNO like '%" + mblNo + "%') ");
var expDate_Min = form.findField('PS_EXPDATEBGN').getRawValue();
sql = sql + getAndConSql(sql, expDate_Min, " B.OPDATE>='" + expDate_Min + "'");
var expDate_Max = form.findField('PS_EXPDATEEND').getRawValue();
sql = sql + getAndConSql(sql, expDate_Max, " B.OPDATE<='" + expDate_Max + " 23:59:59'");
var etdDate_Min = form.findField('PS_ETDDATEBGN').getRawValue();
sql = sql + getAndConSql(sql, etdDate_Min, " B.ETD>='" + etdDate_Min + "'");
var etdDate_Max = form.findField('PS_ETDDATEEND').getRawValue();
sql = sql + getAndConSql(sql, etdDate_Max, " B.ETD<='" + etdDate_Max + " 23:59:59'");
var accDate_Min = form.findField('PS_ACCDATEBGN').getRawValue();
sql = sql + getAndConSql(sql, accDate_Min, " B.ACCDATE>='" + accDate_Min + "'");
var accDate_Max = form.findField('PS_ACCDATEEND').getRawValue();
sql = sql + getAndConSql(sql, accDate_Max, " B.ACCDATE<='" + accDate_Max + "'");
var ENTERP = form.findField('PS_ENTERP').getValue();
sql = sql + getAndConSql(sql, ENTERP, "B.ENTERP='" + ENTERP + "'");
var FEESTATUS = form.findField('PS_FEESTATUS').getValue();
if (FEESTATUS == 1) {
sql = sql + getAndConSql(sql, FEESTATUS, " B.BSNO NOT IN (Select distinct BSNO from ch_fee where feetype=1) ");
} if (FEESTATUS == 2) {
sql = sql + getAndConSql(sql, FEESTATUS, " B.BSNO NOT IN (Select distinct BSNO from ch_fee where feetype=2) ");
} if (FEESTATUS == 3) {
sql = sql + getAndConSql(sql, FEESTATUS, " B.BSNO NOT IN (Select distinct BSNO from ch_fee ) ");
} if (FEESTATUS == 4) {
sql = sql + getAndConSql(sql, FEESTATUS, " B.BSNO IN (Select distinct BSNO from ch_fee where feestatus=1) ");
} if (FEESTATUS == 5) {
sql = sql + getAndConSql(sql, FEESTATUS, " B.BSNO IN (Select distinct BSNO from ch_fee where feestatus=6) ");
} if (FEESTATUS == 6) {
sql = sql + getAndConSql(sql, FEESTATUS, " B.BSNO IN (Select distinct BSNO from ch_fee where feestatus in (1,2,6)) ");
} if (FEESTATUS == 7) {
sql = sql + getAndConSql(sql, FEESTATUS, " B.BSNO IN (Select distinct BSNO from ch_fee where feestatus<>9) ");
}
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 BSTYPE = form.findField('PS_BSTYPE').getValue();
sql = sql + getAndConSql(sql, BSTYPE, "B.BSTYPE='" + BSTYPE + "'");
var OPLB = form.findField('PS_OPLB').getValue();
sql = sql + getAndConSql(sql, OPLB, "B.OPLBNAME='" + OPLB + "'");
var VESSEL = form.findField('PS_VESSEL').getValue();
sql = sql + getAndConSql(sql, VESSEL, "B.VESSEL like '%" + VESSEL + "%'");
var VOYNO = form.findField('PS_VOYNO').getValue();
sql = sql + getAndConSql(sql, VOYNO, "B.VOYNO like '%" + VOYNO + "%'");
var GOODSNAME = form.findField('PS_GOODSNAME').getValue();
sql = sql + getAndConSql(sql, GOODSNAME, "B.GOODSNAME like '%" + GOODSNAME + "%'");
return sql;
},
checkSearchCondition: function () {
var form = this.formSearch.getForm();
if (!form.isValid()) {
Ext.Msg.alert('提示', '查询条件赋值错误,请检查。');
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] = "MsRptFeeStatusIndex";
return ret;
}
,
onExportClick: function (button, event) {
GridExportExcelPage(this.gridList);
},
onExportClick2: function () {
_this = this;
if (this.storeList.getCount() == 0) {
return;
}
Ext.Msg.wait('正在组织数据, 请稍侯..');
Ext.Ajax.request({
waitMsg: '正在组织数据...',
url: '/MvcShipping/MsRptFeeStatus/BsListData',
scope: this,
params: {
start: 0, limit: this.PageSize,
condition: _this.sqlcontext,
printstr: 'true'
},
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 = 'MSRPTFEESTATUS';
var sql1 = returnstr;
sql1 = sql1.replace(/\+/g, "@@@")
if (sql1 != '') {
GridExportBySql(sql1, this.formname, '费用状态统计.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
});
}
}
});
}
,
onSaveGridClick: function (button, event) {
this.girdcolumsfeedr = DsTruck.SaveGridPanel(USERID, this.formname, this.gridList.columns, this.girdcolumsfeedr, 1, true);
},
oninitGridClick: function (button, event) {
this.gridList.reconfigure(this.storeList, this.initgirdcolumsfeedr);
this.girdcolumsfeedr = DsTruck.SaveGridPanel(USERID, this.formname, this.gridList.columns, this.initgirdcolumsfeedr, 1, true);
},
Print: function () {
_this = this;
if (this.storeList.getCount() == 0) {
return;
}
Ext.Msg.wait('正在组织数据, 请稍侯..');
Ext.Ajax.request({
waitMsg: '正在组织数据...',
url: '/MvcShipping/MsRptOpProfit/BsListData',
scope: this,
params: {
start: 0, limit: this.PageSize,
condition: _this.sqlcontext,
printstr: 'true'
},
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 = 'MSRPTPROFITLIST';
var sql1 = returnstr;
var sql2 = "";
var sql3 = "";
var sql4 = "";
var sql5 = "";
var sql6 = "";
PrintComm(printType, sql1, sql2, sql3, sql4, sql5, sql6);
} else {
Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
}
} else {
Ext.Msg.show({ title: '请重试',
msg: '服务器响应出错',
icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK
});
}
}
});
}
});