Commit b204ad4e by liuyang

2024-07-16 新增业务账期同步添加会计期

parent 2e3a3e1d
...@@ -127,13 +127,7 @@ public class ServiceHGCW001 extends ServiceBase { ...@@ -127,13 +127,7 @@ public class ServiceHGCW001 extends ServiceBase {
DaoUtils.insert(HGCW001.INSERT, hgcw001); DaoUtils.insert(HGCW001.INSERT, hgcw001);
HGCB001 hgcb001 = new HGCB001(); HGCB001 hgcb001 = new HGCB001();
BeanUtils.copyProperties(hgcw001,hgcb001); BeanUtils.copyProperties(hgcw001,hgcb001);
HGCB001 cb001 = HGCBTools.HgCb001.select(new HashMap<String,String>(){{ HGCBTools.HgCb001.add(Collections.singletonList(hgcb001));
put(HGCB001.FIELD_ACCOUNT_PERIOD,hgcw001.getAccountPeriod());
put(HGCB001.FIELD_COMPANY_CODE,hgcw001.getCompanyCode());
}});
if (cb001 == null) {
DaoUtils.insert(HGCB001.INSERT, hgcb001); //同步添加会计期维护
}
} }
/** /**
......
$(function () { $(function () {
$(".row").children().attr("class", "col-md-3"); $(".row").children().attr("class", "col-md-3");
$("#QUERY").on("click", query); $("#QUERY").on("click", query);
let companyCodeBox = __eiInfo.getBlock("roleCompany").getMappedRows();
IPLATUI.EFGrid = { IPLATUI.EFGrid = {
"result":{ "result":{
pageable: { pageable: {
...@@ -66,19 +66,21 @@ $(function () { ...@@ -66,19 +66,21 @@ $(function () {
}); });
grid.dataSource.bind("change",function(e){ grid.dataSource.bind("change",function(e){
var item = e.items[0]; var item = e.items[0];
/* if(e.field == "accountYear"){ if(e.field == "companyCode"){
let accountPeriod = currMonth(item.accountYear); for (let i = 0; i < companyCodeBox.length; i++) {
resultGrid.setCellValue(item,'accountPeriod',accountPeriod) if (item.companyCode == companyCodeBox[i].companyCode){
//loadChange(grid,e,"accountPeriod"); resultGrid.setCellValue(item,'companyName',companyCodeBox[i].companyName);
}else */ break;
if(e.field == "accountPeriod"){ }
}
}else if(e.field == "accountPeriod"){
let accountPeriod = dateFormate(item.accountPeriod,"yyyy-MM-dd") let accountPeriod = dateFormate(item.accountPeriod,"yyyy-MM-dd")
let accountPeriodDateStart = queryLast(item.companyCode,accountPeriod); let accountPeriodDateStart = queryLast(item.companyCode,accountPeriod);
resultGrid.setCellValue(item,'accountYear',accountPeriod.substring(0,4)); resultGrid.setCellValue(item,'accountYear',accountPeriod.substring(0,4));
resultGrid.setCellValue(item,'accountPeriodDateStart',dateFormate(new Date(accountPeriodDateStart),"yyyyMMdd")); resultGrid.setCellValue(item,'accountPeriodDateStart',dateFormate(new Date(accountPeriodDateStart),"yyyyMMdd"));
loadChange(grid,e,"accountPeriodDateEnd"); loadChange(grid,e,"accountPeriodDateEnd");
} }
}) })
}, },
onSave: function (e) { onSave: function (e) {
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
filter="contains" readonly="true"> filter="contains" readonly="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:EFColumn ename="accountYear" cname="会计年度" enable="false" width="100" align="center" start="decade" depth="decade" <EF:EFColumn ename="accountYear" cname="会计年度" enable="false" width="100" align="center" start="decade" depth="decade"
editType="date" dateFormat="yyyy" parseFormats="['yyyy']" required="true"/> editType="date" dateFormat="yyyy" parseFormats="['yyyy']" required="true"/>
<EF:EFColumn ename="accountPeriod" cname="会计期" readonly="true" width="100" align="center" start="year" depth="year" <EF:EFColumn ename="accountPeriod" cname="会计期" readonly="true" width="100" align="center" start="year" depth="year"
......
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