Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hg-smart
Overview
Overview
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
platform
hg-smart
Commits
93968561
Commit
93968561
authored
Sep 03, 2024
by
江和松
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
采购入库批量提交
parent
b101face
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
2 deletions
+34
-2
ServiceHGKC001.java
.../java/com/baosight/hggp/hg/kc/service/ServiceHGKC001.java
+10
-0
HGKC001.js
src/main/webapp/HG/KC/HGKC001.js
+24
-2
No files found.
src/main/java/com/baosight/hggp/hg/kc/service/ServiceHGKC001.java
View file @
93968561
...
@@ -12,6 +12,8 @@ import com.baosight.hggp.hg.kc.domain.HGKC001;
...
@@ -12,6 +12,8 @@ import com.baosight.hggp.hg.kc.domain.HGKC001;
import
com.baosight.hggp.hg.kc.domain.HGKC003
;
import
com.baosight.hggp.hg.kc.domain.HGKC003
;
import
com.baosight.hggp.hg.kc.tools.HGKCTools
;
import
com.baosight.hggp.hg.kc.tools.HGKCTools
;
import
com.baosight.hggp.hg.kc.utils.HGKCUtils
;
import
com.baosight.hggp.hg.kc.utils.HGKCUtils
;
import
com.baosight.hggp.hg.pz.domain.HGPZ007
;
import
com.baosight.hggp.hg.pz.tools.HGPZTools
;
import
com.baosight.hggp.hg.xs.domain.Company
;
import
com.baosight.hggp.hg.xs.domain.Company
;
import
com.baosight.hggp.util.*
;
import
com.baosight.hggp.util.*
;
import
com.baosight.iplat4j.core.ei.EiBlock
;
import
com.baosight.iplat4j.core.ei.EiBlock
;
...
@@ -24,6 +26,8 @@ import com.baosight.iplat4j.core.service.impl.ServiceBase;
...
@@ -24,6 +26,8 @@ import com.baosight.iplat4j.core.service.impl.ServiceBase;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Objects
;
import
java.util.stream.Collectors
;
/**
/**
* @author:songx
* @author:songx
...
@@ -123,7 +127,13 @@ public class ServiceHGKC001 extends ServiceBase {
...
@@ -123,7 +127,13 @@ public class ServiceHGKC001 extends ServiceBase {
* @param dbCg004Map
* @param dbCg004Map
*/
*/
private
void
saveData
(
List
<
HGKC001
>
fCg004s
,
Map
<
String
,
HGKC001
>
dbCg004Map
)
{
private
void
saveData
(
List
<
HGKC001
>
fCg004s
,
Map
<
String
,
HGKC001
>
dbCg004Map
)
{
List
<
String
>
whCodeList
=
fCg004s
.
stream
().
map
(
HGKC001:
:
getWhCode
).
collect
(
Collectors
.
toList
());
Map
<
String
,
HGPZ007
>
whMap
=
HGPZTools
.
HgPz007
.
map
(
whCodeList
);
for
(
HGKC001
fCg004
:
fCg004s
)
{
for
(
HGKC001
fCg004
:
fCg004s
)
{
HGPZ007
wh
=
whMap
.
get
(
fCg004
.
getWhCode
());
if
(
Objects
.
nonNull
(
wh
)){
fCg004
.
setWhName
(
wh
.
getWhName
());
}
DaoUtils
.
update
(
HGKC001
.
UPDATE_WH_CODE
,
fCg004
);
DaoUtils
.
update
(
HGKC001
.
UPDATE_WH_CODE
,
fCg004
);
}
}
}
}
...
...
src/main/webapp/HG/KC/HGKC001.js
View file @
93968561
...
@@ -38,6 +38,7 @@ $(function () {
...
@@ -38,6 +38,7 @@ $(function () {
loadComplete
:
function
(
grid
)
{
loadComplete
:
function
(
grid
)
{
// 确认
// 确认
$
(
"#CONFIRM"
).
on
(
"click"
,
confirm
);
$
(
"#CONFIRM"
).
on
(
"click"
,
confirm
);
// change事件
// change事件
grid
.
dataSource
.
bind
(
"change"
,
function
(
e
)
{
grid
.
dataSource
.
bind
(
"change"
,
function
(
e
)
{
supCodeChange
(
e
);
supCodeChange
(
e
);
...
@@ -59,8 +60,7 @@ $(function () {
...
@@ -59,8 +60,7 @@ $(function () {
// 查询
// 查询
$
(
"#QUERY"
).
on
(
"click"
,
query
);
$
(
"#QUERY"
).
on
(
"click"
,
query
);
// 选择收货
$
(
"#BTN_SUBMIT"
).
on
(
"click"
,
batchUpdateSubmitStatus
);
$
(
"#SELECT_RECEIVE"
).
on
(
"click"
,
selectReceive
);
downKeyUp
();
downKeyUp
();
});
});
...
@@ -229,3 +229,25 @@ function updateSubmitStatus(id) {
...
@@ -229,3 +229,25 @@ function updateSubmitStatus(id) {
});
});
}
}
/**
* 保存
*/
let
batchUpdateSubmitStatus
=
function
()
{
let
rows
=
resultGrid
.
getCheckedRows
();
if
(
rows
.
length
<
1
)
{
message
(
"请选择数据"
);
return
;
}
for
(
let
i
=
0
;
i
<
rows
.
length
;
i
++
)
{
if
(
rows
[
i
][
'submitStatus'
]
!=
0
)
{
message
(
"勾选的第"
+
(
i
+
1
)
+
"行提交状态不是未提交"
);
return
;
}
}
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
提交
\"
操作? "
,
{
ok
:
function
()
{
JSUtils
.
submitGridsData
(
"result"
,
"HGKC001"
,
"updateSubmitStatus"
,
true
);
}
});
}
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