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
f590bf98
Commit
f590bf98
authored
Mar 31, 2024
by
鲁鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
采购申请优化
parent
8ddb1e20
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
578 additions
and
266 deletions
+578
-266
choosePurchaseDetail.jsp
...n/webapp/biz/topsun/sap/purchase/choosePurchaseDetail.jsp
+20
-0
sapPurchaseDetail.js
.../main/webapp/biz/topsun/sap/purchase/sapPurchaseDetail.js
+102
-245
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
SapPurchaseController.java
...topsun/sap/purchase/controller/SapPurchaseController.java
+24
-2
No files found.
topsun-xt/src/main/webapp/biz/topsun/sap/purchase/choosePurchaseDetail.jsp
0 → 100644
View file @
f590bf98
<%--采购申请--%>
<%@ 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 @
f590bf98
This diff is collapsed.
Click to expand it.
topsun-xt/src/main/webapp/biz/topsun/sap/purchase/sapPurchaseDetail.jsp
View file @
f590bf98
...
...
@@ -28,7 +28,7 @@
<x:hidden
name=
"frgdt"
/>
<div
class=
"hg-form-cols"
>
<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"
/>
</div>
</div>
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/purchase/sapPurchaseList.js
View file @
f590bf98
...
...
@@ -47,7 +47,7 @@ function initPurchaseListGrid() {
}
,
onDblClickRow
:
function
(
data
,
rowindex
,
rowobj
)
{
viewHandler
(
data
.
parentI
d
);
viewHandler
(
data
.
i
d
);
},
onAfterShowData
:
function
(
currentData
)
{
...
...
@@ -63,39 +63,37 @@ function initPurchaseListGrid() {
* @param parentId 采购申请id
* @returns {boolean}
*/
function
viewHandler
(
parentI
d
)
{
if
(
!
parentI
d
)
{
function
viewHandler
(
i
d
)
{
if
(
!
i
d
)
{
var
row
=
DataUtil
.
getSelectedRow
(
purchaseGridManager
);
if
(
!
row
)
{
return
row
;
}
parentId
=
row
.
parentI
d
;
id
=
row
.
i
d
;
}
UICtrl
.
addTabItem
({
tabid
:
'viewPurchase'
+
parentI
d
,
tabid
:
'viewPurchase'
+
i
d
,
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
);
if
(
!
row
)
{
return
;
}
UICtrl
.
addTabItem
({
tabid
:
'updatePurchase'
+
row
.
parentId
,
text
:
'修改采购申请'
,
url
:
web_app
.
name
+
'/purchase/loadPurchaseDetail.do?id='
+
row
.
parentId
//添加按钮
function
addHandler
()
{
UICtrl
.
showAjaxDialog
({
title
:
'新增'
,
width
:
400
,
url
:
web_app
.
name
+
'/sapPurchase/choosePurchaseDetail.load'
,
ok
:
insertHandler
});
}
function
addHandler
()
{
function
insertHandler
()
{
var
bsart
=
$
(
"#bsart"
).
val
();
UICtrl
.
addTabItem
({
tabid
:
'addPurchase'
,
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 @
f590bf98
This diff is collapsed.
Click to expand it.
topsun-xt/src/main/webapp/biz/topsun/sap/purchase/sapZNE1PurchaseDetail.jsp
0 → 100644
View file @
f590bf98
<%--采购申请--%>
<%@ 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/src/main/java/com/huigou/topsun/sap/purchase/controller/SapPurchaseController.java
View file @
f590bf98
...
...
@@ -43,25 +43,47 @@ public class SapPurchaseController extends CommonController {
return
toResult
(
map
);
}
public
String
choosePurchaseDetail
(){
return
forward
(
"choosePurchaseDetail"
);
}
public
String
forwardSapPurchaseDetail
(){
this
.
putAttribute
(
"processDefinitionKey"
,
SapPurchaseApplication
.
PROCESS_DEFINITION_KEY
);
// 新增的时候procUnitId一定要设置成Apply,不然jsp页面的所有表单元素是readonly状态
this
.
putAttribute
(
"procUnitId"
,
"Apply"
);
String
bsart
=
getSDO
().
getString
(
"bsart"
);
SapPurchase
sapPurchase
=
new
SapPurchase
();
sapPurchase
.
setBsart
(
bsart
);
sapPurchase
.
setStatusId
(
BizBillStatus
.
APPLYING
.
getId
());
/**
* 设置jsp页面初始化填充数据,如果不设置, 那么在jsp页面上填写完表单之后立即提交申请TaskDescription获取不到时间和相关人员信息
*/
Operator
operator
=
getOperator
();
sapPurchase
.
setDefaultValues
(
new
OrgUnit
(
operator
.
getFullId
(),
operator
.
getFullName
()));
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
(){
SDO
sdo
=
this
.
getSDO
();
String
id
=
sdo
.
getBizId
();
SapPurchase
sapPurchase
=
sapPurchaseApplication
.
loadSapPurchase
(
id
);
switch
(
sapPurchase
.
getBsart
()){
case
"ZNE1"
:
return
forward
(
"sapZNE1PurchaseDetail"
,
sapPurchase
);
case
"ZFW"
:
return
forward
(
"sapPurchaseDetail"
,
sapPurchase
);
case
"ZNE2"
:
return
forward
(
"sapPurchaseDetail"
,
sapPurchase
);
}
return
null
;
}
}
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