@ -1129,15 +1129,25 @@ Ext.extend(Shipping.MsOpAireFenEdit, Ext.Panel, {
listeners : {
listeners : {
scope : this ,
scope : this ,
change : function ( field , newValue , oldValue , eOpts ) {
change : function ( field , newValue , oldValue , eOpts ) {
if ( newValue == oldValue ) return ;
var ttl = parseFloatDef ( this . formEdit . getForm ( ) . findField ( 'TTLFREIGHT' ) . getValue ( ) , 0 ) ;
var ttl = parseFloatDef ( this . formEdit . getForm ( ) . findField ( 'TTLFREIGHT' ) . getValue ( ) , 0 ) ;
var BLFRT = this . formEdit . getForm ( ) . findField ( 'BLFRT' ) . getValue ( ) ;
var BLFRT = this . formEdit . getForm ( ) . findField ( 'BLFRT' ) . getValue ( ) ;
var OTFRT = this . formEdit . getForm ( ) . findField ( 'OTFRT' ) . getValue ( ) ;
var OTFRT = this . formEdit . getForm ( ) . findField ( 'OTFRT' ) . getValue ( ) ;
if ( BLFRT == 'PP' ) {
if ( BLFRT == 'PP' ) {
if ( ttl != 0 )
if ( ttl != 0 ) {
this . formEdit . getForm ( ) . findField ( 'PFREIGHT' ) . setValue ( ttl ) ;
} else if ( OTFRT == 'CC' ) {
if ( ttl != 0 )
this . formEdit . getForm ( ) . findField ( 'PFREIGHT' ) . setValue ( ttl ) ;
this . formEdit . getForm ( ) . findField ( 'PFREIGHT' ) . setValue ( ttl ) ;
this . formEdit . getForm ( ) . findField ( 'CFREIGHT' ) . setValue ( '' ) ;
}
this . feechange ( ) ;
} else if ( BLFRT == 'CC' ) {
if ( ttl != 0 ) {
this . formEdit . getForm ( ) . findField ( 'CFREIGHT' ) . setValue ( ttl ) ;
this . formEdit . getForm ( ) . findField ( 'PFREIGHT' ) . setValue ( '' ) ;
}
this . feechange ( ) ;
}
}
}
}
}
}
@ -1537,13 +1547,20 @@ Ext.extend(Shipping.MsOpAireFenEdit, Ext.Panel, {
if ( newValue == oldValue ) return ;
if ( newValue == oldValue ) return ;
var ttl = parseFloatDef ( newValue , 0 ) ;
var ttl = parseFloatDef ( newValue , 0 ) ;
var BLFRT = this . formEdit . getForm ( ) . findField ( 'BLFRT' ) . getValue ( ) ;
var BLFRT = this . formEdit . getForm ( ) . findField ( 'BLFRT' ) . getValue ( ) ;
var OTFRT = this . formEdit . getForm ( ) . findField ( 'OTFRT' ) . getValue ( ) ;
if ( BLFRT == 'PP' ) {
if ( BLFRT == 'PP' ) {
if ( ttl != 0 )
if ( ttl != 0 ) {
this . formEdit . getForm ( ) . findField ( 'PFREIGHT' ) . setValue ( ttl ) ;
} else if ( OTFRT == 'CC' ) {
if ( ttl != 0 )
this . formEdit . getForm ( ) . findField ( 'PFREIGHT' ) . setValue ( ttl ) ;
this . formEdit . getForm ( ) . findField ( 'PFREIGHT' ) . setValue ( ttl ) ;
this . formEdit . getForm ( ) . findField ( 'CFREIGHT' ) . setValue ( '' ) ;
}
this . feechange ( ) ;
} else if ( BLFRT == 'CC' ) {
if ( ttl != 0 ) {
this . formEdit . getForm ( ) . findField ( 'CFREIGHT' ) . setValue ( ttl ) ;
this . formEdit . getForm ( ) . findField ( 'PFREIGHT' ) . setValue ( '' ) ;
}
this . feechange ( ) ;
}
}
}
}
@ -3044,9 +3061,9 @@ Ext.extend(Shipping.MsOpAireFenEdit, Ext.Panel, {
selModel : this . GridCheckBoxModelCtn ,
selModel : this . GridCheckBoxModelCtn ,
plugins : [ this . gridListCellEditing ] ,
plugins : [ this . gridListCellEditing ] ,
selType : 'cellmodel' ,
selType : 'cellmodel' ,
features : [ {
//features: [{
ftype : 'summary' //Ext.grid.feature.Summary表格汇总特性
// ftype: 'summary'//Ext.grid.feature.Summary表格汇总特性
} ] ,
//}],
tbar : [ {
tbar : [ {
text : '增加明细' , //'增加明细',
text : '增加明细' , //'增加明细',
tooltip : '增加明细' , //'增加明细',
tooltip : '增加明细' , //'增加明细',
@ -3111,9 +3128,10 @@ Ext.extend(Shipping.MsOpAireFenEdit, Ext.Panel, {
var CBM = 0 ;
var CBM = 0 ;
for ( var i = 0 ; i < _this . storeBodyList . getCount ( ) ; i += 1 ) {
for ( var i = 0 ; i < _this . storeBodyList . getCount ( ) ; i += 1 ) {
var member = _this . storeBodyList . getAt ( i ) ;
var member = _this . storeBodyList . getAt ( i ) ;
CBM = Add ( CBM , member . data . CBM );
CBM = Add ( CBM , member . data . CBM , 5 );
}
}
_this . formEdit . getForm ( ) . findField ( 'CBM' ) . setValue ( CBM ) ;
_this . formEdit . getForm ( ) . findField ( 'CBM' ) . setValue ( CBM ) ;
_this . SetFEEKGSChangeNew ( ) ;
me . winCtnListShow . close ( ) ;
me . winCtnListShow . close ( ) ;
}
}
@ -3838,9 +3856,39 @@ Ext.extend(Shipping.MsOpAireFenEdit, Ext.Panel, {
this . formEdit . getForm ( ) . findField ( 'CCARRIEROT' ) . setValue ( ttl ) ;
this . formEdit . getForm ( ) . findField ( 'CCARRIEROT' ) . setValue ( ttl ) ;
}
}
this . formEdit . getForm ( ) . findField ( 'OTFEE' ) . setValue ( s ) ;
this . formEdit . getForm ( ) . findField ( 'OTFEE' ) . setValue ( s ) ;
var OTFRT = this . formEdit . getForm ( ) . findField ( 'OTFRT' ) . getValue ( ) ;
if ( OTFRT == 'PP' ) {
if ( ttl != 0 )
this . formEdit . getForm ( ) . findField ( 'PCARRIEROT' ) . setValue ( ttl ) ;
this . formEdit . getForm ( ) . findField ( 'CCARRIEROT' ) . setValue ( '' ) ;
} else if ( OTFRT == 'CC' ) {
if ( ttl != 0 )
this . formEdit . getForm ( ) . findField ( 'CCARRIEROT' ) . setValue ( ttl ) ;
this . formEdit . getForm ( ) . findField ( 'PCARRIEROT' ) . setValue ( '' ) ;
}
this . feechange ( ) ;
} ,
} ,
feechange : function ( ) {
var pfreight = this . formEdit . getForm ( ) . findField ( 'PFREIGHT' ) . getValue ( ) ;
var PCARRIEROT = this . formEdit . getForm ( ) . findField ( 'PCARRIEROT' ) . getValue ( ) ;
var ttl = Add ( pfreight , parseFloatDef ( PCARRIEROT , 0 ) ) ;
var POTFREIGHT = this . formEdit . getForm ( ) . findField ( 'POTFREIGHT' ) . getValue ( ) ;
ttl = Add ( ttl , parseFloatDef ( POTFREIGHT , 0 ) ) ;
this . formEdit . getForm ( ) . findField ( 'PTOTAL' ) . setValue ( ttl ) ;
var cfreight = this . formEdit . getForm ( ) . findField ( 'CFREIGHT' ) . getValue ( ) ;
var CCARRIEROT = this . formEdit . getForm ( ) . findField ( 'CCARRIEROT' ) . getValue ( ) ;
var cttl = Add ( cfreight , parseFloatDef ( CCARRIEROT , 0 ) ) ;
var COTFREIGHT = this . formEdit . getForm ( ) . findField ( 'COTFREIGHT' ) . getValue ( ) ;
cttl = Add ( cttl , parseFloatDef ( COTFREIGHT , 0 ) ) ;
this . formEdit . getForm ( ) . findField ( 'CTOTAL' ) . setValue ( cttl ) ;
} ,
//#region
//#region
LoadDefValue : function ( ) {
LoadDefValue : function ( ) {
this . storeDefValue . load ( { params : { condition : "BSTYPE='空运出口'" } ,
this . storeDefValue . load ( { params : { condition : "BSTYPE='空运出口'" } ,
@ -4057,11 +4105,11 @@ Ext.extend(Shipping.MsOpAireFenEdit, Ext.Panel, {
var ACBMSTR = ACBM . toString ( ) ;
var ACBMSTR = ACBM . toString ( ) ;
if ( ACBMSTR . indexOf ( '.' ) > 0 ) {
if ( ACBMSTR . indexOf ( '.' ) > 0 ) {
var arr1 = ACBMSTR . split ( "." ) ;
var arr1 = ACBMSTR . split ( "." ) ;
var postr = arr1 [ 1 ] . substr ( 1 , 1 ) ;
var postr = arr1 [ 1 ] . substr ( 0 , 1 ) ;
var acbm = Number ( arr1 [ 0 ] ) ;
var acbm = Number ( arr1 [ 0 ] ) ;
if ( postr == '0' ) ACBMSTR = arr1 [ 0 ] ;
if ( postr == '0' ) ACBMSTR = arr1 [ 0 ] ;
else if ( postr == '1' || postr == '2' || postr == '3' || postr == '4' || postr == '5' ) ACBMSTR = arr1 [ 0 ] + '.5' ;
else if ( postr == '1' || postr == '2' || postr == '3' || postr == '4' || postr == '5' ) ACBMSTR = arr1 [ 0 ] + '.5' ;
else if ( postr == '6' || postr == '7' || postr == '8' || postr == '9' ) ACBMSTR = Add ( acbm , 1 ) ;
else if ( postr == '6' || postr == '7' || postr == '8' || postr == '9' ) ACBMSTR = Add ( acbm , 1 ) ;
}
}
ACBM = Number ( ACBMSTR ) ;
ACBM = Number ( ACBMSTR ) ;
var feekgs = 0 ;
var feekgs = 0 ;
@ -4209,9 +4257,22 @@ Ext.extend(Shipping.MsOpAireFenEdit, Ext.Panel, {
var HEIGHT = e . record . data [ 'HEIGHT' ] ;
var HEIGHT = e . record . data [ 'HEIGHT' ] ;
var CTNFEE = Mul3 ( LENGTH , WIDTH , HEIGHT , 2 ) ;
var CTNFEE = Mul3 ( LENGTH , WIDTH , HEIGHT , 2 ) ;
var CBM = Mul ( PKGS , CTNFEE , 2 ) ;
var CBM = Mul ( PKGS , CTNFEE , 5 ) ;
CBM = CBM / 1000 ;
// CBM=Div(CBM, 1000);
CBM = ( CBM / 1000 ) . toFixed ( 2 ) ;
CBM = Div ( CBM , 1000000 , 6 ) . toString ( ) ;
if ( CBM . indexOf ( '.' ) > 0 ) {
var arr1 = CBM . split ( "." ) ;
if ( arr1 [ 1 ] . length >= 5 ) {
var postr = arr1 [ 1 ] . substr ( 4 , 1 ) ;
var postr2 = arr1 [ 1 ] . substr ( 5 , 1 ) ;
var acbm = Number ( arr1 [ 0 ] + '.' + arr1 [ 1 ] . substr ( 0 , 4 ) ) ;
if ( postr == '0' && ( postr2 == '' || postr2 == '0' ) ) CBM = acbm ;
else CBM = Add ( acbm , 0.0001 , 5 ) ;
}
}
e . record . set ( 'CBM' , CBM ) ;
e . record . set ( 'CBM' , CBM ) ;
}
}
@ -4239,6 +4300,7 @@ Ext.extend(Shipping.MsOpAireFenEdit, Ext.Panel, {
var bodydatas = [ ] ;
var bodydatas = [ ] ;
var ttlcbm = 0 ;
for ( var i = 0 ; i < this . storeBodyList . getCount ( ) ; i += 1 ) {
for ( var i = 0 ; i < this . storeBodyList . getCount ( ) ; i += 1 ) {
var member = this . storeBodyList . getAt ( i ) ;
var member = this . storeBodyList . getAt ( i ) ;
var LENGTH = member . data . LENGTH ;
var LENGTH = member . data . LENGTH ;
@ -4250,11 +4312,15 @@ Ext.extend(Shipping.MsOpAireFenEdit, Ext.Panel, {
if ( WIDTH == '' || WIDTH == null ) member . data . WIDTH = '0' ;
if ( WIDTH == '' || WIDTH == null ) member . data . WIDTH = '0' ;
if ( HEIGHT == '' || HEIGHT == null ) member . data . HEIGHT = '0' ;
if ( HEIGHT == '' || HEIGHT == null ) member . data . HEIGHT = '0' ;
if ( PKGS == '' || PKGS == null ) member . data . PKGS = '0' ;
if ( PKGS == '' || PKGS == null ) member . data . PKGS = '0' ;
if ( CBM == '' || CBM == null ) member . data . CBM = '0' ;
if ( CBM == '' || CBM == null ) member . data . CBM = '0' ;
bodydatas . push ( member ) ;
bodydatas . push ( member ) ;
/* ttlcbm=*/
ttlcbm = Add ( ttlcbm , CBM , 5 ) ;
}
}
var jsonBody = ConvertRecordsToJsonAll ( bodydatas ) ;
var jsonBody = ConvertRecordsToJsonAll ( bodydatas ) ;
this . formEdit . getForm ( ) . findField ( 'CBM' ) . setValue ( ttlcbm ) ;
_this . SetFEEKGSChangeNew ( ) ;
//
//
//
//