@ -60,32 +60,32 @@ Ext.extend(Shipping.ChSettlementPayAppEdit, Ext.Panel, {
} ) ;
// this.StoreUnLockOp.load({ params: { optype: "modPayFeeSettlementUnLock"} });
this . storecustbank = Ext . create ( 'DsExt.ux.RefTableStore' , {
model : 'MsInfoClientBankModel' ,
proxy : { url : '/MvcShipping/MsInfoClient/GetBankList' }
} ) ;
this . comboxCustBank = Ext . create ( 'DsExt.ux.RefTableCombox' , {
fieldLabel : Zi . LAN . CustomerBank ,
store : this . storecustbank ,
forceSelection : true ,
labelWidth : 70 ,
name : 'CUSTBANK' ,
valueField : 'GID' ,
displayField : 'ACCOUNTNAMEREF' ,
listeners : {
scope : this ,
'select' : function ( combo , records , eOpts ) {
if ( records . length > 0 ) {
var CUSTACCOUNT = this . formEdit . getForm ( ) . findField ( 'CUSTACCOUNT' ) ;
CUSTACCOUNT . setValue ( records [ 0 ] . data . ACCOUNT ) ;
}
//this.storecustbank = Ext.create('DsExt.ux.RefTableStore', {
// model: 'MsInfoClientBankModel',
// proxy: { url: '/MvcShipping/MsInfoClient/GetBankList' }
//});
//this.comboxCustBank = Ext.create('DsExt.ux.RefTableCombox', {
// fieldLabel: Zi.LAN.CustomerBank ,
// store: this.storecustbank,
// forceSelection: true,
// labelWidth: 70,
// name: 'CUSTBANK',
// valueField: 'GID',
// displayField: 'ACCOUNTNAMEREF',
// listeners: {
// scope: this,
// 'select': function (combo, records, eOpts) {
// if (records.length > 0) {
// var CUSTACCOUNT = this.formEdit.getForm().findField('CUSTACCOUNT');
// CUSTACCOUNT.setValue(records[0].data.ACCOUNT);
// }
}
}
} ) ;
// }
// }
//});
//#region 编辑form
@ -154,8 +154,8 @@ Ext.extend(Shipping.ChSettlementPayAppEdit, Ext.Panel, {
store : this . StoreCurr ,
forceSelection : true ,
emptyText : '原币结算' , //原币申请
labelWidth : 60 ,
flex : 0.5 ,
//labelWidth: 60,
//flex: 0.5,
name : 'CURR' ,
valueField : 'CURR' ,
displayField : 'CURR' ,
@ -228,8 +228,8 @@ Ext.extend(Shipping.ChSettlementPayAppEdit, Ext.Panel, {
this . StoreBANK . load ( { params : { condition : "CURRENCY='RMB'" } } ) ;
this . StoreBANK . on ( 'beforeload' , function ( store ) {
var companyid = this . formEdit . getForm ( ) . findField ( 'SALECORPID' ) . getValue ( ) ;
Ext . apply ( store . proxy . extraParams , { companyid : companyid } ) ;
//var companyid = this.formEdit.getForm().findField('SALECORPID').getValue();
Ext . apply ( store . proxy . extraParams , { companyid : '' } ) ;
} , this ) ;
this . comboxBANK = Ext . create ( 'DsExt.ux.RefTableCombox' , {
@ -250,8 +250,8 @@ Ext.extend(Shipping.ChSettlementPayAppEdit, Ext.Panel, {
this . StoreBANKUSD . load ( { params : { condition : "CURRENCY='USD'" } } ) ;
this . StoreBANKUSD . on ( 'beforeload' , function ( store ) {
var companyid = this . formEdit . getForm ( ) . findField ( 'SALECORPID' ) . getValue ( ) ;
Ext . apply ( store . proxy . extraParams , { companyid : companyid } ) ;
// var companyid = this.formEdit.getForm().findField('SALECORPID').getValue();
Ext . apply ( store . proxy . extraParams , { companyid : '' } ) ;
} , this ) ;
this . comboxBANKUSD = Ext . create ( 'DsExt.ux.RefTableCombox' , {
fieldLabel : 'USD银行账号' ,
@ -310,7 +310,7 @@ Ext.extend(Shipping.ChSettlementPayAppEdit, Ext.Panel, {
store : this . storeBILLTYPE ,
valueField : 'FSTATUS' ,
displayField : 'NAME' ,
flex : 0.5 ,
//flex: 0.5,
labelWidth : 70 ,
// flex: 0.7,
// labelWidth: 55,
@ -423,7 +423,11 @@ Ext.extend(Shipping.ChSettlementPayAppEdit, Ext.Panel, {
// flex: 0.5,
readOnly : true ,
name : 'BILLSTATUSREF'
} , this . comboxCustCode , {
} , {
fieldLabel : Zi . LAN . SettlementNo ,
flex : 1 ,
name : 'SETTLENO'
} , this . comboxCustCode , {
fieldLabel : Zi . LAN . SettlementTime ,
format : 'Y-m-d H:i:s' ,
xtype : 'datefield' ,
@ -489,24 +493,6 @@ Ext.extend(Shipping.ChSettlementPayAppEdit, Ext.Panel, {
}
} , this . comboxBANKUSD ]
} , {
xtype : 'container' ,
layout : 'hbox' ,
defaultType : 'textfield' ,
items : [ this . comboxCustBank , {
fieldLabel : Zi . LAN . CustomerAccount ,
flex : 1 ,
name : 'CUSTACCOUNT'
} , this . comboxSTLCATEGROY , this . comboxSaleCompany , {
fieldLabel : Zi . LAN . Remark ,
flex : 1 ,
name : 'REMARK'
} , {
fieldLabel : Zi . LAN . SettlementNo ,
flex : 1 ,
name : 'SETTLENO'
} ]
}
] //end items(fieldset 1)
} //end fieldset 1
@ -1724,21 +1710,20 @@ Ext.extend(Shipping.ChSettlementPayAppEdit, Ext.Panel, {
}
}
}
} , {
fieldLabel : Zi . LAN . Port ,
//format: 'Y-m-d',
labelWidth : 90 ,
xtype : 'textfield' ,
name : 'PORT' ,
enableKeyEvents : true ,
listeners : {
specialkey : function ( field , e ) {
if ( e . getKey ( ) == e . ENTER ) {
_this . onRefreshClick ( ) ;
} , {
fieldLabel : Zi . LAN . Number ,
tooltip : Zi . LAN . DelegateNumber + '、' + Zi . LAN . LadingNumber + '、' + Zi . LAN . FenladingNumber ,
name : 'BH' ,
labelWidth : 40 ,
enableKeyEvents : true ,
listeners : {
specialkey : function ( field , e ) {
if ( e . getKey ( ) == e . ENTER ) {
_this . onRefreshClick ( ) ;
}
}
}
}
} , this . comboxIsDebit , {
} , this . comboxCurr2 , {
xtype : 'button' ,
width : 45 ,
text : "" ,
@ -1766,36 +1751,17 @@ Ext.extend(Shipping.ChSettlementPayAppEdit, Ext.Panel, {
} ,
scope : this
}
]
} ,
{
xtype : 'container' ,
layout : 'hbox' ,
defaultType : 'textfield' ,
items : [ {
fieldLabel : Zi . LAN . Number ,
tooltip : Zi . LAN . DelegateNumber + '、' + Zi . LAN . LadingNumber + '、' + Zi . LAN . FenladingNumber ,
name : 'BH' ,
labelWidth : 40 ,
enableKeyEvents : true ,
listeners : {
specialkey : function ( field , e ) {
if ( e . getKey ( ) == e . ENTER ) {
_this . onRefreshClick ( ) ;
}
}
} , {
xtype : 'button' ,
width : 90 ,
text : Zi . LAN . SearchOrRefresh ,
iconCls : "btnrefresh" ,
handler : function ( button , event ) {
this . onRefreshClick ( ) ;
} ,
scope : this
}
} , this . comboxCurr2 , this . comboxSALECORPID , this . comboxStlMode2 , { xtype : 'hiddenfield' } , { xtype : 'hiddenfield' } , {
xtype : 'button' ,
width : 90 ,
text : Zi . LAN . SearchOrRefresh ,
iconCls : "btnrefresh" ,
handler : function ( button , event ) {
this . onRefreshClick ( ) ;
} ,
scope : this
} ]
]
}
] //end items(fieldset 1)
} //end fieldset 1
@ -3527,7 +3493,7 @@ Ext.extend(Shipping.ChSettlementPayAppEdit, Ext.Panel, {
this . panelTop = new Ext . Panel ( {
layout : "border" ,
region : "north" ,
height : 1 4 5,
height : 1 1 5,
items : [ this . panelBtn , this . formEdit ]
} ) ;
this . panelBody = new Ext . Panel ( {
@ -4259,11 +4225,11 @@ Ext.extend(Shipping.ChSettlementPayAppEdit, Ext.Panel, {
var CUSTOMERNAME = this . formEdit . getForm ( ) . findField ( 'CUSTOMERNAME' ) . getValue ( ) ;
var CURR = this . formEdit . getForm ( ) . findField ( 'CURR' ) . getValue ( ) ;
var CUSTBANK = this . formEdit . getForm ( ) . findField ( 'CUSTBANK' ) . getValue ( ) ;
var CUSTACCOUNT = this . formEdit . getForm ( ) . findField ( 'CUSTACCOUNT' ) . getValue ( ) ;
//var CUSTBANK = this.formEdit.getForm().findField('CUSTBANK').getValue();
//var CUSTACCOUNT = this.formEdit.getForm().findField('CUSTACCOUNT').getValue();
var PARAMVALUE = this . formSearch . getForm ( ) . findField ( 'PARAMVALUE' ) . getValue ( ) ;
var BILLNO = this . formEdit . getForm ( ) . findField ( 'BILLNO' ) . getValue ( ) ;
var SALECORPID = this . formEdit . getForm ( ) . findField ( 'SALECORPID' ) . getValue ( ) ;
//var SALECORPID = this.formEdit.getForm().findField('SALECORPID').getValue();
if ( addcurr == '' ) {
if ( ( CURR == '' ) || ( CURR == null ) ) {
@ -4309,12 +4275,12 @@ Ext.extend(Shipping.ChSettlementPayAppEdit, Ext.Panel, {
// else if (rec.data.USDBALAMOUNT != 0) this.formEdit.getForm().findField('CURR').setValue('USD');
//}
}
if ( ( CUSTBANK == '' ) || ( CUSTBANK == null ) )
this . formEdit . getForm ( ) . findField ( 'CUSTBANK' ) . setValue ( addcustbank ) ;
if ( ( CUSTACCOUNT == '' ) || ( CUSTACCOUNT == null ) )
this . formEdit . getForm ( ) . findField ( 'CUSTACCOUNT' ) . setValue ( addcustaccount ) ;
if ( ( SALECORPID == '' ) || ( SALECORPID == null ) )
this . formEdit . getForm ( ) . findField ( 'SALECORPID' ) . setValue ( addsalecorpid ) ;
//if ((CUSTBANK == '') || (CUSTBANK == null))
// this.formEdit.getForm().findField('CUSTBANK').setValue(addcustbank);
//if ((CUSTACCOUNT == '') || (CUSTACCOUNT == null))
// this.formEdit.getForm().findField('CUSTACCOUNT').setValue(addcustaccount);
//if ((SALECORPID == '') || (SALECORPID == null))
// this.formEdit.getForm().findField('SALECORPID').setValue(addsalecorpid);
if ( PARAMVALUE == '1' ) {
if ( BILLNO == '*' || BILLNO == '' ) {
var addbillno = rec . data . BILLNO ;
@ -4326,7 +4292,7 @@ Ext.extend(Shipping.ChSettlementPayAppEdit, Ext.Panel, {
}
var CUST = this . formEdit . getForm ( ) . findField ( 'CUSTOMERNAME' ) . getValue ( ) ;
this . storecustbank . load ( { params : { condition : " LINKID=(SELECT TOP 1 GID FROM INFO_CLIENT WHERE SHORTNAME='" + CUST + "')" } } ) ;
//this.storecustbank.load({ params: { condition: " LINKID=(SELECT TOP 1 GID FROM INFO_CLIENT WHERE SHORTNAME='" + CUST + "')"} });
if ( ! basicForm . isValid ( ) ) {
btnEAddbill . enable ( ) ;
@ -5602,25 +5568,25 @@ Ext.extend(Shipping.ChSettlementPayAppEdit, Ext.Panel, {
LoadCustACCOUNT : function ( CUSTOMERNAME ) {
var CURR = this . formEdit . getForm ( ) . findField ( 'CURR' ) . getValue ( ) ;
var CUSTBANK = this . formEdit . getForm ( ) . findField ( 'CUSTBANK' ) ;
var CUSTACCOUNT = this . formEdit . getForm ( ) . findField ( 'CUSTACCOUNT' ) ;
var condition = " LINKID=(select TOP 1 GID from info_client where shortname='" + CUSTOMERNAME + "') " ;
if ( CURR != "" && CURR != undefined ) {
condition = condition + " and CURRENCY='" + CURR + "'" ;
}
//var CURR = this.formEdit.getForm().findField('CURR').getValue();
//var CUSTBANK = this.formEdit.getForm().findField('CUSTBANK');
//var CUSTACCOUNT = this.formEdit.getForm().findField('CUSTACCOUNT');
//var condition = " LINKID=(select TOP 1 GID from info_client where shortname='" + CUSTOMERNAME + "') ";
//if (CURR != "" && CURR != undefined) {
// condition = condition + " and CURRENCY='" + CURR + "'";
//}
this . storecustbank . load ( { params : { condition : condition } ,
callback : function ( r , options , success ) {
if ( success ) {
if ( r . length != 0 ) {
// CUSTBANK.setValue(this.storecustbank.data.items[0].data.GID);
// CUSTACCOUNT.setValue(this.storecustbank.data.items[0].data.ACCOUNT);
}
}
} ,
scope : this
} ) ;
// this.storecustbank.load({ params: { condition: condition },
// callback: function (r, options, success) {
// if (success) {
// if (r.length != 0) {
// // CUSTBANK.setValue(this.storecustbank.data.items[0].data.GID);
// // CUSTACCOUNT.setValue(this.storecustbank.data.items[0].data.ACCOUNT);
// }
// }
// },
// scope: this
// });
} ,
onClearSql : function ( ) {
@ -5647,12 +5613,12 @@ Ext.extend(Shipping.ChSettlementPayAppEdit, Ext.Panel, {
var CUSTNAME = form . findField ( 'CUSTNAME' ) . getValue ( ) ;
sql = sql + getAndConSql ( sql , CUSTNAME , " CUSTOMERNAME='" + CUSTNAME + "'" ) ;
var SALECORPID = form . findField ( 'SALECORPID' ) . getValue ( ) ;
sql = sql + getAndConSql ( sql , SALECORPID , " SALECORPID='" + SALECORPID + "'" ) ;
//var SALECORPID = form.findField('SALECORPID').getValue();
//sql = sql + getAndConSql(sql, SALECORPID, " SALECORPID='" + SALECORPID + "'");
var SETTLETYPE = form . findField ( 'SETTLETYPE' ) . getValue ( ) ;
sql = sql + getAndConSql ( sql , SETTLETYPE , " SETTLETYPE='" + SETTLETYPE + "'" ) ;
//var SETTLETYPE = form.findField('SETTLETYPE').getValue();
//sql = sql + getAndConSql(sql, SETTLETYPE, " SETTLETYPE='" + SETTLETYPE + "'");
var Currency = form . findField ( 'Currency' ) . getValue ( ) ;
if ( Currency != '' ) {
@ -5667,12 +5633,12 @@ Ext.extend(Shipping.ChSettlementPayAppEdit, Ext.Panel, {
var expDateEnd = form . findField ( 'ExpDateEnd' ) . getRawValue ( ) ;
sql = sql + getAndConSql ( sql , expDateEnd , "APPLYTIME <='" + expDateEnd + "'" ) ;
var PORT = form . findField ( 'PORT' ) . getValue ( ) ;
sql = sql + getAndConSql ( sql , PORT , " (PORTLOAD like '%" + PORT + "%' or PORTDISCHARGE like '%" + PORT + "%') " ) ;
//var PORT = form.findField('PORT').getValue();
//sql = sql + getAndConSql(sql, PORT, " (PORTLOAD like '%" + PORT + "%' or PORTDISCHARGE like '%" + PORT + "%') ");
var DC = form . findField ( 'ISDEBIT' ) . getValue ( ) ;
if ( DC == '1' )
sql = sql + getAndConSql ( sql , DC , " (BILLSTATUS=0 OR BILLSTATUS=5) " ) ;
//var DC = form.findField('ISDEBIT').getValue();
//if (DC == '1')
// sql = sql + getAndConSql(sql, DC, " (BILLSTATUS=0 OR BILLSTATUS=5) ");
// this.FeeSqlStr = this.getFeeCondition();