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
33acc4de
Commit
33acc4de
authored
Jul 08, 2024
by
刘学辉
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
废品销售单修改、物料主数据调整
parent
339ef2e3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
74 additions
and
39 deletions
+74
-39
wasteSaleDetail.js
...c/main/webapp/biz/topsun/sap/wasteSale/wasteSaleDetail.js
+68
-36
NonProdApplyApplicationImpl.java
...odApply/application/impl/NonProdApplyApplicationImpl.java
+2
-1
NonProdApplyNextController.java
...p/nonProdApply/controller/NonProdApplyNextController.java
+4
-2
No files found.
topsun-xt/src/main/webapp/biz/topsun/sap/wasteSale/wasteSaleDetail.js
View file @
33acc4de
var
gridManager
=
null
;
$
(
document
).
ready
(
function
()
{
initialize
();
loadGrid
();
...
...
@@ -22,23 +23,28 @@ function bindEvent(){
}
function
loadGrid
()
{
var
toolbarOptions
=
UICtrl
.
getDefaultToolbarOptions
({
addHandler
:
function
()
{
UICtrl
.
addGridRow
(
gridManager
,{
sequence
:
(
gridManager
.
getData
().
length
+
1
)});
},
deleteHandler
:
function
()
{
var
_grid
=
UICtrl
.
getGridManager
(
'#maingrid'
);
DataUtil
.
delSelectedRows
({
action
:
'wasteSaleItem/deleteWasteSaleItem.ajax'
,
param
:
{},
gridManager
:
_grid
,
idFieldName
:
'id'
,
onSuccess
:
function
()
{
reloadGrid
();
}
});
}
});
var
toolbarOptions
=
{
items
:
[]
};
var
subProcUnitId
=
getSubProcUnitId
();
if
(
subProcUnitId
!==
"purchase"
)
{
toolbarOptions
=
UICtrl
.
getDefaultToolbarOptions
({
addHandler
:
function
()
{
UICtrl
.
addGridRow
(
gridManager
,
{
sequence
:
(
gridManager
.
getData
().
length
+
1
)});
},
deleteHandler
:
function
()
{
var
_grid
=
UICtrl
.
getGridManager
(
'#maingrid'
);
DataUtil
.
delSelectedRows
({
action
:
'wasteSaleItem/deleteWasteSaleItem.ajax'
,
param
:
{},
gridManager
:
_grid
,
idFieldName
:
'id'
,
onSuccess
:
function
()
{
reloadGrid
();
}
});
}
});
}
gridManager
=
UICtrl
.
grid
(
"#maingrid"
,
{
columns
:
getGridColumns
(),
dataAction
:
"server"
,
...
...
@@ -60,6 +66,8 @@ function loadGrid() {
function
getGridColumns
(){
var
columns
=
[];
var
subProcUnitId
=
getSubProcUnitId
();
var
statusId
=
$
(
"#statusId"
).
val
();
columns
.
push
({
display
:
"序号"
,
name
:
"sequence"
,
width
:
60
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
},)
...
...
@@ -105,21 +113,39 @@ function getGridColumns(){
},
}
},)
columns
.
push
({
display
:
"毛重"
,
name
:
"grossWeight"
,
width
:
120
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
required
:
false
,
type
:
"text"
,
mask
:
'9999999.99'
}
},)
columns
.
push
({
display
:
"车辆皮重"
,
name
:
"carWeight"
,
width
:
120
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
required
:
false
,
type
:
"text"
,
mask
:
'9999999.99'
}
},)
if
(
subProcUnitId
===
"purchase"
)
{
columns
.
push
({
display
:
"毛重"
,
name
:
"grossWeight"
,
width
:
120
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},)
columns
.
push
({
display
:
"车辆皮重"
,
name
:
"carWeight"
,
width
:
120
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},)
}
else
{
columns
.
push
({
display
:
"毛重"
,
name
:
"grossWeight"
,
width
:
120
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
required
:
false
,
type
:
"text"
,
mask
:
'9999999.99'
}
},)
columns
.
push
({
display
:
"车辆皮重"
,
name
:
"carWeight"
,
width
:
120
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
required
:
false
,
type
:
"text"
,
mask
:
'9999999.99'
},
render
:
function
(
item
)
{
if
(
Public
.
isNotBlank
(
item
.
carWeight
))
{
if
(
MathUtil
.
sub
(
item
.
grossWeight
,
item
.
carWeight
)
<=
0
)
{
Public
.
tip
(
"毛重不能小于车辆皮重!"
);
return
false
;
}
}
return
item
.
carWeight
;
}
},)
}
var
subProcUnitId
=
getSubProcUnitId
();
var
statusId
=
$
(
"#statusId"
).
val
();
if
(
subProcUnitId
===
"purchase"
||
statusId
>
0
){
//采购部专员录入回收单价,自动计算出总价,补充收款账户
columns
.
push
({
...
...
@@ -128,11 +154,17 @@ function getGridColumns(){
required
:
false
,
type
:
"text"
,
mask
:
'9999999.99'
},
render
:
function
(
item
)
{
if
(
Public
.
isNotBlank
(
item
.
deductWeight
))
{
var
amount
=
MathUtil
.
sub
(
item
.
grossWeight
,
item
.
carWeight
);
var
amount1
=
MathUtil
.
sub
(
amount
,
item
.
deductWeight
);
item
.
quantity
=
amount1
;
return
item
.
deductWeight
;
if
(
Public
.
isNotBlank
(
item
.
deductWeight
)
&&
MathUtil
.
sub
(
item
.
deductWeight
,
0
)
>
0
)
{
var
amount1
=
MathUtil
.
sub
(
item
.
grossWeight
,
item
.
carWeight
);
var
amount2
=
MathUtil
.
sub
(
amount1
,
item
.
deductWeight
);
if
(
amount2
<=
0
){
Public
.
tip
(
"毛重不能小于车辆皮重与扣减数量之和!"
);
return
false
;
}
return
item
.
quantity
=
amount2
,
item
.
deductWeight
;
//return item.deductWeight;
}
else
{
return
item
.
deductWeight
;
}
if
(
Public
.
isNotBlank
(
item
.
quantity
)
&&
Public
.
isNotBlank
(
item
.
price
))
{
var
amount
=
MathUtil
.
mul
(
item
.
quantity
,
item
.
price
)
...
...
topsun/src/main/java/com/huigou/topsun/sap/nonProdApply/application/impl/NonProdApplyApplicationImpl.java
View file @
33acc4de
...
...
@@ -597,7 +597,8 @@ public class NonProdApplyApplicationImpl extends FlowBroker implements NonProdA
BsnMessageSponsor
bsnMessageSponsor
=
new
BsnMessageSponsor
();
bsnMessageSponsor
.
setTaskSponsor
(
operator
.
getLoginUser
().
getId
());
bsnMessageSponsor
.
setTitle
(
nonProdApplyBaseInfo
.
getGenericName
());
//通用品名
String
genericName
=
nonProdApplyBaseInfo
.
getGenericName
()!=
null
?
nonProdApplyBaseInfo
.
getGenericName
():
""
;
bsnMessageSponsor
.
setTitle
(
genericName
);
//通用品名
bsnMessageSponsor
.
setExecutorUrl
(
"sapNonProdApplyNext/forwardNonProdApplyNext.do?prod=1&isReadOnly=false"
);
bsnMessageSponsor
.
setBusinessId
(
sapNonProdApplyDept
.
getApplyDeptId
());
bsnMessageSponsor
.
setCreateDate
(
new
Date
());
...
...
topsun/src/main/java/com/huigou/topsun/sap/nonProdApply/controller/NonProdApplyNextController.java
View file @
33acc4de
...
...
@@ -61,9 +61,11 @@ public class NonProdApplyNextController extends CommonController {
SDO
sdo
=
this
.
getSDO
();
String
id
=
sdo
.
getBizId
();
// this.putAttribute("active", ActiveStatus.UNFINISHED.getValue() );//定义流程环节的id
if
(
StringUtil
.
isNotBlank
(
sdo
.
getString
(
"prod"
))){
//首页进入的产品信息
if
(
StringUtil
.
isNotBlank
(
sdo
.
getString
(
"prod"
))){
//首页进入的产品信息
如果ID是传的ApplyDeptId
SapNonProdApplyDept
applyDept
=
nonProdApplyDeptApplication
.
getNonProdApplyDeptById
(
id
);
id
=
applyDept
.
getBaseInfoId
();
if
(
applyDept
!=
null
){
id
=
applyDept
.
getBaseInfoId
();
}
}
NonProdApplyBaseInfo
nonProdApplyBaseInfo
=
nonProdApplyApplication
.
loadNonProdApplyBaseInfoById
(
id
);
nonProdApplyBaseInfo
.
setApplyType
(
"0"
);
...
...
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