AbstractPlatPreResEditUI.java 55 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112
  1. /**
  2. * output package name
  3. */
  4. package com.kingdee.eas.custom.client;
  5. import org.apache.log4j.*;
  6. import java.awt.*;
  7. import java.awt.event.*;
  8. import java.util.*;
  9. import javax.swing.border.*;
  10. import javax.swing.BorderFactory;
  11. import javax.swing.event.*;
  12. import javax.swing.KeyStroke;
  13. import com.kingdee.bos.ctrl.swing.*;
  14. import com.kingdee.bos.ctrl.kdf.table.*;
  15. import com.kingdee.bos.ctrl.kdf.data.event.*;
  16. import com.kingdee.bos.dao.*;
  17. import com.kingdee.bos.dao.query.*;
  18. import com.kingdee.bos.metadata.*;
  19. import com.kingdee.bos.metadata.entity.*;
  20. import com.kingdee.bos.ui.face.*;
  21. import com.kingdee.bos.ui.util.ResourceBundleHelper;
  22. import com.kingdee.bos.util.BOSUuid;
  23. import com.kingdee.bos.service.ServiceContext;
  24. import com.kingdee.jdbc.rowset.IRowSet;
  25. import com.kingdee.util.enums.EnumUtils;
  26. import com.kingdee.bos.ui.face.UIRuleUtil;
  27. import com.kingdee.bos.ctrl.swing.event.*;
  28. import com.kingdee.bos.ctrl.kdf.table.event.*;
  29. import com.kingdee.bos.ctrl.extendcontrols.*;
  30. import com.kingdee.bos.ctrl.kdf.util.render.*;
  31. import com.kingdee.bos.ui.face.IItemAction;
  32. import com.kingdee.eas.framework.batchHandler.RequestContext;
  33. import com.kingdee.bos.ui.util.IUIActionPostman;
  34. import com.kingdee.bos.appframework.client.servicebinding.ActionProxyFactory;
  35. import com.kingdee.bos.appframework.uistatemanage.ActionStateConst;
  36. import com.kingdee.bos.appframework.validator.ValidateHelper;
  37. import com.kingdee.bos.appframework.uip.UINavigator;
  38. /**
  39. * output class name
  40. */
  41. public abstract class AbstractPlatPreResEditUI extends com.kingdee.eas.hr.base.client.HRBillEditUI
  42. {
  43. private static final Logger logger = CoreUIObject.getLogger(AbstractPlatPreResEditUI.class);
  44. protected com.kingdee.bos.ctrl.swing.KDLabelContainer contNumber;
  45. protected com.kingdee.bos.ctrl.swing.KDLabelContainer contDescription;
  46. protected com.kingdee.bos.ctrl.kdf.table.KDTable kdtEntrys;
  47. protected com.kingdee.eas.framework.client.multiDetail.DetailPanel kdtEntrys_detailPanel = null;
  48. protected com.kingdee.bos.ctrl.swing.KDLabelContainer contApplier;
  49. protected com.kingdee.bos.ctrl.swing.KDLabelContainer contAdminOrg;
  50. protected com.kingdee.bos.ctrl.swing.KDLabelContainer contApplyDate;
  51. protected com.kingdee.bos.ctrl.swing.KDLabelContainer contBillState;
  52. protected com.kingdee.bos.ctrl.swing.KDTextField txtNumber;
  53. protected com.kingdee.bos.ctrl.swing.KDTextField txtDescription;
  54. protected com.kingdee.bos.ctrl.swing.KDTextField txtApplier;
  55. protected com.kingdee.bos.ctrl.extendcontrols.KDBizPromptBox prmtAdminOrg;
  56. protected com.kingdee.bos.ctrl.swing.KDDatePicker dpApplyDate;
  57. protected com.kingdee.bos.ctrl.swing.KDComboBox cbBillState;
  58. protected com.kingdee.eas.custom.PlatPreResInfo editData = null;
  59. /**
  60. * output class constructor
  61. */
  62. public AbstractPlatPreResEditUI() throws Exception
  63. {
  64. super();
  65. this.defaultObjectName = "editData";
  66. jbInit();
  67. initUIP();
  68. }
  69. /**
  70. * output jbInit method
  71. */
  72. private void jbInit() throws Exception
  73. {
  74. this.resHelper = new ResourceBundleHelper(AbstractPlatPreResEditUI.class.getName());
  75. this.setUITitle(resHelper.getString("this.title"));
  76. //actionSubmit
  77. String _tempStr = null;
  78. actionSubmit.setEnabled(true);
  79. actionSubmit.setDaemonRun(false);
  80. actionSubmit.putValue(ItemAction.ACCELERATOR_KEY, KeyStroke.getKeyStroke("ctrl S"));
  81. _tempStr = resHelper.getString("ActionSubmit.SHORT_DESCRIPTION");
  82. actionSubmit.putValue(ItemAction.SHORT_DESCRIPTION, _tempStr);
  83. _tempStr = resHelper.getString("ActionSubmit.LONG_DESCRIPTION");
  84. actionSubmit.putValue(ItemAction.LONG_DESCRIPTION, _tempStr);
  85. _tempStr = resHelper.getString("ActionSubmit.NAME");
  86. actionSubmit.putValue(ItemAction.NAME, _tempStr);
  87. this.actionSubmit.setBindWorkFlow(true);
  88. this.actionSubmit.addService(new com.kingdee.eas.framework.client.service.PermissionService());
  89. this.actionSubmit.addService(new com.kingdee.eas.framework.client.service.NetFunctionService());
  90. this.actionSubmit.addService(new com.kingdee.eas.framework.client.service.UserMonitorService());
  91. //actionPrint
  92. actionPrint.setEnabled(true);
  93. actionPrint.setDaemonRun(false);
  94. actionPrint.putValue(ItemAction.ACCELERATOR_KEY, KeyStroke.getKeyStroke("ctrl P"));
  95. _tempStr = resHelper.getString("ActionPrint.SHORT_DESCRIPTION");
  96. actionPrint.putValue(ItemAction.SHORT_DESCRIPTION, _tempStr);
  97. _tempStr = resHelper.getString("ActionPrint.LONG_DESCRIPTION");
  98. actionPrint.putValue(ItemAction.LONG_DESCRIPTION, _tempStr);
  99. _tempStr = resHelper.getString("ActionPrint.NAME");
  100. actionPrint.putValue(ItemAction.NAME, _tempStr);
  101. this.actionPrint.addService(new com.kingdee.eas.framework.client.service.PermissionService());
  102. this.actionPrint.addService(new com.kingdee.eas.framework.client.service.NetFunctionService());
  103. this.actionPrint.addService(new com.kingdee.eas.framework.client.service.UserMonitorService());
  104. //actionPrintPreview
  105. actionPrintPreview.setEnabled(true);
  106. actionPrintPreview.setDaemonRun(false);
  107. actionPrintPreview.putValue(ItemAction.ACCELERATOR_KEY, KeyStroke.getKeyStroke("shift ctrl P"));
  108. _tempStr = resHelper.getString("ActionPrintPreview.SHORT_DESCRIPTION");
  109. actionPrintPreview.putValue(ItemAction.SHORT_DESCRIPTION, _tempStr);
  110. _tempStr = resHelper.getString("ActionPrintPreview.LONG_DESCRIPTION");
  111. actionPrintPreview.putValue(ItemAction.LONG_DESCRIPTION, _tempStr);
  112. _tempStr = resHelper.getString("ActionPrintPreview.NAME");
  113. actionPrintPreview.putValue(ItemAction.NAME, _tempStr);
  114. this.actionPrintPreview.addService(new com.kingdee.eas.framework.client.service.PermissionService());
  115. this.actionPrintPreview.addService(new com.kingdee.eas.framework.client.service.NetFunctionService());
  116. this.actionPrintPreview.addService(new com.kingdee.eas.framework.client.service.UserMonitorService());
  117. //actionAudit
  118. actionAudit.setEnabled(true);
  119. actionAudit.setDaemonRun(false);
  120. actionAudit.putValue(ItemAction.ACCELERATOR_KEY, KeyStroke.getKeyStroke("ctrl A"));
  121. _tempStr = resHelper.getString("ActionAudit.SHORT_DESCRIPTION");
  122. actionAudit.putValue(ItemAction.SHORT_DESCRIPTION, _tempStr);
  123. _tempStr = resHelper.getString("ActionAudit.LONG_DESCRIPTION");
  124. actionAudit.putValue(ItemAction.LONG_DESCRIPTION, _tempStr);
  125. _tempStr = resHelper.getString("ActionAudit.NAME");
  126. actionAudit.putValue(ItemAction.NAME, _tempStr);
  127. this.actionAudit.addService(new com.kingdee.eas.framework.client.service.PermissionService());
  128. //actionUnaudit
  129. actionUnaudit.setEnabled(true);
  130. actionUnaudit.setDaemonRun(false);
  131. actionUnaudit.putValue(ItemAction.ACCELERATOR_KEY, KeyStroke.getKeyStroke("ctrl U"));
  132. _tempStr = resHelper.getString("ActionUnaudit.SHORT_DESCRIPTION");
  133. actionUnaudit.putValue(ItemAction.SHORT_DESCRIPTION, _tempStr);
  134. _tempStr = resHelper.getString("ActionUnaudit.LONG_DESCRIPTION");
  135. actionUnaudit.putValue(ItemAction.LONG_DESCRIPTION, _tempStr);
  136. _tempStr = resHelper.getString("ActionUnaudit.NAME");
  137. actionUnaudit.putValue(ItemAction.NAME, _tempStr);
  138. this.actionUnaudit.addService(new com.kingdee.eas.framework.client.service.PermissionService());
  139. this.contNumber = new com.kingdee.bos.ctrl.swing.KDLabelContainer();
  140. this.contDescription = new com.kingdee.bos.ctrl.swing.KDLabelContainer();
  141. this.kdtEntrys = new com.kingdee.bos.ctrl.kdf.table.KDTable();
  142. this.contApplier = new com.kingdee.bos.ctrl.swing.KDLabelContainer();
  143. this.contAdminOrg = new com.kingdee.bos.ctrl.swing.KDLabelContainer();
  144. this.contApplyDate = new com.kingdee.bos.ctrl.swing.KDLabelContainer();
  145. this.contBillState = new com.kingdee.bos.ctrl.swing.KDLabelContainer();
  146. this.txtNumber = new com.kingdee.bos.ctrl.swing.KDTextField();
  147. this.txtDescription = new com.kingdee.bos.ctrl.swing.KDTextField();
  148. this.txtApplier = new com.kingdee.bos.ctrl.swing.KDTextField();
  149. this.prmtAdminOrg = new com.kingdee.bos.ctrl.extendcontrols.KDBizPromptBox();
  150. this.dpApplyDate = new com.kingdee.bos.ctrl.swing.KDDatePicker();
  151. this.cbBillState = new com.kingdee.bos.ctrl.swing.KDComboBox();
  152. this.contNumber.setName("contNumber");
  153. this.contDescription.setName("contDescription");
  154. this.kdtEntrys.setName("kdtEntrys");
  155. this.contApplier.setName("contApplier");
  156. this.contAdminOrg.setName("contAdminOrg");
  157. this.contApplyDate.setName("contApplyDate");
  158. this.contBillState.setName("contBillState");
  159. this.txtNumber.setName("txtNumber");
  160. this.txtDescription.setName("txtDescription");
  161. this.txtApplier.setName("txtApplier");
  162. this.prmtAdminOrg.setName("prmtAdminOrg");
  163. this.dpApplyDate.setName("dpApplyDate");
  164. this.cbBillState.setName("cbBillState");
  165. // CoreUI
  166. this.btnPrint.setVisible(false);
  167. this.btnPrintPreview.setVisible(false);
  168. this.menuItemPrint.setVisible(false);
  169. this.menuItemPrintPreview.setVisible(false);
  170. this.btnTraceUp.setVisible(false);
  171. this.btnTraceDown.setVisible(false);
  172. this.btnCreateFrom.setVisible(false);
  173. this.btnAddLine.setVisible(false);
  174. this.btnInsertLine.setVisible(false);
  175. this.btnRemoveLine.setVisible(false);
  176. this.btnAuditResult.setVisible(false);
  177. this.separator1.setVisible(false);
  178. this.menuItemCreateFrom.setVisible(false);
  179. this.menuItemCopyFrom.setVisible(false);
  180. this.separator3.setVisible(false);
  181. this.menuItemTraceUp.setVisible(false);
  182. this.menuItemTraceDown.setVisible(false);
  183. this.menuItemAddLine.setVisible(false);
  184. this.menuItemInsertLine.setVisible(false);
  185. this.menuItemRemoveLine.setVisible(false);
  186. this.menuItemViewSubmitProccess.setVisible(false);
  187. this.menuItemViewDoProccess.setVisible(false);
  188. this.menuItemAuditResult.setVisible(false);
  189. this.contHROrg.setBoundLabelText(resHelper.getString("contHROrg.boundLabelText"));
  190. this.contHROrg.setBoundLabelLength(90);
  191. this.contHROrg.setBoundLabelUnderline(true);
  192. this.contHROrg.setBoundLabelAlignment(7);
  193. this.contHROrg.setVisible(true);
  194. this.contApproveType.setBoundLabelText(resHelper.getString("contApproveType.boundLabelText"));
  195. this.contApproveType.setBoundLabelLength(90);
  196. this.contApproveType.setBoundLabelUnderline(true);
  197. this.contApproveType.setBoundLabelAlignment(7);
  198. this.contApproveType.setVisible(true);
  199. this.prmtHROrg.setRequired(true);
  200. this.prmtHROrg.setVisible(true);
  201. this.prmtHROrg.setEnabled(true);
  202. this.cbApproveType.setRequired(true);
  203. this.cbApproveType.setVisible(true);
  204. this.cbApproveType.setEnabled(true);
  205. this.btnAudit.setAction((IItemAction)ActionProxyFactory.getProxy(actionAudit, new Class[] { IItemAction.class }, getServiceContext()));
  206. this.btnAudit.setText(resHelper.getString("btnAudit.text"));
  207. this.btnAudit.setToolTipText(resHelper.getString("btnAudit.toolTipText"));
  208. this.btnAudit.setIcon(com.kingdee.eas.util.client.EASResource.getIcon("imgTbtn_audit"));
  209. this.btnUnaudit.setAction((IItemAction)ActionProxyFactory.getProxy(actionUnaudit, new Class[] { IItemAction.class }, getServiceContext()));
  210. this.btnUnaudit.setText(resHelper.getString("btnUnaudit.text"));
  211. this.btnUnaudit.setIcon(com.kingdee.eas.util.client.EASResource.getIcon("imgTbtn_unaudit"));
  212. this.btnUnaudit.setToolTipText(resHelper.getString("btnUnaudit.toolTipText"));
  213. this.btnUnaudit.setVisible(false);
  214. this.menuItemAudit.setAction((IItemAction)ActionProxyFactory.getProxy(actionAudit, new Class[] { IItemAction.class }, getServiceContext()));
  215. this.menuItemAudit.setText(resHelper.getString("menuItemAudit.text"));
  216. this.menuItemAudit.setToolTipText(resHelper.getString("menuItemAudit.toolTipText"));
  217. this.menuItemAudit.setMnemonic(65);
  218. this.menuItemAudit.setIcon(com.kingdee.eas.util.client.EASResource.getIcon("imgTbtn_audit"));
  219. this.menuItemUnaudit.setAction((IItemAction)ActionProxyFactory.getProxy(actionUnaudit, new Class[] { IItemAction.class }, getServiceContext()));
  220. this.menuItemUnaudit.setText(resHelper.getString("menuItemUnaudit.text"));
  221. this.menuItemUnaudit.setToolTipText(resHelper.getString("menuItemUnaudit.toolTipText"));
  222. this.menuItemUnaudit.setMnemonic(85);
  223. this.menuItemUnaudit.setIcon(com.kingdee.eas.util.client.EASResource.getIcon("imgTbtn_unaudit"));
  224. this.menuItemUnaudit.setVisible(false);
  225. // contNumber
  226. this.contNumber.setBoundLabelText(resHelper.getString("contNumber.boundLabelText"));
  227. this.contNumber.setBoundLabelLength(90);
  228. this.contNumber.setBoundLabelUnderline(true);
  229. this.contNumber.setBoundLabelAlignment(7);
  230. this.contNumber.setVisible(true);
  231. // contDescription
  232. this.contDescription.setBoundLabelText(resHelper.getString("contDescription.boundLabelText"));
  233. this.contDescription.setBoundLabelLength(90);
  234. this.contDescription.setBoundLabelUnderline(true);
  235. this.contDescription.setBoundLabelAlignment(7);
  236. this.contDescription.setVisible(true);
  237. // kdtEntrys
  238. String kdtEntrysStrXML = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><DocRoot xmlns:c=\"http://www.kingdee.com/Common\" xmlns:f=\"http://www.kingdee.com/Form\" xmlns:t=\"http://www.kingdee.com/Table\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://www.kingdee.com/KDF KDFSchema.xsd\" version=\"0.0\"><Styles><c:Style id=\"sCol0\"><c:Protection hidden=\"true\" /></c:Style><c:Style id=\"sCol1\"><c:Protection locked=\"true\" hidden=\"true\" /></c:Style><c:Style id=\"sCol2\"><c:Protection locked=\"true\" /></c:Style><c:Style id=\"sCol3\"><c:Protection locked=\"true\" /></c:Style><c:Style id=\"sCol4\"><c:Protection locked=\"true\" /></c:Style><c:Style id=\"sCol5\"><c:Protection locked=\"true\" /></c:Style><c:Style id=\"sCol6\"><c:NumberFormat>yyyy-mm-dd</c:NumberFormat></c:Style><c:Style id=\"sCol8\"><c:NumberFormat>&amp;date</c:NumberFormat></c:Style><c:Style id=\"sCol10\"><c:NumberFormat>&amp;date</c:NumberFormat></c:Style></Styles><Table id=\"KDTable\"><t:Sheet name=\"sheet1\"><t:Table t:selectMode=\"15\" t:mergeMode=\"0\" t:dataRequestMode=\"0\" t:pageRowCount=\"100\"><t:ColumnGroup><t:Column t:key=\"id\" t:width=\"-1\" t:mergeable=\"true\" t:resizeable=\"true\" t:moveable=\"true\" t:group=\"false\" t:required=\"false\" t:index=\"-1\" t:styleID=\"sCol0\" /><t:Column t:key=\"person\" t:width=\"-1\" t:mergeable=\"true\" t:resizeable=\"true\" t:moveable=\"true\" t:group=\"false\" t:required=\"false\" t:index=\"2\" t:styleID=\"sCol1\" /><t:Column t:key=\"empNumber\" t:width=\"-1\" t:mergeable=\"true\" t:resizeable=\"true\" t:moveable=\"true\" t:group=\"false\" t:required=\"false\" t:index=\"3\" t:styleID=\"sCol2\" /><t:Column t:key=\"empName\" t:width=\"-1\" t:mergeable=\"true\" t:resizeable=\"true\" t:moveable=\"true\" t:group=\"false\" t:required=\"false\" t:index=\"4\" t:styleID=\"sCol3\" /><t:Column t:key=\"position\" t:width=\"-1\" t:mergeable=\"true\" t:resizeable=\"true\" t:moveable=\"true\" t:group=\"false\" t:required=\"false\" t:index=\"9\" t:styleID=\"sCol4\" /><t:Column t:key=\"adminOrg\" t:width=\"-1\" t:mergeable=\"true\" t:resizeable=\"true\" t:moveable=\"true\" t:group=\"false\" t:required=\"false\" t:index=\"10\" t:styleID=\"sCol5\" /><t:Column t:key=\"bizDate\" t:width=\"-1\" t:mergeable=\"true\" t:resizeable=\"true\" t:moveable=\"true\" t:group=\"false\" t:required=\"true\" t:index=\"14\" t:styleID=\"sCol6\" /><t:Column t:key=\"description\" t:width=\"-1\" t:mergeable=\"true\" t:resizeable=\"true\" t:moveable=\"true\" t:group=\"false\" t:required=\"false\" t:index=\"15\" /><t:Column t:key=\"preResignDate\" t:width=\"-1\" t:mergeable=\"true\" t:resizeable=\"true\" t:moveable=\"true\" t:group=\"false\" t:required=\"false\" t:index=\"-1\" t:styleID=\"sCol8\" /><t:Column t:key=\"reasonDescript\" t:width=\"-1\" t:mergeable=\"true\" t:resizeable=\"true\" t:moveable=\"true\" t:group=\"false\" t:required=\"false\" t:index=\"-1\" /><t:Column t:key=\"resignDate\" t:width=\"-1\" t:mergeable=\"true\" t:resizeable=\"true\" t:moveable=\"true\" t:group=\"false\" t:required=\"false\" t:index=\"-1\" t:styleID=\"sCol10\" /></t:ColumnGroup><t:Head><t:Row t:name=\"header\" t:height=\"-1\" t:mergeable=\"true\" t:resizeable=\"true\"><t:Cell>$Resource{id}</t:Cell><t:Cell>$Resource{person}</t:Cell><t:Cell>$Resource{empNumber}</t:Cell><t:Cell>$Resource{empName}</t:Cell><t:Cell>$Resource{position}</t:Cell><t:Cell>$Resource{adminOrg}</t:Cell><t:Cell>$Resource{bizDate}</t:Cell><t:Cell>$Resource{description}</t:Cell><t:Cell>$Resource{preResignDate}</t:Cell><t:Cell>$Resource{reasonDescript}</t:Cell><t:Cell>$Resource{resignDate}</t:Cell></t:Row></t:Head></t:Table><t:SheetOptions><t:MergeBlocks><t:Head /></t:MergeBlocks></t:SheetOptions></t:Sheet></Table></DocRoot>";
  239. this.kdtEntrys.setFormatXml(resHelper.translateString("kdtEntrys",kdtEntrysStrXML));
  240. this.kdtEntrys.addKDTEditListener(new com.kingdee.bos.ctrl.kdf.table.event.KDTEditAdapter() {
  241. public void editStopping(com.kingdee.bos.ctrl.kdf.table.event.KDTEditEvent e) {
  242. try {
  243. kdtEntrys_editStopping(e);
  244. } catch(Exception exc) {
  245. handUIException(exc);
  246. }
  247. }
  248. public void editStopped(com.kingdee.bos.ctrl.kdf.table.event.KDTEditEvent e) {
  249. try {
  250. kdtEntrys_editStopped(e);
  251. } catch(Exception exc) {
  252. handUIException(exc);
  253. }
  254. }
  255. });
  256. this.kdtEntrys.putBindContents("editData",new String[] {"id","person","person.number","person.name","position","adminOrg","bizDate","description","preResignDate","reasonDescript","resignDate"});
  257. this.kdtEntrys.checkParsed();
  258. final KDBizPromptBox kdtEntrys_person_PromptBox = new KDBizPromptBox();
  259. kdtEntrys_person_PromptBox.setQueryInfo("com.kingdee.eas.basedata.person.app.PersonQuery");
  260. kdtEntrys_person_PromptBox.setVisible(true);
  261. kdtEntrys_person_PromptBox.setEditable(true);
  262. kdtEntrys_person_PromptBox.setDisplayFormat("$number$");
  263. kdtEntrys_person_PromptBox.setEditFormat("$number$");
  264. kdtEntrys_person_PromptBox.setCommitFormat("$number$");
  265. KDTDefaultCellEditor kdtEntrys_person_CellEditor = new KDTDefaultCellEditor(kdtEntrys_person_PromptBox);
  266. this.kdtEntrys.getColumn("person").setEditor(kdtEntrys_person_CellEditor);
  267. ObjectValueRender kdtEntrys_person_OVR = new ObjectValueRender();
  268. kdtEntrys_person_OVR.setFormat(new BizDataFormat("$name$"));
  269. this.kdtEntrys.getColumn("person").setRenderer(kdtEntrys_person_OVR);
  270. KDTextField kdtEntrys_empName_TextField = new KDTextField();
  271. kdtEntrys_empName_TextField.setName("kdtEntrys_empName_TextField");
  272. kdtEntrys_empName_TextField.setMaxLength(80);
  273. KDTDefaultCellEditor kdtEntrys_empName_CellEditor = new KDTDefaultCellEditor(kdtEntrys_empName_TextField);
  274. this.kdtEntrys.getColumn("empName").setEditor(kdtEntrys_empName_CellEditor);
  275. final KDBizPromptBox kdtEntrys_position_PromptBox = new KDBizPromptBox();
  276. kdtEntrys_position_PromptBox.setQueryInfo("com.kingdee.eas.basedata.org.app.PositionQuery");
  277. kdtEntrys_position_PromptBox.setVisible(true);
  278. kdtEntrys_position_PromptBox.setEditable(true);
  279. kdtEntrys_position_PromptBox.setDisplayFormat("$number$");
  280. kdtEntrys_position_PromptBox.setEditFormat("$number$");
  281. kdtEntrys_position_PromptBox.setCommitFormat("$number$");
  282. KDTDefaultCellEditor kdtEntrys_position_CellEditor = new KDTDefaultCellEditor(kdtEntrys_position_PromptBox);
  283. this.kdtEntrys.getColumn("position").setEditor(kdtEntrys_position_CellEditor);
  284. ObjectValueRender kdtEntrys_position_OVR = new ObjectValueRender();
  285. kdtEntrys_position_OVR.setFormat(new BizDataFormat("$name$"));
  286. this.kdtEntrys.getColumn("position").setRenderer(kdtEntrys_position_OVR);
  287. final KDBizPromptBox kdtEntrys_adminOrg_PromptBox = new KDBizPromptBox();
  288. kdtEntrys_adminOrg_PromptBox.setQueryInfo("com.kingdee.eas.basedata.org.app.AdminItemQuery");
  289. kdtEntrys_adminOrg_PromptBox.setVisible(true);
  290. kdtEntrys_adminOrg_PromptBox.setEditable(true);
  291. kdtEntrys_adminOrg_PromptBox.setDisplayFormat("$number$");
  292. kdtEntrys_adminOrg_PromptBox.setEditFormat("$number$");
  293. kdtEntrys_adminOrg_PromptBox.setCommitFormat("$number$");
  294. KDTDefaultCellEditor kdtEntrys_adminOrg_CellEditor = new KDTDefaultCellEditor(kdtEntrys_adminOrg_PromptBox);
  295. this.kdtEntrys.getColumn("adminOrg").setEditor(kdtEntrys_adminOrg_CellEditor);
  296. ObjectValueRender kdtEntrys_adminOrg_OVR = new ObjectValueRender();
  297. kdtEntrys_adminOrg_OVR.setFormat(new BizDataFormat("$name$"));
  298. this.kdtEntrys.getColumn("adminOrg").setRenderer(kdtEntrys_adminOrg_OVR);
  299. KDDatePicker kdtEntrys_bizDate_DatePicker = new KDDatePicker();
  300. kdtEntrys_bizDate_DatePicker.setName("kdtEntrys_bizDate_DatePicker");
  301. kdtEntrys_bizDate_DatePicker.setVisible(true);
  302. kdtEntrys_bizDate_DatePicker.setEditable(true);
  303. KDTDefaultCellEditor kdtEntrys_bizDate_CellEditor = new KDTDefaultCellEditor(kdtEntrys_bizDate_DatePicker);
  304. this.kdtEntrys.getColumn("bizDate").setEditor(kdtEntrys_bizDate_CellEditor);
  305. KDTextField kdtEntrys_description_TextField = new KDTextField();
  306. kdtEntrys_description_TextField.setName("kdtEntrys_description_TextField");
  307. kdtEntrys_description_TextField.setMaxLength(200);
  308. KDTDefaultCellEditor kdtEntrys_description_CellEditor = new KDTDefaultCellEditor(kdtEntrys_description_TextField);
  309. this.kdtEntrys.getColumn("description").setEditor(kdtEntrys_description_CellEditor);
  310. KDDatePicker kdtEntrys_preResignDate_DatePicker = new KDDatePicker();
  311. kdtEntrys_preResignDate_DatePicker.setName("kdtEntrys_preResignDate_DatePicker");
  312. kdtEntrys_preResignDate_DatePicker.setVisible(true);
  313. kdtEntrys_preResignDate_DatePicker.setEditable(true);
  314. KDTDefaultCellEditor kdtEntrys_preResignDate_CellEditor = new KDTDefaultCellEditor(kdtEntrys_preResignDate_DatePicker);
  315. this.kdtEntrys.getColumn("preResignDate").setEditor(kdtEntrys_preResignDate_CellEditor);
  316. KDTextField kdtEntrys_reasonDescript_TextField = new KDTextField();
  317. kdtEntrys_reasonDescript_TextField.setName("kdtEntrys_reasonDescript_TextField");
  318. kdtEntrys_reasonDescript_TextField.setMaxLength(255);
  319. KDTDefaultCellEditor kdtEntrys_reasonDescript_CellEditor = new KDTDefaultCellEditor(kdtEntrys_reasonDescript_TextField);
  320. this.kdtEntrys.getColumn("reasonDescript").setEditor(kdtEntrys_reasonDescript_CellEditor);
  321. KDDatePicker kdtEntrys_resignDate_DatePicker = new KDDatePicker();
  322. kdtEntrys_resignDate_DatePicker.setName("kdtEntrys_resignDate_DatePicker");
  323. kdtEntrys_resignDate_DatePicker.setVisible(true);
  324. kdtEntrys_resignDate_DatePicker.setEditable(true);
  325. KDTDefaultCellEditor kdtEntrys_resignDate_CellEditor = new KDTDefaultCellEditor(kdtEntrys_resignDate_DatePicker);
  326. this.kdtEntrys.getColumn("resignDate").setEditor(kdtEntrys_resignDate_CellEditor);
  327. // contApplier
  328. this.contApplier.setBoundLabelText(resHelper.getString("contApplier.boundLabelText"));
  329. this.contApplier.setBoundLabelLength(90);
  330. this.contApplier.setBoundLabelUnderline(true);
  331. this.contApplier.setBoundLabelAlignment(7);
  332. this.contApplier.setVisible(true);
  333. // contAdminOrg
  334. this.contAdminOrg.setBoundLabelText(resHelper.getString("contAdminOrg.boundLabelText"));
  335. this.contAdminOrg.setBoundLabelLength(90);
  336. this.contAdminOrg.setBoundLabelUnderline(true);
  337. this.contAdminOrg.setBoundLabelAlignment(7);
  338. this.contAdminOrg.setVisible(true);
  339. // contApplyDate
  340. this.contApplyDate.setBoundLabelText(resHelper.getString("contApplyDate.boundLabelText"));
  341. this.contApplyDate.setBoundLabelLength(90);
  342. this.contApplyDate.setBoundLabelUnderline(true);
  343. this.contApplyDate.setBoundLabelAlignment(7);
  344. this.contApplyDate.setVisible(true);
  345. // contBillState
  346. this.contBillState.setBoundLabelText(resHelper.getString("contBillState.boundLabelText"));
  347. this.contBillState.setBoundLabelLength(90);
  348. this.contBillState.setBoundLabelUnderline(true);
  349. this.contBillState.setBoundLabelAlignment(7);
  350. this.contBillState.setVisible(false);
  351. // txtNumber
  352. this.txtNumber.setMaxLength(80);
  353. this.txtNumber.setRequired(true);
  354. this.txtNumber.setVisible(true);
  355. this.txtNumber.setEnabled(true);
  356. this.txtNumber.setHorizontalAlignment(2);
  357. // txtDescription
  358. this.txtDescription.setMaxLength(200);
  359. this.txtDescription.setVisible(true);
  360. this.txtDescription.setEnabled(true);
  361. this.txtDescription.setHorizontalAlignment(2);
  362. this.txtDescription.setRequired(false);
  363. // txtApplier
  364. this.txtApplier.setEnabled(false);
  365. this.txtApplier.setMaxLength(80);
  366. this.txtApplier.setVisible(true);
  367. this.txtApplier.setHorizontalAlignment(2);
  368. this.txtApplier.setRequired(false);
  369. // prmtAdminOrg
  370. this.prmtAdminOrg.setRequired(true);
  371. this.prmtAdminOrg.setVisible(true);
  372. this.prmtAdminOrg.setEnabled(true);
  373. // dpApplyDate
  374. this.dpApplyDate.setEnabled(false);
  375. this.dpApplyDate.setVisible(true);
  376. this.dpApplyDate.setRequired(false);
  377. // cbBillState
  378. this.cbBillState.addItems(EnumUtils.getEnumList("com.kingdee.eas.hr.base.HRBillStateEnum").toArray());
  379. this.cbBillState.setEnabled(false);
  380. this.cbBillState.setVisible(false);
  381. this.cbBillState.setRequired(false);
  382. this.setFocusTraversalPolicy(new com.kingdee.bos.ui.UIFocusTraversalPolicy(new java.awt.Component[] {txtApplier,txtDescription,txtNumber,cbBillState,prmtAdminOrg,dpApplyDate,kdtEntrys}));
  383. this.setFocusCycleRoot(true);
  384. //Register control's property binding
  385. registerBindings();
  386. registerUIState();
  387. }
  388. public com.kingdee.bos.ctrl.swing.KDToolBar[] getUIMultiToolBar(){
  389. java.util.List list = new java.util.ArrayList();
  390. com.kingdee.bos.ctrl.swing.KDToolBar[] bars = super.getUIMultiToolBar();
  391. if (bars != null) {
  392. list.addAll(java.util.Arrays.asList(bars));
  393. }
  394. return (com.kingdee.bos.ctrl.swing.KDToolBar[])list.toArray(new com.kingdee.bos.ctrl.swing.KDToolBar[list.size()]);
  395. }
  396. /**
  397. * output initUIContentLayout method
  398. */
  399. public void initUIContentLayout()
  400. {
  401. this.setBounds(new Rectangle(0, 0, 1013, 629));
  402. this.setLayout(new KDLayout());
  403. this.putClientProperty("OriginalBounds", new Rectangle(0, 0, 1013, 629));
  404. contHROrg.setBounds(new Rectangle(10, 10, 270, 19));
  405. this.add(contHROrg, new KDLayout.Constraints(10, 10, 270, 19, KDLayout.Constraints.ANCHOR_TOP | KDLayout.Constraints.ANCHOR_LEFT | KDLayout.Constraints.ANCHOR_RIGHT_SCALE));
  406. contApproveType.setBounds(new Rectangle(732, 54, 270, 19));
  407. this.add(contApproveType, new KDLayout.Constraints(732, 54, 270, 19, KDLayout.Constraints.ANCHOR_TOP | KDLayout.Constraints.ANCHOR_LEFT_SCALE | KDLayout.Constraints.ANCHOR_RIGHT));
  408. contNumber.setBounds(new Rectangle(10, 32, 270, 19));
  409. this.add(contNumber, new KDLayout.Constraints(10, 32, 270, 19, KDLayout.Constraints.ANCHOR_TOP | KDLayout.Constraints.ANCHOR_LEFT | KDLayout.Constraints.ANCHOR_RIGHT_SCALE));
  410. contDescription.setBounds(new Rectangle(376, 54, 270, 19));
  411. this.add(contDescription, new KDLayout.Constraints(376, 54, 270, 19, KDLayout.Constraints.ANCHOR_TOP | KDLayout.Constraints.ANCHOR_LEFT_SCALE | KDLayout.Constraints.ANCHOR_RIGHT_SCALE));
  412. kdtEntrys.setBounds(new Rectangle(10, 76, 993, 543));
  413. kdtEntrys_detailPanel = (com.kingdee.eas.framework.client.multiDetail.DetailPanel)com.kingdee.eas.framework.client.multiDetail.HMDUtils.buildDetail(this,dataBinder,kdtEntrys,new com.kingdee.eas.custom.PlatPreResEntryInfo(),null,false);
  414. this.add(kdtEntrys_detailPanel, new KDLayout.Constraints(10, 76, 993, 543, KDLayout.Constraints.ANCHOR_TOP | KDLayout.Constraints.ANCHOR_BOTTOM | KDLayout.Constraints.ANCHOR_LEFT | KDLayout.Constraints.ANCHOR_RIGHT));
  415. contApplier.setBounds(new Rectangle(10, 54, 270, 19));
  416. this.add(contApplier, new KDLayout.Constraints(10, 54, 270, 19, KDLayout.Constraints.ANCHOR_TOP | KDLayout.Constraints.ANCHOR_LEFT | KDLayout.Constraints.ANCHOR_RIGHT_SCALE));
  417. contAdminOrg.setBounds(new Rectangle(376, 32, 270, 19));
  418. this.add(contAdminOrg, new KDLayout.Constraints(376, 32, 270, 19, KDLayout.Constraints.ANCHOR_TOP | KDLayout.Constraints.ANCHOR_LEFT_SCALE | KDLayout.Constraints.ANCHOR_RIGHT_SCALE));
  419. contApplyDate.setBounds(new Rectangle(732, 32, 270, 19));
  420. this.add(contApplyDate, new KDLayout.Constraints(732, 32, 270, 19, KDLayout.Constraints.ANCHOR_TOP | KDLayout.Constraints.ANCHOR_LEFT_SCALE | KDLayout.Constraints.ANCHOR_RIGHT));
  421. contBillState.setBounds(new Rectangle(732, 10, 270, 19));
  422. this.add(contBillState, new KDLayout.Constraints(732, 10, 270, 19, KDLayout.Constraints.ANCHOR_TOP | KDLayout.Constraints.ANCHOR_LEFT_SCALE | KDLayout.Constraints.ANCHOR_RIGHT));
  423. //contHROrg
  424. contHROrg.setBoundEditor(prmtHROrg);
  425. //contApproveType
  426. contApproveType.setBoundEditor(cbApproveType);
  427. //contNumber
  428. contNumber.setBoundEditor(txtNumber);
  429. //contDescription
  430. contDescription.setBoundEditor(txtDescription);
  431. //contApplier
  432. contApplier.setBoundEditor(txtApplier);
  433. //contAdminOrg
  434. contAdminOrg.setBoundEditor(prmtAdminOrg);
  435. //contApplyDate
  436. contApplyDate.setBoundEditor(dpApplyDate);
  437. //contBillState
  438. contBillState.setBoundEditor(cbBillState);
  439. }
  440. /**
  441. * output initUIMenuBarLayout method
  442. */
  443. public void initUIMenuBarLayout()
  444. {
  445. this.menuBar.add(menuFile);
  446. this.menuBar.add(menuEdit);
  447. this.menuBar.add(MenuService);
  448. this.menuBar.add(menuView);
  449. this.menuBar.add(menuBiz);
  450. this.menuBar.add(menuTable1);
  451. this.menuBar.add(menuTool);
  452. this.menuBar.add(menuWorkflow);
  453. this.menuBar.add(menuHelp);
  454. //menuFile
  455. menuFile.add(menuItemAddNew);
  456. menuFile.add(kDSeparator1);
  457. menuFile.add(menuItemCloudFeed);
  458. menuFile.add(menuItemSave);
  459. menuFile.add(menuItemCloudScreen);
  460. menuFile.add(menuItemSubmit);
  461. menuFile.add(menuItemCloudShare);
  462. menuFile.add(menuSubmitOption);
  463. menuFile.add(kdSeparatorFWFile1);
  464. menuFile.add(rMenuItemSubmit);
  465. menuFile.add(rMenuItemSubmitAndAddNew);
  466. menuFile.add(rMenuItemSubmitAndPrint);
  467. menuFile.add(separatorFile1);
  468. menuFile.add(menuItemMapping);
  469. menuFile.add(MenuItemAttachment);
  470. menuFile.add(kDSeparator2);
  471. menuFile.add(menuItemPageSetup);
  472. menuFile.add(menuItemPrint);
  473. menuFile.add(menuItemPrintPreview);
  474. menuFile.add(kDSeparator6);
  475. menuFile.add(kDSeparator3);
  476. menuFile.add(menuItemSendMail);
  477. menuFile.add(menuItemExitCurrent);
  478. //menuSubmitOption
  479. menuSubmitOption.add(chkMenuItemSubmitAndAddNew);
  480. menuSubmitOption.add(chkMenuItemSubmitAndPrint);
  481. //menuEdit
  482. menuEdit.add(menuItemCopy);
  483. menuEdit.add(menuItemEdit);
  484. menuEdit.add(menuItemRemove);
  485. menuEdit.add(kDSeparator4);
  486. menuEdit.add(menuItemReset);
  487. menuEdit.add(separator1);
  488. menuEdit.add(menuItemCreateFrom);
  489. menuEdit.add(menuItemCreateTo);
  490. menuEdit.add(menuItemCopyFrom);
  491. menuEdit.add(menuItemColumnCopyAll);
  492. menuEdit.add(menuItemEnterToNextRow);
  493. menuEdit.add(menuItemColumnCopySelect);
  494. menuEdit.add(separatorEdit1);
  495. menuEdit.add(separator2);
  496. //MenuService
  497. MenuService.add(MenuItemKnowStore);
  498. MenuService.add(MenuItemAnwser);
  499. MenuService.add(SepratorService);
  500. MenuService.add(MenuItemRemoteAssist);
  501. //menuView
  502. menuView.add(menuItemFirst);
  503. menuView.add(menuItemPre);
  504. menuView.add(menuItemNext);
  505. menuView.add(menuItemLast);
  506. menuView.add(separator3);
  507. menuView.add(menuItemTraceUp);
  508. menuView.add(menuItemTraceDown);
  509. menuView.add(kDSeparator7);
  510. menuView.add(menuItemLocate);
  511. //menuBiz
  512. menuBiz.add(menuItemCancelCancel);
  513. menuBiz.add(menuItemCancel);
  514. menuBiz.add(MenuItemVoucher);
  515. menuBiz.add(menuItemDelVoucher);
  516. menuBiz.add(MenuItemPCVoucher);
  517. menuBiz.add(menuItemAudit);
  518. menuBiz.add(menuItemDelPCVoucher);
  519. menuBiz.add(menuItemUnaudit);
  520. menuBiz.add(menuItemPerson);
  521. //menuTable1
  522. menuTable1.add(menuItemAddLine);
  523. menuTable1.add(menuItemCopyLine);
  524. menuTable1.add(menuItemInsertLine);
  525. menuTable1.add(menuItemRemoveLine);
  526. //menuTool
  527. menuTool.add(menuItemSendMessage);
  528. menuTool.add(menuItemMsgFormat);
  529. menuTool.add(menuItemCalculator);
  530. menuTool.add(menuItemToolBarCustom);
  531. //menuWorkflow
  532. menuWorkflow.add(menuItemStartWorkFlow);
  533. menuWorkflow.add(separatorWF1);
  534. menuWorkflow.add(menuItemViewSubmitProccess);
  535. menuWorkflow.add(menuItemViewDoProccess);
  536. menuWorkflow.add(MenuItemWFG);
  537. menuWorkflow.add(menuItemWorkFlowList);
  538. menuWorkflow.add(separatorWF2);
  539. menuWorkflow.add(menuItemMultiapprove);
  540. menuWorkflow.add(menuItemNextPerson);
  541. menuWorkflow.add(menuItemAuditResult);
  542. menuWorkflow.add(kDSeparator5);
  543. menuWorkflow.add(kDMenuItemSendMessage);
  544. //menuHelp
  545. menuHelp.add(menuItemHelp);
  546. menuHelp.add(kDSeparator12);
  547. menuHelp.add(menuItemRegPro);
  548. menuHelp.add(menuItemPersonalSite);
  549. menuHelp.add(helpseparatorDiv);
  550. menuHelp.add(menuitemProductval);
  551. menuHelp.add(kDSeparatorProduct);
  552. menuHelp.add(menuItemAbout);
  553. }
  554. /**
  555. * output initUIToolBarLayout method
  556. */
  557. public void initUIToolBarLayout()
  558. {
  559. this.toolBar.add(btnAddNew);
  560. this.toolBar.add(btnCloud);
  561. this.toolBar.add(btnEdit);
  562. this.toolBar.add(btnSave);
  563. this.toolBar.add(btnXunTong);
  564. this.toolBar.add(btnReset);
  565. this.toolBar.add(btnSubmit);
  566. this.toolBar.add(kDSeparatorCloud);
  567. this.toolBar.add(btnCopy);
  568. this.toolBar.add(btnRemove);
  569. this.toolBar.add(btnCancelCancel);
  570. this.toolBar.add(btnCancel);
  571. this.toolBar.add(btnAttachment);
  572. this.toolBar.add(separatorFW1);
  573. this.toolBar.add(btnPageSetup);
  574. this.toolBar.add(btnColumnCopyAll);
  575. this.toolBar.add(btnPrint);
  576. this.toolBar.add(btnColumnCopySelect);
  577. this.toolBar.add(btnPrintPreview);
  578. this.toolBar.add(separatorFW2);
  579. this.toolBar.add(btnFirst);
  580. this.toolBar.add(btnPre);
  581. this.toolBar.add(btnNext);
  582. this.toolBar.add(btnLast);
  583. this.toolBar.add(separatorFW3);
  584. this.toolBar.add(btnTraceUp);
  585. this.toolBar.add(btnTraceDown);
  586. this.toolBar.add(btnWorkFlowG);
  587. this.toolBar.add(btnSignature);
  588. this.toolBar.add(btnViewSignature);
  589. this.toolBar.add(separatorFW4);
  590. this.toolBar.add(separatorFW7);
  591. this.toolBar.add(btnCreateFrom);
  592. this.toolBar.add(btnCopyFrom);
  593. this.toolBar.add(btnNumberSign);
  594. this.toolBar.add(btnCreateTo);
  595. this.toolBar.add(separatorFW5);
  596. this.toolBar.add(separatorFW8);
  597. this.toolBar.add(btnAddLine);
  598. this.toolBar.add(btnInsertLine);
  599. this.toolBar.add(btnRemoveLine);
  600. this.toolBar.add(separatorFW6);
  601. this.toolBar.add(separatorFW9);
  602. this.toolBar.add(btnCopyLine);
  603. this.toolBar.add(btnVoucher);
  604. this.toolBar.add(btnDelVoucher);
  605. this.toolBar.add(btnAuditResult);
  606. this.toolBar.add(btnMultiapprove);
  607. this.toolBar.add(btnWFViewdoProccess);
  608. this.toolBar.add(btnWFViewSubmitProccess);
  609. this.toolBar.add(btnNextPerson);
  610. this.toolBar.add(btnPCVoucher);
  611. this.toolBar.add(btnAudit);
  612. this.toolBar.add(btnDelPCVoucher);
  613. this.toolBar.add(btnUnaudit);
  614. this.toolBar.add(btnPerson);
  615. }
  616. //Regiester control's property binding.
  617. private void registerBindings(){
  618. dataBinder.registerBinding("hrOrgUnit", com.kingdee.eas.basedata.org.HROrgUnitInfo.class, this.prmtHROrg, "data");
  619. dataBinder.registerBinding("approveType", com.kingdee.eas.hr.base.ApproveTypeEnum.class, this.cbApproveType, "selectedItem");
  620. dataBinder.registerBinding("entrys.id", com.kingdee.bos.util.BOSUuid.class, this.kdtEntrys, "id.text");
  621. dataBinder.registerBinding("entrys", com.kingdee.eas.custom.PlatPreResEntryInfo.class, this.kdtEntrys, "userObject");
  622. dataBinder.registerBinding("entrys.bizDate", java.util.Date.class, this.kdtEntrys, "bizDate.text");
  623. dataBinder.registerBinding("entrys.description", String.class, this.kdtEntrys, "description.text");
  624. dataBinder.registerBinding("entrys.person", com.kingdee.eas.basedata.person.PersonInfo.class, this.kdtEntrys, "person.text");
  625. dataBinder.registerBinding("entrys.person.number", String.class, this.kdtEntrys, "empNumber.text");
  626. dataBinder.registerBinding("entrys.person.name", String.class, this.kdtEntrys, "empName.text");
  627. dataBinder.registerBinding("entrys.position", com.kingdee.eas.basedata.org.PositionInfo.class, this.kdtEntrys, "position.text");
  628. dataBinder.registerBinding("entrys.adminOrg", com.kingdee.eas.basedata.org.AdminOrgUnitInfo.class, this.kdtEntrys, "adminOrg.text");
  629. dataBinder.registerBinding("entrys.preResignDate", java.util.Date.class, this.kdtEntrys, "preResignDate.text");
  630. dataBinder.registerBinding("entrys.reasonDescript", String.class, this.kdtEntrys, "reasonDescript.text");
  631. dataBinder.registerBinding("entrys.resignDate", java.util.Date.class, this.kdtEntrys, "resignDate.text");
  632. dataBinder.registerBinding("number", String.class, this.txtNumber, "text");
  633. dataBinder.registerBinding("description", String.class, this.txtDescription, "text");
  634. dataBinder.registerBinding("applier.name", String.class, this.txtApplier, "text");
  635. dataBinder.registerBinding("adminOrg", com.kingdee.eas.basedata.org.AdminOrgUnitInfo.class, this.prmtAdminOrg, "data");
  636. dataBinder.registerBinding("applyDate", java.util.Date.class, this.dpApplyDate, "value");
  637. dataBinder.registerBinding("billState", com.kingdee.eas.hr.base.HRBillStateEnum.class, this.cbBillState, "selectedItem");
  638. }
  639. //Regiester UI State
  640. private void registerUIState(){
  641. }
  642. public String getUIHandlerClassName() {
  643. return "com.kingdee.eas.custom.app.PlatPreResEditUIHandler";
  644. }
  645. public IUIActionPostman prepareInit() {
  646. IUIActionPostman clientHanlder = super.prepareInit();
  647. if (clientHanlder != null) {
  648. RequestContext request = new RequestContext();
  649. request.setClassName(getUIHandlerClassName());
  650. clientHanlder.setRequestContext(request);
  651. }
  652. return clientHanlder;
  653. }
  654. public boolean isPrepareInit() {
  655. return false;
  656. }
  657. protected void initUIP() {
  658. super.initUIP();
  659. }
  660. /**
  661. * output onShow method
  662. */
  663. public void onShow() throws Exception
  664. {
  665. super.onShow();
  666. this.txtApplier.requestFocusInWindow();
  667. }
  668. /**
  669. * output setDataObject method
  670. */
  671. public void setDataObject(IObjectValue dataObject)
  672. {
  673. IObjectValue ov = dataObject;
  674. super.setDataObject(ov);
  675. this.editData = (com.kingdee.eas.custom.PlatPreResInfo)ov;
  676. }
  677. protected void removeByPK(IObjectPK pk) throws Exception {
  678. IObjectValue editData = this.editData;
  679. super.removeByPK(pk);
  680. recycleNumberByOrg(editData,"NONE",editData.getString("number"));
  681. }
  682. protected void recycleNumberByOrg(IObjectValue editData,String orgType,String number) {
  683. if (!StringUtils.isEmpty(number))
  684. {
  685. try {
  686. String companyID = null;
  687. com.kingdee.eas.base.codingrule.ICodingRuleManager iCodingRuleManager = com.kingdee.eas.base.codingrule.CodingRuleManagerFactory.getRemoteInstance();
  688. if(!com.kingdee.util.StringUtils.isEmpty(orgType) && !"NONE".equalsIgnoreCase(orgType) && com.kingdee.eas.common.client.SysContext.getSysContext().getCurrentOrgUnit(com.kingdee.eas.basedata.org.OrgType.getEnum(orgType))!=null) {
  689. companyID =com.kingdee.eas.common.client.SysContext.getSysContext().getCurrentOrgUnit(com.kingdee.eas.basedata.org.OrgType.getEnum(orgType)).getString("id");
  690. }
  691. else if (com.kingdee.eas.common.client.SysContext.getSysContext().getCurrentOrgUnit() != null) {
  692. companyID = ((com.kingdee.eas.basedata.org.OrgUnitInfo)com.kingdee.eas.common.client.SysContext.getSysContext().getCurrentOrgUnit()).getString("id");
  693. }
  694. if (!StringUtils.isEmpty(companyID) && iCodingRuleManager.isExist(editData, companyID) && iCodingRuleManager.isUseIntermitNumber(editData, companyID)) {
  695. iCodingRuleManager.recycleNumber(editData,companyID,number);
  696. }
  697. }
  698. catch (Exception e)
  699. {
  700. handUIException(e);
  701. }
  702. }
  703. }
  704. protected void setAutoNumberByOrg(String orgType) {
  705. if (editData == null) return;
  706. if (editData.getNumber() == null) {
  707. try {
  708. String companyID = null;
  709. if(!com.kingdee.util.StringUtils.isEmpty(orgType) && !"NONE".equalsIgnoreCase(orgType) && com.kingdee.eas.common.client.SysContext.getSysContext().getCurrentOrgUnit(com.kingdee.eas.basedata.org.OrgType.getEnum(orgType))!=null) {
  710. companyID = com.kingdee.eas.common.client.SysContext.getSysContext().getCurrentOrgUnit(com.kingdee.eas.basedata.org.OrgType.getEnum(orgType)).getString("id");
  711. }
  712. else if (com.kingdee.eas.common.client.SysContext.getSysContext().getCurrentOrgUnit() != null) {
  713. companyID = ((com.kingdee.eas.basedata.org.OrgUnitInfo)com.kingdee.eas.common.client.SysContext.getSysContext().getCurrentOrgUnit()).getString("id");
  714. }
  715. com.kingdee.eas.base.codingrule.ICodingRuleManager iCodingRuleManager = com.kingdee.eas.base.codingrule.CodingRuleManagerFactory.getRemoteInstance();
  716. if (iCodingRuleManager.isExist(editData, companyID)) {
  717. if (iCodingRuleManager.isAddView(editData, companyID)) {
  718. editData.setNumber(iCodingRuleManager.getNumber(editData,companyID));
  719. }
  720. txtNumber.setEnabled(false);
  721. }
  722. }
  723. catch (Exception e) {
  724. handUIException(e);
  725. this.oldData = editData;
  726. com.kingdee.eas.util.SysUtil.abort();
  727. }
  728. }
  729. else {
  730. if (editData.getNumber().trim().length() > 0) {
  731. txtNumber.setText(editData.getNumber());
  732. }
  733. }
  734. }
  735. /**
  736. * output loadFields method
  737. */
  738. public void loadFields()
  739. {
  740. setAutoNumberByOrg("NONE");
  741. dataBinder.loadFields();
  742. }
  743. protected void setOrgF7(KDBizPromptBox f7,com.kingdee.eas.basedata.org.OrgType orgType) throws Exception
  744. {
  745. com.kingdee.eas.basedata.org.client.f7.NewOrgUnitFilterInfoProducer oufip = new com.kingdee.eas.basedata.org.client.f7.NewOrgUnitFilterInfoProducer(orgType);
  746. oufip.getModel().setIsCUFilter(true);
  747. f7.setFilterInfoProducer(oufip);
  748. }
  749. /**
  750. * output storeFields method
  751. */
  752. public void storeFields()
  753. {
  754. dataBinder.storeFields();
  755. }
  756. /**
  757. * ????????§µ??
  758. */
  759. protected void registerValidator() {
  760. getValidateHelper().setCustomValidator( getValidator() );
  761. getValidateHelper().registerBindProperty("hrOrgUnit", ValidateHelper.ON_SAVE);
  762. getValidateHelper().registerBindProperty("approveType", ValidateHelper.ON_SAVE);
  763. getValidateHelper().registerBindProperty("entrys.id", ValidateHelper.ON_SAVE);
  764. getValidateHelper().registerBindProperty("entrys", ValidateHelper.ON_SAVE);
  765. getValidateHelper().registerBindProperty("entrys.bizDate", ValidateHelper.ON_SAVE);
  766. getValidateHelper().registerBindProperty("entrys.description", ValidateHelper.ON_SAVE);
  767. getValidateHelper().registerBindProperty("entrys.person", ValidateHelper.ON_SAVE);
  768. getValidateHelper().registerBindProperty("entrys.person.number", ValidateHelper.ON_SAVE);
  769. getValidateHelper().registerBindProperty("entrys.person.name", ValidateHelper.ON_SAVE);
  770. getValidateHelper().registerBindProperty("entrys.position", ValidateHelper.ON_SAVE);
  771. getValidateHelper().registerBindProperty("entrys.adminOrg", ValidateHelper.ON_SAVE);
  772. getValidateHelper().registerBindProperty("entrys.preResignDate", ValidateHelper.ON_SAVE);
  773. getValidateHelper().registerBindProperty("entrys.reasonDescript", ValidateHelper.ON_SAVE);
  774. getValidateHelper().registerBindProperty("entrys.resignDate", ValidateHelper.ON_SAVE);
  775. getValidateHelper().registerBindProperty("number", ValidateHelper.ON_SAVE);
  776. getValidateHelper().registerBindProperty("description", ValidateHelper.ON_SAVE);
  777. getValidateHelper().registerBindProperty("applier.name", ValidateHelper.ON_SAVE);
  778. getValidateHelper().registerBindProperty("adminOrg", ValidateHelper.ON_SAVE);
  779. getValidateHelper().registerBindProperty("applyDate", ValidateHelper.ON_SAVE);
  780. getValidateHelper().registerBindProperty("billState", ValidateHelper.ON_SAVE);
  781. }
  782. /**
  783. * output setOprtState method
  784. */
  785. public void setOprtState(String oprtType)
  786. {
  787. super.setOprtState(oprtType);
  788. if (STATUS_ADDNEW.equals(this.oprtState)) {
  789. } else if (STATUS_EDIT.equals(this.oprtState)) {
  790. } else if (STATUS_VIEW.equals(this.oprtState)) {
  791. } else if (STATUS_FINDVIEW.equals(this.oprtState)) {
  792. }
  793. }
  794. /**
  795. * output kdtEntrys_editStopping method
  796. */
  797. protected void kdtEntrys_editStopping(com.kingdee.bos.ctrl.kdf.table.event.KDTEditEvent e) throws Exception
  798. {
  799. }
  800. /**
  801. * output kdtEntrys_editStopped method
  802. */
  803. protected void kdtEntrys_editStopped(com.kingdee.bos.ctrl.kdf.table.event.KDTEditEvent e) throws Exception
  804. {
  805. }
  806. /**
  807. * output getSelectors method
  808. */
  809. public SelectorItemCollection getSelectors()
  810. {
  811. SelectorItemCollection sic = new SelectorItemCollection();
  812. String selectorAll = System.getProperty("selector.all");
  813. if(StringUtils.isEmpty(selectorAll)){
  814. selectorAll = "true";
  815. }
  816. if(selectorAll.equalsIgnoreCase("true"))
  817. {
  818. sic.add(new SelectorItemInfo("hrOrgUnit.*"));
  819. }
  820. else{
  821. sic.add(new SelectorItemInfo("hrOrgUnit.id"));
  822. sic.add(new SelectorItemInfo("hrOrgUnit.number"));
  823. sic.add(new SelectorItemInfo("hrOrgUnit.name"));
  824. }
  825. sic.add(new SelectorItemInfo("approveType"));
  826. sic.add(new SelectorItemInfo("entrys.id"));
  827. if(selectorAll.equalsIgnoreCase("true"))
  828. {
  829. sic.add(new SelectorItemInfo("entrys.*"));
  830. }
  831. else{
  832. }
  833. sic.add(new SelectorItemInfo("entrys.bizDate"));
  834. sic.add(new SelectorItemInfo("entrys.description"));
  835. if(selectorAll.equalsIgnoreCase("true"))
  836. {
  837. sic.add(new SelectorItemInfo("entrys.person.*"));
  838. }
  839. else{
  840. sic.add(new SelectorItemInfo("entrys.person.id"));
  841. sic.add(new SelectorItemInfo("entrys.person.name"));
  842. sic.add(new SelectorItemInfo("entrys.person.number"));
  843. }
  844. if(selectorAll.equalsIgnoreCase("true"))
  845. {
  846. sic.add(new SelectorItemInfo("entrys.position.*"));
  847. }
  848. else{
  849. sic.add(new SelectorItemInfo("entrys.position.id"));
  850. sic.add(new SelectorItemInfo("entrys.position.name"));
  851. sic.add(new SelectorItemInfo("entrys.position.number"));
  852. }
  853. if(selectorAll.equalsIgnoreCase("true"))
  854. {
  855. sic.add(new SelectorItemInfo("entrys.adminOrg.*"));
  856. }
  857. else{
  858. sic.add(new SelectorItemInfo("entrys.adminOrg.id"));
  859. sic.add(new SelectorItemInfo("entrys.adminOrg.name"));
  860. sic.add(new SelectorItemInfo("entrys.adminOrg.number"));
  861. }
  862. sic.add(new SelectorItemInfo("entrys.preResignDate"));
  863. sic.add(new SelectorItemInfo("entrys.reasonDescript"));
  864. sic.add(new SelectorItemInfo("entrys.resignDate"));
  865. sic.add(new SelectorItemInfo("number"));
  866. sic.add(new SelectorItemInfo("description"));
  867. sic.add(new SelectorItemInfo("applier.name"));
  868. if(selectorAll.equalsIgnoreCase("true"))
  869. {
  870. sic.add(new SelectorItemInfo("adminOrg.*"));
  871. }
  872. else{
  873. sic.add(new SelectorItemInfo("adminOrg.id"));
  874. sic.add(new SelectorItemInfo("adminOrg.number"));
  875. sic.add(new SelectorItemInfo("adminOrg.name"));
  876. }
  877. sic.add(new SelectorItemInfo("applyDate"));
  878. sic.add(new SelectorItemInfo("billState"));
  879. return sic;
  880. }
  881. /**
  882. * output actionSubmit_actionPerformed method
  883. */
  884. public void actionSubmit_actionPerformed(ActionEvent e) throws Exception
  885. {
  886. super.actionSubmit_actionPerformed(e);
  887. }
  888. /**
  889. * output actionPrint_actionPerformed method
  890. */
  891. public void actionPrint_actionPerformed(ActionEvent e) throws Exception
  892. {
  893. ArrayList idList = new ArrayList();
  894. if (editData != null && !StringUtils.isEmpty(editData.getString("id"))) {
  895. idList.add(editData.getString("id"));
  896. }
  897. if (idList == null || idList.size() == 0 || getTDQueryPK() == null || getTDFileName() == null)
  898. return;
  899. com.kingdee.bos.ctrl.kdf.data.impl.BOSQueryDelegate data = new com.kingdee.eas.framework.util.CommonDataProvider(idList,getTDQueryPK());
  900. com.kingdee.bos.ctrl.report.forapp.kdnote.client.KDNoteHelper appHlp = new com.kingdee.bos.ctrl.report.forapp.kdnote.client.KDNoteHelper();
  901. appHlp.print(getTDFileName(), data, javax.swing.SwingUtilities.getWindowAncestor(this));
  902. }
  903. /**
  904. * output actionPrintPreview_actionPerformed method
  905. */
  906. public void actionPrintPreview_actionPerformed(ActionEvent e) throws Exception
  907. {
  908. ArrayList idList = new ArrayList();
  909. if (editData != null && !StringUtils.isEmpty(editData.getString("id"))) {
  910. idList.add(editData.getString("id"));
  911. }
  912. if (idList == null || idList.size() == 0 || getTDQueryPK() == null || getTDFileName() == null)
  913. return;
  914. com.kingdee.bos.ctrl.kdf.data.impl.BOSQueryDelegate data = new com.kingdee.eas.framework.util.CommonDataProvider(idList,getTDQueryPK());
  915. com.kingdee.bos.ctrl.report.forapp.kdnote.client.KDNoteHelper appHlp = new com.kingdee.bos.ctrl.report.forapp.kdnote.client.KDNoteHelper();
  916. appHlp.printPreview(getTDFileName(), data, javax.swing.SwingUtilities.getWindowAncestor(this));
  917. }
  918. /**
  919. * output actionAudit_actionPerformed method
  920. */
  921. public void actionAudit_actionPerformed(ActionEvent e) throws Exception
  922. {
  923. super.actionAudit_actionPerformed(e);
  924. }
  925. /**
  926. * output actionUnaudit_actionPerformed method
  927. */
  928. public void actionUnaudit_actionPerformed(ActionEvent e) throws Exception
  929. {
  930. super.actionUnaudit_actionPerformed(e);
  931. }
  932. public RequestContext prepareActionSubmit(IItemAction itemAction) throws Exception {
  933. RequestContext request = super.prepareActionSubmit(itemAction);
  934. if (request != null) {
  935. request.setClassName(getUIHandlerClassName());
  936. }
  937. return request;
  938. }
  939. public boolean isPrepareActionSubmit() {
  940. return false;
  941. }
  942. public RequestContext prepareActionPrint(IItemAction itemAction) throws Exception {
  943. RequestContext request = super.prepareActionPrint(itemAction);
  944. if (request != null) {
  945. request.setClassName(getUIHandlerClassName());
  946. }
  947. return request;
  948. }
  949. public boolean isPrepareActionPrint() {
  950. return false;
  951. }
  952. public RequestContext prepareActionPrintPreview(IItemAction itemAction) throws Exception {
  953. RequestContext request = super.prepareActionPrintPreview(itemAction);
  954. if (request != null) {
  955. request.setClassName(getUIHandlerClassName());
  956. }
  957. return request;
  958. }
  959. public boolean isPrepareActionPrintPreview() {
  960. return false;
  961. }
  962. public RequestContext prepareActionAudit(IItemAction itemAction) throws Exception {
  963. RequestContext request = super.prepareActionAudit(itemAction);
  964. if (request != null) {
  965. request.setClassName(getUIHandlerClassName());
  966. }
  967. return request;
  968. }
  969. public boolean isPrepareActionAudit() {
  970. return false;
  971. }
  972. public RequestContext prepareActionUnaudit(IItemAction itemAction) throws Exception {
  973. RequestContext request = super.prepareActionUnaudit(itemAction);
  974. if (request != null) {
  975. request.setClassName(getUIHandlerClassName());
  976. }
  977. return request;
  978. }
  979. public boolean isPrepareActionUnaudit() {
  980. return false;
  981. }
  982. /**
  983. * output getMetaDataPK method
  984. */
  985. public IMetaDataPK getMetaDataPK()
  986. {
  987. return new MetaDataPK("com.kingdee.eas.custom.client", "PlatPreResEditUI");
  988. }
  989. /**
  990. * output isBindWorkFlow method
  991. */
  992. public boolean isBindWorkFlow()
  993. {
  994. return true;
  995. }
  996. /**
  997. * output getEditUIName method
  998. */
  999. protected String getEditUIName()
  1000. {
  1001. return com.kingdee.eas.custom.client.PlatPreResEditUI.class.getName();
  1002. }
  1003. /**
  1004. * output getBizInterface method
  1005. */
  1006. protected com.kingdee.eas.framework.ICoreBase getBizInterface() throws Exception
  1007. {
  1008. return com.kingdee.eas.custom.PlatPreResFactory.getRemoteInstance();
  1009. }
  1010. /**
  1011. * output createNewData method
  1012. */
  1013. protected IObjectValue createNewData()
  1014. {
  1015. com.kingdee.eas.custom.PlatPreResInfo objectValue = new com.kingdee.eas.custom.PlatPreResInfo();
  1016. objectValue.setCreator((com.kingdee.eas.base.permission.UserInfo)(com.kingdee.eas.common.client.SysContext.getSysContext().getCurrentUser()));
  1017. return objectValue;
  1018. }
  1019. protected String getTDFileName() {
  1020. return "/bim/custom/PlatPreRes";
  1021. }
  1022. protected IMetaDataPK getTDQueryPK() {
  1023. return new MetaDataPK("com.kingdee.eas.custom.app.PlatPreResQuery");
  1024. }
  1025. /**
  1026. * output getDetailTable method
  1027. */
  1028. protected KDTable getDetailTable() {
  1029. return kdtEntrys;
  1030. }
  1031. /**
  1032. * output applyDefaultValue method
  1033. */
  1034. protected void applyDefaultValue(IObjectValue vo) {
  1035. }
  1036. protected void setFieldsNull(com.kingdee.bos.dao.AbstractObjectValue arg0) {
  1037. super.setFieldsNull(arg0);
  1038. arg0.put("number",null);
  1039. }
  1040. }