eas-dep of controls will be recorded

Controls will record
new com.kingdee.eas.ep.client.util.NullVerify ([comp0, comp1] , table, [column0, column1]). Verify
null validator, will be verified into control,
Nullverfiy () has three parameters,
1) is a control parameter, which is an array, the plurality of controls can be filled, separated by commas
2) table entry controls
3) in a plurality of columns entry name
if (pluginCtx.getKDTextField .. ( "txtstatus") getText () StartWith ( "0101")) {
var value = pluginCtx.getKDBizPromptBox ( "prmtNBA") the getValue ();.
IF (value == null) {
com.kingdee.eas.util. client.MsgBox.showInfo ( "NBA can not be empty!");
com.kingdee.eas.util.SysUtil.abort ();
}
}

Following this script onload () extension point post-script, but can not guarantee the final status agreement with the script control
pluginCtx.getKDTextField ( "txDescription") setVisible ( false);. // header controls hidden
pluginCtx.getKDTable ( "kdtEntries ") .getColoumn (" mat ". .) setStyleAttributes () setHided (true); // entry columns hidden
pluginCtx.getKDBizPromptBox (" prmtMat ") setEnabled ( false);. // header control lock
pluginCtx.getKDTable (" kdEntries ".) getColoumn (" amount ") getStyleAttributes () setLocked (true);.. / entry column lock
pluignCtx.getKDBizPromptBox (" prmtCurrency ") setDisplayFormat ( ." $ numver $ ");

// Set Default f7
added onload filtered interface extension point post-script
if (. PluginCtx.getOprtState () equals ( "ADDNEW")) {// state of the control words is ADDNew
var ID = "EadXbj & HCHZ";
var = com.kingdee.bos.BOSObjectFactory.createRemoteCommonBOSObject fkfsInterface (
new new com.kingdee.bos.metadata.MetaDataPK (
"com.kingdee.eas.custom.app.prmtCurrency")
);
var = fkfsOPK
new new com.kingdee.bos.dao .ormapping.ObjectUuidPK (
new new kingdee.bos.util.BOSUuid.read (ID)
);
var = fkfsBOJ fkfsInterface.getValue (fkfsOPK);
. pluginCtx.getKDBizPromptBox ( "prmtcurrency") the setValue (fkfsOBJ);
}

pluginCtx.getKDDatePicker("pkRTime").setDatePattern("yyyy-MM-dd HH:mm:ss");
pluginCtx.getKDDatePicker("pkRTime").setTimeEnabled(true);

//设置表格列的显示格式
设置数字表格列的格式
var easName=JavaImporter();
easNames.importPackage(Packages.com.kingdee.bos.ctrl.extendcontrols);
easNames.importPackage(Packages.com.kingdee.scm.common.util);
easNames.importPackage(Packages.comkingdeee.eas.scm.common.client.helper);
with(easNames){
var entry=pluginCtx.getKDTable("kdtEntrys");
var column=entry.getColumn("price");
var format=PrecisionUtil.getFormatString(2);
var editor=FormattedEditorFactory,getBigDecimalCellEditor(2,false);
column.setEditor(eidtor);
column.getStyleAttributes().setNumberFormat(format);
}

//日期控件默认值
if(pluginCtx.getOprtState().equals("ADDNEW")){
var aa=pluginCtx.getKDDatePicker("pkRTime");
var date=new java.util.Date();
var d=java.util.Calendar.getInstance();
var time=date.getTime();
d.setTime(new java.sql.Timestamp(time));
d.set(java.util.Calendar.MILLISECOND,0);
var timestamp=new java.sql.Timestamp(d.getTime().getTime());
aa.setValue(timestamp);
}


Menu items
such as we want to set the properties of the menu item, in particular by submitting the word menu item properties option is set to not editable, you can use the following script:
. PluginCtx.getKDMenu ( "menuSubmitOptiion") getItem (0) .setEnabled ( to false);
pluginCtx.getKDMenu ( "menuSubmitOption") the getItem (. 1) .setEnabled (to false).;

Guess you like

Origin www.cnblogs.com/luojiabao/p/11087790.html