Commit a5e75cdf by liuyang

2024-09-11 付款单供应商显示优化和金额显示优化

parent 4c9eef38
...@@ -48,7 +48,7 @@ public class ServiceHGCW016 extends ServiceBase { ...@@ -48,7 +48,7 @@ public class ServiceHGCW016 extends ServiceBase {
@OperationLogAnnotation(operModul = "付款单",operType = "查询",operDesc = "初始化") @OperationLogAnnotation(operModul = "付款单",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.SUP_RECORD_BLOCK_ID), null, false); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.SUP_RECORD_BLOCK_ID), null, true);
EiInfoUtils.addBlock(inInfo,"roleCompany", UserSessionUtils.getRoleCompany(), Company.class); EiInfoUtils.addBlock(inInfo,"roleCompany", UserSessionUtils.getRoleCompany(), Company.class);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCW016().eiMetadata); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCW016().eiMetadata);
} catch (Exception e) { } catch (Exception e) {
......
package com.baosight.hggp.hg.cw.service; 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.ReviewStatusEnum; import com.baosight.hggp.common.ReviewStatusEnum;
import com.baosight.hggp.core.security.UserSessionUtils; import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.cw.domain.HGCW012; import com.baosight.hggp.hg.cw.domain.HGCW012;
import com.baosight.hggp.hg.cw.domain.HGCW012; import com.baosight.hggp.hg.cw.domain.HGCW012;
import com.baosight.hggp.hg.cw.domain.HGCW016; import com.baosight.hggp.hg.cw.domain.HGCW016;
import com.baosight.hggp.hg.xs.domain.Company; import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.EiInfoUtils; 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.hggp.util.contants.ACConstants;
...@@ -15,6 +17,8 @@ import com.baosight.iplat4j.core.ei.EiInfo; ...@@ -15,6 +17,8 @@ import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException; import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase; import com.baosight.iplat4j.core.service.impl.ServiceBase;
import java.util.Arrays;
/** /**
* @author yukang * @author yukang
* @date 2024年05月06日 18:22 * @date 2024年05月06日 18:22
...@@ -33,6 +37,7 @@ public class ServiceHGCW016A extends ServiceBase { ...@@ -33,6 +37,7 @@ public class ServiceHGCW016A extends ServiceBase {
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
EiInfoUtils.addBlock(inInfo,"roleCompany", UserSessionUtils.getRoleCompany(), Company.class); EiInfoUtils.addBlock(inInfo,"roleCompany", UserSessionUtils.getRoleCompany(), Company.class);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.SUP_RECORD_BLOCK_ID), null, true);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCW012().eiMetadata); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCW012().eiMetadata);
} catch (Exception e) { } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化付款单失败"); LogUtils.setDetailMsg(inInfo, e, "初始化付款单失败");
......
...@@ -28,7 +28,7 @@ public class ServiceHGCW016B extends ServiceBase { ...@@ -28,7 +28,7 @@ public class ServiceHGCW016B extends ServiceBase {
@OperationLogAnnotation(operModul = "账期维护",operType = "查询",operDesc = "初始化") @OperationLogAnnotation(operModul = "账期维护",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.SUP_RECORD_BLOCK_ID), null, false); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.SUP_RECORD_BLOCK_ID), null, true);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCW017().eiMetadata); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCW017().eiMetadata);
} catch (PlatException e) { } catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败"); LogUtils.setDetailMsg(inInfo, e, "初始化失败");
......
...@@ -28,7 +28,7 @@ public class ServiceHGCW016C extends ServiceBase { ...@@ -28,7 +28,7 @@ public class ServiceHGCW016C extends ServiceBase {
@OperationLogAnnotation(operModul = "账期维护",operType = "查询",operDesc = "初始化") @OperationLogAnnotation(operModul = "账期维护",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.SUP_RECORD_BLOCK_ID), null, false); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.SUP_RECORD_BLOCK_ID), null, true);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCW017().eiMetadata); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCW017().eiMetadata);
} catch (PlatException e) { } catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败"); LogUtils.setDetailMsg(inInfo, e, "初始化失败");
......
$(function() { $(function() {
var roleCompany = __eiInfo.getBlock("roleCompany").getMappedRows();
var projRecordBox = __eiInfo.getBlock("proj_record_block_id").getMappedRows(); var projRecordBox = __eiInfo.getBlock("proj_record_block_id").getMappedRows();
// 查询 // 查询
...@@ -115,6 +116,16 @@ $(function() { ...@@ -115,6 +116,16 @@ $(function() {
loadChange(grid,e,"totalContractPriceIncluding"); loadChange(grid,e,"totalContractPriceIncluding");
} }
} }
if (e.field === "companyCode"){
let item = e.items[0];
for (let i = 0; i < roleCompany.length; i++) {
if (roleCompany[i]["companyCode"] === item["companyCode"]){
resultGrid.setCellValue(item,'companyName',roleCompany[i]["companyName"]);
break;
}
}
loadChange(grid,e,"projCode");
}
}) })
}, },
onSave : function (e) { onSave : function (e) {
......
...@@ -43,12 +43,14 @@ ...@@ -43,12 +43,14 @@
align="center" filter="contains" sort="true"> align="center" filter="contains" sort="true">
<EF:EFOptions blockId="roleCompany" textField="companyName" valueField="companyCode"/> <EF:EFOptions blockId="roleCompany" textField="companyName" valueField="companyCode"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="companyName" cname="公司名称" hidden="true"/>
<EF:EFComboColumn ename="projCode" cname="项目名称" blockName="proj_record_block_id" <EF:EFComboColumn ename="projCode" cname="项目名称" blockName="proj_record_block_id"
columnTemplate="#=textField#" itemTemplate="#=textField#" columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField" textField="textField" valueField="valueField"
maxLength="16" readonly="true" width="210" required="true" maxLength="16" readonly="true" width="210" required="true"
align="center" filter="contains" sort="true"> align="center" filter="contains" sort="true">
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="projName" cname="项目名称" hidden="true"/>
<EF:EFComboColumn ename="partyA" cname="供应商名称" blockName="sup_record_block_id" <EF:EFComboColumn ename="partyA" cname="供应商名称" blockName="sup_record_block_id"
columnTemplate="#=textField#" itemTemplate="#=textField#" columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField" textField="textField" valueField="valueField"
......
...@@ -132,8 +132,8 @@ function updateFunc() { ...@@ -132,8 +132,8 @@ function updateFunc() {
JSColorbox.open({ JSColorbox.open({
href: "HGCW016B?methodName=initLoad&inqu_status-0-mainId=" + rows[0].id + "&efParentFormEname=HGCW016", href: "HGCW016B?methodName=initLoad&inqu_status-0-mainId=" + rows[0].id + "&efParentFormEname=HGCW016",
title: "<div style='text-align: center;'>付款清单</div>", title: "<div style='text-align: center;'>付款清单</div>",
width: "90%", width: "75%",
height: "90%", height: "75%",
callbackName: windowCallback callbackName: windowCallback
}); });
} }
...@@ -311,8 +311,8 @@ function contractDetailFunc(id) { ...@@ -311,8 +311,8 @@ function contractDetailFunc(id) {
JSColorbox.open({ JSColorbox.open({
href: "HGCW016C?methodName=initLoad&inqu_status-0-mainId=" + id + "&efParentFormEname=HGCW016", href: "HGCW016C?methodName=initLoad&inqu_status-0-mainId=" + id + "&efParentFormEname=HGCW016",
title: "<div style='text-align: center;'>付款详情</div>", title: "<div style='text-align: center;'>付款详情</div>",
width: "90%", width: "75%",
height: "90%", height: "75%",
callbackName: windowCallback callbackName: windowCallback
}); });
} }
......
...@@ -38,16 +38,17 @@ ...@@ -38,16 +38,17 @@
<EF:EFOptions blockId="roleCompany" textField="companyName" valueField="companyCode"/> <EF:EFOptions blockId="roleCompany" textField="companyName" valueField="companyCode"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="companyName" cname="公司名称" hidden="true"/> <EF:EFColumn ename="companyName" cname="公司名称" hidden="true"/>
<EF:EFComboColumn ename="partyA" cname="供应商名称" width="120" align="left" defaultValue="" <EF:EFComboColumn ename="partyA" cname="供应商名称" blockName="sup_record_block_id"
filter="contains" readonly="true"> columnTemplate="#=textField#" itemTemplate="#=textField#"
<EF:EFOptions blockId="sup_record_block_id" textField="textField" valueField="valueField"
valueField="textField" textField="textField"/> maxLength="16" readonly="true" width="140" required="true"
align="center" filter="contains" sort="true">
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="signingDate" cname="付款日期" width="100" align="center" <EF:EFColumn ename="signingDate" cname="付款日期" width="100" align="center"
editType="date" dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/> editType="date" dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFColumn ename="contractNumber" cname="来源单号" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="contractNumber" cname="来源单号" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="incomeNumber" cname="付款单号" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="incomeNumber" cname="付款单号" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="totalContractPriceIncluding" cname="付款总额" width="120" enable="true" format="{0:N3}" editType="text" <EF:EFColumn ename="totalContractPriceIncluding" cname="付款总额" width="120" enable="true" format="{0:C3}" editType="text"
displayType="0.000" sort="true" align="right" readonly="true" displayType="0.000" sort="true" align="right" readonly="true"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="false" data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="false"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/> data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
......
...@@ -14,7 +14,20 @@ $(function() { ...@@ -14,7 +14,20 @@ $(function() {
pageable: { pageable: {
pageSize: 20, pageSize: 20,
pageSizes: [10,20,30,50,100,200], pageSizes: [10,20,30,50,100,200],
} },
columns: [
{
field: "thisSettlementAmount",
template: function (item) {
return kendo.format("{0:C3}",parseFloat(item.thisSettlementAmount));
}
}, {
field: "thisSettlementTax",
template: function (item) {
return kendo.format("{0:C3}",parseFloat(item.thisSettlementTax));
}
}
]
} }
......
...@@ -40,15 +40,20 @@ ...@@ -40,15 +40,20 @@
align="center" filter="contains" sort="true"> align="center" filter="contains" sort="true">
<EF:EFOptions blockId="roleCompany" textField="companyName" valueField="companyCode"/> <EF:EFOptions blockId="roleCompany" textField="companyName" valueField="companyCode"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="thisAmount" cname="本次付款金额" width="120" enable="true" format="{0:N3}" editType="text" <EF:EFColumn ename="thisAmount" cname="本次付款金额" width="120" enable="true" format="{0:C3}" editType="text"
displayType="0.000" sort="true" align="right" displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true" data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/> data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="remainingAmount" cname="剩余付款金额" width="120" enable="false" format="{0:N3}" editType="text" <EF:EFColumn ename="remainingAmount" cname="剩余付款金额" width="120" enable="false" format="{0:C3}" editType="text"
displayType="0.000" sort="true" align="right" displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true" data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/> data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="partyA" cname="供应商名称" width="120" enable="false" readonly="true" align="center"/> <EF:EFComboColumn ename="partyA" cname="供应商名称" blockName="sup_record_block_id"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="true" width="200" required="true" enable="false"
align="center" filter="contains" sort="true">
</EF:EFComboColumn>
<EF:EFColumn ename="settlementNumber" cname="来源单号" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="settlementNumber" cname="来源单号" width="120" enable="false" readonly="true" align="center"/>
<EF:EFComboColumn ename="billTybe" cname="票据类型" width="120" align="center" <EF:EFComboColumn ename="billTybe" cname="票据类型" width="120" align="center"
columnTemplate="#=textField#" itemTemplate="#=textField#" enable="false" > columnTemplate="#=textField#" itemTemplate="#=textField#" enable="false" >
...@@ -59,15 +64,15 @@ ...@@ -59,15 +64,15 @@
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="false" /> dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="false" />
<EF:EFColumn ename="billNumber" cname="发票号" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="billNumber" cname="发票号" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="taxPoints" cname="税率(%)" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="taxPoints" cname="税率(%)" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="thisSettlementAmount" cname="不含税金额" width="120" enable="false" format="{0:N3}" editType="text" <EF:EFColumn ename="thisSettlementAmount" cname="不含税金额" width="120" enable="false" format="{0:C3}" editType="text"
displayType="0.000" sort="true" align="right" readonly="true" displayType="0.000" sort="true" align="right" readonly="true"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="false" data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="false"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/> data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="thisSettlementTax" cname="税额" width="120" enable="false" format="{0:N3}" editType="text" <EF:EFColumn ename="thisSettlementTax" cname="税额" width="120" enable="false" format="{0:C3}" editType="text"
displayType="0.000" sort="true" align="right" readonly="true" displayType="0.000" sort="true" align="right" readonly="true"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="false" data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="false"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/> data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="totalContractPriceIncluding" cname="发票总额" width="120" enable="false" format="{0:N3}" editType="text" <EF:EFColumn ename="totalContractPriceIncluding" cname="发票总额" width="120" enable="false" format="{0:C3}" editType="text"
displayType="0.000" sort="true" align="right" readonly="true" displayType="0.000" sort="true" align="right" readonly="true"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="false" data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="false"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/> data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
......
...@@ -11,7 +11,12 @@ ...@@ -11,7 +11,12 @@
<EF:EFRegion id="result" title="记录集"> <EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true" autoBind="false" checkMode="row"> <EF:EFGrid blockId="result" autoDraw="no" isFloat="true" autoBind="false" checkMode="row">
<EF:EFColumn ename="id" cname="主键" hidden="true"/> <EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="partyA" cname="客户名称" width="120" enable="false" readonly="true" align="center"/> <EF:EFComboColumn ename="partyA" cname="供应商名称" blockName="sup_record_block_id"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" width="200" readonly="true" required="true"
align="center" filter="contains" sort="true">
</EF:EFComboColumn>
<EF:EFColumn ename="contractNumber" cname="来源单号" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="contractNumber" cname="来源单号" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="totalContractPriceIncluding" cname="付款总额" width="120" enable="true" format="{0:N3}" editType="text" <EF:EFColumn ename="totalContractPriceIncluding" cname="付款总额" width="120" enable="true" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" displayType="0.000" sort="true" align="right"
......
...@@ -11,9 +11,14 @@ ...@@ -11,9 +11,14 @@
<EF:EFRegion id="result" title="记录集"> <EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true" autoBind="false" checkMode="row"> <EF:EFGrid blockId="result" autoDraw="no" isFloat="true" autoBind="false" checkMode="row">
<EF:EFColumn ename="id" cname="主键" hidden="true"/> <EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="partyA" cname="客户名称" width="120" enable="false" readonly="true" align="center"/> <EF:EFComboColumn ename="partyA" cname="供应商名称" blockName="sup_record_block_id"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" width="200" readonly="true" required="true"
align="center" filter="contains" sort="true">
</EF:EFComboColumn>
<EF:EFColumn ename="contractNumber" cname="来源单号" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="contractNumber" cname="来源单号" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="totalContractPriceIncluding" cname="付款总额" width="120" enable="false" format="{0:N3}" editType="text" <EF:EFColumn ename="totalContractPriceIncluding" cname="付款总额" width="120" enable="false" format="{0:C3}" editType="text"
displayType="0.000" sort="true" align="right" readonly="true" displayType="0.000" sort="true" align="right" readonly="true"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="false" data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="false"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/> data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
......
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