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
c5d4f9f8
Commit
c5d4f9f8
authored
May 21, 2025
by
1650842865
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
打样工序外协审批流程;统计外协数量和总金额
parent
fa51b078
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
59 additions
and
25 deletions
+59
-25
processOutsourceDetail.js
...biz/topsun/sap/processOutsource/processOutsourceDetail.js
+40
-24
processOutsourceDetail.jsp
...iz/topsun/sap/processOutsource/processOutsourceDetail.jsp
+4
-1
ProcessOutsource.java
.../topsun/sap/processOutsource/domain/ProcessOutsource.java
+8
-0
ProcessOutsourceOrderItem.java
...ap/processOutsource/domain/ProcessOutsourceOrderItem.java
+6
-0
processOutsource.xml
...s/config/topsun/sap/processOutsource/processOutsource.xml
+1
-0
No files found.
topsun-xt/src/main/webapp/biz/topsun/sap/processOutsource/processOutsourceDetail.js
View file @
c5d4f9f8
...
...
@@ -97,8 +97,9 @@ function loadOrderItemGrid() {
idFieldName
:
'id'
,
onSuccess
:
function
()
{
orderItemGridManager
.
loadData
();
}
}
,
});
amountChange
();
}
});
...
...
@@ -132,15 +133,46 @@ function loadOrderItemGrid() {
orderItemGridManager
.
updateRow
(
item
.
record
,{
kbetr
:
data
.
unitPrice
,
purchaseMwskzTextView
:
data
.
purchaseMwskzTextView
,
purchaseMwskz
:
data
.
purchaseMwskz
purchaseMwskz
:
data
.
purchaseMwskz
,
amount
:
data
.
unitPrice
*
item
.
record
.
menge
})
amountChange
();
})
}
if
(
item
.
column
.
name
==
"kbetr"
||
item
.
column
.
name
==
"menge"
){
orderItemGridManager
.
updateRow
(
item
.
record
,{
amount
:
item
.
record
.
kbetr
*
item
.
record
.
menge
})
amountChange
();
}
},
onAfterShowData
:
function
(
item
)
{
amountChange
();
}
});
UICtrl
.
setSearchAreaToggle
(
orderItemGridManager
);
}
/**
* 计算数量和金额
*/
function
amountChange
(){
var
_grid
=
UICtrl
.
getGridManager
(
'#orderItemGrid'
);
if
(
_grid
!=
null
){
var
datas
=
_grid
.
rows
;
if
(
datas
.
length
>
0
){
var
mengs
=
0
,
//总数量
amount
=
0
;
//总价合计
$
.
each
(
datas
,
function
(
i
,
data
)
{
mengs
=
MathUtil
.
add
(
mengs
,
data
.
menge
);
amount
=
MathUtil
.
add
(
amount
,
data
.
amount
);
});
$
(
"#mengs"
).
val
(
mengs
);
$
(
"#amount"
).
val
(
amount
);
}
}
}
function
getOrderColumns
(){
var
columns
=
[];
columns
.
push
({
display
:
"采购订单"
,
name
:
"ebeln"
,
width
:
120
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
});
...
...
@@ -283,6 +315,9 @@ function getOrderColumns(){
type
:
"text"
,
mask
:
'9999999.999'
,
required
:
true
}
},);
columns
.
push
({
display
:
"总价"
,
name
:
"amount"
,
width
:
140
,
minWidth
:
60
,
type
:
"money"
,
align
:
"left"
,
},);
columns
.
push
({
display
:
"定价基数"
,
name
:
"kpein"
,
width
:
140
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
...
...
@@ -339,6 +374,9 @@ function getOrderColumns(){
columns
.
push
({
display
:
"单价"
,
name
:
"kbetr"
,
width
:
140
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
},);
columns
.
push
({
display
:
"总价"
,
name
:
"amount"
,
width
:
140
,
minWidth
:
60
,
type
:
"money"
,
align
:
"left"
,
},);
columns
.
push
({
display
:
"定价基数"
,
name
:
"kpein"
,
width
:
140
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
},);
...
...
@@ -455,17 +493,6 @@ function getExtendedData(processAction) {
if
(
!
datas
)
{
return
false
;
}
if
(
isApplyProcUnit
()){
for
(
let
i
=
0
;
i
<
datas
.
length
;
i
++
)
{
var
data
=
datas
[
i
];
var
regex
=
/^
\d{4}
-
\d{2}
-
\d{2}
$/
;
var
regex2
=
/^
\d{4}
-
\d{2}
-
\d{2}
\d{2}
:
\d{2}
:
\d{2}
$/
;
if
(
!
regex
.
test
(
data
.
eeind
)
&&
!
regex2
.
test
(
data
.
eeind
))
{
Public
.
tip
(
"序号为:"
+
data
.
sequence
+
" 的行项目需求日期格式应为:年-月-日"
);
return
false
;
// 格式不匹配
}
}
}
if
(
"outer"
==
getSubProcUnitId
()){
for
(
let
i
=
0
;
i
<
datas
.
length
;
i
++
)
{
var
data
=
datas
[
i
];
...
...
@@ -519,17 +546,6 @@ function checkConstraints(){
if
(
!
orderItemdatas
)
{
return
false
;
}
if
(
isApplyProcUnit
()){
for
(
let
i
=
0
;
i
<
orderItemdatas
.
length
;
i
++
)
{
var
data
=
orderItemdatas
[
i
];
var
regex
=
/^
\d{4}
-
\d{2}
-
\d{2}
$/
;
var
regex2
=
/^
\d{4}
-
\d{2}
-
\d{2}
\d{2}
:
\d{2}
:
\d{2}
$/
;
if
(
!
regex
.
test
(
data
.
eeind
)
&&
!
regex2
.
test
(
data
.
eeind
))
{
Public
.
tip
(
"序号为:"
+
data
.
sequence
+
" 的行项目需求日期格式应为:年-月-日"
);
return
false
;
// 格式不匹配
}
}
}
if
(
isApplyProcUnit
()
&&
orderItemdatas
.
length
==
0
){
Public
.
tip
(
"订单行项目信息必填"
);
return
false
;
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/processOutsource/processOutsourceDetail.jsp
View file @
c5d4f9f8
...
...
@@ -28,7 +28,10 @@
<div
class=
"hg-form-cols"
>
<div
class=
"hg-form-row"
>
<x:hidden
name=
"werks"
/>
<x:inputC
name=
"werksName"
label=
"工厂"
labelCol=
"2"
fieldCol=
"2"
required=
"true"
wrapper=
"select"
/>
<x:inputC
name=
"werksName"
label=
"工厂"
labelCol=
"1"
fieldCol=
"2"
required=
"true"
wrapper=
"select"
/>
<x:selectC
name=
"processOutType"
label=
"工序外协类别"
labelCol=
"1"
fieldCol=
"2"
required=
"true"
dictionary=
"processOutType"
/>
<x:inputC
name=
"mengs"
label=
"数量"
labelCol=
"1"
fieldCol=
"2"
readonly=
"true"
/>
<x:inputC
name=
"amount"
label=
"金额"
labelCol=
"1"
fieldCol=
"2"
readonly=
"true"
/>
</div>
<div
class=
"hg-form-row"
>
<x:textareaC
name=
"situationDesc"
label=
"情况说明"
labelCol=
"2"
fieldCol=
"10"
required=
"true"
rows=
"3"
/>
...
...
topsun/src/main/java/com/huigou/topsun/sap/processOutsource/domain/ProcessOutsource.java
View file @
c5d4f9f8
...
...
@@ -29,6 +29,14 @@ public class ProcessOutsource extends FlowBillAbstractEntity {
@Column
(
name
=
"situation_desc"
)
private
String
situationDesc
;
/**
* 工序外协类别
* normal 常规
* proofing 打样
*/
@Column
(
name
=
"process_out_type"
)
private
String
processOutType
;
@Override
protected
String
getCodeRuleId
()
{
return
"processOutsource"
;
...
...
topsun/src/main/java/com/huigou/topsun/sap/processOutsource/domain/ProcessOutsourceOrderItem.java
View file @
c5d4f9f8
...
...
@@ -173,4 +173,10 @@ public class ProcessOutsourceOrderItem extends AbstractEntity {
@Column
(
name
=
"PRODUCT_TYPE_NAME"
)
private
String
productTypeName
;
/**
* 总价
*/
@Column
(
name
=
"amount"
)
private
BigDecimal
amount
;
}
topsun/src/main/resources/config/topsun/sap/processOutsource/processOutsource.xml
View file @
c5d4f9f8
...
...
@@ -56,6 +56,7 @@
t.LIFNR,
t.LIFNR_NAME,
t.KBETR,
t.AMOUNT,
t.PURCHASE_MWSKZ,
t.KPEIN,
t.WAERS,
...
...
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