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