Commit ce7c9135 by liuyang

2024-07-18 结算单管理新增需求:

1.结算单管理在操作增加附件上传
2.结算单选择增加可选签证单数据
parent 472f8a9f
......@@ -118,6 +118,7 @@ public class ServiceHGCW008 extends ServiceBase {
} else {
HGCW008.setContractDate(DateUtils.formatShort(HGCW008.getContractDate()));
this.modify(HGCW008);
HGCWTools.HgCw009.update(detail1Rows);
}
// 更新合同结算状态
HGCWTools.HgCw002.updateBalanceStatus(HGCW008.getContractNumber(),HGCW008.getSettlementType() + 1);
......
package com.baosight.hggp.hg.cw.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.hg.cw.domain.HGCW003;
import com.baosight.hggp.hg.cw.domain.HGCW006;
import com.baosight.hggp.hg.cw.domain.HGCW007;
import com.baosight.hggp.hg.cw.domain.HGCW999;
import com.baosight.hggp.hg.cw.domain.*;
import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.StringUtils;
......@@ -32,6 +29,7 @@ public class ServiceHGCW008D extends ServiceBase {
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCW003().eiMetadata);
inInfo.addBlock("result3").addBlockMeta(new HGCW003().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
......@@ -64,4 +62,25 @@ public class ServiceHGCW008D extends ServiceBase {
return inInfo;
}
@OperationLogAnnotation(operModul = "签证单",operType = "查询",operDesc = "查询")
public EiInfo query3(EiInfo inInfo) {
try {
List<String> ids = new ArrayList<>();
String appentIds = inInfo.getString("inqu_status-0-appentIds");
if (StringUtils.isNotEmpty(appentIds)) {
String[] appentIdsArr = appentIds.split(",");
for (String id : appentIdsArr) {
ids.add(id);
}
inInfo.set("inqu_status-0-ids", ids);
}
inInfo = super.query(inInfo, HGCW004.QUERY, new HGCW004(),new HGCW004().eiMetadata,"","","result3",false);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
}
......@@ -2,9 +2,11 @@ package com.baosight.hggp.hg.cw.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.hg.cw.domain.HGCW003;
import com.baosight.hggp.hg.cw.domain.HGCW004;
import com.baosight.hggp.hg.cw.domain.HGCW005;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.StringUtils;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
......@@ -30,6 +32,7 @@ public class ServiceHGCW008E extends ServiceBase {
try {
inInfo.addBlock("result1").addBlockMeta(new HGCW003().eiMetadata);
inInfo.addBlock("result2").addBlockMeta(new HGCW003().eiMetadata);
inInfo.addBlock("result3").addBlockMeta(new HGCW003().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
......@@ -90,4 +93,25 @@ public class ServiceHGCW008E extends ServiceBase {
return inInfo;
}
@OperationLogAnnotation(operModul = "签证单",operType = "查询",operDesc = "查询")
public EiInfo query3(EiInfo inInfo) {
try {
List<String> ids = new ArrayList<>();
String appentIds = inInfo.getString("inqu_status-0-appentIds");
if (StringUtils.isNotEmpty(appentIds)) {
String[] appentIdsArr = appentIds.split(",");
for (String id : appentIdsArr) {
ids.add(id);
}
inInfo.set("inqu_status-0-ids", ids);
}
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,HGCW004.FIELD_REVIEW_STATUS,"3");
inInfo = super.query(inInfo, HGCW004.QUERY, new HGCW004(),new HGCW004().eiMetadata,"","","result3",false);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
}
......@@ -98,6 +98,9 @@
<isNotEmpty prepend=" AND " property="companyCodes">
COMPANY_CODE IN <iterate close=")" open="(" conjunction="," property="companyCodes">#companyCodes[]#</iterate>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="ids">
ID NOT IN <iterate close=")" open="(" conjunction="," property="ids">#ids[]#</iterate>
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
......@@ -132,7 +135,7 @@
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
SIGNING_DATE DESC, ID DESC
</isEmpty>
</dynamic>
......
......@@ -234,7 +234,10 @@
UPDATED_TIME, <!-- 记录修改时间 -->
DEP_CODE <!-- 部门编码 -->
)
VALUES (#id#, #accountCode#, #companyCode#, #companyName#, #settlementNumber#, #settlementBasis#, #taskName#, #engineeringContent#, #thisEngineeringQuantity#, #cumulativeEngineeringQuantity#, #unit#, #unitPrice#, #totalPrice#, #inventoryId#, #remarks#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #depCode#)
VALUES (#id#, #accountCode#, #companyCode#, #companyName#, #settlementNumber#, #settlementBasis#, #taskName#,
#engineeringContent#, #thisEngineeringQuantity#, #cumulativeEngineeringQuantity#, #unit#, #unitPrice#,
#totalPrice#, #inventoryId#, #remarks#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#,
#updatedTime#, #depCode#)
</insert>
<delete id="delete">
......
......@@ -449,6 +449,14 @@ public class HGCWTools {
});
}
public static void update(List<Map> rows) {
rows.forEach(row -> {
HGCW009 hgcw009 = new HGCW009();
hgcw009.fromMap(row);
DaoUtils.insert(HGCW009.UPDATE, hgcw009);
});
}
/**
* 根据合同号获取合同清单
* @param settlementNumber
......
......@@ -13,6 +13,8 @@ $(function() {
template: function (item) {
let template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="contractDetailFunc(' + item.id + ')">结算单详情</a>';
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="fileDetailFunc(' + item.id + ')">附件详情</a>';
return template;
}
}
......@@ -154,4 +156,13 @@ function submitFunc() {
}
}
function fileDetailFunc(id) {
JSColorbox.open({
href: "HGCW999?methodName=initLoad&inqu_status-0-bizType=JSD&inqu_status-0-matId=" + id + "&efParentFormEname=HGCW008",
title: "<div style='text-align: center;'>附件清单</div>",
width: "80%",
height: "80%",
});
}
......@@ -60,7 +60,8 @@
</EF:EFPage>
<%--
<script>
var ctx = "${ctx}";
</script>
<script src="${ctx}/HG/CW/HGCW008.js"></script>
\ No newline at end of file
<script src="${ctx}/HG/CW/HGCW008.js"></script>--%>
......@@ -170,13 +170,18 @@ function choiceFunc() {
//获取已经加载的合同清单数据
var inventoryIds = [];
var deductionIds = [];
let appentIds = [];
let allRows = new Array();
allRows = detail1Grid.getDataItems();
if (allRows) {
allRows.forEach(function (row, index) {
if (row.settlementBasis == "合同内") {
inventoryIds.push(row.inventoryId);
} else {
} else if (row.settlementBasis == "签证") {
if (row.inventoryId) {
appentIds.push(row.inventoryId);
}
}else {
if (row.inventoryId) {
deductionIds.push(row.inventoryId);
}
......@@ -184,10 +189,11 @@ function choiceFunc() {
})
}
if (contractType == "1") {
if (contractType == "1" || contractType == "3") {
JSColorbox.open({
href: "HGCW008D?methodName=initLoad&inqu_status-0-contractNumber=" + contractNumber +
"&inqu_status-0-inventoryIds=" + inventoryIds.join(","),
"&inqu_status-0-inventoryIds=" + inventoryIds.join(",")+
"&inqu_status-0-appentIds=" + appentIds.join(","),
title: "<div style='text-align: center;'>合同清单</div>",
width: "80%",
height: "80%",
......@@ -199,7 +205,8 @@ function choiceFunc() {
JSColorbox.open({
href: "HGCW008E?methodName=initLoad&inqu_status-0-contractNumber=" + contractNumber +
"&inqu_status-0-inventoryIds=" + inventoryIds.join(",") +
"&inqu_status-0-deductionIds=" + deductionIds.join(","),
"&inqu_status-0-deductionIds=" + deductionIds.join(",")+
"&inqu_status-0-appentIds=" + appentIds.join(","),
title: "<div style='text-align: center;'>合同清单</div>",
width: "80%",
height: "80%",
......@@ -214,9 +221,9 @@ function choiceFunc() {
}
function choiceCallbackFunc(result1, result2) {
function choiceCallbackFunc(result1, result2, result3) {
var contractType = $("#contractType").val();
if (contractType == "1") {
if (contractType == "1" || contractType == "3") {
$.each(result1, function(index, item) {
detail1Grid.dataSource.insert();
detail1Grid.setCellValue(0, "rowNo", 0);
......@@ -227,6 +234,16 @@ function choiceCallbackFunc(result1, result2) {
detail1Grid.setCellValue(0, "inventoryId", item.id);
detail1Grid.refresh();
})
$.each(result2, function(index, item) {
detail1Grid.dataSource.insert();
detail1Grid.setCellValue(0, "rowNo", 0);
detail1Grid.setCellValue(0, "settlementBasis", "签证");
detail1Grid.setCellValue(0, "taskName", item.projName);
detail1Grid.setCellValue(0, "unitPrice", item.totalContractPriceIncluding);
detail1Grid.setCellValue(0, "remarks", item.contractContent);
detail1Grid.setCellValue(0, "inventoryId", item.id);
detail1Grid.refresh();
})
} else {
$.each(result1, function(index, item) {
detail1Grid.dataSource.insert();
......@@ -248,6 +265,16 @@ function choiceCallbackFunc(result1, result2) {
detail1Grid.setCellValue(0, "inventoryId", item.id);
detail1Grid.refresh();
})
$.each(result3, function(index, item) {
detail1Grid.dataSource.insert();
detail1Grid.setCellValue(0, "rowNo", 0);
detail1Grid.setCellValue(0, "settlementBasis", "签证");
detail1Grid.setCellValue(0, "taskName", item.projName);
detail1Grid.setCellValue(0, "unitPrice", item.totalContractPriceIncluding);
detail1Grid.setCellValue(0, "remarks", item.contractContent);
detail1Grid.setCellValue(0, "inventoryId", item.id);
detail1Grid.refresh();
})
}
JSColorbox.close();
......
......@@ -86,7 +86,7 @@
</EF:EFPage>
<script>
<%--<script>
var ctx = "${ctx}";
</script>
<script src="${ctx}/HG/CW/HGCW008A.js"></script>
<script src="${ctx}/HG/CW/HGCW008A.js"></script>--%>
......@@ -179,12 +179,17 @@ function choiceFunc() {
//获取已经加载的合同清单数据
var inventoryIds = [];
var deductionIds = [];
let appentIds = [];
let allRows = new Array();
allRows = detail1Grid.getDataItems();
if (allRows) {
allRows.forEach(function (row, index) {
if (row.settlementBasis == "合同内") {
inventoryIds.push(row.inventoryId);
}else if (row.settlementBasis == "签证") {
if (row.inventoryId) {
appentIds.push(row.inventoryId);
}
} else {
if (row.inventoryId) {
deductionIds.push(row.inventoryId);
......@@ -193,10 +198,11 @@ function choiceFunc() {
})
}
if (contractType == "1") {
if (contractType == "1" || contractType == "3") {
JSColorbox.open({
href: "HGCW008D?methodName=initLoad&inqu_status-0-contractNumber=" + contractNumber +
"&inqu_status-0-inventoryIds=" + inventoryIds.join(","),
"&inqu_status-0-inventoryIds=" + inventoryIds.join(",")+
"&inqu_status-0-appentIds=" + appentIds.join(","),
title: "<div style='text-align: center;'>合同清单</div>",
width: "80%",
height: "80%",
......@@ -208,7 +214,8 @@ function choiceFunc() {
JSColorbox.open({
href: "HGCW008E?methodName=initLoad&inqu_status-0-contractNumber=" + contractNumber +
"&inqu_status-0-inventoryIds=" + inventoryIds.join(",") +
"&inqu_status-0-deductionIds=" + deductionIds.join(","),
"&inqu_status-0-deductionIds=" + deductionIds.join(",")+
"&inqu_status-0-appentIds=" + appentIds.join(","),
title: "<div style='text-align: center;'>合同清单</div>",
width: "80%",
height: "80%",
......@@ -225,7 +232,7 @@ function choiceFunc() {
function choiceCallbackFunc(result1, result2) {
var contractType = $("#contractType").val();
if (contractType == "1") {
if (contractType == "1" || contractType == "3") {
$.each(result1, function(index, item) {
detail1Grid.dataSource.insert();
detail1Grid.setCellValue(0, "rowNo", 0);
......@@ -236,6 +243,16 @@ function choiceCallbackFunc(result1, result2) {
detail1Grid.setCellValue(0, "inventoryId", item.id);
detail1Grid.refresh();
})
$.each(result2, function(index, item) {
detail1Grid.dataSource.insert();
detail1Grid.setCellValue(0, "rowNo", 0);
detail1Grid.setCellValue(0, "settlementBasis", "签证");
detail1Grid.setCellValue(0, "taskName", item.projName);
detail1Grid.setCellValue(0, "unitPrice", item.totalContractPriceIncluding);
detail1Grid.setCellValue(0, "remarks", item.contractContent);
detail1Grid.setCellValue(0, "inventoryId", item.id);
detail1Grid.refresh();
})
} else {
$.each(result1, function(index, item) {
detail1Grid.dataSource.insert();
......@@ -257,6 +274,16 @@ function choiceCallbackFunc(result1, result2) {
detail1Grid.setCellValue(0, "inventoryId", item.id);
detail1Grid.refresh();
})
$.each(result3, function(index, item) {
detail1Grid.dataSource.insert();
detail1Grid.setCellValue(0, "rowNo", 0);
detail1Grid.setCellValue(0, "settlementBasis", "签证");
detail1Grid.setCellValue(0, "taskName", item.projName);
detail1Grid.setCellValue(0, "unitPrice", item.totalContractPriceIncluding);
detail1Grid.setCellValue(0, "remarks", item.contractContent);
detail1Grid.setCellValue(0, "inventoryId", item.id);
detail1Grid.refresh();
})
}
JSColorbox.close();
......
......@@ -88,7 +88,8 @@
</EF:EFPage>
<%--
<script>
var ctx = "${ctx}";
</script>
<script src="${ctx}/HG/CW/HGCW008B.js"></script>
\ No newline at end of file
<script src="${ctx}/HG/CW/HGCW008B.js"></script>--%>
......@@ -6,6 +6,12 @@ $(function () {
hidden: true, // true时,不显示功能按钮,但保留setting导出按钮
},
columns: []
},
"result2": {
toolbarConfig: {
hidden: true, // true时,不显示功能按钮,但保留setting导出按钮
},
columns: []
}
}
......@@ -23,9 +29,11 @@ $(function () {
*/
$('#confirm').on('click', function () {
let allRows = new Array();
let result3Row = new Array();
allRows = resultGrid.getCheckedRows();
result3Row = result3Grid.getCheckedRows();
if (allRows.length > 0) {
parent.JSColorbox.setValueCallback(allRows);
parent.JSColorbox.setValueCallback(allRows,result3Row);
} else {
message("请选择至少一条合同清单!");
......
......@@ -8,6 +8,7 @@
<EF:EFPage title="合同清单">
<EF:EFInput cname="合同号" ename="contractNumber" blockId="inqu_status" row="0" type="hidden" />
<EF:EFInput cname="IDS" ename="inventoryIds" blockId="inqu_status" row="0" type="hidden" />
<EF:EFInput cname="AIDS" ename="appentIds" blockId="inqu_status" row="0" type="hidden" />
<EF:EFRegion id="result" title="合同清单">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
......@@ -22,6 +23,20 @@
<EF:EFColumn ename="laborCosts" cname="其中人工费、元" format="{0:N3}" align="center" enable="false"/>
</EF:EFGrid>
</EF:EFRegion>
<EF:EFRegion id="result3" title="签证单">
<EF:EFGrid blockId="result3" autoDraw="override" isFloat="true" queryMethod="query3">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="projCode" cname="项目编号" align="center" enable="false"/>
<EF:EFColumn ename="projName" cname="项目名称" align="center" enable="false"/>
<EF:EFColumn ename="contractNumber" cname="主合同号" format="{0:N3}" align="center" enable="false"/>
<EF:EFColumn ename="contractName" cname="主合同名称" align="center" enable="false"/>
<EF:EFColumn ename="partyA" cname="甲方名称" align="center" enable="false"/>
<EF:EFColumn ename="partyB" cname="乙方名称" align="center" enable="false"/>
<EF:EFColumn ename="contractContent" cname="签证事由" enable="false" align="center"/>
<EF:EFColumn ename="totalContractPriceIncluding" cname="含税金额" enable="false" align="center"/>
<EF:EFColumn ename="signingDate" cname="签订日期" align="center" enable="false"/>
</EF:EFGrid>
</EF:EFRegion>
<div class="row">
<EF:EFButton ename="cancel" cname="取消" type="button" class="btn-align-right"/>
<EF:EFButton ename="confirm" cname="确认" type="button" class="btn-align-right"/>
......
......@@ -15,6 +15,12 @@ $(function () {
hidden: true, // true时,不显示功能按钮,但保留setting导出按钮
},
columns: []
},
"result3": {
toolbarConfig: {
hidden: true, // true时,不显示功能按钮,但保留setting导出按钮
},
columns: []
}
}
......@@ -33,12 +39,14 @@ $(function () {
$('#confirm').on('click', function () {
let result1Rows = new Array();
let result2Rows = new Array();
let result3Rows = new Array();
result1Rows = result1Grid.getCheckedRows();
result2Rows = result2Grid.getCheckedRows();
result3Rows = result3Grid.getCheckedRows();
if (result1Rows.length > 0 || result2Rows.length > 0) {
parent.JSColorbox.setValueCallback(result1Rows,result2Rows);
parent.JSColorbox.setValueCallback(result1Rows,result2Rows,result3Rows);
} else {
message("请选择至少一条数据!");
return;
......@@ -54,6 +62,7 @@ $(function () {
function query() {
result1Grid.dataSource.page(1);
result2Grid.dataSource.page(1);
result3Grid.dataSource.page(1);
}
......
......@@ -9,6 +9,7 @@
<EF:EFInput cname="合同号" ename="contractNumber" blockId="inqu_status" row="0" type="hidden" />
<EF:EFInput cname="IDS" ename="inventoryIds" blockId="inqu_status" row="0" type="hidden" />
<EF:EFInput cname="DIDS" ename="deductionIds" blockId="inqu_status" row="0" type="hidden" />
<EF:EFInput cname="AIDS" ename="appentIds" blockId="inqu_status" row="0" type="hidden" />
<EF:EFRegion id="result1" title="合同清单">
<EF:EFGrid blockId="result1" autoDraw="override" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
......@@ -23,6 +24,20 @@
<EF:EFColumn ename="laborCosts" cname="其中人工费、元" format="{0:N3}" align="center" enable="false"/>
</EF:EFGrid>
</EF:EFRegion>
<EF:EFRegion id="result3" title="签证单">
<EF:EFGrid blockId="result3" autoDraw="override" isFloat="true" queryMethod="query3">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="projCode" cname="项目编号" align="center" enable="false"/>
<EF:EFColumn ename="projName" cname="项目名称" align="center" enable="false"/>
<EF:EFColumn ename="contractNumber" cname="主合同号" format="{0:N3}" align="center" enable="false"/>
<EF:EFColumn ename="contractName" cname="主合同名称" align="center" enable="false"/>
<EF:EFColumn ename="partyA" cname="甲方名称" align="center" enable="false"/>
<EF:EFColumn ename="partyB" cname="乙方名称" align="center" enable="false"/>
<EF:EFColumn ename="contractContent" cname="签证事由" enable="false" align="center"/>
<EF:EFColumn ename="totalContractPriceIncluding" cname="含税金额" enable="false" align="center"/>
<EF:EFColumn ename="signingDate" cname="签订日期" align="center" enable="false"/>
</EF:EFGrid>
</EF:EFRegion>
<EF:EFRegion id="result2" title="扣款单">
<EF:EFGrid blockId="result2" autoDraw="override" isFloat="true" queryMethod="query2">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
......
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