From 45dccf6f893640a633319d9abd4843c1f97fdc35 Mon Sep 17 00:00:00 2001 From: lxx <466693313@qq.com> Date: Mon, 13 Jan 2025 13:44:12 +0800 Subject: [PATCH] =?UTF-8?q?1.=E7=89=A9=E8=B5=84=E8=80=97=E6=9D=90=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F-=E9=87=87=E8=B4=AD=E9=80=80=E8=B4=A7=EF=BC=9A?= =?UTF-8?q?=E8=B0=83=E6=8B=A8=E8=80=97=E6=9D=90=E6=97=A0=E6=B3=95=E9=80=80?= =?UTF-8?q?=E8=B4=A7=E9=97=AE=E9=A2=98=202.=E7=89=A9=E8=B5=84=E8=80=97?= =?UTF-8?q?=E6=9D=90=E7=B3=BB=E7=BB=9F-=E9=87=87=E8=B4=AD=E9=80=80?= =?UTF-8?q?=E8=B4=A7=EF=BC=9A=E9=80=80=E5=BA=93=E5=8D=95=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E5=8F=96=E6=B6=88=E5=AE=8C=E6=88=90=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WEB-INF/src/com/mms/wzkc/thd/MMSThdManageForm.java | 46 +++++++++++----------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/WEB-INF/src/com/mms/wzkc/thd/MMSThdManageForm.java b/WEB-INF/src/com/mms/wzkc/thd/MMSThdManageForm.java index ad7d8e6..0ff2980 100644 --- a/WEB-INF/src/com/mms/wzkc/thd/MMSThdManageForm.java +++ b/WEB-INF/src/com/mms/wzkc/thd/MMSThdManageForm.java @@ -1,15 +1,14 @@ package com.mms.wzkc.thd; import java.sql.Timestamp; - import com.mms.model.MMStkModel; import com.mms.service.MMStkService; import com.report.design.basic.ReportDesignUtil.PrintFlag; +import com.report.model.MMSThdPrintModel; +import com.report.service.MMSThdPrintService; import com.util.CreateBillNo; import com.util.MainUtil; import com.util.SnowIdUtils; -import com.report.model.MMSThdPrintModel; -import com.report.service.MMSThdPrintService; import com.wat.component.DxDataCheckBox; import com.wat.component.DxDataDateTimePick; import com.wat.component.DxLabel; @@ -415,7 +414,7 @@ public class MMSThdManageForm extends WatWebForm { } } - private boolean hasno(){ + private boolean hasno(boolean towc){ DxNormalDataManager mmsthddao=DaoCreator.getNormalDao(this,"mmsthddao"); String dptid=mmsthddao.getColumnValueAsString("DPTID"); String djh=mmsthddao.getColumnValueAsString("DJH"); @@ -437,22 +436,23 @@ public class MMSThdManageForm extends WatWebForm { popgrid3.setFocus(); return true; } - - for(int i = 0;i < dbgrid1.getRowCount();i++) { - String sl=dbgrid1.getColumnValueAsString(i,"SL"); - String kysl=dbgrid1.getColumnValueAsString(i,"KYSL"); - if(!Delphi.isNullString(sl) && (!Delphi.isInteger(sl) || Double.parseDouble(MathUtil.subtract(sl, 0))<=0)){ - setLabelShow("第("+(i+1)+")行退库数量只能是大于零的整数"); - dbgrid1.setFocus(i, "SL"); - return true; - } - - if(Double.parseDouble(MathUtil.subtract(kysl, sl))<0){ - setLabelShow("第("+(i+1)+")行退库数量不能大于入库数量"); - dbgrid1.setFocus(i, "SL"); - return true; - } - } + if (towc) { + for(int i = 0;i < dbgrid1.getRowCount();i++) { + String sl=dbgrid1.getColumnValueAsString(i,"SL"); + String kysl=dbgrid1.getColumnValueAsString(i,"KYSL"); + if(!Delphi.isNullString(sl) && (!Delphi.isInteger(sl) || Double.parseDouble(MathUtil.subtract(sl, 0))<=0)){ + setLabelShow("第("+(i+1)+")行退库数量只能是大于零的整数"); + dbgrid1.setFocus(i, "SL"); + return true; + } + + if(Double.parseDouble(MathUtil.subtract(kysl, sl))<0){ + setLabelShow("第("+(i+1)+")行退库数量不能大于入库数量"); + dbgrid1.setFocus(i, "SL"); + return true; + } + } + } if(Delphi.isNullString(djh)){ djh=CreateBillNo.getWatSequenceBillNo("MMSTHDZD", MainUtil.getCurCompanyID()); if(Delphi.isNullString(djh)) { @@ -468,7 +468,7 @@ public class MMSThdManageForm extends WatWebForm { } private void panelBar1saveAction(){ - if(hasno()) { + if(hasno(true)) { return; } @@ -495,7 +495,8 @@ public class MMSThdManageForm extends WatWebForm { private void wcAction(boolean towc){ - if(hasno()) return; + String companyid=MainUtil.getCurCompanyID(); + if(hasno(towc)) return; DxNormalDataManager mmsthddao=DaoCreator.getNormalDao(this,"mmsthddao"); MMStkModel model = new MMStkModel(); model.setCompanyId(MainUtil.getCurCompanyID()); @@ -516,6 +517,7 @@ public class MMSThdManageForm extends WatWebForm { setLabelShow("提示:取消完成成功!"); this.setWinParams("flag", "1"); } + dbgrid1.reload(new Object[]{companyid,dbgrid1.getColumnValueAsString(0,"DJH")}); setEnabled(); }else{ if(towc){