Commit 37d3052d by 13420

租赁合同乙方应该为下拉选项,合同甲乙方公司调整,租赁合同调整

parent 9dfd7be3
...@@ -3,12 +3,14 @@ package com.baosight.hggp.hg.cw.service; ...@@ -3,12 +3,14 @@ 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.cw.domain.HGCW002; import com.baosight.hggp.hg.cw.domain.HGCW002;
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.pz.domain.HGPZ002; import com.baosight.hggp.hg.pz.domain.HGPZ002;
import com.baosight.hggp.hg.pz.domain.HGPZ003; import com.baosight.hggp.hg.pz.domain.HGPZ003;
import com.baosight.hggp.hg.pz.tools.HGPZTools; import com.baosight.hggp.hg.pz.tools.HGPZTools;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.hg.xs.domain.Org; import com.baosight.hggp.hg.xs.domain.Org;
import com.baosight.hggp.hg.xs.tools.HGXSTools; import com.baosight.hggp.hg.xs.tools.HGXSTools;
import com.baosight.hggp.util.CommonMethod; import com.baosight.hggp.util.CommonMethod;
...@@ -71,24 +73,15 @@ public class ServiceHGCW002A extends ServiceBase { ...@@ -71,24 +73,15 @@ public class ServiceHGCW002A extends ServiceBase {
}); });
} }
} else if (contractCategory.equals("2")) { } else if (contractCategory.equals("2")) {
List<Org> orgList = HGXSTools.XsOrg.queryByUser(); List<Company> list = UserSessionUtils.getRoleCompany();
if (CollectionUtils.isNotEmpty(orgList)) { for (Company c:list) {
Org org = orgList.get(0); UserVO userVO = new UserVO();
if (!org.getOrgType().equals("company")) { userVO.setUsercode(c.getCompanyCode());
//如果不是公司公司,则找到上一级 userVO.setUsername(c.getCompanyName());
Org org1 = HGXSTools.XsOrg.queryCompany(org.getOrgId()); userVOList.add(userVO);
UserVO userVO = new UserVO();
userVO.setUsercode(org1.getOrgId());
userVO.setUsername(org1.getOrgCname());
userVOList.add(userVO);
} else {
UserVO userVO = new UserVO();
userVO.setUsercode(org.getOrgId());
userVO.setUsername(org.getOrgCname());
userVOList.add(userVO);
} }
} }
}
inInfo.addBlock("partyAResult").addRows(userVOList); inInfo.addBlock("partyAResult").addRows(userVOList);
} catch (PlatException e) { } catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "甲方名称查询失败"); LogUtils.setDetailMsg(inInfo, e, "甲方名称查询失败");
...@@ -106,24 +99,15 @@ public class ServiceHGCW002A extends ServiceBase { ...@@ -106,24 +99,15 @@ public class ServiceHGCW002A extends ServiceBase {
List<UserVO> userVOList = new ArrayList<>(); List<UserVO> userVOList = new ArrayList<>();
String contractCategory = inInfo.getString("contractCategory"); String contractCategory = inInfo.getString("contractCategory");
if (contractCategory.equals("1")) { if (contractCategory.equals("1")) {
List<Org> orgList = HGXSTools.XsOrg.queryByUser(); List<Company> list = UserSessionUtils.getRoleCompany();
if (CollectionUtils.isNotEmpty(orgList)) { for (Company c:list) {
Org org = orgList.get(0); UserVO userVO = new UserVO();
if (!org.getOrgType().equals("company")) { userVO.setUsercode(c.getCompanyCode());
//如果不是公司公司,则找到上一级 userVO.setUsername(c.getCompanyName());
Org org1 = HGXSTools.XsOrg.queryCompany(org.getOrgId()); userVOList.add(userVO);
UserVO userVO = new UserVO();
userVO.setUsercode(org1.getOrgId());
userVO.setUsername(org1.getOrgCname());
userVOList.add(userVO);
} else {
UserVO userVO = new UserVO();
userVO.setUsercode(org.getOrgId());
userVO.setUsername(org.getOrgCname());
userVOList.add(userVO);
}
} }
} else if (contractCategory.equals("2")) { }
else if (contractCategory.equals("2")) {
List<HGPZ003> hgpz003List = HGCWTools.HgCw002.list(1); List<HGPZ003> hgpz003List = HGCWTools.HgCw002.list(1);
if (CollectionUtils.isNotEmpty(hgpz003List)) { if (CollectionUtils.isNotEmpty(hgpz003List)) {
hgpz003List.forEach(hgpz003 -> { hgpz003List.forEach(hgpz003 -> {
......
...@@ -2,11 +2,14 @@ package com.baosight.hggp.hg.cw.service; ...@@ -2,11 +2,14 @@ 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.security.UserSessionUtils;
import com.baosight.hggp.hg.cw.domain.HGCW006; import com.baosight.hggp.hg.cw.domain.HGCW006;
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.pz.domain.HGPZ002; import com.baosight.hggp.hg.pz.domain.HGPZ002;
import com.baosight.hggp.hg.pz.domain.HGPZ003; import com.baosight.hggp.hg.pz.domain.HGPZ003;
import com.baosight.hggp.hg.pz.tools.HGPZTools; import com.baosight.hggp.hg.pz.tools.HGPZTools;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.hg.xs.domain.Org; import com.baosight.hggp.hg.xs.domain.Org;
import com.baosight.hggp.hg.xs.tools.HGXSTools; import com.baosight.hggp.hg.xs.tools.HGXSTools;
import com.baosight.hggp.util.CommonMethod; import com.baosight.hggp.util.CommonMethod;
...@@ -61,16 +64,13 @@ public class ServiceHGCW006A extends ServiceBase { ...@@ -61,16 +64,13 @@ public class ServiceHGCW006A extends ServiceBase {
Org org = orgList.get(0); Org org = orgList.get(0);
if (!org.getOrgType().equals("company")) { if (!org.getOrgType().equals("company")) {
//如果不是公司公司,则找到上一级 //如果不是公司公司,则找到上一级
Org org1 = HGXSTools.XsOrg.queryCompany(org.getOrgId()); List<Company> list = UserSessionUtils.getRoleCompany();
UserVO userVO = new UserVO(); for (Company c:list) {
userVO.setUsercode(org1.getOrgId()); UserVO userVO = new UserVO();
userVO.setUsername(org1.getOrgCname()); userVO.setUsercode(c.getCompanyCode());
userVOList.add(userVO); userVO.setUsername(c.getCompanyName());
} else { userVOList.add(userVO);
UserVO userVO = new UserVO(); }
userVO.setUsercode(org.getOrgId());
userVO.setUsername(org.getOrgCname());
userVOList.add(userVO);
} }
} }
inInfo.addBlock("partyAResult").addRows(userVOList); inInfo.addBlock("partyAResult").addRows(userVOList);
...@@ -79,5 +79,28 @@ public class ServiceHGCW006A extends ServiceBase { ...@@ -79,5 +79,28 @@ public class ServiceHGCW006A extends ServiceBase {
} }
return inInfo; return inInfo;
} }
/**
* 乙方名称查询
* @param inInfo
* @return
*/
public EiInfo partyBQuery(EiInfo inInfo) {
try {
List<UserVO> userVOList = new ArrayList<>();
String contractCategory = inInfo.getString("contractCategory");
List<HGPZ003> hgpz003List = HGCWTools.HgCw002.list(1);
if (CollectionUtils.isNotEmpty(hgpz003List)) {
hgpz003List.forEach(hgpz003 -> {
UserVO userVO = new UserVO();
userVO.setUsercode(hgpz003.getSupCode());
userVO.setUsername(hgpz003.getSupName());
userVOList.add(userVO);
});
}
inInfo.addBlock("partyAResult").addRows(userVOList);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "乙方名称查询失败");
}
return inInfo;
}
} }
...@@ -126,6 +126,38 @@ $(function() { ...@@ -126,6 +126,38 @@ $(function() {
IPLAT.EFPopupInput.text( $("#popupInputPartyA") , partyA) IPLAT.EFPopupInput.text( $("#popupInputPartyA") , partyA)
e.preventDefault(); // 不使用默认的回填逻辑 e.preventDefault(); // 不使用默认的回填逻辑
} }
},"popupInputPartyB": {
/**
* EFGrid 查询时触发的事件,通常在此处,设置查询条件
* 注意: 必须返回一个EiInfo,作为初始查询条件
* 配置了query时,默认每次打开窗口都会进行一次查询
*/
query: function (e) {
console.log("Step" + (++i) + ": ----query----");
// 将自定义div中的字段构造成查询条件 EiInfo
// var queryInfo = EiInfo.build("#result-0-contractCategory");
var info = new EiInfo();
return info;
},
/**
* grid中的数据回填时触发的事件
* @param e 回填数据事件
* e.sender 弹出窗口对象
* e.grid 弹出的grid对象
* e.model 选中的数据行model
*/
backFill: function (e) {
console.log("Step" + (++i) + ": ----backFill----");
// 回填数据
var model = e.model;
// var data = model.toJSON();
console.log(model);
var partyB = model.usercode + "-" + model.username;
$("#result-0-partyB").val(partyB);
IPLAT.EFPopupInput.text( $("#popupInputPartyB") , partyB)
e.preventDefault(); // 不使用默认的回填逻辑
}
} }
}; };
......
...@@ -31,7 +31,17 @@ ...@@ -31,7 +31,17 @@
resizable="true" popupTitle="甲方名称" popupWidth="400"> resizable="true" popupTitle="甲方名称" popupWidth="400">
</EF:EFPopupInput> </EF:EFPopupInput>
<EF:EFInput ename="result-0-partyA" cname="甲方名称" type="hidden" /> <EF:EFInput ename="result-0-partyA" cname="甲方名称" type="hidden" />
<EF:EFInput ename="result-0-partyB" cname="乙方名称" colWidth="4" /> <EF:EFPopupInput ename="popupInputPartyB" cname="乙方名称" colWidth="4"
serviceName="HGCW006A" methodName="partyBQuery"
resultId="partyAResult"
save="false" popupType="ServiceGrid"
valueField="username" textField="username"
columnEnames="username,usercode"
columnCnames="名称,编码"
readonly="true"
resizable="true" popupTitle="乙方名称" popupWidth="400">
</EF:EFPopupInput>
<EF:EFInput ename="result-0-partyB" cname="乙方名称" type="hidden"/>
</div> </div>
<div class="row"> <div class="row">
......
...@@ -25,7 +25,7 @@ $(function() { ...@@ -25,7 +25,7 @@ $(function() {
], ],
loadComplete: function (grid) { loadComplete: function (grid) {
$("#SELECT_BILL").on("click",addFunc); $("#SELECT_BILL").on("click",addFunc);
$("#BTN_UPDATE").on("click",updateFunc); $("#SAVE").on("click",saveFunc);
$("#SUBMIT").on("click",submitFunc); $("#SUBMIT").on("click",submitFunc);
$("#BTN_BILL").on("click",billFunc); $("#BTN_BILL").on("click",billFunc);
...@@ -74,25 +74,55 @@ function addFunc() { ...@@ -74,25 +74,55 @@ function addFunc() {
} }
/** /**
* 修改 * 保存
*/ */
function updateFunc() { function saveFunc() {
let rows = resultGrid.getCheckedRows(); let rows = resultGrid.getCheckedRows();
if (rows.length != 1) { if (rows.length < 1) {
message("请选择一条数据"); message("请选择数据");
return; return;
} }
if (rows[0].reviewStatus == "3") { let flag = true;
message("已经审核的单据不能修改"); $.each(rows, function(index, item) {
return; let reviewStatus= item.get("reviewStatus");
} if((reviewStatus === "1")){
JSColorbox.open({ message("数据已审核");
href: "HGCW010B?methodName=initLoad&inqu_status-0-mainId=" + rows[0].id + "&efParentFormEname=HGCW010", flag = false;
title: "<div style='text-align: center;'>开票清单</div>", return false;
width: "90%", }
height: "90%",
callbackName: windowCallback
}); });
if(flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
var info = new EiInfo();
info.addBlock(JSUtils.checkedRows2Block("result"));
EiCommunicator.send("HGCW010", "save", info, {
onSuccess: function (ei) {
if (ei.getStatus() >= 0) {
try {
query();
} catch (e) {
// TODO: handle exception
}
if (ei.getStatus() == 0) {
NotificationUtil(ei, 'warning');
} else {
NotificationUtil(ei);
}
} else {
NotificationUtil(ei, "error");
}
},
onFail: function (ei) {
// 发生异常
NotificationUtil("操作失败,原因[" + ei + "]", "error");
}
});
//JSUtils.submitGridsData("result", "HPSC001", "save", true);
}
});
}
} }
...@@ -103,9 +133,18 @@ function windowCallback() { ...@@ -103,9 +133,18 @@ function windowCallback() {
JSColorbox.close(); JSColorbox.close();
} }
function contractDetailFunc(id) { function contractDetailFunc(id) {
let rows = resultGrid.getCheckedRows();
if (rows.length != 1) {
message("请选择一条数据");
return;
}
if (rows[0].reviewStatus == "3") {
message("已经审核的单据不能修改");
return;
}
JSColorbox.open({ JSColorbox.open({
href: "HGCW010C?methodName=initLoad&inqu_status-0-mainId=" + id + "&efParentFormEname=HGCW010", href: "HGCW010B?methodName=initLoad&inqu_status-0-mainId=" + rows[0].id + "&efParentFormEname=HGCW010",
title: "<div style='text-align: center;'>开票清单</div>", title: "<div style='text-align: center;'>开票清单</div>",
width: "90%", width: "90%",
height: "90%", height: "90%",
......
...@@ -37,7 +37,10 @@ ...@@ -37,7 +37,10 @@
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="signingDate" cname="开票日期" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="signingDate" 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="billNumber" cname="发票号" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="taxPoints" cname="税率" width="120" enable="false" readonly="true" align="center"/> <EF:EFComboColumn ename="taxPoints" cname="税点" width="120" align="center" required="true"
columnTemplate="#=textField#" itemTemplate="#=textField#" enable="true" >
<EF:EFCodeOption codeName="hggp.cw.taxPoints"/>
</EF:EFComboColumn>
<EF:EFColumn ename="thisSettlementAmount" cname="不含税金额" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="thisSettlementAmount" cname="不含税金额" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="thisSettlementTax" cname="税额" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="thisSettlementTax" cname="税额" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="totalContractPriceIncluding" cname="开票总额" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="totalContractPriceIncluding" cname="开票总额" width="120" enable="false" readonly="true" align="center"/>
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
<EF:EFColumn ename="thisPriceTax" cname="结算价税合计金额" hidden="true"/> <EF:EFColumn ename="thisPriceTax" cname="结算价税合计金额" hidden="true"/>
<EF:EFColumn ename="thisSettlementTax" cname="结算税金" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="thisSettlementTax" cname="结算税金" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="thisSettlementAmount" cname="结算金额" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="thisSettlementAmount" cname="结算金额" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="thisAmount" cname="本次结算金额" width="120" align="center"/> <EF:EFColumn ename="thisAmount" cname="本次开票金额" width="120" align="center"/>
<EF:EFColumn ename="remainingAmount" cname="剩余开票金额" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="remainingAmount" cname="剩余开票金额" width="120" enable="false" readonly="true" align="center"/>
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<EF:EFColumn ename="projName" cname="项目名称" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="projName" cname="项目名称" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="partyA" cname="客户名称" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="partyA" cname="客户名称" width="120" enable="false" readonly="true" align="center"/>
<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:EFColumn ename="totalContractPriceIncluding" cname="款总额" width="120" format="{0:N3}" align="center"/> <EF:EFColumn ename="totalContractPriceIncluding" cname="款总额" width="120" format="{0:N3}" align="center"/>
</EF:EFGrid> </EF:EFGrid>
</EF:EFRegion> </EF:EFRegion>
</EF:EFPage> </EF:EFPage>
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<EF:EFColumn ename="projName" cname="项目名称" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="projName" cname="项目名称" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="partyA" cname="客户名称" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="partyA" cname="客户名称" width="120" enable="false" readonly="true" align="center"/>
<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:EFColumn ename="totalContractPriceIncluding" cname="收款总额" width="120" format="{0:N3}" align="center" enable="false" readonly="true"/> <EF:EFColumn ename="totalContractPriceIncluding" cname="开票总额" width="120" format="{0:N3}" align="center" enable="false" readonly="true"/>
</EF:EFGrid> </EF:EFGrid>
</EF:EFRegion> </EF:EFRegion>
</EF:EFPage> </EF:EFPage>
......
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