Commit 8cb924ca by liuyang

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

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