1.物资耗材系统-采购退货:调拨耗材无法退货问题

2.物资耗材系统-采购退货:退库单无法取消完成问题
develop/lyx_20250109_hcth
lxx 1 week ago
parent 2f60acfdd4
commit 45dccf6f89
  1. 46
      WEB-INF/src/com/mms/wzkc/thd/MMSThdManageForm.java

@ -1,15 +1,14 @@
package com.mms.wzkc.thd; package com.mms.wzkc.thd;
import java.sql.Timestamp; import java.sql.Timestamp;
import com.mms.model.MMStkModel; import com.mms.model.MMStkModel;
import com.mms.service.MMStkService; import com.mms.service.MMStkService;
import com.report.design.basic.ReportDesignUtil.PrintFlag; import com.report.design.basic.ReportDesignUtil.PrintFlag;
import com.report.model.MMSThdPrintModel;
import com.report.service.MMSThdPrintService;
import com.util.CreateBillNo; import com.util.CreateBillNo;
import com.util.MainUtil; import com.util.MainUtil;
import com.util.SnowIdUtils; import com.util.SnowIdUtils;
import com.report.model.MMSThdPrintModel;
import com.report.service.MMSThdPrintService;
import com.wat.component.DxDataCheckBox; import com.wat.component.DxDataCheckBox;
import com.wat.component.DxDataDateTimePick; import com.wat.component.DxDataDateTimePick;
import com.wat.component.DxLabel; 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"); DxNormalDataManager mmsthddao=DaoCreator.getNormalDao(this,"mmsthddao");
String dptid=mmsthddao.getColumnValueAsString("DPTID"); String dptid=mmsthddao.getColumnValueAsString("DPTID");
String djh=mmsthddao.getColumnValueAsString("DJH"); String djh=mmsthddao.getColumnValueAsString("DJH");
@ -437,22 +436,23 @@ public class MMSThdManageForm extends WatWebForm {
popgrid3.setFocus(); popgrid3.setFocus();
return true; return true;
} }
if (towc) {
for(int i = 0;i < dbgrid1.getRowCount();i++) { for(int i = 0;i < dbgrid1.getRowCount();i++) {
String sl=dbgrid1.getColumnValueAsString(i,"SL"); String sl=dbgrid1.getColumnValueAsString(i,"SL");
String kysl=dbgrid1.getColumnValueAsString(i,"KYSL"); String kysl=dbgrid1.getColumnValueAsString(i,"KYSL");
if(!Delphi.isNullString(sl) && (!Delphi.isInteger(sl) || Double.parseDouble(MathUtil.subtract(sl, 0))<=0)){ if(!Delphi.isNullString(sl) && (!Delphi.isInteger(sl) || Double.parseDouble(MathUtil.subtract(sl, 0))<=0)){
setLabelShow("第("+(i+1)+")行退库数量只能是大于零的整数"); setLabelShow("第("+(i+1)+")行退库数量只能是大于零的整数");
dbgrid1.setFocus(i, "SL"); dbgrid1.setFocus(i, "SL");
return true; return true;
} }
if(Double.parseDouble(MathUtil.subtract(kysl, sl))<0){ if(Double.parseDouble(MathUtil.subtract(kysl, sl))<0){
setLabelShow("第("+(i+1)+")行退库数量不能大于入库数量"); setLabelShow("第("+(i+1)+")行退库数量不能大于入库数量");
dbgrid1.setFocus(i, "SL"); dbgrid1.setFocus(i, "SL");
return true; return true;
} }
} }
}
if(Delphi.isNullString(djh)){ if(Delphi.isNullString(djh)){
djh=CreateBillNo.getWatSequenceBillNo("MMSTHDZD", MainUtil.getCurCompanyID()); djh=CreateBillNo.getWatSequenceBillNo("MMSTHDZD", MainUtil.getCurCompanyID());
if(Delphi.isNullString(djh)) { if(Delphi.isNullString(djh)) {
@ -468,7 +468,7 @@ public class MMSThdManageForm extends WatWebForm {
} }
private void panelBar1saveAction(){ private void panelBar1saveAction(){
if(hasno()) { if(hasno(true)) {
return; return;
} }
@ -495,7 +495,8 @@ public class MMSThdManageForm extends WatWebForm {
private void wcAction(boolean towc){ private void wcAction(boolean towc){
if(hasno()) return; String companyid=MainUtil.getCurCompanyID();
if(hasno(towc)) return;
DxNormalDataManager mmsthddao=DaoCreator.getNormalDao(this,"mmsthddao"); DxNormalDataManager mmsthddao=DaoCreator.getNormalDao(this,"mmsthddao");
MMStkModel model = new MMStkModel(); MMStkModel model = new MMStkModel();
model.setCompanyId(MainUtil.getCurCompanyID()); model.setCompanyId(MainUtil.getCurCompanyID());
@ -516,6 +517,7 @@ public class MMSThdManageForm extends WatWebForm {
setLabelShow("提示:取消完成成功!"); setLabelShow("提示:取消完成成功!");
this.setWinParams("flag", "1"); this.setWinParams("flag", "1");
} }
dbgrid1.reload(new Object[]{companyid,dbgrid1.getColumnValueAsString(0,"DJH")});
setEnabled(); setEnabled();
}else{ }else{
if(towc){ if(towc){

Loading…
Cancel
Save