Ext . namespace ( 'Shipping' ) ;
Shipping . MsOpSeaeTaskView = function ( config ) {
Ext . applyIf ( this , config ) ;
this . initUIComponents ( ) ;
window . Shipping . MsOpSeaeTaskView . superclass . constructor . call ( this ) ;
} ;
Ext . extend ( Shipping . MsOpSeaeTaskView , Ext . Panel , {
ParentWin : null ,
OpStatus : 'add' ,
StoreList : null ,
editRecord : null ,
Editdata : null ,
stroplb : '海运出口' ,
salefee : '1' ,
initUIComponents : function ( ) {
this . serialNo = 0 ;
//this.bodyDel = [];
this . itemindex = 1 ;
this . initloaddata = 0 ;
_this = this ;
//#region 信息加载
this . myCheckboxService = new Ext . form . CheckboxGroup ( {
id : 'myService' ,
xtype : 'checkboxgroup' ,
fieldLabel : '服务项目' ,
columns : 8 ,
items : [ {
boxLabel : '熏蒸' ,
inputValue : true ,
name : 'ISFUMIGATION' ,
id : 'ISFUMIGATION'
} , {
boxLabel : '仓储' ,
inputValue : true ,
name : 'ISSTORAGE' ,
id : 'ISSTORAGE'
} , {
boxLabel : '陆运' ,
inputValue : true ,
name : 'ISLAND' ,
id : 'ISLAND'
} , {
boxLabel : '报关' ,
inputValue : true ,
name : 'ISCUSTOMS' ,
id : 'ISCUSTOMS'
} , {
boxLabel : '报检' ,
inputValue : true ,
name : 'ISINSPECTION' ,
id : 'ISINSPECTION'
} , {
boxLabel : '订舱' ,
inputValue : true ,
name : 'ISBOOKING' ,
id : 'ISBOOKING'
} , {
boxLabel : '使用代理' ,
inputValue : true ,
name : 'ISAGENT' ,
id : 'ISAGENT'
} , {
boxLabel : '分单签单' ,
inputValue : true ,
name : 'ISHBLNO' ,
id : 'ISHBLNO'
}
]
} ) ;
//#endregion
//#region 编辑formHead 基本信息
this . formHead = Ext . widget ( 'form' , {
region : 'north' ,
frame : true ,
bodyPadding : 5 ,
// collapsed: false,
// collapsible: true,
trackResetOnLoad : true ,
fieldDefaults : {
margins : '2 2 2 2' ,
labelAlign : 'right' ,
flex : 1 ,
labelWidth : 70 ,
msgTarget : 'qtip'
} ,
items : [ {
xtype : 'container' ,
layout : 'hbox' ,
defaultType : 'textfield' ,
items : [ {
fieldLabel : '业务编号' ,
name : 'BSNO' , hidden : true
} , {
fieldLabel : 'MASTERNO' , //'业务编号',
name : 'MASTERNO' , hidden : true
} , {
fieldLabel : 'CREATETIME' , //'CREATETIME',
name : 'CREATETIME' , hidden : true
} , {
fieldLabel : 'INPUTBY' ,
name : 'INPUTBY' , hidden : true
} , {
fieldLabel : 'CNTRTOTAL' , //'CNTRTOTAL',
name : 'CNTRTOTAL' , hidden : true
} , {
fieldLabel : 'MSHIPPERID' , //'MSHIPPERID',
name : 'MSHIPPERID' , hidden : true
} , {
fieldLabel : 'MCONSIGNEEID' , //'MCONSIGNEEID',
name : 'MCONSIGNEEID' , hidden : true
} , {
fieldLabel : 'MNOTIFYPARTYID' , //'MNOTIFYPARTYID',
name : 'MNOTIFYPARTYID' , hidden : true
} , {
fieldLabel : 'MSHIPPER' , //'MSHIPPER',
xtype : 'textareafield' ,
name : 'MSHIPPER' , hidden : true
} , {
fieldLabel : 'MCONSIGNEE' , //'MCONSIGNEE',
xtype : 'textareafield' ,
name : 'MCONSIGNEE' , hidden : true
} , {
fieldLabel : 'MNOTIFYPARTY' , //'MNOTIFYPARTY',
xtype : 'textareafield' ,
name : 'MNOTIFYPARTY' , hidden : true
} , {
fieldLabel : 'MBLFRT' , //'MBLFRT',
name : 'MBLFRT' , hidden : true
} , {
fieldLabel : 'SALEDEPT' , //'SALEDEPT',
name : 'SALEDEPT' , hidden : true
} , {
fieldLabel : '业务锁定' ,
disabled : true ,
readOnly : true ,
name : 'BSSTATUSREF'
} , {
fieldLabel : '费用锁定' ,
readOnly : true ,
disabled : true ,
name : 'FEESTATUSREF'
} , {
fieldLabel : '会计期间' ,
xtype : 'monthfield' ,
name : 'ACCDATE'
} , {
fieldLabel : '业务来源' , //'发票号',
name : 'BSSOURCE'
} , {
fieldLabel : '来源明细' , //'发票号',
name : 'BSSOURCEDETAIL'
} , {
fieldLabel : '结算方式' ,
// flex: 0.5,
name : 'STLNAME'
} , {
fieldLabel : '结算日期' , //'结算日期', readOnly: true,
format : 'Y-m-d' ,
// flex: 0.5,
xtype : 'datefield' ,
name : 'STLDATE' , id : "STLDATE"
} ]
} , {
xtype : 'container' ,
layout : 'hbox' ,
defaultType : 'textfield' ,
items : [ {
fieldLabel : '委托单位' , //'发票号',
name : 'CUSTOMERNAME'
} , {
fieldLabel : '船公司' , //'发票号',
name : 'CARRIER'
} , {
fieldLabel : '订舱代理' , //'发票号',
name : 'FORWARDER'
} , {
fieldLabel : '场站' , //'发票号',
name : 'YARD'
} , {
fieldLabel : '车队' , //'发票号',
name : 'TRUCKER'
} , {
fieldLabel : '发票号' , //'发票号',
name : 'INVNO'
} , {
fieldLabel : '申请放箱号' , //'申请放箱号',
name : 'APPLYNO'
} ]
} , {
xtype : 'container' ,
layout : 'hbox' ,
defaultType : 'textfield' ,
items : [ {
fieldLabel : '操作' , //'发票号',
name : 'OP'
} , {
fieldLabel : '销售' , //'发票号',
name : 'SALE'
} , {
fieldLabel : '单证' , //'发票号',
name : 'DOC'
} , {
fieldLabel : '客服' , //'发票号',
name : 'CUSTSERVICE'
} , {
fieldLabel : '分提单号' ,
name : 'HBLNO'
} , {
fieldLabel : '运费协议号' , //'运费协议号',
name : 'CONTRACTNO'
} , {
fieldLabel : '服务合同号' ,
name : 'SERVICECONTRACTNO'
} ]
} , {
xtype : 'container' ,
layout : 'hbox' ,
defaultType : 'textfield' ,
items : [ {
fieldLabel : '委托编号' ,
allowBlank : true ,
name : 'CUSTNO'
} , {
fieldLabel : '订舱编号' ,
name : 'ORDERNO'
} , {
fieldLabel : '主提单号' ,
name : 'MBLNO'
} , {
xtype : 'hiddenfield' ,
flex : 4
} ]
} , {
xtype : 'container' ,
layout : 'hbox' ,
defaultType : 'textfield' ,
items : [ {
fieldLabel : 'BC报文对比结果' ,
labelWidth : 100 ,
// flex: 4,
name : 'BCREMARK'
} ]
}
] //end items(fieldset 1)
} ) ; //end this.formEdit
//#endregion
//#region 集装箱-数据集
this . storeBodyList = Ext . create ( 'Ext.data.Store' , {
model : 'MsOpSeaeDetail' ,
remoteSort : true ,
proxy : {
type : 'ajax' ,
url : '/MvcShipping/MsOpSeae/GetBodyList' ,
reader : {
id : 'BsNo,CTNCODE,CTN_ID' ,
root : 'data' ,
totalProperty : 'totalCount'
}
}
} ) ;
//明细表表格
this . gridListCellEditing = Ext . create ( 'Ext.grid.plugin.CellEditing' , {
clicksToEdit : 1
} ) ;
this . gridList = new Ext . grid . GridPanel ( {
store : this . storeBodyList ,
enableHdMenu : false ,
region : 'center' ,
loadMask : { msg : "数据加载中,请稍等..." } ,
trackMouseOver : true ,
disableSelection : false ,
plugins : [ this . gridListCellEditing ] ,
selType : 'cellmodel' ,
columns : [ {
sortable : true ,
dataIndex : 'CTN_ID' ,
header : '编号' ,
hidden : true ,
width : 0
} , {
sortable : true ,
dataIndex : 'BSNO' ,
header : '业务编号' ,
hidden : true ,
width : 0
} , {
sortable : true ,
dataIndex : 'CTNCODE' ,
header : '序号' ,
width : 30
} , {
dataIndex : 'CTNALL' ,
header : '箱型' ,
width : 48 ,
editor : this . comboxCTNALL
} , {
dataIndex : 'CTNNUM' ,
header : '箱量' ,
width : 30 ,
editor : {
xtype : 'numberfield' ,
allowBlank : false ,
selectOnFocus : true
}
} , {
dataIndex : 'CNTRNO' ,
header : '箱号' ,
width : 100 ,
editor : {
xtype : 'textfield' ,
selectOnFocus : true
}
} , {
dataIndex : 'SEALNO' ,
header : '封号' ,
width : 65 ,
editor : {
xtype : 'textfield' ,
selectOnFocus : true
}
} , {
sortable : true ,
dataIndex : 'PKGS' ,
header : '件数' ,
width : 60 ,
editor : {
xtype : 'numberfield' ,
allowBlank : false ,
selectOnFocus : true
}
} , {
dataIndex : 'KINDPKGS' ,
header : '包装' ,
width : 70 ,
editor : this . comboxKINDPKGS _CTN
} , {
dataIndex : 'KGS' ,
header : '重量' ,
width : 60 ,
editor : {
xtype : 'textfield' ,
selectOnFocus : true
}
} , {
dataIndex : 'CBM' ,
header : '尺码' ,
width : 60 ,
editor : {
xtype : 'textfield' ,
selectOnFocus : true
}
} , {
dataIndex : 'TAREWEIGHT' ,
header : '箱皮重' ,
width : 60 ,
editor : {
xtype : 'textfield' ,
selectOnFocus : true
}
} , {
dataIndex : 'REMARK' ,
header : '备注' ,
width : 150 ,
editor : {
xtype : 'textfield' ,
selectOnFocus : true
}
} ]
} ) ;
//#endregion
//#region 数据集
this . panelBodyCtn = new Ext . Panel ( {
title : '集装箱信息' ,
layout : "border" ,
height : 170 ,
//margin: '5 10',
frame : true ,
items : [ this . gridList ]
} ) ;
this . StoreTemp = Ext . create ( 'Ext.data.Store' , {
fields : [ 'ID' , 'NAME' ]
} ) ;
this . StoreTemp . add ( { "ID" : "C" , "NAME" : "C摄氏" } ) ;
this . StoreTemp . add ( { "ID" : "F" , "NAME" : "F华氏" } ) ;
this . comboxTemp = Ext . create ( 'DsExt.ux.RefTableCombox' , {
store : this . StoreTemp ,
fieldLabel : '温度单位' ,
forceSelection : true ,
name : 'TEMPID' ,
valueField : 'ID' ,
displayField : 'NAME'
} ) ;
this . StoreCargoid = Ext . create ( 'Ext.data.Store' , {
fields : [ 'ID' , 'NAME' ]
} ) ;
this . StoreCargoid . add ( { "ID" : "S" , "NAME" : "S普通货" } ) ;
this . StoreCargoid . add ( { "ID" : "R" , "NAME" : "R冻柜" } ) ;
this . StoreCargoid . add ( { "ID" : "D" , "NAME" : "D危险品" } ) ;
this . StoreCargoid . add ( { "ID" : "O" , "NAME" : "O超限箱" } ) ;
this . comboxCargoid = Ext . create ( 'DsExt.ux.RefTableCombox' , {
store : this . StoreCargoid ,
fieldLabel : "<a><font color='#FF0000'>货物标示</font></a>" ,
forceSelection : true ,
name : 'CARGOID' ,
valueField : 'ID' ,
displayField : 'NAME'
} ) ;
//#endregion
//#region 编辑formEdit 基本信息
this . formEdit = Ext . widget ( 'form' , {
region : 'west' ,
width : 680 ,
height : 1000 ,
frame : true ,
bodyPadding : 5 ,
layout : 'anchor' ,
trackResetOnLoad : true ,
fieldDefaults : {
margins : '2 2 2 2' ,
labelAlign : 'right' ,
flex : 1 ,
labelWidth : 70 ,
msgTarget : 'qtip'
} ,
items : [ {
xtype : 'fieldset' ,
defaultType : 'textfield' ,
layout : 'hbox' ,
defaults : {
anchor : '96%'
} ,
items : [ {
xtype : 'container' ,
layout : 'anchor' ,
flex : 1 ,
defaultType : 'textfield' ,
items : [ {
xtype : 'textareafield' ,
grow : true ,
fieldLabel : '发货人' ,
labelWidth : 50 ,
height : 80 ,
name : 'SHIPPER' ,
anchor : '100%'
} , {
xtype : 'textareafield' ,
grow : true ,
fieldLabel : '收货人' ,
labelWidth : 50 ,
height : 80 ,
name : 'CONSIGNEE' ,
anchor : '100%'
} , {
xtype : 'textareafield' ,
grow : true ,
fieldLabel : '通知人' ,
labelWidth : 50 ,
height : 80 ,
name : 'NOTIFYPARTY' ,
anchor : '100%'
}
]
} , {
xtype : 'container' ,
layout : 'anchor' ,
flex : 1.2 ,
defaultType : 'textfield' ,
items : [ {
xtype : 'container' ,
layout : 'hbox' ,
flex : 1 ,
defaultType : 'textfield' ,
items : [ {
fieldLabel : '船名' ,
// flex: 1.5,
name : 'VESSEL'
} , {
fieldLabel : '航次' ,
// flex: 0.5,
name : 'VOYNO'
} ]
} , {
xtype : 'container' ,
defaultType : 'textfield' ,
layout : 'hbox' ,
items : [ {
fieldLabel : '开船日期' ,
format : 'Y-m-d' ,
flex : 1 ,
xtype : 'datefield' ,
name : 'ETD'
} , {
fieldLabel : '预抵日期' ,
format : 'Y-m-d' ,
flex : 1 ,
xtype : 'datefield' ,
name : 'ETA'
} ]
} , {
xtype : 'container' ,
layout : 'hbox' ,
flex : 1 ,
defaultType : 'textfield' ,
items : [ {
fieldLabel : '截港日期' ,
format : 'Y-m-d' ,
flex : 1 ,
xtype : 'datetimefield' ,
name : 'CLOSINGDATE'
} , {
fieldLabel : '截单日期' ,
format : 'Y-m-d' ,
flex : 1 ,
xtype : 'datetimefield' ,
name : 'CLOSEDOCDATE'
} ]
} , {
xtype : 'container' ,
layout : 'hbox' ,
flex : 1 ,
defaultType : 'textfield' ,
items : [ {
fieldLabel : '装货港' ,
name : 'PORTLOAD' ,
// flex: 1.5
} , {
fieldLabel : '装港代码' ,
// flex: 0.5,
name : 'PORTLOADID'
} ]
} , {
xtype : 'container' ,
layout : 'hbox' ,
flex : 1 ,
defaultType : 'textfield' ,
items : [ {
fieldLabel : '卸货港' ,
// flex: 1.5,
name : 'PORTDISCHARGE'
} , {
fieldLabel : '卸港代码' ,
// flex: 0.5,
name : 'PORTDISCHARGEID'
} ]
} , {
xtype : 'container' ,
layout : 'hbox' ,
flex : 1 ,
defaultType : 'textfield' ,
items : [ {
fieldLabel : '目的地' ,
// flex: 1.5,
name : 'DESTINATION'
} , {
fieldLabel : '目的代码' ,
// flex: 0.5,
name : 'DESTINATIONID'
} ]
} , {
xtype : 'container' ,
layout : 'hbox' ,
flex : 1 ,
defaultType : 'textfield' ,
items : [ {
fieldLabel : '交货地' ,
// flex: 1.5,
name : 'PLACEDELIVERY'
} , {
fieldLabel : '交货代码' ,
// flex: 0.5,
name : 'PLACEDELIVERYID'
} ]
} , {
xtype : 'container' ,
layout : 'hbox' ,
flex : 1 ,
defaultType : 'textfield' ,
items : [ {
fieldLabel : '收货地' ,
// flex: 1.5,
name : 'PLACERECEIPT'
} , {
fieldLabel : '收货代码' ,
// flex: 0.5,
name : 'PLACERECEIPTID'
} ]
} , {
xtype : 'container' ,
layout : 'hbox' ,
flex : 1 ,
defaultType : 'textfield' ,
items : [ {
fieldLabel : '件数' ,
name : 'PKGS'
} , {
fieldLabel : '包装' ,
name : 'KINDPKGS'
} ]
} , {
xtype : 'container' ,
layout : 'hbox' ,
flex : 1 ,
defaultType : 'textfield' ,
items : [ {
fieldLabel : '毛重' ,
name : 'KGS'
} , {
fieldLabel : '尺码' ,
name : 'CBM'
} ]
}
]
}
]
} , {
xtype : 'container' ,
layout : 'anchor' ,
flex : 1 ,
defaultType : 'textfield' ,
defaults : {
anchor : '99%'
} ,
items : [ {
xtype : 'container' ,
defaultType : 'textfield' ,
layout : 'hbox' ,
items : [ {
xtype : 'container' ,
layout : 'anchor' ,
flex : 1 ,
defaultType : 'textfield' ,
items : [ {
xtype : 'label' ,
html : '<html>Seal No.(封志号)<br> Marks & Nos.(标记与号码) </html>'
} , {
xtype : 'textareafield' ,
grow : true ,
height : 120 ,
name : 'MARKS' ,
anchor : '100%'
}
]
} , {
xtype : 'container' ,
layout : 'anchor' ,
flex : 3 ,
defaultType : 'textfield' ,
items : [ {
xtype : 'container' ,
defaultType : 'textfield' ,
layout : 'hbox' ,
defaults : {
anchor : '100%'
} ,
items : [ {
xtype : 'label' ,
html : '<html>     Description of Goods <br>     (包装种类与货名)</html>'
} , this . comboxGOODSNAME , this . comboxCargoid , {
fieldLabel : 'HS编码' ,
name : 'HSCODE'
} ]
} , {
xtype : 'textareafield' ,
grow : true ,
fieldLabel : '  ' ,
labelSeparator : '' ,
labelWidth : 20 ,
height : 120 ,
name : 'DESCRIPTION' ,
anchor : '100%'
} ]
}
]
} , {
xtype : 'container' ,
layout : 'hbox' ,
defaultType : 'textfield' ,
items : [ {
fieldLabel : '件数大写' ,
name : 'TOTALNO'
} ]
} , {
xtype : 'container' ,
defaultType : 'textfield' ,
layout : 'hbox' ,
items : [ {
fieldLabel : '签单方式' ,
labelWidth : 60 ,
name : 'ISSUETYPE'
} , {
fieldLabel : '签单日期' ,
labelWidth : 60 ,
format : 'Y-m-d' ,
xtype : 'datefield' ,
name : 'ISSUEDATE'
} , {
fieldLabel : '签单地点' ,
labelWidth : 60 ,
name : 'ISSUEPLACE'
} , {
fieldLabel : '代码' ,
labelWidth : 40 ,
flex : 0.5 ,
name : 'ISSUEPLACEID'
} , {
fieldLabel : '提单份数' ,
labelWidth : 60 ,
name : 'BLNUM'
} ]
} , {
xtype : 'container' ,
defaultType : 'textfield' ,
layout : 'hbox' ,
items : [ {
fieldLabel : '签单方式' ,
name : 'BLFRT'
} , {
fieldLabel : '预付地点' ,
name : 'PREPARDAT'
} , {
fieldLabel : '到付地点' ,
name : 'PAYABLEAT'
} , {
fieldLabel : '运输条款' ,
name : 'SERVICE'
} ]
} , {
xtype : 'container' ,
defaultType : 'textfield' ,
layout : 'hbox' ,
items : [ {
fieldLabel : '冷藏通风量' ,
name : 'REEFERF'
} , {
fieldLabel : '设置温度' ,
name : 'TEMPSET'
} , this . comboxTemp , {
fieldLabel : '最低温度' ,
name : 'TEMPMIN'
} , {
fieldLabel : '最高温度' ,
name : 'TEMPMAX'
} ]
} , {
xtype : 'container' ,
defaultType : 'textfield' ,
layout : 'hbox' ,
items : [ {
fieldLabel : '危险品等级' ,
flex : 1 ,
labelWidth : 70 ,
name : 'DCLASS'
} , {
fieldLabel : '危险品编号' ,
flex : 1 ,
labelWidth : 70 ,
name : 'DUNNO'
} , {
fieldLabel : '危险品页号' ,
flex : 1 ,
labelWidth : 70 ,
name : 'DPAGE'
} , {
fieldLabel : '危险品标签' ,
flex : 1 ,
labelWidth : 70 ,
name : 'DLABEL'
} , {
fieldLabel : '危险品联系人' ,
flex : 1 ,
labelWidth : 90 ,
name : 'LINKMAN'
} ]
} , {
xtype : 'container' ,
layout : 'hbox' ,
flex : 1 ,
defaultType : 'textfield' ,
items : [
{
xtype : 'textareafield' ,
grow : true ,
flex : 2 ,
fieldLabel : '备注' , //'备注',
height : 30 ,
name : 'REMARK' ,
anchor : '100%'
} , {
xtype : 'textareafield' ,
grow : true ,
fieldLabel : '其他备注' , //'备注',
height : 30 ,
name : 'OPERATORFAX' ,
anchor : '100%'
}
]
} ]
}
, this . panelBodyCtn
]
} ) ; //end this.formEdit
//#endregion
//#region 按钮Toolbar
this . panelBtn = new Ext . Panel ( {
region : "north" ,
tbar : [
'-' , {
text : "关闭" ,
handler : function ( button , event ) {
window . close ( ) ;
} ,
scope : this
} , {
text : "确认并完成" ,
iconCls : "btnadd" ,
handler : function ( button , event ) {
this . onUpTransStatusClick ( '确认并完成' ) ;
} ,
scope : this
} , '-' ,
{
text : "PENDING" ,
// iconCls: "btndelete",
handler : function ( button , event ) {
this . onUpTransStatusClick ( 'PENDING' ) ;
} ,
scope : this
} , '-' ,
{
text : "转发邮件" ,
id : 'btnUpTransStatus' ,
// iconCls: "btndelete",
handler : function ( button , event ) {
this . onUpTransStatusClick ( '转发邮件' ) ;
} ,
scope : this
} , '-' ,
{
text : "入货通知" ,
id : 'btnLetterYard' ,
handler : function ( button , event ) {
var openSet = "height=700, width=1024, toolbar=no, menubar=no,scrollbars=1, resizable=1,location=no, status=no,Top= " + ( screen . height - 750 ) / 2 + ",Left= " + ( screen . width - 1100 ) / 2
var openType = "_blank" ;
var openUrl = "" ;
openUrl = "../../MvcShipping/MsOpLetter/YardEdit?handle=check&bsno=" + this . editRecord . get ( 'BSNO' ) ;
window . open ( openUrl , openType , openSet ) ;
} ,
scope : this
} ,
'-' ,
{
text : "取消任务" ,
// iconCls: "btnsave",
handler : function ( button , event ) {
this . onUpTransStatusClick ( '取消任务' ) ;
} ,
scope : this
} ,
'-' , {
text : "打印" ,
iconCls : "btnprint" ,
handler : function ( button , event ) {
this . Print ( ) ;
} ,
scope : this
} ]
} ) ; //end 按钮Toolbar
//#endregion
//#region 框架结构
//#region 编辑formedi edi信息
//#endregion
this . storeCrChFee = Ext . create ( 'Ext.data.Store' , {
model : 'MsChFee' ,
remoteSort : false ,
proxy : {
type : 'ajax' ,
url : '/MvcShipping/MsChFee/GetEdiDataList' ,
reader : {
id : 'GId' ,
root : 'data' ,
totalProperty : 'totalCount'
}
}
} ) ;
this . storeOrderChFee = Ext . create ( 'Ext.data.Store' , {
model : 'MsChFee' ,
remoteSort : false ,
proxy : {
type : 'ajax' ,
url : '/MvcShipping/MsChFee/GetOrderFeeList' ,
reader : {
id : 'GId' ,
root : 'data' ,
totalProperty : 'totalCount'
}
}
} ) ;
this . initgirdCrcolums = [ {
sortable : true ,
dataIndex : 'GId' ,
header : '惟一编号' ,
hidden : true ,
width : 160
} , {
sortable : true ,
dataIndex : 'BsNo' ,
header : '业务编号' ,
hidden : true ,
width : 200
}
, {
sortable : true ,
dataIndex : 'FeeName' ,
header : '费用名称' ,
width : 100
} , {
sortable : true ,
dataIndex : 'FeeDescription' ,
header : '费用英文名称' ,
width : 100
} , {
sortable : true ,
dataIndex : 'CustomerName' ,
header : '结算对象' ,
width : 120
} , {
sortable : true ,
dataIndex : 'Unit' ,
header : '单位标准' ,
width : 60
} , {
sortable : true ,
dataIndex : 'TaxUnitPrice' ,
header : '单价' ,
align : 'right' ,
width : 80
} , {
sortable : true ,
dataIndex : 'Quantity' ,
header : '数量' ,
width : 60
} , {
sortable : true ,
dataIndex : 'Amount' ,
header : '金额' ,
align : 'right' ,
width : 80
} , {
sortable : true ,
dataIndex : 'Currency' ,
header : '币别' ,
width : 40
} , {
sortable : true ,
dataIndex : 'ExChangerate' ,
header : '汇率' ,
align : 'right' ,
width : 60
} , {
sortable : true ,
dataIndex : 'Remark' ,
header : '备注' ,
width : 150
} , {
sortable : true ,
dataIndex : 'FeeFrt' ,
header : 'FRT' ,
width : 40
} , {
sortable : true ,
dataIndex : 'OpName' ,
header : '录入人' ,
width : 60
} , {
sortable : true ,
dataIndex : 'EnterDate' ,
header : '录入日期' ,
renderer : Ext . util . Format . dateRenderer ( 'Y-m-d' ) ,
width : 80
}
] ;
this . girdCrcolums = this . initgirdCrcolums ;
this . gridCrChFee = new Ext . grid . GridPanel ( {
store : this . storeCrChFee ,
enableHdMenu : false ,
region : 'center' ,
//layout: "border",
anchor : '100% 30%' ,
// height:200,
loadMask : { msg : "数据加载中,请稍等..." } ,
trackMouseOver : true ,
disableSelection : false ,
//plugins: [this.cellEditingCrChFee],
//selModel: this.feeCrGridCheckBoxModel,
selType : 'cellmodel' ,
viewConfig : {
autoFill : true ,
getRowClass : function ( record , rowIndex , rowParams , store ) {
var feeStatus = record . get ( 'FeeStatus' ) ;
return Shipping . FeeGetRowClass ( feeStatus ) ;
}
} ,
tbar : [ {
xtype : 'label' ,
text : '应付费用' , //'应收费用',
style : 'font-size:18px' ,
labelColor : '#000' ,
//style:'background-color: #4b9bf5',
x : '5%' ,
y : '5%'
}
, { xtype : 'label' , text : 'RMB合计:' } , { xtype : 'label' , id : 'lb_rmbhx' , text : '0' } , '-'
, { xtype : 'label' , text : 'USD合计:' } , { xtype : 'label' , id : 'lb_usdhx' , text : '0' } , '-'
, { xtype : 'label' , text : '其他币别合计:' } , { xtype : 'label' , id : 'lb_othx' , text : '0' } , '-'
, { xtype : 'label' , text : '总合计:' } , { xtype : 'label' , id : 'lb_zhx' , text : '0' } , '-'
, {
text : '查看原票费用' ,
tooltip : '查看原票费用' , //'添加应收费用',
handler : function ( button , event ) {
var openSet = "height=700, width=1024, toolbar=no, menubar=no,scrollbars=1, resizable=1,location=no, status=no,Top= " + ( screen . height - 750 ) / 2 + ",Left= " + ( screen . width - 1100 ) / 2
var openType = "_blank" ;
var openUrl = "" ;
openUrl = "../../MvcShipping/MsOpBill/MsOpFeeView?handle=check&bsno=" + _this . editRecord . get ( 'BSNO' ) ;
window . open ( openUrl , openType , openSet ) ;
} ,
scope : this
} ] ,
columns : this . girdCrcolums
} ) ;
///选中时 标红下方的相同金额的费用
this . gridCrChFee . getSelectionModel ( ) . on ( 'select' , function ( model , record , index ) {
var Amount = record . data . Amount ;
for ( i = 0 ; i < this . panelFee . storeCrChFee . getCount ( ) ; i += 1 ) {
var memberyf = this . panelFee . storeCrChFee . getAt ( i ) ;
//var recchange = memberyf.getChanges();
if ( ( Amount != '' ) && ( memberyf . data . Amount == Amount ) ) {
memberyf . set ( "ISSEL" , '1' ) ;
memberyf . commit ( ) ;
continue ;
} else {
memberyf . set ( "ISSEL" , '0' ) ;
}
//if (isEmptyObject(recchange)) memberyf.commit();
} ;
} , this ) ;
this . panelFee = new Shipping . FeeViewGrid ( {
region : 'center' , hidden : true ,
layout : "border" ,
anchor : '100% 70%'
} ) ;
this . panelpdf = new Ext . Panel ( {
title : 'PDF信息' ,
layout : "border" ,
region : 'center' ,
height : 1000 ,
visible : true ,
// items: [this.gridCrChFee],
// html: '<iframe src="../../../../images/11111.pdf" frameborder="0" width="100%" height="100%"></iframe>',
animate : true ,
frame : true
} ) ;
Ext . define ( 'MsOpTaskFieldValue' , {
extend : 'Ext.data.Model' ,
idProperty : 'GID' ,
fields : [
{ name : 'GID' , type : 'string' } ,
{ name : 'TASKNO' , type : 'string' } ,
{ name : 'FEILDNAME' , type : 'string' } ,
{ name : 'FEILDVALUE' , type : 'string' }
]
} ) ;
this . storeTaskFieldValueList = Ext . create ( 'Ext.data.Store' , {
pageSize : 100 ,
model : 'MsOpTaskFieldValue' ,
remoteSort : true ,
proxy : {
type : 'ajax' ,
url : '/MvcShipping/MsOpTask/GetTaskFieldValueDataList' ,
reader : {
id : 'GID' ,
root : 'data' ,
totalProperty : 'totalCount'
}
}
} ) ;
this . girdcolums = [ {
sortable : true ,
dataIndex : 'GID' ,
header : 'GID' ,
hidden : true ,
width : 150
} , {
sortable : true ,
dataIndex : 'TASKNO' ,
header : '业务编号' ,
hidden : true ,
width : 150
} , {
sortable : true ,
dataIndex : 'FEILDNAME' ,
header : '字段' ,
width : 150
} , {
sortable : true ,
dataIndex : 'FEILDVALUE' ,
header : '新值' ,
width : 250
}
] ;
//定义Grid
this . gridTaskFieldValueList = new Ext . grid . GridPanel ( {
store : this . storeTaskFieldValueList ,
enableHdMenu : false ,
tbar : [ {
text : '更新业务数据' ,
handler : function ( button , event ) {
this . uptaskbs ( ) ;
} ,
scope : this
} ] ,
region : 'center' ,
loadMask : { msg : "数据加载中,请稍等..." } ,
trackMouseOver : true ,
disableSelection : false ,
selType : 'cellmodel' ,
columns : this . girdcolums ,
bbar : Ext . create ( 'Ext.PagingToolbar' , {
store : this . storeList ,
displayInfo : true ,
displayMsg : '当前显示 {0} - {1}条记录 /共 {2}条记录' ,
emptyMsg : "没有数据"
} )
} ) ;
this . storeTaskFieldValueList . on ( 'beforeload' , function ( store ) {
var sql = "TASKNO='" + this . editRecord . get ( 'TASKNO' ) . toString ( ) + "'" ;
Ext . apply ( store . proxy . extraParams , { condition : sql } ) ;
} , this ) ;
this . panelfee = new Ext . Panel ( {
title : '费用信息' ,
layout : "anchor" ,
// region: 'north',
// height: 560,
region : 'center' ,
height : 300 ,
visible : true ,
items : [ this . gridCrChFee , this . panelFee ] ,
// html: '<iframe src="../../../../images/11111.pdf" frameborder="0" width="100%" height="100%"></iframe>',
animate : true ,
frame : true
} ) ;
this . panelFieldValue = new Ext . Panel ( {
title : '比对不同信息' ,
layout : "anchor" ,
// region: 'north',
// height: 560,
region : 'center' ,
height : 300 ,
visible : true ,
items : [ this . gridTaskFieldValueList ] ,
// html: '<iframe src="../../../../images/11111.pdf" frameborder="0" width="100%" height="100%"></iframe>',
animate : true ,
frame : true
} ) ;
this . tabSeaepanel = new Ext . TabPanel ( {
activeTab : 0 ,
autoWidth : true ,
border : true ,
frame : false ,
region : 'center' ,
enableTabScroll : true ,
items :
[
this . panelpdf ,
this . panelfee ,
this . panelFieldValue
]
} ) ;
this . panelpage = new Ext . Panel ( {
// title: '委托详细信息',
layout : "border" ,
region : 'north' ,
animate : true ,
height : 1200 ,
// autoScroll: true,
// containerScroll: true,
frame : false ,
items : [ this . formEdit , this . tabSeaepanel ]
} ) ;
//this.tabSeaeWTpanel = new Ext.TabPanel({
// activeTab: 0,
// autoWidth: true,
// border: true,
// frame: false,
// region: 'center',
// enableTabScroll: true,
// items:
// [
// this.panelpage
// ]
//});
this . panelSeae = new Ext . Panel ( {
// title: '委托信息',
layout : "border" ,
region : 'center' ,
animate : true ,
autoScroll : true ,
frame : false ,
//closable:true,
items : [ this . formHead , this . panelpage ]
} ) ;
//this.tabSeaepanel = new Ext.TabPanel({
// activeTab: 0,
// autoWidth: true,
// border: true,
// frame: false,
// region: 'center',
// enableTabScroll: true,
// items:
// [
// this.panelSeae
// ]
//});
Ext . apply ( this , {
items : [ this . panelBtn , this . panelSeae ]
} ) ;
//#endregion
//#region 其他
parentWin = window . parent . opener . _this ;
this . InitData ( ) ;
//绑定事件
this . gridList . on ( 'edit' , function ( editor , e , eOpts ) {
this . gridAfterEdit ( editor , e , eOpts ) ;
} , this ) ;
//#endregion
} , //end initUIComponents
//#region 加载事件
InitData : function ( ) {
this . opStatus = 'add' ;
var condition = '' ;
_this = this ;
if ( parentWin ) {
var ret = parentWin . OprationSwap ( ) ;
this . opStatus = ret [ 0 ] ;
this . StoreList = ret [ 1 ] ;
this . editRecord = ret [ 2 ] ;
}
if ( this . opStatus == 'edit' ) {
condition = "BSNO='" + this . editRecord . get ( 'BSNO' ) + "'" ;
//this.storeBodyList.load({ params: { condition: condition} });
}
this . LoadData ( this . opStatus , condition ) ;
} , //end InitData
LoadData : function ( opstatus , condition ) {
this . serialNo = 0 ;
//this.bodyDel = [];
this . opStatus = opstatus ;
if ( this . opStatus == 'edit' ) {
var sMBLNO = this . editRecord . get ( 'MBLNO' ) . toString ( ) . trim ( ) ;
document . title = "海运出口-主提单号:" + this . editRecord . get ( 'MBLNO' ) . toString ( ) . trim ( ) ;
var tasktype = this . editRecord . get ( 'TASKTYPE' ) . toString ( ) . trim ( ) ;
var BSNO = this . editRecord . get ( 'BSNO' ) . toString ( ) . trim ( ) ;
this . panelFee . hide ( ) ;
_this = this ;
if ( tasktype == 'INVOIC' ) {
Ext . getCmp ( 'btnUpTransStatus' ) . disable ( ) ;
this . tabSeaepanel . remove ( this . panelpdf ) ;
// this.panelpdf.update('<iframe src="' + this.editRecord.get('FILEPATH').toString().trim() + '" frameborder="0" width="100%" height="100%"></iframe>');
this . storeCrChFee . load (
{
params : { condition : "reportid='" + this . editRecord . get ( 'TASKNO' ) . toString ( ) . trim ( ) + "'" }
}
) ;
this . gridCrChFee . anchor = '100% 100%' ;
}
else if ( tasktype == '外运账单' ) {
Ext . getCmp ( 'btnUpTransStatus' ) . disable ( ) ;
this . tabSeaepanel . remove ( this . panelpdf ) ;
_this = this ;
this . storeCrChFee . load ( {
params : { condition : "reportid='" + this . editRecord . get ( 'TASKNO' ) . toString ( ) . trim ( ) + "'" }
,
callback : function ( options , success , response ) {
if ( success ) {
_this . SetDiffFee ( ) ;
_this . SetHX ( ) ;
}
}
} ) ;
oplb = 'op_Seae' ;
oplbdrOp = 'modRecvFeeManagement' ;
oplbCrOp = 'modPayFeeManagement' ;
this . panelFee . stroplb = oplb ;
this . panelFee . strBSNO = BSNO ;
this . panelFee . StoreDrOpRange . load ( { params : { optype : oplbdrOp } } ) ;
this . panelFee . StoreCrOpRange . load ( { params : { optype : oplbCrOp } } ) ;
this . panelFee . storeDrChFee . load ( { params : { billno : BSNO , type : 1 , optype : oplb } } ) ;
this . panelFee . storeCrChFee . load ( {
params : { billno : BSNO , type : 2 , optype : oplb , condition : "bsno in(select bsno from v_op_bill where bsno='" + BSNO + "' or PARENTID = '" + BSNO + "') and CUSTOMERNAME in (select forwarder from v_op_bill where bsno='" + BSNO + "')" }
,
callback : function ( options , success , response ) {
if ( success ) {
_this . SetDiffFee ( ) ;
}
}
} ) ;
this . panelFee . storeBodySum . load ( { params : { bsno : BSNO , optype : oplb } } ) ;
this . panelFee . storeChFeeGain . load ( { params : { bsno : BSNO , optype : oplb } } ) ;
this . panelFee . panelCrChFee . anchor = '100% 100%' ;
this . panelFee . panelDrChFee . hide ( ) ;
this . panelFee . show ( ) ;
} else if ( tasktype == '费用账单' ) {
Ext . getCmp ( 'btnUpTransStatus' ) . disable ( ) ;
this . tabSeaepanel . remove ( this . panelpdf ) ;
_this = this ;
this . storeOrderChFee . load ( {
params : { condition : "BSNO='" + this . editRecord . get ( 'TASKNO' ) . toString ( ) . trim ( ) + "'" }
,
callback : function ( options , success , response ) {
if ( success ) {
//_this.SetDiffFee();
//_this.SetHX();
}
}
} ) ;
_this . gridCrChFee . reconfigure ( _this . storeOrderChFee , this . girdCrcolums ) ;
oplb = 'op_Seae' ;
oplbdrOp = 'modRecvFeeManagement' ;
oplbCrOp = 'modPayFeeManagement' ;
this . panelFee . stroplb = oplb ;
this . panelFee . strBSNO = BSNO ;
this . panelFee . StoreDrOpRange . load ( { params : { optype : oplbdrOp } } ) ;
this . panelFee . StoreCrOpRange . load ( { params : { optype : oplbCrOp } } ) ;
this . panelFee . storeDrChFee . load ( { params : { billno : BSNO , type : 1 , optype : oplb } } ) ;
this . panelFee . storeCrChFee . load ( {
params : { billno : BSNO , type : 2 , optype : oplb , condition : "bsno in(select bsno from v_op_bill where bsno='" + BSNO + "' or PARENTID = '" + BSNO + "') and CUSTOMERNAME in (select forwarder from v_op_bill where bsno='" + BSNO + "')" }
,
callback : function ( options , success , response ) {
if ( success ) {
_this . SetDiffFee ( ) ;
}
}
} ) ;
this . panelFee . storeBodySum . load ( { params : { bsno : BSNO , optype : oplb } } ) ;
this . panelFee . storeChFeeGain . load ( { params : { bsno : BSNO , optype : oplb } } ) ;
this . panelFee . panelCrChFee . anchor = '100% 100%' ;
this . panelFee . panelDrChFee . hide ( ) ;
this . panelFee . show ( ) ;
} else if ( tasktype == 'MSC BC' ) {
this . storeTaskFieldValueList . load ( ) ;
this . tabSeaepanel . remove ( this . panelfee ) ;
this . tabSeaepanel . remove ( this . panelpdf ) ;
}
else {
this . tabSeaepanel . remove ( this . panelfee ) ;
this . panelpdf . update ( '<iframe src="' + this . editRecord . get ( 'FILEPATH' ) . toString ( ) . trim ( ) + '" frameborder="0" width="100%" height="100%"></iframe>' ) ;
}
if ( this . editRecord . get ( 'TASKTYPE' ) . toString ( ) . trim ( ) == 'SEAWAY' ) {
Ext . getCmp ( 'btnUpTransStatus' ) . disable ( ) ;
}
if ( this . editRecord . get ( 'TASKTYPE' ) . toString ( ) . trim ( ) != 'BC' ) {
Ext . getCmp ( 'btnLetterYard' ) . disable ( ) ;
}
}
else {
document . title = "海运出口-新增" ;
}
Ext . Ajax . request ( {
waitMsg : '正在查询主表数据...' ,
url : '/MvcShipping/MsOpSeae/GetData' ,
params : {
handle : opstatus ,
condition : condition
} ,
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 ;
}
data = result . data ;
this . formHead . getForm ( ) . reset ( ) ;
this . formHead . getForm ( ) . setValues ( data ) ;
this . formEdit . getForm ( ) . reset ( ) ;
this . formEdit . getForm ( ) . setValues ( data ) ;
this . Editdata = data ;
} else {
Ext . MessageBox . alert ( '请求出现错误,请重试' , response . responseText ) ;
}
} ,
scope : this
} ) ;
var billno = '*' ;
var gid = '*' ;
if ( this . opStatus == 'edit' ) {
//billno = this.editRecord.get('BSNO');
//condition = "BSNO='" + this.editRecord.get('BSNO') + "'";
this . storeBodyList . load ( { params : { condition : condition } } ) ;
} else {
condition = "BSNO='xx'" ;
this . storeBodyList . load ( { params : { condition : condition } } ) ;
}
if ( this . editRecord . get ( 'TASKTYPE' ) . toString ( ) . trim ( ) == 'BC' || this . editRecord . get ( 'TASKTYPE' ) . toString ( ) . trim ( ) == 'BA' ) {
var bodydatas = [ ] ;
bodydatas . push ( this . editRecord ) ;
var jsonbodyAddDatas = ConvertRecordsToJsonAll ( bodydatas ) ;
Ext . Ajax . request ( {
waitMsg : '正在查询...' , //'正在查询委托编号状态...',
url : '/MvcShipping/MsOpTask/GetBcRemark' ,
params : {
data : jsonbodyAddDatas
} ,
callback : function ( options , success , response ) {
if ( success ) {
var result = Ext . JSON . decode ( response . responseText ) ;
if ( result . Success != true ) {
this . formHead . getForm ( ) . findField ( 'BCREMARK' ) . setValue ( '' ) ;
} else {
this . formHead . getForm ( ) . findField ( 'BCREMARK' ) . setValue ( result . Message ) ;
}
} else {
Ext . MessageBox . alert ( '请求出现错误,请重试' , response . responseText ) ;
}
} ,
scope : this
} ) ;
} else {
this . formHead . getForm ( ) . findField ( 'BCREMARK' ) . setValue ( '' ) ;
}
} , // end LoadDate
SetDiffFee : function ( ) {
_this = this ;
//this.storeCrChFee.each(function (uprec) {
// _this.panelFee.storeCrChFee.each(function (downrec) {
// if (uprec.Amount == downrec.Amount) {
// uprec.FeeStatus = "0";
// break;
// }
// });
//});
for ( var i = 0 ; i < this . storeCrChFee . getCount ( ) ; i ++ ) {
var uprec = this . storeCrChFee . getAt ( i ) ;
for ( j = 0 ; j < this . panelFee . storeCrChFee . getCount ( ) ; j ++ ) {
var downrec = this . panelFee . storeCrChFee . getAt ( j ) ;
if ( uprec . get ( "Amount" ) == downrec . get ( "Amount" ) ) {
uprec . set ( "FeeStatus" , 2 ) ;
break ;
}
}
}
} ,
SetHX : function ( ) {
var rmbhx = 0 ;
var usdhx = 0 ;
var othx = 0 ;
var zhx = 0 ;
for ( var i = 0 ; i < this . storeCrChFee . getCount ( ) ; i ++ ) {
var uprec = this . storeCrChFee . getAt ( i ) ;
if ( uprec . get ( "Currency" ) == "RMB" ) {
rmbhx = Add ( rmbhx , uprec . get ( "Amount" ) ) ;
zhx = Add ( zhx , uprec . get ( "Amount" ) ) ;
}
else
if ( uprec . get ( "Currency" ) == "USD" ) {
usdhx = Add ( usdhx , uprec . get ( "Amount" ) ) ;
zhx = Add ( zhx , Mul ( uprec . get ( "Amount" ) , uprec . get ( "ExChangerate" ) ) ) ;
}
else
{
othx = Add ( othx , uprec . get ( "Amount" ) ) ;
zhx = Add ( zhx , Mul ( uprec . get ( "Amount" ) , uprec . get ( "ExChangerate" ) ) ) ;
}
}
Ext . getCmp ( "lb_rmbhx" ) . setText ( rmbhx ) ;
Ext . getCmp ( "lb_usdhx" ) . setText ( usdhx ) ;
Ext . getCmp ( "lb_othx" ) . setText ( othx ) ;
Ext . getCmp ( "lb_zhx" ) . setText ( zhx ) ;
} ,
//#endregion
uptaskbs : function ( ) {
var BSNO = this . editRecord . get ( 'BSNO' ) . toString ( ) . trim ( ) ;
var bodydatas = [ ] ;
for ( var i = 0 ; i < this . storeTaskFieldValueList . getCount ( ) ; i += 1 ) {
var member = this . storeTaskFieldValueList . getAt ( i ) ;
bodydatas . push ( member ) ;
}
var jsonBody = ConvertRecordsToJsonAll ( bodydatas ) ;
Ext . Msg . wait ( '正在更新数据' ) ;
Ext . Ajax . request ( {
waitMsg : '正在更新数据' , //'正在保存数据...',
url : '/MvcShipping/MsOpTask/updatetaskbs' ,
scope : this ,
params : {
bsno : BSNO ,
body : 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
} ) ;
}
}
} ) ;
} ,
onUpTransStatusClick : function ( transstatus ) {
var bodydatas = [ ] ;
bodydatas . push ( this . editRecord ) ;
if ( bodydatas . length == 0 ) {
Ext . Msg . show ( { title : '提示' , msg : '没有需要更新的任务!' , icon : Ext . Msg . INFO , buttons : Ext . Msg . OK } ) ;
return ;
}
Ext . MessageBox . confirm ( '提示' , '确实要将选中任务的状态更改为<' + transstatus + '>吗?' , function ( btn ) {
if ( btn == 'yes' ) {
var jsonbodyAddDatas = ConvertRecordsToJsonAll ( bodydatas ) ;
Ext . Msg . wait ( '正在操作数据...' ) ;
Ext . Ajax . request ( {
waitMsg : '正在操作数据...' ,
url : '/MvcShipping/MsOpTask/UpTransStatusList' ,
params : {
data : jsonbodyAddDatas ,
transstatus : transstatus
} ,
callback : function ( options , success , response ) {
if ( success ) {
var jsonresult = Ext . JSON . decode ( response . responseText ) ;
if ( jsonresult . Success ) {
Ext . Msg . hide ( ) ;
}
else {
Ext . Msg . show ( { title : '错误' , msg : jsonresult . Message , icon : Ext . Msg . ERROR , buttons : Ext . Msg . OK } ) ;
}
}
} ,
failure : function ( response , options ) {
Ext . Msg . show ( { title : '警告' , msg : '服务器响应出错!' , icon : Ext . Msg . INFO , buttons : Ext . Msg . OK } ) ;
} ,
success : function ( response , options ) { } ,
scope : this
} ) ; //end Ext.Ajax.request
}
} , this ) ;
} ,
//#region 编辑时按钮等的状态
GetEditStatus : function ( ) {
} ,
GetStringNum : function ( str ) {
var num = 0 ;
if ( str == null || str == '' ) return num ;
if ( str . length == 0 ) return num ;
var if _find = false ;
var str _num = '' ;
for ( var i = 0 ; i < str . length ; i += 1 ) {
var member = str . substr ( i , 1 ) ;
if ( ( member == '0' ) || ( member == '1' ) || ( member == '2' ) || ( member == '3' )
|| ( member == '4' ) || ( member == '5' ) || ( member == '6' ) || ( member == '7' )
|| ( member == '8' ) || ( member == '9' ) || ( member == '.' ) || ( member == '-' ) ) {
if ( ! if _find ) {
str _num = str _num + member ;
}
} else {
if _find = true ;
}
}
return str _num ;
} ,
setSaveBtnStatus : function ( enable ) {
// var btnESave = Ext.getCmp('btnESave');
// var btnESaveAndClose = Ext.getCmp('btnESaveAndClose');
// var btnESaveAndNew = Ext.getCmp('btnESaveAndNew');
// var btnEAddDetail = Ext.getCmp('btnadddetail');
// var btnEDeleteDetail = Ext.getCmp('btndeldetail');
// var btnEUpDetail = Ext.getCmp('btnadddetail2');
// if (enable) {
// btnESave.enable();
// btnESaveAndClose.enable();
// btnEAddDetail.enable();
// btnEDeleteDetail.enable();
// btnEUpDetail.enable();
// } else {
// btnESave.disable();
// btnESaveAndClose.disable();
// btnEAddDetail.disable();
// btnEDeleteDetail.disable();
// btnEUpDetail.disable();
// }
} ,
//#endregion
//#region 打印
Print : function ( ) {
} ,
//#endregion
PrevRecord : function ( ) {
var j = this . StoreList . indexOf ( this . editRecord ) ;
if ( j == 0 ) {
Ext . Msg . show ( { title : '警告' , msg : '已是最前一票' , icon : Ext . Msg . ERROR , buttons : Ext . Msg . OK } ) ;
return ;
}
if ( j == this . StoreList . count ) {
Ext . Msg . show ( { title : '警告' , msg : '已是最后一票' , icon : Ext . Msg . ERROR , buttons : Ext . Msg . OK } ) ;
return ;
}
var children = this . tabSeaepanel . items ;
if ( children ) {
for ( var i = children . length - 1 , len = 0 ; i >= len ; i -- ) {
if ( children . items [ i ] . id ) {
if ( children . items [ i ] . id == 'pnlmodNewOpSeaeInfo' ) {
} else {
children . items [ i ] . close ( ) ;
}
}
}
}
this . tabSeaepanel . doLayout ( ) ;
j = j - 1 ;
this . editRecord = this . StoreList . getAt ( j ) ;
if ( this . opStatus == 'edit' ) {
condition = "BSNO='" + this . editRecord . get ( 'BSNO' ) + "'" ;
//this.storeBodyList.load({ params: { condition: condition} });
}
this . LoadData ( this . opStatus , condition ) ;
} ,
NextRecord : function ( ) {
var j = this . StoreList . indexOf ( this . editRecord ) ;
if ( j == ( this . StoreList . data . length - 1 ) ) {
Ext . Msg . show ( { title : '警告' , msg : '已是最后一票' , icon : Ext . Msg . ERROR , buttons : Ext . Msg . OK } ) ;
return ;
}
var children = this . tabSeaepanel . items ;
if ( children ) {
for ( var i = children . length - 1 , len = 0 ; i >= len ; i -- ) {
if ( children . items [ i ] . id ) {
if ( children . items [ i ] . id == 'pnlmodNewOpSeaeInfo' ) {
// this.tabSeaepanel.setActiveTab(i);
} else {
children . items [ i ] . close ( ) ;
}
}
}
}
this . tabSeaepanel . doLayout ( ) ;
j = j + 1 ;
this . editRecord = this . StoreList . getAt ( j ) ;
if ( this . opStatus == 'edit' ) {
condition = "BSNO='" + this . editRecord . get ( 'BSNO' ) + "'" ;
//this.storeBodyList.load({ params: { condition: condition} });
}
this . LoadData ( this . opStatus , condition ) ;
}
} ) ;