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
17992933
Commit
17992933
authored
Jun 29, 2024
by
鲁鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
采购申请根据科目分配类别控制成本中心、订单号;财务环节填写订单号和总账科目
parent
8c816fd0
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
302 additions
and
38 deletions
+302
-38
sapPurchaseDetail.js
.../main/webapp/biz/topsun/sap/purchase/sapPurchaseDetail.js
+185
-7
sapPurchaseList.jsp
...c/main/webapp/biz/topsun/sap/purchase/sapPurchaseList.jsp
+18
-0
sapZNE1PurchaseDetail.js
...n/webapp/biz/topsun/sap/purchase/sapZNE1PurchaseDetail.js
+17
-0
sapZNE2PurchaseDetail.js
...n/webapp/biz/topsun/sap/purchase/sapZNE2PurchaseDetail.js
+36
-31
SapPurchaseApplicationImpl.java
...purchase/application/impl/SapPurchaseApplicationImpl.java
+32
-0
SapPurchaseController.java
...topsun/sap/purchase/controller/SapPurchaseController.java
+2
-0
SapPurchaseQueryRequest.java
...un/sap/purchase/domain/query/SapPurchaseQueryRequest.java
+8
-0
sapPurchase.xml
...n/resources/config/topsun/sap/sapPurchase/sapPurchase.xml
+4
-0
No files found.
topsun-xt/src/main/webapp/biz/topsun/sap/purchase/sapPurchaseDetail.js
View file @
17992933
...
@@ -39,7 +39,9 @@ function initAufnr(knttp){
...
@@ -39,7 +39,9 @@ function initAufnr(knttp){
columns
.
some
(
column
=>
{
columns
.
some
(
column
=>
{
if
(
column
.
name
==
"aufnr"
){
if
(
column
.
name
==
"aufnr"
){
column
.
hide
=
knttp
==
'F'
?
false
:
true
;
column
.
hide
=
knttp
==
'F'
?
false
:
true
;
column
.
editor
.
required
=
knttp
==
'F'
?
true
:
false
;
if
(
typeof
(
getSubProcUnitId
)
==
'function'
&&
"financeNode"
==
getSubProcUnitId
()){
column
.
editor
.
required
=
knttp
==
'F'
?
true
:
false
;
}
return
true
;
return
true
;
}
}
return
false
;
return
false
;
...
@@ -77,7 +79,9 @@ function initItemGrid() {
...
@@ -77,7 +79,9 @@ function initItemGrid() {
pstyp
:
pstyp
,
pstyp
:
pstyp
,
badat
:
fillinDate
,
badat
:
fillinDate
,
erdat
:
fillinDate
,
erdat
:
fillinDate
,
knttp
:
$
(
"#knttp"
).
val
()
knttp
:
$
(
"#knttp"
).
val
(),
ernam
:
$
(
"#personMemberName"
).
val
(),
afnam
:
$
(
"#personMemberName"
).
val
(),
});
});
}
}
},
},
...
@@ -93,6 +97,19 @@ function initItemGrid() {
...
@@ -93,6 +97,19 @@ function initItemGrid() {
}
}
});
});
},
},
copyHandler
:
{
id
:
'copyHandler'
,
text
:
'复制'
,
img
:
'fa-copy'
,
click
:
function
()
{
var
row
=
itemGridManager
.
getSelectedRow
();
if
(
!
row
)
{
Public
.
tip
(
"请勾选一条数据"
);
return
;
}
var
newRow
=
JSON
.
parse
(
JSON
.
stringify
(
row
));
newRow
.
bnfpo
=
(
itemGridManager
.
getData
().
length
+
1
)
*
10
;
newRow
.
id
=
null
;
UICtrl
.
addGridRow
(
itemGridManager
,
newRow
);
}
}
})
})
itemGridManager
=
UICtrl
.
grid
(
'#maingrid'
,
{
itemGridManager
=
UICtrl
.
grid
(
'#maingrid'
,
{
columns
:
getGridColumns
(),
columns
:
getGridColumns
(),
...
@@ -150,6 +167,126 @@ function initItemGrid() {
...
@@ -150,6 +167,126 @@ function initItemGrid() {
function
getGridColumns
()
{
function
getGridColumns
()
{
var
columns
=
[];
var
columns
=
[];
if
(
typeof
(
getSubProcUnitId
)
==
'function'
&&
"financeNode"
==
getSubProcUnitId
()){
columns
.
push
({
display
:
"申购项次号"
,
name
:
"bnfpo"
,
width
:
"80"
,
align
:
"left"
,
type
:
"string"
,
},);
columns
.
push
({
display
:
"项次类别"
,
name
:
"pstyp"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
hide
:
true
},);
columns
.
push
({
display
:
"工厂"
,
name
:
"werks"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
},);
columns
.
push
({
display
:
"工厂名称"
,
name
:
"name1"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
,
});
// 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"
,
},);
columns
.
push
({
display
:
"库存地点名称"
,
name
:
"lgobe"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
,
},);
columns
.
push
({
display
:
"短文本"
,
name
:
"txz01"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
,
},);
columns
.
push
({
display
:
"物料组"
,
name
:
"matklName"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
},);
columns
.
push
({
display
:
"申购数量"
,
name
:
"menge"
,
width
:
150
,
minWidth
:
60
,
type
:
"string"
,
align
:
"center"
,
},);
columns
.
push
({
display
:
"申购数量单位"
,
name
:
"meinsName"
,
width
:
150
,
minWidth
:
60
,
type
:
"string"
,
align
:
"center"
,
},);
columns
.
push
({
display
:
"采购组"
,
name
:
"ekgrpName"
,
width
:
150
,
minWidth
:
60
,
type
:
"string"
,
align
:
"center"
,
},);
columns
.
push
({
display
:
"批准日期"
,
name
:
"frgdt"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
},);
columns
.
push
({
display
:
"要求交货日期"
,
name
:
"lfdat"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
},);
columns
.
push
({
display
:
"创建者"
,
name
:
"ernam"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
},);
columns
.
push
({
display
:
"申请人"
,
name
:
"afnam"
,
width
:
"90"
,
align
:
"left"
,
type
:
"string"
,
},);
columns
.
push
({
display
:
"预估单价"
,
name
:
"preis"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
},);
columns
.
push
({
display
:
"价格基数"
,
name
:
"ebanPeinh"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
},);
columns
.
push
({
display
:
"币种"
,
name
:
"waersName"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
},);
columns
.
push
({
display
:
"评估金额"
,
name
:
"ebanNetwr"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
},);
columns
.
push
({
display
:
"成本中心"
,
name
:
"kostlName"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
,
},);
columns
.
push
({
display
:
"订单号"
,
name
:
"aufnr"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'text'
,
required
:
true
}
});
// columns.push({
// display: "审批处理状态", name: "banpr", width: "100", align: "left", type: "string",
// editor: {type: 'text'}
// },);
columns
.
push
({
display
:
"总账科目"
,
name
:
"sakto"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
true
,
type
:
"select"
,
data
:
{
type
:
'system'
,
name
:
"dictionary"
,
getParam
:
function
(
item
)
{
return
{
fieldName
:
"SAKTO"
,
filterValue
:
'6600'
}
},
back
:
{
SAKNR
:
'sakto'
,
}
},
}
},);
columns
.
push
({
display
:
"申请日期"
,
name
:
"badat"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
},);
columns
.
push
({
display
:
"创建日期"
,
name
:
"erdat"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
},);
}
else
{
columns
.
push
({
columns
.
push
({
display
:
"申购项次号"
,
name
:
"bnfpo"
,
width
:
"80"
,
align
:
"left"
,
type
:
"string"
,
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'}
...
@@ -375,7 +512,6 @@ function getGridColumns() {
...
@@ -375,7 +512,6 @@ function getGridColumns() {
},);
},);
columns
.
push
({
columns
.
push
({
display
:
"订单号"
,
name
:
"aufnr"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
,
display
:
"订单号"
,
name
:
"aufnr"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'text'
,
required
:
false
,}
// editor: {
// editor: {
// required: false, type: "select",
// required: false, type: "select",
// data: {
// data: {
...
@@ -397,6 +533,25 @@ function getGridColumns() {
...
@@ -397,6 +533,25 @@ function getGridColumns() {
// 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
({
display
:
"总账科目"
,
name
:
"sakto"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
// editor: {
// required: true, type: "select",
// data: {
// type: 'system',
// name: "dictionary",
// getParam: function (item) {
// return {
// fieldName: "SAKTO",
// filterValue:'6600'
// }
// },
// back: {
// SAKNR:'sakto',
// }
// },
// }
},);
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"
}
...
@@ -405,6 +560,8 @@ function getGridColumns() {
...
@@ -405,6 +560,8 @@ function getGridColumns() {
display
:
"创建日期"
,
name
:
"erdat"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
display
:
"创建日期"
,
name
:
"erdat"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
//editor: {required: false, type: "date"}
//editor: {required: false, type: "date"}
},);
},);
}
return
columns
;
return
columns
;
}
}
...
@@ -427,16 +584,20 @@ function getExtendedData(processAction) {
...
@@ -427,16 +584,20 @@ function getExtendedData(processAction) {
if
(
!
datas
)
{
if
(
!
datas
)
{
return
false
;
return
false
;
}
}
if
(
datas
.
length
==
0
){
Public
.
tip
(
"采购项次不能为空"
);
return
false
;
}
var
checked6
=
false
;
var
checked6
=
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
;
}
}
})
})
if
(
checked6
)
{
//
if (checked6) {
Public
.
tip
(
"订单号不能为空"
)
//
Public.tip("订单号不能为空")
return
false
;
//
return false;
}
//
}
extendedData
.
sapPurchaseItems
=
Public
.
encodeJSONURI
(
datas
);
extendedData
.
sapPurchaseItems
=
Public
.
encodeJSONURI
(
datas
);
}
}
return
extendedData
;
return
extendedData
;
...
@@ -465,4 +626,21 @@ function getGridData() {
...
@@ -465,4 +626,21 @@ function getGridData() {
return
datas
;
return
datas
;
}
}
//UICtrl中校验是否允许编辑
function
businessJudgmentUnit
()
{
var
isApply
=
isApplyProcUnit
();
if
(
isApply
)
{
return
true
;
}
else
{
//财务节点
if
(
typeof
(
getSubProcUnitId
)
==
'function'
&&
"financeNode"
===
getSubProcUnitId
()){
UICtrl
.
disable
(
"#knttp"
);
return
true
;
}
return
false
;
}
return
true
;
}
topsun-xt/src/main/webapp/biz/topsun/sap/purchase/sapPurchaseList.jsp
View file @
17992933
...
@@ -17,6 +17,24 @@
...
@@ -17,6 +17,24 @@
<form
class=
"hg-form ui-show"
method=
"post"
action=
""
id=
"queryMainForm"
>
<form
class=
"hg-form ui-show"
method=
"post"
action=
""
id=
"queryMainForm"
>
<div
class=
"hg-form-row"
>
<div
class=
"hg-form-row"
>
<x:inputC
name=
"billCode"
label=
"需求跟踪编号"
labelCol=
"1"
/>
<x:inputC
name=
"billCode"
label=
"需求跟踪编号"
labelCol=
"1"
/>
<x:inputC
name=
"banfn"
label=
"采购申请编号"
labelCol=
"1"
/>
</div>
<div
class=
"hg-form-row"
>
<div
class=
"col-xs-4 col-sm-1"
>
<label
class=
"hg-form-label"
>
申请日期起
:
</label>
</div>
<div
class=
"col-xs-4 col-sm-2 col-white-bg"
>
<x:input
name=
"fillinBeginDate"
required=
"false"
wrapper=
"date"
/>
</div>
<div
class=
"col-xs-4 col-sm-1"
>
<label
class=
"hg-form-label"
>
申请日期止
:
</label>
</div>
<div
class=
"col-xs-4 col-sm-2 col-white-bg"
>
<x:input
name=
"fillinEndDate"
label=
"至"
required=
"false"
wrapper=
"date"
/>
</div>
</div>
<div
class=
"hg-form-row"
>
<x:checkboxListC
name=
"statusKind"
label=
"common.field.status"
list=
"statusKindsList"
labelCol=
"1"
fieldCol=
"3"
/>
</div>
</div>
<x:searchButtons/>
<x:searchButtons/>
</form>
</form>
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/purchase/sapZNE1PurchaseDetail.js
View file @
17992933
...
@@ -54,6 +54,19 @@ function initItemGrid() {
...
@@ -54,6 +54,19 @@ function initItemGrid() {
}
}
});
});
},
},
copyHandler
:
{
id
:
'copyHandler'
,
text
:
'复制'
,
img
:
'fa-copy'
,
click
:
function
()
{
var
row
=
itemGridManager
.
getSelectedRow
();
if
(
!
row
)
{
Public
.
tip
(
"请勾选一条数据"
);
return
;
}
var
newRow
=
JSON
.
parse
(
JSON
.
stringify
(
row
));
newRow
.
bnfpo
=
(
itemGridManager
.
getData
().
length
+
1
)
*
10
;
newRow
.
id
=
null
;
UICtrl
.
addGridRow
(
itemGridManager
,
newRow
);
}
}
})
})
itemGridManager
=
UICtrl
.
grid
(
'#maingrid'
,
{
itemGridManager
=
UICtrl
.
grid
(
'#maingrid'
,
{
columns
:
getGridColumns
(),
columns
:
getGridColumns
(),
...
@@ -321,6 +334,10 @@ function getExtendedData(processAction) {
...
@@ -321,6 +334,10 @@ function getExtendedData(processAction) {
if
(
!
datas
)
{
if
(
!
datas
)
{
return
false
;
return
false
;
}
}
if
(
datas
.
length
==
0
){
Public
.
tip
(
"采购项次不能为空"
);
return
false
;
}
extendedData
.
sapPurchaseItems
=
Public
.
encodeJSONURI
(
datas
);
extendedData
.
sapPurchaseItems
=
Public
.
encodeJSONURI
(
datas
);
}
}
return
extendedData
;
return
extendedData
;
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/purchase/sapZNE2PurchaseDetail.js
View file @
17992933
...
@@ -36,16 +36,18 @@ function initAufnr(knttp){
...
@@ -36,16 +36,18 @@ function initAufnr(knttp){
knttp
=
$
(
'#knttp'
).
val
();
knttp
=
$
(
'#knttp'
).
val
();
}
}
var
columns
=
itemGridManager
.
columns
;
var
columns
=
itemGridManager
.
columns
;
//内部订单
columns
.
some
(
column
=>
{
columns
.
some
(
column
=>
{
if
(
column
.
name
==
"aufnr"
){
if
(
column
.
name
==
"aufnr"
){
column
.
hide
=
knttp
==
'F'
?
false
:
true
;
column
.
hide
=
knttp
==
'F'
?
false
:
true
;
if
(
isApplyProcUnit
()){
if
(
typeof
(
getSubProcUnitId
)
==
'function'
&&
"financeNode"
==
getSubProcUnitId
()){
column
.
editor
.
required
=
knttp
==
'F'
?
true
:
false
;
column
.
editor
.
required
=
knttp
==
'F'
?
true
:
false
;
}
}
return
true
;
return
true
;
}
}
return
false
;
return
false
;
})
})
//成本中心
columns
.
some
(
column
=>
{
columns
.
some
(
column
=>
{
if
(
column
.
name
==
"kostlName"
){
if
(
column
.
name
==
"kostlName"
){
//column.hide = knttp == 'F'? false:true;
//column.hide = knttp == 'F'? false:true;
...
@@ -91,7 +93,9 @@ function initItemGrid() {
...
@@ -91,7 +93,9 @@ function initItemGrid() {
pstyp
:
pstyp
,
pstyp
:
pstyp
,
badat
:
fillinDate
,
badat
:
fillinDate
,
erdat
:
fillinDate
,
erdat
:
fillinDate
,
knttp
:
$
(
"#knttp"
).
val
()
knttp
:
$
(
"#knttp"
).
val
(),
ernam
:
$
(
"#personMemberName"
).
val
(),
afnam
:
$
(
"#personMemberName"
).
val
(),
});
});
}
}
},
},
...
@@ -107,6 +111,19 @@ function initItemGrid() {
...
@@ -107,6 +111,19 @@ function initItemGrid() {
}
}
});
});
},
},
copyHandler
:
{
id
:
'copyHandler'
,
text
:
'复制'
,
img
:
'fa-copy'
,
click
:
function
()
{
var
row
=
itemGridManager
.
getSelectedRow
();
if
(
!
row
)
{
Public
.
tip
(
"请勾选一条数据"
);
return
;
}
var
newRow
=
JSON
.
parse
(
JSON
.
stringify
(
row
));
newRow
.
bnfpo
=
(
itemGridManager
.
getData
().
length
+
1
)
*
10
;
newRow
.
id
=
null
;
UICtrl
.
addGridRow
(
itemGridManager
,
newRow
);
}
}
})
})
itemGridManager
=
UICtrl
.
grid
(
'#maingrid'
,
{
itemGridManager
=
UICtrl
.
grid
(
'#maingrid'
,
{
columns
:
getGridColumns
(),
columns
:
getGridColumns
(),
...
@@ -227,6 +244,7 @@ function getGridColumns() {
...
@@ -227,6 +244,7 @@ function getGridColumns() {
//填订单类型是Z01或者Z02的
//填订单类型是Z01或者Z02的
columns
.
push
({
columns
.
push
({
display
:
"订单号"
,
name
:
"aufnr"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
,
display
:
"订单号"
,
name
:
"aufnr"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'text'
,
required
:
true
,}
});
});
columns
.
push
({
columns
.
push
({
display
:
"总账科目"
,
name
:
"sakto"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
display
:
"总账科目"
,
name
:
"sakto"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
...
@@ -463,42 +481,25 @@ function getGridColumns() {
...
@@ -463,42 +481,25 @@ function getGridColumns() {
},);
},);
columns
.
push
({
columns
.
push
({
display
:
"订单号"
,
name
:
"aufnr"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
,
display
:
"订单号"
,
name
:
"aufnr"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'text'
,
required
:
false
,}
});
columns
.
push
({
display
:
"总账科目"
,
name
:
"sakto"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
// editor: {
// editor: {
// required:
fals
e, type: "select",
// required:
tru
e, type: "select",
// data: {
// data: {
// type: 'system',
// type: 'system',
// name: "
getCompanyOrders
",
// name: "
dictionary
",
// getParam: function (item) {
// getParam: function (item) {
// return {
// return {
// BUKRS: '1000'
// fieldName: "SAKTO",
// filterValue:'6600'
// }
// }
// },
// },
// back: {
// back: {
// AUFNR: "aufnr",
// SAKNR:'sakto',
// KTEXT: "ktext"
// }
// }
// },
// },
// }
// }
});
columns
.
push
({
display
:
"总账科目"
,
name
:
"sakto"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
true
,
type
:
"select"
,
data
:
{
type
:
'system'
,
name
:
"dictionary"
,
getParam
:
function
(
item
)
{
return
{
fieldName
:
"SAKTO"
,
filterValue
:
'6600'
}
},
back
:
{
SAKNR
:
'sakto'
,
}
},
}
},);
},);
columns
.
push
({
columns
.
push
({
display
:
"申请日期"
,
name
:
"badat"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
display
:
"申请日期"
,
name
:
"badat"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
...
@@ -531,16 +532,20 @@ function getExtendedData(processAction) {
...
@@ -531,16 +532,20 @@ function getExtendedData(processAction) {
if
(
!
datas
)
{
if
(
!
datas
)
{
return
false
;
return
false
;
}
}
if
(
datas
.
length
==
0
){
Public
.
tip
(
"采购项次不能为空"
);
return
false
;
}
var
checked6
=
false
;
var
checked6
=
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
;
}
}
})
})
if
(
checked6
)
{
//
if (checked6) {
Public
.
tip
(
"订单号不能为空"
)
//
Public.tip("订单号不能为空")
return
false
;
//
return false;
}
//
}
extendedData
.
sapPurchaseItems
=
Public
.
encodeJSONURI
(
datas
);
extendedData
.
sapPurchaseItems
=
Public
.
encodeJSONURI
(
datas
);
}
}
return
extendedData
;
return
extendedData
;
...
...
topsun/src/main/java/com/huigou/topsun/sap/purchase/application/impl/SapPurchaseApplicationImpl.java
View file @
17992933
...
@@ -23,6 +23,7 @@ import com.huigou.topsun.sap.purchase.domain.vo.SapPurchaseVo;
...
@@ -23,6 +23,7 @@ import com.huigou.topsun.sap.purchase.domain.vo.SapPurchaseVo;
import
com.huigou.topsun.sap.purchase.repository.SapPurchaseRepository
;
import
com.huigou.topsun.sap.purchase.repository.SapPurchaseRepository
;
import
com.huigou.topsun.sap.common.domain.SapResult
;
import
com.huigou.topsun.sap.common.domain.SapResult
;
import
com.huigou.topsun.sap.purchaseOrder.domain.SapPurchaseOrder
;
import
com.huigou.topsun.sap.purchaseOrder.domain.SapPurchaseOrder
;
import
com.huigou.topsun.sap.suppliers.domain.SuppliersInfo
;
import
com.huigou.uasp.bmp.common.BizBillStatus
;
import
com.huigou.uasp.bmp.common.BizBillStatus
;
import
com.huigou.uasp.bmp.fn.CodeGenerator
;
import
com.huigou.uasp.bmp.fn.CodeGenerator
;
import
com.huigou.uasp.bmp.operator.OperatorApplication
;
import
com.huigou.uasp.bmp.operator.OperatorApplication
;
...
@@ -32,6 +33,7 @@ import com.huigou.uasp.bpm.ProcessStartModel;
...
@@ -32,6 +33,7 @@ import com.huigou.uasp.bpm.ProcessStartModel;
import
com.huigou.uasp.bpm.engine.application.WorkflowApplication
;
import
com.huigou.uasp.bpm.engine.application.WorkflowApplication
;
import
com.huigou.util.ClassHelper
;
import
com.huigou.util.ClassHelper
;
import
com.huigou.util.Constants
;
import
com.huigou.util.Constants
;
import
com.huigou.util.DateUtil
;
import
com.huigou.util.SDO
;
import
com.huigou.util.SDO
;
import
org.activiti.engine.delegate.DelegateExecution
;
import
org.activiti.engine.delegate.DelegateExecution
;
import
org.activiti.engine.delegate.DelegateTask
;
import
org.activiti.engine.delegate.DelegateTask
;
...
@@ -91,6 +93,36 @@ public class SapPurchaseApplicationImpl extends FlowBroker implements SapPurchas
...
@@ -91,6 +93,36 @@ public class SapPurchaseApplicationImpl extends FlowBroker implements SapPurchas
}
}
/**
* 设置任务名称
*/
@Override
protected
void
setTaskDescription
(
DelegateTask
delegateTask
)
{
String
bizId
=
delegateTask
.
getExecution
().
getProcessBusinessKey
();
delegateTask
.
setDescription
(
this
.
getApprovalSubjectName
(
bizId
));
}
/**
* 获取任务标题
*
* @param bizId
* @return
*/
private
String
getApprovalSubjectName
(
String
bizId
)
{
SapPurchase
sapPurchase
=
this
.
sapPurchaseRepository
.
findOne
(
bizId
);
//查询 单据日期
String
fillinDateStr
=
DateUtil
.
getDateFormat
(
"yyyy-MM-dd HH:mm:ss"
,
sapPurchase
.
getFillinDate
());
//设置标题
switch
(
sapPurchase
.
getBsart
()){
case
"ZNE1"
:
//固定资产采购申请
return
String
.
format
(
"%s-%s(%s)"
,
"固定资产采购申请"
,
""
,
fillinDateStr
);
case
"ZFW"
:
//服务类采购申请
return
String
.
format
(
"%s-%s(%s)"
,
"服务类采购申请"
,
""
,
fillinDateStr
);
case
"ZNE2"
:
//非资产类消耗性采购申请
return
String
.
format
(
"%s-%s(%s)"
,
"非资产类消耗性采购申请"
,
""
,
fillinDateStr
);
}
return
null
;
}
@Override
@Override
protected
Map
<
String
,
Object
>
getProcessBizParams
(
String
bizId
)
{
protected
Map
<
String
,
Object
>
getProcessBizParams
(
String
bizId
)
{
...
...
topsun/src/main/java/com/huigou/topsun/sap/purchase/controller/SapPurchaseController.java
View file @
17992933
...
@@ -2,6 +2,7 @@ package com.huigou.topsun.sap.purchase.controller;
...
@@ -2,6 +2,7 @@ package com.huigou.topsun.sap.purchase.controller;
import
com.huigou.context.Operator
;
import
com.huigou.context.Operator
;
import
com.huigou.context.OrgUnit
;
import
com.huigou.context.OrgUnit
;
import
com.huigou.topsun.common.BillStatus
;
import
com.huigou.topsun.demo.application.LeaveApplication
;
import
com.huigou.topsun.demo.application.LeaveApplication
;
import
com.huigou.topsun.demo.domain.model.Leave
;
import
com.huigou.topsun.demo.domain.model.Leave
;
import
com.huigou.topsun.sap.purchase.application.SapPurchaseApplication
;
import
com.huigou.topsun.sap.purchase.application.SapPurchaseApplication
;
...
@@ -33,6 +34,7 @@ public class SapPurchaseController extends CommonController {
...
@@ -33,6 +34,7 @@ public class SapPurchaseController extends CommonController {
private
SapPurchaseApplication
sapPurchaseApplication
;
private
SapPurchaseApplication
sapPurchaseApplication
;
public
String
forwardSapPurchaseList
(){
public
String
forwardSapPurchaseList
(){
this
.
putAttribute
(
"statusKindsList"
,
BillStatus
.
getValidMap
());
return
forward
(
"sapPurchaseList"
);
return
forward
(
"sapPurchaseList"
);
}
}
...
...
topsun/src/main/java/com/huigou/topsun/sap/purchase/domain/query/SapPurchaseQueryRequest.java
View file @
17992933
...
@@ -3,6 +3,8 @@ package com.huigou.topsun.sap.purchase.domain.query;
...
@@ -3,6 +3,8 @@ package com.huigou.topsun.sap.purchase.domain.query;
import
com.huigou.data.domain.query.QueryAbstractRequest
;
import
com.huigou.data.domain.query.QueryAbstractRequest
;
import
lombok.Data
;
import
lombok.Data
;
import
java.util.Date
;
/**
/**
* @Auther: xin.lu
* @Auther: xin.lu
* @Date: 2023/12/27/10:45
* @Date: 2023/12/27/10:45
...
@@ -23,4 +25,10 @@ public class SapPurchaseQueryRequest extends QueryAbstractRequest {
...
@@ -23,4 +25,10 @@ public class SapPurchaseQueryRequest extends QueryAbstractRequest {
* 采购申请编号
* 采购申请编号
*/
*/
private
String
banfn
;
private
String
banfn
;
protected
Date
fillinBeginDate
;
protected
Date
fillinEndDate
;
private
String
statusKind
;
}
}
topsun/src/main/resources/config/topsun/sap/sapPurchase/sapPurchase.xml
View file @
17992933
...
@@ -5,6 +5,10 @@
...
@@ -5,6 +5,10 @@
select t.* from sap_purchase t
select t.* from sap_purchase t
</sql-query>
</sql-query>
<condition
column=
"bill_code"
name=
"billCode"
type=
"java.lang.String"
symbol=
"like"
alias=
"t"
/>
<condition
column=
"bill_code"
name=
"billCode"
type=
"java.lang.String"
symbol=
"like"
alias=
"t"
/>
<condition
column=
"banfn"
name=
"banfn"
type=
"java.lang.String"
symbol=
"like"
alias=
"t"
/>
<condition
column=
"status"
name=
"statusKind"
type=
"java.lang.Integer"
symbol=
"in"
alias=
"t"
/>
<condition
column=
"fillin_date"
name=
"fillinBeginDate"
type=
"java.util.Date"
symbol=
">="
alias=
"t"
/>
<condition
column=
"fillin_date"
name=
"fillinEndDate"
type=
"java.util.Date"
symbol=
"<="
alias=
"t"
/>
</query>
</query>
</query-mappings>
</query-mappings>
\ No newline at end of file
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