@ -3411,6 +3411,196 @@ Ext.extend(Shipping.MsOpSeaiIndex, Ext.Panel, {
} ) ;
//#region 集团委托
this . storeCompany = Ext . create ( 'DsExt.ux.RefTableStore' , {
model : 'MsCompanysEntity' ,
proxy : { url : '/MvcShipping/MsCompanys/GetNoPicDataList' }
} ) ;
this . storeCompany . load ( { params : { condition : "" } } ) ;
this . comboxCompany = Ext . create ( 'DsExt.ux.RefTableCombox' , {
fieldLabel : Zi . LAN . COMPANY , //'委托分公司',
store : this . storeCompany ,
width : 80 ,
name : 'COMPANY' ,
valueField : 'FULLNAME' ,
displayField : 'NAME' ,
listeners : {
scope : this ,
'select' : function ( combo , records , eOpts ) {
if ( records . length > 0 ) {
//this.storeUser.load({ params: { condition: "CORPID='" + combo.value + "'", dbname: records[0].data.DBNAME } });
this . storeUser . load ( { params : { comp : combo . value , dbname : records [ 0 ] . data . DBNAME } } ) ;
}
}
}
} ) ;
//this.storeUser = Ext.create('DsExt.ux.RefTableStore', {
// model: 'DsShipping.ux.UserRefModel',
// proxy: { url: '/CommMng/BasicDataRef/GetUserRefList' }
//});
this . storeUser = Ext . create ( 'DsExt.ux.RefTableStore' , {
model : 'DsShipping.ux.UserRefModel' ,
proxy : { url : '/MvcShipping/MsOpSeae/GetCompUserList' }
} ) ;
this . comboxSeaeOp = Ext . create ( 'Ext.ux.form.field.BoxSelect' , {
fieldLabel : Zi . LAN . OP , //'操作',
//renderTo: 'basicBoxselect',
//autoHeight:true,
autosize : true ,
bodyPadding : 1 ,
flex : 2 ,
//height:60,
width : 80 ,
labelWidth : 90 ,
store : this . storeUser ,
queryMode : 'local' ,
//stacked: true,
//pinList: false,
triggerOnClick : false ,
valueField : 'UserName' ,
displayField : 'CodeAndName'
} ) ;
this . comboxSeaeCustService = Ext . create ( 'DsExt.ux.RefTableCombox' , {
fieldLabel : Zi . LAN . CUSTSERVICE , //'客服',
store : this . storeUser ,
name : 'CUSTSERVICE' ,
width : 80 ,
valueField : 'UserName' ,
displayField : 'CodeAndName'
} ) ;
this . storeFeeType = Ext . create ( 'Ext.data.Store' , {
fields : [ 'ID' , 'NAME' ]
} ) ;
//this.storeFeeType.add({ "ID": "0", "NAME": "" });
this . storeFeeType . add ( { "ID" : "1" , "NAME" : "应收" } ) ;
this . storeFeeType . add ( { "ID" : "2" , "NAME" : "应付" } ) ;
this . storeFeeType . add ( { "ID" : "0" , "NAME" : "全部" } ) ;
this . comboxFEETYPE = Ext . create ( 'DsExt.ux.RefTableCombox' , {
store : this . storeFeeType , //id: "STLNAME",
fieldLabel : Zi . LAN . FEETYPE ,
forceSelection : true ,
name : 'FeeType' ,
value : "0" ,
valueField : 'ID' ,
displayField : 'NAME'
} ) ;
this . formSubCompOrder = Ext . widget ( 'form' , {
frame : true ,
region : 'center' ,
bodyPadding : 5 ,
fieldDefaults : {
margins : '2 2 2 2' ,
labelAlign : 'right' ,
flex : 1 ,
labelWidth : 90 ,
msgTarget : 'qtip'
} ,
items : [
{ //fieldset 1
xtype : 'container' ,
defaultType : 'textfield' ,
layout : 'anchor' ,
defaults : {
anchor : '100%'
} ,
items : [ {
xtype : 'container' ,
layout : 'hbox' ,
defaultType : 'textfield' ,
items : [ this . comboxCompany
]
} , {
xtype : 'container' ,
layout : 'hbox' ,
defaultType : 'textfield' ,
items : [ this . comboxSeaeOp
]
} , {
xtype : 'container' ,
layout : 'hbox' ,
defaultType : 'textfield' ,
items : [ this . comboxSeaeCustService
]
} , {
xtype : 'container' ,
layout : 'hbox' ,
defaultType : 'textfield' ,
items : [ this . comboxFEETYPE
]
}
] //end items(fieldset 1)
} //end fieldset 1
] //end root items
} ) ;
this . winSubCompOrder = Ext . create ( 'Ext.window.Window' , {
title : Zi . LAN . ShengChengFenBuWeiTuo , //"生成分部委托",
width : 550 ,
//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 . formSubCompOrder ] ,
buttons : [ {
text : Zi . LAN . QueRenShengCheng , //"确认生成",
minWidth : 70 ,
handler : function ( ) {
var form = _this . formSubCompOrder . getForm ( ) ;
var ACCDATE = form . findField ( 'COMPANY' ) . getValue ( ) ;
if ( ACCDATE == '' || ACCDATE == null || ACCDATE == undefined ) {
Ext . Msg . show ( { title : Zi . LAN . TiShi , msg : Zi . LAN . WeiTuoFenGongSiWeiBiTian , icon : Ext . Msg . INFO , buttons : Ext . Msg . OK } ) ; //'委托分公司为必填!'
return ;
} ;
_this . subordercomp = ACCDATE ;
var User = _this . comboxSeaeOp . getValue ( ) ;
if ( User == '' || User == null || User == undefined ) {
Ext . Msg . show ( { title : Zi . LAN . TiShi , msg : Zi . LAN . CaoZuoYuanWeiBiTian , icon : Ext . Msg . INFO , buttons : Ext . Msg . OK } ) ; //'操作员为必填!'
return ;
} ;
var CnameString = "" ;
for ( var i in User ) {
if ( CnameString == "" ) { CnameString = User [ i ] ; }
else { CnameString = CnameString + "," + User [ i ] + "" ; }
}
_this . suborderop = CnameString ;
_this . subordercustservice = _this . comboxSeaeCustService . getValue ( ) ;
_this . suborderfeetype = form . findField ( 'FeeType' ) . getValue ( ) ;
_this . onSubCompOrderClick ( ) ;
}
} , {
text : Zi . LAN . GuanBi , //"关闭",
minWidth : 70 ,
handler : function ( ) {
_this . winSubCompOrder . close ( ) ;
}
} ]
} ) ;
//#endregion
//this.callParent(arguments);
} , //end initUIComponents
@ -5164,8 +5354,72 @@ Ext.extend(Shipping.MsOpSeaiIndex, Ext.Panel, {
} ,
//#endregion
//#region 集团委托
onSubCompOrderClick : function ( ) {
var BSNOStr = '' ;
var GidStr = '' ;
var records = this . GridCheckBoxModel . selected . items ;
if ( records . length == 0 ) {
Ext . Msg . show ( { title : Zi . LAN . TiShi , msg : Zi . LAN . QingXianXuanZeYeWu , icon : Ext . Msg . INFO , buttons : Ext . Msg . OK } ) ; //请先选择要修改的业务!
return ;
}
var bodyAddDatas = [ ] ;
for ( var i = 0 ; i < records . length ; i ++ ) {
var rec = records [ i ] ;
bodyAddDatas . push ( rec ) ;
var BSNO = rec . data . BSNO ;
if ( BSNOStr == '' )
BSNOStr = "'" + BSNO + "'" ;
else {
BSNOStr = BSNOStr + ",'" + BSNO + "'" ;
}
}
_this = this ;
if ( bodyAddDatas . length == 0 ) {
Ext . Msg . show ( { title : Zi . LAN . TiShi , msg : Zi . LAN . MeiYouYaoShengChengDeShuJu , icon : Ext . Msg . INFO , buttons : Ext . Msg . OK } ) ;
return ;
} else {
var jsonbodyAddDatas = ConvertRecordsToJsonAll ( bodyAddDatas ) ;
Ext . Msg . wait ( Zi . LAN . ZhengZaiCaoZuoShuJu ) ;
Ext . Ajax . request ( {
waitMsg : Zi . LAN . ZhengZaiCaoZuoShuJu , //'正在保存数据...',
url : '/MvcShipping/MsOpSeae/SaveToSeaiList' ,
scope : this ,
params : {
body : jsonbodyAddDatas ,
comp : _this . subordercomp ,
op : _this . suborderop ,
custservice : _this . subordercustservice
} ,
callback : function ( options , success , response ) {
if ( success ) {
Ext . MessageBox . hide ( ) ;
var jsonresult = Ext . JSON . decode ( response . responseText ) ;
if ( jsonresult . Success ) {
_this . winSubCompOrder . close ( ) ;
Ext . Msg . show ( { title : Zi . LAN . TiShi , msg : jsonresult . Message , icon : Ext . Msg . INFO , buttons : Ext . Msg . OK } ) ;
} else {
Ext . Msg . show ( { title : Zi . LAN . ChuoWu , msg : jsonresult . Message , icon : Ext . Msg . ERROR , buttons : Ext . Msg . OK } ) ;
}
} else {
Ext . Msg . show ( { title : Zi . LAN . JingGao , msg : Zi . LAN . FuWuQiXiangYingChuCuo , icon : Ext . Msg . ERROR , buttons : Ext . Msg . OK } ) ;
}
}
} ) ;
}
} ,
//#endregion
//#region 导出Excel
onExportClick : function ( button , event ) {
//var strGIDs = "";