Ext . namespace ( 'Shipping' ) ;
Shipping . MsOpAiriIndex = function ( config ) {
Ext . applyIf ( this , config ) ;
this . initUIComponents ( ) ;
window . Shipping . MsOpAiriIndex . superclass . constructor . call ( this ) ;
} ;
Ext . extend ( Shipping . MsOpAiriIndex , Ext . Panel , {
PageSize : 100 ,
OprationStatus : null , //仅当弹出界面时使用
SelectedRecord : null ,
isShowAdvancedQuery : 0 , //是否显示高级查询面板
sqlcontext : '' ,
editype : '' ,
selectbsno : '' ,
sortfield : '' ,
sortdire : '' ,
id : "MainAiriPanel" ,
initUIComponents : function ( ) {
this . formname = "formMsOpAiriIndex" ; //页面名称
//定义数据集
this . storePLList = Ext . create ( 'Ext.data.Store' , {
model : 'MsOpAiriModel'
} ) ;
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/GetDataList' }
} ) ;
this . storeList = Ext . create ( 'Ext.data.Store' , {
pageSize : this . PageSize ,
model : 'MsOpAiriModel' ,
remoteSort : true ,
proxy : {
type : 'ajax' ,
url : '/MvcShipping/MsOpAiri/GetDataList' ,
reader : {
id : 'BSNO' ,
root : 'data' ,
totalProperty : 'totalCount'
}
}
} ) ;
//#region List列表显示信息
this . Pagenum = Ext . create ( 'Ext.form.field.Number' , {
name : 'bottles' ,
fieldLabel : '每页记录数' ,
labelAlign : 'right' ,
value : this . PageSize ,
maxValue : 100000 ,
width : 180 ,
minValue : 0 ,
listeners : {
specialkey : function ( field , e ) {
if ( e . getKey ( ) == e . ENTER ) {
_this . onRefreshClick ( ) ;
}
}
}
} ) ;
Ext . define ( 'Ext.grid.column.Actiontextcolumn' , {
extend : 'Ext.grid.column.Column' ,
alias : [ 'widget.actiontextcolumn' ] ,
defaultRenderer : function ( value ) {
var me = this ;
prefix = Ext . baseCSSPrefix ;
scope = me . origScope || me ;
// if (value == "") {
// }
// else
value = value + '<img role="button" src="' + ( me . icon || Ext . BLANK _IMAGE _URL )
+ '" class="' + this . iconCls + ' x-action-col-icon"/>' ;
// value = '<label class="x-action-col-icon">' + value + '</label><img role="button" src="' + (me.icon || Ext.BLANK_IMAGE_URL)
// + '" class="' + this.iconCls + ' x-action-col-icon"/>';
return value ;
} ,
processEvent : function ( type , view , cell , recordIndex , cellIndex , e , record , row ) {
var me = this ;
if ( type == 'click' ) {
me . handler . call ( me . scope || me . origScope || me , view , recordIndex , cellIndex , e , record , row ) ;
}
}
} ) ;
Ext . grid . RowNumberer = Ext . extend ( Ext . grid . RowNumberer , {
width : 30
} ) ;
_this = this ;
this . initgirdcolums = [ {
sortable : true ,
id : '' ,
dataIndex : 'BSNO' ,
header : '业务编号' ,
width : 0
} , {
sortable : true ,
id : '' ,
dataIndex : 'CUSTNO' ,
header : '委托编号' ,
width : 120 ,
renderer : function ( value , meta ) {
meta . tdCls = 'mblno' ;
btnurl = getGridCopyButton ( value ) ;
return btnurl + value ;
}
} , {
sortable : true ,
id : '' ,
dataIndex : 'ORDERNO' ,
header : '订舱编号' ,
width : 120
} , {
sortable : true ,
id : '' ,
dataIndex : 'ORDERTYPE' ,
header : '订舱方式' ,
width : 120
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'BSSTATUSREF' ,
header : '业务锁定' ,
align : 'center' ,
width : 60 ,
renderer : function ( value , cellmeta ) {
if ( value == '锁定' ) {
return "<img src='../../../../TruckMng/Content/Images/Lock.png' />" ;
}
}
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'FEESTATUSREF' ,
header : '费用锁定' ,
align : 'center' ,
width : 60 ,
renderer : function ( value , cellmeta ) {
if ( value == '锁定' ) {
return "<img src='../../../../TruckMng/Content/Images/Lock.png' />" ;
}
}
} , {
sortable : true ,
id : '' ,
dataIndex : 'BillFeeStatus' ,
header : '整票状态' , //'整票状态',
width : 60 ,
renderer : function ( value , meta ) {
if ( value == '0' ) {
return "未提交" ;
} else if ( value == '1' ) {
meta . tdCls = 'feestatus_refer' ;
return "整票提交" ;
} else if ( value == '2' ) {
meta . tdCls = 'feestatus_pass' ;
return "审核通过" ;
} else if ( value == '4' ) {
meta . tdCls = 'feestatus_nopass' ;
return "整票驳回" ;
} else {
return "" ;
}
}
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'DRFEESTATUS' ,
header : '应收费用' ,
align : 'center' ,
width : 60 ,
renderer : function ( value , meta ) {
if ( value == '审核通过' ) {
meta . tdCls = 'feestatus_pass' ;
} else if ( value == '录入状态' ) {
} else if ( value == '提交审核' ) {
meta . tdCls = 'feestatus_refer' ;
} else if ( value == '部分结算' ) {
meta . tdCls = 'feestatus_refer' ;
} else if ( value == '结算完毕' ) {
meta . tdCls = 'feestatus_settle' ;
} else if ( value == '未录入' ) {
} else if ( value == '部分结算' ) {
meta . tdCls = 'feestatus_settle' ;
} else if ( value == '部分审核' ) {
meta . tdCls = 'feestatus_pass' ;
} else if ( value == '部分提交' ) {
meta . tdCls = 'feestatus_refer' ;
} else if ( value == '驳回提交' ) {
meta . tdCls = 'feestatus_nopass' ;
}
return value ;
}
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'CRFEESTATUS' ,
header : '应付费用' ,
align : 'center' ,
width : 60 ,
renderer : function ( value , meta ) {
if ( value == '审核通过' ) {
meta . tdCls = 'feestatus_pass' ;
} else if ( value == '录入状态' ) {
} else if ( value == '提交审核' ) {
meta . tdCls = 'feestatus_refer' ;
} else if ( value == '部分结算' ) {
meta . tdCls = 'feestatus_refer' ;
} else if ( value == '结算完毕' ) {
meta . tdCls = 'feestatus_settle' ;
} else if ( value == '未录入' ) {
} else if ( value == '部分结算' ) {
meta . tdCls = 'feestatus_settle' ;
} else if ( value == '部分审核' ) {
meta . tdCls = 'feestatus_pass' ;
} else if ( value == '部分提交' ) {
meta . tdCls = 'feestatus_refer' ;
} else if ( value == '驳回提交' ) {
meta . tdCls = 'feestatus_nopass' ;
}
return value ;
}
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'DRINVSTATUS' ,
header : '应收开票' ,
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">已开票</a>'
meta . tdCls = 'feestatus_pass' ;
} else if ( value == '部分开票' ) {
meta . tdCls = 'feestatus_refer' ;
value = '<a href="' + openUrl + '" onclick="' + winstr + ';return false">部分开票</a>'
}
return value ;
}
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'CRINVSTATUS' ,
header : '应付开票' , //'应收开票',
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">已开票</a>'
meta . tdCls = 'feestatus_pass' ;
} else if ( value == '部分开票' ) {
meta . tdCls = 'feestatus_refer' ;
value = '<a href="' + openUrl + '" onclick="' + winstr + ';return false">部分开票</a>'
}
return value ;
}
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'DRDUISTATUS' ,
header : '应收对账' , //'应收开票',
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' ;
} else if ( value == '部分对账' ) {
meta . tdCls = 'feestatus_refer' ;
// value = '<a href="' + openUrl + '" onclick="' + winstr + ';return false">部分开票</a>'
}
return value ;
}
}
,
{
sortable : true ,
id : '' ,
dataIndex : 'OPSTATUS' ,
header : '业务状态' ,
renderer : function ( value , metadata , record , rowIndex ) {
metadata . style = "background-color:" + record . data . COLOR ;
return value ;
} ,
width : 60
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'BLTYPE' ,
header : '装运方式' ,
width : 60
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'ETA' ,
header : '进口日期' ,
width : 80
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'MBLNO' ,
header : '主提单号' ,
width : 120 ,
renderer : function ( value , meta ) {
meta . tdCls = 'mblno' ;
btnurl = getGridCopyButton ( value ) ;
return btnurl + value ;
}
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'CUSTOMERNAME' ,
header : '委托单位' ,
width : 120
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'SHIPPERID' ,
header : '发货人' ,
width : 120
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'BSDATE' ,
header : '接单日期' ,
width : 80
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'GOODSNAME' ,
header : '品名' ,
width : 120
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'PKGS' ,
header : '件数' ,
width : 80
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'KGS' ,
header : '毛重' ,
width : 80
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'CBM' ,
header : '尺码' ,
width : 80
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'HBLNO' ,
header : '分提单号' ,
width : 120 ,
renderer : function ( value , meta ) {
meta . tdCls = 'mblno' ;
btnurl = getGridCopyButton ( value ) ;
return btnurl + value ;
}
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'ACCDATE' ,
header : '会计期间' ,
width : 60
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'BSSOURCE' ,
header : '业务来源' ,
width : 80
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'BSSOURCEDETAIL' ,
header : '来源明细' ,
width : 80
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'INPUTBY' ,
header : '录入人' ,
width : 80
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'CREATETIME' ,
header : '创建时间' ,
width : 120
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'OP' ,
header : '操作员' ,
width : 80
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'SALE' ,
header : '揽货人' ,
width : 80
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'DOC' ,
header : '单证' ,
width : 80
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'CUSTSERVICE' ,
header : '客服' ,
width : 80
} , {
dataIndex : 'SALEDEPT' ,
header : '所属部门' , //'货物标识',
width : 100
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'VESSEL' ,
header : '航班' ,
width : 100
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'PORTLOAD' ,
header : '始发港' ,
width : 100
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'PORTDISCHARGE' ,
header : '目的港' ,
width : 100
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'CUSTOMSER' ,
header : '报关行' ,
width : 80
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'KINDPKGS' ,
header : '件数包装' ,
width : 60
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'AIRLINES' ,
header : '航空公司' ,
width : 100
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'TRUCKER' ,
header : '承运车队' ,
width : 100
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'AGENTID' ,
header : '代理' ,
width : 100
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'FORWARDER' ,
header : '订舱代理' ,
width : 100
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'VOUNO' ,
header : '凭证号' ,
width : 60
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'SALECORP' ,
header : '所属分部' ,
width : 60
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'FEEKGS' ,
header : '计费重量' ,
width : 60
} , {
sortable : true ,
dataIndex : 'ISPRINTPR' ,
header : '打印核算单' ,
width : 100 ,
renderer : function ( value , meta , record ) {
if ( value == '1' )
return '√' ;
else
return '' ;
}
} , {
sortable : true ,
dataIndex : 'IsSERVICE1' ,
header : '服务项目1' ,
hidden : true ,
width : 100 ,
renderer : function ( value , meta , record ) {
if ( value == true || value == '1' )
return '√' ;
else
return '' ;
}
} , {
sortable : true ,
dataIndex : 'IsSERVICE2' ,
header : '服务项目2' ,
hidden : true ,
width : 100 ,
renderer : function ( value , meta , record ) {
if ( value == true || value == '1' )
return '√' ;
else
return '' ;
}
} , {
sortable : true ,
dataIndex : 'IsSERVICE3' ,
header : '服务项目3' ,
hidden : true ,
width : 100 ,
renderer : function ( value , meta , record ) {
if ( value == true || value == '1' )
return '√' ;
else
return '' ;
}
} , {
sortable : true ,
dataIndex : 'IsSERVICE4' ,
header : '服务项目4' ,
hidden : true ,
width : 100 ,
renderer : function ( value , meta , record ) {
if ( value == true || value == '1' )
return '√' ;
else
return '' ;
}
} , {
sortable : true ,
dataIndex : 'IsSERVICE5' ,
header : '服务项目5' ,
hidden : true ,
width : 100 ,
renderer : function ( value , meta , record ) {
if ( value == true || value == '1' )
return '√' ;
else
return '' ;
}
} , {
sortable : true ,
dataIndex : 'IsSERVICE6' ,
header : '服务项目6' ,
hidden : true ,
width : 100 ,
renderer : function ( value , meta , record ) {
if ( value == true || value == '1' )
return '√' ;
else
return '' ;
}
} , {
sortable : true ,
dataIndex : 'IsSERVICE7' ,
header : '服务项目7' ,
hidden : true ,
width : 100 ,
renderer : function ( value , meta , record ) {
if ( value == true || value == '1' )
return '√' ;
else
return '' ;
}
} , {
sortable : true ,
dataIndex : 'IsSERVICE8' ,
header : '服务项目8' ,
hidden : true ,
width : 100 ,
renderer : function ( value , meta , record ) {
if ( value == true || value == '1' )
return '√' ;
else
return '' ;
}
} , {
sortable : true ,
dataIndex : 'IsSERVICE9' ,
header : '服务项目9' ,
hidden : true ,
width : 100 ,
renderer : function ( value , meta , record ) {
if ( value == true || value == '1' )
return '√' ;
else
return '' ;
}
} , {
sortable : true ,
dataIndex : 'IsSERVICE10' ,
header : '服务项目10' ,
hidden : true ,
width : 100 ,
renderer : function ( value , meta , record ) {
if ( value == true || value == '1' )
return '√' ;
else
return '' ;
}
} , {
sortable : true ,
dataIndex : 'ISBONDED' ,
header : '是否保税业务' ,
width : 100 ,
renderer : function ( value , meta , record ) {
if ( value == true || value == '1' )
return '√' ;
else
return '' ;
}
} , {
dataIndex : 'BLISSUESTATUS' ,
header : '提单签发状态' , //'货物标识',
width : 120
} , {
dataIndex : 'DELIVERYDATE' ,
header : '送仓日期' , //'货物标识',
width : 100
} , {
sortable : true ,
dataIndex : 'ISAPPLY' ,
header : '是否生成报关' ,
width : 80 ,
renderer : function ( value , meta , record ) {
if ( value != '0' )
return '√' ;
else
return '' ;
}
} , {
dataIndex : 'REMARK' ,
header : '备注' , //,
width : 120
} , {
dataIndex : 'OPERATORFAX' ,
header : '其他备注' , //,
width : 120
} , {
dataIndex : 'PRINTTIME' ,
header : '核算单打印时间' , //'货物标识',
width : 70
} ] ;
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 : "数据加载中,请稍等..." } ,
trackMouseOver : true ,
disableSelection : false ,
selModel : this . GridCheckBoxModel ,
viewConfig : {
enableTextSelection : true , //允许复制数据
autoFill : true
} ,
plugins : [ {
ptype : 'rowexpander' ,
rowBodyTpl : [
'<div id="{BSNO}">' ,
'</div>'
]
} ] ,
listeners : {
cellclick : function ( thisTab , record , item , index , e , eOpts ) {
if ( index == 10 ) { //设置按钮列
// alert('用户编号=' + this.getStore().getAt(rowIndex).data.usercode);
}
}
} ,
columns : this . girdcolums ,
// paging bar on the bottom
bbar : [ Ext . create ( 'Ext.PagingToolbar' , {
store : this . storeList ,
displayInfo : true ,
displayMsg : '当前显示 {0} - {1}条记录 /共 {2}条记录' ,
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 . addListener ( 'itemdblclick' , function ( dataview , record , item , index , e , b ) {
this . SelectedRecord = record ;
this . OprationStatus = 'edit' ;
DsOpenEditWin ( '/MvcShipping/MsOpAiri/Edit' , 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 ) ;
} ) ;
this . gridList . addListener ( 'sortchange' , function ( ct , column , direction , eOpts ) {
this . sortfield = column . dataIndex ;
this . sortdire = direction ;
} , this ) ;
//#region formSearch 下拉框信息加载
//权限范围
this . StoreOpRange = Ext . create ( 'DsExt.ux.RefTableStore' , {
model : 'MsOP' ,
proxy : { url : '/MvcShipping/MsBaseInfo/GetOpRang' }
} ) ;
this . StoreOpRange . load ( { params : { optype : "modOpAireList" } } ) ;
//客户加载_委托单位
this . storeCustCode = Ext . create ( 'DsExt.ux.RefTableStore' , {
model : 'DsShipping.ux.CustomRefModel' ,
proxy : { url : '/CommMng/BasicDataRef/GetCustomRefList' }
} ) ;
this . storeCustCode . load ( { params : { condition : "ISCONTROLLER='1'" } } ) ;
//委托单位
_this = this ;
this . comboxCustCode = Ext . create ( 'DsExt.ux.RefTableCombox' , {
fieldLabel : '委托单位' ,
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 ( ) ;
}
}
}
} ) ;
this . storeISPRINT = Ext . create ( 'Ext.data.Store' , {
fields : [ 'FSTATUS' , 'NAME' ]
} ) ;
this . storeISPRINT . add ( { "FSTATUS" : "" , "NAME" : "全部" } ) ;
this . storeISPRINT . add ( { "FSTATUS" : "1" , "NAME" : "已打印" } ) ;
this . storeISPRINT . add ( { "FSTATUS" : "2" , "NAME" : "未打印" } ) ;
this . comboxISPRINT = Ext . create ( 'DsExt.ux.RefTableCombox' , {
fieldLabel : '核算单' ,
store : this . storeISPRINT ,
valueField : 'FSTATUS' ,
displayField : 'NAME' ,
//labelWidth: 60,
//flex: 0.6,
forceSelection : true ,
name : 'ISPRINT' ,
value : '0' ,
enableKeyEvents : true ,
listeners : {
keyup : function ( field , e ) {
if ( e . getKey ( ) == e . ENTER ) {
_this . onRefreshClick ( ) ;
}
}
}
} ) ;
//#endregion
//#region formSearch 查询面板
_this = this ;
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 : '编号' ,
name : 'MblNo' ,
enableKeyEvents : true ,
listeners : {
specialkey : function ( field , e ) {
if ( e . getKey ( ) == e . ENTER ) {
_this . onRefreshClick ( ) ;
}
}
}
} , this . comboxCustCode , {
fieldLabel : '进口日期' ,
format : 'Y-m-d' ,
xtype : 'datefield' ,
name : 'ETDbgn' ,
enableKeyEvents : true ,
listeners : {
specialkey : function ( field , e ) {
if ( e . getKey ( ) == e . ENTER ) {
_this . onRefreshClick ( ) ;
}
}
}
} , {
fieldLabel : '到' ,
format : 'Y-m-d' ,
xtype : 'datefield' ,
name : 'ETDend' ,
enableKeyEvents : true ,
listeners : {
specialkey : function ( field , e ) {
if ( e . getKey ( ) == e . ENTER ) {
_this . onRefreshClick ( ) ;
}
}
}
} , {
fieldLabel : '开船月份' , //'会计期间',
//flex: 0.6,
xtype : 'monthfield' ,
name : 'FRMONTH'
} , {
fieldLabel : '开船月份' , //'会计期间',
//flex: 0.6,
xtype : 'monthfield' ,
name : 'TOMONTH'
} , this . comboxISPRINT , {
xtype : 'button' ,
width : 90 ,
text : "执行查询" ,
iconCls : "btnrefresh" ,
handler : function ( button , event ) {
this . onRefreshClick ( button , event ) ;
} ,
scope : this
} , {
xtype : 'button' ,
width : 90 ,
text : "高级查询" ,
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
} ]
}
] //end items(fieldset 1)
} ] //end root items
} ) ;
//#endregion formSearch
_this = this ;
//按钮工具条_
this . panelBtn = new Ext . Panel ( {
region : "north" ,
tbar : [ {
text : "新建" ,
iconCls : "btnadd" ,
id : 'btnaddbs' ,
handler : function ( button , event ) {
this . OprationStatus = 'add' ;
DsOpenEditWin ( '/MvcShipping/MsOpAiri/Edit' ) ;
} ,
scope : this
} , {
text : "复制" , //"复制",
id : 'btncopyaddbs' ,
menu : [ {
text : "复制新建" ,
iconCls : "btnadd" ,
handler : function ( button , 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 = 'copyadd' ;
DsOpenEditWin ( '/MvcShipping/MsOpAiri/Edit' ) ;
} ,
scope : this
} , {
text : "复制新建(含费用)" , //"复制新建",
iconCls : "btnadd" ,
handler : function ( button , 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 = 'copyaddfee' ;
DsOpenEditWin ( '/MvcShipping/MsOpAiri/Edit' ) ;
} ,
scope : this
} ]
} , {
text : "删除" ,
iconCls : "btndelete" ,
handler : function ( button , event ) {
this . onDeleteClick ( button , event ) ;
} ,
scope : this
} , {
text : "重置条件" ,
iconCls : "btnreset" ,
handler : function ( button , event ) {
this . onClearSql ( button , event ) ;
} ,
scope : this
} ,
, '-' , {
text : "保存列表样式" ,
id : "btntest" ,
menu : [
{ text : "保存" ,
handler : function ( button , event ) {
this . girdcolums = DsTruck . SaveGridPanel ( USERID , _this . formname , _this . gridList . columns , _this . girdcolums , 1 , true ) ;
}
} , { text : "初始化" ,
handler : function ( menu , event ) {
_this . InitGrid ( _this . initgirdcolums ) ;
_this . girdcolums = DsTruck . SaveGridPanel ( USERID , _this . formname , _this . gridList . columns , _this . initgirdcolums , 1 , true ) ;
}
} ] ,
scope : this
} , '-' ,
{
text : "打印" ,
iconCls : 'btnprint' ,
menu : [
{ text : "全部" ,
handler : function ( menu , event ) {
_this . Print ( ) ;
}
} , { text : "选择打印" ,
handler : function ( menu , event ) {
_this . PrintSelect ( ) ;
}
} ] ,
scope : this
} , '-' , {
text : "分票操作" ,
menu : [
{ text : "分票列表" ,
handler : function ( menu , event ) {
_this . onFenBillListClick ( menu , event ) ;
}
} ] ,
scope : this
} , '-' , {
text : "其他操作" ,
menu : [
{ text : "批量状态更新" ,
handler : function ( menu , event ) {
_this . onUpOpStatusClick ( menu , event , 1 ) ;
}
} , { text : "费用编辑" ,
handler : function ( menu , event ) {
_this . onFeeEditClick ( menu , event ) ;
}
} , { text : "批量费用提交" ,
handler : function ( menu , event ) {
_this . onPiLiangSubmitClick ( menu , event , 1 ) ;
}
} , { text : "业务批量修改" ,
handler : function ( menu , event ) {
_this . winModifyShow . show ( ) ;
}
} , { text : "放单通知" , //"放单通知",
handler : function ( menu , event ) {
_this . onFDTZClick ( menu , event ) ;
}
} , { text : '批量整票提交' , //"批量整票提交",
handler : function ( menu , event ) {
_this . onPiLiangZhengPiaoTiJiaoClick ( ) ;
}
} ] ,
scope : this
} ]
} ) ;
//#region 合计列表
this . SumField = [
{ name : 'NOBILL' , type : 'number' } ,
{ name : 'TTLBILL' , type : 'number' } ,
{ name : 'AMENDBILL' , type : 'number' } ,
{ name : 'KGS' , type : 'number' } ,
{ name : 'PKGS' , type : 'number' } ,
{ name : 'CBM' , type : 'number' } ,
{ name : 'FEEKGS' , type : 'number' }
] ;
this . storeSumList = Ext . create ( 'Ext.data.Store' , {
pageSize : this . PageSize ,
fields : this . SumField ,
remoteSort : true ,
proxy : {
type : 'ajax' ,
url : '/MvcShipping/MsOpAiri/GetSum' ,
reader : {
id : '' ,
root : 'data' ,
totalProperty : 'totalCount'
}
}
} ) ;
this . girdcolumsSum = [ {
sortable : true ,
dataIndex : 'NOBILL' ,
header : '票数' , //'TEU',
align : 'right' ,
width : 80
} , {
sortable : true ,
dataIndex : 'TTLBILL' ,
header : '分票数' , //'票数',
align : 'right' ,
width : 100
} , {
sortable : true ,
dataIndex : 'PKGS' ,
header : '件数' , //'件数',
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 : '毛重' , //'毛重',
align : 'right' ,
width : 80
} , {
sortable : true ,
dataIndex : 'CBM' ,
header : '尺码' , //'尺码',
// 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 : 'FEEKGS' ,
header : '计费重量' , //'尺码',
// 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 : "数据加载中,请稍等..." //"数据加载中,请稍等..."
} ,
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
this . panelTop = new Ext . Panel ( {
layout : "border" ,
region : "north" ,
height : 75 ,
items : [ this . panelBtn , this . formSearch ]
} ) ;
Ext . apply ( this , {
items : [ this . panelTop , this . gridList , this . panelSum ]
} ) ;
this . InitGrid ( this . girdcolums ) ;
var myDate = new Date ( ) ;
var mydatestr = Ext . util . Format . date ( myDate , 'Y-m' ) ;
this . sqlcontext = " B.ACCDATE='" + mydatestr + "'" ;
this . storeList . load ( {
params : { start : 0 , limit : this . PageSize , sort : '' , condition : _this . sqlcontext , load : 'true' } ,
waitMsg : "正在查询数据..." ,
scope : this
} ) ;
this . storeSumList . load ( {
params : { start : 0 , limit : this . PageSize , sort : '' , condition : _this . sqlcontext , load : 'true' } ,
waitMsg : "正在查询数据..." ,
scope : this
} ) ;
this . storeList . on ( 'beforeload' , function ( store ) {
// var sql = this.getCondition();
Ext . apply ( store . proxy . extraParams , { condition : _this . sqlcontext } ) ;
} , this ) ;
//#region 下载窗体
this . formDownloadShow = Ext . widget ( 'form' , {
frame : true ,
region : 'center' ,
height : 100 ,
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' ,
id : 'downloadfile' ,
defaults : {
anchor : '100%'
} ,
items : [ {
xtype : 'label' ,
html : '' ,
width : 120 ,
text : ''
}
] //end items(fieldset 1)
} //end fieldset 1
] //end root items
} ) ;
me = this ;
this . winDownloadShow = Ext . create ( 'Ext.window.Window' , {
title : "下载文件" ,
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 . formDownloadShow ] ,
buttons : [ {
text : "关闭" ,
minWidth : 70 ,
handler : function ( ) {
me . winDownloadShow . close ( ) ;
}
} ]
} ) ;
//#endregion
//#region 批量修改窗体
//客户加载_代理
// this.storeShipper.load({ params: { condition: "ISCONTROLLER='1'"} });
//收货人
this . comboxAgent2 = Ext . create ( 'DsExt.ux.RefTableCombox' , {
fieldLabel : '代 理' ,
store : this . storeagent ,
// forceSelection: true,
name : 'AGENTID' ,
valueField : 'SHORTNAME' ,
displayField : 'CodeAndName' ,
listeners : {
scope : this ,
'select' : function ( combo , records , eOpts ) {
if ( records . length > 0 ) {
var selectrecords = DsStoreQueryBy ( this . storeagent , 'SHORTNAME' , combo . value ) ;
if ( selectrecords . getCount ( ) > 0 ) {
var selectdata = selectrecords . getAt ( 0 ) . data ;
this . formModify . getForm ( ) . findField ( 'AGENT' ) . setValue ( selectdata . SHIPPERDETAIL ) ;
} else {
this . formModify . getForm ( ) . findField ( 'AGENT' ) . setValue ( '' ) ;
}
}
}
}
} ) ;
this . comboxPORTLOAD2 = Ext . create ( 'DsExt.ux.RefTableCombox' , {
fieldLabel : '装货港' ,
store : this . storeCodeLoadport ,
name : 'PORTLOAD' ,
valueField : 'PORT' ,
displayField : 'CodeAndName' ,
listeners : {
scope : this ,
'select' : function ( combo , records , eOpts ) {
if ( records . length > 0 ) {
var selectrecords = DsStoreQueryBy ( this . storeCodeLoadport , 'PORT' , combo . value ) ;
if ( selectrecords . getCount ( ) > 0 ) {
var selectdata = selectrecords . getAt ( 0 ) . data ;
this . formModify . getForm ( ) . findField ( 'PORTLOADID' ) . setValue ( selectdata . EDICODE ) ;
} else {
this . formModify . getForm ( ) . findField ( 'PORTLOADID' ) . setValue ( '' ) ;
}
}
}
}
} ) ;
this . comboxPORTDISCHARGE2 = Ext . create ( 'DsExt.ux.RefTableCombox' , {
fieldLabel : '卸货港' ,
store : this . storeCodeDisport ,
name : 'PORTDISCHARGE' ,
valueField : 'PORT' ,
queryMode : 'local' ,
displayField : 'PORT' ,
listeners : {
scope : this ,
'select' : function ( combo , records , eOpts ) {
if ( records . length > 0 ) {
var selectrecords = DsStoreQueryBy ( this . storeCodeDisport , 'PORT' , combo . value ) ;
if ( selectrecords . getCount ( ) > 0 ) {
var selectdata = selectrecords . getAt ( 0 ) . data ;
this . formModify . getForm ( ) . findField ( 'PORTDISCHARGEID' ) . setValue ( selectdata . EDICODE ) ;
} else {
this . formModify . getForm ( ) . findField ( 'PORTDISCHARGEID' ) . setValue ( '' ) ;
}
}
}
}
} ) ;
this . formModify = Ext . widget ( 'form' , {
region : 'north' ,
frame : true ,
bodyPadding : 5 ,
fieldDefaults : {
margins : '2 2 2 2' ,
labelAlign : 'right' ,
flex : 1 ,
labelWidth : 70 ,
msgTarget : 'qtip'
} ,
items : [
{ //fieldset 1
xtype : 'fieldset' ,
defaultType : 'textfield' ,
layout : 'anchor' ,
defaults : {
anchor : '100%'
} ,
items : [ {
xtype : 'container' ,
layout : 'hbox' ,
defaultType : 'textfield' ,
items : [ this . comboxYARD2 , this . comboxCARRIER2 , this . comboxFORWARDER2 , this . comboxLANE2
]
} , {
xtype : 'container' ,
layout : 'hbox' ,
defaultType : 'textfield' ,
items : [ this . comboxAgent2 , this . comboxCUSTOMSER2 , this . comboxTRUCKER2 , { xtype : 'hiddenfield' }
]
} , {
xtype : 'container' ,
layout : 'hbox' ,
defaultType : 'textfield' ,
items : [ this . comboxPORTLOAD2 , {
fieldLabel : '装港代码' ,
name : 'PORTLOADID'
} , this . comboxPORTDISCHARGE2 , {
fieldLabel : '卸港代码' ,
name : 'PORTDISCHARGEID'
}
]
} , {
xtype : 'container' ,
layout : 'hbox' ,
defaultType : 'textfield' ,
items : [ {
xtype : 'textareafield' ,
grow : true ,
fieldLabel : 'AGENT' ,
height : 70 ,
name : 'AGENT' ,
anchor : '100%'
} , {
xtype : 'textareafield' ,
grow : true ,
fieldLabel : '备注' ,
height : 70 ,
name : 'REMARK' ,
anchor : '100%'
}
]
}
] //end items(fieldset 1)
} //end fieldset 1
] //end root items
} ) ; //end this.formEdit
me = this ;
this . winModifyShow = Ext . create ( 'Ext.window.Window' , {
title : "批量修改" ,
width : 820 ,
//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 . formModify ] ,
buttons : [ {
text : "确认修改" ,
minWidth : 70 ,
handler : function ( ) {
me . onModifyClick ( )
}
} , {
text : "关闭" ,
minWidth : 70 ,
handler : function ( ) {
me . winModifyShow . close ( ) ;
}
} ]
} ) ;
//#endregion
//#region 放单通知
//this.gridList.addListener('itemcontextmenu', this.itemcontextmenu);
Ext . Ajax . request ( {
waitMsg : '' ,
url : '/MvcShipping/MsSysParamSet/GetData' ,
params : {
condition : "PARAMNAME='BLMUSTBEQR'"
} ,
callback : function ( options , success , response ) {
if ( success ) {
var result = Ext . JSON . decode ( response . responseText ) ;
if ( result . Success != true ) {
} else {
var data = result . data ;
if ( data . PARAMVALUE == '1' ) {
this . BLMUSTBEQR = 1 ;
} else {
}
}
} else {
}
} ,
scope : this
} ) ;
this . formReason = Ext . widget ( 'form' , {
frame : true ,
region : 'center' ,
bodyPadding : 5 ,
bodyStyle : "padding:0 0 0 0;background:#FFF;" ,
fieldDefaults : {
margins : '2 2 2 2' ,
labelAlign : 'right' ,
flex : 1 ,
labelWidth : 45 ,
msgTarget : 'qtip'
} ,
items : [
{
xtype : 'label' ,
name : 'FDINFO' ,
id : "FDINFO" ,
padding : '0 0 0 0' ,
html : "" ,
height : 130 ,
width : 400
} , {
fieldLabel : '备注' , //'备注', id: "REASON",
xtype : 'textareafield' ,
id : 'REASON' ,
name : 'REASON' , width : 450 , height : 50 ,
listeners : {
change : function ( field , eOpts ) {
if ( field . lastValue != "" ) {
//this.formHead.getForm().findField('STOCKDATE_1').setValue(field.rawValue);
}
} ,
scope : this
}
} ]
} ) ;
var _this2 = this ;
this . winFDTZShow = Ext . create ( 'Ext.window.Window' , {
id : "winFDTZShow" ,
title : "放单通知" , //"放单通知",
width : 450 ,
height : 260 ,
//plain : true,
iconCls : "addicon" ,
resizable : false ,
// 是否可以拖动
// draggable:false,
collapsible : true , // 允许缩放条
closeAction : 'close' ,
closable : true ,
modal : 'true' ,
buttonAlign : "center" ,
bodyStyle : "padding:0 0 0 0;background:#FFF;" ,
items : [ this . formReason ] ,
buttons : [
{
text : "确定" , //"确定",
minWidth : 70 ,
handler : function ( ) {
_this2 . DoFDTZ ( Ext . getCmp ( "REASON" ) . getRawValue ( ) ) ;
}
} , {
text : "取消" , //"取消",
minWidth : 70 ,
handler : function ( ) {
_this2 . winFDTZShow . close ( ) ;
}
} , {
text : "打印" , //"打印",
minWidth : 70 ,
handler : function ( ) {
_this2 . Print _FDTZ ( ) ;
}
} ]
} ) ;
var btnaddbs = Ext . getCmp ( 'btnaddbs' ) ;
var btncopyaddbs = Ext . getCmp ( 'btncopyaddbs' ) ;
Ext . Ajax . request ( {
waitMsg : Zi . LAN . ZhengZaiCaoZuoShuJu ,
url : '/MvcShipping/MsBaseInfo/GetUserModuleEnable' ,
params : {
modulename : 'AIRI-NOTADD'
} ,
callback : function ( options , success , response ) {
if ( success ) {
var result = Ext . JSON . decode ( response . responseText ) ;
if ( result . Success ) {
btnaddbs . hide ( ) ;
btncopyaddbs . hide ( ) ;
} else {
btncustadd . show ( ) ;
btncopyaddbs . show ( ) ;
}
}
} ,
scope : this
} ) ;
//#endregion
} , //end initUIComponents
InitGrid : function ( grid ) {
//var agirdcolums = Ext.clone(this.gridList.columns);
var agirdcolums = grid ;
this . storecodeservice . load ( { params : { condition : "OPTYPE='4'" } ,
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 == 'Is' + 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);
} ,
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 : "正在查询数据..." ,
scope : this
} ) ;
this . storeSumList . load ( {
params : { start : 0 , limit : this . PageSize , sort : '' , condition : sql } ,
waitMsg : "正在查询数据..." ,
scope : this
} ) ;
} ,
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 : "正在查询数据..." ,
scope : this
} ) ;
this . storeSumList . load ( {
params : { start : 0 , limit : this . PageSize , sort : '' , condition : sql } ,
waitMsg : "正在查询数据..." ,
scope : this
} ) ;
} ,
onDeleteClick : function ( button , 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 ] ;
if ( record . data . BSSTATUS == 'true' ) {
Ext . Msg . show ( { title : '警告' , msg : '业务已锁定,不允许删除!' , icon : Ext . Msg . WARNING , buttons : Ext . Msg . OK } ) ;
return ;
}
if ( record . data . FEESTATUS == 'true' ) {
Ext . Msg . show ( { title : '警告' , msg : '费用已锁定,不允许删除!' , icon : Ext . Msg . WARNING , buttons : Ext . Msg . OK } ) ;
return ;
}
if ( this . StoreOpRange . getCount ( ) == 0 ) {
Ext . Msg . show ( { title : '警告' , msg : '权限不足,不允许删除!' , icon : Ext . Msg . WARNING , buttons : Ext . Msg . OK } ) ;
return ;
} else {
var op = record . data . OP ;
var inputby = record . data . INPUTBY ;
var records = DsStoreQueryBy ( this . StoreOpRange , 'OPID' , op ) ;
if ( records . getCount ( ) > 0 ) {
} else {
var recordins = DsStoreQueryBy ( this . StoreOpRange , 'OPID' , inputby ) ;
if ( recordins . getCount ( ) > 0 ) {
} else {
canedit = false ;
Ext . Msg . show ( { title : '警告' , msg : '权限不足,不允许删除!' , icon : Ext . Msg . WARNING , buttons : Ext . Msg . OK } ) ;
return ;
}
}
}
Ext . MessageBox . confirm ( '提示' , '确定删除该记录吗?' , function ( btn ) {
if ( btn == 'yes' ) {
Ext . Msg . wait ( '正在删除数据...' ) ;
Ext . Ajax . request ( {
waitMsg : '正在删除数据...' ,
url : '/MvcShipping/MsOpAiri/Delete' ,
params : {
data : Ext . JSON . encode ( record . data )
} ,
callback : function ( options , success , response ) {
if ( success ) {
var jsonresult = Ext . JSON . decode ( response . responseText ) ;
if ( jsonresult . Success ) {
this . storeList . remove ( record ) ;
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 } ) ;
}
}
} ,
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 ) ;
} ,
//end initUIComponents
//#region 拼箱分票Grid
displayInnerGrid : function ( renderId , fenpiao ) {
if ( fenpiao == '0' )
return ;
var storeBodyList = Ext . create ( 'Ext.data.Store' , {
model : 'MsOpAiriModel' ,
remoteSort : true ,
proxy : {
type : 'ajax' ,
url : '/MvcShipping/MsOpAiri/GetFenList' ,
reader : {
id : 'BSNO' ,
root : 'data' ,
totalProperty : 'totalCount'
}
}
} ) ;
innerGrid = Ext . create ( 'Ext.grid.Panel' , {
store : storeBodyList ,
viewConfig : {
enableTextSelection : true , //允许复制数据
autoFill : true
} ,
columns : [ {
sortable : true ,
id : '' ,
dataIndex : '' ,
header : '' ,
width : 0
} , {
sortable : true ,
id : '' ,
dataIndex : 'BSNO' ,
header : '业务编号' ,
width : 0
} , {
sortable : true ,
id : '' ,
dataIndex : 'CUSTNO' ,
header : '委托编号' ,
width : 120
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'BSSTATUSREF' ,
header : '业务锁定' ,
align : 'center' ,
width : 60 ,
renderer : function ( value , cellmeta ) {
if ( value == '锁定' ) {
return "<img src='../../../../TruckMng/Content/Images/Lock.png' />" ;
}
}
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'FEESTATUSREF' ,
header : '费用锁定' ,
align : 'center' ,
width : 60 ,
renderer : function ( value , cellmeta ) {
if ( value == '锁定' ) {
return "<img src='../../../../TruckMng/Content/Images/Lock.png' />" ;
}
}
}
,
{
sortable : true ,
id : '' ,
dataIndex : 'OPSTATUS' ,
header : '业务状态' ,
width : 60
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'BLTYPE' ,
header : '装运方式' ,
width : 60
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'MBLNO' ,
header : '主提单号' ,
width : 120
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'CUSTOMERNAME' ,
header : '委托单位' ,
width : 120
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'GOODSNAME' ,
header : '品名' ,
width : 120
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'PKGS' ,
header : '件数' ,
width : 80
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'KGS' ,
header : '毛重' ,
width : 80
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'CBM' ,
header : '尺码' ,
width : 80
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'HBLNO' ,
header : '分提单号' ,
width : 120
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'ACCDATE' ,
header : '会计期间' ,
width : 60
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'BSSOURCE' ,
header : '业务来源' ,
width : 80
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'BSSOURCEDETAIL' ,
header : '来源明细' ,
width : 80
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'INPUTBY' ,
header : '录入人' ,
width : 80
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'CREATETIME' ,
header : '创建时间' ,
width : 120
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'OP' ,
header : '操作员' ,
width : 80
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'SALE' ,
header : '揽货人' ,
width : 80
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'PORTLOAD' ,
header : '始发港' ,
width : 100
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'PORTDISCHARGE' ,
header : '目的港' ,
width : 100
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'CUSTOMSER' ,
header : '报关行' ,
width : 80
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'KINDPKGS' ,
header : '件数包装' ,
width : 60
} ,
{
sortable : true ,
id : '' ,
dataIndex : 'TRUCKER' ,
header : '承运车队' ,
width : 100
}
] ,
// 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/MsOpAiri/Edit' ) ;
} , 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 ) {
if ( fenpiao == '0' )
return ;
var parent = document . getElementById ( record . get ( 'BSNO' ) ) ;
var child = parent . firstChild ;
while ( child ) {
child . parentNode . removeChild ( child ) ;
child = child . nextSibling ;
}
} ,
//#endregion
//#region 状态更新和批量修改
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' ) ;
}
} ,
//#endregion
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/MsOpAiri/PiLiangFeeEdit' ) ;
} ,
onFenBillListClick : 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 ] ;
if ( record . data . BLTYPE != '空运主票' ) {
Ext . Msg . show ( { title : '提示' , msg : '只有空运主票才能显示列表!' , icon : Ext . Msg . INFO , buttons : Ext . Msg . OK } ) ;
return ;
}
this . SelectedRecord = record ;
this . OprationStatus = 'edit' ;
DsOpenEditWin ( '/MvcShipping/MsOpAiri/FenBillList' ) ;
} ,
onImportEdiClick : function ( button , event ) {
var winAccess = new Shipping . EDIImport ( {
} ) ;
winAccess . StoreList = this . storeList ;
winAccess . show ( ) ;
return ;
} ,
onModifyClick : function ( menu , event ) {
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 bodyAddDatas = [ ] ;
for ( var i = 0 ; i < records . length ; i ++ ) {
var rec = records [ i ] ;
if ( rec . data . BSSTATUS == 'true' ) {
Ext . Msg . show ( { title : '警告' , msg : '业务已锁定,不允许删除!' , icon : Ext . Msg . WARNING , buttons : Ext . Msg . OK } ) ;
} else {
var op = rec . data . OP ;
var inputby = rec . data . INPUTBY ;
var mrecords = DsStoreQueryBy ( this . StoreOpRange , 'OPID' , op ) ;
if ( mrecords . getCount ( ) > 0 ) {
bodyAddDatas . push ( rec ) ;
} else {
var recordins = DsStoreQueryBy ( this . StoreOpRange , 'OPID' , inputby ) ;
if ( recordins . getCount ( ) > 0 ) {
bodyAddDatas . push ( rec ) ;
} else {
canedit = false ;
Ext . Msg . show ( { title : '警告' , msg : '权限不足,不允许删除!' , icon : Ext . Msg . WARNING , buttons : Ext . Msg . OK } ) ;
}
}
}
}
var data = this . formModify . getForm ( ) . getValues ( ) ;
_this = this ;
if ( bodyAddDatas . length == 0 ) {
Ext . Msg . show ( { title : '提示' , msg : '没有要修改的业务!' , icon : Ext . Msg . INFO , buttons : Ext . Msg . OK } ) ;
return ;
} else {
var jsonbodyAddDatas = ConvertRecordsToJsonAll ( bodyAddDatas ) ;
Ext . Ajax . request ( {
waitMsg : '正在锁定...' ,
url : '/MvcShipping/MsOpAiri/modify' ,
params : {
data : jsonbodyAddDatas ,
modifydata : Ext . JSON . encode ( data )
} ,
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 } ) ;
_this . onRefreshClick ( ) ;
_this . winModifyShow . close ( ) ;
}
} else {
Ext . MessageBox . alert ( '请求出现错误,请重试' , response . responseText ) ;
}
} ,
scope : this
} ) ;
}
} ,
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 = '1=1 ' ;
//#region formSearch 查询面板
//编号包括(主提单号)
var MblNo = form . findField ( 'MblNo' ) . getValue ( ) ;
MblNo = MblNo . trim ( ) ;
sql = sql + getAndConSql ( sql , MblNo , "(B.MblNo like '%" + MblNo + "%' or B.CONTRACTNO like '%" + MblNo + "%' or B.CUSTNO like '%" + MblNo + "%' or B.HBLNO like '%" + MblNo + "%' or B.ORDERNO like '%" + MblNo + "%')" ) ;
//客户名称
var CUSTOMERNAME = form . findField ( 'CUSTOMERNAME' ) . getValue ( ) ;
sql = sql + getAndConSql ( sql , CUSTOMERNAME , "B.CUSTOMERNAME='" + CUSTOMERNAME + "'" ) ;
//到港日期
var ETDbgn = form . findField ( 'ETDbgn' ) . getRawValue ( ) ;
sql = sql + getAndConSql ( sql , ETDbgn , "B.ETA >='" + ETDbgn + "'" ) ;
var ETDend = form . findField ( 'ETDend' ) . getRawValue ( ) ;
sql = sql + getAndConSql ( sql , ETDend , "B.ETA <='" + ETDend + "'" ) ;
var FRMONTH = form . findField ( 'FRMONTH' ) . getRawValue ( ) ;
sql = sql + getAndConSql ( sql , FRMONTH , "B.ETA>='" + FRMONTH + "-01'" ) ;
var TOMONTH = form . findField ( 'TOMONTH' ) . getRawValue ( ) ;
if ( TOMONTH != '' ) {
var now = new Date ( TOMONTH + "-01" ) ; //当前日期
var nowMonth = now . getMonth ( ) ; //当前月
var nowYear = now . getFullYear ( ) ; //当前年
var mydateend = new Date ( nowYear , nowMonth , getMonthDays ( nowMonth ) ) ;
var mydatestr = Ext . util . Format . date ( mydateend , 'Y-m-d' ) ;
sql = sql + getAndConSql ( sql , TOMONTH , "B.ETA <='" + mydatestr + "'" ) ;
}
var ISPRINT = form . findField ( 'ISPRINT' ) . getValue ( ) ;
if ( ISPRINT == '2' ) {
sql = sql + getAndConSql ( sql , ISPRINT , " ISNULL(B.ISPRINTPR,'')<>'1'" ) ;
} else
sql = sql + getAndConSql ( sql , ISPRINT , "ISNULL(B.ISPRINTPR,'')='" + ISPRINT + "'" ) ;
//#endregion formSearch
return sql ;
} ,
//#region 放单通知 gridList_Edit的右键菜单
onFDTZClick : function ( his , record , item , index , e ) {
Ext . getCmp ( "FDINFO" ) . update ( "" ) ;
var selections = this . gridList . getSelectionModel ( ) . getSelection ( ) ;
if ( selections . length == 0 ) {
Ext . Msg . show ( { title : Zi . LAN . TiShi , msg : Zi . LAN . QingXianXuanZeYeWu , icon : Ext . Msg . INFO , buttons : Ext . Msg . OK } ) ;
return ;
}
var rec = selections [ 0 ] ;
var BSNO = rec . data . BSNO ;
if ( rec . data . ISSUETYPE == '' ) {
Ext . Msg . show ( { title : Zi . LAN . TiShi , msg : '签单方式不能为空!' , icon : Ext . Msg . INFO , buttons : Ext . Msg . OK } ) ;
return ;
}
_this = this ;
Ext . Ajax . request ( {
waitMsg : Zi . LAN . ZhengZaiCaoZuoShuJu ,
url : '/MvcShipping/MsOp_BLISSUE/GetBLINFO' ,
async : false ,
params : {
BSNO : "'" + BSNO + "'"
} ,
callback : function ( options , success , response ) {
if ( success ) {
var result = Ext . JSON . decode ( response . responseText ) ;
if ( result . Success ) {
var _html = "<span style=\"clear:both;\">" ;
_this . 结费类型 = result . data [ 0 ] . 结费类型 . replace ( "<span style=\"colorred\">" , " " ) . replace ( "</span>" , " " ) ;
_this . 欠费超期 = result . data [ 0 ] . 欠费超期 ;
_this . 累计欠费 = result . data [ 0 ] . 累计欠费 ;
_this . 信用额度 = result . data [ 0 ] . 信用额度 ;
_html = _html + "<span style=\"clear:both;color:#000000;backgroud-color:#FF0000\"><p>  " + result . data [ 0 ] . 结费类型 + "</p></span>" ;
_html = _html + "<span style=\"color:#000000;backgroud-color:#FF0000\"><p>  " + result . data [ 0 ] . 欠费超期 + "</p></span>" ;
if ( result . data [ 0 ] . 超期欠费 != '' )
_html = _html + "<span style=\"color:#000000;backgroud-color:#FF0000\"><p>  " + result . data [ 0 ] . 超期欠费 + "</p></span>" ;
_html = _html + "<span style=\"color:#000000;backgroud-color:#FF0000\"><p>  " + result . data [ 0 ] . 累计欠费 + "</p></span>" ;
_html = _html + "<span style=\"color:#000000;backgroud-color:#FF0000\"><p>  " + result . data [ 0 ] . 信用额度 + "</p></span>" ;
_html = _html + "<br></br>" ;
if ( result . data [ 0 ] . IS欠费超期 == "yes" ) {
_html = _html + "  <span style=\"color:#900000;text-decoration:none;\">欠费超期</span>" ;
}
if ( result . data [ 0 ] . IS累计欠费 == "yes" ) {
_html = _html + "  <span style=\"color:#900000;text-decoration:none;\">总欠费超额度</span>" ;
}
_html = _html + "</span><br></br>" ;
Ext . getCmp ( "FDINFO" ) . update ( _html ) ;
} else {
//return;
}
} else {
return ;
}
} ,
scope : this
} ) ;
Ext . getCmp ( "MainAiriPanel" ) . SelectedRecord = rec ;
Ext . getCmp ( "winFDTZShow" ) . show ( ) ;
} ,
DoFDTZ : function ( REASON ) {
Ext . define ( 'MsOp_BLISSUEmb' , {
extend : 'Ext.data.Model' ,
idProperty : 'GID' ,
fields : [
{ name : 'GID' , type : 'string' } ,
{ name : 'BSNO' , type : 'string' } ,
{ name : 'BLNO' , type : 'string' } ,
{ name : 'HBLNO' , type : 'string' } ,
{ name : 'ZDFD' , type : 'string' } ,
{ name : 'BLNAME' , type : 'string' } ,
{ name : 'BLSTATUS' , type : 'string' } ,
{ name : 'BLORDERNO' , type : 'string' } ,
{ name : 'ISSUETYPE' , type : 'string' } ,
{ name : 'OPNAME' , type : 'string' } ,
{ name : 'OPTIME' , type : 'string' } ,
{ name : 'BSINKNO' , type : 'string' } ,
{ name : 'REMARK' , type : 'string' } ,
{ name : 'DELFLAG' , type : 'string' } ,
{ name : 'EXPRESSCORP' , type : 'string' } ,
{ name : 'EXPRESSNO' , type : 'string' } ,
{ name : 'ISADD' , type : 'string' } ,
{ name : 'PUTSINGLETIME' , type : 'string' } ,
{ name : 'PUTSINGLE' , type : 'string' } ,
{ name : 'PAYTIME' , type : 'string' } ,
{ name : 'PAYRMB' , type : 'string' } ,
{ name : 'PAYUSD' , type : 'string' } ,
{ name : 'BLTYPE' , type : 'string' } ,
{ name : 'CUSTNO' , type : 'string' } ,
{ name : 'CUSTOMERNAME' , type : 'string' } ,
{ name : 'SALE' , type : 'string' } ,
{ name : 'ACCTYPE' , type : 'string' } ,
{ name : 'ETD' , type : 'string' } ,
{ name : 'STLDATE' , type : 'string' } ,
{ name : 'CARRIER' , type : 'string' } ,
{ name : 'VESSEL' , type : 'string' } ,
{ name : 'VOYNO' , type : 'string' } ,
{ name : 'OP' , type : 'string' } ,
{ name : 'BLISSUESTATUS' , type : 'string' } ,
{ name : 'TSFD' , type : 'string' } ,
{ name : 'XYTS' , type : 'string' } ,
{ name : 'CQTS' , type : 'string' } ,
{ name : 'SJTS' , type : 'string' } ,
{ name : 'RMBNODR' , type : 'string' } ,
{ name : 'USDNODR' , type : 'string' } ,
{ name : 'TTLNODR' , type : 'string' } ,
{ name : 'TTLDR' , type : 'string' } ,
{ name : 'OPLBNAME' , type : 'string' } ,
{ name : 'SPREMARK' , type : 'string' }
]
} ) ;
var _op _blissue = Ext . create ( 'MsOp_BLISSUEmb' , {
'GID' : '' ,
'BSNO' : this . SelectedRecord . data . BSNO ,
'BLNO' : this . SelectedRecord . data . MBLNO ,
'BLNAME' : '提单' ,
'BLSTATUS' : '' ,
'BLORDERNO' : '' ,
'ISSUETYPE' : this . SelectedRecord . data . ISSUETYPE ,
'OPNAME' : '' ,
'OPTIME' : '' ,
'BSINKNO' : '' ,
'REMARK' : '' ,
'DELFLAG' : '0' ,
'EXPRESSCORP' : '' ,
'EXPRESSNO' : '' ,
'ISADD' : '0' ,
'PUTSINGLETIME' : '' ,
'PUTSINGLE' : '' ,
'PAYTIME' : '' ,
'PAYRMB' : '0' ,
'PAYUSD' : '0'
} ) ;
var bodyList = [ ] ;
bodyList . push ( _op _blissue ) ;
var jsonBody = ConvertRecordsToJsonAll ( bodyList ) ;
if ( jsonBody == '' ) {
return ;
}
if ( _this . IS欠费超期 == 'yes' ) {
Ext . Msg . show ( { title : Zi . LAN . TiShi , msg : '欠费超期,不允许放单通知!' , icon : Ext . Msg . INFO , buttons : Ext . Msg . OK } ) ;
return ;
}
Ext . Ajax . request ( {
waitMsg : Zi . LAN . ZhengZaiCaoZuoShuJu ,
url : '/MvcShipping/MsOp_BLISSUE/FDTZ' ,
params : {
USERID : USERID ,
data : jsonBody ,
REASON : REASON
} ,
callback : function ( options , success , response ) {
if ( success ) {
this . winFDTZShow . close ( ) ;
Ext . getCmp ( "REASON" ) . setValue ( "" ) ;
this . storeList . reload ( ) ;
//this.onRefreshClick();
}
} ,
failure : function ( response , options ) {
Ext . Msg . show ( { title : Zi . LAN . JingGao , msg : Zi . LAN . FuWuQiXiangYingChuCuo , icon : Ext . Msg . INFO , buttons : Ext . Msg . OK } ) ;
} ,
success : function ( response , options ) { } ,
scope : this
} ) ; //end Ext.Ajax.request
} ,
getFDINFO : function ( result ) {
var _html = "<span style=\"clear:both;\">" ;
_this = this ;
_this . 结费类型 = result . data [ 0 ] . result . data [ 0 ] . 结费类型 . replace ( "<span style=\"colorred\">" , " " ) . replace ( "</span>" , " " ) ;
_this . 欠费超期 = result . data [ 0 ] . 欠费超期 ;
_this . 累计欠费 = result . data [ 0 ] . 累计欠费 ;
_this . 信用额度 = result . data [ 0 ] . 信用额度 ;
_this . IS欠费超期 = result . data [ 0 ] . IS欠费超期 ;
_html = _html + "<span style=\"clear:both;color:#000000;backgroud-color:#FF0000\"><p>  " + result . data [ 0 ] . 结费类型 + "</p></span>" ;
_html = _html + "<span style=\"color:#000000;backgroud-color:#FF0000\"><p>  " + result . data [ 0 ] . 欠费超期 + "</p></span>" ;
_html = _html + "<span style=\"color:#000000;backgroud-color:#FF0000\"><p>  " + result . data [ 0 ] . 累计欠费 + "</p></span>" ;
_html = _html + "<span style=\"color:#000000;backgroud-color:#FF0000\"><p>  " + result . data [ 0 ] . 信用额度 + "</p></span>" ;
_html = _html + "<br></br>" ;
if ( result . data [ 0 ] . IS欠费超期 == "yes" ) {
_html = _html + "  <span style=\"color:#900000;text-decoration:none;\">欠费超期</span>" ;
}
if ( result . data [ 0 ] . IS累计欠费 == "yes" ) {
_html = _html + "  <span style=\"color:#900000;text-decoration:none;\">总欠费超额度</span>" ;
}
_html = _html + "</span><p></p>" ;
return _html ;
} ,
//#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_airi' ;
ret [ 5 ] = this . storePLList ;
return ret ;
} ,
Print : function ( ) {
_this = this ;
if ( this . storeList . getCount ( ) == 0 ) {
return ;
}
var bsno = '11111' ;
var selections = this . gridList . getSelectionModel ( ) . getSelection ( ) ;
if ( selections . length != 0 ) {
var record = selections [ 0 ] ;
bsno = record . data . BSNO ;
}
var sortstr = 'ETD,MBLNO ' ;
if ( this . sortfield != '' && this . sortdire != '' ) {
sortstr = this . sortfield + ' ' + this . sortdire ;
}
Ext . Msg . wait ( '正在组织数据, 请稍侯..' ) ;
Ext . Ajax . request ( {
waitMsg : '正在组织数据...' ,
url : '/MvcShipping/MsOpAiri/GetDataListStr' ,
scope : this ,
params : {
condition : _this . sqlcontext ,
printstr : 'true' ,
sort : sortstr
} ,
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 = 'MSOPAIRILIST' ;
var sql1 = returnstr ;
var sql2 = "select * from op_airi where BSNO='" + bsno + "'" ;
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
} ) ;
}
}
} ) ;
} , //#region 2018年2月7日 李进举 鼎世 批量整票提交
onPiLiangZhengPiaoTiJiaoClick : function ( menu , event , type ) {
var selections = this . GridCheckBoxModel . selected . items ;
if ( selections . length == 0 ) {
Ext . Msg . show ( { title : Zi . LAN . TiShi , msg : Zi . LAN . QingXianXuanZeYeWu , 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 : Zi . LAN . TiShi , msg : Zi . LAN . MeiYouYaoGengXinDeYeWu , icon : Ext . Msg . INFO , buttons : Ext . Msg . OK } ) ;
return ;
} else {
Ext . Ajax . request ( {
waitMsg : '正在查询主表数据...' ,
url : '/MvcShipping/MsOpSeae/PiLiangZhengPiaoTiJiao' ,
params : {
bsno : BSNOStr ,
statusvalue : 1
} ,
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 {
this . storeList . load ( {
params : { start : 0 , limit : this . PageSize , sort : '' , condition : _this . sqlcontext , load : 'true' } ,
waitMsg : Zi . LAN . ZhengZaiChaXunShuJu , //"正在查询数据...",
scope : this
} ) ;
Ext . Msg . show ( {
title : '提示' ,
msg : result . Message ,
icon : Ext . MessageBox . OK ,
buttons : Ext . Msg . OK
} ) ;
}
} else {
Ext . MessageBox . alert ( '请求出现错误,请重试' , response . responseText ) ;
}
} ,
scope : this
} ) ;
}
} ,
//#endregion
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 sortstr = 'MBLNO desc' ;
if ( this . sortfield != '' && this . sortdire != '' ) {
sortstr = this . sortfield + ' ' + this . sortdire ;
}
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 = 'MSOPAIRILISTSELECT' ;
var sql1 = "select * from op_airi WHERE MASTERNO IN (" + feeGidSql + ") order by " + sortstr ;
var sql2 = "select * from op_airi where BSNO='" + bsno + "'" ;
var sql3 = "" ;
var sql4 = "" ;
var sql5 = "" ;
var sql6 = "" ;
PrintComm ( printType , sql1 , sql2 , sql3 , sql4 , sql5 , sql6 ) ;
}
} ) ;