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

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

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