@ -144,7 +144,70 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, {
{ name : 'SALE' , type : 'string' }
]
} ) ;
Ext . define ( 'MsOpSeaeDetail' , {
extend : 'Ext.data.Model' ,
fields : [
{ name : 'GID' , type : 'string' } ,
{ name : 'CTN_ID' , type : 'string' } ,
{ name : 'MASTERNO' , type : 'string' } ,
{ name : 'BSNO' , type : 'string' } ,
{ name : 'sub_bno' , type : 'string' } ,
{ name : 'bno' , type : 'string' } ,
{ name : 'CTNCODE' , type : 'string' } ,
{ name : 'SIZE' , type : 'string' } ,
{ name : 'CTN' , type : 'string' } ,
{ name : 'CTNNUM' , type : 'int' } ,
{ name : 'TEU' , type : 'int' } ,
{ name : 'CTNALL' , type : 'string' } ,
{ name : 'CNTRNO' , type : 'string' } ,
{ name : 'SEALNO' , type : 'string' } ,
{ name : 'PKGS' , type : 'int' } ,
{ name : 'KGS' , type : 'decimal' } ,
{ name : 'CBM' , type : 'decimal' } ,
{ name : 'FENPKGS' , type : 'int' } ,
{ name : 'FENKGS' , type : 'decimal' } ,
{ name : 'FENCBM' , type : 'decimal' } ,
{ name : 'REMARK' , type : 'string' } ,
{ name : 'KINDPKGS' , type : 'string' } ,
{ name : 'TAREWEIGHT' , type : 'decimal' } , //箱皮重
{ name : 'TTLWEIGHT' , type : 'decimal' } , //箱皮重
{ name : 'GOODSNAME' , type : 'string' } , //箱皮重
{ name : 'EXITDOOR' , type : 'string' } , //箱皮重
{ name : 'ENTERDOOR' , type : 'string' } , //箱皮重
{ name : 'CTNSTATUS' , type : 'string' } , //箱皮重
{ name : 'MASTERNO' , type : 'string' } ,
{ name : 'VESSEL' , type : 'string' } , //箱皮重
{ name : 'VOYNO' , type : 'string' } , //箱皮重
{ name : 'MBLNO' , type : 'string' } , //箱皮重
{ name : 'TRUCKNO' , type : 'string' } , //箱皮重
{ name : 'TRUCKTYPE' , type : 'string' } , //箱皮重
{ name : 'ONBORD' , type : 'string' } , //箱皮重
{ name : 'ETD' , type : 'string' } ,
{ name : 'ISTEMP' , type : 'string' } , //暂出
{ name : 'WEIGHTYPE' , type : 'string' } , //称重方式
{ name : 'WEIGHKGS' , type : 'decimal' } , //称重重量
{ name : 'WEIGHATTN' , type : 'string' } , //Shipper VGM 联系人
{ name : 'WEIGHTEL' , type : 'string' } , //VGM联系人的联系方式
{ name : 'WEIGHSIGN' , type : 'string' } , ////VGM负责人签名
{ name : 'WEIGHDATE' , type : 'string' } , //VGM称重日期
{ name : 'VGMADDR' , type : 'string' } , ////VGM负责人签名
{ name : 'VGMEMAIL' , type : 'string' } , //VGM称重日期
{ name : 'TIXIANGSHIJIAN' , type : 'string' } , //提箱时间
{ name : 'TRUCKER' , type : 'string' } ,
{ name : 'TRUCKFEE' , type : 'decimal' } ,
{ name : 'FREESTORAGEDAY' , type : 'int' } ,
{ name : 'STORAGEDAY' , type : 'int' } ,
{ name : 'STORAGEPRICE' , type : 'decimal' } ,
{ name : 'STORAGEFEE' , type : 'decimal' } ,
{ name : 'FREECTNDAY' , type : 'int' } ,
{ name : 'CTNDAY' , type : 'int' } ,
{ name : 'CTNPRICE' , type : 'decimal' } ,
{ name : 'CTNFEE' , type : 'decimal' } ,
{ name : 'PCTN_ID' , type : 'string' } ,
{ name : 'VGMCONNCOM' , type : 'string' } //VGM联系公司
]
} ) ;
//#region 编辑Form
@ -210,7 +273,7 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, {
} ) ;
_thisPc = this ;
this . StoreTruckType = Ext . create ( 'DsExt.ux.RefEnumStore' , { } ) ;
this . StoreTruckType . load ( { params : { enumTypeId : 99019 } } ) ;
@ -260,19 +323,7 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, {
]
} ) ;
//件数包装
this . storeCodePackage = Ext . create ( 'DsExt.ux.RefTableStore' , {
model : 'DsShipping.ux.CodePackageModel' ,
proxy : { url : '/CommMng/BasicDataRef/GetCodePackageList' }
} ) ;
this . storeCodePackage . load ( ) ;
this . comboxKINDPKGS = Ext . create ( 'DsExt.ux.RefTableCombox' , {
fieldLabel : '包 装' ,
store : this . storeCodePackage ,
name : 'KINDPKGS' ,
valueField : 'PKGS' ,
displayField : 'PKGS'
} ) ;
Ext . define ( 'MsWlBsHeadRefMsWlTruck' , {
extend : 'Ext.data.Model' ,
@ -796,7 +847,7 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, {
format : 'Y-m-d' ,
xtype : 'datefield' ,
name : 'ReturnDate'
} , this . comboxTruckNo , this . comboxDrvName , , {
} , this . comboxTruckNo , this . comboxDrvName , {
xtype : "checkbox" , //checkbox控件
name : "ISPINGTAI" ,
boxLabel : "" ,
@ -925,6 +976,13 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, {
} ,
scope : this
} ,
{
text : "引入场站数据" ,
handler : function ( button , event ) {
this . onCreateFenClick ( ) ;
} ,
scope : this
} ,
'-' ,
{
id : 'bsbtnCopyAndNew' ,
@ -1397,6 +1455,9 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, {
var data = result . data ;
if ( opstatus == 'add' ) {
data . PcBillType = '' ;
}
this . formEdit . getForm ( ) . reset ( ) ;
@ -2026,7 +2087,111 @@ Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, {
DsTruck . MsChFeeAudit ( records , 2 , '正在提交审核数据, 请稍侯..' ) ;
} ,
onCreateFenClick : function ( ) {
Ext . Ajax . timeout = 6000000 ;
var YARD = this . formEdit . getForm ( ) . findField ( 'YardName' ) . getValue ( ) ;
if ( YARD == '' || YARD == NaN || YARD == null ) {
Ext . Msg . show ( { title : '警告' , msg : '场站不能为空!' , icon : Ext . Msg . WARNING , buttons : Ext . Msg . OK } ) ; //'场站不能为空!'
return ;
}
var MBLNO = this . formEdit . getForm ( ) . findField ( 'MblNoSe' ) . getValue ( ) ;
if ( MBLNO == '' || MBLNO == NaN || MBLNO == null ) {
Ext . Msg . show ( { title : '警告' , msg : '主提单号不能为空!' , icon : Ext . Msg . WARNING , buttons : Ext . Msg . OK } ) ; //'主提单号不能为空!'
return ;
}
var BSNO = this . formEdit . getForm ( ) . findField ( 'gId' ) . getValue ( ) ;
Ext . Msg . wait ( '正在提取数据, 请稍侯..' ) ;
var storeyardctn = Ext . create ( 'Ext.data.Store' , {
model : 'MsOpSeaeDetail' ,
remoteSort : true ,
proxy : {
type : 'ajax' ,
timeout : 6000000 , //60秒,
url : '/MvcShipping/MsOpSeae/GetyardctnList' ,
reader : {
id : 'BSNO,CTNCODE,CTN_ID' ,
root : 'data' ,
totalProperty : 'totalCount'
}
}
} ) ;
storeyardctn . load ( {
params : { bs : BSNO , mblno : MBLNO , yard : YARD } ,
timeout : 6000000 , //60秒,
callback : function ( r , options , success ) {
if ( success ) {
var jsonresult = Ext . JSON . decode ( options . response . responseText ) ;
if ( storeyardctn . getCount ( ) > 0 ) {
var member = storeyardctn . getAt ( 0 ) ;
var sVESSEL = "" ;
var sVOYNO = "" ;
var bodydatas = [ ] ;
for ( var j = 0 ; j < storeyardctn . getCount ( ) ; j += 1 ) {
var member = storeyardctn . getAt ( j ) ;
var WEIGHDATE = member . data . WEIGHDATE ;
if ( WEIGHDATE != '' )
WEIGHDATE = Ext . util . Format . date ( WEIGHDATE , 'Y-m-d' ) ;
member . data . WEIGHDATE = WEIGHDATE ;
var TIXIANGSHIJIAN = member . data . TIXIANGSHIJIAN ;
if ( TIXIANGSHIJIAN != '' )
TIXIANGSHIJIAN = Ext . util . Format . date ( TIXIANGSHIJIAN , 'Y-m-d' ) ;
member . data . TIXIANGSHIJIAN = TIXIANGSHIJIAN ;
if ( member . data . TAREWEIGHT == '' ) member . data . TAREWEIGHT = '0' ;
bodydatas . push ( member ) ;
} ;
var jsonBody = ConvertRecordsToJsonAll ( bodydatas ) ;
Ext . Msg . wait ( '正在保存数据, 请稍侯..' ) ;
Ext . Ajax . request ( {
waitMsg : '正在保存数据...' ,
url : '/TruckMng/PcHeadEdit_WFSD/CreateHYRDFen' ,
scope : this ,
params : {
bsno : BSNO ,
ctnbody : jsonBody
} ,
callback : function ( options , success , response ) {
if ( success ) {
Ext . MessageBox . hide ( ) ;
var jsonresult = Ext . JSON . decode ( response . responseText ) ;
if ( jsonresult . Success ) {
Ext . Msg . show ( { title : '提示' , msg : jsonresult . Message , icon : Ext . Msg . INFO , buttons : Ext . Msg . OK } ) ;
} else {
Ext . Msg . show ( { title : '错误' , msg : jsonresult . Message , icon : Ext . Msg . ERROR , buttons : Ext . Msg . OK } ) ;
}
} else {
Ext . Msg . show ( {
title : '请重试' ,
msg : '服务器响应出错' ,
icon : Ext . Msg . ERROR , buttons : Ext . Msg . OK
} ) ;
}
}
} ) ;
//
//
} else {
if ( jsonresult . Success ) {
Ext . Msg . show ( { title : '警告' , msg : '没有提取的相关数据!' , icon : Ext . Msg . WARNING , buttons : Ext . Msg . OK } ) ; //'没有提取的相关数据!'
} else
Ext . Msg . show ( { title : '警告' , msg : jsonresult . Message , icon : Ext . Msg . WARNING , buttons : Ext . Msg . OK } ) ;
}
}
else {
Ext . Msg . show ( { title : '警告' , msg : '服务器响应出错' , icon : Ext . Msg . ERROR , buttons : Ext . Msg . OK } ) ;
}
} ,
scope : this
} ) ;
} ,
onAddDetailClick : function ( button , event , type ) {
if ( this . modPcHeadEdit _GDFY == 0 ) {