出纳付款单 付款类型是其他时,选择付款人带出 其他信息
程序员文章站
2022-07-07 10:34:58
...
var easImporter = JavaImporter();
easImporter.importPackage(Packages.com.kingdee.bos.dao.query);
easImporter.importPackage(Packages.com.kingdee.bos.ctrl.extendcontrols);
easImporter.importPackage(Packages.com.kingdee.bos.metadata.entity);
easImporter.importPackage(Packages.com.kingdee.bos.metadata.query.util);
easImporter.importPackage(Packages.com.kingdee.bos.util);
with(easImporter){
if (pluginCtx.getOprtState() == "ADDNEW" || pluginCtx.getOprtState()=="EDIT" ){
var org = pluginCtx.getUIContext().get("sysContext").getCurrentProfitUnit();//获取当前CU
if(null!=org){
var prmtdepartment =pluginCtx.getKDBizPromptBox("prmtdepartment");
var orgId=org.get("Id").toString();
//com.kingdee.eas.util.client.MsgBox.showInfo(orgId);
var pk = new com.kingdee.bos.dao.ormapping.ObjectUuidPK(orgId);
var pro=com.kingdee.eas.basedata.org.ProfitCenterOrgUnitFactory.getRemoteInstance();
// com.kingdee.eas.util.client.MsgBox.showInfo(pro.getProfitCenterOrgUnitInfo(pk));
//事业部赋值当前公司
prmtdepartment.setValue(pro.getProfitCenterOrgUnitInfo(pk));
}
}
if (pluginCtx.getOprtState()!= "VIEW" ){
//F7控件增加值改变监听 pluginCtx.getKDBizPromptBox("prmtperson"); YW3xsAEJEADgAAWgwKgTB0c4VZA=
//收款人名称监听prmtPayee
pluginCtx.getKDBizPromptBox("prmtPayee").addDataChangeListener(function (event,methodName)
//收款人实名监听
// pluginCtx.getKDTextField("kDTxtBankAcctName").addDataChangeListener(function (event,methodName)
{
if("equals"== methodName){
return event.toString().length()==9;
}
else if("dataChanged"==methodName) {
// var skrid=pluginCtx.getKDBizPromptBox("prmtPayee").getValue().getId();
// if(zhiyan.equals("职员")){
// var sql= " select top 1 FPAYEEACCOUNTBANK,FPAYEEBANK ,FRECPROVINCE,FRECCITY, FBANKNUMBER from T_CAS_PaymentBill where FbankAcctName='"+skrName+"' order by FCREATETIME desc " ;
// var aaaa=SQLExecutorFactory.getRemoteInstance(sql).executeSQL( );
// var FPAYEEACCOUNTBANK="";
// var FPAYEEBANK="";
// while(aaaa.next()){
// FPAYEEACCOUNTBANK=aaaa.getString("FPAYEEACCOUNTBANK");
// FPAYEEBANK=aaaa.getString("FPAYEEBANK");
// }
// if(pluginCtx.getKDBizPromptBox("txtPayeeBank").getValue()==null){
// pluginCtx.getKDBizPromptBox("txtPayeeBank").setText(FPAYEEBANK);
// pluginCtx.getKDBizPromptBox("txtPayeeAccountBank").setText(FPAYEEACCOUNTBANK);
//
//
// }
// }
var zhiyan=pluginCtx.getKDComboBox("comboPayeeType").getSelectedItem().toString();
com.kingdee.eas.util.client.MsgBox.showInfo(zhiyan);
if(zhiyan.equals("其他")){
var skrName=pluginCtx.getKDBizPromptBox("prmtPayee").getText().toString();
// var skrName= pluginCtx.getKDTextField("kDTxtBankAcctName").getText().toString();// 收款人实名 文本
com.kingdee.eas.util.client.MsgBox.showInfo(skrName);
// FPayeeBank 收款银行 FPayeeAccountBank 收款账号 , FRecProvince 收款方省 ,FRecCity 收款方县,FbankNumber 收款行行号, FbankAcctName 收款人实名
var sql= " select top 1 FPayeeBank, FPayeeAccountBank, FRecProvince , FRecCity ,FbankNumber, FbankAcctName from T_CAS_PaymentBill where FbankAcctName='"+skrName+"' order by FCREATETIME desc " ;
com.kingdee.eas.util.client.MsgBox.showInfo(sql);
var aaaa=SQLExecutorFactory.getRemoteInstance(sql).executeSQL( );
var FPayeeAccountBank="";
var FbankNumber="";
var FPayeeBank="";
var FRecProvince="";
var FRecCity="";
while(aaaa.next()){
FPayeeAccountBank=aaaa.getString("FPayeeAccountBank");
FbankNumber=aaaa.getString("FbankNumber");
FPayeeBank=aaaa.getString("FPayeeBank");
FRecProvince=aaaa.getString("FRecProvince");
FRecCity=aaaa.getString("FRecCity");
}
pluginCtx.getKDBizPromptBox("txtPayeeBank").setText(FPayeeBank); //收款银行
pluginCtx.getKDBizPromptBox("txtPayeeAccountBank").setText(FPayeeAccountBank);//收款账号
pluginCtx.getKDBizPromptBox("txtrecProvince").setValue(FRecProvince);//收款方省
pluginCtx.getKDBizPromptBox("txtrecCity").setValue(FRecCity); //收款方县
pluginCtx.getKDTextField("kDTxtBankNumber").setText(FbankNumber); //收款行行号;
}
}
});
}
}
上一篇: 有趣的java面试题
下一篇: 几个有趣的面试题