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
a6deecab
Commit
a6deecab
authored
Jun 27, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://git.pseer.com:8800/platform/hg-smart
into dev-ly
parents
a03d4f66
f8296b1d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
120 additions
and
25 deletions
+120
-25
HGSC005A.java
src/main/java/com/baosight/hggp/hg/sc/domain/HGSC005A.java
+1
-1
ServiceHGSC004A.java
...java/com/baosight/hggp/hg/sc/service/ServiceHGSC004A.java
+0
-0
HGSC004A.xml
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC004A.xml
+7
-1
HGSC004A.js
src/main/webapp/HG/SC/HGSC004A.js
+111
-22
HGSC004A.jsp
src/main/webapp/HG/SC/HGSC004A.jsp
+1
-1
No files found.
src/main/java/com/baosight/hggp/hg/sc/domain/HGSC005A.java
View file @
a6deecab
...
...
@@ -103,7 +103,7 @@ public class HGSC005A extends DaoEPBase {
public
static
final
String
INSERT
=
"HGSC005A.insert"
;
public
static
final
String
UPDATE
=
"HGSC005A.update"
;
public
static
final
String
DELETE
=
"HGSC005A.delete"
;
public
static
final
String
BATCH_DELETE
=
"HGSC005.batch_delete"
;
public
static
final
String
BATCH_DELETE
=
"HGSC005
A
.batch_delete"
;
public
static
final
String
UPDATE_PLAN_DATE
=
"HGSC005A.update_plan_date"
;
private
Long
id
=
new
Long
(
0
);
...
...
src/main/java/com/baosight/hggp/hg/sc/service/ServiceHGSC004A.java
View file @
a6deecab
This diff is collapsed.
Click to expand it.
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC004A.xml
View file @
a6deecab
...
...
@@ -221,6 +221,9 @@
<isNotEmpty
prepend=
" AND "
property=
"materialId"
>
a.material_id = #materialId#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"materialId"
>
a.material_id = #materialId#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"id"
>
a.id = #id#
</isNotEmpty>
...
...
@@ -235,7 +238,7 @@
</select>
<select
id=
"queryTechFlowIdByProductId"
parameterClass=
"java.util.HashMap"
resultClass=
"
com.baosight.hggp.hg.sc.domain.HGSC004A
"
>
resultClass=
"
Long
"
>
SELECT
b.flow_id as "techFlowId"
FROM ${hggpSchema}.hgpz005 b
...
...
@@ -243,6 +246,9 @@
<isNotEmpty
prepend=
" AND "
property=
"productId"
>
b.id = #productId#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"productIds"
>
b.id IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"productIds"
>
#productIds[]#
</iterate>
</isNotEmpty>
<dynamic
prepend=
"ORDER BY"
>
<isNotEmpty
property=
"orderBy"
>
$orderBy$
...
...
src/main/webapp/HG/SC/HGSC004A.js
View file @
a6deecab
...
...
@@ -8,8 +8,11 @@ $(function () {
$
(
"#QUERY"
).
on
(
"click"
,
function
()
{
query
();
});
// 批量提交
$
(
"#BATCH_SUBMIT"
).
on
(
"click"
,
batchSubmit
);
let
inventNameGlobalData
=
[];
let
parentId
=
''
;
var
strs
;
...
...
@@ -30,6 +33,7 @@ $(function () {
* @param options: 树的配置项
*/
query
:
function
(
postEiInfo
,
model
)
{
postEiInfo
.
set
(
"companyCode"
,
companyCode
?
companyCode
:
null
);
postEiInfo
.
set
(
"projCode"
,
projCode
?
projCode
:
null
);
postEiInfo
.
set
(
"materialId"
,
$
(
"#inqu_status-0-materialId"
).
val
());
...
...
@@ -111,6 +115,8 @@ $(function () {
let
status
=
item
.
productStatus
;
let
changeType
=
item
.
changeType
;
let
template
=
''
;
// template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
// + 'onclick="saveDetail()" >保存</a>';
if
(
item
.
id
){
if
(
changeType
!=
0
){
template
+=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
...
...
@@ -120,10 +126,12 @@ $(function () {
template
+=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
'onclick="updateProductStatus('
+
item
.
id
+
',1)" >提交</a>'
;
}
// else if (status == 1) {
// template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
// 'onclick="updateProductStatus(' + item.id + ',0)" >取消提交</a>';
// }
if
(
changeType
!=
3
){
template
+=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
'onclick="deteleDetail('
+
item
.
id
+
')" >删除</a>'
;
}
}
return
template
;
}
...
...
@@ -257,13 +265,13 @@ $(function () {
let
totalWeight
=
item
.
quantity
*
item
.
singleWeight
;
resultGrid
.
setCellValue
(
item
,
'totalWeight'
,
totalWeight
)
}
loadChange
(
grid
,
e
,
"singleWeight"
);
}
if
(
e
.
field
==
"singleWeight"
)
{
if
(
item
.
quantity
&&
item
.
singleWeight
){
let
totalWeight
=
item
.
quantity
*
item
.
singleWeight
;
resultGrid
.
setCellValue
(
item
,
'totalWeight'
,
totalWeight
)
}
loadChange
(
grid
,
e
,
"totalWeight"
);
}
});
},
...
...
@@ -444,7 +452,7 @@ $(function () {
});
});
$
(
window
).
load
(
function
()
{
query
();
//
query();
});
/**
...
...
@@ -636,23 +644,104 @@ function showDetail(id) {
}
function
updateProductStatus
(
id
,
status
)
{
let
inEiInfo
=
new
EiInfo
();
inEiInfo
.
set
(
"result-0-id"
,
id
);
inEiInfo
.
set
(
"result-0-productStatus"
,
status
);
inEiInfo
.
set
(
"result-0-materialId"
,
$
(
"#inqu_status-0-materialId"
).
val
());
EiCommunicator
.
send
(
'HGSC004A'
,
'updateProductStatus'
,
inEiInfo
,
{
onSuccess
(
response
)
{
NotificationUtil
(
response
.
msg
);
query
();
},
onFail
(
errorMessage
,
status
,
e
)
{
NotificationUtil
(
"执行失败!"
,
"error"
);
}
},
{
async
:
false
JSUtils
.
confirm
(
"确定是否
\"
删除
\"
操作? "
,
{
ok
:
function
()
{
let
inEiInfo
=
new
EiInfo
();
inEiInfo
.
set
(
"result-0-id"
,
id
);
inEiInfo
.
set
(
"result-0-productStatus"
,
status
);
inEiInfo
.
set
(
"result-0-materialId"
,
$
(
"#inqu_status-0-materialId"
).
val
());
EiCommunicator
.
send
(
'HGSC004A'
,
'updateProductStatus'
,
inEiInfo
,
{
onSuccess
(
response
)
{
NotificationUtil
(
response
.
msg
);
query
();
refreshTree
();
},
onFail
(
errorMessage
,
status
,
e
)
{
NotificationUtil
(
"执行失败!"
,
"error"
);
}
},
{
async
:
false
}
);
}
);
}
);
}
function
saveDetail
()
{
JSUtils
.
confirm
(
"确定是否
\"
保存
\"
操作? "
,
{
ok
:
function
()
{
var
inEiInfo
=
new
EiInfo
();
inEiInfo
.
setByNode
(
"result"
);
EiCommunicator
.
send
(
'HGSC004A'
,
'save'
,
inEiInfo
,
{
onSuccess
(
response
)
{
NotificationUtil
(
response
.
msg
);
query
();
refreshTree
();
},
onFail
(
errorMessage
,
status
,
e
)
{
NotificationUtil
(
"执行失败!"
,
"error"
);
}
},
{
async
:
false
}
);
}
});
}
function
deteleDetail
(
id
)
{
JSUtils
.
confirm
(
"确定是否
\"
删除
\"
操作? "
,
{
ok
:
function
()
{
let
inEiInfo
=
new
EiInfo
();
inEiInfo
.
set
(
"result-0-id"
,
id
);
inEiInfo
.
set
(
"result-0-materialId"
,
$
(
"#inqu_status-0-materialId"
).
val
());
EiCommunicator
.
send
(
'HGSC004A'
,
'delete'
,
inEiInfo
,
{
onSuccess
(
response
)
{
NotificationUtil
(
response
.
msg
);
query
();
refreshTree
();
},
onFail
(
errorMessage
,
status
,
e
)
{
NotificationUtil
(
"执行失败!"
,
"error"
);
}
},
{
async
:
false
}
);
}
});
}
/**
* 提交操作
*
* @param id
* @param checkNo
*/
let
batchSubmit
=
function
()
{
let
rows
=
resultGrid
.
getCheckedRows
();
if
(
rows
.
length
<
1
)
{
message
(
"请选择数据"
)
return
;
}
for
(
let
i
=
0
;
i
<
rows
.
length
;
i
++
)
{
let
singleWeight
=
rows
[
i
][
'singleWeight'
];
let
quantity
=
rows
[
i
][
'quantity'
];
if
(
!
isNumber
(
singleWeight
)
||
!
isNumber
(
quantity
))
{
message
(
"第"
+
(
i
+
1
)
+
"行单重和数量必须是大于等于0的数字"
);
return
;
}
}
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做提交操作吗? "
,
{
ok
:
function
()
{
JSUtils
.
submitGridsData
(
"result"
,
"HGSC004A"
,
"updateProductStatus"
,
true
);
}
});
}
function
loadChange
(
grid
,
e
,
field
)
{
var
cell_label
=
field
,
that
=
grid
;
...
...
src/main/webapp/HG/SC/HGSC004A.jsp
View file @
a6deecab
...
...
@@ -40,7 +40,7 @@
<div
id=
"right-pane"
class=
"i-fit-height"
style=
"width: 80%;float: right"
>
<EF:EFRegion
id=
"result"
title=
"明细信息"
>
<EF:EFGrid
blockId=
"result"
autoDraw=
"
no"
checkMode=
"single
"
>
<EF:EFGrid
blockId=
"result"
autoDraw=
"
override"
isFloat=
"true"
checkMode=
"row
"
>
<EF:EFColumn
ename=
"id"
cname=
"主键"
hidden=
"true"
/>
<EF:EFColumn
ename=
"lv"
cname=
"层级"
hidden=
"true"
/>
<EF:EFColumn
enable=
"false"
ename=
"parentProdCode"
hidden=
"true"
cname=
"上级产品编号"
/>
...
...
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