4c936a2b268c110a6fde96f77102f461fd809fe9.svn-base 53 KB

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