Commit 8517f232 authored by 刘学辉's avatar 刘学辉

Merge remote-tracking branch 'origin/dev' into dev

parents da29b6ed 07d2ac57
...@@ -32,7 +32,10 @@ ...@@ -32,7 +32,10 @@
</div> </div>
<div class="hg-form-row"> <div class="hg-form-row">
<x:checkboxListC name="reasonForChange" dictionary="reasonForChange" required="true" label="变更原因" labelCol="2" fieldCol="6"/> <x:checkboxListC name="reasonForChange" dictionary="reasonForChange" required="true" label="变更原因" labelCol="2" fieldCol="6"/>
<x:inputC name="reasonDesc" required="false" label="原因描述" labelCol="2" fieldCol="2"/> <x:inputC name="otherReasonDesc" required="false" label="其他原因描述" labelCol="2" fieldCol="2"/>
</div>
<div class="hg-form-row">
<x:textareaC name="reasonDesc" required="false" label="原因描述" rows="3" labelCol="2" fieldCol="10"/>
</div> </div>
<div class="hg-form-row"> <div class="hg-form-row">
<x:checkboxListC name="changeEffective" dictionary="changeEffective" required="true" label="生效日期" labelCol="2" fieldCol="10"/> <x:checkboxListC name="changeEffective" dictionary="changeEffective" required="true" label="生效日期" labelCol="2" fieldCol="10"/>
......
...@@ -134,34 +134,41 @@ function loadFinaCustomerPayListGrid() { ...@@ -134,34 +134,41 @@ function loadFinaCustomerPayListGrid() {
}, },
{ {
display: "根据分配号排序代码", name: "zuawaName", width: 150, minWidth: 60, type: "String", align: "left", display: "根据分配号排序代码", name: "zuawaName", width: 150, minWidth: 60, type: "String", align: "left",
// editor: {
// required: true, type: "select",
// data: {
// type: 'system',
// name: "dictionary",
// getParam: function (item) {
// return {fieldName: "ZUAWA"}
// },
// back: {
// ZUAWA: "zuawa",
// TTEXT: "zuawaName"
// },
//
// },
// }
},
{
display: "付款条件", name: "zterm", width: 100, minWidth: 60, type: "String", align: "left",
editor: { editor: {
required: true, type: "select", required: false, type: "select",
data: { data: {
type: 'system', type: 'system',
name: "dictionary", name: "dictionary",
getParam: function (item) { getParam: function (item) {
return {fieldName: "ZUAWA"} return {fieldName: "ZTERM"}
}, },
back: { back: {
ZUAWA: "zuawa", ZTERM: "zterm",
TTEXT: "zuawaName" TEXT1: "ztermName",
},
},
} }
}, },
{
display: "付款条件", name: "ztermTextView", width: 100, minWidth: 60, type: "String", align: "left",
editor: {
type: 'dictionary',
data: {name: 'zterm'},
textField: 'ztermTextView',
valueField: 'zterm',
required: false,
render: function (item) {
return item.ztermTextView;
} }
}, },
{
display: "付款条件描述", name: "ztermName", width: 100, minWidth: 60, type: "String", align: "left"
}, },
{ {
display: "考虑的付款方式清单", name: "zwelsTextView", width: 140, minWidth: 60, type: "String", align: "left", display: "考虑的付款方式清单", name: "zwelsTextView", width: 140, minWidth: 60, type: "String", align: "left",
...@@ -375,7 +382,7 @@ function checkConstraints(){ ...@@ -375,7 +382,7 @@ function checkConstraints(){
if (!datas) { if (!datas) {
return false; return false;
} }
if (isApproveProcUnit() && datas.length == 0 && "2" != getHandleResult()){ if (isApplyProcUnit() && datas.length == 0 ){
Public.tip("财务客户银行信息必填"); Public.tip("财务客户银行信息必填");
return false; return false;
} }
...@@ -390,8 +397,8 @@ function checkConstraints(){ ...@@ -390,8 +397,8 @@ function checkConstraints(){
if (!datas) { if (!datas) {
return false; return false;
} }
if (isApproveProcUnit() && datas.length == 0 && "2" != getHandleResult()){ if (isApplyProcUnit() && datas.length == 0){
Public.tip("财务客户付款信息必填"); Public.tip("财务客户公司信息必填");
return false; return false;
} }
} }
......
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
<x:inputC name="faxNumber" label="传真" labelCol="1" fieldCol="2" maxLength="30"/> <x:inputC name="faxNumber" label="传真" labelCol="1" fieldCol="2" maxLength="30"/>
</div> </div>
<div class="hg-form-row"> <div class="hg-form-row">
<x:inputC name="lifnr" label="供应商" labelCol="1" fieldCol="2" maxLength="30"/> <%--<x:inputC name="lifnr" label="供应商" labelCol="1" fieldCol="2" maxLength="30"/>--%>
<x:inputC name="stenr" label="税号" labelCol="1" fieldCol="2" maxLength="30"/> <x:inputC name="stenr" label="税号" labelCol="1" fieldCol="2" maxLength="30"/>
<x:hidden name="taxType"/> <x:hidden name="taxType"/>
<x:inputC name="taxTypeName" label="税号类型" labelCol="1" fieldCol="2" maxLength="30" wrapper="select"/> <x:inputC name="taxTypeName" label="税号类型" labelCol="1" fieldCol="2" maxLength="30" wrapper="select"/>
......
...@@ -19,9 +19,16 @@ function bindEvent(){ ...@@ -19,9 +19,16 @@ function bindEvent(){
return {fieldName: "WERKS"} return {fieldName: "WERKS"}
}, },
onChange: function (value, data) { onChange: function (value, data) {
if (data.WERKS == $("#werks").val()){
Public.tip("供货工厂不能和收货工厂一致");
$('#lifnr').val(null);
$('#lifnrName').val(null);
return false;
}else {
$('#lifnr').val(data.WERKS); $('#lifnr').val(data.WERKS);
$('#lifnrName').val(data.NAME1); $('#lifnrName').val(data.NAME1);
} }
}
}); });
//采购组织 //采购组织
$('#ekorgName').searchbox({ $('#ekorgName').searchbox({
...@@ -62,9 +69,16 @@ function bindEvent(){ ...@@ -62,9 +69,16 @@ function bindEvent(){
return {fieldName: "WERKS"} return {fieldName: "WERKS"}
}, },
onChange: function (value, data) { onChange: function (value, data) {
if (data.WERKS == $("#lifnr").val()){
Public.tip("收货工厂不能和供货工厂一致");
$('#werks').val(null);
$('#werksName').val(null);
return false;
}else {
$('#werks').val(data.WERKS); $('#werks').val(data.WERKS);
$('#werksName').val(data.NAME1); $('#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,7 +12,12 @@ ...@@ -12,7 +12,12 @@
</style> </style>
</head> </head>
<body> <body>
<div class="billTitle">宝绅内部变更申请/通知单</div>
<div class="billTitle">
<span style="position: absolute">
<img src="${bsnPng}"></img>
</span>
宝绅内部变更申请/通知单</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">
<colgroup> <colgroup>
...@@ -54,7 +59,9 @@ ...@@ -54,7 +59,9 @@
<col width='100%' /> <col width='100%' />
</colgroup> </colgroup>
<tr> <tr>
<td class="left">${reasonForChange?default("")?html}</td> <td class="left">${reasonForChange?default("")?html}
<span style="text-decoration: underline">${otherReasonDesc?default("")?html}</span>
</td>
</tr> </tr>
</table> </table>
<table cellspacing="0px" cellpadding="0px" class="tableBorder"> <table cellspacing="0px" cellpadding="0px" class="tableBorder">
...@@ -137,8 +144,36 @@ ...@@ -137,8 +144,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>
......
...@@ -219,6 +219,74 @@ public class ResourceSearchController { ...@@ -219,6 +219,74 @@ public class ResourceSearchController {
return model; return model;
} }
@EasySearch(queryName = "sapMaterialSelect2")
public Map<String, Object> sapMaterialSelect2(SDO sdo) throws IOException {
String param = sdo.getString("paramValue");
String filterValue = sdo.getString("filterValue");
String filterValue2 = sdo.getString("filterValue2");
SapDialogQuery queryRequest = sdo.toObject(SapDialogQuery.class);
queryRequest.setWerks(filterValue);
List<Map<String,String>> mapList = sapMaterialApplication.getSapMaterial(queryRequest);
queryRequest.setWerks(filterValue2);
List<Map<String,String>> mapList2 = sapMaterialApplication.getSapMaterial(queryRequest);
if (CollectionUtil.isNotEmpty(mapList)){
if (StringUtil.isNotBlank(param)){//模糊条件过滤
mapList = mapList
.stream()
.filter(map -> map.values().stream().anyMatch(value->value.contains(param)))
.collect(Collectors.toList());
}
}
if (CollectionUtil.isNotEmpty(mapList2)){
if (StringUtil.isNotBlank(param)){//模糊条件过滤
mapList2 = mapList2
.stream()
.filter(map -> map.values().stream().anyMatch(value->value.contains(param)))
.collect(Collectors.toList());
}
}
Set<String> matnrSet = mapList.stream().map(map -> {
return map.get("MATNR");
}).collect(Collectors.toSet());
Set<String> matnrSet2 = mapList2.stream().map(map -> {
return map.get("MATNR");
}).collect(Collectors.toSet());
List<String> collect = matnrSet.stream().filter(matnrSet2::contains).collect(Collectors.toList());
mapList = mapList.stream().filter(map -> collect.contains(map.get("MATNR"))).collect(Collectors.toList());
Integer intPage = sdo.getInteger("intPage", 1);
Integer pageSize = sdo.getInteger("pageSize",10);
PageRequest pageRequest = new PageRequest(intPage - 1, pageSize);
EasySearchParse easySearchParse = new EasySearchParse();
List<QuerySchemeField> fields =
Arrays.asList(
//new QuerySchemeField("工厂", "WERKS", "string", 60L),
//new QuerySchemeField("工厂名称", "NAME1", "string", 160L),
new QuerySchemeField("物料编码", "MATNR", "string", 140L),
new QuerySchemeField("物料名称", "MAKTX", "string", 200L),
new QuerySchemeField("物料分类", "MTART", "string", 100L),
new QuerySchemeField("物料分类描述", "MTBEZ", "string", 200L),
new QuerySchemeField("库存地点", "LGFSB", "string", 100L),
new QuerySchemeField("库存地点名称", "LGOBE", "string", 200L),
new QuerySchemeField("物料组", "MATKL", "string", 100L),
new QuerySchemeField("物料组名称", "WGBEZ", "string", 200L),
new QuerySchemeField("基本计量单位", "MEINS", "string", 100L),
new QuerySchemeField("基本计量单位名称", "MSEHL", "string", 100L),
new QuerySchemeField("采购组", "EKGRP", "string", 100L),
new QuerySchemeField("采购组名称", "EKNAM", "string", 200L),
new QuerySchemeField("价格基数", "PEINH", "string", 100L)
);
easySearchParse.setFields(fields);
easySearchParse.setWidth(500L);
MemEasySearcher<Map<String, String>> memEasySearcher = new MemEasySearcherImpl<>();
Map<String, Object> model = memEasySearcher.search(mapList, easySearchParse, pageRequest, null);
return model;
}
@EasySearch(queryName = "sapCustomerOrderSelect") @EasySearch(queryName = "sapCustomerOrderSelect")
public Map<String, Object> sapCustomerOrderSelect(SDO sdo) throws IOException { public Map<String, Object> sapCustomerOrderSelect(SDO sdo) throws IOException {
String param = sdo.getString("paramValue"); String param = sdo.getString("paramValue");
......
...@@ -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);
} }
......
...@@ -42,6 +42,12 @@ public class EpChangeForm extends FlowBillAbstractEntity { ...@@ -42,6 +42,12 @@ public class EpChangeForm extends FlowBillAbstractEntity {
@Column(name = "reason_desc") @Column(name = "reason_desc")
private String reasonDesc; private String reasonDesc;
/**
* 其他原因描述
*/
@Column(name = "other_reason_desc")
private String otherReasonDesc;
/** /**
* 生效日期: * 生效日期:
* □ IMMEDIATE立即变更 □ RUNNING CHANGE 正常变更(用完后变更) £ SEASON换季更改 * □ IMMEDIATE立即变更 □ RUNNING CHANGE 正常变更(用完后变更) £ SEASON换季更改
......
...@@ -64,6 +64,12 @@ public class FinaCustomerPay implements Serializable { ...@@ -64,6 +64,12 @@ public class FinaCustomerPay implements Serializable {
@Column(name = "zterm") @Column(name = "zterm")
private String zterm; private String zterm;
/**
* 付款条件描述
*/
@Column(name = "zterm_name")
private String ztermName;
/** /**
* 对公司代码过帐冻结 * 对公司代码过帐冻结
*/ */
......
...@@ -50,9 +50,10 @@ public class SapMaterialApplicationImpl implements SapMaterialApplication { ...@@ -50,9 +50,10 @@ public class SapMaterialApplicationImpl implements SapMaterialApplication {
ObjectMapper objectMapper = SAPUtils.objectMapper(); ObjectMapper objectMapper = SAPUtils.objectMapper();
sapMaterialVoList = objectMapper.readValue(JSONUtil.toString(map.get("RDATA")), new TypeReference<List<Map<String, String>>>() {}); sapMaterialVoList = objectMapper.readValue(JSONUtil.toString(map.get("RDATA")), new TypeReference<List<Map<String, String>>>() {});
//sapMaterialVoList = (List<Map<String,String>>) JSONArray.parse(JSONUtil.toString(map.get("RDATA"))); //sapMaterialVoList = (List<Map<String,String>>) JSONArray.parse(JSONUtil.toString(map.get("RDATA")));
}else {
throw new RuntimeException("查询物料失败:"+sapResult.getMESSAGE());
} }
// else {
// throw new RuntimeException("查询物料失败:"+sapResult.getMESSAGE());
// }
return sapMaterialVoList; return sapMaterialVoList;
} }
......
...@@ -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