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
57fe48c0
Commit
57fe48c0
authored
Mar 31, 2024
by
刘学辉
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
8da7ccbf
9b7d97b1
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
671 additions
and
241 deletions
+671
-241
jquery.combox.js
huigou-xt/src/main/webapp/lib/jquery/jquery.combox.js
+3
-0
choosePurchaseDetail.jsp
...n/webapp/biz/topsun/sap/purchase/choosePurchaseDetail.jsp
+20
-0
sapPurchaseDetail.js
.../main/webapp/biz/topsun/sap/purchase/sapPurchaseDetail.js
+174
-211
sapPurchaseDetail.jsp
...main/webapp/biz/topsun/sap/purchase/sapPurchaseDetail.jsp
+1
-1
sapPurchaseList.js
...rc/main/webapp/biz/topsun/sap/purchase/sapPurchaseList.js
+16
-18
sapZNE1PurchaseDetail.js
...n/webapp/biz/topsun/sap/purchase/sapZNE1PurchaseDetail.js
+377
-0
sapZNE1PurchaseDetail.jsp
.../webapp/biz/topsun/sap/purchase/sapZNE1PurchaseDetail.jsp
+38
-0
purchaseInfoRecordDetail.js
...topsun/sap/purchaseInfoRecord/purchaseInfoRecordDetail.js
+1
-1
SapPurchaseController.java
...topsun/sap/purchase/controller/SapPurchaseController.java
+24
-2
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 @
57fe48c0
...
@@ -1576,6 +1576,9 @@
...
@@ -1576,6 +1576,9 @@
opts
.
onChange
.
call
(
this
,
values
,{});
opts
.
onChange
.
call
(
this
,
values
,{});
}
}
}
}
if
(
$
.
isFunction
(
opts
.
beforeChange
)){
//原始数据作为参数回调
opts
.
beforeChange
.
call
(
this
,
values
)
}
if
(
opts
.
checkbox
&&
this
.
selectDataMap
){
if
(
opts
.
checkbox
&&
this
.
selectDataMap
){
this
.
selectDataMap
.
clear
();
this
.
selectDataMap
.
clear
();
}
}
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/purchase/choosePurchaseDetail.jsp
0 → 100644
View file @
57fe48c0
<%--采购申请--%>
<%@ page
contentType=
"text/html; charset=utf-8"
language=
"java"
%>
<%@ taglib
uri=
"/WEB-INF/taglib.tld"
prefix=
"x"
%>
<%@ taglib
uri=
"http://java.sun.com/jsp/jstl/core"
prefix=
"c"
%>
<html>
<head>
<x:base
include=
"layout,dialog,grid,tree,dateTime,combox,attachment,commonTree,comboDialog"
/>
</head>
<body>
<div
class=
"container-fluid"
>
<x:billTitle
title=
"请选择采购申请PR类型"
needStatus=
"true"
needPerson=
"true"
/>
<form
class=
"hg-form"
method=
"post"
action=
""
id=
"submitForm"
>
<div
class=
"hg-form-cols"
>
<div
class=
"hg-form-row"
>
<x:selectC
name=
"bsart"
label=
"pr类型"
labelCol=
"4"
fieldCol=
"8"
required=
"true"
/>
</div>
</div>
</form>
</div>
</body>
\ No newline at end of file
topsun-xt/src/main/webapp/biz/topsun/sap/purchase/sapPurchaseDetail.js
View file @
57fe48c0
var
itemGridManager
=
null
,
pstyp
=
" "
,
fillinDate
=
""
,
ZEBKN_NUM
=
0
;
var
itemGridManager
=
null
,
pstyp
=
" "
,
fillinDate
=
""
,
bsart
=
""
;
$
(
function
()
{
$
(
function
()
{
init
ItemGrid
();
init
ializeCommonUI
();
bindEvent
();
bindEvent
();
initItemGrid
();
});
});
function
initializeCommonUI
()
{
bsart
=
$
(
"#bsart"
).
val
();
if
(
"ZFW"
==
bsart
)
{
pstyp
=
"D"
;
}
else
{
pstyp
=
""
;
}
}
function
bindEvent
()
{
function
bindEvent
()
{
$
(
"#bsart"
).
combox
({
onChange
:
function
(
data
){
if
(
"ZFW"
==
data
.
value
){
pstyp
=
"D"
;
}
else
{
pstyp
=
""
;
}
}
})
fillinDate
=
$
(
"#fillinDate"
).
val
();
fillinDate
=
$
(
"#fillinDate"
).
val
();
}
}
function
initItemGrid
()
{
function
initItemGrid
()
{
var
toolbarOptions
=
UICtrl
.
getDefaultToolbarOptions
({
var
toolbar
=
UICtrl
.
getDefaultToolbarOptions
({
addHandler
:
function
(){
addHandler
:
function
()
{
UICtrl
.
addGridRow
(
itemGridManager
,{
bnfpo
:
(
itemGridManager
.
getData
().
length
+
1
)
*
10
,
pstyp
:
pstyp
,
badat
:
fillinDate
,
erdat
:
fillinDate
});
UICtrl
.
addGridRow
(
itemGridManager
,
{
bnfpo
:
(
itemGridManager
.
getData
().
length
+
1
)
*
10
,
pstyp
:
pstyp
,
badat
:
fillinDate
,
erdat
:
fillinDate
});
},
},
deleteHandler
:
function
(){
deleteHandler
:
function
()
{
var
_grid
=
UICtrl
.
getGridManager
(
'#maingrid'
);
var
_grid
=
UICtrl
.
getGridManager
(
'#maingrid'
);
DataUtil
.
delSelectedRows
({
DataUtil
.
delSelectedRows
({
action
:
'sapPurchaseItem/deleteSapPurchaseItem.ajax'
,
action
:
'sapPurchaseItem/deleteSapPurchaseItem.ajax'
,
...
@@ -35,12 +39,12 @@ function initItemGrid() {
...
@@ -35,12 +39,12 @@ function initItemGrid() {
}
}
});
});
},
},
})
;
})
itemGridManager
=
UICtrl
.
grid
(
'#maingrid'
,
{
itemGridManager
=
UICtrl
.
grid
(
'#maingrid'
,
{
columns
:
getGridColumns
(),
columns
:
getGridColumns
(),
dataAction
:
'server'
,
dataAction
:
'server'
,
url
:
web_app
.
name
+
'/sapPurchaseItem/querySapPurchaseItems.ajax'
,
url
:
web_app
.
name
+
'/sapPurchaseItem/querySapPurchaseItems.ajax'
,
parms
:
{
sapPurchaseId
:
getId
()},
parms
:
{
sapPurchaseId
:
getId
()},
height
:
'95%'
,
height
:
'95%'
,
heightDiff
:
-
4
,
heightDiff
:
-
4
,
sortName
:
'id'
,
sortName
:
'id'
,
...
@@ -51,24 +55,40 @@ function initItemGrid() {
...
@@ -51,24 +55,40 @@ function initItemGrid() {
enabledEdit
:
true
,
enabledEdit
:
true
,
fixedCellHeight
:
true
,
fixedCellHeight
:
true
,
selectRowButtonOnly
:
true
,
selectRowButtonOnly
:
true
,
autoApplyNextEditor
:
false
,
autoApplyNextEditor
:
false
,
toolbar
:
toolbar
Options
,
toolbar
:
toolbar
,
onBeforeEdit
:
function
(
editParm
)
{
onBeforeEdit
:
function
(
editParm
)
{
var
c
=
editParm
.
column
,
data
=
editParm
.
record
;
// var c = editParm.column, data = editParm.record;
//仅适用于KNTTP=K时
// //非资产类消耗性采购申请类型当“科目分配类型”选择K后“物料编号”字段调整为非必须输入项;“成本中心”、“总账科目”字段调整为必须输入项。订单号不可编辑。
if
(
data
.
knttp
!==
"K"
&&
c
.
name
===
'kostl'
)
{
// if ("ZNE2" == bsart && (data.knttp == "K"|| data.knttp == "F" ) && c.name === 'kostl') {
return
false
;
// return true;
}
// }else {
//仅适用于KNTTP=F时
// return false;
if
(
data
.
knttp
!==
"F"
&&
c
.
name
===
'aufnr'
)
{
// }
return
false
;
// //仅适用于KNTTP=F时
}
// if (("ZFW" == bsart || "ZNE2" == bsart) && data.knttp == "F" && c.name === 'aufnr') {
//仅适用于KNTTP=A时
// return true;
// 仅适用于KNTTP=A时
// }else {
if
(
data
.
knttp
!==
'A'
&&
(
c
.
name
===
'anln1'
||
c
.
name
===
'anln2'
)){
// return false;
return
false
;
// }
}
// //仅适用于KNTTP=A时
// 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
);
UICtrl
.
setSearchAreaToggle
(
itemGridManager
);
...
@@ -76,14 +96,15 @@ function initItemGrid() {
...
@@ -76,14 +96,15 @@ function initItemGrid() {
function
getGridColumns
()
{
function
getGridColumns
()
{
var
columns
=
[];
var
columns
=
[];
columns
=
[
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'
}
},
},);
{
display
:
"项次类别"
,
name
:
"pstyp"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
},
columns
.
push
({
display
:
"项次类别"
,
name
:
"pstyp"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
hide
:
true
},);
{
display
:
"科目分配类别"
,
name
:
"knttp"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
columns
.
push
({
display
:
"科目分配类别"
,
name
:
"knttp"
,
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
:
"knttp"
,
name
:
"knttp"
,
...
@@ -94,10 +115,10 @@ function getGridColumns() {
...
@@ -94,10 +115,10 @@ function getGridColumns() {
knttp
:
"knttp"
knttp
:
"knttp"
}
}
},
},
onChange
()
{}
}
}
},
},);
{
display
:
"工厂"
,
name
:
"werks"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
columns
.
push
({
display
:
"工厂"
,
name
:
"werks"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
editor
:
{
required
:
true
,
type
:
"select"
,
required
:
true
,
type
:
"select"
,
data
:
{
data
:
{
...
@@ -109,41 +130,17 @@ function getGridColumns() {
...
@@ -109,41 +130,17 @@ function getGridColumns() {
back
:
{
back
:
{
WERKS
:
"werks"
,
WERKS
:
"werks"
,
NAME1
:
"name1"
NAME1
:
"name1"
}
},
}
},
{
display
:
"工厂名称"
,
name
:
"name1"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
false
,
type
:
"text"
}
},
{
display
:
"物料编号"
,
name
:
"matnr"
,
width
:
"300"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
true
,
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"
}
},
},
}
}
},
},);
{
display
:
"库存地点"
,
name
:
"lgort"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
columns
.
push
({
display
:
"工厂名称"
,
name
:
"name1"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
false
,
type
:
"text"
}
});
columns
.
push
({
display
:
"库存地点"
,
name
:
"lgort"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
editor
:
{
required
:
false
,
type
:
"select"
,
required
:
false
,
type
:
"select"
,
data
:
{
data
:
{
...
@@ -158,14 +155,17 @@ function getGridColumns() {
...
@@ -158,14 +155,17 @@ function getGridColumns() {
}
}
},
},
}
}
},
},);
{
display
:
"库存地点名称"
,
name
:
"lgobe"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
,
columns
.
push
({
display
:
"库存地点名称"
,
name
:
"lgobe"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
,
//editor: {required: false, type: "text"}
//editor: {required: false, type: "text"}
},
},);
{
display
:
"短文本"
,
name
:
"txz01"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
,
columns
.
push
({
display
:
"短文本"
,
name
:
"txz01"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
true
,
type
:
"text"
}
editor
:
{
required
:
true
,
type
:
"text"
}
},
},);
{
display
:
"物料组"
,
name
:
"matkl"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
columns
.
push
({
display
:
"物料组"
,
name
:
"matkl"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
editor
:
{
required
:
true
,
type
:
"select"
,
required
:
true
,
type
:
"select"
,
data
:
{
data
:
{
...
@@ -179,11 +179,13 @@ function getGridColumns() {
...
@@ -179,11 +179,13 @@ function getGridColumns() {
}
}
},
},
}
}
},
},);
{
display
:
"申购数量"
,
name
:
"menge"
,
width
:
150
,
minWidth
:
60
,
type
:
"string"
,
align
:
"center"
,
columns
.
push
({
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"
,
},);
columns
.
push
({
display
:
"申购数量单位"
,
name
:
"meins"
,
width
:
150
,
minWidth
:
60
,
type
:
"string"
,
align
:
"center"
,
/*editor: {
/*editor: {
required: false, type: "select",
required: false, type: "select",
data: {
data: {
...
@@ -198,8 +200,9 @@ function getGridColumns() {
...
@@ -198,8 +200,9 @@ function getGridColumns() {
},
},
}*/
}*/
editor
:
{
required
:
true
,
type
:
"text"
}
editor
:
{
required
:
true
,
type
:
"text"
}
},
},);
{
display
:
"采购组"
,
name
:
"ekgrp"
,
width
:
150
,
minWidth
:
60
,
type
:
"string"
,
align
:
"center"
,
columns
.
push
({
display
:
"采购组"
,
name
:
"ekgrp"
,
width
:
150
,
minWidth
:
60
,
type
:
"string"
,
align
:
"center"
,
editor
:
{
editor
:
{
required
:
true
,
type
:
"select"
,
required
:
true
,
type
:
"select"
,
data
:
{
data
:
{
...
@@ -213,60 +216,33 @@ function getGridColumns() {
...
@@ -213,60 +216,33 @@ function getGridColumns() {
}
}
},
},
}
}
},
},);
{
display
:
"申请日期"
,
name
:
"badat"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
columns
.
push
({
editor
:
{
required
:
false
,
type
:
"date"
}
display
:
"批准日期"
,
name
:
"frgdt"
,
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"}
},
},);
{
display
:
"批准日期"
,
name
:
"frgdt"
,
width
:
"80"
,
align
:
"left"
,
type
:
"string"
,
columns
.
push
({
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"
}
editor
:
{
required
:
true
,
type
:
"date"
}
},
},);
{
display
:
"服务主数据编号"
,
name
:
"srvpos"
,
width
:
"80"
,
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"
,
editor
:
{
type
:
'text'
,
required
:
false
},
editor
:
{
type
:
'text'
,
required
:
false
},
},
},);
{
display
:
"服务短文本"
,
name
:
"ktext1"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
},
columns
.
push
({
{
display
:
"服务条目数量"
,
name
:
"esllMenge"
,
width
:
"80"
,
align
:
"left"
,
type
:
"string"
,
display
:
"预估单价"
,
name
:
"preis"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
//editor: {type: 'text', mask: '9999999.999'},
editor
:
{
type
:
'text'
,
mask
:
'9999999.99'
,
required
:
true
}
render
:
function
(
item
){
},);
return
item
.
esllMenge
=
item
.
menge
;
columns
.
push
({
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
:
"esllMeins"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
columns
.
push
({
editor
:
{
type
:
"text"
,
required
:
false
,}
display
:
"币种"
,
name
:
"waers"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
},
{
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"
,
editor
:
{
type
:
'text'
,
required
:
false
},
},
{
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
:
"waers"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
editor
:
{
required
:
false
,
type
:
"text"
,
required
:
false
,
type
:
"text"
,
/*data: {
/*data: {
...
@@ -280,55 +256,60 @@ function getGridColumns() {
...
@@ -280,55 +256,60 @@ function getGridColumns() {
}
}
},*/
},*/
}
}
},
},);
{
display
:
"评估金额"
,
name
:
"ebanNetwr"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
columns
.
push
({
render
:
function
(
item
){
display
:
"评估金额"
,
name
:
"ebanNetwr"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
if
(
item
.
ebanPeinh
==
''
){
render
:
function
(
item
)
{
return
item
.
ebanNetwr
=
null
;
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'}
//editor: {type: 'text'}
},
},);
{
display
:
"会计分配序号"
,
name
:
"zebkn"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
columns
.
push
({
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
;
}
}
},
},);
{
display
:
"多重科目分配"
,
name
:
"vrtkz"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
columns
.
push
({
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
;
}
}
}
}
},
},);
{
display
:
"部分发票"
,
name
:
"twrkz"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
columns
.
push
({
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
;
}
}
}
}
},
},);
{
display
:
"PR分解数量"
,
name
:
"ekbnMenge"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
columns
.
push
({
display
:
"PR分解数量"
,
name
:
"ekbnMenge"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'text'
}
editor
:
{
type
:
'text'
}
},
},
);
{
columns
.
push
(
{
display
:
"总账科目"
,
name
:
"sakto"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
display
:
"总账科目"
,
name
:
"sakto"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'text'
,
required
:
true
}
editor
:
{
type
:
'text'
,
required
:
true
}
},
},
);
{
columns
.
push
(
{
display
:
"成本中心"
,
name
:
"kostl"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
,
display
:
"成本中心"
,
name
:
"kostl"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
editor
:
{
required
:
fals
e
,
type
:
"select"
,
required
:
tru
e
,
type
:
"select"
,
data
:
{
data
:
{
type
:
'system'
,
type
:
'system'
,
name
:
"dictionary"
,
name
:
"dictionary"
,
...
@@ -340,8 +321,8 @@ function getGridColumns() {
...
@@ -340,8 +321,8 @@ function getGridColumns() {
}
}
},
},
}
}
},
},
);
{
columns
.
push
(
{
display
:
"订单号"
,
name
:
"aufnr"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
,
display
:
"订单号"
,
name
:
"aufnr"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
,
//editor: {type: 'text'}
//editor: {type: 'text'}
editor
:
{
editor
:
{
...
@@ -360,35 +341,19 @@ function getGridColumns() {
...
@@ -360,35 +341,19 @@ function getGridColumns() {
}
}
},
},
}
}
},
});
{
columns
.
push
({
display
:
"主资产号"
,
name
:
"anln1"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
false
,
type
:
"select"
,
data
:
{
type
:
'system'
,
name
:
"dictionary"
,
getParam
:
function
(
item
)
{
return
{
fieldName
:
"ANLN1"
,
filterValue
:
'1000'
}
},
back
:
{
ANLN1
:
"anln1"
}
},
}
},
{
display
:
"子资产号"
,
name
:
"anln2"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'text'
}
},
{
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
:
"badat"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
false
,
type
:
"date"
}
},);
columns
.
push
({
display
:
"创建日期"
,
name
:
"erdat"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
//editor: {required: false, type: "date"}
},);
return
columns
;
return
columns
;
}
}
...
@@ -399,7 +364,7 @@ function getExtendedData(processAction) {
...
@@ -399,7 +364,7 @@ function getExtendedData(processAction) {
||
processAction
==
ProcessAction
.
REPLENISH
||
processAction
==
ProcessAction
.
REPLENISH
||
processAction
==
ProcessAction
.
TRANSMIT
)
{
||
processAction
==
ProcessAction
.
TRANSMIT
)
{
//不验证
//不验证
$
(
'#submitForm'
).
attr
(
'check'
,
fals
e
);
$
(
'#submitForm'
).
attr
(
'check'
,
tru
e
);
}
}
var
extendedData
=
{};
var
extendedData
=
{};
var
_grid
=
UICtrl
.
getGridManager
(
'#maingrid'
);
var
_grid
=
UICtrl
.
getGridManager
(
'#maingrid'
);
...
@@ -411,12 +376,16 @@ function getExtendedData(processAction) {
...
@@ -411,12 +376,16 @@ function getExtendedData(processAction) {
if
(
!
datas
)
{
if
(
!
datas
)
{
return
false
;
return
false
;
}
}
datas
.
forEach
(
data
=>
{
var
checked6
=
false
;
if
(
data
.
pstyp
===
"D"
&&
Public
.
isBlank
(
data
.
srvpos
))
{
datas
.
forEach
(
data
=>
{
Public
.
tip
(
"项次类别等于D时,服务主数据编号必须输入"
)
if
(
"F"
==
data
.
knttp
&&
Public
.
isBlank
(
data
.
aufnr
)){
return
fals
e
;
checked6
=
tru
e
;
}
}
})
})
if
(
checked6
)
{
Public
.
tip
(
"订单号不能为空"
)
return
false
;
}
extendedData
.
sapPurchaseItems
=
Public
.
encodeJSONURI
(
datas
);
extendedData
.
sapPurchaseItems
=
Public
.
encodeJSONURI
(
datas
);
}
}
return
extendedData
;
return
extendedData
;
...
@@ -428,7 +397,7 @@ function getId() {
...
@@ -428,7 +397,7 @@ function getId() {
function
setId
(
value
)
{
function
setId
(
value
)
{
$
(
"#id"
).
val
(
value
);
$
(
"#id"
).
val
(
value
);
var
_grid
=
UICtrl
.
getGridManager
(
'#maingrid'
);
var
_grid
=
UICtrl
.
getGridManager
(
'#maingrid'
);
_grid
.
options
.
parms
.
sapPurchaseId
=
value
;
_grid
.
options
.
parms
.
sapPurchaseId
=
value
;
}
}
...
@@ -436,7 +405,7 @@ function reloadGrid() {
...
@@ -436,7 +405,7 @@ function reloadGrid() {
itemGridManager
.
loadData
();
itemGridManager
.
loadData
();
}
}
function
getGridData
(){
function
getGridData
()
{
var
_grid
=
UICtrl
.
getGridManager
(
'#maingrid'
);
var
_grid
=
UICtrl
.
getGridManager
(
'#maingrid'
);
var
datas
=
DataUtil
.
getGridData
({
var
datas
=
DataUtil
.
getGridData
({
gridManager
:
_grid
,
gridManager
:
_grid
,
...
@@ -445,10 +414,4 @@ function getGridData(){
...
@@ -445,10 +414,4 @@ function getGridData(){
return
datas
;
return
datas
;
}
}
function
getBsartNum
(){
var
datas
=
this
.
getGridData
();
datas
.
forEach
(
data
=>
{
})
}
topsun-xt/src/main/webapp/biz/topsun/sap/purchase/sapPurchaseDetail.jsp
View file @
57fe48c0
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
<x:hidden
name=
"frgdt"
/>
<x:hidden
name=
"frgdt"
/>
<div
class=
"hg-form-cols"
>
<div
class=
"hg-form-cols"
>
<div
class=
"hg-form-row"
>
<div
class=
"hg-form-row"
>
<x:selectC
name=
"bsart"
label=
"pr类型"
labelCol=
"1"
fieldCol=
"2"
required=
"true"
/>
<x:selectC
name=
"bsart"
label=
"pr类型"
disabled=
"true"
labelCol=
"1"
fieldCol=
"2"
required=
"true"
/>
<x:inputC
name=
"banfn"
label=
"采购申请编号"
readonly=
"true"
labelCol=
"1"
fieldCol=
"2"
required=
"false"
/>
<x:inputC
name=
"banfn"
label=
"采购申请编号"
readonly=
"true"
labelCol=
"1"
fieldCol=
"2"
required=
"false"
/>
</div>
</div>
</div>
</div>
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/purchase/sapPurchaseList.js
View file @
57fe48c0
...
@@ -47,7 +47,7 @@ function initPurchaseListGrid() {
...
@@ -47,7 +47,7 @@ function initPurchaseListGrid() {
}
}
,
,
onDblClickRow
:
function
(
data
,
rowindex
,
rowobj
)
{
onDblClickRow
:
function
(
data
,
rowindex
,
rowobj
)
{
viewHandler
(
data
.
parentI
d
);
viewHandler
(
data
.
i
d
);
},
},
onAfterShowData
:
function
(
currentData
)
{
onAfterShowData
:
function
(
currentData
)
{
...
@@ -63,39 +63,37 @@ function initPurchaseListGrid() {
...
@@ -63,39 +63,37 @@ function initPurchaseListGrid() {
* @param parentId 采购申请id
* @param parentId 采购申请id
* @returns {boolean}
* @returns {boolean}
*/
*/
function
viewHandler
(
parentI
d
)
{
function
viewHandler
(
i
d
)
{
if
(
!
parentI
d
)
{
if
(
!
i
d
)
{
var
row
=
DataUtil
.
getSelectedRow
(
purchaseGridManager
);
var
row
=
DataUtil
.
getSelectedRow
(
purchaseGridManager
);
if
(
!
row
)
{
if
(
!
row
)
{
return
row
;
return
row
;
}
}
parentId
=
row
.
parentI
d
;
id
=
row
.
i
d
;
}
}
UICtrl
.
addTabItem
({
UICtrl
.
addTabItem
({
tabid
:
'viewPurchase'
+
parentI
d
,
tabid
:
'viewPurchase'
+
i
d
,
text
:
'查看采购申请'
,
text
:
'查看采购申请'
,
url
:
web_app
.
name
+
'/
purchase/loadPurchaseDetail.do?isReadOnly=true&id='
+
parentI
d
url
:
web_app
.
name
+
'/
sapPurchase/showSapPurchaseDetail.do?isReadOnly=true&bizId='
+
i
d
});
});
}
}
function
updateHandler
()
{
//添加按钮
var
row
=
DataUtil
.
getSelectedRow
(
purchaseGridManager
);
function
addHandler
()
{
if
(
!
row
)
{
UICtrl
.
showAjaxDialog
({
return
;
title
:
'新增'
,
}
width
:
400
,
UICtrl
.
addTabItem
({
url
:
web_app
.
name
+
'/sapPurchase/choosePurchaseDetail.load'
,
tabid
:
'updatePurchase'
+
row
.
parentId
,
ok
:
insertHandler
text
:
'修改采购申请'
,
url
:
web_app
.
name
+
'/purchase/loadPurchaseDetail.do?id='
+
row
.
parentId
});
});
}
}
function
addHandler
()
{
function
insertHandler
()
{
var
bsart
=
$
(
"#bsart"
).
val
();
UICtrl
.
addTabItem
({
UICtrl
.
addTabItem
({
tabid
:
'addPurchase'
,
tabid
:
'addPurchase'
,
text
:
'新增采购申请'
,
text
:
'新增采购申请'
,
url
:
web_app
.
name
+
'/sapPurchase/forwardSapPurchaseDetail.job
'
url
:
web_app
.
name
+
'/sapPurchase/forwardSapPurchaseDetail.job
?bsart='
+
bsart
});
});
}
}
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/purchase/sapZNE1PurchaseDetail.js
0 → 100644
View file @
57fe48c0
var
itemGridManager
=
null
,
pstyp
=
" "
,
fillinDate
=
""
,
bsart
=
""
;
$
(
function
()
{
initializeCommonUI
();
bindEvent
();
initItemGrid
();
});
function
initializeCommonUI
()
{
bsart
=
$
(
"#bsart"
).
val
();
if
(
"ZFW"
==
bsart
)
{
pstyp
=
"D"
;
}
else
{
pstyp
=
""
;
}
}
function
bindEvent
()
{
fillinDate
=
$
(
"#fillinDate"
).
val
();
}
function
initItemGrid
()
{
var
toolbar
=
UICtrl
.
getDefaultToolbarOptions
({
addHandler
:
function
()
{
UICtrl
.
addGridRow
(
itemGridManager
,
{
bnfpo
:
(
itemGridManager
.
getData
().
length
+
1
)
*
10
,
pstyp
:
pstyp
,
badat
:
fillinDate
,
erdat
:
fillinDate
});
},
deleteHandler
:
function
()
{
var
_grid
=
UICtrl
.
getGridManager
(
'#maingrid'
);
DataUtil
.
delSelectedRows
({
action
:
'sapPurchaseItem/deleteSapPurchaseItem.ajax'
,
param
:
{},
gridManager
:
_grid
,
idFieldName
:
'id'
,
onSuccess
:
function
()
{
reloadGrid
();
}
});
},
})
itemGridManager
=
UICtrl
.
grid
(
'#maingrid'
,
{
columns
:
getGridColumns
(),
dataAction
:
'server'
,
url
:
web_app
.
name
+
'/sapPurchaseItem/querySapPurchaseItems.ajax'
,
parms
:
{
sapPurchaseId
:
getId
()},
height
:
'95%'
,
heightDiff
:
-
4
,
sortName
:
'id'
,
sortOrder
:
'asc'
,
checkbox
:
true
,
usePager
:
true
,
rownumbers
:
true
,
enabledEdit
:
true
,
fixedCellHeight
:
true
,
selectRowButtonOnly
:
true
,
autoApplyNextEditor
:
false
,
toolbar
:
toolbar
,
onBeforeEdit
:
function
(
editParm
)
{
// var c = editParm.column, data = editParm.record;
// //非资产类消耗性采购申请类型当“科目分配类型”选择K后“物料编号”字段调整为非必须输入项;“成本中心”、“总账科目”字段调整为必须输入项。订单号不可编辑。
// if ("ZNE2" == bsart && (data.knttp == "K"|| data.knttp == "F" ) && c.name === 'kostl') {
// return true;
// }else {
// return false;
// }
// //仅适用于KNTTP=F时
// if (("ZFW" == bsart || "ZNE2" == bsart) && data.knttp == "F" && c.name === 'aufnr') {
// return true;
// }else {
// return false;
// }
// //仅适用于KNTTP=A时
// 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
);
}
function
getGridColumns
()
{
var
columns
=
[];
columns
.
push
({
display
:
"申购项次号"
,
name
:
"bnfpo"
,
width
:
"80"
,
align
:
"left"
,
type
:
"string"
,
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
:
{
required
:
true
,
type
:
"select"
,
data
:
{
type
:
'system'
,
name
:
"dictionary"
,
getParam
:
function
(
item
)
{
return
{
fieldName
:
"WERKS"
}
},
back
:
{
WERKS
:
"werks"
,
NAME1
:
"name1"
},
},
}
},);
columns
.
push
({
display
:
"工厂名称"
,
name
:
"name1"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
false
,
type
:
"text"
}
});
columns
.
push
({
display
:
"库存地点"
,
name
:
"lgort"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
false
,
type
:
"select"
,
data
:
{
type
:
'system'
,
name
:
"dictionary"
,
getParam
:
function
(
item
)
{
return
{
fieldName
:
"LGORT"
}
},
back
:
{
LGORT
:
"lgort"
,
LGOBE
:
"lgobe"
}
},
}
},);
columns
.
push
({
display
:
"库存地点名称"
,
name
:
"lgobe"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
,
//editor: {required: false, type: "text"}
},);
columns
.
push
({
display
:
"短文本"
,
name
:
"txz01"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
true
,
type
:
"text"
}
},);
columns
.
push
({
display
:
"物料组"
,
name
:
"matkl"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
true
,
type
:
"select"
,
data
:
{
type
:
'system'
,
name
:
"dictionary"
,
getParam
:
function
(
item
)
{
return
{
fieldName
:
"MATKL"
}
},
back
:
{
MATKL
:
"matkl"
}
},
}
},);
columns
.
push
({
display
:
"申购数量"
,
name
:
"menge"
,
width
:
150
,
minWidth
:
60
,
type
:
"string"
,
align
:
"center"
,
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",
data: {
type: 'system',
name: "dictionary",
getParam: function (item) {
return {paramValue: "MEINS"}
},
back: {
MEINS: "meins"
}
},
}*/
editor
:
{
required
:
true
,
type
:
"text"
}
},);
columns
.
push
({
display
:
"采购组"
,
name
:
"ekgrp"
,
width
:
150
,
minWidth
:
60
,
type
:
"string"
,
align
:
"center"
,
editor
:
{
required
:
true
,
type
:
"select"
,
data
:
{
type
:
'system'
,
name
:
"dictionary"
,
getParam
:
function
(
item
)
{
return
{
fieldName
:
"EKGRP"
}
},
back
:
{
EKGRP
:
"ekgrp"
}
},
}
},);
columns
.
push
({
display
:
"批准日期"
,
name
:
"frgdt"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
//editor: {required: false, type: "date"}
},);
columns
.
push
({
display
:
"要求交货日期"
,
name
:
"lfdat"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
true
,
type
:
"date"
}
},);
columns
.
push
({
display
:
"创建者"
,
name
:
"ernam"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
},);
columns
.
push
({
display
:
"申请人"
,
name
:
"afnam"
,
width
:
"90"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'text'
,
required
:
true
},
},);
columns
.
push
({
display
:
"预估单价"
,
name
:
"preis"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
type
:
'text'
,
mask
:
'9999999.99'
,
required
:
true
}
},);
columns
.
push
({
display
:
"价格基数"
,
name
:
"ebanPeinh"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
//editor: {type: 'text', mask: '9999999',required: false}
render
:
function
(
item
)
{
return
item
.
ebanPeinh
=
1
;
}
},);
columns
.
push
({
display
:
"币种"
,
name
:
"waers"
,
width
:
"100"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
true
,
type
:
"text"
,
/*data: {
type: 'system',
name: "dictionary",
getParam: function (item) {
return {fieldName: "WAERS"}
},
back: {
WAERS: "waers"
}
},*/
}
},);
columns
.
push
({
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
);
}
//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
}
},);
columns
.
push
({
display
:
"资产编号"
,
name
:
"anln1"
,
width
:
"200"
,
align
:
"left"
,
type
:
"string"
,
editor
:
{
required
:
true
,
type
:
"select"
,
data
:
{
type
:
'system'
,
name
:
"dictionary"
,
getParam
:
function
(
item
)
{
return
{
fieldName
:
"ANLN1"
,
filterValue
:
'1000'
}
},
back
:
{
ANLN1
:
"anln1"
}
},
}
},);
return
columns
;
}
//获取数据保存的参数
function
getExtendedData
(
processAction
)
{
//回退、打回、转交时,不需要验证必填项是否已经填写;
if
(
processAction
==
ProcessAction
.
BACK
||
processAction
==
ProcessAction
.
REPLENISH
||
processAction
==
ProcessAction
.
TRANSMIT
)
{
//不验证
$
(
'#submitForm'
).
attr
(
'check'
,
true
);
}
var
extendedData
=
{};
var
_grid
=
UICtrl
.
getGridManager
(
'#maingrid'
);
if
(
_grid
)
{
var
datas
=
DataUtil
.
getGridData
({
gridManager
:
_grid
,
isAllData
:
true
});
if
(
!
datas
)
{
return
false
;
}
extendedData
.
sapPurchaseItems
=
Public
.
encodeJSONURI
(
datas
);
}
return
extendedData
;
}
function
getId
()
{
return
$
(
'#id'
).
val
();
}
function
setId
(
value
)
{
$
(
"#id"
).
val
(
value
);
var
_grid
=
UICtrl
.
getGridManager
(
'#maingrid'
);
_grid
.
options
.
parms
.
sapPurchaseId
=
value
;
}
function
reloadGrid
()
{
itemGridManager
.
loadData
();
}
function
getGridData
()
{
var
_grid
=
UICtrl
.
getGridManager
(
'#maingrid'
);
var
datas
=
DataUtil
.
getGridData
({
gridManager
:
_grid
,
isAllData
:
true
});
return
datas
;
}
topsun-xt/src/main/webapp/biz/topsun/sap/purchase/sapZNE1PurchaseDetail.jsp
0 → 100644
View file @
57fe48c0
<%--采购申请--%>
<%@ page
contentType=
"text/html; charset=utf-8"
language=
"java"
%>
<%@ taglib
uri=
"/WEB-INF/taglib.tld"
prefix=
"x"
%>
<%@ taglib
uri=
"http://java.sun.com/jsp/jstl/core"
prefix=
"c"
%>
<html>
<head>
<x:base
include=
"layout,dialog,grid,tree,dateTime,combox,attachment,commonTree,comboDialog"
/>
<x:script
src=
"/biz/topsun/sap/purchase/sapZNE1PurchaseDetail.js"
/>
</head>
<body>
<div
class=
"container-fluid"
>
<x:billTitle
title=
"采购申请"
needStatus=
"true"
needPerson=
"true"
/>
<form
class=
"hg-form"
method=
"post"
action=
""
id=
"submitForm"
>
<x:hidden
name=
"id"
/>
<x:hidden
name=
"version"
/>
<x:hidden
name=
"billCode"
/>
<x:hidden
name=
"fillinDate"
/>
<x:hidden
name=
"fullId"
/>
<x:hidden
name=
"organId"
/>
<x:hidden
name=
"organName"
/>
<x:hidden
name=
"deptId"
/>
<x:hidden
name=
"deptName"
/>
<x:hidden
name=
"positionId"
/>
<x:hidden
name=
"positionName"
/>
<x:hidden
name=
"personMemberId"
/>
<x:hidden
name=
"personMemberName"
/>
<x:hidden
name=
"statusId"
/>
<x:hidden
name=
"frgdt"
/>
<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=
"banfn"
label=
"采购申请编号"
readonly=
"true"
labelCol=
"1"
fieldCol=
"2"
required=
"false"
/>
</div>
</div>
<div
id=
"maingrid"
></div>
</form>
</div>
</body>
\ No newline at end of file
topsun-xt/src/main/webapp/biz/topsun/sap/purchaseInfoRecord/purchaseInfoRecordDetail.js
View file @
57fe48c0
...
@@ -47,7 +47,7 @@ function initItemGrid() {
...
@@ -47,7 +47,7 @@ function initItemGrid() {
if
(
Public
.
isNotBlank
(
editParma
.
record
.
matnr
)
&&
editParma
.
column
.
name
==
'matklName'
){
if
(
Public
.
isNotBlank
(
editParma
.
record
.
matnr
)
&&
editParma
.
column
.
name
==
'matklName'
){
return
false
;
return
false
;
}
}
if
(
Public
.
isNotBlank
(
editParma
.
record
.
matklName
)
&&
editParma
.
column
.
name
==
'matnr'
){
if
(
Public
.
isNotBlank
(
editParma
.
record
.
matklName
)
&&
Public
.
isBlank
(
editParma
.
record
.
maktx
)
&&
editParma
.
column
.
name
==
'matnr'
){
return
false
;
return
false
;
}
}
...
...
topsun/src/main/java/com/huigou/topsun/sap/purchase/controller/SapPurchaseController.java
View file @
57fe48c0
...
@@ -43,25 +43,47 @@ public class SapPurchaseController extends CommonController {
...
@@ -43,25 +43,47 @@ public class SapPurchaseController extends CommonController {
return
toResult
(
map
);
return
toResult
(
map
);
}
}
public
String
choosePurchaseDetail
(){
return
forward
(
"choosePurchaseDetail"
);
}
public
String
forwardSapPurchaseDetail
(){
public
String
forwardSapPurchaseDetail
(){
this
.
putAttribute
(
"processDefinitionKey"
,
SapPurchaseApplication
.
PROCESS_DEFINITION_KEY
);
this
.
putAttribute
(
"processDefinitionKey"
,
SapPurchaseApplication
.
PROCESS_DEFINITION_KEY
);
// 新增的时候procUnitId一定要设置成Apply,不然jsp页面的所有表单元素是readonly状态
// 新增的时候procUnitId一定要设置成Apply,不然jsp页面的所有表单元素是readonly状态
this
.
putAttribute
(
"procUnitId"
,
"Apply"
);
this
.
putAttribute
(
"procUnitId"
,
"Apply"
);
String
bsart
=
getSDO
().
getString
(
"bsart"
);
SapPurchase
sapPurchase
=
new
SapPurchase
();
SapPurchase
sapPurchase
=
new
SapPurchase
();
sapPurchase
.
setBsart
(
bsart
);
sapPurchase
.
setStatusId
(
BizBillStatus
.
APPLYING
.
getId
());
sapPurchase
.
setStatusId
(
BizBillStatus
.
APPLYING
.
getId
());
/**
/**
* 设置jsp页面初始化填充数据,如果不设置, 那么在jsp页面上填写完表单之后立即提交申请TaskDescription获取不到时间和相关人员信息
* 设置jsp页面初始化填充数据,如果不设置, 那么在jsp页面上填写完表单之后立即提交申请TaskDescription获取不到时间和相关人员信息
*/
*/
Operator
operator
=
getOperator
();
Operator
operator
=
getOperator
();
sapPurchase
.
setDefaultValues
(
new
OrgUnit
(
operator
.
getFullId
(),
operator
.
getFullName
()));
sapPurchase
.
setDefaultValues
(
new
OrgUnit
(
operator
.
getFullId
(),
operator
.
getFullName
()));
return
forward
(
"sapPurchaseDetail"
,
sapPurchase
);
switch
(
bsart
){
case
"ZNE1"
:
return
forward
(
"sapZNE1PurchaseDetail"
,
sapPurchase
);
case
"ZFW"
:
return
forward
(
"sapPurchaseDetail"
,
sapPurchase
);
case
"ZNE2"
:
return
forward
(
"sapPurchaseDetail"
,
sapPurchase
);
}
return
null
;
}
}
public
String
showSapPurchaseDetail
(){
public
String
showSapPurchaseDetail
(){
SDO
sdo
=
this
.
getSDO
();
SDO
sdo
=
this
.
getSDO
();
String
id
=
sdo
.
getBizId
();
String
id
=
sdo
.
getBizId
();
SapPurchase
sapPurchase
=
sapPurchaseApplication
.
loadSapPurchase
(
id
);
SapPurchase
sapPurchase
=
sapPurchaseApplication
.
loadSapPurchase
(
id
);
return
forward
(
"sapPurchaseDetail"
,
sapPurchase
);
switch
(
sapPurchase
.
getBsart
()){
case
"ZNE1"
:
return
forward
(
"sapZNE1PurchaseDetail"
,
sapPurchase
);
case
"ZFW"
:
return
forward
(
"sapPurchaseDetail"
,
sapPurchase
);
case
"ZNE2"
:
return
forward
(
"sapPurchaseDetail"
,
sapPurchase
);
}
return
null
;
}
}
}
}
topsun/src/main/java/com/huigou/topsun/sap/purchaseApproval/controller/SapPurchaseApprovalController.java
View file @
57fe48c0
...
@@ -48,12 +48,14 @@ public class SapPurchaseApprovalController extends CommonController {
...
@@ -48,12 +48,14 @@ public class SapPurchaseApprovalController extends CommonController {
HashMap
<
String
,
Object
>
messageMap
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
messageMap
=
new
HashMap
<>();
messageMap
.
put
(
"Message_Status"
,
"S"
);
messageMap
.
put
(
"Message_Status"
,
"S"
);
messageMap
.
put
(
"Message_Text"
,
"成功"
);
messageMap
.
put
(
"Message_Text"
,
"成功"
);
messageMap
.
put
(
"NUMBER"
,
sapPurchaseApprovalDto
.
getLsDeader
().
getBanfn
());
LOG
.
info
(
"SAP采购申请审批数据=={}"
,
sapPurchaseApprovalDto
);
LOG
.
info
(
"SAP采购申请审批数据=={}"
,
sapPurchaseApprovalDto
);
try
{
try
{
this
.
sapPurchaseApprovalApplication
.
saveSapPurchaseApprovalVo
(
sapPurchaseApprovalDto
);
this
.
sapPurchaseApprovalApplication
.
saveSapPurchaseApprovalVo
(
sapPurchaseApprovalDto
);
}
catch
(
RuntimeException
e
){
}
catch
(
RuntimeException
e
){
messageMap
.
put
(
"Message_Status"
,
"E"
);
messageMap
.
put
(
"Message_Status"
,
"E"
);
messageMap
.
put
(
"Message_Text"
,
e
);
messageMap
.
put
(
"Message_Text"
,
e
);
messageMap
.
put
(
"NUMBER"
,
sapPurchaseApprovalDto
.
getLsDeader
().
getBanfn
());
}
}
return
messageMap
;
return
messageMap
;
}
}
...
...
topsun/src/main/java/com/huigou/topsun/sap/qualityInfoRecord/application/impl/SapQualityInfoRecordApplicationImpl.java
View file @
57fe48c0
...
@@ -154,9 +154,15 @@ public class SapQualityInfoRecordApplicationImpl extends FlowBroker implements S
...
@@ -154,9 +154,15 @@ public class SapQualityInfoRecordApplicationImpl extends FlowBroker implements S
purchaseInfoRecordItemList
.
forEach
(
sapQualityInfoRecordItem
->
{
purchaseInfoRecordItemList
.
forEach
(
sapQualityInfoRecordItem
->
{
SapQualityInfoRecordItemVo
sapQualityInfoRecordItemVo
=
new
SapQualityInfoRecordItemVo
();
SapQualityInfoRecordItemVo
sapQualityInfoRecordItemVo
=
new
SapQualityInfoRecordItemVo
();
BeanUtil
.
copyProperties
(
sapQualityInfoRecordItem
,
sapQualityInfoRecordItemVo
);
BeanUtil
.
copyProperties
(
sapQualityInfoRecordItem
,
sapQualityInfoRecordItemVo
);
sapQualityInfoRecordItem
.
setZqavfn3
(
"M1"
);
// sapQualityInfoRecordItem.setZqavfn3("M1");
sapQualityInfoRecordItem
.
setZvfnc3
(
"A"
);
// sapQualityInfoRecordItem.setZvfnc3("A");
sapQualityInfoRecordItem
.
setZqafst
(
"11"
);
// sapQualityInfoRecordItem.setZqafst("11");
if
(
"0"
.
equals
(
sapQualityInfoRecordItemVo
.
getGrsrq
())){
sapQualityInfoRecordItemVo
.
setGrsrq
(
""
);
}
if
(
"0"
.
equals
(
sapQualityInfoRecordItemVo
.
getFscrq
())){
sapQualityInfoRecordItemVo
.
setFscrq
(
""
);
}
SimpleDateFormat
dateFormat
=
new
SimpleDateFormat
(
"yyyyMMdd"
);
SimpleDateFormat
dateFormat
=
new
SimpleDateFormat
(
"yyyyMMdd"
);
if
(
sapQualityInfoRecordItem
.
getGrscertdatai
()
!=
null
){
if
(
sapQualityInfoRecordItem
.
getGrscertdatai
()
!=
null
){
String
datab
=
dateFormat
.
format
(
sapQualityInfoRecordItem
.
getGrscertdatai
());
String
datab
=
dateFormat
.
format
(
sapQualityInfoRecordItem
.
getGrscertdatai
());
...
...
topsun/src/main/java/com/huigou/topsun/sap/suppliers/application/impl/SuppliersDataApplicationImpl.java
View file @
57fe48c0
...
@@ -11,6 +11,7 @@ import com.huigou.data.query.model.QueryDescriptor;
...
@@ -11,6 +11,7 @@ import com.huigou.data.query.model.QueryDescriptor;
import
com.huigou.data.query.model.QueryModel
;
import
com.huigou.data.query.model.QueryModel
;
import
com.huigou.topsun.sap.common.DefaultHttpClient
;
import
com.huigou.topsun.sap.common.DefaultHttpClient
;
import
com.huigou.topsun.sap.common.application.SapMutualEpLogApplication
;
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.costReimbursement.domain.SapCostReimbursement
;
import
com.huigou.topsun.sap.suppliers.application.SuppliersDataApplication
;
import
com.huigou.topsun.sap.suppliers.application.SuppliersDataApplication
;
import
com.huigou.topsun.sap.suppliers.domain.*
;
import
com.huigou.topsun.sap.suppliers.domain.*
;
...
@@ -353,16 +354,16 @@ public class SuppliersDataApplicationImpl extends FlowBroker implements Supplier
...
@@ -353,16 +354,16 @@ public class SuppliersDataApplicationImpl extends FlowBroker implements Supplier
suppliersInfoVos
.
add
(
suppliersInfoVo
);
suppliersInfoVos
.
add
(
suppliersInfoVo
);
try
{
try
{
String
result
=
defaultHttpClient
.
execute
(
suppliersInfoVos
,
url
);
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"
));
resultMap
.
put
(
"sequence"
,
resultMap
.
get
(
"row"
));
sapMutualEpLogApplication
.
saveSapMutualEpLog
(
resultMap
);
sapMutualEpLogApplication
.
saveSapMutualEpLog
(
resultMap
);
if
(
"S"
.
equals
(
resultMap
.
get
(
"TYPE"
)))
{
if
(
"S"
.
equals
(
sapResult
.
getTYPE
(
)))
{
suppliersInfo
.
setPartner
(
(
String
)
resultMap
.
get
(
"MESSAGE_V1"
));
suppliersInfo
.
setPartner
(
sapResult
.
getMESSAGE_V1
(
));
suppliersInfoRepository
.
save
(
suppliersInfo
);
suppliersInfoRepository
.
save
(
suppliersInfo
);
}
else
{
}
else
{
throw
new
RuntimeException
(
"数据传输失败,请稍后手动重试!"
+
resultMap
.
get
(
"MESSAGE"
));
throw
new
RuntimeException
(
"数据传输失败,请稍后手动重试!"
+
sapResult
.
getMESSAGE
(
));
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
resultMap
.
put
(
"type"
,
"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