Commit fedc777a authored by 鲁鑫's avatar 鲁鑫

ECN变更单打印

parent 04f58278
...@@ -19,8 +19,15 @@ function bindEvent(){ ...@@ -19,8 +19,15 @@ function bindEvent(){
return {fieldName: "WERKS"} return {fieldName: "WERKS"}
}, },
onChange: function (value, data) { onChange: function (value, data) {
$('#lifnr').val(data.WERKS); if (data.WERKS == $("#werks").val()){
$('#lifnrName').val(data.NAME1); Public.tip("供货工厂不能和收货工厂一致");
$('#lifnr').val(null);
$('#lifnrName').val(null);
return false;
}else {
$('#lifnr').val(data.WERKS);
$('#lifnrName').val(data.NAME1);
}
} }
}); });
//采购组织 //采购组织
...@@ -62,8 +69,15 @@ function bindEvent(){ ...@@ -62,8 +69,15 @@ function bindEvent(){
return {fieldName: "WERKS"} return {fieldName: "WERKS"}
}, },
onChange: function (value, data) { onChange: function (value, data) {
$('#werks').val(data.WERKS); if (data.WERKS == $("#lifnr").val()){
$('#werksName').val(data.NAME1); Public.tip("收货工厂不能和供货工厂一致");
$('#werks').val(null);
$('#werksName').val(null);
return false;
}else {
$('#werks').val(data.WERKS);
$('#werksName').val(data.NAME1);
}
} }
}); });
} }
...@@ -104,10 +118,11 @@ function loadGrid() { ...@@ -104,10 +118,11 @@ function loadGrid() {
required: true, type: "select", required: true, type: "select",
data: { data: {
type: 'system', type: 'system',
name: "sapMaterialSelect", name: "sapMaterialSelect2",
getParam: function (item) { getParam: function (item) {
return { return {
filterValue:item.werks filterValue:$("#lifnr").val(),
filterValue2:$("#werks").val()
} }
}, },
back: { back: {
......
...@@ -12,6 +12,9 @@ ...@@ -12,6 +12,9 @@
</style> </style>
</head> </head>
<body> <body>
<span class="left">
<img src="${bsnPng}">hh</img>
</span>
<div class="billTitle">宝绅内部变更申请/通知单</div> <div class="billTitle">宝绅内部变更申请/通知单</div>
<div class="billTitle">Specification Change Form</div> <div class="billTitle">Specification Change Form</div>
<table cellspacing="0px" cellpadding="0px" class="tablePrint"> <table cellspacing="0px" cellpadding="0px" class="tablePrint">
...@@ -137,8 +140,36 @@ ...@@ -137,8 +140,36 @@
</table> </table>
<div class="blank_div"></div> <div class="blank_div"></div>
<div class="fontBold">审批明细</div> <#--<div class="fontBold">审批明细</div>-->
<#include "/print/taskExecutionPrint.ftl" /> <#--<#include "/print/taskExecutionPrint.ftl" />-->
<div class="title" style="background: #CC8F81;text-align: center">Approvals / Checks 确认</div>
<table cellspacing="0px" cellpadding="0px" class="tableBorder">
<colgroup>
<col width='25%' />
<col width='20%' />
<col width='55%' />
</colgroup>
<tr>
<td class="center" style="background: yellow">审批节点</td>
<td class="center" style="background: yellow">DATA 日期</td>
<td class="center" style="background: yellow">COMMENTS 评论</td>
</tr>
<#if approvals?? && approvals?size gt 0>
<#list approvals as detail>
<tr>
<td class="left">${detail.approvalName?default("")?html}</td>
<td class="left">${detail.handledDate?default("")?html}</td>
<td class="left">${detail.opinion?default("")?html}</td>
</tr>
</#list>
<#else>
<tr>
<td class="center">&nbsp;</td>
<td class="center">&nbsp;</td>
<td class="center">&nbsp;</td>
</tr>
</#if>
</table>
<div class="title" style="background: #CC8F81;text-align: center">Implementation 执行人(版具/模具等)</div> <div class="title" style="background: #CC8F81;text-align: center">Implementation 执行人(版具/模具等)</div>
<table cellspacing="0px" cellpadding="0px" class="tableBorder"> <table cellspacing="0px" cellpadding="0px" class="tableBorder">
<colgroup> <colgroup>
......
...@@ -21,4 +21,6 @@ public interface EpChangeFormApplication { ...@@ -21,4 +21,6 @@ public interface EpChangeFormApplication {
EpChangeForm saveEpChangeForm(EpChangeForm epChangeForm); EpChangeForm saveEpChangeForm(EpChangeForm epChangeForm);
Map<String, Object> slicedEpChangeFormList(EpChangeFormQueryRequest queryRequest); Map<String, Object> slicedEpChangeFormList(EpChangeFormQueryRequest queryRequest);
List<Map<String,Object>> queryApprovalPersons(String bizId);
} }
...@@ -232,6 +232,12 @@ public class EpChangeFormApplicationImpl extends FlowBroker implements EpChangeF ...@@ -232,6 +232,12 @@ public class EpChangeFormApplicationImpl extends FlowBroker implements EpChangeF
return map; return map;
} }
@Override
public List<Map<String, Object>> queryApprovalPersons(String bizId) {
QueryDescriptor queryDescriptor = this.sqlExecutorDao.getQuery(QUERY_XML_FILE_PATH, "queryApprovalPersons");
return this.sqlExecutorDao.queryToListMap(queryDescriptor.getSql(),bizId);
}
public void feedBackSaleEcn(EpChangeForm epChangeForm){ public void feedBackSaleEcn(EpChangeForm epChangeForm){
Map<String,Object> map = new HashMap<>(); Map<String,Object> map = new HashMap<>();
//日志记录 //日志记录
......
package com.huigou.topsun.ep.change.controller; package com.huigou.topsun.ep.change.controller;
import com.huigou.cache.SystemCache;
import com.huigou.context.Operator; import com.huigou.context.Operator;
import com.huigou.context.OrgUnit; import com.huigou.context.OrgUnit;
import com.huigou.data.domain.query.QueryPageRequest; import com.huigou.data.domain.query.QueryPageRequest;
...@@ -10,12 +11,14 @@ import com.huigou.topsun.ep.change.domain.EpChangeForm; ...@@ -10,12 +11,14 @@ import com.huigou.topsun.ep.change.domain.EpChangeForm;
import com.huigou.topsun.ep.change.domain.query.EpChangeFormQueryRequest; import com.huigou.topsun.ep.change.domain.query.EpChangeFormQueryRequest;
import com.huigou.uasp.annotation.ControllerMapping; import com.huigou.uasp.annotation.ControllerMapping;
import com.huigou.uasp.bmp.common.BizBillStatus; import com.huigou.uasp.bmp.common.BizBillStatus;
import com.huigou.uasp.bpm.engine.application.ActApplication;
import com.huigou.uasp.client.CommonController; import com.huigou.uasp.client.CommonController;
import com.huigou.util.SDO; import com.huigou.util.SDO;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.io.File;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatter;
import java.util.Arrays; import java.util.Arrays;
...@@ -41,6 +44,8 @@ public class EpChangeFormController extends CommonController { ...@@ -41,6 +44,8 @@ public class EpChangeFormController extends CommonController {
private EpChangeFormImplItemApplication changeFormImplItemApplication; private EpChangeFormImplItemApplication changeFormImplItemApplication;
@Autowired @Autowired
private EpChangeFormStockItemApplication changeFormStockItemApplication; private EpChangeFormStockItemApplication changeFormStockItemApplication;
@Autowired
private ActApplication actApplication;
public String forwardEpChangeFormList(){ public String forwardEpChangeFormList(){
return forward("epChangeFormList"); return forward("epChangeFormList");
...@@ -135,6 +140,8 @@ public class EpChangeFormController extends CommonController { ...@@ -135,6 +140,8 @@ public class EpChangeFormController extends CommonController {
effective.append(" √ ").append(s).append(" ").append(stringListTextView.get(i)); effective.append(" √ ").append(s).append(" ").append(stringListTextView.get(i));
} }
map.put("changeEffective",effective.toString()); map.put("changeEffective",effective.toString());
File file = new File("bsn.png");
map.put("bsnPng",file);
// 获取Grid数据 // 获取Grid数据
QueryPageRequest pageModel = queryRequest.getPageModel(); QueryPageRequest pageModel = queryRequest.getPageModel();
pageModel.setPageSize(20); pageModel.setPageSize(20);
...@@ -142,11 +149,14 @@ public class EpChangeFormController extends CommonController { ...@@ -142,11 +149,14 @@ public class EpChangeFormController extends CommonController {
queryRequest.setEpChangeFormId(id); queryRequest.setEpChangeFormId(id);
Map<String, Object> implItemMap = changeFormImplItemApplication.findByEpChangeFormId(queryRequest); Map<String, Object> implItemMap = changeFormImplItemApplication.findByEpChangeFormId(queryRequest);
Map<String, Object> stockItemMap = changeFormStockItemApplication.findByEpChangeFormId(queryRequest); Map<String, Object> stockItemMap = changeFormStockItemApplication.findByEpChangeFormId(queryRequest);
Map<String, Object> queriedApprovalHistory = actApplication.queryApprovalHistoryByBizId(id);
List<Map<String, Object>> mapList = this.epChangeFormApplication.queryApprovalPersons(id);
List<Map<String, Object>> implItemMaps = (List<Map<String, Object>>) implItemMap.get("Rows"); List<Map<String, Object>> implItemMaps = (List<Map<String, Object>>) implItemMap.get("Rows");
List<Map<String, Object>> stockItemMaps = (List<Map<String, Object>>) stockItemMap.get("Rows"); List<Map<String, Object>> stockItemMaps = (List<Map<String, Object>>) stockItemMap.get("Rows");
map.put("printTime", DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm").format(LocalDateTime.now())); map.put("printTime", DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm").format(LocalDateTime.now()));
map.put("implItemMaps", implItemMaps); map.put("implItemMaps", implItemMaps);
map.put("stockItemMaps", stockItemMaps); map.put("stockItemMaps", stockItemMaps);
map.put("approvals", mapList);
String pintPage = String.format("/print/topsun/epChangeForm.ftl"); String pintPage = String.format("/print/topsun/epChangeForm.ftl");
return outputAndProcUnitHandlerPDF(pintPage, id, map); return outputAndProcUnitHandlerPDF(pintPage, id, map);
} }
......
...@@ -29,4 +29,21 @@ ...@@ -29,4 +29,21 @@
<condition column="ep_change_form_id" name="epChangeFormId" type="java.lang.String" symbol="=" alias="t"/> <condition column="ep_change_form_id" name="epChangeFormId" type="java.lang.String" symbol="=" alias="t"/>
</query> </query>
<query name="queryApprovalPersons">
<sql-query>
<!--SELECT
CONCAT( t.SUB_PROC_UNIT_NAME, ":", t.HANDLER_NAME ) AS approval_name,
CONCAT("DATA 日期:",t.HANDLED_DATE) as handled_date,
CONCAT("COMMENTS 评论:",t.OPINION) as opinion
FROM
wf_procunithandler t WHERE t.BIZ_ID = ? ORDER BY t.GROUP_ID ASC-->
SELECT
CONCAT( t.SUB_PROC_UNIT_NAME, ":", t.HANDLER_NAME ) AS approval_name,
t.HANDLED_DATE,
t.OPINION
FROM
wf_procunithandler t WHERE t.BIZ_ID = ? ORDER BY t.GROUP_ID ASC
</sql-query>
</query>
</query-mappings> </query-mappings>
\ No newline at end of file
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