|
|
|
@ -234,7 +234,7 @@ Ext.extend(Shipping.MsChRecvSettlementBLEdit, Ext.Panel, {
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
//}
|
|
|
|
|
this.LoadDateCurr();
|
|
|
|
|
this.LoadDateCurr(true);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -422,7 +422,7 @@ Ext.extend(Shipping.MsChRecvSettlementBLEdit, Ext.Panel, {
|
|
|
|
|
name: 'SETTLETIME',
|
|
|
|
|
listeners: {
|
|
|
|
|
change: function () {
|
|
|
|
|
_this.LoadDateCurr();
|
|
|
|
|
_this.LoadDateCurr(true);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
@ -1189,7 +1189,7 @@ Ext.extend(Shipping.MsChRecvSettlementBLEdit, Ext.Panel, {
|
|
|
|
|
},
|
|
|
|
|
selModel: this.AddGridCheckBoxModel,
|
|
|
|
|
tbar: [{
|
|
|
|
|
text: Zi.LAN.AddJSDetail,
|
|
|
|
|
text: Zi.LAN.AddJSDetail,//添加结算明细
|
|
|
|
|
tooltip: Zi.LAN.AddJSDetail,
|
|
|
|
|
id: 'btnaddbill',
|
|
|
|
|
iconCls: "btnadddetail",
|
|
|
|
@ -1460,7 +1460,7 @@ Ext.extend(Shipping.MsChRecvSettlementBLEdit, Ext.Panel, {
|
|
|
|
|
},
|
|
|
|
|
selModel: this.AddFeeGridCheckBoxModel,
|
|
|
|
|
tbar: [{
|
|
|
|
|
text: Zi.LAN.AddSelFeeDetail ,
|
|
|
|
|
text: Zi.LAN.AddSelFeeDetail ,//添加结算费用明细
|
|
|
|
|
tooltip: Zi.LAN.AddSelFeeDetail ,
|
|
|
|
|
iconCls: "btnadddetail",
|
|
|
|
|
id: "btnadddetail",
|
|
|
|
@ -4834,7 +4834,7 @@ Ext.extend(Shipping.MsChRecvSettlementBLEdit, Ext.Panel, {
|
|
|
|
|
SALECORP = rec.data.SALECORP;
|
|
|
|
|
if ((CUSTOMERNAME == '') || (CUSTOMERNAME == null))
|
|
|
|
|
this.formEdit.getForm().findField('CUSTOMERNAME').setValue(cust);
|
|
|
|
|
if ((CURR == '') || (CURR == null)) {
|
|
|
|
|
if (CURR != curr) {
|
|
|
|
|
this.formEdit.getForm().findField('CURR').setValue(curr);
|
|
|
|
|
if (curr == 'RMB') {
|
|
|
|
|
this.formEdit.getForm().findField('RATE').setValue(1);
|
|
|
|
@ -4854,27 +4854,76 @@ Ext.extend(Shipping.MsChRecvSettlementBLEdit, Ext.Panel, {
|
|
|
|
|
// this.formEdit.getForm().findField('RATE').setValue(1);
|
|
|
|
|
// }
|
|
|
|
|
//}
|
|
|
|
|
if (_this.StoreDateCurr.getCount() > 0) {
|
|
|
|
|
this.LoadDateCurr()
|
|
|
|
|
}
|
|
|
|
|
//this.LoadDateCurr();
|
|
|
|
|
////等待300毫秒后重新执行
|
|
|
|
|
//_return = true;
|
|
|
|
|
//setTimeout(this.addDetail, 300);
|
|
|
|
|
|
|
|
|
|
for (var i = 0; i < _this.StoreDateCurr.getCount(); i += 1) {
|
|
|
|
|
var member = _this.StoreDateCurr.getAt(i);
|
|
|
|
|
if (member.data.CURR == CURR) {
|
|
|
|
|
this.formEdit.getForm().findField('RATE').setValue(member.data.DEFRATE);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
var CUST = this.formEdit.getForm().findField('CUSTOMERNAME').getValue();
|
|
|
|
|
var recs = DsStoreQueryBy(this.storeCustCode, 'CustName', CUST);
|
|
|
|
|
var CUSTBANK = this.formEdit.getForm().findField('CUSTBANK');
|
|
|
|
|
var CUSTACCOUNT = this.formEdit.getForm().findField('CUSTACCOUNT');
|
|
|
|
|
var CURR = this.formEdit.getForm().findField('CURR').getValue();
|
|
|
|
|
if (recs.getCount() > 0) {
|
|
|
|
|
var data = recs.getAt(0).data;
|
|
|
|
|
if (CURR == 'RMB') {
|
|
|
|
|
CUSTBANK.setValue(data.RMBBank);
|
|
|
|
|
CUSTACCOUNT.setValue(data.RMBAccount);
|
|
|
|
|
} else if (CURR == 'USD') {
|
|
|
|
|
CUSTBANK.setValue(data.USDBank);
|
|
|
|
|
CUSTACCOUNT.setValue(data.USDAccount);
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
var DFrecords = DsStoreQueryBy(this.StoreCurr, 'CURR', CURR);
|
|
|
|
|
if (DFrecords.getCount() > 0) {
|
|
|
|
|
var dfdata = DFrecords.getAt(0).data;
|
|
|
|
|
var DEFRATE = dfdata.DEFRATE;
|
|
|
|
|
this.formEdit.getForm().findField('RATE').setValue(DEFRATE);
|
|
|
|
|
} else {
|
|
|
|
|
this.formEdit.getForm().findField('RATE').setValue(1);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
CUSTBANK.setValue('');
|
|
|
|
|
CUSTACCOUNT.setValue('');
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//if ((CURR == '') || (CURR == null)) {
|
|
|
|
|
// this.formEdit.getForm().findField('CURR').setValue(curr);
|
|
|
|
|
// if (curr == 'RMB') {
|
|
|
|
|
// this.formEdit.getForm().findField('RATE').setValue(1);
|
|
|
|
|
// } else {
|
|
|
|
|
// //var FFrecords = DsStoreQueryBy(this.StoreDateCurr, 'CURR', curr);
|
|
|
|
|
// //if (FFrecords.getCount() > 0) {
|
|
|
|
|
// // var ffdata = FFrecords.getAt(0).data;
|
|
|
|
|
// // var DEFRATE = ffdata.DEFRATE;
|
|
|
|
|
// // this.formEdit.getForm().findField('RATE').setValue(DEFRATE);
|
|
|
|
|
// //} else {
|
|
|
|
|
// // var DFrecords = DsStoreQueryBy(this.StoreCurr, 'CURR', curr);
|
|
|
|
|
// // if (DFrecords.getCount() > 0) {
|
|
|
|
|
// // var dfdata = DFrecords.getAt(0).data;
|
|
|
|
|
// // var DEFRATE = dfdata.DEFRATE;
|
|
|
|
|
// // this.formEdit.getForm().findField('RATE').setValue(DEFRATE);
|
|
|
|
|
// // } else {
|
|
|
|
|
// // this.formEdit.getForm().findField('RATE').setValue(1);
|
|
|
|
|
// // }
|
|
|
|
|
// //}
|
|
|
|
|
// if (_this.StoreDateCurr.getCount() > 0) {
|
|
|
|
|
|
|
|
|
|
// for (var i = 0; i < _this.StoreDateCurr.getCount(); i += 1) {
|
|
|
|
|
// var member = _this.StoreDateCurr.getAt(i);
|
|
|
|
|
// if (member.data.CURR == CURR) {
|
|
|
|
|
// this.formEdit.getForm().findField('RATE').setValue(member.data.DEFRATE);
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// } else {
|
|
|
|
|
// var DFrecords = DsStoreQueryBy(this.StoreCurr, 'CURR', CURR);
|
|
|
|
|
// if (DFrecords.getCount() > 0) {
|
|
|
|
|
// var dfdata = DFrecords.getAt(0).data;
|
|
|
|
|
// var DEFRATE = dfdata.DEFRATE;
|
|
|
|
|
// this.formEdit.getForm().findField('RATE').setValue(DEFRATE);
|
|
|
|
|
// } else {
|
|
|
|
|
// this.formEdit.getForm().findField('RATE').setValue(1);
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
//}
|
|
|
|
|
var CUST = this.formEdit.getForm().findField('CUSTOMERNAME').getValue();
|
|
|
|
|
var recs = DsStoreQueryBy(this.storeCustCode, 'CustName', CUST);
|
|
|
|
|
var CUSTBANK = this.formEdit.getForm().findField('CUSTBANK');
|
|
|
|
@ -7215,15 +7264,15 @@ onSelectFee: function (button, event) {
|
|
|
|
|
|
|
|
|
|
//#region 载入汇率信息
|
|
|
|
|
,
|
|
|
|
|
LoadDateCurr() {
|
|
|
|
|
async LoadDateCurr(needload=false) {
|
|
|
|
|
|
|
|
|
|
_this = this;
|
|
|
|
|
var CURR = this.formEdit.getForm().findField('CURR').getValue();
|
|
|
|
|
if (CURR == 'RMB') {
|
|
|
|
|
this.formEdit.getForm().findField('RATE').setValue(1);
|
|
|
|
|
} else {
|
|
|
|
|
var DateStr = _this.formEdit.getForm().findField("SETTLETIME").getRawValue();
|
|
|
|
|
|
|
|
|
|
var DateStr = _this.formEdit.getForm().findField("SETTLETIME").getRawValue();
|
|
|
|
|
|
|
|
|
|
if (needload) {
|
|
|
|
|
this.StoreDateCurr.load({
|
|
|
|
|
async:false,
|
|
|
|
|
params: {
|
|
|
|
|
DateStr: DateStr
|
|
|
|
|
},
|
|
|
|
@ -7252,6 +7301,78 @@ onSelectFee: function (button, event) {
|
|
|
|
|
},
|
|
|
|
|
scope: this
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var CURR = this.formEdit.getForm().findField('CURR').getValue();
|
|
|
|
|
if (CURR == 'RMB') {
|
|
|
|
|
this.StoreDateCurr.load({
|
|
|
|
|
params: {
|
|
|
|
|
DateStr: DateStr
|
|
|
|
|
},
|
|
|
|
|
callback: function (r, options, success) {
|
|
|
|
|
if (success) {
|
|
|
|
|
//_this.LoadDateCurr();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
scope: this
|
|
|
|
|
});
|
|
|
|
|
this.formEdit.getForm().findField('RATE').setValue(1);
|
|
|
|
|
} else {
|
|
|
|
|
if (_this.StoreDateCurr.getCount() > 0) {
|
|
|
|
|
|
|
|
|
|
for (var i = 0; i < _this.StoreDateCurr.getCount(); i += 1) {
|
|
|
|
|
var member = _this.StoreDateCurr.getAt(i);
|
|
|
|
|
if (member.data.CURR == CURR) {
|
|
|
|
|
this.formEdit.getForm().findField('RATE').setValue(member.data.DEFRATE);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return;
|
|
|
|
|
} else {
|
|
|
|
|
this.StoreDateCurr.load({
|
|
|
|
|
async: false,
|
|
|
|
|
params: {
|
|
|
|
|
DateStr: DateStr
|
|
|
|
|
},
|
|
|
|
|
callback: function (r, options, success) {
|
|
|
|
|
if (success) {
|
|
|
|
|
_this.LoadDateCurr();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
scope: this
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//await this.StoreDateCurr.load({
|
|
|
|
|
// async:false,
|
|
|
|
|
// params: {
|
|
|
|
|
// DateStr: DateStr
|
|
|
|
|
// },
|
|
|
|
|
// callback: function (r, options, success) {
|
|
|
|
|
// if (success) {
|
|
|
|
|
// if (_this.StoreDateCurr.getCount() > 0) {
|
|
|
|
|
|
|
|
|
|
// for (var i = 0; i < _this.StoreDateCurr.getCount(); i += 1) {
|
|
|
|
|
// var member = _this.StoreDateCurr.getAt(i);
|
|
|
|
|
// if (member.data.CURR == CURR) {
|
|
|
|
|
// this.formEdit.getForm().findField('RATE').setValue(member.data.DEFRATE);
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// } else {
|
|
|
|
|
// var DFrecords = DsStoreQueryBy(this.StoreCurr, 'CURR', CURR);
|
|
|
|
|
// if (DFrecords.getCount() > 0) {
|
|
|
|
|
// var dfdata = DFrecords.getAt(0).data;
|
|
|
|
|
// var DEFRATE = dfdata.DEFRATE;
|
|
|
|
|
// this.formEdit.getForm().findField('RATE').setValue(DEFRATE);
|
|
|
|
|
// } else {
|
|
|
|
|
// this.formEdit.getForm().findField('RATE').setValue(1);
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// },
|
|
|
|
|
// scope: this
|
|
|
|
|
//});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|