DS7_JingHan
hanxuntao 2 years ago
parent d23da913e3
commit 318e02fb35

@ -939,7 +939,7 @@ Ext.extend(Shipping.MsChfeeAudit, Ext.Panel, {
this.StoreOpLb.load({ params: { enumTypeId: 96005} }); this.StoreOpLb.load({ params: { enumTypeId: 96005} });
this.comboxOpLb = Ext.create('DsExt.ux.RefTableCombox', { this.comboxOpLb = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.BusinessType,//业务类型 fieldLabel: '业务类型',//业务类型
store: this.StoreOpLb, store: this.StoreOpLb,
name: 'PS_OPLB', name: 'PS_OPLB',
valueField: 'EnumValueName', valueField: 'EnumValueName',
@ -2140,7 +2140,12 @@ Ext.extend(Shipping.MsChfeeAudit, Ext.Panel, {
dataIndex: 'RMBSTR', dataIndex: 'RMBSTR',
align: 'right', align: 'right',
header: 'RMBSTR', header: 'RMBSTR',
width: 50 width: 60,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
if (value == 'RATE:') return 'EXRATE:';
return value;
}
}, { }, {
sortable: true, sortable: true,
dataIndex: 'RMBAMOUNT', dataIndex: 'RMBAMOUNT',

@ -4385,7 +4385,7 @@ Ext.extend(Shipping.MsChSettlementBLEdit, Ext.Panel, {
this.formEdit.getForm().findField('SETTLEUSER').setDisabled(false); this.formEdit.getForm().findField('SETTLEUSER').setDisabled(false);
this.formEdit.getForm().findField('COMPANYID').setDisabled(false); this.formEdit.getForm().findField('COMPANYID').setDisabled(false);
this.formEdit.getForm().findField('SETTLEMODE').setDisabled(false); this.formEdit.getForm().findField('SETTLEMODE').setDisabled(false);
this.formEdit.getForm().findField('BILLTYPE').setDisabled(false); //this.formEdit.getForm().findField('BILLTYPE').setDisabled(false);
var field = this.formEdit.getForm().findField('SETTLEMODE'); var field = this.formEdit.getForm().findField('SETTLEMODE');
field.setValue(2); field.setValue(2);
var BILLTYPE = this.formEdit.getForm().findField('BILLTYPE').getValue(); var BILLTYPE = this.formEdit.getForm().findField('BILLTYPE').getValue();

@ -164,10 +164,10 @@ Ext.extend(Shipping.ChSettlementRecvDuiEdit, Ext.Panel, {
this.StoreDateCurr.load({ params: { condition: ""} }); this.StoreDateCurr.load({ params: { condition: ""} });
this.comboxCurr = Ext.create('DsExt.ux.RefTableCombox', { this.comboxCurr = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.Currency, fieldLabel:'折算币别',
store: this.StoreCurr, store: this.StoreCurr,
forceSelection: true, forceSelection: true,
allowBlank: false, labelWidth: 60,
flex: 0.5, flex: 0.5,
name: 'CURR', name: 'CURR',
valueField: 'CURR', valueField: 'CURR',
@ -244,7 +244,7 @@ Ext.extend(Shipping.ChSettlementRecvDuiEdit, Ext.Panel, {
fieldLabel: Zi.LAN.SettlementType, fieldLabel: Zi.LAN.SettlementType,
store: this.StoreStlMode, store: this.StoreStlMode,
forceSelection: true, forceSelection: true,
flex: 0.5, //flex: 0.5,
name: 'SETTLETYPE', name: 'SETTLETYPE',
valueField: 'STLCODE', valueField: 'STLCODE',
displayField: 'STLNAME' displayField: 'STLNAME'
@ -254,7 +254,7 @@ Ext.extend(Shipping.ChSettlementRecvDuiEdit, Ext.Panel, {
model: 'BANK', model: 'BANK',
proxy: { url: '/MvcShipping/MsBaseInfo/GetBANKList' } proxy: { url: '/MvcShipping/MsBaseInfo/GetBANKList' }
}); });
//this.StoreBANK.load({ params: { condition: ""} }); 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();
@ -265,11 +265,63 @@ Ext.extend(Shipping.ChSettlementRecvDuiEdit, Ext.Panel, {
fieldLabel: Zi.LAN.BankAccount, fieldLabel: Zi.LAN.BankAccount,
store: this.StoreBANK, store: this.StoreBANK,
forceSelection: true, forceSelection: true,
name: 'ACCOUNT', name: 'ACCOUNTRMB',
valueField: 'GID', valueField: 'GID',
displayField: 'BANKACCOUNT' displayField: 'BANKACCOUNT'
}); });
this.StoreBANKUSD = Ext.create('DsExt.ux.RefTableStore', {
model: 'BANK',
proxy: { url: '/MvcShipping/MsBaseInfo/GetBANKList' }
});
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 });
}, this);
this.comboxBANKUSD = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: 'USD银行账号',
store: this.StoreBANKUSD,
//flex: 1.5,
labelWidth: 80,
forceSelection: true,
name: 'ACCOUNTUSD',
valueField: 'GID',
displayField: 'BANKACCOUNT'
});
this.storeBILLTYPE = Ext.create('Ext.data.Store', {
fields: ['FSTATUS', 'NAME']
});
this.storeBILLTYPE.add({ "FSTATUS": 1, "NAME": '应收' });
this.storeBILLTYPE.add({ "FSTATUS": 2, "NAME": '应付' });
this.comboxBILLTYPE = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '收付',
store: this.storeBILLTYPE,
valueField: 'FSTATUS',
displayField: 'NAME',
flex: 0.5,
labelWidth: 70,
// flex: 0.7,
// labelWidth: 55,
forceSelection: true,
name: 'BILLTYPE',
value: 2,
listeners: {
scope: this,
'select': function (combo, records, eOpts) {
if (records.length > 0) {
if (combo.value == 1)
this.formSearch.getForm().findField('DC').setValue('1');
else
this.formSearch.getForm().findField('DC').setValue('2');
}
}
}
});
this.storeSTLCATEGROY = Ext.create('DsExt.ux.RefEnumStore', {}); this.storeSTLCATEGROY = Ext.create('DsExt.ux.RefEnumStore', {});
@ -301,23 +353,6 @@ Ext.extend(Shipping.ChSettlementRecvDuiEdit, Ext.Panel, {
scope: this, scope: this,
'select': function (combo, records, eOpts) { 'select': function (combo, records, eOpts) {
if (records.length > 0) { if (records.length > 0) {
var CURR = this.formEdit.getForm().findField('CURR').getValue();
this.StoreBANK.load({
params: {condition: "" },
callback: function (r, options, success) {
if (success) {
if (this.StoreBANK.getCount() > 0) {
for (var i = 0; i < this.StoreBANK.getCount(); i += 1) {
var member = this.StoreBANK.getAt(i);
if (member.data.CURRENCY == CURR && member.data.ISDEF == 'True') {
this.formEdit.getForm().findField('ACCOUNT').setValue(member.data.GID);
}
}
}
}
},
scope: this
});
} }
@ -337,7 +372,7 @@ Ext.extend(Shipping.ChSettlementRecvDuiEdit, Ext.Panel, {
margins: '2 2 2 2', margins: '2 2 2 2',
labelAlign: 'right', labelAlign: 'right',
flex: 1, flex: 1,
labelWidth: 90, labelWidth: 70,
msgTarget: 'qtip' msgTarget: 'qtip'
}, },
@ -371,9 +406,6 @@ Ext.extend(Shipping.ChSettlementRecvDuiEdit, Ext.Panel, {
}, { }, {
fieldLabel: 'SETTLEMODE', fieldLabel: 'SETTLEMODE',
name: 'SETTLEMODE', flex: 0, hidden: true, margins: '0' name: 'SETTLEMODE', flex: 0, hidden: true, margins: '0'
}, {
fieldLabel: 'BILLTYPE',
name: 'BILLTYPE', flex: 0, hidden: true, margins: '0'
}, { }, {
fieldLabel: 'ISEXPORT', fieldLabel: 'ISEXPORT',
name: 'ISEXPORT', flex: 0, hidden: true, margins: '0' name: 'ISEXPORT', flex: 0, hidden: true, margins: '0'
@ -389,6 +421,12 @@ Ext.extend(Shipping.ChSettlementRecvDuiEdit, Ext.Panel, {
}, { }, {
fieldLabel: 'BUYRATE', fieldLabel: 'BUYRATE',
name: 'BUYRATE', flex: 0, hidden: true, margins: '0' name: 'BUYRATE', flex: 0, hidden: true, margins: '0'
}, {
fieldLabel: Zi.LAN.ExchangeRate,
flex: 0.5,
labelWidth: 50,
hidden: true,
name: 'RATE'
}, { }, {
fieldLabel: 'SELLRATE', fieldLabel: 'SELLRATE',
name: 'SELLRATE', flex: 0, hidden: true, margins: '0' name: 'SELLRATE', flex: 0, hidden: true, margins: '0'
@ -416,18 +454,18 @@ Ext.extend(Shipping.ChSettlementRecvDuiEdit, Ext.Panel, {
fieldLabel: Zi.LAN.SettlementUser, fieldLabel: Zi.LAN.SettlementUser,
readOnly: true, readOnly: true,
name: 'SETTLEUSERREF' name: 'SETTLEUSERREF'
} }, this.comboxSaleCompany
] ]
}, { }, {
xtype: 'container', xtype: 'container',
layout: 'hbox', layout: 'hbox',
defaultType: 'textfield', defaultType: 'textfield',
items: [this.comboxCurr, { items: [this.comboxBILLTYPE, this.comboxCurr, this.comboxStlMode, {
fieldLabel: Zi.LAN.Money, fieldLabel: 'RMB金额',
//flex: 0.6,
//labelWidth: 60,
readOnly: true, readOnly: true,
flex: 0.5, name: 'AMOUNTRMB',
labelWidth: 40,
name: 'AMOUNT',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
try { try {
var lsValue = usMoney(value, 2, '', false); var lsValue = usMoney(value, 2, '', false);
@ -445,16 +483,30 @@ Ext.extend(Shipping.ChSettlementRecvDuiEdit, Ext.Panel, {
} }
return value; return value;
} }
}, this.comboxStlMode, { }, {
fieldLabel: Zi.LAN.ExchangeRate, fieldLabel: 'USD金额',
flex: 0.5, //flex: 0.6,
labelWidth: 50, //labelWidth: 60,
name: 'RATE' readOnly: true,
}, this.comboxBANK, { name: 'AMOUNTUSD',
fieldLabel: Zi.LAN.SettlementNo, renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
flex: 1, try {
name: 'SETTLENO' var lsValue = usMoney(value, 2, '', false);
},this.comboxSaleCompany] 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;
}
}, this.comboxBANK, this.comboxBANKUSD]
}, { }, {
xtype: 'container', xtype: 'container',
@ -463,10 +515,12 @@ Ext.extend(Shipping.ChSettlementRecvDuiEdit, Ext.Panel, {
items: [{ items: [{
fieldLabel: Zi.LAN.JSDanWeiBank, fieldLabel: Zi.LAN.JSDanWeiBank,
flex: 1, flex: 1,
labelWidth: 80,
name: 'CUSTBANK' name: 'CUSTBANK'
}, { }, {
fieldLabel: Zi.LAN.JSDanWeiAccount , fieldLabel: Zi.LAN.JSDanWeiAccount ,
flex: 1, flex: 1,
labelWidth: 80,
name: 'CUSTACCOUNT' name: 'CUSTACCOUNT'
}, this.comboxSTLCATEGROY, { }, this.comboxSTLCATEGROY, {
fieldLabel: Zi.LAN.Remark, fieldLabel: Zi.LAN.Remark,
@ -475,6 +529,10 @@ Ext.extend(Shipping.ChSettlementRecvDuiEdit, Ext.Panel, {
}, { }, {
fieldLabel: Zi.LAN.VoucherNo, fieldLabel: Zi.LAN.VoucherNo,
name: 'VOUCHERNO' name: 'VOUCHERNO'
}, {
fieldLabel: Zi.LAN.SettlementNo,
flex: 1,
name: 'SETTLENO'
}] }]
} }
@ -3673,11 +3731,11 @@ Ext.extend(Shipping.ChSettlementRecvDuiEdit, Ext.Panel, {
this.formEdit.getForm().findField('SETTLEUSER').setDisabled(false); this.formEdit.getForm().findField('SETTLEUSER').setDisabled(false);
this.formEdit.getForm().findField('COMPANYID').setDisabled(false); this.formEdit.getForm().findField('COMPANYID').setDisabled(false);
this.formEdit.getForm().findField('SETTLEMODE').setDisabled(false); this.formEdit.getForm().findField('SETTLEMODE').setDisabled(false);
this.formEdit.getForm().findField('BILLTYPE').setDisabled(false); //this.formEdit.getForm().findField('BILLTYPE').setDisabled(false);
var field = this.formEdit.getForm().findField('SETTLEMODE'); var field = this.formEdit.getForm().findField('SETTLEMODE');
field.setValue(2); field.setValue(2);
var field = this.formEdit.getForm().findField('BILLTYPE'); //var field = this.formEdit.getForm().findField('BILLTYPE');
field.setValue(1); //field.setValue(1);
var data = basicForm.getValues(); var data = basicForm.getValues();
var accountsdata = this.formACCOUNTS.getForm().getValues(); var accountsdata = this.formACCOUNTS.getForm().getValues();
@ -3692,7 +3750,7 @@ Ext.extend(Shipping.ChSettlementRecvDuiEdit, Ext.Panel, {
this.formEdit.getForm().findField('SETTLEUSER').setDisabled(true); this.formEdit.getForm().findField('SETTLEUSER').setDisabled(true);
this.formEdit.getForm().findField('COMPANYID').setDisabled(true); this.formEdit.getForm().findField('COMPANYID').setDisabled(true);
this.formEdit.getForm().findField('SETTLEMODE').setDisabled(true); this.formEdit.getForm().findField('SETTLEMODE').setDisabled(true);
this.formEdit.getForm().findField('BILLTYPE').setDisabled(true); //this.formEdit.getForm().findField('BILLTYPE').setDisabled(true);
Ext.Msg.wait(Zi.LAN.Msg_SavingAndWait); Ext.Msg.wait(Zi.LAN.Msg_SavingAndWait);
Ext.Ajax.request({ Ext.Ajax.request({
@ -3905,11 +3963,11 @@ Ext.extend(Shipping.ChSettlementRecvDuiEdit, Ext.Panel, {
this.formEdit.getForm().findField('SETTLEUSER').setDisabled(false); this.formEdit.getForm().findField('SETTLEUSER').setDisabled(false);
this.formEdit.getForm().findField('COMPANYID').setDisabled(false); this.formEdit.getForm().findField('COMPANYID').setDisabled(false);
this.formEdit.getForm().findField('SETTLEMODE').setDisabled(false); this.formEdit.getForm().findField('SETTLEMODE').setDisabled(false);
this.formEdit.getForm().findField('BILLTYPE').setDisabled(false); //this.formEdit.getForm().findField('BILLTYPE').setDisabled(false);
var field = this.formEdit.getForm().findField('SETTLEMODE'); var field = this.formEdit.getForm().findField('SETTLEMODE');
field.setValue(2); field.setValue(2);
var field = this.formEdit.getForm().findField('BILLTYPE'); //var field = this.formEdit.getForm().findField('BILLTYPE');
field.setValue(1); //field.setValue(1);
var data = basicForm.getValues(); var data = basicForm.getValues();
var accountsdata = this.formACCOUNTS.getForm().getValues(); var accountsdata = this.formACCOUNTS.getForm().getValues();
@ -3923,7 +3981,7 @@ Ext.extend(Shipping.ChSettlementRecvDuiEdit, Ext.Panel, {
this.formEdit.getForm().findField('SETTLEUSER').setDisabled(true); this.formEdit.getForm().findField('SETTLEUSER').setDisabled(true);
this.formEdit.getForm().findField('COMPANYID').setDisabled(true); this.formEdit.getForm().findField('COMPANYID').setDisabled(true);
this.formEdit.getForm().findField('SETTLEMODE').setDisabled(true); this.formEdit.getForm().findField('SETTLEMODE').setDisabled(true);
this.formEdit.getForm().findField('BILLTYPE').setDisabled(true); //this.formEdit.getForm().findField('BILLTYPE').setDisabled(true);
Ext.Msg.wait(Zi.LAN.Msg_SavingAndWait); Ext.Msg.wait(Zi.LAN.Msg_SavingAndWait);
Ext.Ajax.request({ Ext.Ajax.request({

Loading…
Cancel
Save