Commit c5a03577 by 13420

销售开票小数位bug调整

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