Commit e2583865 by 江和松

合同校验提交

parent 591b0662
......@@ -23,6 +23,7 @@ import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import java.math.BigDecimal;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
......@@ -111,6 +112,8 @@ public class ServiceHGCG002 extends ServiceBase {
HGCG002 dbCg002 = dbCg002AMap.get(contractNo);
AssertUtils.isNull(dbCg002, String.format("合同[%s]不存在", contractNo));
AssertUtils.isNotEquals(HGConstant.CgPlanStatus.S_0, dbCg002.getStatus(), String.format("合同[%s]状态不是\"待审核\",不允许操作", contractNo));
AssertUtils.isTrue(fCg002.getPrice().compareTo(BigDecimal.ZERO) <= 0, String.format("合同[%s]单价小于等于0,不允许操作", contractNo));
AssertUtils.isTrue(fCg002.getTaxRate().compareTo(BigDecimal.ZERO) <= 0, String.format("合同[%s]税率小于等于0,不允许操作", contractNo));
}
}
......@@ -221,6 +224,10 @@ public class ServiceHGCG002 extends ServiceBase {
AssertUtils.isNull(dbCg002, String.format("合同[%s]不存在", contractNo));
AssertUtils.isNotEquals(HGConstant.CgContractStatus.S_0, dbCg002.getStatus(),
String.format("合同[%s]状态不是\"待审核\",不允许操作", contractNo));
AssertUtils.isTrue(dbCg002.getPrice().compareTo(BigDecimal.ZERO) <= 0,
String.format("合同[%s]单价小于等于0,不允许操作", contractNo));
AssertUtils.isTrue(dbCg002.getTaxRate().compareTo(BigDecimal.ZERO) <= 0,
String.format("合同[%s]税率小于等于0,不允许操作", contractNo));
}
}
......
......@@ -11,7 +11,7 @@ import java.util.Map;
/**
* Project: <br>
* Title:Hgkc002.java <br>
* Title:Hgkc002.java (已弃用)<br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
......
......@@ -197,6 +197,14 @@ let save = function () {
message("勾选的第" + (i + 1) + "行采购员不能为空");
return;
}
if(!isBlank(rows[i]['price']) && !isNumber(rows[i]['price'])){
message("勾选的第" + (i + 1) + "行单价不能小于0");
return;
}
if(!isBlank(rows[i]['taxRate']) && !isNumber(rows[i]['taxRate'])){
message("勾选的第" + (i + 1) + "行税率不能为空");
return;
}
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment