Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
T
topsun-bpm
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
鲁鑫
topsun-bpm
Commits
779749e9
Commit
779749e9
authored
Jun 25, 2024
by
鲁鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
采购申请页面控制
parent
404d8c98
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
124 additions
and
170 deletions
+124
-170
sapPurchaseDetail.js
.../main/webapp/biz/topsun/sap/purchase/sapPurchaseDetail.js
+44
-70
sapZNE1PurchaseDetail.js
...n/webapp/biz/topsun/sap/purchase/sapZNE1PurchaseDetail.js
+8
-63
sapZNE1PurchaseDetail.jsp
.../webapp/biz/topsun/sap/purchase/sapZNE1PurchaseDetail.jsp
+1
-1
sapZNE2PurchaseDetail.js
...n/webapp/biz/topsun/sap/purchase/sapZNE2PurchaseDetail.js
+48
-35
ResourceSearchController.java
...om/huigou/topsun/controller/ResourceSearchController.java
+19
-1
SapPurchaseApprovalApplicationImpl.java
.../application/impl/SapPurchaseApprovalApplicationImpl.java
+4
-0
No files found.
topsun-xt/src/main/webapp/biz/topsun/sap/purchase/sapPurchaseDetail.js
View file @
779749e9
...
...
@@ -44,6 +44,16 @@ function initAufnr(knttp){
}
return
false
;
})
columns
.
some
(
column
=>
{
if
(
column
.
name
==
"kostlName"
){
//column.hide = knttp == 'F'? false:true;
if
(
isApplyProcUnit
()){
column
.
editor
.
required
=
knttp
==
'K'
?
true
:
false
;
}
return
true
;
}
return
false
;
})
if
(
"K"
==
knttp
){
if
(
Public
.
isNotBlank
(
itemGridManager
.
currentData
)){
var
rows
=
itemGridManager
.
currentData
.
Rows
;
...
...
@@ -142,7 +152,7 @@ function getGridColumns() {
var
columns
=
[];
columns
.
push
({
display
:
"申购项次号"
,
name
:
"bnfpo"
,
width
:
"80"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'spinner'
,
min
:
10
,
max
:
200
,
mask
:
'nnn'
}
//
editor: {type: 'spinner', min: 10, max: 200, mask: 'nnn'}
},);
columns
.
push
({
display
:
"项次类别"
,
name
:
"pstyp"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
hide
:
true
},);
// columns.push({
...
...
@@ -183,34 +193,34 @@ function getGridColumns() {
display
:
"工厂名称"
,
name
:
"name1"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
false
,
type
:
"text"
}
});
columns
.
push
({
display
:
"物料编号"
,
name
:
"matnr"
,
width
:
"300"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
false
,
type
:
"select"
,
data
:
{
type
:
'system'
,
name
:
"sapMaterialSelect"
,
getParam
:
function
(
item
)
{
return
{
filterValue
:
item
.
werks
}
},
back
:
{
MATNR
:
"matnr"
,
MAKTX
:
"txz01"
,
MATKL
:
"matkl"
,
WGBEZ
:
"matklName"
,
EKGRP
:
"ekgrp"
,
EKNAM
:
"ekgrpName"
,
PEINH
:
"peinh"
,
MEINS
:
"meins"
,
MSEHL
:
"meinsName"
,
LGFSB
:
"lgort"
,
LGOBE
:
"lgobe"
}
},
}
});
//
columns.push({
//
display: "物料编号", name: "matnr", width: "300", align: "left", type: "string",
//
editor: {
//
required: false, type: "select",
//
data: {
//
type: 'system',
//
name: "sapMaterialSelect",
//
getParam: function (item) {
//
return {
//
filterValue: item.werks
//
}
//
},
//
back: {
//
MATNR: "matnr",
//
MAKTX: "txz01",
//
MATKL: "matkl",
//
WGBEZ: "matklName",
//
EKGRP: "ekgrp",
//
EKNAM: "ekgrpName",
//
PEINH: "peinh",
//
MEINS: "meins",
//
MSEHL: "meinsName",
//
LGFSB: "lgort",
//
LGOBE: "lgobe"
//
}
//
},
//
}
//
});
columns
.
push
({
display
:
"库存地点"
,
name
:
"lgort"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
...
...
@@ -244,7 +254,10 @@ function getGridColumns() {
type
:
'system'
,
name
:
"dictionary"
,
getParam
:
function
(
item
)
{
return
{
fieldName
:
"MATKL"
}
return
{
fieldName
:
"MATKL"
,
filterValue
:
"C00"
}
},
back
:
{
MATKL
:
"matkl"
,
...
...
@@ -343,49 +356,10 @@ 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: "sakto", width: "100", align: "left", type: "string",
// editor: {type: 'text', required: true}
// },);
columns
.
push
({
display
:
"成本中心"
,
name
:
"kostlName"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
tru
e
,
type
:
"select"
,
required
:
fals
e
,
type
:
"select"
,
data
:
{
type
:
'system'
,
name
:
"dictionary"
,
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/purchase/sapZNE1PurchaseDetail.js
View file @
779749e9
...
...
@@ -16,7 +16,8 @@ function initializeCommonUI() {
function
bindEvent
()
{
fillinDate
=
$
(
"#fillinDate"
).
val
();
$
(
'#knttp'
).
searchbox
({
$
(
'#knttp'
).
val
(
"A"
);
/*$('#knttp').searchbox({
type: "system", name: "knttp",
getParam: function (item) {
return {
...
...
@@ -26,7 +27,7 @@ function bindEvent() {
onChange: function (value, data) {
$('#knttp').val(data.knttp);
}
});
});
*/
}
function
initItemGrid
()
{
...
...
@@ -110,25 +111,9 @@ function getGridColumns() {
var
columns
=
[];
columns
.
push
({
display
:
"申购项次号"
,
name
:
"bnfpo"
,
width
:
"80"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'spinner'
,
min
:
10
,
max
:
200
,
mask
:
'nnn'
}
//
editor: {type: 'spinner', min: 10, max: 200, mask: 'nnn'}
},);
columns
.
push
({
display
:
"项次类别"
,
name
:
"pstyp"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
hide
:
true
},);
// columns.push({
// display: "科目分配类别", name: "knttp", width: "100", align: "left", type: "string",
// editor: {
// required: true, type: "select",
// data: {
// type: 'system',
// name: "knttp",
// getParam: function (item) {
// return {filterValue: $("#bsart").val()}
// },
// back: {
// knttp: "knttp"
// }
// },
// }
// },);
columns
.
push
({
display
:
"工厂"
,
name
:
"werks"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
...
...
@@ -149,7 +134,7 @@ function getGridColumns() {
},);
columns
.
push
({
display
:
"工厂名称"
,
name
:
"name1"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
false
,
type
:
"text"
}
//
editor: {required: false, type: "text"}
});
columns
.
push
({
display
:
"库存地点"
,
name
:
"lgort"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
...
...
@@ -282,45 +267,8 @@ 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: "sakto", width: "100", align: "left", type: "string",
// editor: {type: 'text', required: false}
// },);
//财务部填写
if
(
"financeNode"
==
getSubProcUnitId
()){
columns
.
push
({
display
:
"资产编号"
,
name
:
"anln1"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
...
...
@@ -340,10 +288,7 @@ function getGridColumns() {
},
}
},);
// 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"
}
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/purchase/sapZNE1PurchaseDetail.jsp
View file @
779749e9
...
...
@@ -29,7 +29,7 @@
<div
class=
"hg-form-cols"
>
<div
class=
"hg-form-row"
>
<x:selectC
name=
"bsart"
label=
"pr类型"
disabled=
"true"
labelCol=
"1"
fieldCol=
"2"
required=
"true"
/>
<x:inputC
name=
"knttp"
label=
"科目分配类别"
labelCol=
"1"
fieldCol=
"2"
required=
"true"
wrapper=
"select
"
/>
<x:inputC
name=
"knttp"
label=
"科目分配类别"
readonly=
"true"
labelCol=
"1"
fieldCol=
"2"
required=
"true
"
/>
<x:inputC
name=
"banfn"
label=
"采购申请编号"
readonly=
"true"
labelCol=
"1"
fieldCol=
"2"
required=
"false"
/>
</div>
</div>
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/purchase/sapZNE2PurchaseDetail.js
View file @
779749e9
...
...
@@ -44,9 +44,19 @@ function initAufnr(knttp){
}
return
true
;
}
return
false
;
})
columns
.
some
(
column
=>
{
if
(
column
.
name
==
"kostlName"
){
//column.hide = knttp == 'F'? false:true;
if
(
isApplyProcUnit
()){
column
.
editor
.
required
=
knttp
==
'K'
?
true
:
false
;
}
return
true
;
}
return
false
;
})
if
(
"K"
==
knttp
){
if
(
Public
.
isNotBlank
(
itemGridManager
.
currentData
)){
var
rows
=
itemGridManager
.
currentData
.
Rows
;
...
...
@@ -165,9 +175,9 @@ function getGridColumns() {
columns
.
push
({
display
:
"工厂名称"
,
name
:
"name1"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
,
});
columns
.
push
({
display
:
"物料编号"
,
name
:
"matnr"
,
width
:
"300"
,
align
:
"left"
,
type
:
"string"
,
});
//
columns.push({
//
display: "物料编号", name: "matnr", width: "300", align: "left", type: "string",
//
});
columns
.
push
({
display
:
"库存地点"
,
name
:
"lgort"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
},);
...
...
@@ -246,7 +256,7 @@ function getGridColumns() {
}
else
{
columns
.
push
({
display
:
"申购项次号"
,
name
:
"bnfpo"
,
width
:
"80"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'spinner'
,
min
:
10
,
max
:
200
,
mask
:
'nnn'
}
//
editor: {type: 'spinner', min: 10, max: 200, mask: 'nnn'}
},);
columns
.
push
({
display
:
"项次类别"
,
name
:
"pstyp"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
hide
:
true
},);
columns
.
push
({
...
...
@@ -271,34 +281,34 @@ function getGridColumns() {
display
:
"工厂名称"
,
name
:
"name1"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
false
,
type
:
"text"
}
});
columns
.
push
({
display
:
"物料编号"
,
name
:
"matnr"
,
width
:
"300"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
false
,
type
:
"select"
,
data
:
{
type
:
'system'
,
name
:
"sapMaterialSelect"
,
getParam
:
function
(
item
)
{
return
{
filterValue
:
item
.
werks
}
},
back
:
{
MATNR
:
"matnr"
,
MAKTX
:
"txz01"
,
MATKL
:
"matkl"
,
WGBEZ
:
"matklName"
,
EKGRP
:
"ekgrp"
,
EKNAM
:
"ekgrpName"
,
PEINH
:
"peinh"
,
MEINS
:
"meins"
,
MSEHL
:
"meinsName"
,
LGFSB
:
"lgort"
,
LGOBE
:
"lgobe"
}
},
}
});
//
columns.push({
//
display: "物料编号", name: "matnr", width: "300", align: "left", type: "string",
//
editor: {
//
required: false, type: "select",
//
data: {
//
type: 'system',
//
name: "sapMaterialSelect",
//
getParam: function (item) {
//
return {
//
filterValue: item.werks
//
}
//
},
//
back: {
//
MATNR: "matnr",
//
MAKTX: "txz01",
//
MATKL: "matkl",
//
WGBEZ: "matklName",
//
EKGRP: "ekgrp",
//
EKNAM: "ekgrpName",
//
PEINH: "peinh",
//
MEINS: "meins",
//
MSEHL: "meinsName",
//
LGFSB: "lgort",
//
LGOBE: "lgobe"
//
}
//
},
//
}
//
});
columns
.
push
({
display
:
"库存地点"
,
name
:
"lgort"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
...
...
@@ -332,7 +342,10 @@ function getGridColumns() {
type
:
'system'
,
name
:
"dictionary"
,
getParam
:
function
(
item
)
{
return
{
fieldName
:
"MATKL"
}
return
{
fieldName
:
"MATKL"
,
noContain
:
"C00"
}
},
back
:
{
MATKL
:
"matkl"
,
...
...
@@ -434,7 +447,7 @@ function getGridColumns() {
columns
.
push
({
display
:
"成本中心"
,
name
:
"kostlName"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
tru
e
,
type
:
"select"
,
required
:
fals
e
,
type
:
"select"
,
data
:
{
type
:
'system'
,
name
:
"dictionary"
,
...
...
topsun/src/main/java/com/huigou/topsun/controller/ResourceSearchController.java
View file @
779749e9
...
...
@@ -57,7 +57,8 @@ public class ResourceSearchController {
Integer
pageSize
=
sdo
.
getInteger
(
"pageSize"
,
10
);
PageRequest
pageRequest
=
new
PageRequest
(
intPage
-
1
,
pageSize
);
List
<
QuerySchemeField
>
fields
=
Arrays
.
asList
(
new
QuerySchemeField
(
"科目分配类别"
,
"knttp"
,
"string"
,
100L
));
Arrays
.
asList
(
new
QuerySchemeField
(
"科目分配类别"
,
"knttp"
,
"string"
,
100L
),
new
QuerySchemeField
(
"科目分配类别描述"
,
"text"
,
"string"
,
100L
));
EasySearchParse
easySearchParse
=
new
EasySearchParse
();
easySearchParse
.
setFields
(
fields
);
easySearchParse
.
setWidth
(
450L
);
...
...
@@ -67,6 +68,12 @@ public class ResourceSearchController {
knttp
.
forEach
((
key
,
value
)
->
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"knttp"
,
value
);
if
(
"F"
.
equals
(
key
)){
map
.
put
(
"text"
,
"内部订单"
);
}
if
(
"K"
.
equals
(
key
)){
map
.
put
(
"text"
,
"成本中心"
);
}
if
(
"ZFW"
.
equals
(
filterValue
))
{
if
(
"F"
.
equals
(
key
)
||
"K"
.
equals
(
key
))
{
mapList
.
add
(
map
);
...
...
@@ -266,6 +273,7 @@ public class ResourceSearchController {
String
param
=
sdo
.
getString
(
"paramValue"
);
String
fieldName
=
sdo
.
getString
(
"fieldName"
);
String
filterValue
=
sdo
.
getString
(
"filterValue"
);
String
noContain
=
sdo
.
getString
(
"noContain"
);
List
<
Map
<
String
,
String
>>
mapList
=
new
ArrayList
<>();
mapList
=
sapDictionaryApplication
.
getSapDictionary
(
fieldName
);
List
<
QuerySchemeField
>
fields
=
new
ArrayList
<>();
...
...
@@ -281,6 +289,16 @@ public class ResourceSearchController {
.
collect
(
Collectors
.
toList
());
}
}
if
(
StringUtil
.
isNotBlank
(
noContain
)){
//固定条件过滤,不包含
String
[]
split
=
noContain
.
split
(
","
);
for
(
String
s
:
split
)
{
mapList
=
mapList
.
stream
()
.
filter
(
map
->
map
.
values
().
stream
().
noneMatch
(
value
->
value
.
contains
(
s
)))
//.filter(map -> map.containsValue(filterValue))
.
collect
(
Collectors
.
toList
());
}
}
if
(
StringUtil
.
isNotBlank
(
param
)){
//输入查询条件过滤
mapList
=
mapList
.
stream
()
...
...
topsun/src/main/java/com/huigou/topsun/sap/purchaseApproval/application/impl/SapPurchaseApprovalApplicationImpl.java
View file @
779749e9
...
...
@@ -283,6 +283,10 @@ public class SapPurchaseApprovalApplicationImpl extends FlowBroker implements Sa
sapPurchaseApprovalItems
.
add
(
sapPurchaseApprovalItem
);
sapPurchaseApproval
.
setKnttp
(
approvalItemVo
.
getKnttp
());
//科目分配类别
sapPurchaseApproval
.
setEkgrp
(
approvalItemVo
.
getEkgrp
());
//采购组
}
//knttp审批要素没有值时,赋值0,防止发起流程时报错
if
(
StringUtil
.
isBlank
(
sapPurchaseApproval
.
getKnttp
())){
sapPurchaseApproval
.
setKnttp
(
"0"
);
}
// String nextCode = codeGenerator.getNextCode("sapPurchaseApproval");
// sapPurchaseApproval.setBillCode(nextCode);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment