Commit fedc777a authored by 鲁鑫's avatar 鲁鑫

ECN变更单打印

parent 04f58278
......@@ -19,8 +19,15 @@ function bindEvent(){
return {fieldName: "WERKS"}
},
onChange: function (value, data) {
$('#lifnr').val(data.WERKS);
$('#lifnrName').val(data.NAME1);
if (data.WERKS == $("#werks").val()){
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(){
return {fieldName: "WERKS"}
},
onChange: function (value, data) {
$('#werks').val(data.WERKS);
$('#werksName').val(data.NAME1);
if (data.WERKS == $("#lifnr").val()){
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() {
required: true, type: "select",
data: {
type: 'system',
name: "sapMaterialSelect",
name: "sapMaterialSelect2",
getParam: function (item) {
return {
filterValue:item.werks
filterValue:$("#lifnr").val(),
filterValue2:$("#werks").val()
}
},
back: {
......
......@@ -12,6 +12,9 @@
</style>
</head>
<body>
<span class="left">
<img src="${bsnPng}">hh</img>
</span>
<div class="billTitle">宝绅内部变更申请/通知单</div>
<div class="billTitle">Specification Change Form</div>
<table cellspacing="0px" cellpadding="0px" class="tablePrint">
......@@ -137,8 +140,36 @@
</table>
<div class="blank_div"></div>
<div class="fontBold">审批明细</div>
<#include "/print/taskExecutionPrint.ftl" />
<#--<div class="fontBold">审批明细</div>-->
<#--<#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>
<table cellspacing="0px" cellpadding="0px" class="tableBorder">
<colgroup>
......
......@@ -21,4 +21,6 @@ public interface EpChangeFormApplication {
EpChangeForm saveEpChangeForm(EpChangeForm epChangeForm);
Map<String, Object> slicedEpChangeFormList(EpChangeFormQueryRequest queryRequest);
List<Map<String,Object>> queryApprovalPersons(String bizId);
}
......@@ -232,6 +232,12 @@ public class EpChangeFormApplicationImpl extends FlowBroker implements EpChangeF
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){
Map<String,Object> map = new HashMap<>();
//日志记录
......
package com.huigou.topsun.ep.change.controller;
import com.huigou.cache.SystemCache;
import com.huigou.context.Operator;
import com.huigou.context.OrgUnit;
import com.huigou.data.domain.query.QueryPageRequest;
......@@ -10,12 +11,14 @@ import com.huigou.topsun.ep.change.domain.EpChangeForm;
import com.huigou.topsun.ep.change.domain.query.EpChangeFormQueryRequest;
import com.huigou.uasp.annotation.ControllerMapping;
import com.huigou.uasp.bmp.common.BizBillStatus;
import com.huigou.uasp.bpm.engine.application.ActApplication;
import com.huigou.uasp.client.CommonController;
import com.huigou.util.SDO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import javax.annotation.Resource;
import java.io.File;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.Arrays;
......@@ -41,6 +44,8 @@ public class EpChangeFormController extends CommonController {
private EpChangeFormImplItemApplication changeFormImplItemApplication;
@Autowired
private EpChangeFormStockItemApplication changeFormStockItemApplication;
@Autowired
private ActApplication actApplication;
public String forwardEpChangeFormList(){
return forward("epChangeFormList");
......@@ -135,6 +140,8 @@ public class EpChangeFormController extends CommonController {
effective.append(" √ ").append(s).append(" ").append(stringListTextView.get(i));
}
map.put("changeEffective",effective.toString());
File file = new File("bsn.png");
map.put("bsnPng",file);
// 获取Grid数据
QueryPageRequest pageModel = queryRequest.getPageModel();
pageModel.setPageSize(20);
......@@ -142,11 +149,14 @@ public class EpChangeFormController extends CommonController {
queryRequest.setEpChangeFormId(id);
Map<String, Object> implItemMap = changeFormImplItemApplication.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>> stockItemMaps = (List<Map<String, Object>>) stockItemMap.get("Rows");
map.put("printTime", DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm").format(LocalDateTime.now()));
map.put("implItemMaps", implItemMaps);
map.put("stockItemMaps", stockItemMaps);
map.put("approvals", mapList);
String pintPage = String.format("/print/topsun/epChangeForm.ftl");
return outputAndProcUnitHandlerPDF(pintPage, id, map);
}
......
......@@ -29,4 +29,21 @@
<condition column="ep_change_form_id" name="epChangeFormId" type="java.lang.String" symbol="=" alias="t"/>
</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>
\ 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