Commit fa51b078 authored by 1650842865's avatar 1650842865

工序外协选择日期BUG解决;工序报价查询条件优化;工序外协传创建人编码到SAP;品质异常报告关联数据

parent 36a7f386
......@@ -760,7 +760,7 @@ function getExtendedData(processAction) {
var nos = [];
for (var i = 0; i < reimbursementDatas.length; i++) {
var item = reimbursementDatas[i];
if (nos.indexOf(item.zepItemno) < 0) {
if (nos.length>0 && nos.indexOf(item.zepItemno) < 0) {
Public.tip("EP流程子序号不能重复")
return false;
}else {
......
......@@ -945,7 +945,7 @@ function getExtendedData(processAction) {
var nos = [];
for (var i = 0; i < reimbursementDatas.length; i++) {
var item = reimbursementDatas[i];
if (nos.indexOf(item.zepItemno) < 0) {
if (nos.length>0 && nos.indexOf(item.zepItemno) < 0) {
Public.tip("EP流程子序号不能重复")
return false;
}else {
......
......@@ -59,11 +59,11 @@ var tableArray = [
display: "采购发票号", name: "belnr2", width: 120, minwidth: 120, type: "string", align: "left",
},
{
display: "实体发票号", name: "zzinvcnr", width: 120, minwidth: 120, type: "string", align: "left",
display: "实体发票号", name: "zzinvcnr", width: 200, minwidth: 120, type: "string", align: "left",
},
{
display: "对账单号", name: "xblnr", width: 150, minwidth: 120, type: "string", align: "left",
},
// {
// display: "采购发票行信息", name: "zrsegItem", width: 300, minwidth: 120, type: "string", align: "left",
// },
{
display: "币别", name: "waers", width: 120, minwidth: 120, type: "string", align: "left",
},
......@@ -363,6 +363,7 @@ function loadGrid(obj) {
kursf: row.KURSF,
kzwi1: row.KZWI1,
kzwi11: row.KZWI11,
xblnr: row.XBLNR,
partner: $("#partner").val(),
koinh: $("#koinh").val(),
bankn: $("#bankn").val(),
......@@ -724,7 +725,7 @@ function getExtendedData(processAction) {
var nos = [];
for (var i = 0; i < reimbursementDatas.length; i++) {
var item = reimbursementDatas[i];
if (nos.indexOf(item.zepItemno) < 0) {
if (nos.length>0 && nos.indexOf(item.zepItemno) < 0) {
Public.tip("EP流程子序号不能重复")
return false;
}else {
......
......@@ -20,11 +20,11 @@ function initGrid() {
display: "采购发票号", name: "BELNR2", width: 120, minwidth: 120, type: "string", align: "left",
},
{
display: "实体发票号", name: "ZZINVCNR", width: 120, minwidth: 120, type: "string", align: "left",
display: "实体发票号", name: "ZZINVCNR", width: 200, minwidth: 120, type: "string", align: "left",
},
{
display: "对账单号", name: "XBLNR", width: 150, minwidth: 120, type: "string", align: "left",
},
// {
// display: "采购发票行信息", name: "ZRSEG_ITEM", width: 300, minwidth: 120, type: "string", align: "left",
// },
{
display: "币别", name: "WAERS", width: 120, minwidth: 120, type: "string", align: "left",
},
......
......@@ -821,7 +821,7 @@ function getExtendedData(processAction) {
var nos = [];
for (var i = 0; i < reimbursementDatas.length; i++) {
var item = reimbursementDatas[i];
if (nos.indexOf(item.zepItemno) < 0) {
if (nos.length>0 && nos.indexOf(item.zepItemno) < 0) {
Public.tip("EP流程子序号不能重复")
return false;
}else {
......
......@@ -230,6 +230,7 @@ function initSerachBox(){
// });
// }
$('#customerOrderNo').val(value.value);
$('#customerNo').val(data.KUNNR);
}
});
......@@ -247,6 +248,7 @@ function initSerachBox(){
return {
werks: $('#werks').val(),
kunnr: $('#customerNo').val(),
bstnk: $('#customerOrderNo').val(),
reasonType:$('#exceptionReasonType').val(),
}
},
......@@ -255,13 +257,13 @@ function initSerachBox(){
if (dates != null && dates.length > 0){
for (let j = 0; j < dates.length; j++) {
var data = dates[j];
if (data.produceNo == row.AUFNR){
if (Public.isNotBlank(row.AUFNR) && Public.isNotBlank(data.produceNo) && data.produceNo == row.AUFNR){
Public.tip("生产单号:"+row.AUFNR+" 已选择,请取消勾选!");
return false;
}
}
}
clientGridManager.addRow({
UICtrl.addGridRow(clientGridManager, {
produceNo: row.AUFNR,
productCode: row.MATNR,
productName: row.MAKTX,
......@@ -271,8 +273,9 @@ function initSerachBox(){
money: row.KWERT,
price: row.NETWR,
sendDate: row.LFDAT
});
})
$('#produceNo').val(row.AUFNR);
$('#customerOrderNo').val(row.BSTNK);
}
});
//产品类别
......@@ -367,7 +370,7 @@ function initClientGrid() {
if (dates != null && dates.length > 0){
for (let j = 0; j < dates.length; j++) {
var data = dates[j];
if (data.produceNo == row.AUFNR){
if (Public.isNotBlank(row.AUFNR) && Public.isNotBlank(data.produceNo) && data.produceNo === row.AUFNR ){
Public.tip("生产单号:"+row.AUFNR+" 已选择,请取消勾选!");
return false;
}
......
......@@ -58,6 +58,9 @@ function initializate() {
$("#xchpf").val("X");
$("#lgort").val("1099");
$("#lgortName").val("客供料专用库");
Public.tip("客供料不维护仓库管理视图和财务核算视图");
$("#businessUsageS").prop("checked",false);
$("#businessUsageB").prop("checked",false);
}
initKunnrName(data.value);
//刀工模板具
......@@ -70,7 +73,7 @@ function initializate() {
Public.tip("广州市宝绅科技有限公司RFID工厂不维护仓库管理视图");
$("#businessUsageS").prop("checked",false);
}else {
$("#businessUsageS").prop("checked",true);
//$("#businessUsageS").prop("checked",true);
}
bindEvent_raube($('#werks').val(),$("#lgort").val());
}
......@@ -164,7 +167,9 @@ function initializate() {
$("#busiLens").val(dictUsage.length);
coRowNum=dictUsage.length;
for (var x=0;x<$("input[name='businessUsage']").length;x++) {
if (("1010" == $("#werks").val() || "ZGMB" == $("#mtart").val()) && x == 5){
if (("1010" == $("#werks").val() || "ZGMB" == $("#mtart").val() || "ZKGL" == $("#mtart").val()) && x == 5){
$("input[name='businessUsage']")[x].checked = false;
}else if ("ZKGL" == $("#mtart").val() && x == 6){
$("input[name='businessUsage']")[x].checked = false;
}else {
$("input[name='businessUsage']")[x].checked = true;
......@@ -196,6 +201,15 @@ function initializate() {
if ($("#mtart").val() == "ZGMB"){
Public.tip("刀工模板具不维护仓库管理视图");
}
if ($("#mtart").val() == "ZKGL"){
Public.tip("客供料不维护仓库管理视图");
}
}
if ("B"== $(this).val() ){
$("#businessUsageB").prop("checked",false);
if ($("#mtart").val() == "ZKGL"){
Public.tip("客供料不维护财务核算视图");
}
}
if (coRowNum==dictUsage.length){
$('input[name="isAll"]')[0].checked = true;
......@@ -449,7 +463,14 @@ function bindEvent() {
var mtart = $("#mtart").val();
if (mtart != "ZGMB" ){
if (mtart == "ZGMB" ){
Public.tip("刀工模板具不维护仓库管理视图");
$("#businessUsageS").prop("checked",false);
}else if (mtart == "ZKGL"){
Public.tip("客供料不维护仓库管理视图和财务核算视图");
$("#businessUsageS").prop("checked",false);
$("#businessUsageB").prop("checked",false);
} else {
//选择了工厂和库存地点后,带出存储条件
bindEvent_raube(data.WERKS,$('#lgort').val());
if (data.WERKS == "1010" && $("input[name='businessUsage']")[5].checked){
......@@ -458,9 +479,6 @@ function bindEvent() {
}else {
$("#businessUsageS").prop("checked",true);
}
}else {
Public.tip("刀工模板具不维护仓库管理视图");
$("#businessUsageS").prop("checked",false);
}
//选择了工厂、库存地点、仓库号,带出存储类型和上下架存储类型
......
......@@ -253,7 +253,7 @@ function getOrderColumns(){
columns.push({
display: "需求日期", name: "eeind", width: 140, minWidth: 60, type: "string", align: "left",
editor: {
type: "text", required: true
type: "date", required: true
}
},);
columns.push({
......@@ -459,7 +459,8 @@ function getExtendedData(processAction) {
for (let i = 0; i < datas.length; i++) {
var data = datas[i];
var regex = /^\d{4}-\d{2}-\d{2}$/;
if (!regex.test(data.eeind)) {
var regex2 = /^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/;
if (!regex.test(data.eeind) && !regex2.test(data.eeind)) {
Public.tip("序号为:"+data.sequence+" 的行项目需求日期格式应为:年-月-日");
return false; // 格式不匹配
}
......@@ -503,16 +504,6 @@ function checkConstraints(){
if (!datas) {
return false;
}
if (isApplyProcUnit()){
for (let i = 0; i < datas.length; i++) {
var data = datas[i];
var regex = /^\d{4}-\d{2}-\d{2}$/;
if (!regex.test(data.eeind)) {
Public.tip("序号为:"+data.sequence+" 的行项目需求日期格式应为:年-月-日");
return false; // 格式不匹配
}
}
}
if (isApplyProcUnit() && datas.length == 0 ){
Public.tip("物料组件信息必填");
return false;
......@@ -521,14 +512,25 @@ function checkConstraints(){
//订单行项目信息
var orderItem_grid = UICtrl.getGridManager('#orderItemGrid');
if (orderItem_grid) {
var datas = DataUtil.getGridData({
var orderItemdatas = DataUtil.getGridData({
gridManager: orderItem_grid,
isAllData: true
});
if (!datas) {
if (!orderItemdatas) {
return false;
}
if (isApplyProcUnit() && datas.length == 0){
if (isApplyProcUnit()){
for (let i = 0; i < orderItemdatas.length; i++) {
var data = orderItemdatas[i];
var regex = /^\d{4}-\d{2}-\d{2}$/;
var regex2 = /^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/;
if (!regex.test(data.eeind) && !regex2.test(data.eeind)) {
Public.tip("序号为:"+data.sequence+" 的行项目需求日期格式应为:年-月-日");
return false; // 格式不匹配
}
}
}
if (isApplyProcUnit() && orderItemdatas.length == 0){
Public.tip("订单行项目信息必填");
return false;
}
......
......@@ -3,7 +3,7 @@
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
<x:base include="layout,dialog,grid,tree,dateTime,combox,attachment,commonTree,comboDialog"/>
<x:base include="layout,dialog,grid,tree,combox,attachment,commonTree,comboDialog"/>
<script src='<c:url value="/biz/topsun/sap/processOutsource/showAddAufnrDetail.js"/>' type="text/javascript"></script>
</head>
<body>
......
......@@ -4,7 +4,7 @@
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
<x:base include="layout,dialog,grid,tree,dateTime,combox,attachment,commonTree,comboDialog"/>
<x:base include="layout,dialog,grid,tree,combox,attachment,commonTree,comboDialog"/>
<script src='<c:url value="/biz/topsun/sap/processQuotedPrice/processQuotedPriceNumber.js"/>' type="text/javascript"></script>
</head>
<body>
......
......@@ -460,5 +460,11 @@ public class SapCostReimbursementDetail implements Serializable {
@Column(name = "zzinvcnr")
private String zzinvcnr;
/**
* 对账单单号
*/
@Column(name = "XBLNR")
private String xblnr;
}
\ No newline at end of file
......@@ -28,6 +28,9 @@ import com.huigou.topsun.sap.processOutsource.repository.ProcessOutsourceReposit
import com.huigou.topsun.sap.wasteSale.domain.WasteSale;
import com.huigou.topsun.sap.wasteSale.domain.WasteSaleItem;
import com.huigou.uasp.bmp.common.BizBillStatus;
import com.huigou.uasp.bmp.opm.application.OrgApplication;
import com.huigou.uasp.bmp.opm.domain.model.org.Org;
import com.huigou.uasp.bmp.opm.repository.org.PersonRepository;
import com.huigou.uasp.bpm.FlowBroker;
import com.huigou.util.ClassHelper;
import com.huigou.util.DateUtil;
......@@ -68,6 +71,8 @@ public class ProcessOutsourceApplicationImpl extends FlowBroker implements Proce
private SapPermitApplication sapPermitApplication;
@Autowired
private TaskExecutor asyncWriteExecutor;
@Autowired
private OrgApplication orgApplication;
@Override
protected String saveBizAndApprovalData() {
......@@ -191,6 +196,9 @@ public class ProcessOutsourceApplicationImpl extends FlowBroker implements Proce
processOutsourceVo.setEkorg("1000");
processOutsourceVo.setEkgrp("003");
processOutsourceVo.setLifnr(lifnrSet);
String personMemberId = processOutsource.getPersonMemberId();
Org org = orgApplication.loadOrg(personMemberId);
processOutsourceVo.setPersonCode(org.getCode());
List<ProcessOutsourceItemVo> itemVos = new ArrayList<>();
int i = 10;
for (ProcessOutsourceOrderItem processOutsourceOrderItem : orderItems) {
......
......@@ -28,8 +28,8 @@ public class ProcessOutsourceVo implements Serializable {
/**
* 申请人
*/
// @JsonProperty("AFNAM")
// private String personMemberName;
@JsonProperty("ERNAM")
private String personCode;
/**
* 公司代码
......
......@@ -3,6 +3,9 @@ package com.huigou.topsun.sap.processQuotedPrice.domain.query;
import com.huigou.data.domain.query.QueryAbstractRequest;
import lombok.Data;
import java.util.Calendar;
import java.util.Date;
/**
* @Auther: xin.lu
* @Date: 2024/10/30/14:10
......@@ -16,4 +19,26 @@ public class ProcessQuotedPriceQueryRequest extends QueryAbstractRequest {
private String processQuotedPriceId;
private String processQuotedPriceItemId;
private String deptName;
private String deptId;
private String personMemberName;
private String personMemberId;
private String productCode;
private String productName;
private Date fillinDateBegin;
private Date fillinDateEnd;
private String statusKind;
public void setFillinDateEnd(Date fillinDateEnd) {
if (fillinDateEnd != null) {
// 使用Calendar类给日期加一天
Calendar calendar = Calendar.getInstance();
calendar.setTime(fillinDateEnd);
calendar.add(Calendar.DATE, 1); // 给日期加上一天
// 获取新的Date对象
fillinDateEnd = calendar.getTime();
}
this.fillinDateEnd = fillinDateEnd;
}
}
......@@ -194,7 +194,7 @@ public class SapMaterialApplicationImpl implements SapMaterialApplication {
// mapList = JSONUtil.toListMap(json);
// }
// }
if (StringUtils.isNotBlank(queryRequest.getParamValue())||StringUtils.isNotBlank(queryRequest.getVbeln())) { //必须输入参数
if (StringUtils.isNotBlank(queryRequest.getParamValue())||StringUtils.isNotBlank(queryRequest.getVbeln()) || StringUtils.isNotBlank(queryRequest.getKunnr())) { //必须输入参数
json = httpClient.execute(obj, InterfaceName);
mapList = JSONUtil.toListMap(json);
}
......@@ -322,6 +322,13 @@ public class SapMaterialApplicationImpl implements SapMaterialApplication {
werksList.add(signVo);
orderQueryVo.setWERKS(werksList);
}
if (StringUtils.isNotBlank(queryRequest.getBstnk())) { //客户单号
signVo=new SignVo();
signVo.setLow(queryRequest.getBstnk());
List <SignVo> bstnksList=new ArrayList<>();
bstnksList.add(signVo);
orderQueryVo.setBSTNK(bstnksList);
}
if (StringUtils.isNotBlank(queryRequest.getKunnr())
//&&"3".equals(queryRequest.getReasonType())
) { //客户编号
......@@ -349,13 +356,7 @@ public class SapMaterialApplicationImpl implements SapMaterialApplication {
try {
String json ="";
List<Map<String, Object>> mapList=new ArrayList<>();
// if ("3".equals(queryRequest.getReasonType())) { //如果是客户异常
// if (StringUtils.isNotBlank(queryRequest.getParamValue())) { //必须输入参数
// json = httpClient.execute(obj, InterfaceName);
// mapList = JSONUtil.toListMap(json);
// }
// }
if (StringUtils.isNotBlank(queryRequest.getParamValue())) { //必须输入参数
if (StringUtils.isNotBlank(queryRequest.getKunnr()) || StringUtils.isNotBlank(queryRequest.getBstnk()) || StringUtils.isNotBlank(queryRequest.getParamValue())) { //必须输入参数
json = httpClient.execute(obj, InterfaceName);
mapList = JSONUtil.toListMap(json);
}
......
......@@ -12,6 +12,8 @@ public class SapDialogOrderQuery {
private String kunnr; //客户编号
private String bstnk; //客户单号
private String vbeln; //销售订单号
private String aufnr; //生产订单号
......
......@@ -2,11 +2,14 @@
<query-mappings>
<query name="slicedProcessQuotedPriceList" table="sap_process_quoted_price">
<sql-query>
SELECT t.* FROM sap_process_quoted_price t
SELECT t.*,i.product_code,i.product_name FROM sap_process_quoted_price t left join sap_process_quoted_price_item i on t.id=i.process_quoted_price_id where 1=1
</sql-query>
<condition column="bill_code" name="billCode" type="java.lang.String" symbol="like" alias="t"/>
<condition column="dept_id" name="deptId" type="java.lang.String" symbol="=" alias="t"/>
<condition column="person_member_id" name="personMemberId" type="java.lang.String" symbol="=" alias="t"/>
<condition column="person_member_name" name="personMemberName" type="java.lang.String" symbol="like" alias="t"/>
<condition column="product_code" name="productCode" type="java.lang.String" symbol="like" alias="i"/>
<condition column="product_name" name="productName" type="java.lang.String" symbol="like" alias="i"/>
<condition column="fillin_date" name="fillinDateBegin" type="java.util.Date" symbol="&gt;=" alias="t"/>
<condition column="fillin_date" name="fillinDateEnd" type="java.util.Date" symbol="&lt;=" alias="t"/>
<condition column="status" name="statusKind" type="java.lang.Integer" symbol="in" alias="t"/>
......
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