public void onLoad() throws Exception {
super.onLoad();
judgeIsNew();
}
public void actionCopy_actionPerformed(ActionEvent e) throws Exception {
super.actionCopy_actionPerformed(e);
judgeIsNew();
unlockBill();
}
private void judgeIsNew() {
if(this.editData != null){
btnUpdContacter.setVisible(false);
btnUpdDate.setVisible(false);
btnUpdSupply.setVisible(false);
BOSUuid id = this.editData.getId();
IObjectPK pk = new ObjectUuidPK(id);
String sql = "select count(*) count from CT_CON_CContract where FID ='"+pk+"'";
ISQLExecutor se = SQLExecutorFactory.getRemoteInstance(sql);
IRowSet rs;
try {
rs = se.executeSQL();
rs.next();
if(rs.getInt("count") < 1){
this.txtoperateStatus.setText("开始");
this.txtamount.setText("0");
txtamount.setNumberValue(0);
this.txtamountApply.setText("0");
txtamountApply.setNumberValue(0);
this.txtamountDone.setText("0");
txtamountDone.setNumberValue(0);
this.txtamountNoApply.setText("0");
txtamountNoApply.setNumberValue(0);
this.txtamountNoDone.setText("0");
txtamountNoDone.setNumberValue(0);
this.txtamountNoTax.setText("0");
txtamountNoTax.setNumberValue(0);
this.txttax.setText("0");
txttax.setNumberValue(0);
this.txtbudget.setText("0");
txtbudget.setNumberValue(0);
prmtleaseCard.setValue(null);
this.kdtEntrys.removeRows();
this.kdtInvoice.removeRows();
this.kdtPlanRate.removeRows();
this.kdtStatusInfo.removeRows();
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
private void unlockBill(){
btnDone.setEnabled(false);
btnEdit.setVisible(true);
btnReset.setVisible(false);
btnFinance.setEnabled(true);
btnFinance.setVisible(true);
btnSave.setVisible(true);
this.contCreator.setEnabled(true);
this.contCreateTime.setEnabled(true);
this.contLastUpdateUser.setEnabled(true);
this.contLastUpdateTime.setEnabled(true);
this.contNumber.setEnabled(false);
this.contBizDate.setEnabled(true);
this.contDescription.setEnabled(true);
this.contAuditor.setEnabled(true);
this.contbillName.setEnabled(true);
this.contoaBill.setEnabled(true);
this.contdeptName.setEnabled(true);
this.contbudget.setEnabled(true);
this.contisFrame.setEnabled(true);
this.contcurrencyType.setEnabled(true);
this.contcontractSel.setEnabled(true);
this.contcontractNO.setEnabled(true);
this.prmtcontacter.setEnabled(true);
this.contcompany.setEnabled(true);
this.contdeptNo.setEnabled(true);
this.contsupply.setEnabled(true);
this.contaccountBank.setEnabled(true);
this.contaccountName.setEnabled(true);
this.contaccountNumber.setEnabled(true);
this.contsrvEndDate.setEnabled(true);
this.contsrvBeginDate.setEnabled(true);
this.contBizDate.setEnabled(true);
this.contpayType.setEnabled(true);
this.contcostCenter.setEnabled(true);
this.contdateCheck.setEnabled(true);
this.contperCheckDate.setEnabled(true);
this.contbillPayDate.setEnabled(true);
this.contsrvNote.setEnabled(true);
this.contnoteAmount.setEnabled(true);
this.contnote.setEnabled(true);
this.contpayCondition.setEnabled(true);
this.contamountApply.setEnabled(false);
this.contamount.setEnabled(true);
this.contamountNoTax.setEnabled(true);
this.conttax.setEnabled(false);
this.contamountDone.setEnabled(false);
this.contamountNoDone.setEnabled(false);
this.contamountNoApply.setEnabled(false);
this.kdtInvoice.setEnabled(false);
this.kdtStatusInfo.setEnabled(false);
this.kdtEntrys.setEnabled(true);
this.kdtPlanRate.setEnabled(true);
this.kdtEntrys.getColumn("expenseType").setRequired(false);
prmtcontractType.setEnabled(true);
contcontractSel.setEnabled(true);
prmtproject.setEnabled(true);
contothers.setEnabled(true);
txtnote.setEnabled(true);
txtsrvNote.setEnabled(true);
txtnoteAmount.setEnabled(true);
txtpayCondition.setEnabled(true);
}
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· Manus爆火,是硬核还是营销?
· 一文读懂知识蒸馏
· 终于写完轮子一部分:tcp代理 了,记录一下