Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hp-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
hp-smart
Commits
e4184e50
Commit
e4184e50
authored
Apr 28, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-04-26 采购申请优化
parent
2781d5ed
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
15 deletions
+47
-15
ServiceHPCG001.java
.../java/com/baosight/hpjx/hp/cg/service/ServiceHPCG001.java
+1
-1
HPCG001.js
src/main/webapp/HP/CG/HPCG001.js
+43
-10
HPCG001.jsp
src/main/webapp/HP/CG/HPCG001.jsp
+3
-4
No files found.
src/main/java/com/baosight/hpjx/hp/cg/service/ServiceHPCG001.java
View file @
e4184e50
...
...
@@ -180,7 +180,7 @@ public class ServiceHPCG001 extends ServiceEPBase {
hpcg002
.
setProPlanDate
(
StringUtil
.
removeHorizontalLine
(
DateUtils
.
date
()));
hpcg002
.
setInventType
(
str
.
toString
());
//生成采购计划单号
hpcg002
.
setProPlanNo
(
SequenceGenerator
.
getNextSequence
(
HPConstant
.
SequenceId
.
PRO_
APPLY
_NO
));
hpcg002
.
setProPlanNo
(
SequenceGenerator
.
getNextSequence
(
HPConstant
.
SequenceId
.
PRO_
PLAN
_NO
));
//添加采购计划
DaoUtils
.
insert
(
HPCG002
.
INSERT
,
hpcg002
);
List
<
HPCG002
>
list1
=
this
.
dao
.
query
(
HPCG002
.
QUERY
,
new
HashMap
<
String
,
Object
>(){{
...
...
src/main/webapp/HP/CG/HPCG001.js
View file @
e4184e50
...
...
@@ -20,6 +20,17 @@ $(function () {
IPLATUI
.
EFGrid
=
{
"result"
:
{
columns
:
[{
field
:
"operator"
,
template
:
function
(
item
)
{
let
template
=
''
;
if
(
item
.
proApplyStatus
==
0
){
template
=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
'onclick="approveFunc('
+
item
.
id
+
')" >提交</a>'
;
}
return
template
;
}
},
{
field
:
"proApplyDate"
,
attributes
:
{
class
:
"i-input-readonly"
...
...
@@ -217,7 +228,7 @@ $(function () {
}
$
(
"#APPROVE"
).
on
(
"click"
,
function
()
{
approveFunc
();
approveFunc
s
();
})
downKeyUp
();
...
...
@@ -328,7 +339,7 @@ let save = function (btnNode) {
/**
* 提交
*/
function
approveFunc
()
{
function
approveFunc
s
()
{
let
rows
=
resultGrid
.
getCheckedRows
();
if
(
rows
.
length
<
1
)
{
message
(
"请选择数据"
);
...
...
@@ -382,18 +393,40 @@ function deleteFunc() {
}
}
function
updateStatus
(
id
)
{
function
approveFunc
(
id
)
{
let
rows
=
resultGrid
.
getDataItems
();
if
(
rows
.
length
<
1
)
{
message
(
"请选择数据"
);
return
;
}
let
inEiInfo
=
new
EiInfo
();
inEiInfo
.
set
(
"result-0-id"
,
id
);
inEiInfo
.
set
(
"result-0-status"
,
1
);
EiCommunicator
.
send
(
'HPPZ018'
,
'updateStatus'
,
inEiInfo
,
{
onSuccess
(
response
)
{
NotificationUtil
(
response
.
msg
);
let
eiblock
=
new
EiBlock
(
"result"
);
let
flag
=
false
;
for
(
var
int
=
0
;
int
<
rows
.
length
;
int
++
)
{
if
(
rows
[
int
].
id
==
id
)
{
for
(
var
key
in
rows
[
int
].
toJSON
())
{
var
eColumn
=
new
EiColumn
(
key
);
eiblock
.
getBlockMeta
().
addMeta
(
eColumn
);
}
var
model
=
rows
[
int
];
eiblock
.
addRow
(
eiblock
.
getMappedArray
(
model
,
true
));
}
}
var
showCount
=
eiblock
.
get
(
EiConstant
.
SHOW_COUNT
)
||
"true"
;
eiblock
.
set
(
EiConstant
.
SHOW_COUNT
,
showCount
);
eiblock
.
set
(
EiConstant
.
LIMIT
,
resultGrid
.
dataSource
[
'_pageSize'
]);
// eiblock.set(EiConstant.OFFSET, resultGrid.dataSource['_skip']);
// 默认查询第一页
eiblock
.
set
(
EiConstant
.
OFFSET
,
0
);
inEiInfo
.
addBlock
(
eiblock
);
EiCommunicator
.
send
(
'HPCG001'
,
'approve'
,
inEiInfo
,
{
onSuccess
(
response
)
{
NotificationUtil
(
response
.
msg
);
query
();
},
onFail
(
errorMessage
,
status
,
e
)
{
NotificationUtil
(
"执行失败!"
,
"error"
);
}
NotificationUtil
(
"执行失败!"
,
"error"
);
}
},
{
async
:
false
}
...
...
src/main/webapp/HP/CG/HPCG001.jsp
View file @
e4184e50
...
...
@@ -25,8 +25,7 @@
</EF:EFSelect>
<EF:EFSelect cname="提交状态" ename="inqu_status-0-proApplyStatus" colWidth="3" filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/>
<EF:EFOption label="未提交" value="0"/>
<EF:EFOption label="已提交" value="1"/>
<EF:EFCodeOption codeName="hpjx.hpcg.proApplyStatus"/>
</EF:EFSelect>
</div>
<%--<div class="row">
...
...
@@ -59,6 +58,7 @@
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="80" align="center"/>
<EF:EFColumn ename="proApplyDate" cname="采购申请日期" width="110" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true" readonly="true"/>
<EF:EFColumn ename="proApplyNo" cname="采购申请单号" enable="false" width="130" align="center"/>
...
...
@@ -85,8 +85,7 @@
<EF:EFColumn ename="unit" cname="单位" width="80" align="center" readonly="true"/>
<EF:EFColumn ename="remark" cname="备注" width="150"/>
<EF:EFComboColumn ename="proApplyStatus" cname="提交状态" width="80" align="center" enable="false" defaultValue="0">
<EF:EFOption label="未提交" value="0"/>
<EF:EFOption label="已提交" value="1"/>
<EF:EFCodeOption codeName="hpjx.hpcg.proApplyStatus"/>
</EF:EFComboColumn>
<EF:EFColumn ename="oldPurchaseNo" cname="原采购单号" enable="false" width="140" align="center" hidden="true"/>
</EF:EFGrid>
...
...
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