Ext . namespace ( 'Shipping' ) ;
Shipping . MsOpSeaiSaleIndex = function ( config ) {
Ext . applyIf ( this , config ) ;
this . initUIComponents ( ) ;
window . Shipping . MsOpSeaiSaleIndex . superclass . constructor . call ( this ) ;
} ;
Ext . extend ( Shipping . MsOpSeaiSaleIndex , Ext . Panel , {
PageSize : 100 ,
OprationStatus : null , //仅当弹出界面时使用
SelectedRecord : null ,
isShowAdvancedQuery : 0 , //是否显示高级查询面板
sqlcontext : '' ,
selectbsno : '' ,
initUIComponents : function ( ) {
this . formname = "formMsOpSeaiSaleIndex" ; //页面名称
//#region 定义数据集
this . storePLList = Ext . create ( 'Ext.data.Store' , {
model : 'MsOpSeaiModel'
} ) ;
this . storectndisp = Ext . create ( 'DsExt.ux.RefTableStore' , {
model : 'DsShipping.ux.CtnDispModel' ,
proxy : { url : '/CommMng/BasicDataRef/GetCtnDisp' }
} ) ;
this . storecodeservice = Ext . create ( 'DsExt.ux.RefTableStore' , {
model : 'MsCodeOpService' ,
proxy : { url : '/MvcShipping/MsCodeOpService/GetDataCtnList' }
} ) ;
this . storeList = Ext . create ( 'Ext.data.Store' , {
pageSize : this . PageSize ,
model : 'MsOpSeaiModel' ,
remoteSort : true ,
proxy : {
type : 'ajax' ,
url : '/MvcShipping/MsOpSeai/GetSaleDataList' ,
reader : {
id : 'BSNO' ,
root : 'data' ,
totalProperty : 'totalCount'
}
}
} ) ;
//#endregion
//#region List列表显示信息
Ext . grid . RowNumberer = Ext . extend ( Ext . grid . RowNumberer , {
width : 30
} ) ;
this . initgirdcolums = [ {
sortable : true ,
dataIndex : 'BSNO' ,
header : Zi . LAN . BSNO2 , //'业务编号',
width : 0
} ,
{
sortable : true ,
dataIndex : 'BSSTATUSREF' ,
align : 'center' ,
header : Zi . LAN . BSSTATUSREF , //'业务锁定',
width : 60 ,
renderer : function ( value , cellmeta ) {
if ( value == '锁定' ) {
return "<img src='../../../../TruckMng/Content/Images/Lock.png' />" ;
}
}
} ,
{
sortable : true ,
dataIndex : 'FEESTATUSREF' ,
align : 'center' ,
header : Zi . LAN . FEESTATUSREF , //'费用锁定',
width : 60 ,
renderer : function ( value , cellmeta ) {
if ( value == '锁定' ) {
return "<img src='../../../../TruckMng/Content/Images/Lock.png' />" ;
}
}
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'DRFEESTATUS' ,
header : Zi . LAN . DRFEESTATUS , //'应收费用',
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 ;
}
return value ;
}
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'CRFEESTATUS' ,
header : Zi . LAN . CRFEESTATUS , //'应付费用',
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 ;
}
return value ;
}
} , {
sortable : true ,
id : '' ,
dataIndex : 'BillFeeStatus' ,
header : Zi . LAN . BillFeeStatus , //'整票状态',
width : 60 ,
renderer : function ( value , meta ) {
if ( value == '0' ) {
return Zi . LAN . WEITIJIAO ;
} else if ( value == '1' ) {
meta . tdCls = 'feestatus_refer' ;
return Zi . LAN . ZHENGPIAOTIJIAO ;
} else if ( value == '2' ) {
meta . tdCls = 'feestatus_pass' ;
return Zi . LAN . SHENHETONGGUO ;
} else if ( value == '4' ) {
meta . tdCls = 'feestatus_nopass' ;
return Zi . LAN . ZHENGPIAOBOHUI ;
} else {
return "" ;
}
}
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'DRINVSTATUS' ,
header : Zi . LAN . DRINVSTATUS , //'应收开票',
align : 'center' ,
width : 60 ,
renderer : function ( value , meta , record ) {
var openSet = "height=200, width=650, toolbar=no, menubar=no,scrollbars=1, resizable=1,location=no, status=no,Top= " + ( screen . height - 250 ) / 2 + ",Left= " + ( screen . width - 600 ) / 2
var openType = "_blank" ;
var openUrl = "" ;
openUrl = "../../MvcShipping/MsRptChInvTotal/BsView?handle=check&bsno=" + record . data . BSNO ;
var winstr = "window.open(this.href,'" + openType + "','" + openSet + "')" ;
if ( value == '已开票' ) {
value = '<a href="' + openUrl + '" onclick="' + winstr + ';return false">' + Zi . LAN . YIKAIPIAO + '</a>'
meta . tdCls = 'feestatus_pass' ;
} else if ( value == '部分开票' ) {
meta . tdCls = 'feestatus_refer' ;
value = '<a href="' + openUrl + '" onclick="' + winstr + ';return false">' + Zi . LAN . BOFENKAIPIAO + '</a>'
} else if ( value == '未开票' ) {
value = Zi . LAN . WEIKAIPIAO ;
}
return value ;
}
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'CRINVSTATUS' ,
header : Zi . LAN . CRINVSTATUS , //'应收开票',
align : 'center' ,
// xtype: 'actioncolumn',
width : 60 ,
renderer : function ( value , meta , record ) {
var openSet = "height=200, width=650, toolbar=no, menubar=no,scrollbars=1, resizable=1,location=no, status=no,Top= " + ( screen . height - 250 ) / 2 + ",Left= " + ( screen . width - 600 ) / 2
var openType = "_blank" ;
var openUrl = "" ;
openUrl = "../../MvcShipping/MsRptChInvTotal/BsCrView?handle=check&bsno=" + record . data . BSNO ;
var winstr = "window.open(this.href,'" + openType + "','" + openSet + "')" ;
if ( value == '已开票' ) {
value = '<a href="' + openUrl + '" onclick="' + winstr + ';return false">' + Zi . LAN . YIKAIPIAO + '</a>'
meta . tdCls = 'feestatus_pass' ;
} else if ( value == '部分开票' ) {
meta . tdCls = 'feestatus_refer' ;
value = '<a href="' + openUrl + '" onclick="' + winstr + ';return false">' + Zi . LAN . BOFENKAIPIAO + '</a>'
} else if ( value == '未开票' ) {
value = Zi . LAN . WEIKAIPIAO ;
}
return value ;
}
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'DRDUISTATUS' ,
header : Zi . LAN . DRDUISTATUS , //'应收开票',
align : 'center' ,
// xtype: 'actioncolumn',
width : 60 ,
renderer : function ( value , meta , record ) {
if ( value == '已对账' ) {
// value = '<a href="' + openUrl + '" onclick="' + winstr + ';return false">已开票</a>'
meta . tdCls = 'feestatus_pass' ;
value = Zi . LAN . YIDUIZHANG ;
} else if ( value == '部分对账' ) {
meta . tdCls = 'feestatus_refer' ;
// value = '<a href="' + openUrl + '" onclick="' + winstr + ';return false">部分开票</a>'
value = Zi . LAN . BUFENDUIZHANG ;
} else if ( value == '未对账' ) {
value = Zi . LAN . WEIDUIZHANG ;
}
return value ;
}
} ,
{
sortable : true ,
dataIndex : 'WMSTYPE' ,
header : Zi . LAN . WMSTYPE , //'仓储类型',
width : 60
} ,
{
sortable : true ,
dataIndex : 'OPSTATUS' ,
header : Zi . LAN . OPSTATUS2 , //'状态管理',
width : 80 ,
renderer : function ( value , metadata , record , rowIndex ) {
metadata . style = "background-color:" + record . data . OPSTATUSCOLOR ;
return value ;
}
} ,
{
sortable : true ,
dataIndex : 'ETD' ,
header : Zi . LAN . ETD , //'到港日期',
width : 80
} ,
{
sortable : true ,
dataIndex : 'ETA' ,
header : Zi . LAN . ETA , //'开船日期',
width : 80
} ,
{
sortable : true ,
dataIndex : 'INVNO' ,
header : Zi . LAN . INVNO , //'开船日期',
width : 80
} ,
{
sortable : true ,
dataIndex : 'MBLNO' ,
header : Zi . LAN . MBLNO , //'主提单号',
width : 120 ,
renderer : function ( value , meta ) {
meta . tdCls = 'mblno' ;
var btnurl = getGridCopyButton ( value ) ;
return btnurl + value ;
}
} ,
{
sortable : true ,
dataIndex : 'CUSTOMERNAME' ,
header : Zi . LAN . CUSTOMERNAME , //'委托单位',
width : 120
} ,
{
sortable : true ,
dataIndex : 'TRADETYPE' ,
header : Zi . LAN . TRADETYPE , //'贸易方式',
width : 60
} ,
{
sortable : true ,
dataIndex : 'BSDATE' ,
header : Zi . LAN . BSDATE , //'接单日期',
width : 80
} ,
{
sortable : true ,
dataIndex : 'CONTRACTNO' ,
header : Zi . LAN . CONTRACTNO , //'合同号',
width : 120
} ,
{
sortable : true ,
dataIndex : 'GOODSNAME' ,
header : Zi . LAN . GOODSNAME , //'品名',
width : 120
} ,
{
sortable : true ,
dataIndex : 'NUMBERPLATE' ,
header : Zi . LAN . NUMBERPLATE , //'牌号',
width : 120
} ,
{
sortable : true ,
dataIndex : 'PKGS' ,
header : Zi . LAN . PKGS , //'件数',
width : 80
} ,
{
sortable : true ,
dataIndex : 'KGS' ,
header : Zi . LAN . KGS2 , //'毛重',
width : 80
} ,
{
sortable : true ,
dataIndex : 'NETWEIGHT' ,
header : Zi . LAN . NETWEIGHT , //'净重',
width : 80
} ,
{
sortable : true ,
dataIndex : 'CNTRTOTAL' ,
header : Zi . LAN . CNTRTOTAL2 , //'集装箱',
width : 80
} ,
{
sortable : true ,
dataIndex : 'ORDERTYPE' ,
header : Zi . LAN . ORDERTYPE2 , //'委托方式',
width : 80
} ,
{
sortable : true ,
dataIndex : 'FORWARDER' ,
header : Zi . LAN . FORWARDER , //'委托方式',
width : 80
} ,
{
sortable : true ,
dataIndex : 'CUSTNO' ,
header : Zi . LAN . CUSTNO , //'委托编号',
width : 120 ,
renderer : function ( value , meta ) {
meta . tdCls = 'mblno' ;
btnurl = getGridCopyButton ( value ) ;
return btnurl + value ;
}
} , {
sortable : true ,
id : '' ,
dataIndex : 'ORDERNO' ,
header : Zi . LAN . ORDERNO , //'业务编号',
width : 120
} ,
{
sortable : true ,
dataIndex : 'HBLNO' ,
header : Zi . LAN . HBLNO , //'分提单号',
width : 120 ,
renderer : function ( value , meta ) {
meta . tdCls = 'mblno' ;
btnurl = getGridCopyButton ( value ) ;
return btnurl + value ;
}
} ,
{
sortable : true ,
dataIndex : 'ACCDATE' ,
header : Zi . LAN . ACCDATE , //'会计期间',
width : 60
} ,
{
sortable : true ,
dataIndex : 'BSSOURCE' ,
header : Zi . LAN . BSSOURCE , //'业务来源',
width : 80
} ,
{
sortable : true ,
dataIndex : 'BSSOURCEDETAIL' ,
header : Zi . LAN . BSSOURCEDETAIL , //'来源明细',
width : 80
} ,
{
sortable : true ,
dataIndex : 'INPUTBY' ,
header : Zi . LAN . INPUTBY , //'录入人',
width : 80
} ,
{
sortable : true ,
dataIndex : 'CREATETIME' ,
header : Zi . LAN . CREATETIME , //'创建时间',
width : 120
} ,
{
sortable : true ,
dataIndex : 'OP' ,
header : Zi . LAN . OP , //'操作员',
width : 80
} ,
{
sortable : true ,
dataIndex : 'SALE' ,
header : Zi . LAN . SALE , //'揽货人',
width : 80
} ,
{
sortable : true ,
dataIndex : 'DOC' ,
header : Zi . LAN . DOC , //'揽货人',
width : 80
} ,
{
sortable : true ,
dataIndex : 'VESSEL' ,
header : Zi . LAN . VESSEL , //'船名',
width : 100
} ,
{
sortable : true ,
dataIndex : 'VOYNO' ,
header : Zi . LAN . VOYNO , //'航次',
width : 60
} ,
{
sortable : true ,
dataIndex : 'PORTLOAD' ,
header : Zi . LAN . PORTLOAD , //'装货港',
width : 100
} ,
{
sortable : true ,
dataIndex : 'PORTDISCHARGE' ,
header : Zi . LAN . PORTDISCHARGE , //'卸货港',
width : 100
} ,
{
sortable : true ,
dataIndex : 'OTCNTR' ,
header : Zi . LAN . OTCNTR , //'其他箱型',
width : 60
} ,
{
sortable : true ,
dataIndex : 'TEU' ,
header : Zi . LAN . TEU , //'箱TEU',
width : 40
} ,
{
sortable : true ,
dataIndex : 'COUNTRYOFORIGIN' ,
header : Zi . LAN . COUNTRYOFORIGIN , //'原产地',
width : 80
} ,
{
sortable : true ,
dataIndex : 'UNITS' ,
header : Zi . LAN . UNITS , //'单位',
width : 40
} ,
{
sortable : true ,
dataIndex : 'BALES' ,
header : Zi . LAN . BALES2 , //'包装(散货/托盘)数',
width : 60
} ,
{
sortable : true ,
dataIndex : 'CUSTOMSER' ,
header : Zi . LAN . CUSTOMSER , //'报关行',
width : 80
} ,
{
sortable : true ,
dataIndex : 'CUSTOMNO' ,
header : Zi . LAN . CUSTOMNO , //'报关单号',
width : 80
} ,
{
sortable : true ,
dataIndex : 'CUSTOMDATE' ,
header : Zi . LAN . CUSTOMDATE , //'通关日期',
width : 80
} ,
{
sortable : true ,
dataIndex : 'INSPECTION' ,
header : Zi . LAN . INSPECTION , //'报检',
width : 80
} ,
{
sortable : true ,
dataIndex : 'INSPECTIONNO' ,
header : Zi . LAN . INSPECTIONNO , //'报检单号',
width : 80
} ,
{
sortable : true ,
dataIndex : 'INSPECTIONDATE' ,
header : Zi . LAN . INSPECTIONDATE , //'报检日期',
width : 80
} ,
{
sortable : true ,
dataIndex : 'KINDPKGS' ,
header : Zi . LAN . KINDPKGS , //'件数包装',
width : 60
} ,
{
sortable : true ,
dataIndex : 'CBM' ,
header : Zi . LAN . CBM2 , //'立方/尺码',
width : 60
} ,
{
sortable : true ,
dataIndex : 'STORAGENAME' ,
header : Zi . LAN . STORAGENAME , //'仓库',
width : 100
} ,
{
sortable : true ,
dataIndex : 'CARRIER' ,
header : Zi . LAN . CARRIER , //'船公司',
width : 100
} ,
{
sortable : true ,
dataIndex : 'ENTERP' ,
header : Zi . LAN . ENTERP , //'经营单位',
width : 100
} ,
{
sortable : true ,
dataIndex : 'TRUCKER' ,
header : Zi . LAN . TRUCKER , //'承运车队',
width : 100
} ,
{
sortable : true ,
dataIndex : 'VOUNO' ,
header : Zi . LAN . VOUNO , //'凭证号',
width : 60
} ,
{
sortable : true ,
dataIndex : 'FBP' ,
header : Zi . LAN . FBP , //'免箱期',
width : 60
} ,
{
sortable : true ,
dataIndex : 'BMDDATE' ,
header : Zi . LAN . BMDDATE , //'箱使到期日',
width : 70
} ,
{
sortable : true ,
dataIndex : 'MDTDATE' ,
header : Zi . LAN . MDTDATE , //'搬倒日期',
width : 80
} ,
{
sortable : true ,
dataIndex : 'TRADINGAGENCY' ,
header : Zi . LAN . TRADINGAGENCY , //'贸易代理',
width : 80
} ,
{
sortable : true ,
dataIndex : 'GOODSTYPENAME' ,
header : Zi . LAN . GOODSTYPENAME , //'品名类型',
width : 60
} ,
{
sortable : true ,
dataIndex : 'SHOWNAME' ,
header : Zi . LAN . SHOWNAME _Client , //'委托单位联系人',
width : 100
} ,
{
sortable : true ,
dataIndex : 'EMAIL' ,
header : Zi . LAN . EMAIL , //'委托单位EMAIL',
width : 90
} ,
{
sortable : true ,
dataIndex : 'TEL' ,
header : Zi . LAN . TEL , //'委托单位TEL',
width : 80
} ,
{
sortable : true ,
dataIndex : 'FAX' ,
header : Zi . LAN . FAX , //'委托单位FAX',
width : 80
} ,
{
sortable : true ,
dataIndex : 'TARRIFSPAIEDTIEM' ,
header : Zi . LAN . TARRIFSPAIEDTIEM , //'交关税时间',
width : 70
} ,
{
sortable : true ,
dataIndex : 'APPROVENO' ,
header : Zi . LAN . APPROVENO , //'审批单号',
width : 100
} ,
{
sortable : true ,
dataIndex : 'UPDATETIME' ,
header : Zi . LAN . UPDATETIME , //'申报日期',
width : 80
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'SALECORP' ,
header : Zi . LAN . SALECOMPANY ,
width : 60
} ,
{
sortable : true ,
dataIndex : 'IMPORTVALUE' ,
header : Zi . LAN . IMPORTVALUE , //'货值',
width : 50 ,
renderer : function ( value , cellmeta , record , rowIndex , columnIndex , store ) {
try {
var lsValue = usMoney ( value , 2 , '' , false ) ;
if ( lsValue != "NaN" ) {
value = lsValue ; if ( parseFloat ( lsValue ) < 0 ) {
return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>' ;
}
}
else {
return value ;
}
}
catch ( e ) {
return value ;
}
return value ;
}
} ,
{
sortable : true ,
dataIndex : 'UNITPRICE' ,
header : Zi . LAN . UNITPRICE , //'单价',
width : 50
} ,
{
sortable : true ,
dataIndex : 'BLTYPE' ,
header : Zi . LAN . BLTYPE , //'装运方式',
width : 60
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'CNTR1' ,
header : Zi . LAN . CNTR1 , //'箱型1',
width : 60
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'CNTR2' ,
header : Zi . LAN . CNTR2 , //'箱型2',
width : 60
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'CNTR3' ,
header : Zi . LAN . CNTR3 , //'箱型3',
width : 60
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'CNTR4' ,
header : Zi . LAN . CNTR4 , //'箱型4',
width : 60
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'CNTR5' ,
header : Zi . LAN . CNTR5 , //'箱型5',
width : 60
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'CNTR6' ,
header : Zi . LAN . CNTR6 , //'箱型6',
width : 60
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'CNTR7' ,
header : Zi . LAN . CNTR7 , //'箱型7',
width : 60
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'CNTR8' ,
header : Zi . LAN . CNTR8 , //'箱型8',
width : 60
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'CNTR9' ,
header : Zi . LAN . CNTR9 , //'箱型9',
width : 60
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'CNTR10' ,
header : Zi . LAN . CNTR10 , //'箱型10',
width : 60
} , {
sortable : true ,
dataIndex : 'ISPRINTPR' ,
header : Zi . LAN . ISPRINTPR , //'打印核算单',
width : 100 ,
renderer : function ( value , meta , record ) {
if ( value == '1' )
return '√' ;
else
return '' ;
}
} , {
sortable : true ,
dataIndex : 'ISFUMIGATION' ,
header : Zi . LAN . ISFUMIGATION , //'服务项目1',
hidden : true ,
width : 100 ,
renderer : function ( value , meta , record ) {
if ( value == true || value == '1' )
return '√' ;
else
return '' ;
}
} , {
sortable : true ,
dataIndex : 'ISSTORAGE' ,
header : Zi . LAN . ISSTORAGE , //'服务项目2',
hidden : true ,
width : 100 ,
renderer : function ( value , meta , record ) {
if ( value == true || value == '1' )
return '√' ;
else
return '' ;
}
} , {
sortable : true ,
dataIndex : 'ISLAND' ,
header : Zi . LAN . ISLAND , //'服务项目3',
hidden : true ,
width : 100 ,
renderer : function ( value , meta , record ) {
if ( value == true || value == '1' )
return '√' ;
else
return '' ;
}
} , {
sortable : true ,
dataIndex : 'ISCUSTOMS' ,
header : Zi . LAN . ISCUSTOMS , //'服务项目4',
hidden : true ,
width : 100 ,
renderer : function ( value , meta , record ) {
if ( value == true || value == '1' )
return '√' ;
else
return '' ;
}
} , {
sortable : true ,
dataIndex : 'ISINSPECTION' ,
header : Zi . LAN . ISINSPECTION , //'服务项目5',
hidden : true ,
width : 100 ,
renderer : function ( value , meta , record ) {
if ( value == true || value == '1' )
return '√' ;
else
return '' ;
}
} , {
sortable : true ,
dataIndex : 'ISBOOKING' ,
header : Zi . LAN . ISBOOKING , //'服务项目6',
hidden : true ,
width : 100 ,
renderer : function ( value , meta , record ) {
if ( value == true || value == '1' )
return '√' ;
else
return '' ;
}
} , {
sortable : true ,
dataIndex : 'ISAGENT' ,
header : Zi . LAN . ISAGENT , //'服务项目7',
hidden : true ,
width : 100 ,
renderer : function ( value , meta , record ) {
if ( value == true || value == '1' )
return '√' ;
else
return '' ;
}
} , {
sortable : true ,
dataIndex : 'ISHBLNO' ,
header : Zi . LAN . ISHBLNO , //'服务项目8',
hidden : true ,
width : 100 ,
renderer : function ( value , meta , record ) {
if ( value == true || value == '1' )
return '√' ;
else
return '' ;
}
} , {
sortable : true ,
dataIndex : 'SERVICE9' ,
header : Zi . LAN . SERVICE9 , //'服务项目9',
hidden : true ,
width : 100 ,
renderer : function ( value , meta , record ) {
if ( value == true || value == '1' )
return '√' ;
else
return '' ;
}
} , {
sortable : true ,
dataIndex : 'SERVICE10' ,
header : Zi . LAN . SERVICE10 , //'服务项目10',
hidden : true ,
width : 100 ,
renderer : function ( value , meta , record ) {
if ( value == true || value == '1' )
return '√' ;
else
return '' ;
}
} , {
sortable : true ,
dataIndex : 'ISAPPLY' ,
header : Zi . LAN . ISAPPLY , //'是否生成报关',
width : 80 ,
renderer : function ( value , meta , record ) {
if ( value != '0' )
return '√' ;
else
return '' ;
}
} , {
dataIndex : 'BLISSUESTATUS' ,
header : Zi . LAN . BLISSUESTATUS , //'货物标识',
width : 120 ,
renderer : function ( value , meta ) {
if ( value == '提单签出' ) {
meta . tdCls = 'feestatus_pass' ;
value = Zi . LAN . TiDanQianChu ;
} else if ( value == '提单签入' ) {
meta . tdCls = 'feestatus_refer' ;
value = Zi . LAN . TiDanQianRu ;
}
return value ;
}
} , {
dataIndex : 'APPLYNO' ,
header : Zi . LAN . APPLYNO , //'申请放箱号',
width : 120
} , {
dataIndex : 'DEST_RTCNT_TIME' ,
header : Zi . LAN . DEST _RTCNT _TIME ,
width : 100
} , {
sortable : true ,
dataIndex : 'AMEND' ,
header : Zi . LAN . AMEND , //'更改单',
width : 80 ,
renderer : function ( value , meta , record ) {
if ( value != '0' )
return '√' ;
else
return '' ;
}
} , {
dataIndex : 'CTNNUM' ,
header : Zi . LAN . CTNNUM , //'申请放箱号',
width : 120
} , {
dataIndex : 'WMSCTNNUM' ,
header : Zi . LAN . WMSCTNNUM , //'申请放箱号',
width : 120
} , {
dataIndex : 'REMARK' ,
header : Zi . LAN . REMARK , //'货物标识',
width : 120
} , {
dataIndex : 'REMARK2' ,
header : Zi . LAN . REMARK + '2' , //'货物标识',
width : 120
} , {
dataIndex : 'DESCRIPTION' ,
header : Zi . LAN . DESCRIPTION , //'货物标识',
width : 120
} , {
dataIndex : 'MaTou' ,
header : Zi . LAN . MaTou , //'码头',
width : 120
} , {
dataIndex : 'SALEDEPT' ,
header : Zi . LAN . SALEDEPT2 , //'码头',
width : 120
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'SERVICE' ,
header : Zi . LAN . SERVICE , //'航线',
width : 100
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'DESTINATION' ,
header : Zi . LAN . DESTINATION , //'航线',
width : 100
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'SHIPPER' ,
header : Zi . LAN . SHIPPERID , //'SHIPPER',
width : 100
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'CONSIGNEE' ,
header : Zi . LAN . CONSIGNEEID , //'CONSIGNEE',
width : 100 ,
filter : {
type : 'string' ,
dataIndex : 'CONSIGNEE'
}
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'NOTIFYPARTY' ,
header : Zi . LAN . NOTIFYPARTYID , //'NOTIFYPARTY',
width : 100
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'AGENTID' ,
header : Zi . LAN . AGENTID , //'NOTIFYPARTY',
width : 100
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'TIHUOTIME' ,
header : Zi . LAN . TIHUOTIME , //'NOTIFYPARTY',
width : 100
} , {
sortable : false ,
dataIndex : 'CHANGEDOCSTATUS' ,
text : Zi . LAN . CHANGEDOCSTATUS ,
width : 56 ,
renderer : function ( value , meta , record ) {
if ( record . data . CHANGEDOCSTATUS == 1 ) {
return '<a style="text-decoration:none;"><span style=\"color:green;font-size:30px;text-align:center\"> ●</span></a>'
} else if ( record . data . CHANGEDOCSTATUS == 2 ) {
return '<a style="text-decoration:none;"><span style=\"color:yellow;font-size:30px;text-align:center\"> ●</span></a>'
} else {
return "" ;
}
}
} , {
sortable : false ,
dataIndex : 'CUSTOMSSTATUS' ,
text : Zi . LAN . CUSTOMSSTATUS ,
width : 56 ,
renderer : function ( value , meta , record ) {
if ( record . data . CUSTOMSSTATUS == 1 ) {
return '<a style="text-decoration:none;"><span style=\"color:green;font-size:30px;text-align:center\"> ●</span></a>'
} else if ( record . data . CUSTOMSSTATUS == 2 ) {
return '<a style="text-decoration:none;"><span style=\"color:yellow;font-size:30px;text-align:center\"> ●</span></a>'
} else {
return "" ;
}
}
} , {
sortable : false ,
dataIndex : 'CANGDANSTATUS' ,
text : Zi . LAN . CANGDANSTATUS ,
width : 56 ,
renderer : function ( value , meta , record ) {
if ( record . data . CANGDANSTATUS == 1 ) {
return '<a style="text-decoration:none;"><span style=\"color:green;font-size:30px;text-align:center\"> ●</span></a>'
} else if ( record . data . CANGDANSTATUS == 2 ) {
return '<a style="text-decoration:none;"><span style=\"color:yellow;font-size:30px;text-align:center\"> ●</span></a>'
} else {
return "" ;
}
}
}
,
{
sortable : true ,
id : '' ,
hidden : true ,
dataIndex : 'OPWMS_IN_COUNT' ,
header : Zi . LAN . OPWMS _IN _COUNT ,
width : 100
}
,
{
sortable : true ,
id : '' ,
dataIndex : 'WMSSTATUS' ,
header : Zi . LAN . WMSSTATUS ,
width : 100
}
] ;
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 . GridCheckBoxModel = Ext . create ( 'Ext.selection.CheckboxModel' ) ;
//定义Grid
this . gridList = new Ext . grid . GridPanel ( {
store : this . storeList ,
enableHdMenu : false ,
region : 'center' ,
loadMask : { msg : Zi . LAN . ShuJuJiaZaiZhongQingShaoDeng } ,
trackMouseOver : true ,
disableSelection : false ,
columns : this . girdcolums ,
selModel : this . GridCheckBoxModel ,
viewConfig : {
enableTextSelection : true , //允许复制数据
autoFill : true
} ,
plugins : [ {
ptype : 'rowexpander' ,
rowBodyTpl : [
'<div id="{BSNO}">' ,
'</div>'
]
} ] ,
// 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 ]
} ) ;
/////////////以下部分为获取存储的gridpanel显示样式
this . girdcolums = DsTruck . GetGridPanel ( USERID , this . formname , this . girdcolums , 1 ) ; //使用者id, 表名, 中间column数组, 跳过一开始的几列
// this.girdcolums.unshift(new Ext.grid.RowNumberer());
this . gridList . reconfigure ( this . storeList , this . girdcolums ) ;
this . gridList . columns [ 1 ] = new Ext . grid . RowNumberer ( ) ;
////////////////////////////////////////////////
this . gridList . addListener ( 'itemdblclick' , function ( dataview , record , item , index , e , b ) {
this . SelectedRecord = record ;
this . OprationStatus = 'edit' ;
DsOpenMultiEditWin ( '/MvcShipping/MsOpSeai/SaleEdit' , record . data . BSNO ) ;
} , this ) ;
this . gridList . view . on ( 'expandBody' , function ( rowNode , record , expandRow , eOpts ) {
_this . displayInnerGrid ( record . get ( 'BSNO' ) , record . get ( 'FENPIAO' ) ) ;
} ) ;
this . gridList . view . on ( 'collapsebody' , function ( rowNode , record , expandRow , eOpts ) {
_this . destroyInnerGrid ( record ) ;
} ) ;
//#endregion
_this = this ;
//#region formSearch 下拉框信息加载
//权限范围
this . StoreOpRange = Ext . create ( 'DsExt.ux.RefTableStore' , {
model : 'MsOP' ,
proxy : { url : '/MvcShipping/MsBaseInfo/GetOpRang' }
} ) ;
this . StoreOpRange . load ( { params : { optype : "modSeaImportList" } } ) ;
//人员信息加载
this . storeOpCode = Ext . create ( 'DsExt.ux.RefTableStore' , {
model : 'DsShipping.ux.UserRefModel' ,
proxy : { url : '/CommMng/BasicDataRef/GetUserRefList' }
} ) ;
this . storeOpCode . load ( ) ;
//客服
this . comboxCUSTSERVICE = Ext . create ( 'DsExt.ux.RefTableCombox' , {
fieldLabel : Zi . LAN . CUSTSERVICE ,
store : this . storeOpCode ,
forceSelection : true ,
name : 'CUSTSERVICE' ,
valueField : 'UserName' ,
displayField : 'CodeAndName'
} ) ;
//揽货人
this . comboxSALE = Ext . create ( 'DsExt.ux.RefTableCombox' , {
fieldLabel : Zi . LAN . SALE ,
store : this . storeOpCode ,
forceSelection : true ,
flex : 0.8 ,
name : 'SALE' ,
valueField : 'UserName' ,
displayField : 'CodeAndName'
} ) ;
//操 作
this . comboxOP = Ext . create ( 'DsExt.ux.RefTableCombox' , {
fieldLabel : Zi . LAN . OP ,
store : this . storeOpCode ,
forceSelection : true ,
flex : 0.8 , name : 'OP' ,
valueField : 'UserName' ,
displayField : 'CodeAndName' ,
enableKeyEvents : true ,
listeners : {
keyup : function ( field , e ) {
if ( e . getKey ( ) == e . ENTER ) {
_this . onRefreshClick ( ) ;
}
}
}
} ) ;
//录入人
this . comboxINPUTBY = Ext . create ( 'DsExt.ux.RefTableCombox' , {
fieldLabel : Zi . LAN . INPUTBY ,
store : this . storeOpCode ,
forceSelection : true ,
flex : 0.8 , name : 'INPUTBY' ,
valueField : 'UserName' ,
displayField : 'CodeAndName' ,
enableKeyEvents : true ,
listeners : {
keyup : function ( field , e ) {
if ( e . getKey ( ) == e . ENTER ) {
_this . onRefreshClick ( ) ;
}
}
}
} ) ;
//客户加载_委托单位
this . storeCustCode = Ext . create ( 'DsExt.ux.RefTableStore' , {
model : 'DsShipping.ux.CustomRefModel' ,
proxy : { url : '/CommMng/BasicDataRef/GetCustomRefList' }
} ) ;
this . storeCustCode . load ( { params : { condition : "ISCONTROLLER='1'" } } ) ;
//委托单位
this . comboxCustCode = Ext . create ( 'DsExt.ux.RefTableCombox' , {
fieldLabel : Zi . LAN . CUSTOMERNAME ,
store : this . storeCustCode ,
forceSelection : true ,
name : 'CUSTOMERNAME' ,
valueField : 'CustName' ,
displayField : 'CodeAndName' ,
enableKeyEvents : true ,
listeners : {
keyup : function ( field , e ) {
if ( e . getKey ( ) == e . ENTER ) {
_this . onRefreshClick ( ) ;
}
}
}
} ) ;
//#endregion
//#region formSearch 查询面板
this . formSearch = Ext . widget ( 'form' , {
frame : true ,
region : 'center' ,
bodyPadding : 5 ,
fieldDefaults : {
margins : '2 2 2 2' ,
labelAlign : 'right' ,
flex : 1 ,
labelWidth : 60 ,
msgTarget : 'qtip'
} ,
items : [ { //fieldset 1
xtype : 'container' ,
defaultType : 'textfield' ,
layout : 'anchor' ,
defaults : {
anchor : '100%'
} ,
items : [ {
xtype : 'container' ,
layout : 'hbox' ,
defaultType : 'textfield' ,
items : [ {
fieldLabel : Zi . LAN . MblNo2 ,
name : 'MblNo' ,
enableKeyEvents : true ,
listeners : {
specialkey : function ( field , e ) {
if ( e . getKey ( ) == e . ENTER ) {
_this . onRefreshClick ( ) ;
}
}
}
} , this . comboxCustCode
// , {
// fieldLabel: '会计期间',
// format: 'Y-m',
// xtype: 'datefield',
// name: 'ACCDATE'
// }
, {
fieldLabel : Zi . LAN . ETD ,
format : 'Y-m-d' ,
xtype : 'datefield' ,
name : 'ETDbgn' ,
enableKeyEvents : true ,
listeners : {
specialkey : function ( field , e ) {
if ( e . getKey ( ) == e . ENTER ) {
_this . onRefreshClick ( ) ;
}
}
}
} , {
fieldLabel : Zi . LAN . ETDend ,
format : 'Y-m-d' ,
xtype : 'datefield' ,
name : 'ETDend' ,
enableKeyEvents : true ,
listeners : {
specialkey : function ( field , e ) {
if ( e . getKey ( ) == e . ENTER ) {
_this . onRefreshClick ( ) ;
}
}
}
} , this . comboxOP , this . comboxSALE , {
xtype : 'button' ,
width : 90 ,
text : Zi . LAN . btnrefresh ,
iconCls : "btnrefresh" ,
handler : function ( button , event ) {
this . onRefreshClick ( button , event ) ;
} ,
scope : this
} , {
xtype : 'button' ,
width : 90 ,
text : Zi . LAN . btnmore ,
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
} ]
}
// , {
// xtype: 'container',
// layout: 'hbox',
// defaultType: 'textfield',
// items: [this.comboxOP, this.comboxSALE, this.comboxTRADETYPE, this.comboxGOODSNAME, {
// fieldLabel: '牌号',
// name: 'NUMBERPLATE'
// }]
// }, {
// xtype: 'container',
// layout: 'hbox',
// defaultType: 'textfield',
// items: [{
// fieldLabel: '接单日期',
// format: 'Y-m-d',
// xtype: 'datefield',
// name: 'BSDATEbgn'
// }, {
// fieldLabel: '到',
// format: 'Y-m-d',
// xtype: 'datefield',
// name: 'BSDATEend'
// }, this.comboxBSSTATUS, this.comboxFEESTATUS, this.comboxWMSTYPE]
// }
] //end items(fieldset 1)
} ] //end root items
} ) ;
//#endregion formSearch
//#region formSearch2 隐藏查询面板
// this.formSearch2 = Ext.widget('form', {
// frame: true,
// region: 'north',
// bodyPadding: 0,
// fieldDefaults: {
// margins: '2 2 2 2',
// labelAlign: 'right',
// flex: 1, //所占列
// labelWidth: 70, //值 能够使 text框也是对齐状态
// msgTarget: 'qtip'//文本框显示的必填样式, 修改这里的值msgTarget:"title" msgTarget:"under" msgTarget:"side"
// },
// items: [{//fieldset 1
// xtype: 'container',
// defaultType: 'textfield',
// layout: 'anchor',
// defaults: {
// anchor: '100%'
// },
// items: [{
// xtype: 'container',
// layout: 'hbox',
// defaultType: 'textfield',
// items: [this.comboxCustWmsCode, {
// fieldLabel: '建单日期',
// format: 'Y-m-d',
// xtype: 'datefield',
// name: 'CREATETIMEbgn'
// }, {
// fieldLabel: '到',
// format: 'Y-m-d',
// xtype: 'datefield',
// name: 'CREATETIMEend'
// }, this.comboxINPUTBY, this.comboxBSTYPE, {
// fieldLabel: '集装箱',
// name: 'CNTRTOTAL'
// }]
// }, {
// xtype: 'container',
// layout: 'hbox',
// defaultType: 'textfield',
// items: [this.comboxCustWmsOutCode, this.comboxPORTLOAD, this.comboxPORTDISCHARGE, {
// fieldLabel: '船名',
// name: 'VESSEL'
// }, {
// fieldLabel: '航次',
// name: 'VOYNO'
// }]
// }, {
// xtype: 'container',
// layout: 'hbox',
// defaultType: 'textfield',
// items: [this.comboxCARRIER, {
// fieldLabel: '箱使到期',
// format: 'Y-m-d',
// xtype: 'datefield',
// name: 'BMDDATEbgn'
// }, {
// fieldLabel: '到',
// format: 'Y-m-d',
// xtype: 'datefield',
// name: 'BMDDATEend'
// }, {
// fieldLabel: '搬倒日期',
// format: 'Y-m-d',
// xtype: 'datefield',
// name: 'MDTDATEbgn'
// }, {
// fieldLabel: '到',
// format: 'Y-m-d',
// xtype: 'datefield',
// name: 'MDTDATEend'
// }]
// }, {
// xtype: 'container',
// layout: 'hbox',
// defaultType: 'textfield',
// items: [this.comboxGOODSTYPENAME, this.comboxTRADINGAGENCY, {
// fieldLabel: '原产地',
// name: 'COUNTRYOFORIGIN'
// }, {
// fieldLabel: 'BALES',
// name: 'BALES'
// }, this.comboxTRUCKER]
// }, {
// xtype: 'container',
// layout: 'hbox',
// defaultType: 'textfield',
// items: [this.comboxCUSTOMSER, {
// fieldLabel: '通关日期',
// format: 'Y-m-d',
// xtype: 'datefield',
// name: 'CUSTOMDATEbgn'
// }, {
// fieldLabel: '到',
// format: 'Y-m-d',
// xtype: 'datefield',
// name: 'CUSTOMDATEend'
// }, {
// fieldLabel: '申报日期',
// format: 'Y-m-d',
// xtype: 'datefield',
// name: 'UPDATETIMEbgn'
// }, {
// fieldLabel: '到',
// format: 'Y-m-d',
// xtype: 'datefield',
// name: 'UPDATETIMEend'
// }]
// }, {
// xtype: 'container',
// layout: 'hbox',
// defaultType: 'textfield',
// items: [this.comboxINSPECTION, {
// fieldLabel: '报检日期',
// format: 'Y-m-d',
// xtype: 'datefield',
// name: 'INSPECTIONDATEbgn'
// }, {
// fieldLabel: '到',
// format: 'Y-m-d',
// xtype: 'datefield',
// name: 'INSPECTIONDATEend'
// }, {
// fieldLabel: '交关税时间',
// format: 'Y-m-d',
// xtype: 'datefield',
// name: 'TARRIFSPAIEDTIEMbgn'
// }, {
// fieldLabel: '到',
// format: 'Y-m-d',
// xtype: 'datefield',
// name: 'TARRIFSPAIEDTIEMend'
// }]
// }, {
// xtype: 'container',
// layout: 'hbox',
// defaultType: 'textfield',
// items: [this.comboxBSSOURCE, this.comboxBSSOURCEDETAIL, this.comboxBSTYPE, this.comboxBLTYPE, {
// fieldLabel: '备注',
// name: 'REMARK'
// }]//, { xtype: 'hiddenfield'}
// }, {
// xtype: 'container',
// layout: 'hbox',
// defaultType: 'textfield',
// items: [{
// fieldLabel: '发货人内容',
// name: 'SHIPPER'
// }, {
// fieldLabel: '收货人内容',
// name: 'CONSIGNEE'
// }, {
// fieldLabel: '通知人内容',
// name: 'NOTIFYPARTY'
// }, this.comboxCustENTERP, { xtype: 'hiddenfield'}]//, { xtype: 'hiddenfield'}
// }]//end items(fieldset 1)
// }]//end root items
// });
//#endregion formSearch2
//#region 按钮工具条
_this = this ;
this . panelBtn = new Ext . Panel ( {
region : "north" ,
tbar : [ {
text : Zi . LAN . btnrefresh ,
iconCls : "btnrefresh" ,
handler : function ( button , event ) {
this . onRefreshClick ( button , event ) ;
} ,
scope : this
} , {
text : Zi . LAN . btnreset ,
iconCls : "btnreset" ,
handler : function ( button , event ) {
this . onClearSql ( button , event ) ;
} ,
scope : this
} , '-' , {
text : Zi . LAN . btnExportExcel ,
id : "btnExportExcel" ,
iconCls : 'btnexportexcel' ,
handler : function ( button , event ) {
this . onExportClick ( button , event ) ;
} ,
scope : this
} , '-' , {
text : Zi . LAN . EdiExport ,
menu : [ {
text : Zi . LAN . WDEDI ,
handler : function ( menu , event ) {
_this . onCreateEDIClick ( menu , event , 'WDSEAIEDI' ) ;
}
} , {
text : Zi . LAN . IFTMBFEDI ,
handler : function ( menu , event ) {
_this . onCreateIFTMBFClick ( menu , event ) ;
}
} ] ,
scope : this
} ,
'-' ,
{
text : Zi . LAN . ImportEdi ,
iconCls : "btnexportexcel" ,
handler : function ( button , event ) {
this . onImportEdiClick ( button , event ) ;
} ,
scope : this
} , '-' , {
text : Zi . LAN . btntest ,
id : "btntest" ,
handler : function ( button , event ) {
DsTruck . SaveGridPanel ( USERID , this . formname , this . gridList . columns , this . column , 1 , true ) ;
} ,
scope : this
} , '-' ,
{
text : Zi . LAN . btnprint ,
iconCls : 'btnprint' ,
menu : [
{
text : Zi . LAN . Print ,
handler : function ( menu , event ) {
_this . Print ( ) ;
}
} , {
text : Zi . LAN . PrintSelect ,
handler : function ( menu , event ) {
_this . PrintSelect ( ) ;
}
} ] ,
scope : this
} ]
} ) ;
//#endregion
//#region 合计列表
this . SumField = [
{ name : 'NOBILL' , type : 'number' } ,
{ name : 'TEU' , type : 'number' } ,
{ name : 'KGS' , type : 'number' } ,
{ name : 'PKGS' , type : 'number' } ,
{ name : 'CBM' , type : 'number' }
] ;
this . storeSumList = Ext . create ( 'Ext.data.Store' , {
pageSize : this . PageSize ,
fields : this . SumField ,
remoteSort : true ,
proxy : {
type : 'ajax' ,
url : '/MvcShipping/MsOpSeai/GetSaleCtnSum' ,
reader : {
id : '' ,
root : 'data' ,
totalProperty : 'totalCount'
}
}
} ) ;
this . girdcolumsSum = [ {
sortable : true ,
dataIndex : 'NOBILL' ,
header : Zi . LAN . NOBILL2 ,
align : 'right' ,
width : 80
} , {
sortable : true ,
dataIndex : 'TEU' ,
header : 'TEU' ,
align : 'right' ,
width : 80
} , {
sortable : true ,
dataIndex : 'PKGS' ,
header : Zi . LAN . PKGS ,
renderer : function ( value , cellmeta , record , rowIndex , columnIndex , store ) { try { var lsValue = usMoney ( value , 2 , '' , false ) ; if ( lsValue != "NaN" ) { value = lsValue ; if ( parseFloat ( lsValue ) < 0 ) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>' ; } } else { return value ; } } catch ( e ) { return value ; } return value ; } ,
align : 'right' ,
width : 80
} , {
sortable : true ,
dataIndex : 'KGS' ,
header : Zi . LAN . KGS2 ,
renderer : function ( value , cellmeta , record , rowIndex , columnIndex , store ) { try { var lsValue = usMoney ( value , 2 , '' , false ) ; if ( lsValue != "NaN" ) { value = lsValue ; if ( parseFloat ( lsValue ) < 0 ) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>' ; } } else { return value ; } } catch ( e ) { return value ; } return value ; } ,
align : 'right' ,
width : 80
} , {
sortable : true ,
dataIndex : 'CBM' ,
header : Zi . LAN . CBM ,
renderer : function ( value , cellmeta , record , rowIndex , columnIndex , store ) { try { var lsValue = usMoney ( value , 2 , '' , false ) ; if ( lsValue != "NaN" ) { value = lsValue ; if ( parseFloat ( lsValue ) < 0 ) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>' ; } } else { return value ; } } catch ( e ) { return value ; } return value ; } ,
align : 'right' ,
width : 80
}
] ;
this . gridListSum = new Ext . grid . GridPanel ( {
store : this . storeSumList ,
enableHdMenu : false ,
region : 'center' ,
loadMask : { msg : Zi . LAN . ShuJuJiaZaiZhongQingShaoDeng } ,
trackMouseOver : true ,
disableSelection : false ,
columns : this . girdcolumsSum
} ) ;
this . panelSum = new Ext . Panel ( {
// title: '合 计',
layout : "border" ,
height : 70 ,
region : 'south' ,
margin : '0 0' ,
frame : true ,
items : [ this . gridListSum ]
} ) ;
//#endregion
//#region 页面框架
// this.panelSearch = new Ext.Panel({
// layout: "border",
// region: "north",
// height: 215,
// autoSize: true,
// hidden: true,
// items: [this.formSearch2]
// });
this . panelTop = new Ext . Panel ( {
layout : "border" ,
region : "north" ,
height : 75 ,
items : [ this . panelBtn , this . formSearch ]
} ) ;
Ext . apply ( this , {
items : [ this . panelTop , this . panelSearch , this . gridList , this . panelSum ]
} ) ;
//#endregion
//#region 其他
var myDate = new Date ( ) ;
var mydatestr = Ext . util . Format . date ( myDate , 'Y-m' ) ;
this . sqlcontext = " ACCDATE='" + mydatestr + "'" ;
this . storeCtnList = Ext . create ( 'Ext.data.Store' , {
pageSize : this . PageSize ,
fields : [
{ name : 'CTNALL' , type : 'string' }
] ,
remoteSort : true ,
proxy : {
type : 'ajax' ,
url : '/MvcShipping/MsOpSeai/GetCtnList' ,
reader : {
id : '' ,
root : 'data' ,
totalProperty : 'totalCount'
}
}
} ) ;
this . InitGrid ( this . girdcolums ) ;
this . storeList . load ( {
params : { start : 0 , limit : this . PageSize , sort : '' , condition : _this . sqlcontext } ,
waitMsg : Zi . LAN . ZhengZaiChaXunShuJu ,
scope : this
} ) ;
this . onRefreshSumClick ( _this . sqlcontext ) ;
this . storeList . on ( 'beforeload' , function ( store ) {
Ext . apply ( store . proxy . extraParams , { condition : _this . sqlcontext } ) ;
} , this ) ;
//#endregion
//#region 外代 EDI
this . CheckNoCtn = new Ext . form . Checkbox ( {
fieldLabel : Zi . LAN . CheckNoCtn , //'不输出箱号封号',
checked : true
} ) ;
this . CheckBill = new Ext . form . Checkbox ( {
fieldLabel : Zi . LAN . CheckBill , //'货代提单',
checked : false
} ) ;
this . formEdiShow = Ext . widget ( 'form' , {
frame : true ,
region : 'center' ,
bodyPadding : 5 ,
fieldDefaults : {
margins : '2 2 2 2' ,
labelAlign : 'right' ,
flex : 1 ,
labelWidth : 90 ,
msgTarget : 'qtip'
} ,
items : [
{ //fieldset 1
xtype : 'container' ,
defaultType : 'textfield' ,
layout : 'anchor' ,
defaults : {
anchor : '100%'
} ,
items : [ {
xtype : 'container' ,
layout : 'hbox' ,
defaultType : 'textfield' ,
items : [ {
xtype : 'radiogroup' ,
fieldLabel : Zi . LAN . rFILETYPE , //'报文类型',
id : 'rFILETYPE' ,
defaults : {
flex : 1
} ,
layout : 'hbox' ,
items : [
{
boxLabel : Zi . LAN . FILETYPE _B , //'订舱',
name : 'FILETYPE' ,
checked : true ,
inputValue : 'B' ,
id : 'radio1'
} , {
boxLabel : Zi . LAN . FILETYPE _E , //'确认',
name : 'FILETYPE' ,
inputValue : 'E' ,
id : 'radio2'
}
]
}
]
} , {
xtype : 'container' ,
layout : 'hbox' ,
defaultType : 'textfield' ,
items : [ {
xtype : 'radiogroup' ,
fieldLabel : Zi . LAN . rFILEROLE , //'文件功能',
id : 'rFILEROLE' ,
defaults : {
flex : 1
} ,
layout : 'hbox' ,
items : [
{
boxLabel : Zi . LAN . FILEROLE _YS , //'原始',
name : 'FILEROLE' ,
inputValue : '9' ,
checked : true ,
id : 'radio3'
} , {
boxLabel : Zi . LAN . FILEROLE _ZJ , //'增加',
name : 'FILEROLE' ,
inputValue : '2' ,
id : 'radio4'
} , {
boxLabel : Zi . LAN . FILEROLE _SC , //'删除',
name : 'FILEROLE' ,
inputValue : '3' ,
id : 'radio5'
} , {
boxLabel : Zi . LAN . FILEROLE _GX , //'更新',
name : 'FILEROLE' ,
inputValue : '4' ,
id : 'radio6'
}
]
}
]
} , , {
xtype : 'container' ,
layout : 'hbox' ,
defaultType : 'textfield' ,
items : [
this . CheckNoCtn , this . CheckBill
]
}
] //end items(fieldset 1)
} //end fieldset 1
] //end root items
} ) ;
me = this ;
this . winEDIShow = Ext . create ( 'Ext.window.Window' , {
title : Zi . LAN . winEDIShow , //"生成EDI",
width : 450 ,
//height : 120,
//plain : true,
iconCls : "addicon" ,
resizable : false ,
// 是否可以拖动
// draggable:false,
collapsible : true , // 允许缩放条
closeAction : 'close' ,
closable : true ,
modal : 'true' ,
buttonAlign : "center" ,
bodyStyle : "padding:0 0 0 0" ,
items : [ this . formEdiShow ] ,
buttons : [ {
text : Zi . LAN . ShangChuanEdi , //"上传EDI",
minWidth : 70 ,
handler : function ( ) {
var cgFILETYPE = Ext . getCmp ( 'rFILETYPE' ) ;
var FILETYPE = cgFILETYPE . getValue ( ) ;
var cgFILEROLE = Ext . getCmp ( 'rFILEROLE' ) ;
var FILEROLE = cgFILEROLE . getValue ( ) ;
var IsNoCtn = 0 ;
if ( me . CheckNoCtn . checked )
IsNoCtn = 1 ;
var IsBill = 0 ;
if ( me . CheckBill . checked )
IsBill = 1 ;
me . onSendEDI ( me . editype , FILETYPE . FILETYPE , FILEROLE . FILEROLE , IsBill , IsNoCtn ) ;
}
} , {
text : Zi . LAN . BaoCunEdiWenJian , //"保存EDI文件",
minWidth : 70 ,
handler : function ( ) {
var cgFILETYPE = Ext . getCmp ( 'rFILETYPE' ) ;
var FILETYPE = cgFILETYPE . getValue ( ) ;
var cgFILEROLE = Ext . getCmp ( 'rFILEROLE' ) ;
var FILEROLE = cgFILEROLE . getValue ( ) ;
var IsNoCtn = 0 ;
if ( me . CheckNoCtn . checked )
IsNoCtn = 1 ;
var IsBill = 0 ;
if ( me . CheckBill . checked )
IsBill = 1 ;
me . onSaveEDI ( me . editype , FILETYPE . FILETYPE , FILEROLE . FILEROLE , IsBill , IsNoCtn ) ;
}
} , {
text : Zi . LAN . GuanBi , //"关闭",
minWidth : 70 ,
handler : function ( ) {
me . winEDIShow . close ( ) ;
}
} ]
} ) ;
//#endregion
//#region 交通部EDI窗体
this . formIFTMBFShow = Ext . widget ( 'form' , {
frame : true ,
region : 'center' ,
bodyPadding : 5 ,
fieldDefaults : {
margins : '2 2 2 2' ,
labelAlign : 'right' ,
flex : 1 ,
labelWidth : 90 ,
msgTarget : 'qtip'
} ,
items : [ { //fieldset 1
xtype : 'container' ,
defaultType : 'textfield' ,
layout : 'anchor' ,
defaults : {
anchor : '100%'
} ,
items : [ {
xtype : 'container' ,
layout : 'hbox' ,
defaultType : 'textfield' ,
items : [ {
xtype : 'radiogroup' ,
fieldLabel : Zi . LAN . jtbFILEROLE , //'文件功能',
id : 'jtbFILEROLE' ,
defaults : { flex : 1 } ,
layout : 'hbox' ,
items : [ {
boxLabel : Zi . LAN . FILEROLE _YS , //'原始',
name : 'FILEROLE' ,
inputValue : '9' ,
checked : true
} , {
boxLabel : Zi . LAN . FILEROLE _GX , //'更新',
name : 'FILEROLE' ,
inputValue : '5'
} , {
boxLabel : Zi . LAN . FILEROLE _SC , //'删除',
name : 'FILEROLE' ,
inputValue : '4'
} ]
}
]
} , {
xtype : 'container' ,
layout : 'hbox' ,
defaultType : 'textfield' ,
items : [ {
xtype : 'radiogroup' ,
fieldLabel : Zi . LAN . CARRIER , //'船公司',
columns : 2 ,
vertical : true ,
id : 'jtbCARRIER' ,
items : [ {
boxLabel : Zi . LAN . NBCDI , //'宁波船代(NBCDI)',
name : 'CARRIER' ,
inputValue : 'NBCDI' ,
checked : true
} , {
boxLabel : Zi . LAN . SHCDI , //'上海船代(SHCDI)',
name : 'CARRIER' ,
inputValue : 'SHCDI'
} ]
}
]
} ] //end items(fieldset 1)
} ] //end root items
} ) ;
me = this ;
this . winIFTMBFShow = Ext . create ( 'Ext.window.Window' , {
title : Zi . LAN . winIFTMBFShow , //"生成交通部报文",
width : 450 ,
//height : 120,
//plain : true,
iconCls : "addicon" ,
resizable : false ,
// 是否可以拖动
// draggable:false,
collapsible : true , // 允许缩放条
closeAction : 'close' ,
closable : true ,
modal : 'true' ,
buttonAlign : "center" ,
bodyStyle : "padding:0 0 0 0" ,
items : [ this . formIFTMBFShow ] ,
buttons : [ {
text : Zi . LAN . ShangChuanEdi , //"上传EDI",
minWidth : 70 ,
handler : function ( ) {
var cgFILEROLE = Ext . getCmp ( 'jtbFILEROLE' ) ;
var FILEROLE = cgFILEROLE . getValue ( ) ;
var cgCARRIER = Ext . getCmp ( 'jtbCARRIER' ) ;
var CARRIER = cgCARRIER . getValue ( ) ;
me . onSendIFTMBF ( FILEROLE . FILEROLE , CARRIER . CARRIER ) ;
}
} , {
text : Zi . LAN . BaoCunEdiWenJian , //"保存EDI文件",
minWidth : 70 ,
handler : function ( ) {
var cgFILEROLE = Ext . getCmp ( 'jtbFILEROLE' ) ;
var FILEROLE = cgFILEROLE . getValue ( ) ;
var cgCARRIER = Ext . getCmp ( 'jtbCARRIER' ) ;
var CARRIER = cgCARRIER . getValue ( ) ;
me . onSaveIFTMBF ( FILEROLE . FILEROLE , CARRIER . CARRIER ) ;
}
} , {
text : Zi . LAN . GuanBi , //"关闭",
minWidth : 70 ,
handler : function ( ) {
me . winIFTMBFShow . close ( ) ;
}
} ]
} ) ;
//#endregion
//#region DHL EDI窗体
this . formDHLShow = Ext . widget ( 'form' , {
frame : true ,
region : 'center' ,
bodyPadding : 5 ,
fieldDefaults : {
margins : '2 2 2 2' ,
labelAlign : 'right' ,
flex : 1 ,
labelWidth : 90 ,
msgTarget : 'qtip'
} ,
items : [ { //fieldset 1
xtype : 'container' ,
defaultType : 'textfield' ,
layout : 'anchor' ,
defaults : {
anchor : '100%'
} ,
items : [ {
xtype : 'container' ,
layout : 'hbox' ,
defaultType : 'textfield' ,
items : [ {
xtype : 'radiogroup' ,
fieldLabel : Zi . LAN . jtbFILEROLE , //'文件功能',
id : 'dhlFILEROLE' ,
defaults : { flex : 1 } ,
layout : 'hbox' ,
items : [ {
boxLabel : Zi . LAN . FILEROLE _DOS , //'原始',
name : 'FILEROLE' ,
inputValue : 'DOS' ,
checked : true
} , {
boxLabel : Zi . LAN . FILEROLE _CLC , //'更新',
name : 'FILEROLE' ,
inputValue : 'CLC'
} , {
boxLabel : Zi . LAN . FILEROLE _GOU , //'更新',
name : 'FILEROLE' ,
inputValue : 'GOU'
} ]
}
]
} ] //end items(fieldset 1)
} ] //end root items
} ) ;
me = this ;
this . winDHLShow = Ext . create ( 'Ext.window.Window' , {
title : Zi . LAN . winDHLShow , //"生成交通部报文",
width : 450 ,
//height : 120,
//plain : true,
iconCls : "addicon" ,
resizable : false ,
// 是否可以拖动
// draggable:false,
collapsible : true , // 允许缩放条
closeAction : 'close' ,
closable : true ,
modal : 'true' ,
buttonAlign : "center" ,
bodyStyle : "padding:0 0 0 0" ,
items : [ this . formDHLShow ] ,
buttons : [ {
text : Zi . LAN . ShangChuanEdi , //"上传EDI",
minWidth : 70 ,
handler : function ( ) {
var cgFILEROLE = Ext . getCmp ( 'dhlFILEROLE' ) ;
var FILEROLE = cgFILEROLE . getValue ( ) ;
me . onSendDHL ( FILEROLE . FILEROLE ) ;
}
} , {
text : Zi . LAN . BaoCunEdiWenJian , //"保存EDI文件",
minWidth : 70 ,
handler : function ( ) {
var cgFILEROLE = Ext . getCmp ( 'dhlFILEROLE' ) ;
var FILEROLE = cgFILEROLE . getValue ( ) ;
me . onSaveDHL ( FILEROLE . FILEROLE ) ;
}
} , {
text : Zi . LAN . GuanBi , //"关闭",
minWidth : 70 ,
handler : function ( ) {
me . winDHLShow . close ( ) ;
}
} ]
} ) ;
//#endregion
} , //end initUIComponents
//#region 基本调用函数
InitGrid : function ( grid ) {
//var agirdcolums = Ext.clone(this.gridList.columns);
var agirdcolums = grid ;
// var agirdcolumsSum = this.girdcolumsSum;
this . storectndisp . load ( { params : { condition : "" } ,
callback : function ( r , options , success ) {
if ( success ) {
if ( r . length != 0 ) {
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 ] . header = 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 ] . header = 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 ] . header = 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 ] . header = 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 ] . header = 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 ] . header = 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 ] . header = 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 ] . header = 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 ] . header = memberyf . data . CNT10 ;
agirdcolums [ j ] . hidden = false ;
} else {
agirdcolums [ j ] . hidden = true ;
}
}
}
} ;
}
this . storecodeservice . load ( { params : { condition : "OPTYPE='2'" } ,
callback : function ( r , options , success ) {
if ( success ) {
if ( r . length != 0 ) {
for ( i = 0 ; i < this . storecodeservice . getCount ( ) ; i += 1 ) {
var itemindex = i + 1 ;
var memberyf = this . storecodeservice . getAt ( i ) ;
for ( var j = 0 ; j < agirdcolums . length ; j ++ ) {
if ( agirdcolums [ j ] . dataIndex == memberyf . data . OPField ) {
agirdcolums [ j ] . header = memberyf . data . SERVICENAME ;
agirdcolums [ j ] . hidden = false ;
}
}
} ;
}
this . gridList . reconfigure ( this . storeList , agirdcolums ) ;
}
} ,
scope : this
} ) ;
// this.gridList.reconfigure(this.storeList, agirdcolums);
// this.gridListSum.reconfigure(this.storeSumList, agirdcolumsSum);
}
} ,
scope : this
} ) ;
} ,
onRefreshClick : function ( button , event ) {
//var girdcolums = this.gridList.getColumnMode();
var sql = this . getCondition ( ) ;
this . sqlcontext = sql ;
this . PageSize = this . Pagenum . getValue ( ) ;
this . storeList . pageSize = this . PageSize ;
this . storeList . load ( {
params : { start : 0 , limit : this . PageSize , sort : '' , condition : sql } ,
waitMsg : Zi . LAN . ZhengZaiChaXunShuJu ,
scope : this
} ) ;
this . onRefreshSumClick ( sql ) ;
} ,
onDsQuery : function ( ) {
//var girdcolums = this.gridList.getColumnMode();
var sql = this . sqlcontext ;
this . PageSize = this . Pagenum . getValue ( ) ;
this . storeList . pageSize = this . PageSize ;
this . storeList . load ( {
params : { start : 0 , limit : this . PageSize , sort : '' , condition : sql } ,
waitMsg : Zi . LAN . ZhengZaiChaXunShuJu ,
scope : this
} ) ;
this . onRefreshSumClick ( sql ) ;
} ,
onRefreshSumClick : function ( sql ) {
this . SumField = [
{ name : 'NOBILL' , type : 'number' } ,
{ name : 'TEU' , type : 'number' } ,
{ name : 'KGS' , type : 'number' } ,
{ name : 'PKGS' , type : 'number' } ,
{ name : 'CBM' , type : 'number' }
] ;
this . girdcolumsSum = [ {
sortable : true ,
dataIndex : 'NOBILL' ,
header : Zi . LAN . NOBILL2 ,
align : 'right' ,
width : 80
} , {
sortable : true ,
dataIndex : 'TEU' ,
header : 'TEU' ,
align : 'right' ,
width : 80
} , {
sortable : true ,
dataIndex : 'PKGS' ,
header : Zi . LAN . PKGS ,
renderer : function ( value , cellmeta , record , rowIndex , columnIndex , store ) { try { var lsValue = usMoney ( value , 2 , '' , false ) ; if ( lsValue != "NaN" ) { value = lsValue ; if ( parseFloat ( lsValue ) < 0 ) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>' ; } } else { return value ; } } catch ( e ) { return value ; } return value ; } ,
align : 'right' ,
width : 80
} , {
sortable : true ,
dataIndex : 'KGS' ,
header : Zi . LAN . KGS2 ,
renderer : function ( value , cellmeta , record , rowIndex , columnIndex , store ) { try { var lsValue = usMoney ( value , 2 , '' , false ) ; if ( lsValue != "NaN" ) { value = lsValue ; if ( parseFloat ( lsValue ) < 0 ) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>' ; } } else { return value ; } } catch ( e ) { return value ; } return value ; } ,
align : 'right' ,
width : 80
} , {
sortable : true ,
dataIndex : 'CBM' ,
header : Zi . LAN . CBM ,
renderer : function ( value , cellmeta , record , rowIndex , columnIndex , store ) { try { var lsValue = usMoney ( value , 2 , '' , false ) ; if ( lsValue != "NaN" ) { value = lsValue ; if ( parseFloat ( lsValue ) < 0 ) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>' ; } } else { return value ; } } catch ( e ) { return value ; } return value ; } ,
align : 'right' ,
width : 80
}
] ;
_this = this ;
this . storeCtnList . load ( { params : { condition : sql } ,
callback : function ( r , options , success ) {
if ( success ) {
if ( r . length != 0 ) {
for ( i = 0 ; i < _this . storeCtnList . getCount ( ) ; i += 1 ) {
var itemindex = i + 1 ;
var memberyf = _this . storeCtnList . getAt ( i ) ;
_this . SumField . push ( { name : 'C' + memberyf . data . CTNALL , type : 'number' } ) ;
_this . girdcolumsSum . push ( {
sortable : true ,
dataIndex : 'C' + memberyf . data . CTNALL ,
header : memberyf . data . CTNALL ,
width : 80
} ) ;
} ;
}
_this . storeSumList = Ext . create ( 'Ext.data.Store' , {
pageSize : this . PageSize ,
fields : _this . SumField ,
remoteSort : true ,
proxy : {
type : 'ajax' ,
url : '/MvcShipping/MsOpSeai/GetCtnSum' ,
reader : {
id : '' ,
root : 'data' ,
totalProperty : 'totalCount'
}
}
} ) ;
_this . gridListSum . reconfigure ( _this . storeSumList , _this . girdcolumsSum ) ;
_this . storeSumList . load ( {
params : { condition : sql } ,
waitMsg : Zi . LAN . ZhengZaiChaXunShuJu ,
scope : this
} ) ;
}
}
} ) ;
} ,
//#endregion
//#region 拼箱分票Grid
displayInnerGrid : function ( renderId , fenpiao ) {
if ( fenpiao == '0' )
return ;
var storeBodyList = Ext . create ( 'Ext.data.Store' , {
model : 'MsOpSeaiModel' ,
remoteSort : true ,
proxy : {
type : 'ajax' ,
url : '/MvcShipping/MsOpSeai/GetFenList' ,
reader : {
id : 'BSNO' ,
root : 'data' ,
totalProperty : 'totalCount'
}
}
} ) ;
innerGrid = Ext . create ( 'Ext.grid.Panel' , {
store : storeBodyList ,
viewConfig : {
enableTextSelection : true , //允许复制数据
autoFill : true
} ,
columns : this . girdcolums ,
// columnLines: true,
// autoWidth: true,
// autoHeight: true,
frame : false ,
renderTo : renderId
} ) ;
innerGrid . columns [ 0 ] = new Ext . grid . RowNumberer ( ) ;
innerGrid . addListener ( 'itemdblclick' , function ( dataview , record , item , index , e , b ) {
this . SelectedRecord = record ;
this . OprationStatus = 'edit' ;
DsOpenEditWin ( '/MvcShipping/MsOpSeai/SaleEdit' ) ;
} , this ) ;
storeBodyList . on ( 'beforeload' , function ( store ) {
var sql = " MASTERNO='" + renderId + "' AND BSNO<>'" + renderId + "'"
Ext . apply ( store . proxy . extraParams , { condition : sql } ) ;
} , this ) ;
storeBodyList . load ( { params : { start : 0 , limit : this . PageSize , sort : '' , condition : " MASTERNO='" + renderId + "' AND BSNO<>'" + renderId + "'" } } ) ;
// innerGrid.getEl().swallowEvent([
// 'mousedown', 'mouseup', 'click',
// 'contextmenu', 'mouseover', 'mouseout',
// 'dblclick', 'mousemove'
// ]);
} ,
destroyInnerGrid : function ( record ) {
var parent = document . getElementById ( record . get ( 'BSNO' ) ) ;
var child = parent . firstChild ;
while ( child ) {
child . parentNode . removeChild ( child ) ;
child = child . nextSibling ;
}
} ,
//#endregion
//#region 其他调用函数
onImportEdiClick : function ( button , event ) {
var winAccess = new Shipping . EDIImport ( {
} ) ;
winAccess . StoreList = this . storeList ;
winAccess . show ( ) ;
return ;
} ,
onClearSql : function ( ) {
var form = this . formSearch . getForm ( ) ;
form . reset ( ) ;
} , //onDeleteClick
getCondition : function ( ) {
var form = this . formSearch . getForm ( ) ;
// var form2 = this.formSearch2.getForm();
if ( ! form . isValid ( ) ) {
Ext . Msg . alert ( '提示' , '查询条件赋值错误,请检查。' ) ;
return '' ;
}
//隐藏查询面板
// this.panelSearch.hide();
this . isShowAdvancedQuery = 0 ;
//
var sql = "" ;
//#region formSearch 查询面板
//编号包括(主提单号)
var MblNo = form . findField ( 'MblNo' ) . getValue ( ) ;
sql = sql + getAndConSql ( sql , MblNo , "(MblNo like '%" + MblNo + "%' or CONTRACTNO like '%" + MblNo + "%' or CUSTNO like '%" + MblNo + "%' or HBLNO like '%" + MblNo + "%' or CUSTOMNO like '%" + MblNo + "%' or INSPECTIONNO like '%" + MblNo + "%' or VOUNO like '%" + MblNo + "%' or APPROVENO like '%" + MblNo + "%' or ORDERNO like '%" + MblNo + "%')" ) ;
//客户名称
var CUSTOMERNAME = form . findField ( 'CUSTOMERNAME' ) . getValue ( ) ;
sql = sql + getAndConSql ( sql , CUSTOMERNAME , "CUSTOMERNAME='" + CUSTOMERNAME + "'" ) ;
// //会计期间
// var ACCDATE = form.findField('ACCDATE').getRawValue();
// sql = sql + getAndConSql(sql, ACCDATE, "ACCDATE='" + ACCDATE + "'");
//到港日期
var ETDbgn = form . findField ( 'ETDbgn' ) . getRawValue ( ) ;
sql = sql + getAndConSql ( sql , ETDbgn , "ETD >='" + ETDbgn + "'" ) ;
var ETDend = form . findField ( 'ETDend' ) . getRawValue ( ) ;
sql = sql + getAndConSql ( sql , ETDend , "ETD <='" + ETDend + "'" ) ;
//操作人
var OP = form . findField ( 'OP' ) . getValue ( ) ;
sql = sql + getAndConSql ( sql , OP , "OP='" + OP + "'" ) ;
//揽货人
var SALE = form . findField ( 'SALE' ) . getValue ( ) ;
sql = sql + getAndConSql ( sql , SALE , "SALE='" + SALE + "'" ) ;
// //贸易方式
// var TRADETYPE = form.findField('TRADETYPE').getValue();
// sql = sql + getAndConSql(sql, TRADETYPE, "TRADETYPE='" + TRADETYPE + "'");
// //品名
// var GOODSNAME = form.findField('GOODSNAME').getValue();
// sql = sql + getAndConSql(sql, GOODSNAME, "GOODSNAME='" + GOODSNAME + "'");
// //牌号
// var NUMBERPLATE = form.findField('NUMBERPLATE').getValue();
// sql = sql + getAndConSql(sql, NUMBERPLATE, "NUMBERPLATE like '%" + NUMBERPLATE + "%'");
// //接单日期
// var BSDATEbgn = form.findField('BSDATEbgn').getRawValue();
// sql = sql + getAndConSql(sql, BSDATEbgn, "BSDATE >='" + BSDATEbgn + "'");
// var BSDATEend = form.findField('BSDATEend').getRawValue();
// sql = sql + getAndConSql(sql, BSDATEend, "BSDATE <='" + BSDATEend + "'");
// //业务状态
// var BSSTATUS = form.findField('BSSTATUS').getValue();
// if (BSSTATUS != null) {
// if (BSSTATUS.toString().trim() == "锁定") {
// sql = sql + getAndConSql(sql, BSSTATUS, "BSSTATUS=1");
// }
// else if (BSSTATUS.toString().trim() == "未锁定") {
// sql = sql + getAndConSql(sql, BSSTATUS, "BSSTATUS=0");
// }
// }
// //费用状态
// var FEESTATUS = form.findField('FEESTATUS').getValue();
// if (FEESTATUS != null) {
// if (FEESTATUS.toString().trim() == "锁定") {
// sql = sql + getAndConSql(sql, FEESTATUS, "FEESTATUS=1");
// }
// else if (FEESTATUS.toString().trim() == "未锁定") {
// sql = sql + getAndConSql(sql, FEESTATUS, "FEESTATUS=0");
// }
// }
// //仓储状态
// var WMSTYPE = form.findField('WMSTYPE').getValue();
// sql = sql + getAndConSql(sql, WMSTYPE, "WMSTYPE='" + WMSTYPE + "'");
//#endregion formSearch
//#region formSearch2 隐藏查询面板
// //建单日期
// var CREATETIMEbgn = form2.findField('CREATETIMEbgn').getRawValue();
// sql = sql + getAndConSql(sql, CREATETIMEbgn, "CREATETIME >='" + CREATETIMEbgn + "'");
// var CREATETIMEend = form2.findField('CREATETIMEend').getRawValue();
// sql = sql + getAndConSql(sql, CREATETIMEend, "CREATETIME <='" + CREATETIMEend + "'");
// //录入人
// var INPUTBY = form2.findField('INPUTBY').getValue();
// sql = sql + getAndConSql(sql, INPUTBY, "INPUTBY='" + INPUTBY + "'");
// //
// var BSTYPE = form2.findField('BSTYPE').getValue();
// sql = sql + getAndConSql(sql, BSTYPE, "BSTYPE='" + BSTYPE + "'");
// //牌号
// var CNTRTOTAL = form2.findField('CNTRTOTAL').getValue();
// sql = sql + getAndConSql(sql, CNTRTOTAL, "CNTRTOTAL like '%" + CNTRTOTAL + "%'");
// //仓储入库货主
// var CUSTOMERNAME_WMS = form2.findField('CUSTOMERNAME_WMS').getValue();
// sql = sql + getAndConSql(sql, CUSTOMERNAME_WMS, "bsno in (select ASSOCIATEDNO from wms where CUSTOMERNAME='" + CUSTOMERNAME_WMS + "' and CORPID='" + COMPANYID + "')");
// //仓储出库货转对象
// var CUSTOMERNAME_WMS_OUT = form2.findField('CUSTOMERNAME_WMS_OUT').getValue();
// sql = sql + getAndConSql(sql, CUSTOMERNAME_WMS_OUT, "bsno in (select ASSOCIATEDNO from wms_out where CLIENTNAMEOLD='" + CUSTOMERNAME_WMS_OUT + "' and CORPID='" + COMPANYID + "')");
// //装货港
// var PORTLOAD = form2.findField('PORTLOAD').getValue();
// sql = sql + getAndConSql(sql, PORTLOAD, "PORTLOAD like '%" + PORTLOAD + "%'");
// //卸货港
// var PORTDISCHARGE = form2.findField('PORTDISCHARGE').getValue();
// sql = sql + getAndConSql(sql, PORTDISCHARGE, "PORTDISCHARGE like '%" + PORTDISCHARGE + "%'");
// //船名
// var VESSEL = form2.findField('VESSEL').getValue();
// sql = sql + getAndConSql(sql, VESSEL, "VESSEL like '%" + VESSEL + "%'");
// //航次
// var VOYNO = form2.findField('VOYNO').getValue();
// sql = sql + getAndConSql(sql, VOYNO, "VOYNO like '%" + VOYNO + "%'");
// //船公司
// var CARRIER = form2.findField('CARRIER').getValue();
// sql = sql + getAndConSql(sql, CARRIER, "CARRIER='" + CARRIER + "'");
// //箱使到期
// var BMDDATEbgn = form2.findField('BMDDATEbgn').getRawValue();
// sql = sql + getAndConSql(sql, BMDDATEbgn, "BMDDATE >='" + BMDDATEbgn + "'");
// var BMDDATEend = form2.findField('BMDDATEend').getRawValue();
// sql = sql + getAndConSql(sql, BMDDATEend, "BMDDATE <='" + BMDDATEend + "'");
// //搬倒日期
// var MDTDATEbgn = form2.findField('MDTDATEbgn').getRawValue();
// sql = sql + getAndConSql(sql, MDTDATEbgn, "MDTDATE >='" + MDTDATEbgn + "'");
// var MDTDATEend = form2.findField('MDTDATEend').getRawValue();
// sql = sql + getAndConSql(sql, MDTDATEend, "MDTDATE <='" + MDTDATEend + "'");
// //品名类型
// var GOODSTYPENAME = form2.findField('GOODSTYPENAME').getValue();
// sql = sql + getAndConSql(sql, GOODSTYPENAME, "GOODSTYPENAME like '%" + GOODSTYPENAME + "%'");
// //贸易代理
// var TRADINGAGENCY = form2.findField('TRADINGAGENCY').getValue();
// sql = sql + getAndConSql(sql, TRADINGAGENCY, "TRADINGAGENCY='" + TRADINGAGENCY + "'");
// //原产地
// var COUNTRYOFORIGIN = form2.findField('COUNTRYOFORIGIN').getValue();
// sql = sql + getAndConSql(sql, COUNTRYOFORIGIN, "COUNTRYOFORIGIN like '%" + COUNTRYOFORIGIN + "%'");
// //BALES
// var BALES = form2.findField('BALES').getValue();
// sql = sql + getAndConSql(sql, BALES, "BALES like '%" + BALES + "%'");
// //车队
// var TRUCKER = form2.findField('TRUCKER').getValue();
// sql = sql + getAndConSql(sql, TRUCKER, "TRUCKER='" + TRUCKER + "'");
// //报关行
// var CUSTOMSER = form2.findField('CUSTOMSER').getValue();
// sql = sql + getAndConSql(sql, CUSTOMSER, "CUSTOMSER='" + CUSTOMSER + "'");
// //发货人
// var SHIPPER = form2.findField('SHIPPER').getValue();
// sql = sql + getAndConSql(sql, SHIPPER, "SHIPPER like '%" + SHIPPER + "%'");
// //收货人
// var CONSIGNEE = form2.findField('CONSIGNEE').getValue();
// sql = sql + getAndConSql(sql, CONSIGNEE, "CONSIGNEE like '%" + CONSIGNEE + "%'");
// //通知人
// var NOTIFYPARTY = form2.findField('NOTIFYPARTY').getValue();
// sql = sql + getAndConSql(sql, NOTIFYPARTY, "NOTIFYPARTY like '%" + NOTIFYPARTY + "%'");
// var ENTERP = form2.findField('ENTERP').getValue();
// sql = sql + getAndConSql(sql, ENTERP, "ENTERP ='" + ENTERP + "'");
// //通关日期
// var CUSTOMDATEbgn = form2.findField('CUSTOMDATEbgn').getRawValue();
// sql = sql + getAndConSql(sql, CUSTOMDATEbgn, "CUSTOMDATE >='" + CUSTOMDATEbgn + "'");
// var CUSTOMDATEend = form2.findField('CUSTOMDATEend').getRawValue();
// sql = sql + getAndConSql(sql, CUSTOMDATEend, "CUSTOMDATE <='" + CUSTOMDATEend + "'");
// //申报日期
// var UPDATETIMEbgn = form2.findField('UPDATETIMEbgn').getRawValue();
// sql = sql + getAndConSql(sql, UPDATETIMEbgn, "UPDATETIME >='" + UPDATETIMEbgn + "'");
// var UPDATETIMEend = form2.findField('UPDATETIMEend').getRawValue();
// sql = sql + getAndConSql(sql, UPDATETIMEend, "UPDATETIME <='" + UPDATETIMEend + "'");
// //报检
// var INSPECTION = form2.findField('INSPECTION').getValue();
// sql = sql + getAndConSql(sql, INSPECTION, "INSPECTION='" + INSPECTION + "'");
// //报检日期
// var INSPECTIONDATEbgn = form2.findField('INSPECTIONDATEbgn').getRawValue();
// sql = sql + getAndConSql(sql, INSPECTIONDATEbgn, "INSPECTIONDATE >='" + INSPECTIONDATEbgn + "'");
// var INSPECTIONDATEend = form2.findField('INSPECTIONDATEend').getRawValue();
// sql = sql + getAndConSql(sql, INSPECTIONDATEend, "INSPECTIONDATE <='" + INSPECTIONDATEend + "'");
// //交关税时间
// var TARRIFSPAIEDTIEMbgn = form2.findField('TARRIFSPAIEDTIEMbgn').getRawValue();
// sql = sql + getAndConSql(sql, TARRIFSPAIEDTIEMbgn, "TARRIFSPAIEDTIEM >='" + TARRIFSPAIEDTIEMbgn + "'");
// var TARRIFSPAIEDTIEMend = form2.findField('TARRIFSPAIEDTIEMend').getRawValue();
// sql = sql + getAndConSql(sql, TARRIFSPAIEDTIEMend, "TARRIFSPAIEDTIEM <='" + TARRIFSPAIEDTIEMend + "'");
// //业务来源
// var BSSOURCE = form2.findField('BSSOURCE').getValue();
// sql = sql + getAndConSql(sql, BSSOURCE, "BSSOURCE='" + BSSOURCE + "'");
// //来源明细
// var BSSOURCEDETAIL = form2.findField('BSSOURCEDETAIL').getValue();
// sql = sql + getAndConSql(sql, BSSOURCEDETAIL, "BSSOURCEDETAIL='" + BSSOURCEDETAIL + "'");
// //装运方式
// var BLTYPE = form2.findField('BLTYPE').getValue();
// sql = sql + getAndConSql(sql, BLTYPE, "BLTYPE='" + BLTYPE + "'");
// //备注
// var REMARK = form2.findField('REMARK').getValue();
// sql = sql + getAndConSql(sql, REMARK, "REMARK like '%" + REMARK + "%'");
//#endregion formSearch2
return sql ;
} ,
setIsShowAdvancedQuery : function ( ) {
if ( this . isShowAdvancedQuery == 0 ) {
this . panelSearch . show ( ) ;
this . isShowAdvancedQuery = 1 ;
} else {
this . panelSearch . hide ( ) ;
this . isShowAdvancedQuery = 0 ;
}
} ,
onUpOpStatusClick : function ( menu , event , type ) {
var selections = this . GridCheckBoxModel . selected . items ;
if ( selections . length == 0 ) {
Ext . Msg . show ( { title : '提示' , msg : '请先选择要更新的业务!' , icon : Ext . Msg . INFO , buttons : Ext . Msg . OK } ) ;
return ;
}
var BSNOStr = '' ;
for ( var i = 0 ; i < selections . length ; i ++ ) {
var rec = selections [ i ] ;
var BSNO = "'" + rec . data . BSNO + "'" ;
if ( BSNOStr == '' )
BSNOStr = BSNO ;
else {
BSNOStr = BSNOStr + ',' + BSNO ;
}
}
if ( BSNOStr == '' ) {
Ext . Msg . show ( { title : '提示' , msg : '没有要更新的业务!' , icon : Ext . Msg . INFO , buttons : Ext . Msg . OK } ) ;
return ;
} else {
this . selectbsno = " BSNO IN (" + BSNOStr + ")" ;
window . open ( '/MvcShipping/MsOpStatus/PiLiang' , "PILIANGOPSTATUS" , 'width=1200,height=600,top=0,left=0,resizable=yes,status=yes,menubar=no,scrollbars=yes' ) ;
}
} ,
onPiLiangSubmitClick : function ( menu , event , type ) {
var selections = this . GridCheckBoxModel . selected . items ;
if ( selections . length == 0 ) {
Ext . Msg . show ( { title : '提示' , msg : '请先选择要更新的业务!' , icon : Ext . Msg . INFO , buttons : Ext . Msg . OK } ) ;
return ;
}
var BSNOStr = '' ;
for ( var i = 0 ; i < selections . length ; i ++ ) {
var rec = selections [ i ] ;
var BSNO = "'" + rec . data . BSNO + "'" ;
if ( BSNOStr == '' )
BSNOStr = BSNO ;
else {
BSNOStr = BSNOStr + ',' + BSNO ;
}
}
this . storePLList . removeAll ( ) ;
for ( var i = 0 ; i < selections . length ; i ++ ) {
var rec = selections [ i ] ;
this . storePLList . add ( rec . data ) ;
}
if ( BSNOStr == '' ) {
Ext . Msg . show ( { title : '提示' , msg : '没有要更新的业务!' , icon : Ext . Msg . INFO , buttons : Ext . Msg . OK } ) ;
return ;
} else {
this . selectbsno = " BSNO IN (" + BSNOStr + ")" ;
window . open ( '/Account/Chfee_Audit/PiLiangSubmit' , "PILIANGSUBMIT" , 'width=1200,height=600,top=0,left=0,resizable=yes,status=yes,menubar=no,scrollbars=yes' ) ;
}
} ,
onFeeEditClick : function ( menu , event ) {
var selections = this . gridList . getSelectionModel ( ) . getSelection ( ) ;
if ( selections . length == 0 ) {
Ext . Msg . show ( { title : '提示' , msg : '请先选择业务!' , icon : Ext . Msg . INFO , buttons : Ext . Msg . OK } ) ;
return ;
}
var record = selections [ 0 ] ;
this . SelectedRecord = record ;
this . OprationStatus = 'edit' ;
DsOpenEditWin ( '/MvcShipping/MsOpSeai/PiLiangFeeEdit' ) ;
} ,
//#endregion
//#region 导出EDI
onCreateEDIClick : function ( menu , event , type ) {
this . editype = type ;
this . winEDIShow . show ( ) ;
} ,
onSendEDI : function ( type , filetype , filerole , isbill , isnoctn ) {
var GidStr = '' ;
var selections = this . GridCheckBoxModel . selected . items ;
if ( selections . length == 0 ) {
Ext . Msg . show ( { title : '提示' , msg : '请先选择要生成的业务!' , icon : Ext . Msg . INFO , buttons : Ext . Msg . OK } ) ;
return ;
}
var bodyAddDatas = [ ] ;
var j = 0 ;
var Mblno = '' ;
for ( var i = 0 ; i < selections . length ; i ++ ) {
var rec = selections [ i ] ;
Mblno = rec . data . MBLNO ;
bodyAddDatas . push ( rec ) ;
}
var jsonbodyAddDatas = ConvertRecordsToJsonAll ( bodyAddDatas ) ;
Ext . Ajax . request ( {
waitMsg : '正在生成...' ,
url : '/MvcShipping/MsOpSeai/CreateEDIList' ,
params : {
headData : jsonbodyAddDatas ,
mblno : Mblno ,
type : type ,
filetype : filetype ,
filerole : filerole ,
isbill : isbill ,
isnoctn : isnoctn
} ,
callback : function ( options , success , response ) {
if ( success ) {
var result = Ext . JSON . decode ( response . responseText ) ;
if ( ! result . Success ) {
Ext . Msg . show ( {
title : '提示' ,
msg : result . Message ,
icon : Ext . MessageBox . ERROR ,
buttons : Ext . Msg . OK
} ) ;
return ;
} else {
Ext . Msg . show ( { title : '提示' , msg : result . Message , icon : Ext . Msg . INFO , buttons : Ext . Msg . OK } ) ;
}
} else {
Ext . MessageBox . alert ( '请求出现错误,请重试' , response . responseText ) ;
}
} ,
scope : this
} ) ;
} ,
onSaveEDI : function ( type , filetype , filerole , isbill , isnoctn ) {
var GidStr = '' ;
var records = this . GridCheckBoxModel . selected . items ;
if ( records . length == 0 ) {
Ext . Msg . show ( { title : '提示' , msg : '请先选择要存为文件的业务!' , icon : Ext . Msg . INFO , buttons : Ext . Msg . OK } ) ;
return ;
}
var insert ;
var bodyAddDatas = [ ] ;
var j = 0 ;
var Mblno = '' ;
for ( var i = 0 ; i < records . length ; i ++ ) {
var rec = records [ i ] ;
var EDISTATUS = rec . data . EDISTATUS ;
if ( EDISTATUS == "已发送" ) {
j = j + 1 ;
}
Mblno = rec . data . MBLNO ;
bodyAddDatas . push ( rec ) ;
}
var jsonbodyAddDatas = ConvertRecordsToJsonAll ( bodyAddDatas ) ;
var msg = '' ;
msg = '确定要保存EDI文件吗? ' ;
var strlo = window . location . host ;
_this = this ;
Ext . MessageBox . confirm ( '提示' , msg , function ( btn ) {
if ( btn == 'yes' ) {
Ext . Ajax . request ( {
waitMsg : 'Changing...' ,
url : '/MvcShipping/MsOpSeai/SaveEDIList' ,
params : {
headData : jsonbodyAddDatas ,
mblno : Mblno ,
type : type ,
filetype : filetype ,
filerole : filerole ,
isbill : isbill ,
isnoctn : isnoctn
} ,
callback : function ( options , success , response ) {
if ( success ) {
var result = Ext . JSON . decode ( response . responseText ) ;
if ( ! result . Success ) {
Ext . Msg . show ( { title : '提示' , msg : result . Message , icon : Ext . MessageBox . ERROR , buttons : Ext . Msg . OK } ) ;
return ;
} else {
var downloadfile = Ext . getCmp ( 'downloadfile' ) ;
var filehtml = '<a href="' + result . Data + '" style=' + '"text-decoration:none"' + '>' + result . Message + '</a>'
downloadfile . html = filehtml ;
this . winDownloadShow . show ( ) ;
}
} else {
Ext . MessageBox . alert ( 'The Server Response Error, Please Try Again' , response . responseText ) ;
}
} ,
scope : this
} ) ;
}
} , this ) ;
} ,
//#endregion
//#region 交通部EDI
onCreateIFTMBFClick : function ( menu , event ) {
this . winIFTMBFShow . show ( ) ;
} ,
onSendIFTMBF : function ( filerole , carrier ) {
var GidStr = '' ;
var selections = this . GridCheckBoxModel . selected . items ;
if ( selections . length == 0 ) {
Ext . Msg . show ( { title : '提示' , msg : '请先选择要生成的业务!' , icon : Ext . Msg . INFO , buttons : Ext . Msg . OK } ) ;
return ;
}
var BSNOStr = '' ;
var j = 0 ;
var Mblno = '' ;
for ( var i = 0 ; i < selections . length ; i ++ ) {
var rec = selections [ i ] ;
Mblno = rec . data . MBLNO ;
var BSNO = rec . data . BSNO ;
if ( BSNOStr == '' )
BSNOStr = BSNO ;
else {
BSNOStr = BSNOStr + ',' + BSNO ;
}
}
if ( BSNOStr == '' ) {
Ext . Msg . show ( { title : '提示' , msg : '没有要生成的业务!' , icon : Ext . Msg . INFO , buttons : Ext . Msg . OK } ) ;
return ;
} else {
Ext . Ajax . request ( {
waitMsg : '正在生成...' ,
url : '/MvcShipping/MsOpSeai/CreateIFTMBFList' ,
params : {
bsnos : BSNOStr ,
mblno : Mblno ,
filerole : filerole ,
carrier : carrier
} ,
callback : function ( options , success , response ) {
if ( success ) {
var result = Ext . JSON . decode ( response . responseText ) ;
if ( ! result . Success ) {
Ext . Msg . show ( {
title : '提示' ,
msg : result . Message ,
icon : Ext . MessageBox . ERROR ,
buttons : Ext . Msg . OK
} ) ;
return ;
} else {
Ext . Msg . show ( { title : '提示' , msg : result . Message , icon : Ext . Msg . INFO , buttons : Ext . Msg . OK } ) ;
}
} else {
Ext . MessageBox . alert ( '请求出现错误,请重试' , response . responseText ) ;
}
} ,
scope : this
} ) ;
}
} ,
onSaveIFTMBF : function ( filerole , carrier ) {
var GidStr = '' ;
var selections = this . GridCheckBoxModel . selected . items ;
if ( selections . length == 0 ) {
Ext . Msg . show ( { title : '提示' , msg : '请先选择要生成的业务!' , icon : Ext . Msg . INFO , buttons : Ext . Msg . OK } ) ;
return ;
}
var BSNOStr = '' ;
var j = 0 ;
var Mblno = '' ;
for ( var i = 0 ; i < selections . length ; i ++ ) {
var rec = selections [ i ] ;
Mblno = rec . data . MBLNO ;
var BSNO = rec . data . BSNO ;
if ( BSNOStr == '' )
BSNOStr = BSNO ;
else {
BSNOStr = BSNOStr + ',' + BSNO ;
}
}
if ( BSNOStr == '' ) {
Ext . Msg . show ( { title : '提示' , msg : '没有要生成的业务!' , icon : Ext . Msg . INFO , buttons : Ext . Msg . OK } ) ;
return ;
} else {
Ext . Ajax . request ( {
waitMsg : 'Changing...' ,
url : '/MvcShipping/MsOpSeai/SaveIFTMBFList' ,
params : {
bsnos : BSNOStr ,
mblno : Mblno ,
filerole : filerole ,
carrier : carrier
} ,
callback : function ( options , success , response ) {
if ( success ) {
var result = Ext . JSON . decode ( response . responseText ) ;
if ( ! result . Success ) {
Ext . Msg . show ( {
title : '提示' ,
msg : result . Message ,
icon : Ext . MessageBox . ERROR ,
buttons : Ext . Msg . OK
} ) ;
return ;
} else {
var downloadfile = Ext . getCmp ( 'downloadfile' ) ;
var children = downloadfile . items ;
if ( children ) {
for ( var i = 0 , len = children . length ; i < len ; i ++ ) {
downloadfile . remove ( children . items [ i ] , true ) ;
}
}
var downloadfiles = '<a href="' + result . Data + '" style=' + '"text-decoration:none"' + '>' + result . Message + '</a>' ;
var htmla = Ext . widget ( 'label' , {
html : downloadfiles ,
width : 120 ,
text : ''
} ) ;
downloadfile . items . add ( htmla ) ;
this . winDownloadShow . show ( ) ;
}
} else {
Ext . MessageBox . alert ( 'The Server Response Error, Please Try Again' , response . responseText ) ;
}
} ,
scope : this
} ) ;
}
} ,
//#endregion
//#region 导出Excel
onExportClick : function ( button , event ) {
var strGIDs = "" ;
var sql = escape ( this . sqlcontext ) ;
var openSet = "height=1, width=400, toolbar=no, menubar=no,scrollbars=no, resizable=no,location=no, status=no,Top=" + ( screen . height - 200 ) / 2 + ",Left=" + ( screen . width - 400 ) / 2 ;
var openType = "_blank" ;
var openUrl = "../../Reports/RptExport.aspx?handle=MsOpSeaiIndex&formname=" + this . formname + "&condition1=" + sql + "&gids=" + strGIDs ;
window . open ( openUrl , openType , openSet ) ;
} ,
//#endregion
OprationSwap : function ( ) {
var ret = new Array ( ) ;
ret [ 0 ] = this . OprationStatus ;
ret [ 1 ] = this . storeList ;
ret [ 2 ] = this . SelectedRecord ;
ret [ 3 ] = this . selectbsno ;
ret [ 4 ] = 'op_seai' ;
ret [ 5 ] = this . storePLList ;
return ret ;
} ,
//#region 打印
Print : function ( ) {
_this = this ;
if ( this . storeList . getCount ( ) == 0 ) {
return ;
}
Ext . Msg . wait ( '正在组织数据, 请稍侯..' ) ;
Ext . Ajax . request ( {
waitMsg : '正在组织数据...' ,
url : '/MvcShipping/MsOpSeai/GetDataListStr' ,
scope : this ,
params : {
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 = 'MSOPSEAILIST' ;
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
} ) ;
}
}
} ) ;
} ,
PrintSelect : function ( ) {
_this = this ;
if ( this . storeList . getCount ( ) == 0 ) {
return ;
}
var selectedRecords = [ ] ;
var storeadd = null ;
selectedRecords = this . GridCheckBoxModel . selected . items ;
if ( selectedRecords . length == 0 ) {
Ext . Msg . show ( { title : '提示' , msg : '请先选择要打印的业务!' , icon : Ext . Msg . INFO , buttons : Ext . Msg . OK } ) ;
return ;
}
var feeGidSql = '' ;
for ( var i = 0 ; i < selectedRecords . length ; i ++ ) {
var record = selectedRecords [ i ] ;
var feeGId = "'" + record . get ( 'BSNO' ) + "'" ;
if ( feeGidSql == '' ) {
feeGidSql = feeGId ;
} else {
feeGidSql = feeGidSql + "," + feeGId ;
}
} ;
var bsno = '11111' ;
var selections = this . gridList . getSelectionModel ( ) . getSelection ( ) ;
if ( selections . length != 0 ) {
var record = selections [ 0 ] ;
bsno = record . data . BSNO ;
}
var printType = 'MSOPSEAILISTSELECT' ;
var sql1 = "select * from op_seai WHERE BSNO IN (" + feeGidSql + ") order by BSDATE desc" ;
var sql2 = "select * from op_seai where BSNO='" + bsno + "'" ;
var sql3 = "" ;
var sql4 = "" ;
var sql5 = "" ;
var sql6 = "" ;
PrintComm ( printType , sql1 , sql2 , sql3 , sql4 , sql5 , sql6 ) ;
}
//#endregion
} ) ;