Commit b0a55ce2 authored by 1650842865's avatar 1650842865

客供料更新优化;采购信息记录修改功能;物料主数据禁用启用增加原因字段

parent b370f4e6
......@@ -157,6 +157,11 @@ function initializate() {
$('input[name="isAll"]').attr("checked",false);
}
});
if (applyType==1){ //变更
var lvorm = $("#lvorm").val();
bindEvent_lvorm(lvorm)
}
}
function initKlart(mtart) {
......@@ -1470,6 +1475,30 @@ function bindEvent() {
}
})
})
//集团级删除、启用填写原因
$("#lvorm").combox({onChange:function(data){
bindEvent_lvorm(data.value)
}
});
}
function bindEvent_lvorm(data){
if (data=='X'){
UICtrl.setElRequiredFlag("#disableReason",true);
UICtrl.setElRequiredFlag("#enableReason",false);
$("#enableReason").val("");
}else if (data=='0'){
UICtrl.setElRequiredFlag("#disableReason",false);
UICtrl.setElRequiredFlag("#enableReason",true);
$("#disableReason").val("");
}else {
UICtrl.setElRequiredFlag("#disableReason",false);
UICtrl.setElRequiredFlag("#enableReason",false);
$("#disableReason").val("");
$("#enableReason").val("");
}
}
function bindEvent_sale() {
......
......@@ -157,6 +157,8 @@
<x:inputC name="classify" label="分类" labelCol="1" fieldCol="2" readonly="true"/>
<c:if test="${applyType==1}">
<x:selectC name="lvorm" label="集团级删除" required="false" labelCol="1" fieldCol="2" dictionary="lvorm"/>
<x:inputC name="disableReason" label="禁用原因" required="false" labelCol="1" fieldCol="2"/>
<x:inputC name="enableReason" label="启用原因" required="false" labelCol="1" fieldCol="2"/>
</c:if>
</div>
</div>
......
......@@ -14,6 +14,7 @@
<x:hidden name="id"/>
<x:hidden name="rowId"/>
<x:hidden name="isReadOnly"/>
<x:hidden name="knumh"/>
<x:inputC name="infnr" label="信息记录编号" labelCol="1" fieldCol="2" required="false" readonly="true"/>
<x:hidden name="werks"/>
<x:inputC name="werksName" required="true" label="工厂" labelCol="1" wrapper="select" fieldCol="2"/>
......
......@@ -682,6 +682,7 @@ function doSaveDefine() {
kstbm5: $("#kstbm5").val(),
kbetr5: $("#kbetr5").val(),
remark: $("#remark").val(),
knumh: $("#knumh").val(),
});
this.close();
......
......@@ -5,7 +5,7 @@
<html>
<head>
<x:base include="layout,dialog,grid,tree,date,dateTime,combox,attachment,commonTree,comboDialog"/>
<x:script src="/biz/topsun/sap/purchaseInfoRecord/purchaseInfoRecordDetail.js"/>
<x:script src="/biz/topsun/sap/purchaseInfoRecord/purchaseInfoRecord.js"/>
</head>
<body>
<div class="container-fluid">
......@@ -27,6 +27,7 @@
<x:hidden name="statusId"/>
<x:hidden name="ids"/>
<x:hidden name="isReadOnly"/>
<x:hidden name="flag"/>
<div class="hg-form-cols">
<div class="hg-form-row">
</div>
......
......@@ -42,6 +42,11 @@ function initPurchaseListGrid() {
copyQualityInfoRecord();
}
},
updateHandler:{
id: 'updateHandler', text: "修改", img:'fa-edit', click: function(){
updateHandlerInfoRecord();
}
}
// cancelHandler:{
// id: 'cancelHandler', text: "作废", img:'fa-trash-o', click: function(){
// cancelHandlerInfoRecord();
......@@ -238,6 +243,29 @@ function copyQualityInfoRecord(){
});
}
function updateHandlerInfoRecord(){
var rows = purchaseInfoRecordGridManager.getSelectedRows();
if (rows.length == 0) {
Public.tip('请选择数据!');
return;
}
var ids = [];
for (var i = 0; i < rows.length; i++){
var row=rows[i];
if (Public.isBlank(row.infnr)) {
Public.errorTip('只能修改有采购信息记录号的数据!');
return false;
}
ids.push(row.id)
}
UICtrl.addTabItem({
tabid: 'updatePurchaseInfoRecord' + row.id,
text: '修改采购信息记录',
url: web_app.name + '/sapPurchaseInfoRecord/showUpdateSapPurchaseInfoRecordDetail.job?ids='+ ids.join(",")
})
}
function cancelHandlerInfoRecord(){
var row = purchaseInfoRecordGridManager.getSelectedRow();
if (!row) {
......
var itemGridManager = null,fillinDate="";
$(document).ready(function () {
initialize();
initItemGrid();
bindEvent();
});
function initialize() {
UICtrl.layout("#layout", {leftWidth: 3});
$('#fileList').fileList({bizId:$("#id").val()});
}
function bindEvent() {
fillinDate = $("#fillinDate").val();
}
function initItemGrid() {
var toolbarOptions = UICtrl.getDefaultToolbarOptions({
});
itemGridManager = UICtrl.grid('#maingrid', {
columns: getGridColumns(),
dataAction: 'server',
_tableKey: 'sapPurchaseInfoRecordItem',
_local: true,
url: web_app.name + '/sapPurchaseInfoRecordItem/queryUpdateSapPurchaseInfoRecordItems.ajax',
parms:{sapPurchaseInfoRecordId:getId(),ids:$("#ids").val()},
height: '94%',
heightDiff: -4,
sortName: 'id',
sortOrder: 'asc',
checkbox: true,
usePager: true,
rownumbers: true,
enabledEdit: true,
fixedCellHeight: true,
selectRowButtonOnly: true,
//autoApplyNextEditor:false,
toolbar: toolbarOptions,
onDblClickRow: function (data, rowindex, rowobj) {
viewHandler(data);
},
}
);
UICtrl.setSearchAreaToggle(itemGridManager);
}
function getGridColumns() {
var columns = [];
columns = [
{display: "id", name: "id", width: "100", align: "left", type: "string",hide:true},
{display: "采购信息记录号", name: "infnr", width: "100", align: "left", type: "string"},
{display: "定价条件号", name: "knumh", width: "100", align: "left", type: "string"},
{display: "工厂", name: "werks", width: "10", align: "left", type: "string",hide:true},
{display: "工厂", name: "werksName", width: "200", align: "left", type: "string"},
{display: "采购组织", name: "ekorg", width: "10", align: "left", type: "string",hide:true},
{display: "采购组织", name: "ekorgName", width: "200", align: "left", type: "string"},
{display: "供应商编码", name: "lifnr", width: "100", align: "left", type: "string"},
{display: "供应商名称1", name: "name1", width: "200", align: "left", type: "string"},
{display: "供应商物料编码", name: "idnlf", width: "120", align: "left", type: "string"},
{display: "物料编码", name: "matnr", width: "160", align: "left", type: "string",},
{display: "物料描述", name: "maktx", width: "200", align: "left", type: "string",},
{display: "物料组编号", name: "matkl", width: "10", align: "left", type: "string",hide:true},
{display: "物料组", name: "matklName", width: "160", align: "left", type: "string"},
{display: "采购信息记录分类编号", name: "esokz", width: "20", align: "left", type: "string",hide:true},
{display: "采购信息记录分类", name: "esokzTextView", width: "140", align: "left", type: "string"},
{display: "采购组编号", name: "ekgrp", width: "20", align: "left", type: "string",hide:true},
{display: "采购组", name: "ekgrpName", width: "200", align: "left", type: "string"},
{display: "净价", name: "netpr", width: "100", align: "left", type: "string"},
{display: "运输费", name: "freight", width: "100", align: "left", type: "string"},
{display: "包装费", name: "kbetr6", width: "100", align: "left", type: "string"},
{display: "货币码编号", name: "waers", width: "20", align: "left", type: "string",hide:true},
{display: "货币码", name: "waersName", width: "100", align: "left", type: "string"},
{display: "价格单位", name: "peinh", width: "100", align: "left", type: "string"},
{display: "订单价格单位编号", name: "bprme", width: "20", align: "left", type: "string",hide:true},
{display: "订单价格单位(采购)", name: "bprmeName", width: "90", align: "left", type: "string"},
{display: "标准采购订单数量", name: "norbm", width: "120", align: "left", type: "string"},
{display: "基本计量单位", name: "meinsName", width: "100", align: "left", type: "string" },
{display: "基本计量单位", name: "meins", width: "40", align: "left", type: "string",hide:"true" },
{display: "订单单位转换分母", name: "umren", width: "100", align: "left", type: "string"},
{display: "订单单位转换分子", name: "umrez", width: "100", align: "left", type: "string"},
{display: "销售/购买税代码", name: "mwskz", width: "40", align: "left", type: "string",hide:"true" },
{display: "销售/购买税代码", name: "mwskzTextView", width: "150", align: "left", type: "string"},
{display: "开始生效日期", name: "datab", width: "100", align: "left", type: "string"},
{display: "有效期至日期", name: "datbi", width: "100", align: "left", type: "string"},
{display: "销售员", name: "verkf", width: "100", align: "left", type: "string"},
{display: "电话", name: "telf1", width: "100", align: "left", type: "string"},
{display: "原产地国代码", name: "urzla", width: "40", align: "left", type: "string",hide:"true"},
{display: "原产地国", name: "urzlaName", width: 150, minWidth: 60, type: "string", align: "center"},
{display: "地区", name: "regio", width: 10, minWidth: 60, type: "string", align: "center",hide:"true"},
{display: "地区", name: "regioName", width: 150, minWidth: 60, type: "string", align: "center"},
{display: "删除标志", name: "loekz", width: "40", align: "left", type: "string",hide:"true" },
{display: "删除标志", name: "loekzTextView", width: 150, minWidth: 60, type: "string", align: "center"},
{display: "排序字段", name: "sortl", width: 150, minWidth: 60, type: "string", align: "center"},
{display: "最小采购订单数量", name: "minbm", width: "120", align: "left", type: "string"},
{display: "计划交货时间(天)", name: "aplfz", width: "150", align: "left", type: "string"},
{display: "基于收货的发票验证", name: "webre", width: "40", align: "left", type: "string",hide:"true" },
{display: '基于收货的发票验证', name: "webreTextView", width: "100", align: "left", type: "string"},
{display: "价格有效至", name: "prdat", width: "100", align: "left", type: "string",hide:true,
//editor: {type: 'date', required: false}
render: function (item){
return item.prdat = item.datbi
}
},
{display: "等级类型", name: "stfkz", width: "40", align: "left", type: "string",hide:"true" },
{display: "等级类型", name:"stfkzTextView", width: "200", align: "left", type: "string",},
{display: "条件等级计量单位", name: "konms", width: "100", align: "left", type: "string"},
{display: "等级数量1", name: "kstbm", width: "100", align: "left", type: "string"},
{display: "等级金额1", name: "kbetr", width: "100", align: "left", type: "string"},
{display: "等级数量2", name: "kstbm2", width: "100", align: "left", type: "string"},
{display: "等级金额2", name: "kbetr2", width: "100", align: "left", type: "string"},
{display: "等级数量3", name: "kstbm3", width: "100", align: "left", type: "string"},
{display: "等级金额3", name: "kbetr3", width: "100", align: "left", type: "string"},
{display: "等级数量4", name: "kstbm4", width: "100", align: "left", type: "string"},
{display: "等级金额4", name: "kbetr4", width: "100", align: "left", type: "string"},
{display: "等级数量5", name: "kstbm5", width: "100", align: "left", type: "string"},
{display: "等级金额5", name: "kbetr5", width: "100", align: "left", type: "string"},
{display: "备注", name: "remark", width: "300", align: "left", type: "string",}
]
return columns;
}
//获取数据保存的参数
function getExtendedData(processAction) {
//回退、打回、转交时,不需要验证必填项是否已经填写;
if (processAction == ProcessAction.BACK
|| processAction == ProcessAction.REPLENISH
|| processAction == ProcessAction.TRANSMIT) {
//不验证
$('#submitForm').attr('check', false);
}
var extendedData = {};
var _grid = UICtrl.getGridManager('#maingrid');
if (_grid) {
var datas = DataUtil.getGridData({
gridManager: _grid,
isAllData: true
});
if (!datas) {
return false;
}
datas.forEach(data=>{
if (Public.isNotBlank(data.bprme)
&& Public.isNotBlank(data.meins)
&& (Public.isBlank(data.umren) || Public.isBlank(data.umrez))){
Public.tip("订单价格单位不为空,单位转换分子、分母必填")
return false;
}
})
extendedData.sapPurchaseInfoRecordItems = Public.encodeJSONURI(datas);
}
return extendedData;
}
//提交前校验
function checkConstraints() {
var _grid = UICtrl.getGridManager('#maingrid');
var datas = DataUtil.getGridData({
gridManager: _grid,
isAllData: true
});
if (datas.length < 1) {
Public.tip("请添加采购信息记录");
return false;
}
return true;
}
function getId() {
return $('#id').val();
}
function setId(value) {
$("#id").val(value);
var _grid=UICtrl.getGridManager('#maingrid');
_grid.options.parms.sapPurchaseInfoRecordId = value;
$('#fileList').fileList({bizId : value});
}
function reloadGrid() {
itemGridManager.loadData();
}
function getGridData(){
var _grid = UICtrl.getGridManager('#maingrid');
var datas = DataUtil.getGridData({
gridManager: _grid,
isAllData: true
});
return datas;
}
function initShowDialog() {
if ($("#datab").val() == null || $("#datab").val() == ''){
$("#datab").val($("#fillinDate").val().substring(0,10));
}
if ($("#datbi").val() == null || $("#datbi").val() == ''){
$("#datbi").val('9999-12-31');
}
// var mainFileTable = $('#compensateLibraryList').fileList();
// mainFileTable.find('table').css({
// borderTopWidth: 0
// });
}
function doSaveDefine() {
var _self = this;
var returnResult=checkInput();
var row = itemGridManager.rows;
var rId="";
if ($("#matnr").val()==""&&$("#matklName").val()==""){
Public.tip("物料编码与物料组必须填写一个!");
return false;
}
if ($("#matnr").val()==""&&$("#maktx").val()==""){
Public.tip("物料描述必须填写!");
return false;
}
// if ($("#matnr").val()==""&&$("#sortl").val()==""){
// Public.tip("排序字段必须填写!");
// return false;
// }
if (MathUtil.compare($("#norbm").val(),$("#minbm").val())<0){
Public.tip("标准采购订单数量必须大于最小采购订单量!");
return false;
}
if (MathUtil.compare($("#peinh").val(),1) < 0){
Public.tip("价格单位必须大于等于 1");
return false;
}
if (returnResult) {
if (row.length > 0) {
for (var u = 0; u < row.length; u++) {
rId = itemGridManager.rows[u].__id;
if ($("#rowId").val() == rId) {
itemGridManager.deleteRow(itemGridManager.rows[u]);
break;
}
}
}
UICtrl.addGridRow(itemGridManager, {
id: $("#id").val(),
infnr: $("#infnr").val(),
werks: $("#werks").val(),
werksName: $("#werksName").val(),
ekorg: $("#ekorg").val(),
ekorgName: $("#ekorgName").val(),
lifnr: $("#lifnr").val(),
name1: $("#name1").val(),
idnlf: $("#idnlf").val(),
matnr: $("#matnr").val(),
maktx: $("#maktx").val(),
matkl: $("#matkl").val(),
matklName: $("#matklName").val(),
esokz: $("#esokz").val(),
esokzTextView: $("#esokz").find("option:selected").text(),
ekgrp: $("#ekgrp").val(),
ekgrpName: $("#ekgrpName").val(),
netpr: $("#netpr").val(),
freight: $("#freight").val(),
kbetr6: $("#kbetr6").val(),
waers: $("#waers").val(),
ltsnr: $("#ltsnr").val(),
ltsbz: $("#ltsbz").val(),
waersName: $("#waersName").val(),
peinh: $("#peinh").val(),
bprme: $("#bprme").val(),
bprmeName: $("#bprmeName").val(),
norbm: $("#norbm").val(),
meins: $("#meins").val(),
meinsName: $("#meinsName").val(),
umren: $("#umren").val(),
umrez: $("#umrez").val(),
mwskz: $("#mwskz").val(),
mwskzTextView: $("#mwskz").find("option:selected").text(),
datab: $("#datab").val(),
datbi: $("#datbi").val(),
verkf: $("#verkf").val(),
telf1: $("#telf1").val(),
urzlaName: $("#urzlaName").val(),
urzla: $("#urzla").val(),
regioName: $("#regioName").val(),
regio: $("#regio").val(),
loekz: $("#loekz").val(),
loekzTextView: $("#loekz").find("option:selected").text(),
sortl: $("#sortl").val(),
minbm: $("#minbm").val(),
aplfz: $("#aplfz").val(),
webre: $("#webre").val(),
webreTextView: $("#webre").find("option:selected").text(),
stfkz: $("#stfkz").val(),
stfkzTextView: $("#stfkz").find("option:selected").text(),
konms: $("#konms").val(),
kstbm: $("#kstbm").val(),
kbetr: $("#kbetr").val(),
kstbm2: $("#kstbm2").val(),
kbetr2: $("#kbetr2").val(),
kstbm3: $("#kstbm3").val(),
kbetr3: $("#kbetr3").val(),
kstbm4: $("#kstbm4").val(),
kbetr4: $("#kbetr4").val(),
kstbm5: $("#kstbm5").val(),
kbetr5: $("#kbetr5").val(),
remark: $("#remark").val(),
knumh: $("#knumh").val(),
});
this.close();
}
}
function checkInput() {
if ($("#werks").val()==""){
Public.tip("工厂必输!");
return false;
}
if ($("#ekorg").val()==""){
Public.tip("采购组织必输!");
return false;
}
if ($("#lifnr").val()==""){
Public.tip("供应商必输!");
return false;
}
/* if ($("#matnr").val()==""){
Public.tip("物料编码必输!");
return false;
}*/
if ($("#esokz").val()==""){
Public.tip("记录分类必输!");
return false;
}
if ($("#ekgrp").val()==""){
Public.tip("采购组必输!");
return false;
}
if ($("#netpr").val()==""){
Public.tip("净价必输!");
return false;
}
if ($("#waers").val()==""){
Public.tip("货币码必输!");
return false;
}
if ($("#mwskz").val()==""){
Public.tip("销售/购买税代码必输!");
return false;
}
if ($("#datab").val()==""){
Public.tip("生效日期起必输!");
return false;
}
if ($("#datbi").val()==""){
Public.tip("生效日期止必输!");
return false;
}
if ($("#peinh").val()==""){
Public.tip("价格单位必输!");
return false;
}
if ($("#bprmeName").val()==""){
Public.tip("订单价格单位(采购)必输!");
return false;
}
if ($("#mwskz").val()==""){
Public.tip("销售/购买税代码必输!");
return false;
}
if ($("#umren").val()==""){
Public.tip("订单单位转换分母必输!");
return false;
}
if ($("#umrez").val()==""){
Public.tip("订单单位转换分子必输!");
return false;
}
if ($("#aplfz").val()==""){
Public.tip("计划交货时间(天)必输!");
return false;
}
if ($("#webre").val()==""){
Public.tip("基于收货的发票验证必输!");
return false;
}
if ($("#stfkz").val()==""){
Public.tip("等级类型必输!");
return false;
}
return true;
}
function viewHandler(data){
var param = JSON.stringify(data);
var rowId=data.__id;
var readwriteList = UICtrl.getUIElementPermissions(UIPO.READWRITE, UIPK.DETAIL);
if ($("#isReadOnly").val()=="true"||($("#statusId").val()==1&&readwriteList.length==0&&TaskKind.isReplenishTask(taskKindId)!=true)) {
UICtrl.showAjaxDialog({
title: "查看采购信息记录",
url: web_app.name + '/sapPurchaseInfoRecord/updateSapPurchaseInfoRecordDetail.load?id=' + data.id + '&rowId=' + rowId+'&isReadOnly=true',
param: {
param
},
width: 1200,
height: 860,
init: initShowDialog,
ok:false,
close: onDialogCloseHandler
});
} else {
UICtrl.showAjaxDialog({
title: "修改采购信息记录",
url: web_app.name + '/sapPurchaseInfoRecord/updateSapPurchaseInfoRecordDetail.load?id=' + data.id + '&rowId=' + rowId,
param: {
param
},
width: 1200,
height: 860,
init: initShowDialog,
okVal: '确定',
ok: doSaveDefine,
close: onDialogCloseHandler
});
}
}
// 关闭对话框
function onDialogCloseHandler() {
//if (refreshFlag) {
parent.reloadGrid();
// refreshFlag = false;
// }
}
\ No newline at end of file
<%--采购申请--%>
<%@ page contentType="text/html; charset=utf-8" language="java" %>
<%@ taglib uri="/WEB-INF/taglib.tld" prefix="x" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
<x:base include="layout,dialog,grid,tree,date,dateTime,combox,attachment,commonTree,comboDialog"/>
<x:script src="/biz/topsun/sap/purchaseInfoRecord/updatePurchaseInfoRecord.js"/>
</head>
<body>
<div class="container-fluid">
<x:billTitle title="修改采购信息记录" needStatus="true" needPerson="true"/>
<form class="hg-form" method="post" action="" id="submitForm">
<x:hidden name="id"/>
<x:hidden name="version"/>
<x:hidden name="billCode"/>
<x:hidden name="fillinDate"/>
<x:hidden name="fullId"/>
<x:hidden name="organId"/>
<x:hidden name="organName"/>
<x:hidden name="deptId"/>
<x:hidden name="deptName"/>
<x:hidden name="positionId"/>
<x:hidden name="positionName"/>
<x:hidden name="personMemberId"/>
<x:hidden name="personMemberName"/>
<x:hidden name="statusId"/>
<x:hidden name="ids"/>
<x:hidden name="isReadOnly"/>
<x:hidden name="flag"/>
<div class="hg-form-cols">
<div class="hg-form-row">
</div>
</div>
<div id="maingrid"></div>
<div style="padding-top: 15px;">
<x:fileList bizCode="purchaseInfoRecord" bizId="id" id="fileList" title="相关资料" />
</div>
</form>
</div>
</body>
\ No newline at end of file
var gridManager = null;
var canEdit=true;
$(document).ready(function () {
initialize();
bindDetailEvent();
});
function initialize(){
UICtrl.layout("#layout", {leftWidth: 3});
if ($("#isReadOnly").val()=="true") {
disableForm("infoRecord","disable");
} else {
var readwriteList = UICtrl.getUIElementPermissions(UIPO.READWRITE, UIPK.DETAIL);
// alert("dsd=="+readwriteList.length); alert(TaskKind.isReplenishTask(taskKindId)); //打回的
if (($("#statusId").val() == 1 && readwriteList.length > 0&&TaskKind.isReplenishTask(taskKindId)!=true)) {
disableForm("infoRecord", "disable");
$.each(readwriteList, function (i, o) {
$("#" + o).removeAttr('disabled');
});
}
}
}
function disableForm(formId,isDisabled) {
var attr="disable";
if(!isDisabled){
attr="enable";
}
$("form[id='"+formId+"'] :text").attr("disabled",isDisabled);
$("form[id='"+formId+"'] textarea").attr("disabled",isDisabled);
$("form[id='"+formId+"'] select").attr("disabled",isDisabled);
$("form[id='"+formId+"'] :radio").attr("disabled",isDisabled);
$("form[id='"+formId+"'] :checkbox").attr("disabled",isDisabled);
//禁用jquery easyui中的下拉选(使用input生成的combox)
$("#" + formId + " input[class='combobox-f combo-f']").each(function () {
if (this.id) {alert("input"+this.id);
$("#" + this.id).combobox(attr);
}
});
//禁用jquery easyui中的下拉选(使用select生成的combox)
$("#" + formId + " select[class='combobox-f combo-f']").each(function () {
if (this.id) {
alert(this.id);
$("#" + this.id).combobox(attr);
}
});
//禁用jquery easyui中的日期组件dataBox
$("#" + formId + " input[class='datebox-f combo-f']").each(function () {
if (this.id) {
alert(this.id)
$("#" + this.id).datebox(attr);
}
});
}
function bindDetailEvent(){
$('#waersName').searchbox({
type: "system", name: "selectSupplierWaers",
getParam: function (item) {
return {
partner: $('#lifnr').val(),
// werks: $('#werks').val()
}
},
onChange: function (value, data) {
$('#waers').val(data.waers);
$('#waersName').val(data.waersName);
$('#ltsnr').val(data.ltsnr);
$('#ltsbz').val(data.ltsbz);
//$('#name1').val(data.nameOrg1);
}
});
$('#bprmeName').searchbox({
type: "system", name: "dictionary",
getParam: function (item) {
return {fieldName: "MEINS"}
},
onChange: function (value, data) {
$('#bprme').val(data.MSEH3);
$('#bprmeName').val(data.MSEHL);
}
});
$('#urzlaName').searchbox({
type: "system", name: "dictionarySelect",
getParam: function (item) {
return {fieldName: "country",displayNames:"国家",displayLens:"180"}
},
onChange: function (value, data) {
$('#urzla').val(data.value);
$('#urzlaName').val(data.name);
}
});
$('#regioName').searchbox({
type: "system", name: "getArea",
getParam: function (item) {
if (Public.isBlank($('#urzla').val())){
Public.tip("请先选择原产地国!")
return false;
}
return {
LAND1: $('#urzla').val()
}
},
onChange: function (value, data) {
$('#regio').val(data.BLAND);
$('#regioName').val(data.BEZEI);
}
});
$('#kbetr').on('input', function() {
let inputValue = $(this).val();
if (isNaN(Number(inputValue))) {
Public.errorTip("等级金额1必须输入数字!");
}else {
if (Public.isNotBlank(inputValue)) {
UICtrl.disable($('#netpr'))
$('#netpr').val(inputValue);
}else {
UICtrl.enable($('#netpr'))
}
}
});
}
function reloadGrid() {
}
\ No newline at end of file
<%@ page language="java" contentType="text/html; charset=utf-8" %>
<%@taglib uri="/WEB-INF/taglib.tld" prefix="x" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
<x:base include="layout,dialog,grid,tree,combox,commonTree"/>
<x:script src='/biz/topsun/sap/purchaseInfoRecord/updatePurchaseInfoRecordDetail.js'/>
</head>
<body>
<form class="hg-form" method="post" action="" id="infoRecord">
<div class="hg-form-cols">
<div class="hg-form-row">
<x:hidden name="id"/>
<x:hidden name="rowId"/>
<x:hidden name="isReadOnly"/>
<x:hidden name="knumh"/>
<x:inputC name="infnr" label="信息记录编号" labelCol="1" fieldCol="2" required="false" readonly="true"/>
<x:hidden name="werks"/>
<x:inputC name="werksName" required="true" label="工厂" labelCol="1" readonly="true" fieldCol="2"/>
<x:hidden name="ekorg"/>
<x:inputC name="ekorgName" label="采购组织" labelCol="1" fieldCol="2" readonly="true" required="true" />
<x:inputC name="lifnr" label="供应商" labelCol="1" fieldCol="2" required="true" readonly="true"/>
<x:inputC name="name1" label="供应商名称" labelCol="1" fieldCol="2" required="false" readonly="true"/>
<x:inputC name="idnlf" label="供应商物料" labelCol="1" fieldCol="2" readonly="true"/>
<%--<x:inputC name="nameOrg3" label="组织名称3" labelCol="1" fieldCol="2"/>
<x:inputC name="nameOrg4" label="组织名称4" labelCol="1" fieldCol="2"/>--%>
<x:inputC name="matnr" label="物料编码" labelCol="1" fieldCol="2" required="false" readonly="true"/>
<x:inputC name="maktx" label="物料描述" labelCol="1" fieldCol="2" readonly="true"/>
<x:selectC name="esokz" label="记录分类" labelCol="1" fieldCol="2" required="true" dictionary="esokz" disabled="true"/>
<x:hidden name="ekgrp"/>
<x:inputC name="ekgrpName" label="采购组" labelCol="1" fieldCol="2" readonly="true" required="true" />
<x:inputC name="netpr" label="净价" labelCol="1" fieldCol="2" required="true" mask="999999999.99"/>
<x:inputC name="freight" label="运输费" labelCol="1" fieldCol="2" required="false" mask="99999999.99"/>
<x:inputC name="kbetr6" label="包装费" labelCol="1" fieldCol="2" required="false" mask="99999999.99"/>
<x:hidden name="matkl"/>
<x:inputC name="matklName" label="物料组" labelCol="1" fieldCol="2" readonly="true" />
<x:inputC name="waersName" label="货币码" labelCol="1" fieldCol="2" required="true" wrapper="select"/>
<x:hidden name="waers"/>
<x:hidden name="ltsnr"/>
<x:hidden name="ltsbz"/>
<x:inputC name="peinh" label="价格单位" labelCol="1" fieldCol="2" required="true" mask="99999999.99"/>
<x:inputC name="meinsName" label="基本计量单位" labelCol="1" fieldCol="2" required="false" readonly="true"/>
<x:hidden name="bprme"/>
<x:inputC name="bprmeName" label="订单价格单位(采购)" labelCol="2" fieldCol="2" wrapper="select" required="true" />
<x:selectC name="mwskz" label="销售/购买税代码" labelCol="2" fieldCol="3" required="true" dictionary="purchaseMwskz"/>
</div>
<div class="hg-form-row">
<x:hidden name="meins"/>
<x:inputC name="norbm" label="标准采购订单数量" labelCol="2" fieldCol="1" required="false" mask="99999999.99"/>
<x:inputC name="umren" label="订单单位转换分母" labelCol="1" fieldCol="2" required="true" mask="99999999.99"/>
<x:inputC name="umrez" label="订单单位转换分子" labelCol="1" fieldCol="2" required="true" mask="99999999.99"/>
<x:inputC name="datab" required="true" label="生效日期起" wrapper="date" labelCol="1" fieldCol="2"/>
<x:inputC name="datbi" required="true" label="生效日期止" wrapper="date" labelCol="1" fieldCol="2"/>
<x:inputC name="verkf" label="销售员" labelCol="1" fieldCol="2" required="false" />
<x:inputC name="telf1" label="电话" labelCol="1" fieldCol="2" required="false" />
<x:inputC name="urzlaName" label="原产国" labelCol="1" fieldCol="2" required="false" wrapper="select"/>
<x:hidden name="urzla"/>
<x:inputC name="regioName" label="地区" labelCol="1" fieldCol="2" required="false" wrapper="select"/>
<x:hidden name="regio"/>
<x:selectC name="loekz" label="删除标志" labelCol="1" fieldCol="2" required="false" dictionary="loekz"/>
<x:inputC name="sortl" label="排序字段" labelCol="1" fieldCol="2" required="false" readonly="true"/>
<x:inputC name="minbm" label="最小采购订单数量" labelCol="2" fieldCol="1" required="false" mask="9999999.99"/>
<x:inputC name="aplfz" label="计划交货时间(天)" labelCol="2" fieldCol="1" required="true" mask="9999999"/>
<x:selectC name="webre" label="基于收货的发票验证" labelCol="2" fieldCol="1" required="true" dictionary="webre"/>
<x:selectC name="stfkz" label="等级类型" labelCol="1" fieldCol="5" required="true" dictionary="stfkz" disabled="true"/>
</div>
<div class="hg-form-row">
<x:inputC name="kstbm" label="等级数量1" labelCol="1" fieldCol="1" required="false" mask="9999999.99"/>
<x:inputC name="kstbm2" label="等级数量2" labelCol="1" fieldCol="1" required="false" mask="9999999.99"/>
<x:inputC name="kstbm3" label="等级数量3" labelCol="1" fieldCol="1" required="false" mask="9999999.99"/>
<x:inputC name="kstbm4" label="等级数量4" labelCol="1" fieldCol="1" required="false" mask="9999999.99"/>
<x:inputC name="kstbm5" label="等级数量5" labelCol="1" fieldCol="1" required="false" mask="9999999.99"/>
</div>
<div class="hg-form-row">
<x:inputC name="kbetr" label="等级金额1" labelCol="1" fieldCol="1" required="false"/>
<x:inputC name="kbetr2" label="等级金额2" labelCol="1" fieldCol="1" required="false" mask="9999999.99"/>
<x:inputC name="kbetr3" label="等级金额3" labelCol="1" fieldCol="1" required="false" mask="9999999.99"/>
<x:inputC name="kbetr4" label="等级金额4" labelCol="1" fieldCol="1" required="false" mask="9999999.99"/>
<x:inputC name="kbetr5" label="等级金额5" labelCol="1" fieldCol="1" required="false" mask="9999999.99"/>
</div>
<div class="hg-form-row">
<x:textareaC name="remark" rows="3" label="备注" labelCol="1" fieldCol="9" />
</div>
</div>
</form>
</body>
</html>
......@@ -114,9 +114,11 @@ public class ClientMaterialsApplicationImpl extends BaseApplication implements C
public void saveClientMaterials(List<ClientMaterialsVo> sapClientMaterialsList){
//根据计划订单查询,如果没有就新增,有就修改
for (ClientMaterialsVo clientMaterialsVo : sapClientMaterialsList) {
ClientMaterials clientMaterialsDb = clientMaterialsRepository.findByPlnum(clientMaterialsVo.getPlnum());
if (clientMaterialsDb == null){
clientMaterialsDb = new ClientMaterials();
//ClientMaterials clientMaterialsDb = clientMaterialsRepository.findByPlnum(clientMaterialsVo.getPlnum());
List<ClientMaterials> clientMaterialsDbs = clientMaterialsRepository.findByPlnumAndKdaufAndKdpos(clientMaterialsVo.getPlnum(),clientMaterialsVo.getKdauf(),clientMaterialsVo.getKdpos());
if (CollectionUtils.isEmpty(clientMaterialsDbs)){
ClientMaterials clientMaterialsDb = new ClientMaterials();
BeanUtil.copyProperties(clientMaterialsVo,clientMaterialsDb);
//根据跟单员初始化创建人信息
String partner = clientMaterialsVo.getPartner();
......@@ -140,6 +142,7 @@ public class ClientMaterialsApplicationImpl extends BaseApplication implements C
//推送待办任务
this.pushTask(clientMaterialsDb,personMaps);
}else {
ClientMaterials clientMaterialsDb = clientMaterialsDbs.get(0);
//不为空,更新数据
BeanUtil.copyProperties(clientMaterialsVo,clientMaterialsDb);
clientMaterialsRepository.save(clientMaterialsDb);
......
......@@ -4,6 +4,8 @@ import com.huigou.topsun.sap.clientMaterials.domain.ClientMaterials;
import com.huigou.topsun.sap.componentSupply.domain.ComponentSupply;
import org.springframework.data.jpa.repository.JpaRepository;
import java.util.List;
/**
* @Auther: LXH
* @Date: 2024/06/05/16:33
......@@ -12,4 +14,5 @@ import org.springframework.data.jpa.repository.JpaRepository;
public interface ClientMaterialsRepository extends JpaRepository<ClientMaterials,String> {
ClientMaterials findByPlnum(String plnum);
List<ClientMaterials> findByPlnumAndKdaufAndKdpos(String plnum, String kdauf, String kdpos);
}
......@@ -1007,5 +1007,17 @@ public class SapNonProdApplyDept implements Serializable {
@Column(name = "UEETK")
private String ueetk;
/**
* 禁用原因
*/
@Column(name = "disable_reason")
private String disableReason;
/**
* 启用原因
*/
@Column(name = "enable_reason")
private String enableReason;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
......@@ -690,4 +690,8 @@ public class NonProdApplyBasicVo extends NonProdApplyDeptVo {
//允许未限制的过量交货
private String ueetk;
private String disableReason;
private String enableReason;
}
......@@ -913,5 +913,9 @@ public class NonProdApplyDeptBaseInfoVo implements Serializable {
@Column(name = "UEETK")
private String ueetk;
private String disableReason;
private String enableReason;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
......@@ -26,4 +26,6 @@ public interface SapPurchaseInfoRecordItemApplication {
void save(SapPurchaseInfoRecordItem sapPurchaseInfoRecordItem);
Map<String, Object> querySapPurchaseInfoRecordItemByIds(SapPurchaseInfoRecordQueryRequest request);
Map<String, Object> queryUpdateSapPurchaseInfoRecordItemByIds(SapPurchaseInfoRecordQueryRequest queryRequest);
}
......@@ -173,52 +173,35 @@ public class SapPurchaseInfoRecordApplicationImpl extends FlowBroker implements
if (StringUtil.isBlank(sapPurchaseInfoRecordItemVo.getMeins())){
sapPurchaseInfoRecordItemVo.setMeins(sapPurchaseInfoRecordItemVo.getBprme());
}
//物料编码为空 排序字段 传SAP FYL+7位流水号
if (StringUtils.isBlank(sapPurchaseInfoRecordItemVo.getMatnr())
&&StringUtils.isBlank(sapPurchaseInfoRecordItemVo.getSortl())) {
//物料描述赋值给短文本
sapPurchaseInfoRecordItemVo.setTxz01(sapPurchaseInfoRecordItem.getMaktx());
//根据供应商和物料组来查询是否推送成功过,如果成功过 则设置序号 并累加1
SapPurchaseInfoRecordQueryRequest query=new SapPurchaseInfoRecordQueryRequest();
query.setLifnr(sapPurchaseInfoRecordItem.getLifnr());
query.setMatkl(sapPurchaseInfoRecordItem.getMatkl());
synchronized(this) {
List<SapPurchaseInfoRecordItem> list=sapPurchaseInfoRecordItemApplication.querySapPurchaseInfoRecordItemByMaytkl(query);
if ("new".equals(sapPurchaseInfoRecord.getFlag())){
//物料编码为空 排序字段 传SAP FYL+7位流水号
if (StringUtils.isBlank(sapPurchaseInfoRecordItemVo.getMatnr())
&&StringUtils.isBlank(sapPurchaseInfoRecordItemVo.getSortl())) {
//物料描述赋值给短文本
sapPurchaseInfoRecordItemVo.setTxz01(sapPurchaseInfoRecordItem.getMaktx());
//根据供应商和物料组来查询是否推送成功过,如果成功过 则设置序号 并累加1
SapPurchaseInfoRecordQueryRequest query=new SapPurchaseInfoRecordQueryRequest();
query.setLifnr(sapPurchaseInfoRecordItem.getLifnr());
query.setMatkl(sapPurchaseInfoRecordItem.getMatkl());
synchronized(this) {
List<SapPurchaseInfoRecordItem> list=sapPurchaseInfoRecordItemApplication.querySapPurchaseInfoRecordItemByMaytkl(query);
//如果明细中有相同的供应商和物料组 ,成功后还没有写库时,需要重新计算list大小
List<SapPurchaseInfoRecordItem> sucessList = purchaseInfoRecordItemList.stream()
.filter(purchaseInfoRecordItem -> "S".equals(purchaseInfoRecordItem.getTYPE())
&& sapPurchaseInfoRecordItem.getLifnr().equals(purchaseInfoRecordItem.getLifnr())
&& sapPurchaseInfoRecordItem.getMatkl().equals(purchaseInfoRecordItem.getMatkl())
).collect(Collectors.toList());
list.addAll(sucessList);
if (list.size()>0){
sapPurchaseInfoRecordItemVo.setSortl("FYL"+formatSerialNumber(list.size()+1,7));
}else {
sapPurchaseInfoRecordItemVo.setSortl("FYL"+formatSerialNumber(1,7));
//如果明细中有相同的供应商和物料组 ,成功后还没有写库时,需要重新计算list大小
List<SapPurchaseInfoRecordItem> sucessList = purchaseInfoRecordItemList.stream()
.filter(purchaseInfoRecordItem -> "S".equals(purchaseInfoRecordItem.getTYPE())
&& sapPurchaseInfoRecordItem.getLifnr().equals(purchaseInfoRecordItem.getLifnr())
&& sapPurchaseInfoRecordItem.getMatkl().equals(purchaseInfoRecordItem.getMatkl())
).collect(Collectors.toList());
list.addAll(sucessList);
if (list.size()>0){
sapPurchaseInfoRecordItemVo.setSortl("FYL"+formatSerialNumber(list.size()+1,7));
}else {
sapPurchaseInfoRecordItemVo.setSortl("FYL"+formatSerialNumber(1,7));
}
}
}
// if (list.size()>0){
// synchronized(this) {
// String sql = "select t.* from code_rule t where t.RULE_KIND = ? for update";
// CodeRule codeRule = this.sqlExecutorDao.queryToObject(sql, CodeRule.class, "sortl");
// Integer currentValue = codeRule.getCurrentValue();
// if (currentValue == null) {
// currentValue = 0;
// }
// currentValue += 1;
// codeRule.setCurrentValue(currentValue);
// codeRule.setLastModifiedDate(DateUtil.getTimestamp());
// codeRule = codeRuleRepository.save(codeRule);
//
// String sortNo = codeRule.getPrefix() + formatSerialNumber(currentValue, 7);
// sapPurchaseInfoRecordItemVo.setSortl(sortNo);
// }
// sapPurchaseInfoRecordItem.setSortl(sapPurchaseInfoRecordItemVo.getSortl());
// }
}
sapPurchaseInfoRecordItem.setSortl(sapPurchaseInfoRecordItemVo.getSortl());
sapPurchaseInfoRecordItem.setSortl(sapPurchaseInfoRecordItemVo.getSortl());
}
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
if (sapPurchaseInfoRecordItem.getDatab() !=null){
String datab = dateFormat.format(sapPurchaseInfoRecordItem.getDatab());
......@@ -251,6 +234,7 @@ public class SapPurchaseInfoRecordApplicationImpl extends FlowBroker implements
sapPurchaseInfoRecordItem.setInfnr(sapResult.getMESSAGE_V1());
sapPurchaseInfoRecordItem.setTYPE(sapResult.getTYPE());
sapPurchaseInfoRecordItem.setMESSAGE(sapResult.getMESSAGE());
sapPurchaseInfoRecordItem.setKnumh(sapResult.getMESSAGE_V2());
// sapPurchaseInfoRecordItem.setInfnr();//回写信息记录编号 待确认 //?????
sapPurchaseInfoRecordItemApplication.save(sapPurchaseInfoRecordItem);
this.markCancelRecordItems(sapPurchaseInfoRecordItem);
......
......@@ -60,6 +60,16 @@ public class SapPurchaseInfoRecordItemApplicationImpl extends BaseApplication im
Map<String, Object> map = this.sqlExecutorDao.executeSlicedQuery(queryModel);
return map;
}
@Override
public Map<String, Object> queryUpdateSapPurchaseInfoRecordItemByIds(SapPurchaseInfoRecordQueryRequest queryRequest) {
QueryDescriptor queryDescriptor = this.sqlExecutorDao.getQuery(QUERY_XML_FILE_PATH, "queryUpdateSapPurchaseInfoRecordItemByIds");
QueryModel queryModel = this.sqlExecutorDao.getQueryModel(queryDescriptor, queryRequest);
queryModel.putDictionary("mwskz", DictUtil.getDictionary("purchaseMwskz"));
Map<String, Object> map = this.sqlExecutorDao.executeSlicedQuery(queryModel);
return map;
}
@Override
public List<SapPurchaseInfoRecordItem> querySapPurchaseInfoRecordItemByMaytkl(SapPurchaseInfoRecordQueryRequest query) {
QueryDescriptor queryDescriptor = this.sqlExecutorDao.getQuery(QUERY_XML_FILE_PATH, "querySapPurchaseInfoRecordItemByMaytkl");
......
......@@ -68,7 +68,8 @@ public class SapPurchaseInfoRecordController extends CommonController {
*/
Operator operator = getOperator();
sapPurchaseInfoRecord.setDefaultValues(new OrgUnit(operator.getFullId(), operator.getFullName()));
return forward("purchaseInfoRecordDetail",sapPurchaseInfoRecord);
sapPurchaseInfoRecord.setFlag("new");
return forward("purchaseInfoRecord",sapPurchaseInfoRecord);
}
public String addSapPurchaseInfoRecordDetail() {
......@@ -90,6 +91,25 @@ public class SapPurchaseInfoRecordController extends CommonController {
return forward("addPurchaseInfoRecordDetail",item);
}
public String updateSapPurchaseInfoRecordDetail() {
SDO sdo = this.getSDO();
String id = sdo.getId();
//String edit=sdo.getString("edit");
String rowId=sdo.getString("rowId");
SapPurchaseInfoRecordItem item = JSONUtil.toBean(sdo.getString("param"), SapPurchaseInfoRecordItem.class);
if (item!=null){
item.setRowId(rowId);
if (id.equals(rowId)){
item.setId("");
} else {
item.setId(id);
}
}
this.putAttribute("isReadOnly",sdo.getString("isReadOnly"));
// SapPurchaseInfoRecord sapPurchaseInfoRecord = sapPurchaseInfoRecordApplication.loadSapPurchaseInfoRecord(id);
return forward("updatePurchaseInfoRecordDetail",item);
}
public String saveSapPurchaseInfoRecordDetail() {
SDO sdo = this.getSDO();
String id = sdo.getId();
......@@ -107,7 +127,11 @@ public class SapPurchaseInfoRecordController extends CommonController {
BizBillStatus.ABORTED.getId()==sapPurchaseInfoRecord.getStatusId())){
this.putAttribute("isReadOnly","true");
}
return forward("purchaseInfoRecordDetail",sapPurchaseInfoRecord);
if ("new".equals(sapPurchaseInfoRecord.getFlag())){
return forward("purchaseInfoRecord",sapPurchaseInfoRecord);
}else {
return forward("updatePurchaseInfoRecord",sapPurchaseInfoRecord);
}
}
public String copyPurchaseRecord(){
......@@ -124,7 +148,26 @@ public class SapPurchaseInfoRecordController extends CommonController {
sapPurchaseInfoRecord.setDefaultValues(new OrgUnit(operator.getFullId(), operator.getFullName()));
String nextCode = codeGenerator.getNextCode("purchaseInfoRecord");
sapPurchaseInfoRecord.setBillCode(nextCode);
return forward("purchaseInfoRecordDetail",sapPurchaseInfoRecord);
sapPurchaseInfoRecord.setFlag("new");
return forward("purchaseInfoRecord",sapPurchaseInfoRecord);
}
public String showUpdateSapPurchaseInfoRecordDetail(){
SDO sdo = this.getSDO();
String ids = sdo.getString("ids");
this.putAttribute("processDefinitionKey", SapPurchaseInfoRecordApplication.PROCESS_DEFINITION_KEY);
// 新增的时候procUnitId一定要设置成Apply,不然jsp页面的所有表单元素是readonly状态
this.putAttribute("procUnitId", "Apply");
this.putAttribute("ids",ids);
SapPurchaseInfoRecord sapPurchaseInfoRecord = new SapPurchaseInfoRecord();
sapPurchaseInfoRecord.setId(null);
sapPurchaseInfoRecord.setStatusId(BizBillStatus.APPLYING.getId());
Operator operator = getOperator();
sapPurchaseInfoRecord.setDefaultValues(new OrgUnit(operator.getFullId(), operator.getFullName()));
String nextCode = codeGenerator.getNextCode("purchaseInfoRecord");
sapPurchaseInfoRecord.setBillCode(nextCode);
sapPurchaseInfoRecord.setFlag("update");
return forward("updatePurchaseInfoRecord",sapPurchaseInfoRecord);
}
public String cancelPurchaseRecord(){
......
......@@ -39,6 +39,19 @@ public class SapPurchaseInfoRecordItemController extends CommonController {
return toResult(map);
}
public String queryUpdateSapPurchaseInfoRecordItems(){
SDO sdo = this.getSDO();
Map<String, Object> map = new HashMap<>();
SapPurchaseInfoRecordQueryRequest queryRequest = sdo.toQueryRequest(SapPurchaseInfoRecordQueryRequest.class);
if (StringUtil.isNotBlank(queryRequest.getSapPurchaseInfoRecordId())){
map = sapPurchaseInfoRecordItemApplication.querySapPurchaseInfoRecordItem(queryRequest);
}
if (StringUtil.isBlank(queryRequest.getSapPurchaseInfoRecordId()) && StringUtil.isNotBlank(queryRequest.getIds())){
map = sapPurchaseInfoRecordItemApplication.queryUpdateSapPurchaseInfoRecordItemByIds(queryRequest);
}
return toResult(map);
}
public String deleteSapPurchaseInfoRecordItem(){
SDO sdo = this.getSDO();
List<String> ids = sdo.getIds();
......
......@@ -3,6 +3,7 @@ package com.huigou.topsun.sap.purchaseInfoRecord.domain;
import com.huigou.data.domain.model.FlowBillAbstractEntity;
import lombok.Data;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
......@@ -15,6 +16,8 @@ import javax.persistence.Table;
@Entity
@Data
public class SapPurchaseInfoRecord extends FlowBillAbstractEntity {
@Column(name="flag")
private String flag;
@Override
protected String getCodeRuleId() {
return "purchaseInfoRecord";
......
......@@ -386,5 +386,11 @@ public class SapPurchaseInfoRecordItem extends AbstractEntity {
@Column(name = "cancel_flag")
private String cancelFlag;
/**
* 定价条件号
*/
@Column(name = "KNUMH")
private String knumh;
}
......@@ -23,6 +23,13 @@ public class SapPurchaseInfoRecordItemVo implements Serializable {
*/
@JsonProperty("INFNR")
private String infnr;
/**
* 定价条件号
*/
@JsonProperty("KNUMH")
private String knumh;
/**
* 采购组织
*/
......
......@@ -69,6 +69,85 @@
<condition column="id" name="ids" symbol="in" alias="t"/>
</query>
<query name="queryUpdateSapPurchaseInfoRecordItemByIds" label="根据id查询" table="sap_purchase_info_record_item">
<sql-query>
select
'' as id,
'' as sap_purchase_info_record_id,
t.ZYY,
t.LIFNR,
t.MATNR,
t.INFNR,
t.ESOKZ,
t.VERKF,
t.TELF1,
t.MEINS,
t.UMREN,
t.UMREZ,
t.URZLA,
t.ZFLAG,
t.LOEKZ,
t.EKORG,
t.WERKS,
t.APLFZ,
t.EKGRP,
t.NORBM,
t.MINBM,
t.MWSKZ,
t.WEBRE,
t.NETPR,
t.WAERS,
t.PEINH,
t.BPRME,
t.KSCHL,
t.PRDAT,
t.BPUMN,
t.BPUMZ,
t.DATAB,
t.DATBI,
t.KSTBM,
t.KONMS,
t.KBETR,
t.SEND_TIME,
t.VERSION,
t.NAME1,
t.MAKTX,
t.MATKL,
t.VERID,
t.SORTL,
t.TYPE,
t.MESSAGE,
t.REGIO,
t.STFKZ,
t.IDNLF,
t.WERKS_NAME,
t.MEINS_NAME,
t.WAERS_NAME,
t.EKGRP_NAME,
t.LIFNR_NAME,
t.EKORG_NAME,
t.BPRME_NAME,
t.MATKL_NAME,
t.REGIO_NAME,
t.KSTBM2,
t.KBETR2,
t.KSTBM3,
t.KBETR3,
t.URZLA_NAME,
t.KSTBM4,
t.KBETR4,
t.KSTBM5,
t.KBETR5,
t.FREIGHT,
t.KBETR6,
t.LTSNR,
t.LTSBZ,
t.REMARK,
t.CANCEL_FLAG,
t.KNUMH from sap_purchase_info_record_item t where 1=1
</sql-query>
<condition column="id" name="ids" symbol="in" alias="t"/>
</query>
<query name="querySapPurchaseInfoRecordItemByMaytkl" label="根据物料组和供应商查询" table="sap_purchase_info_record_item">
<sql-query>
select * from sap_purchase_info_record_item t where t.type='S'
......
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