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
8ddb1e20
Commit
8ddb1e20
authored
Mar 30, 2024
by
鲁鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
采购申请优化;质量信息记录优化
parent
b33f1ed6
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
235 additions
and
117 deletions
+235
-117
jquery.combox.js
huigou-xt/src/main/webapp/lib/jquery/jquery.combox.js
+3
-0
sapPurchaseDetail.js
.../main/webapp/biz/topsun/sap/purchase/sapPurchaseDetail.js
+215
-109
SapPurchaseApprovalController.java
...aseApproval/controller/SapPurchaseApprovalController.java
+2
-0
SapQualityInfoRecordApplicationImpl.java
...application/impl/SapQualityInfoRecordApplicationImpl.java
+9
-3
SuppliersDataApplicationImpl.java
...pliers/application/impl/SuppliersDataApplicationImpl.java
+6
-5
No files found.
huigou-xt/src/main/webapp/lib/jquery/jquery.combox.js
View file @
8ddb1e20
...
...
@@ -1576,6 +1576,9 @@
opts
.
onChange
.
call
(
this
,
values
,{});
}
}
if
(
$
.
isFunction
(
opts
.
beforeChange
)){
//原始数据作为参数回调
opts
.
beforeChange
.
call
(
this
,
values
)
}
if
(
opts
.
checkbox
&&
this
.
selectDataMap
){
this
.
selectDataMap
.
clear
();
}
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/purchase/sapPurchaseDetail.js
View file @
8ddb1e20
var
itemGridManager
=
null
,
pstyp
=
" "
,
fillinDate
=
""
,
ZEBKN_NUM
=
0
;
var
itemGridManager
=
null
,
pstyp
=
" "
,
fillinDate
=
""
,
bsart
=
""
;
$
(
function
()
{
initItemGrid
();
bindEvent
();
bsart
=
$
(
"#bsart"
).
val
();
});
function
bindEvent
()
{
$
(
"#bsart"
).
combox
({
onChange
:
function
(
data
){
if
(
"ZFW"
==
data
.
value
){
$
(
"#bsart"
).
combox
({
onChange
:
function
(
data
)
{
if
(
"ZFW"
==
data
.
value
)
{
pstyp
=
"D"
;
}
else
{
}
else
{
pstyp
=
""
;
}
bsart
=
data
.
value
;
}
})
...
...
@@ -20,10 +23,15 @@ function bindEvent() {
function
initItemGrid
()
{
var
toolbarOptions
=
UICtrl
.
getDefaultToolbarOptions
({
addHandler
:
function
(){
UICtrl
.
addGridRow
(
itemGridManager
,{
bnfpo
:
(
itemGridManager
.
getData
().
length
+
1
)
*
10
,
pstyp
:
pstyp
,
badat
:
fillinDate
,
erdat
:
fillinDate
});
addHandler
:
function
()
{
UICtrl
.
addGridRow
(
itemGridManager
,
{
bnfpo
:
(
itemGridManager
.
getData
().
length
+
1
)
*
10
,
pstyp
:
pstyp
,
badat
:
fillinDate
,
erdat
:
fillinDate
});
},
deleteHandler
:
function
(){
deleteHandler
:
function
()
{
var
_grid
=
UICtrl
.
getGridManager
(
'#maingrid'
);
DataUtil
.
delSelectedRows
({
action
:
'sapPurchaseItem/deleteSapPurchaseItem.ajax'
,
...
...
@@ -36,11 +44,11 @@ function initItemGrid() {
});
},
});
itemGridManager
=
UICtrl
.
grid
(
'#maingrid'
,
{
itemGridManager
=
UICtrl
.
grid
(
'#maingrid'
,
{
columns
:
getGridColumns
(),
dataAction
:
'server'
,
url
:
web_app
.
name
+
'/sapPurchaseItem/querySapPurchaseItems.ajax'
,
parms
:
{
sapPurchaseId
:
getId
()},
parms
:
{
sapPurchaseId
:
getId
()},
height
:
'95%'
,
heightDiff
:
-
4
,
sortName
:
'id'
,
...
...
@@ -51,24 +59,40 @@ function initItemGrid() {
enabledEdit
:
true
,
fixedCellHeight
:
true
,
selectRowButtonOnly
:
true
,
autoApplyNextEditor
:
false
,
autoApplyNextEditor
:
false
,
toolbar
:
toolbarOptions
,
onBeforeEdit
:
function
(
editParm
)
{
var
c
=
editParm
.
column
,
data
=
editParm
.
record
;
//仅适用于KNTTP=K时
if
(
data
.
knttp
!==
"K"
&&
c
.
name
===
'kostl'
)
{
//非资产类消耗性采购申请类型当“科目分配类型”选择K后“物料编号”字段调整为非必须输入项;“成本中心”、“总账科目”字段调整为必须输入项。订单号不可编辑。
if
(
"ZNE2"
==
bsart
&&
(
data
.
knttp
==
"K"
||
data
.
knttp
==
"F"
)
&&
c
.
name
===
'kostl'
)
{
return
true
;
}
else
{
return
false
;
}
//仅适用于KNTTP=F时
if
(
data
.
knttp
!==
"F"
&&
c
.
name
===
'aufnr'
)
{
if
((
"ZFW"
==
bsart
||
"ZNE2"
==
bsart
)
&&
data
.
knttp
==
"F"
&&
c
.
name
===
'aufnr'
)
{
return
true
;
}
else
{
return
false
;
}
//仅适用于KNTTP=A时
// 仅适用于KNTTP=A时
if
(
data
.
knttp
!==
'A'
&&
(
c
.
name
===
'anln1'
||
c
.
name
===
'anln2'
)){
if
(
data
.
knttp
==
'A'
&&
c
.
name
===
'anln1'
)
{
return
true
;
}
else
{
return
false
;
}
},
onAfterEdit
:
function
(
editParm
)
{
if
(
editParm
.
record
.
knttp
===
"K"
)
{
var
colums
=
itemGridManager
.
columns
;
colums
.
forEach
(
colum
=>
{
if
(
colum
.
name
==
"matnr"
)
{
colum
.
editor
.
required
=
false
;
itemGridManager
.
columns
=
colums
}
})
}
}
}
);
UICtrl
.
setSearchAreaToggle
(
itemGridManager
);
...
...
@@ -77,13 +101,15 @@ function initItemGrid() {
function
getGridColumns
()
{
var
columns
=
[];
columns
=
[
{
display
:
"申购项次号"
,
name
:
"bnfpo"
,
width
:
"80"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'spinner'
,
min
:
10
,
max
:
200
,
mask
:
'nnn'
}
{
display
:
"申购项次号"
,
name
:
"bnfpo"
,
width
:
"80"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'spinner'
,
min
:
10
,
max
:
200
,
mask
:
'nnn'
}
},
{
display
:
"项次类别"
,
name
:
"pstyp"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
},
{
display
:
"科目分配类别"
,
name
:
"knttp"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
{
display
:
"项次类别"
,
name
:
"pstyp"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
hide
:
true
},
{
display
:
"科目分配类别"
,
name
:
"knttp"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
fals
e
,
type
:
"select"
,
required
:
tru
e
,
type
:
"select"
,
data
:
{
type
:
'system'
,
name
:
"knttp"
,
...
...
@@ -94,10 +120,10 @@ function getGridColumns() {
knttp
:
"knttp"
}
},
onChange
()
{}
}
},
{
display
:
"工厂"
,
name
:
"werks"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
{
display
:
"工厂"
,
name
:
"werks"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
true
,
type
:
"select"
,
data
:
{
...
...
@@ -109,22 +135,25 @@ function getGridColumns() {
back
:
{
WERKS
:
"werks"
,
NAME1
:
"name1"
}
},
},
}
},
{
display
:
"工厂名称"
,
name
:
"name1"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
,
{
display
:
"工厂名称"
,
name
:
"name1"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
false
,
type
:
"text"
}
},
{
display
:
"物料编号"
,
name
:
"matnr"
,
width
:
"300"
,
align
:
"left"
,
type
:
"string"
,
{
display
:
"物料编号"
,
name
:
"matnr"
,
width
:
"300"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
tru
e
,
type
:
"select"
,
required
:
fals
e
,
type
:
"select"
,
data
:
{
type
:
'system'
,
name
:
"sapMaterialSelect"
,
getParam
:
function
(
item
)
{
return
{
filterValue
:
item
.
werks
filterValue
:
item
.
werks
}
},
back
:
{
...
...
@@ -143,7 +172,8 @@ function getGridColumns() {
},
}
},
{
display
:
"库存地点"
,
name
:
"lgort"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
{
display
:
"库存地点"
,
name
:
"lgort"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
false
,
type
:
"select"
,
data
:
{
...
...
@@ -159,13 +189,16 @@ function getGridColumns() {
},
}
},
{
display
:
"库存地点名称"
,
name
:
"lgobe"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
,
{
display
:
"库存地点名称"
,
name
:
"lgobe"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
,
//editor: {required: false, type: "text"}
},
{
display
:
"短文本"
,
name
:
"txz01"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
,
{
display
:
"短文本"
,
name
:
"txz01"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
true
,
type
:
"text"
}
},
{
display
:
"物料组"
,
name
:
"matkl"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
{
display
:
"物料组"
,
name
:
"matkl"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
true
,
type
:
"select"
,
data
:
{
...
...
@@ -180,10 +213,12 @@ function getGridColumns() {
},
}
},
{
display
:
"申购数量"
,
name
:
"menge"
,
width
:
150
,
minWidth
:
60
,
type
:
"string"
,
align
:
"center"
,
editor
:
{
required
:
true
,
type
:
"text"
,
mask
:
'9999999.999'
}
{
display
:
"申购数量"
,
name
:
"menge"
,
width
:
150
,
minWidth
:
60
,
type
:
"string"
,
align
:
"center"
,
editor
:
{
required
:
true
,
type
:
"text"
,
mask
:
'9999999.999'
}
},
{
display
:
"申购数量单位"
,
name
:
"meins"
,
width
:
150
,
minWidth
:
60
,
type
:
"string"
,
align
:
"center"
,
{
display
:
"申购数量单位"
,
name
:
"meins"
,
width
:
150
,
minWidth
:
60
,
type
:
"string"
,
align
:
"center"
,
/*editor: {
required: false, type: "select",
data: {
...
...
@@ -199,7 +234,8 @@ function getGridColumns() {
}*/
editor
:
{
required
:
true
,
type
:
"text"
}
},
{
display
:
"采购组"
,
name
:
"ekgrp"
,
width
:
150
,
minWidth
:
60
,
type
:
"string"
,
align
:
"center"
,
{
display
:
"采购组"
,
name
:
"ekgrp"
,
width
:
150
,
minWidth
:
60
,
type
:
"string"
,
align
:
"center"
,
editor
:
{
required
:
true
,
type
:
"select"
,
data
:
{
...
...
@@ -214,59 +250,62 @@ function getGridColumns() {
},
}
},
{
display
:
"申请日期"
,
name
:
"badat"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
false
,
type
:
"date"
}
},
{
display
:
"创建日期"
,
name
:
"erdat"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
{
display
:
"批准日期"
,
name
:
"frgdt"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
//editor: {required: false, type: "date"}
},
{
display
:
"批准日期"
,
name
:
"frgdt"
,
width
:
"80"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
false
,
type
:
"date"
}
},
{
display
:
"要求交货日期"
,
name
:
"lfdat"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
{
display
:
"要求交货日期"
,
name
:
"lfdat"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
true
,
type
:
"date"
}
},
{
display
:
"服务主数据编号"
,
name
:
"srvpos"
,
width
:
"80"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'text'
,
required
:
false
},
},
{
display
:
"服务短文本"
,
name
:
"ktext1"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
},
{
display
:
"服务条目数量"
,
name
:
"esllMenge"
,
width
:
"80"
,
align
:
"left"
,
type
:
"string"
,
//editor: {type: 'text', mask: '9999999.999'},
render
:
function
(
item
){
return
item
.
esllMenge
=
item
.
menge
;
}
},
{
display
:
"服务计量单位"
,
name
:
"esllMeins"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
"text"
,
required
:
false
,}
},
{
display
:
'定价基数'
,
name
:
"peinh"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
//editor: {required: true, type: "select"}
render
:
function
(
item
){
return
item
.
peinh
=
item
.
preis
;
}
},
{
display
:
"服务预估单价"
,
name
:
"brtwr"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'text'
,
mask
:
'9999999.99'
}
},
{
display
:
"服务预估金额"
,
name
:
"netwr"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
render
:
function
(
item
){
if
(
item
.
brtwr
==
''
||
item
.
brtwr
==
null
||
item
.
peinh
==
''
||
item
.
peinh
==
null
){
return
item
.
netwr
=
0
;
}
return
item
.
netwr
=
(
item
.
brtwr
*
item
.
esllMenge
/
item
.
peinh
).
toFixed
(
2
);
}
},
//
{display: "服务主数据编号", name: "srvpos", width: "80", align: "left", type: "string",
//
editor: {type: 'text', required: false},
//
},
//
{display: "服务短文本", name: "ktext1", width: "100", align: "left", type: "string"},
//
{display: "服务条目数量", name: "esllMenge", width: "80", align: "left", type: "string",
//
//editor: {type: 'text', mask: '9999999.999'},
//
render:function(item){
//
return item.esllMenge=item.menge;
//
}
//
},
//
{display: "服务计量单位", name: "esllMeins", width: "100", align: "left", type: "string",
//
editor: {type: "text", required: false,}
//
},
//
{display: '定价基数', name: "peinh", width: "100", align: "left", type: "string",
//
//editor: {required: true, type: "select"}
//
render:function(item){
//
return item.peinh=item.preis;
//
}
//
},
//
{display: "服务预估单价", name: "brtwr", width: "100", align: "left", type: "string",
//
editor: {type: 'text', mask: '9999999.99'}
//
},
//
{display: "服务预估金额", name: "netwr", width: "100", align: "left", type: "string",
//
render:function(item){
//
if (item.brtwr == '' || item.brtwr == null || item.peinh == '' || item.peinh == null){
//
return item.netwr=0;
//
}
//
return item.netwr=(item.brtwr*item.esllMenge/item.peinh).toFixed(2);
//
}
//
},
{
display
:
"创建者"
,
name
:
"ernam"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
},
{
display
:
"申请人"
,
name
:
"afnam"
,
width
:
"90"
,
align
:
"left"
,
type
:
"string"
,
{
display
:
"申请人"
,
name
:
"afnam"
,
width
:
"90"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'text'
,
required
:
false
},
},
{
display
:
"评估价格"
,
name
:
"preis"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'text'
,
mask
:
'9999999.99'
,
required
:
true
}
{
display
:
"预估单价"
,
name
:
"preis"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'text'
,
mask
:
'9999999.99'
,
required
:
true
}
},
{
display
:
"价格基数"
,
name
:
"ebanPeinh"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'text'
,
mask
:
'9999999'
,
required
:
false
}
{
display
:
"价格基数"
,
name
:
"ebanPeinh"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
//editor: {type: 'text', mask: '9999999',required: false}
render
:
function
(
item
)
{
return
item
.
ebanPeinh
=
1
;
}
},
{
display
:
"币种"
,
name
:
"waers"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
{
display
:
"币种"
,
name
:
"waers"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
false
,
type
:
"text"
,
/*data: {
...
...
@@ -281,49 +320,54 @@ function getGridColumns() {
},*/
}
},
{
display
:
"评估金额"
,
name
:
"ebanNetwr"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
render
:
function
(
item
){
if
(
item
.
ebanPeinh
==
''
){
return
item
.
ebanNetwr
=
null
;
{
display
:
"评估金额"
,
name
:
"ebanNetwr"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
render
:
function
(
item
)
{
if
(
item
.
ebanPeinh
==
''
)
{
return
item
.
ebanNetwr
=
null
;
}
return
item
.
ebanNetwr
=
(
item
.
preis
*
item
.
menge
/
item
.
ebanPeinh
).
toFixed
(
2
);
return
item
.
ebanNetwr
=
(
item
.
preis
*
item
.
menge
/
item
.
ebanPeinh
).
toFixed
(
2
);
}
//editor: {type: 'text'}
},
{
display
:
"会计分配序号"
,
name
:
"zebkn"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
{
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;
// }
render
:
function
(
item
)
{
//申购项次为消耗性采购时,从1开始步长为1自动编号,最大99
// if (item.knttp != ''){
// ZEBKN_NUM = ZEBKN_NUM + 1;
// }
return
item
.
zebkn
=
item
.
menge
;
}
},
{
display
:
"多重科目分配"
,
name
:
"vrtkz"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
{
display
:
"多重科目分配"
,
name
:
"vrtkz"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
//editor: {type: 'text'},
render
:
function
(
item
)
{
render
:
function
(
item
)
{
//资产消耗性申购,若申请数量大于1,此处不能为空,必须选择1
if
(
item
.
knttp
==
"A"
&&
item
.
menge
>
1
){
if
(
item
.
knttp
==
"A"
&&
item
.
menge
>
1
)
{
return
item
.
vrtkz
=
1
;
}
}
},
{
display
:
"部分发票"
,
name
:
"twrkz"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
{
display
:
"部分发票"
,
name
:
"twrkz"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'text'
},
render
:
function
(
item
)
{
render
:
function
(
item
)
{
//资产消耗性申购,若申请数量大于1,此处不能为空,必须选择1
if
(
item
.
knttp
==
"A"
&&
item
.
menge
>
1
){
if
(
item
.
knttp
==
"A"
&&
item
.
menge
>
1
)
{
return
item
.
twrkz
=
1
;
}
}
},
{
display
:
"PR分解数量"
,
name
:
"ekbnMenge"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
{
display
:
"PR分解数量"
,
name
:
"ekbnMenge"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'text'
}
},
{
display
:
"总账科目"
,
name
:
"sakto"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'text'
,
required
:
true
}
editor
:
{
type
:
'text'
,
required
:
true
}
},
{
display
:
"成本中心"
,
name
:
"kostl"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
,
...
...
@@ -362,7 +406,7 @@ function getGridColumns() {
}
},
{
display
:
"
主资产
号"
,
name
:
"anln1"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
,
display
:
"
资产编
号"
,
name
:
"anln1"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
false
,
type
:
"select"
,
data
:
{
...
...
@@ -380,13 +424,21 @@ function getGridColumns() {
},
}
},
// {
// display: "子资产号", name: "anln2", width: "100", align: "left", type: "string",
// editor: {type: 'text'}
// },
{
display
:
"
子资产号"
,
name
:
"anln2
"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
display
:
"
审批处理状态"
,
name
:
"banpr
"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'text'
}
},
{
display
:
"审批处理状态"
,
name
:
"banpr"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'text'
}
display
:
"申请日期"
,
name
:
"badat"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
false
,
type
:
"date"
}
},
{
display
:
"创建日期"
,
name
:
"erdat"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
//editor: {required: false, type: "date"}
},
]
return
columns
;
...
...
@@ -399,7 +451,7 @@ function getExtendedData(processAction) {
||
processAction
==
ProcessAction
.
REPLENISH
||
processAction
==
ProcessAction
.
TRANSMIT
)
{
//不验证
$
(
'#submitForm'
).
attr
(
'check'
,
fals
e
);
$
(
'#submitForm'
).
attr
(
'check'
,
tru
e
);
}
var
extendedData
=
{};
var
_grid
=
UICtrl
.
getGridManager
(
'#maingrid'
);
...
...
@@ -411,12 +463,66 @@ function getExtendedData(processAction) {
if
(
!
datas
)
{
return
false
;
}
datas
.
forEach
(
data
=>
{
if
(
data
.
pstyp
===
"D"
&&
Public
.
isBlank
(
data
.
srvpos
)){
var
checked1
=
false
;
var
checked2
=
false
;
var
checked3
=
false
;
var
checked4
=
false
;
var
checked5
=
false
;
var
checked6
=
false
;
datas
.
forEach
(
data
=>
{
if
(
data
.
pstyp
===
"D"
&&
Public
.
isBlank
(
data
.
srvpos
))
{
Public
.
tip
(
"项次类别等于D时,服务主数据编号必须输入"
)
return
false
;
}
//选择固定资产采购申请类型时,“科目分配类别”、“申请人”、“币种”、“资产编号” 调整为必须输入项
if
(
"ZNE1"
===
bsart
)
{
if
(
Public
.
isBlank
(
data
.
afnam
))
{
checked1
=
true
;
}
if
(
Public
.
isBlank
(
data
.
waers
))
{
checked2
=
true
;
}
if
(
Public
.
isBlank
(
data
.
anln1
))
{
checked3
=
true
;
}
}
if
((
"ZFW"
==
bsart
||
"ZNE2"
==
bsart
)
){
if
(
Public
.
isBlank
(
data
.
sakto
)){
checked4
=
true
;
}
if
(
Public
.
isBlank
(
data
.
kostl
)){
checked5
=
true
;
}
if
(
"F"
==
data
.
knttp
&&
Public
.
isBlank
(
data
.
aufnr
)){
checked6
=
true
;
}
}
})
if
(
checked1
)
{
Public
.
tip
(
"申请人不能为空"
)
return
false
;
}
if
(
checked2
)
{
Public
.
tip
(
"币种不能为空"
)
return
false
;
}
if
(
checked3
)
{
Public
.
tip
(
"资产编号不能为空"
)
return
false
;
}
if
(
checked4
)
{
Public
.
tip
(
"总账科目不能为空"
)
return
false
;
}
if
(
checked5
)
{
Public
.
tip
(
"成本中心不能为空"
)
return
false
;
}
if
(
checked6
)
{
Public
.
tip
(
"订单号不能为空"
)
return
false
;
}
extendedData
.
sapPurchaseItems
=
Public
.
encodeJSONURI
(
datas
);
}
return
extendedData
;
...
...
@@ -428,7 +534,7 @@ function getId() {
function
setId
(
value
)
{
$
(
"#id"
).
val
(
value
);
var
_grid
=
UICtrl
.
getGridManager
(
'#maingrid'
);
var
_grid
=
UICtrl
.
getGridManager
(
'#maingrid'
);
_grid
.
options
.
parms
.
sapPurchaseId
=
value
;
}
...
...
@@ -436,7 +542,7 @@ function reloadGrid() {
itemGridManager
.
loadData
();
}
function
getGridData
(){
function
getGridData
()
{
var
_grid
=
UICtrl
.
getGridManager
(
'#maingrid'
);
var
datas
=
DataUtil
.
getGridData
({
gridManager
:
_grid
,
...
...
@@ -445,9 +551,9 @@ function getGridData(){
return
datas
;
}
function
getBsartNum
(){
function
getBsartNum
()
{
var
datas
=
this
.
getGridData
();
datas
.
forEach
(
data
=>
{
datas
.
forEach
(
data
=>
{
})
}
...
...
topsun/src/main/java/com/huigou/topsun/sap/purchaseApproval/controller/SapPurchaseApprovalController.java
View file @
8ddb1e20
...
...
@@ -48,12 +48,14 @@ public class SapPurchaseApprovalController extends CommonController {
HashMap
<
String
,
Object
>
messageMap
=
new
HashMap
<>();
messageMap
.
put
(
"Message_Status"
,
"S"
);
messageMap
.
put
(
"Message_Text"
,
"成功"
);
messageMap
.
put
(
"NUMBER"
,
sapPurchaseApprovalDto
.
getLsDeader
().
getBanfn
());
LOG
.
info
(
"SAP采购申请审批数据=={}"
,
sapPurchaseApprovalDto
);
try
{
this
.
sapPurchaseApprovalApplication
.
saveSapPurchaseApprovalVo
(
sapPurchaseApprovalDto
);
}
catch
(
RuntimeException
e
){
messageMap
.
put
(
"Message_Status"
,
"E"
);
messageMap
.
put
(
"Message_Text"
,
e
);
messageMap
.
put
(
"NUMBER"
,
sapPurchaseApprovalDto
.
getLsDeader
().
getBanfn
());
}
return
messageMap
;
}
...
...
topsun/src/main/java/com/huigou/topsun/sap/qualityInfoRecord/application/impl/SapQualityInfoRecordApplicationImpl.java
View file @
8ddb1e20
...
...
@@ -154,9 +154,15 @@ public class SapQualityInfoRecordApplicationImpl extends FlowBroker implements S
purchaseInfoRecordItemList
.
forEach
(
sapQualityInfoRecordItem
->
{
SapQualityInfoRecordItemVo
sapQualityInfoRecordItemVo
=
new
SapQualityInfoRecordItemVo
();
BeanUtil
.
copyProperties
(
sapQualityInfoRecordItem
,
sapQualityInfoRecordItemVo
);
sapQualityInfoRecordItem
.
setZqavfn3
(
"M1"
);
sapQualityInfoRecordItem
.
setZvfnc3
(
"A"
);
sapQualityInfoRecordItem
.
setZqafst
(
"11"
);
// sapQualityInfoRecordItem.setZqavfn3("M1");
// sapQualityInfoRecordItem.setZvfnc3("A");
// sapQualityInfoRecordItem.setZqafst("11");
if
(
"0"
.
equals
(
sapQualityInfoRecordItemVo
.
getGrsrq
())){
sapQualityInfoRecordItemVo
.
setGrsrq
(
""
);
}
if
(
"0"
.
equals
(
sapQualityInfoRecordItemVo
.
getFscrq
())){
sapQualityInfoRecordItemVo
.
setFscrq
(
""
);
}
SimpleDateFormat
dateFormat
=
new
SimpleDateFormat
(
"yyyyMMdd"
);
if
(
sapQualityInfoRecordItem
.
getGrscertdatai
()
!=
null
){
String
datab
=
dateFormat
.
format
(
sapQualityInfoRecordItem
.
getGrscertdatai
());
...
...
topsun/src/main/java/com/huigou/topsun/sap/suppliers/application/impl/SuppliersDataApplicationImpl.java
View file @
8ddb1e20
...
...
@@ -11,6 +11,7 @@ import com.huigou.data.query.model.QueryDescriptor;
import
com.huigou.data.query.model.QueryModel
;
import
com.huigou.topsun.sap.common.DefaultHttpClient
;
import
com.huigou.topsun.sap.common.application.SapMutualEpLogApplication
;
import
com.huigou.topsun.sap.common.domain.SapResult
;
import
com.huigou.topsun.sap.costReimbursement.domain.SapCostReimbursement
;
import
com.huigou.topsun.sap.suppliers.application.SuppliersDataApplication
;
import
com.huigou.topsun.sap.suppliers.domain.*
;
...
...
@@ -353,16 +354,16 @@ public class SuppliersDataApplicationImpl extends FlowBroker implements Supplier
suppliersInfoVos
.
add
(
suppliersInfoVo
);
try
{
String
result
=
defaultHttpClient
.
execute
(
suppliersInfoVos
,
url
);
List
<
Map
<
String
,
Object
>>
resultList
=
objectMapper
.
readValue
(
result
,
new
TypeReference
<
List
<
Map
<
String
,
Object
>
>>()
{
List
<
SapResult
>
sapResultList
=
objectMapper
.
readValue
(
result
,
new
TypeReference
<
List
<
SapResult
>>()
{
});
resultMap
=
r
esultList
.
get
(
0
);
SapResult
sapResult
=
sapR
esultList
.
get
(
0
);
resultMap
.
put
(
"sequence"
,
resultMap
.
get
(
"row"
));
sapMutualEpLogApplication
.
saveSapMutualEpLog
(
resultMap
);
if
(
"S"
.
equals
(
resultMap
.
get
(
"TYPE"
)))
{
suppliersInfo
.
setPartner
(
(
String
)
resultMap
.
get
(
"MESSAGE_V1"
));
if
(
"S"
.
equals
(
sapResult
.
getTYPE
(
)))
{
suppliersInfo
.
setPartner
(
sapResult
.
getMESSAGE_V1
(
));
suppliersInfoRepository
.
save
(
suppliersInfo
);
}
else
{
throw
new
RuntimeException
(
"数据传输失败,请稍后手动重试!"
+
resultMap
.
get
(
"MESSAGE"
));
throw
new
RuntimeException
(
"数据传输失败,请稍后手动重试!"
+
sapResult
.
getMESSAGE
(
));
}
}
catch
(
Exception
e
)
{
resultMap
.
put
(
"type"
,
"E"
);
...
...
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