Commit 82e42e9e by yukang

签证单管理

parent 93b2d3e8
......@@ -260,4 +260,17 @@ public class ServiceHGCW002 extends ServiceBase {
}
public EiInfo projectComboBox(EiInfo inInfo){
Map<String, Object> map = new HashMap<>();
if (StringUtils.isNotEmpty(inInfo.getString("reviewStatus"))) {
map.put("reviewStatus", inInfo.getString("reviewStatus"));
}
if (StringUtils.isNotEmpty(inInfo.getString("contractType"))) {
map.put("contractType", inInfo.getString("contractType"));
}
List<HGCW002> HGCW002List = dao.query("HGCW002.queryProjectComboBox", map);
inInfo.addBlock("projcet_combo_box").setRows(HGCW002List);
return inInfo;
}
}
......@@ -3,7 +3,10 @@ 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.hg.constant.HGConstant;
import com.baosight.hggp.hg.cw.domain.HGCW004;
import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.cw.vo.UserVO;
import com.baosight.hggp.hg.sb.domain.HGSB003;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.ErrorCodeUtils;
......@@ -14,6 +17,7 @@ import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.resource.I18nMessages;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.util.Arrays;
import java.util.List;
......@@ -75,6 +79,9 @@ public class ServiceHGCW004 extends ServiceBase {
for (int i = 0; i < resultRows.size(); i++) {
HGCW004 HGCW004 = new HGCW004();
HGCW004.fromMap(resultRows.get(i));
UserVO userVO = HGCWTools.HgCw002.getUserCompany();
HGCW004.setCompanyCode(userVO.getUsercode());
HGCW004.setCompanyName(userVO.getUsername());
if (HGCW004.getId() == null || HGCW004.getId() == 0) {
this.add(HGCW004);
} else {
......
......@@ -460,7 +460,7 @@
<select id="queryComboBox" parameterClass="java.util.HashMap"
resultClass="java.util.HashMap">
resultClass="com.baosight.hggp.hg.cw.domain.HGCW002">
SELECT DISTINCT
CONTRACT_NUMBER as contractNumber, <!-- 合同号 -->
CONTRACT_NAME as contractName <!-- 合同名称 -->
......@@ -484,6 +484,34 @@
ORDER BY CONTRACT_NUMBER
</select>
<select id="queryProjectComboBox" parameterClass="java.util.HashMap"
resultClass="java.util.HashMap">
SELECT DISTINCT
PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName", <!-- 项目名称 -->
CONTRACT_NUMBER as "contractNumber", <!-- 合同号 -->
CONTRACT_NAME as "contractName", <!-- 合同名称 -->
PARTY_A as "partyA", <!-- 甲方名称 -->
PARTY_B as "partyB" <!-- 乙方名称 -->
FROM ${hggpSchema}.HGCW002
WHERE 1=1
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCodes">
COMPANY_CODE IN <iterate close=")" open="(" conjunction="," property="companyCodes">#companyCodes[]#</iterate>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="reviewStatus">
REVIEW_STATUS = #reviewStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractType">
CONTRACT_TYPE = #contractType#
</isNotEmpty>
ORDER BY CONTRACT_NUMBER
</select>
<update id="submit">
UPDATE ${hggpSchema}.HGCW002
......
......@@ -30,28 +30,20 @@ $(function() {
return template;
}
}
// {
// field: "operator",
// title: "操作",
// template: function (item) {
// let auditStatus = item.deviceStatus;
// let template = '';
// if (item.companyCode && item.groupCode) {
// template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
// + 'onclick="showDetail(' + item.id + ',\'' + item.companyCode + '\',\'' + item.companyName + '\',\'' + item.groupCode + '\',\'' + item.groupName + '\',' +
// '\'' + item.deviceType + '\',\'' + item.deviceName + '\')" >签证详情</a>';
// if (item.companyCode && item.groupCode) {
// template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
// + 'onclick="showDetail(' + item.id + ',\'' + item.companyCode + '\',\'' + item.companyName + '\',\'' + item.groupCode + '\',\'' + item.groupName + '\',' +
// '\'' + item.deviceType + '\',\'' + item.deviceName + '\')" >附件详情</a>';
//
//
// }
// return template;
// }
// }
// }
},{
field: "projCode",
attributes: {'class': 'i-input-readonly', required: true},
title: "项目编号",
query: function (container, params) {
var queryInfo = new EiInfo();
// info.set("reviewStatus","3")
queryInfo.set("contractType","1")
return queryInfo;
},
init: function (e, options) {
console.log(e);
},
},
],
onSave: function (e) {
// 阻止默认请求,使用自定义保存
......@@ -71,6 +63,7 @@ $(function() {
}
window.document.addEventListener("keyup",function (event) {
if(event.keyCode === 13){
var grid = $("#ef_grid_result").data("kendoGrid");
......@@ -86,6 +79,8 @@ $(window).load(function () {
query();
});
/**
* 查询
*/
......
......@@ -16,12 +16,12 @@
</EF:EFSelect>
<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="partyA" blockId="inqu_status" row="0" colWidth="3" />
<EF:EFInput cname="乙方名称" ename="partyB" blockId="inqu_status" row="0" colWidth="3" />
<EF:EFDateSpan startCname="签订日期(从)" endCname="至" blockId="inqu_status"
startName="signingDateFrom" endName="signingDateTo" row="0" role="date"
format="yyyyMMdd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true">
</EF:EFDateSpan>
<EF:EFInput cname="甲方名称" ename="partyA" blockId="inqu_status" row="0" colWidth="3" />
<EF:EFInput cname="乙方名称" ename="partyB" blockId="inqu_status" row="0" colWidth="3" />
<EF:EFInput cname="主合同名称" ename="contractName" blockId="inqu_status" row="0" colWidth="3" />
<EF:EFSelect cname="审批状态" ename="inqu_status-0-reviewStatus" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
......@@ -34,38 +34,29 @@
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true" autoBind="false">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="100" align="center"/>
<EF:EFComboColumn ename="companyName" cname="所属公司"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="true" width="120" required="true"
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="companyBox_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="projCode" cname="项目编号"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="true" width="120" required="true"
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="proj_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="projName" cname="项目名称"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="true" width="120" required="true"
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="proj_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
<EF:EFColumn ename="companyName" cname="所属公司" width="120" enable="false" readonly="true" align="center"/>
<EF:EFPopupColumn ename="projCode" cname="项目编号" width="200"
serviceName="HGCW002" methodName="projectComboBox"
resultId="projcet_combo_box" popupType="ServiceGrid"
valueField="projCode" textField="projCode"
columnEnames="projCode,projName,contractNumber,contractName,partyA,partyB"
columnCnames="项目编码,项目名称,合同号,合同名称,甲方名称,乙方名称"
backFillColumnIds="projCode,projName,contractNumber,contractName,partyA,partyB"
backFillFieldIds="projCode,projName,contractNumber,contractName,partyA,partyB"
popupTitle="所属公司" popupWidth="800">
</EF:EFPopupColumn>
<EF:EFColumn ename="projName" 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="contractName" 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="partyB" cname="乙方名称" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="contractNumber" cname="主合同号" width="120" enable="true" readonly="true" align="center" required="true"/>
<EF:EFColumn ename="contractName" cname="主合同名称" width="120" enable="true" readonly="true" align="center" required="true"/>
<EF:EFColumn ename="partyA" cname="甲方名称" width="120" enable="true" readonly="true" align="center" required="true"/>
<EF:EFColumn ename="partyB" cname="乙方名称" width="120" enable="true" readonly="true" align="center" required="true"/>
<EF:EFColumn ename="projactDetail" cname="项目部位" width="120" enable="true" readonly="true" align="center" required="true"/>
<EF:EFColumn ename="contractContent" cname="签证事由及内容" width="120" enable="true" readonly="true" align="center" required="true"/>
<EF:EFColumn ename="totalContractPriceIncluding" cname="含税金额" width="120" enable="true" readonly="true" align="center" required="true"/>
<EF:EFColumn ename="signingDate" cname="签订日期" width="120" enable="true" readonly="true" align="center" editType="date"
dateFormat="yyyyMMdd" parseFormats="['yyyyMMdd']" required="true"/>
<EF:EFComboColumn ename="reviewStatus" cname="审批状态" width="100" align="center"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
<EF:EFComboColumn ename="reviewStatus" cname="审批状态" width="100" align="center" required="true"
columnTemplate="#=textField#" itemTemplate="#=textField#" enable="false" >
<EF:EFCodeOption codeName="hggp.cw.reviewStatus"/>
</EF:EFComboColumn>
......
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