Commit 788fb0f0 authored by 鲁鑫's avatar 鲁鑫

采购申请优化:1、单位数据字典,2、去掉“审批处理状态”3、币种加数据字典、4、采购组、成本中心、显示描述传code;质量信息记录未传节点3结论

parent d5307d39
......@@ -237,7 +237,7 @@ function getGridColumns() {
editor: {required: true, type: "text"}
},);
columns.push({
display: "物料组", name: "matkl", width: "100", align: "left", type: "string",
display: "物料组", name: "matklName", width: "100", align: "left", type: "string",
editor: {
required: true, type: "select",
data: {
......@@ -247,7 +247,8 @@ function getGridColumns() {
return {fieldName: "MATKL"}
},
back: {
MATKL: "matkl"
MATKL: "matkl",
WGBEZ: "matklName",
}
},
}
......@@ -257,24 +258,25 @@ function getGridColumns() {
editor: {required: true, type: "text", mask: '9999999.999'}
},);
columns.push({
display: "申购数量单位", name: "meins", width: 150, minWidth: 60, type: "string", align: "center",
/*editor: {
required: false, type: "select",
display: "申购数量单位", name: "meinsName", width: 150, minWidth: 60, type: "string", align: "center",
editor: {
required: true, type: "select",
data: {
type: 'system',
name: "dictionary",
getParam: function (item) {
return {paramValue: "MEINS"}
return {fieldName: "MEINS"}
},
back: {
MEINS: "meins"
MSEHI: "meins",
MSEHL: "meinsName"
}
},
}*/
editor: {required: true, type: "text"}
}
//editor: {required: true, type: "text"}
},);
columns.push({
display: "采购组", name: "ekgrp", width: 150, minWidth: 60, type: "string", align: "center",
display: "采购组", name: "ekgrpName", width: 150, minWidth: 60, type: "string", align: "center",
editor: {
required: true, type: "select",
data: {
......@@ -284,7 +286,8 @@ function getGridColumns() {
return {fieldName: "EKGRP"}
},
back: {
EKGRP: "ekgrp"
EKGRP: "ekgrp",
EKNAM: "ekgrpName",
}
},
}
......@@ -314,19 +317,20 @@ function getGridColumns() {
}
},);
columns.push({
display: "币种", name: "waers", width: "100", align: "left", type: "string",
display: "币种", name: "waersName", width: "100", align: "left", type: "string",
editor: {
required: false, type: "text",
/*data: {
required: true, type: "select",
data: {
type: 'system',
name: "dictionary",
getParam: function (item) {
return {fieldName: "WAERS"}
},
back: {
WAERS: "waers"
WAERS: "waers",
KTEXT: "waersName",
}
},*/
},
}
},);
columns.push({
......@@ -379,7 +383,7 @@ function getGridColumns() {
// editor: {type: 'text', required: true}
// },);
columns.push({
display: "成本中心", name: "kostl", width: "200", align: "left", type: "string",
display: "成本中心", name: "kostlName", width: "200", align: "left", type: "string",
editor: {
required: true, type: "select",
data: {
......@@ -389,7 +393,8 @@ function getGridColumns() {
return {fieldName: "KOSTL"}
},
back: {
KOSTL: "kostl"
KOSTL: "kostl",
LTEXT: "kostlName",
}
},
}
......@@ -414,10 +419,10 @@ function getGridColumns() {
// },
// }
});
columns.push({
display: "审批处理状态", name: "banpr", width: "100", align: "left", type: "string",
editor: {type: 'text'}
},);
// columns.push({
// display: "审批处理状态", name: "banpr", width: "100", align: "left", type: "string",
// editor: {type: 'text'}
// },);
columns.push({
display: "申请日期", name: "badat", width: "100", align: "left", type: "string",
editor: {required: false, type: "date"}
......@@ -449,24 +454,15 @@ function getExtendedData(processAction) {
return false;
}
var checked6 = false;
var checked1 = false;
datas.forEach(data => {
if ("F" == data.knttp && Public.isBlank(data.aufnr)){
checked6 = true;
}
//当“科目分配类型”选择F后“物料编号”字段调整为必须输入项
if ("F" == data.knttp && Public.isBlank(data.matnr)){
checked1 = true;
}
})
if (checked6) {
Public.tip("订单号不能为空")
return false;
}
if (checked1) {
Public.tip("物料编号不能为空")
return false;
}
extendedData.sapPurchaseItems = Public.encodeJSONURI(datas);
}
return extendedData;
......
......@@ -89,12 +89,14 @@ function addHandler() {
}
function insertHandler() {
var _self = this;
var bsart = $("#bsart").val();
UICtrl.addTabItem({
tabid: 'addPurchase',
text: '新增采购申请',
url: web_app.name + '/sapPurchase/forwardSapPurchaseDetail.job?bsart='+bsart
});
_self.close();
}
function deleteHandler() {
......
......@@ -177,7 +177,7 @@ function getGridColumns() {
editor: {required: true, type: "text"}
},);
columns.push({
display: "物料组", name: "matkl", width: "100", align: "left", type: "string",
display: "物料组", name: "matklName", width: "100", align: "left", type: "string",
editor: {
required: true, type: "select",
data: {
......@@ -187,7 +187,8 @@ function getGridColumns() {
return {fieldName: "MATKL"}
},
back: {
MATKL: "matkl"
MATKL: "matkl",
WGBEZ: "matklName",
}
},
}
......@@ -197,24 +198,24 @@ function getGridColumns() {
editor: {required: true, type: "text", mask: '9999999.999'}
},);
columns.push({
display: "申购数量单位", name: "meins", width: 150, minWidth: 60, type: "string", align: "center",
/*editor: {
required: false, type: "select",
display: "申购数量单位", name: "meinsName", width: 150, minWidth: 60, type: "string", align: "center",
editor: {
required: true, type: "select",
data: {
type: 'system',
name: "dictionary",
getParam: function (item) {
return {paramValue: "MEINS"}
return {fieldName: "MEINS"}
},
back: {
MEINS: "meins"
MSEHI: "meins",
MSEHL: "meinsName"
}
},
}*/
editor: {required: true, type: "text"}
}
},);
columns.push({
display: "采购组", name: "ekgrp", width: 150, minWidth: 60, type: "string", align: "center",
display: "采购组", name: "ekgrpName", width: 150, minWidth: 60, type: "string", align: "center",
editor: {
required: true, type: "select",
data: {
......@@ -224,7 +225,8 @@ function getGridColumns() {
return {fieldName: "EKGRP"}
},
back: {
EKGRP: "ekgrp"
EKGRP: "ekgrp",
EKNAM: "ekgrpName",
}
},
}
......@@ -254,19 +256,20 @@ function getGridColumns() {
}
},);
columns.push({
display: "币种", name: "waers", width: "100", align: "left", type: "string",
display: "币种", name: "waersName", width: "100", align: "left", type: "string",
editor: {
required: true, type: "text",
/*data: {
required: true, type: "select",
data: {
type: 'system',
name: "dictionary",
getParam: function (item) {
return {fieldName: "WAERS"}
},
back: {
WAERS: "waers"
WAERS: "waers",
KTEXT: "waersName",
}
},*/
},
}
},);
columns.push({
......@@ -279,41 +282,41 @@ function getGridColumns() {
}
//editor: {type: 'text'}
},);
columns.push({
display: "会计分配序号", name: "zebkn", width: "100", align: "left", type: "string",
editor: {type: 'text'},
render: function (item) {
//申购项次为消耗性采购时,从1开始步长为1自动编号,最大99
// if (item.knttp != ''){
// ZEBKN_NUM = ZEBKN_NUM + 1;
// }
return item.zebkn = item.menge;
}
},);
columns.push({
display: "多重科目分配", name: "vrtkz", width: "100", align: "left", type: "string",
//editor: {type: 'text'},
// render: function (item) {
// //资产消耗性申购,若申请数量大于1,此处不能为空,必须选择1
// if (item.knttp == "A" && item.menge > 1) {
// return item.vrtkz = 1;
// }
// }
},);
columns.push({
display: "部分发票", name: "twrkz", width: "100", align: "left", type: "string",
editor: {type: 'text'},
render: function (item) {
//资产消耗性申购,若申请数量大于1,此处不能为空,必须选择1
if (item.knttp == "A" && item.menge > 1) {
return item.twrkz = 1;
}
}
},);
columns.push({
display: "PR分解数量", name: "ekbnMenge", width: "100", align: "left", type: "string",
editor: {type: 'text'}
},);
// columns.push({
// display: "会计分配序号", name: "zebkn", width: "100", align: "left", type: "string",
// editor: {type: 'text'},
// render: function (item) {
// //申购项次为消耗性采购时,从1开始步长为1自动编号,最大99
// // if (item.knttp != ''){
// // ZEBKN_NUM = ZEBKN_NUM + 1;
// // }
// return item.zebkn = item.menge;
// }
// },);
// columns.push({
// display: "多重科目分配", name: "vrtkz", width: "100", align: "left", type: "string",
// //editor: {type: 'text'},
// // render: function (item) {
// // //资产消耗性申购,若申请数量大于1,此处不能为空,必须选择1
// // if (item.knttp == "A" && item.menge > 1) {
// // return item.vrtkz = 1;
// // }
// // }
// },);
// columns.push({
// display: "部分发票", name: "twrkz", width: "100", align: "left", type: "string",
// editor: {type: 'text'},
// render: function (item) {
// //资产消耗性申购,若申请数量大于1,此处不能为空,必须选择1
// if (item.knttp == "A" && item.menge > 1) {
// return item.twrkz = 1;
// }
// }
// },);
// columns.push({
// display: "PR分解数量", name: "ekbnMenge", width: "100", align: "left", type: "string",
// editor: {type: 'text'}
// },);
// columns.push({
// display: "总账科目", name: "sakto", width: "100", align: "left", type: "string",
// editor: {type: 'text', required: false}
......@@ -337,10 +340,10 @@ function getGridColumns() {
},
}
},);
columns.push({
display: "审批处理状态", name: "banpr", width: "100", align: "left", type: "string",
//editor: {type: 'text'}
},);
// columns.push({
// display: "审批处理状态", name: "banpr", width: "100", align: "left", type: "string",
// //editor: {type: 'text'}
// },);
columns.push({
display: "申请日期", name: "badat", width: "100", align: "left", type: "string",
editor: {required: false, type: "date"}
......
......@@ -112,6 +112,16 @@ public class ResourceSearchController {
SapDialogQuery queryRequest = sdo.toObject(SapDialogQuery.class);
queryRequest.setWerks(filterValue);
List<Map<String,String>> mapList = sapMaterialApplication.getSapMaterial(queryRequest);
if (CollectionUtil.isNotEmpty(mapList)){
mapList = mapList
.stream()
.map(map->{
String s = map.get("MATNR");
map.put("MATNR",s.replaceAll("^(0+)", ""));
return map;
})
.collect(Collectors.toList());
}
if (CollectionUtil.isNotEmpty(mapList)){
if (StringUtil.isNotBlank(filterValue)){//固定条件过滤,比如选了工厂后,只能读取改工厂下的物料组
mapList = mapList
......
......@@ -83,6 +83,12 @@ public class SapPurchaseItem extends AbstractEntity {
@Column(name = "MATKL")
private String matkl;
/**
* 物料组描述
*/
@Column(name = "MATKL_NAME")
private String matklName;
/**
* 申购数量
*/
......@@ -95,12 +101,24 @@ public class SapPurchaseItem extends AbstractEntity {
@Column(name = "MEINS")
private String meins;
/**
* 申购数量单位描述
*/
@Column(name = "MEINS_NAME")
private String meinsName;
/**
* 采购组
*/
@Column(name = "EKGRP")
private String ekgrp;
/**
* 采购组描述
*/
@Column(name = "EKGRP_NAME")
private String ekgrpName;
/**
* 申请日期
*/
......@@ -197,6 +215,12 @@ public class SapPurchaseItem extends AbstractEntity {
@Column(name = "WAERS")
private String waers;
/**
* 币种描述
*/
@Column(name = "WAERS_NAME")
private String waersName;
/**
* 评估金额
*/
......@@ -239,6 +263,12 @@ public class SapPurchaseItem extends AbstractEntity {
@Column(name = "KOSTL")
private String kostl;
/**
* 成本中心描述
*/
@Column(name = "KOSTL_NAME")
private String kostlName;
/**
* 订单号
*/
......
......@@ -153,10 +153,10 @@ public class SapQualityInfoRecordApplicationImpl extends FlowBroker implements S
List<SapQualityInfoRecordItemVo> sapQualityInfoRecordItemVoList = new ArrayList<>();
purchaseInfoRecordItemList.forEach(sapQualityInfoRecordItem -> {
SapQualityInfoRecordItemVo sapQualityInfoRecordItemVo = new SapQualityInfoRecordItemVo();
BeanUtil.copyProperties(sapQualityInfoRecordItem, sapQualityInfoRecordItemVo);
sapQualityInfoRecordItem.setZqavfn3("M1");
sapQualityInfoRecordItem.setZvfnc3("A");
sapQualityInfoRecordItem.setZqafst("11");
BeanUtil.copyProperties(sapQualityInfoRecordItem, sapQualityInfoRecordItemVo);
if ("0".equals(sapQualityInfoRecordItemVo.getGrsrq())){
sapQualityInfoRecordItemVo.setGrsrq("");
}
......
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