parent
a37864f576
commit
cd43de0e67
|
@ -0,0 +1,90 @@
|
||||||
|
package shkd.sys.sys.plugin.form;
|
||||||
|
|
||||||
|
import kd.bos.dataentity.entity.DynamicObject;
|
||||||
|
import kd.bos.entity.datamodel.events.PropertyChangedArgs;
|
||||||
|
import kd.bos.form.plugin.AbstractFormPlugin;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class AccountbanksFormPlugin extends AbstractFormPlugin {
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void propertyChanged(PropertyChangedArgs e) {
|
||||||
|
super.propertyChanged(e);
|
||||||
|
String name = e.getProperty().getName();
|
||||||
|
|
||||||
|
if (name.equals("acctstyle")){
|
||||||
|
String newValue = (String) e.getChangeSet()[0].getNewValue();
|
||||||
|
switch (newValue) {
|
||||||
|
case "basic"://基本存款账户
|
||||||
|
this.getView().getModel().setValue("shkd_accounttype","D01");
|
||||||
|
break;
|
||||||
|
case "normal"://一般存款账户
|
||||||
|
this.getView().getModel().setValue("shkd_accounttype","D01");
|
||||||
|
DynamicObject value = (DynamicObject) this.getView().getModel().getValue("acctproperty");
|
||||||
|
if (value!=null&&"保证金".equals(value.getString("name"))){
|
||||||
|
this.getView().getModel().setValue("shkd_accounttype","D06");
|
||||||
|
}else {
|
||||||
|
this.getView().getModel().setValue("shkd_accounttype","D02");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case "temp"://临时存款账户
|
||||||
|
this.getView().getModel().setValue("shkd_accounttype","D04");
|
||||||
|
break;
|
||||||
|
case "spcl"://专用存款账户
|
||||||
|
this.getView().getModel().setValue("shkd_accounttype","D03");
|
||||||
|
break;
|
||||||
|
case "fgn_curr"://经常项目外汇账户
|
||||||
|
this.getView().getModel().setValue("shkd_accounttype","D05");
|
||||||
|
break;
|
||||||
|
case "fng_fin"://资本项目外汇账户
|
||||||
|
this.getView().getModel().setValue("shkd_accounttype","D05");
|
||||||
|
break;
|
||||||
|
case "non-settlement"://非结算账户
|
||||||
|
this.getView().getModel().setValue("shkd_accounttype","D05");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
this.getView().getModel().setValue("shkd_accounttype","D05");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (name.equals("acctproperty")){
|
||||||
|
DynamicObject newValue = (DynamicObject) e.getChangeSet()[0].getNewValue();
|
||||||
|
String acctstyle = (String) this.getView().getModel().getValue("acctstyle");
|
||||||
|
switch (acctstyle) {
|
||||||
|
case "basic"://基本存款账户
|
||||||
|
this.getView().getModel().setValue("shkd_accounttype","D01");
|
||||||
|
break;
|
||||||
|
case "normal"://一般存款账户
|
||||||
|
this.getView().getModel().setValue("shkd_accounttype","D01");
|
||||||
|
if (newValue!=null&&"保证金".equals(newValue.getString("name"))){
|
||||||
|
this.getView().getModel().setValue("shkd_accounttype","D06");
|
||||||
|
}else {
|
||||||
|
this.getView().getModel().setValue("shkd_accounttype","D02");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case "temp"://临时存款账户
|
||||||
|
this.getView().getModel().setValue("shkd_accounttype","D04");
|
||||||
|
break;
|
||||||
|
case "spcl"://专用存款账户
|
||||||
|
this.getView().getModel().setValue("shkd_accounttype","D03");
|
||||||
|
break;
|
||||||
|
case "fgn_curr"://经常项目外汇账户
|
||||||
|
this.getView().getModel().setValue("shkd_accounttype","D05");
|
||||||
|
break;
|
||||||
|
case "fng_fin"://资本项目外汇账户
|
||||||
|
this.getView().getModel().setValue("shkd_accounttype","D05");
|
||||||
|
break;
|
||||||
|
case "non-settlement"://非结算账户
|
||||||
|
this.getView().getModel().setValue("shkd_accounttype","D05");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
this.getView().getModel().setValue("shkd_accounttype","D05");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue