Commit 8cb924ca by liuyang

1.合同号改为可手工修改

2.填写发票号后点保存直接开票
parent bd8f0147
......@@ -134,6 +134,9 @@ public class ServiceHGCW002 extends ServiceBase {
HGCW002.getContractType() +
SequenceGenerator.getNextSequence(HGConstant.SequenceId.CW_CONTRACT_NO);
HGCW002.setContractNumber(contractNumber);
}else {
HGCW002 hgcw002 = HGCWTools.HgCw002.getContractNumber(HGCW002.getContractNumber());
AssertUtils.isTrue(hgcw002!=null, "合同编号:[" + HGCW002.getContractNumber() + "]已存在!");
}
HGCW002.setReviewStatus(0);
......@@ -144,7 +147,14 @@ public class ServiceHGCW002 extends ServiceBase {
HGCWTools.HgCw003.save(detail1Rows, HGCW002.getContractNumber(), HGCW002);
HGCWTools.HgCw999.batchUpdate(detail2Rows, HGCW002.getId());
} else {
if (HGCW002.getContractNumber().trim().isEmpty()){
AssertUtils.isTrue(true, "合同编号不能为空!");
}else {
HGCW002 hgcw002 = HGCWTools.HgCw002.getContractNumber(HGCW002.getContractNumber());
if (hgcw002 != null && !hgcw002.getId().equals(HGCW002.getId())){
AssertUtils.isTrue(true, "合同编号:[" + HGCW002.getContractNumber() + "]已存在!");
}
}
BigDecimal totalContractPriceExcluding = new BigDecimal(0);
BigDecimal totalContractPriceIncluding = new BigDecimal(0);
BigDecimal valueAddedTax = new BigDecimal(0);
......
......@@ -131,9 +131,12 @@ public class ServiceHGCW010 extends ServiceBase {
AssertUtils.isNull(HGSC001, "项目编码[" + hgcw010.getProjCode() + "]不存在");
hgcw010.setProjName(HGSC001.getProjName());
}
hgcw010.setBillState(HGConstant.BillStatus.S1);
if (StringUtils.isNotBlank(hgcw010.getBillNumber())){
hgcw010.setBillState(HGConstant.BillStatus.S2);
}
hgcw010.setSigningDate(DateUtils.formatShort(hgcw010.getSigningDate()));
if (hgcw010.getId() == null || hgcw010.getId() == 0) {
hgcw010.setBillState(HGConstant.BillStatus.S1);
hgcw010.setReviewStatus(ReviewStatusEnum.UNREVIEWED.getCode());
this.add(hgcw010);
} else {
......
......@@ -94,11 +94,15 @@ function updateFunc() {
}
function windowCallback() {
// 刷新列表
resultGrid.dataSource.page(1);
// 关闭弹窗
JSColorbox.close();
function windowCallback(ei) {
if (ei !=null && ei.getStatus() < 0) {
}else {
// 刷新列表
resultGrid.dataSource.page(1);
// 关闭弹窗
JSColorbox.close();
}
}
function contractDetailFunc(id) {
......
......@@ -27,7 +27,7 @@
</div>
<div class="row">
<EF:EFInput ename="result-0-contractNumber" cname="合同号" colWidth="4" readonly="true" />
<EF:EFInput ename="result-0-contractNumber" cname="合同号" colWidth="4" readonly="false" />
<EF:EFInput ename="result-0-contractName" cname="合同名称" colWidth="4" required="true"/>
<EF:EFInput ename="result-0-contractCategory" cname="合同类别" type="hidden"/>
......
......@@ -93,7 +93,7 @@ $(function() {
break;
}
}
loadChange(grid,e,"billNumber");
loadChange(grid,e,"branchUnit");
}
if (e.field === "projCode"){
let projCode = item.projCode;
......
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