Commit c5a03577 by 13420

销售开票小数位bug调整

parent dd81b311
...@@ -3,14 +3,21 @@ package com.baosight.hggp.hg.cw.service; ...@@ -3,14 +3,21 @@ package com.baosight.hggp.hg.cw.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation; import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum; import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.dao.DaoUtils; import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.constant.HGConstant; import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.cw.domain.HGCW004;
import com.baosight.hggp.hg.cw.domain.HGCW008; import com.baosight.hggp.hg.cw.domain.HGCW008;
import com.baosight.hggp.hg.cw.domain.HGCW007; import com.baosight.hggp.hg.cw.domain.HGCW007;
import com.baosight.hggp.hg.cw.tools.HGCWTools; import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.cw.vo.UserVO; import com.baosight.hggp.hg.cw.vo.UserVO;
import com.baosight.hggp.hg.sb.tools.HGSBTools;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.hg.xs.domain.Org;
import com.baosight.hggp.util.CommonMethod; import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.DateUtils; import com.baosight.hggp.util.DateUtils;
import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.LogUtils; import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo; import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException; import com.baosight.iplat4j.core.exception.PlatException;
...@@ -37,15 +44,24 @@ public class ServiceHGCW008 extends ServiceBase { ...@@ -37,15 +44,24 @@ public class ServiceHGCW008 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "租赁合同",operType = "查询",operDesc = "初始化") @OperationLogAnnotation(operModul = "结算单管理",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
EiInfo outInfo = super.initLoad(inInfo,new HGCW008());
try { try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.COMPANY_BOX_BLOCK_ID), null, false); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.COMPANY_BOX_BLOCK_ID), null, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCW008().eiMetadata); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCW008().eiMetadata);
} catch (PlatException e) { outInfo = super.query(inInfo, HGCW008.QUERY, new HGCW008());
Map<String,Object> qarma = new HashMap<>();
EiInfoUtils.addBlock(outInfo,"roleCompany", UserSessionUtils.getRoleCompany(), Company.class);
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.GROUP_RECORD_BLOCK_ID));
//角色公司
List<String> roleCompanyCode = HGSBTools.getRoleCompanyCode();
qarma.put(Org.FIELD_ORG_ID,roleCompanyCode);
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.USER_ID_BOX_BLOCK_ID),qarma);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败"); LogUtils.setDetailMsg(inInfo, e, "初始化失败");
} }
return inInfo; return outInfo;
} }
/** /**
...@@ -54,9 +70,13 @@ public class ServiceHGCW008 extends ServiceBase { ...@@ -54,9 +70,13 @@ public class ServiceHGCW008 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "租赁合同",operType = "查询",operDesc = "查询") @OperationLogAnnotation(operModul = "结算单管理",operType = "查询",operDesc = "查询")
@Override @Override
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
List<String> roleCompanyCode = HGSBTools.getRoleCompanyCode();
if (!roleCompanyCode.isEmpty()) {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,HGCW008.FIELD_COMPANY_CODES,roleCompanyCode);
}
try { try {
inInfo = super.query(inInfo, HGCW008.QUERY, new HGCW008()); inInfo = super.query(inInfo, HGCW008.QUERY, new HGCW008());
} catch (Exception e) { } catch (Exception e) {
...@@ -71,7 +91,7 @@ public class ServiceHGCW008 extends ServiceBase { ...@@ -71,7 +91,7 @@ public class ServiceHGCW008 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "租赁合同",operType = "保存",operDesc = "保存") @OperationLogAnnotation(operModul = "结算单管理",operType = "保存",operDesc = "保存")
public EiInfo save(EiInfo inInfo) { public EiInfo save(EiInfo inInfo) {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
......
...@@ -544,12 +544,14 @@ ...@@ -544,12 +544,14 @@
<select id="queryContractByType" parameterClass="java.util.HashMap" <select id="queryContractByType" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.cw.domain.HGCW002"> resultClass="com.baosight.hggp.hg.cw.domain.HGCW002">
<include refid="HGXSDataAuth.authCondition"/>
SELECT DISTINCT SELECT DISTINCT
PROJ_CODE as "projCode", <!-- 项目编码 --> PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName", <!-- 项目名称 --> PROJ_NAME as "projName", <!-- 项目名称 -->
CONTRACT_NUMBER as "contractNumber", <!-- 合同号 --> CONTRACT_NUMBER as "contractNumber", <!-- 合同号 -->
CONTRACT_NAME as "contractName", <!-- 合同名称 --> CONTRACT_NAME as "contractName", <!-- 合同名称 -->
TOTAL_CONTRACT_PRICE_EXCLUDING as "totalContractPriceExcluding", <!-- 合同总价(不含税) --> TOTAL_CONTRACT_PRICE_EXCLUDING as "totalContractPriceExcluding", <!-- 合同总价(不含税) -->
TOTAL_CONTRACT_PRICE_INCLUDING as "totalContractPriceIncluding", <!-- 合同总价(含税) -->
CONTRACT_TYPE as contractType, <!-- 合同类型;1销售合同2劳务合同3补充协议4合同外用工 --> CONTRACT_TYPE as contractType, <!-- 合同类型;1销售合同2劳务合同3补充协议4合同外用工 -->
PARTY_A as "partyA", <!-- 甲方名称 --> PARTY_A as "partyA", <!-- 甲方名称 -->
PARTY_B as "partyB" <!-- 乙方名称 --> PARTY_B as "partyB" <!-- 乙方名称 -->
......
$(function() { $(function() {
// 查询 // 查询
$("#QUERY").on("click", function () { $("#QUERY").on("click", function () {
query(); query();
}); });
IPLATUI.EFGrid.result = { IPLATUI.EFGrid.result = {
pageable: { pageable: {
pageSize: 20, pageSize: 20,
......
...@@ -17,9 +17,9 @@ ...@@ -17,9 +17,9 @@
<EF:EFInput cname="项目名称" ename="projName" blockId="inqu_status" row="0" colWidth="3" /> <EF:EFInput cname="项目名称" ename="projName" blockId="inqu_status" row="0" colWidth="3" />
<EF:EFInput cname="合同号" ename="contractNumber" blockId="inqu_status" row="0" colWidth="3" /> <EF:EFInput cname="合同号" ename="contractNumber" blockId="inqu_status" row="0" colWidth="3" />
<EF:EFInput cname="合同名称" ename="contractName" blockId="inqu_status" row="0" colWidth="3" /> <EF:EFInput cname="合同名称" ename="contractName" blockId="inqu_status" row="0" colWidth="3" />
<EF:EFDateSpan startCname="结算日期(从)" endCname="至" blockId="inqu_status" <EF:EFDateSpan startCname="签订日期(从)" endCname="至" blockId="inqu_status"
startName="contractDateFrom" endName="contractDateTo" row="0" role="date" startName="contractDateFrom" endName="contractDateTo" row="0" role="date"
format="yyyyMMdd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true"> format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" >
</EF:EFDateSpan> </EF:EFDateSpan>
<EF:EFInput cname="结算编号" ename="settlementNumber" blockId="inqu_status" row="0" colWidth="3" /> <EF:EFInput cname="结算编号" ename="settlementNumber" blockId="inqu_status" row="0" colWidth="3" />
<EF:EFSelect cname="结算类别" ename="inqu_status-0-settlementType" colWidth="3" filter="contains"> <EF:EFSelect cname="结算类别" ename="inqu_status-0-settlementType" colWidth="3" filter="contains">
......
...@@ -258,18 +258,7 @@ function cancelFunc() { ...@@ -258,18 +258,7 @@ function cancelFunc() {
} }
function btnSaveFunc() { function btnSaveFunc() {
{ fieldValidation();
var projCode = $("#result-0-projCode").val();
if (isBlank(projCode)) {
message("请选择项目!")
}
var contractDate = $("#result-0-contractDate").val();
if (isBlank(contractDate)) {
message("请选择结算日期!")
return;
}
}
JSUtils.confirm("确定对数据做\"保存\"操作? ", { JSUtils.confirm("确定对数据做\"保存\"操作? ", {
ok: function () { ok: function () {
JSUtils.submitGrid("detail1", "HGCW008", "save", {isAlldata:true,onSuccessCallback:parent.windowCallback}); JSUtils.submitGrid("detail1", "HGCW008", "save", {isAlldata:true,onSuccessCallback:parent.windowCallback});
...@@ -368,6 +357,18 @@ function calculateAmount(rows) { ...@@ -368,6 +357,18 @@ function calculateAmount(rows) {
$("#result-0-thisPriceTax").val(parseFloat(thisPriceTax).toFixed(3)) $("#result-0-thisPriceTax").val(parseFloat(thisPriceTax).toFixed(3))
$("#result-0-cumulativePriceTax").val(parseFloat(cumulativePriceTax).toFixed(3)) $("#result-0-cumulativePriceTax").val(parseFloat(cumulativePriceTax).toFixed(3))
} }
function fieldValidation() {
var projCode = $("#result-0-projCode").val();
if (isBlank(projCode)) {
message("请选择项目!")
return ;
}
var contractDate = $("#result-0-contractDate").val();
if (isBlank(contractDate)) {
message("请选择结算日期!")
return ;
}
}
function calculateAmount2(taxPoints) { function calculateAmount2(taxPoints) {
var rows = detail1Grid.getDataItems(); var rows = detail1Grid.getDataItems();
var contractType = $("#contractType").val(); var contractType = $("#contractType").val();
......
...@@ -255,55 +255,51 @@ $(function () { ...@@ -255,55 +255,51 @@ $(function () {
}, },
{ {
field: "thisPriceTax", field: "thisPriceTax",
title: "结算价税合计金额", title: "收款价税合计金额",
headerTemplate: "<span style='color: '>结算价税合计金额 </span>", headerTemplate: "<span style='color: '>结算价税合计金额 </span>",
locked: false locked: false
}, },
{ {
field: "thisSettlementTax", field: "thisSettlementTax",
title: "结算税金", title: "收款税金",
headerTemplate: "<span style='color: '>结算税金 </span>", headerTemplate: "<span style='color: '>结算税金 </span>",
locked: false locked: false
}, },
{ {
field: "thisSettlementTax", field: "thisSettlementAmount",
title: "结算税金", title: "收款金额",
headerTemplate: "<span style='color: '>结算税金 </span>", headerTemplate: "<span style='color: '>结算税金 </span>",
locked: false locked: false
}, },
{ {
field: "thisPriceTax", field: "thisAmount",
title: "结算价税合计金额", title: "本次收款金额",
headerTemplate: "<span style='color: '>结算税金 </span>", headerTemplate: "<span style='color: '>结算税金 </span>",
locked: false locked: false
}, },
{ {
field: "thisSettlementTax", field: "remainingAmount",
title: "结算税金", title: "剩余收款金额",
headerTemplate: "<span style='color: '>结算税金 </span>", headerTemplate: "<span style='color: '>结算税金 </span>",
locked: false locked: false
},
{
field: "thisSettlementAmount",
title: "收票总额",
headerTemplate: "<span style='color: '>收票总额 </span>",
locked: false
}], }],
loadComplete: function(grid) { loadComplete: function(grid) {
// 此 grid 对象 // 此 grid 对象
$("#info-tab-2").on("click", function () { $("#info-tab-2").on("click", function () {
grid.dataSource.page(1); grid.dataSource.page(1);
}); });
$("#SAVEA").on("click", function () {
let btnNode = $(this);
//禁用按钮
btnNode.attr("disabled", true);
btnSaveFunc(btnNode,"resultA");
});
}, },
dataBound: function (e) { dataBound: function (e) {
}, },
onSave: function (e) { onSave: function (e) {
// 阻止默认请求,使用自定义保存 // 阻止默认请求,使用自定义保存
e.preventDefault(); e.preventDefault();
let btnNode = $(this);
//禁用按钮
btnNode.attr("disabled", true);
btnSaveFunc(btnNode,"resultA");
}, },
onSuccess: function (e) { onSuccess: function (e) {
if (e.eiInfo.extAttr.methodName == 'save' || e.eiInfo.extAttr.methodName == 'delete') { if (e.eiInfo.extAttr.methodName == 'save' || e.eiInfo.extAttr.methodName == 'delete') {
...@@ -340,12 +336,6 @@ $(function () { ...@@ -340,12 +336,6 @@ $(function () {
locked: false locked: false
}, },
{ {
field: "billNumber",
title: "发票号",
headerTemplate: "<span style='color: '>发票号 </span>",
locked: false
},
{
field: "taxPoints", field: "taxPoints",
title: "税率(%)", title: "税率(%)",
headerTemplate: "<span style='color: '>税率(%) </span>", headerTemplate: "<span style='color: '>税率(%) </span>",
...@@ -353,24 +343,24 @@ $(function () { ...@@ -353,24 +343,24 @@ $(function () {
}, },
{ {
field: "totalContractPriceExcluding", field: "totalContractPriceExcluding",
title: "结算价税合计金额", title: "收款价税合计金额",
headerTemplate: "<span style='color: '>结算价税合计金额 </span>", headerTemplate: "<span style='color: '>结算价税合计金额 </span>",
locked: false locked: false
}, },
{ {
field: "valueAddedTax", field: "valueAddedTax",
title: "结算税金", title: "收款税金",
headerTemplate: "<span style='color: '>结算税金 </span>", headerTemplate: "<span style='color: '>结算税金 </span>",
locked: false locked: false
}, },
{ {
field: "totalContractPriceExcluding", field: "totalContractPriceExcluding",
title: "结算金额", title: "收款金额",
headerTemplate: "<span style='color: '>结算金额 </span>", headerTemplate: "<span style='color: '>结算金额 </span>",
locked: false locked: false
},{ },{
field: "remainingAmount", field: "thisAmount",
title: "剩余付款金额", title: "本次收款金额",
headerTemplate: "<span style='color: '>剩余付款金额 </span>", headerTemplate: "<span style='color: '>剩余付款金额 </span>",
locked: false locked: false
}], }],
...@@ -379,14 +369,16 @@ $(function () { ...@@ -379,14 +369,16 @@ $(function () {
$("#info-tab-3").on("click", function () { $("#info-tab-3").on("click", function () {
grid.dataSource.page(1); grid.dataSource.page(1);
}); });
}, $("#SAVEB").on("click", function () {
onSave: function (e) {
// 阻止默认请求,使用自定义保存
e.preventDefault();
let btnNode = $(this); let btnNode = $(this);
//禁用按钮 //禁用按钮
btnNode.attr("disabled", true); btnNode.attr("disabled", true);
btnSaveFunc(btnNode,"resultB"); btnSaveFunc(btnNode,"resultB");
});
},
onSave: function (e) {
// 阻止默认请求,使用自定义保存
e.preventDefault();
}, },
onSuccess: function (e) { onSuccess: function (e) {
if (e.eiInfo.extAttr.methodName == 'save' || e.eiInfo.extAttr.methodName == 'delete') { if (e.eiInfo.extAttr.methodName == 'save' || e.eiInfo.extAttr.methodName == 'delete') {
......
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