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
b390dc05
Commit
b390dc05
authored
Oct 24, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-10-24 生产管理报表
parent
65d3c62d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
444 additions
and
7 deletions
+444
-7
HGSC013.js
src/main/webapp/HG/SC/HGSC013.js
+335
-0
HGSC013.jsp
src/main/webapp/HG/SC/HGSC013.jsp
+109
-7
No files found.
src/main/webapp/HG/SC/HGSC013.js
View file @
b390dc05
$
(
function
()
{
let
inInfo
=
new
EiInfo
();
$
(
"#QUERY"
).
on
(
"click"
,
()
=>
{
inInfo
.
set
(
"inqu_status-0-companyCode"
,
$
(
"#inqu_status-0-companyCode"
).
val
());
inInfo
.
set
(
"inqu_status-0-contractDate"
,
$
(
"#inqu_status-0-contractDate"
).
val
())
inInfo
.
set
(
"inqu_status-0-contractCode"
,
$
(
"#inqu_status-0-contractCode"
).
val
())
inInfo
.
set
(
"inqu_status-0-supCode"
,
$
(
"#inqu_status-0-supCode"
).
val
())
vue
.
onLoading
()
});
IPLATUI
.
EFGrid
.
result
=
{
pageable
:
{
pageSize
:
20
,
pageSizes
:
[
10
,
20
,
50
,
70
,
100
],
},
columns
:
[
],
loadComplete
:
function
(
grid
)
{
},
onSuccess
:
function
(
e
)
{
}
}
let
vue
=
new
Vue
({
el
:
'#table-box'
,
data
(){
return
{
columns
:
[
{
label
:
"委外加工单"
,
tableType
:
'th'
,
colspan
:
9
},
{
label
:
"委外出库单"
,
tableType
:
'th'
,
colspan
:
3
},
{
label
:
"委外加工单"
,
tableType
:
'th'
,
colspan
:
5
},
{
label
:
"委外入库单"
,
tableType
:
'th'
,
colspan
:
3
},
],
columns2
:[
{
label
:
'公司名称'
,
value
:
'companyName'
},
{
label
:
'委外加工日期'
,
value
:
'contractDate'
},
{
label
:
'委外加工单号'
,
value
:
'contractCode'
},
{
label
:
'供应商名称'
,
value
:
'supName'
},
{
label
:
'材料编码'
,
value
:
'lcinventCode'
},
{
label
:
'材料名称'
,
value
:
'lcinventName'
},
{
label
:
'材料规格'
,
value
:
'lcspec'
},
{
label
:
'计划出库数量'
,
value
:
'jhckQty'
},
{
label
:
'计划出库重量'
,
value
:
'jhckWeight'
},
{
label
:
'出库日期'
,
value
:
'outDate'
},
{
label
:
'实际出库数量'
,
value
:
'sjckoutQty'
},
{
label
:
'实际出库重量'
,
value
:
'sjckoutWeight'
},
{
label
:
'成品编码'
,
value
:
'productCode'
},
{
label
:
'成品名称'
,
value
:
'productName'
},
{
label
:
'成品规格'
,
value
:
'rkspec'
},
{
label
:
'计划入库数量'
,
value
:
'jhrkdepositQty'
},
{
label
:
'计划入库重量'
,
value
:
'jhrkdepositWeight'
},
{
label
:
'入库日期'
,
value
:
'depositDate'
},
{
label
:
'实际入库数量'
,
value
:
'actualQty'
},
{
label
:
'实际入库重量'
,
value
:
'depositWeight'
}
],
list
:[]
}
},
mounted
(){
this
.
onLoading
();
},
methods
:{
onLoading
(){
let
that
=
this
;
IPLAT
.
EiCommunicator
.
send
(
'HGSC012'
,
'query'
,
inInfo
,
{
onSuccess
:
(
res
)
=>
{
if
(
res
.
extAttr
.
result
&&
res
.
extAttr
.
result
.
length
){
that
.
list
=
[];
let
list
=
res
.
extAttr
.
result
.
map
(
item
=>
{
return
{
...
item
,
contractDate
:
item
.
contractDate
?
dayjs
(
item
.
contractDate
).
format
(
'YYYY-MM-DD'
):
''
,
outDate
:
item
.
outDate
?
dayjs
(
item
.
outDate
).
format
(
'YYYY-MM-DD'
):
''
,
depositDate
:
item
.
depositDate
?
dayjs
(
item
.
depositDate
).
format
(
'YYYY-MM-DD'
):
''
}
}).
map
(
item
=>
{
let
obj
=
{}
that
.
columns2
.
forEach
(
val
=>
{
obj
[
val
.
value
]
=
{
value
:
item
[
val
.
value
],
rowspan
:
1
,
show
:
true
}
})
return
obj
});
let
contractCodeObj
=
{}
list
.
forEach
(
item
=>
{
contractCodeObj
[
item
.
contractCode
.
value
]
=
''
;
})
let
contractCodeList
=
Object
.
keys
(
contractCodeObj
);
let
arr1
=
contractCodeList
.
map
(
val
=>
{
let
a
=
list
.
filter
(
val2
=>
val2
.
contractCode
.
value
===
val
);
let
obj2
=
{}
a
.
forEach
(
item2
=>
{
obj2
[
item2
.
lcinventCode
.
value
]
=
''
;
});
let
bList
=
Object
.
keys
(
obj2
)
let
Elist
=
bList
.
map
(
item3
=>
{
let
b
=
a
.
filter
(
val2
=>
val2
.
lcinventCode
.
value
===
item3
);
return
b
;
})
if
(
Elist
.
length
){
let
fList
=
[];
Elist
.
forEach
(
val4
=>
{
if
(
val4
.
length
){
let
g
=
val4
.
map
((
val5
,
i4
)
=>
{
return
{
...
val5
,
lcinventCode
:{
...
val5
.
lcinventCode
,
rowspan
:
val4
.
length
,
show
:
!
i4
},
lcinventName
:{
...
val5
.
lcinventName
,
rowspan
:
val4
.
length
,
show
:
!
i4
},
lcspec
:{
...
val5
.
lcspec
,
rowspan
:
val4
.
length
,
show
:
!
i4
},
jhckQty
:{
...
val5
.
jhckQty
,
rowspan
:
val4
.
length
,
show
:
!
i4
},
jhckWeight
:{
...
val5
.
jhckWeight
,
rowspan
:
val4
.
length
,
show
:
!
i4
},
outDate
:{
...
val5
.
outDate
,
rowspan
:
val4
.
length
,
show
:
!
i4
},
sjckoutQty
:{
...
val5
.
sjckoutQty
,
rowspan
:
val4
.
length
,
show
:
!
i4
},
sjckoutWeight
:{
...
val5
.
sjckoutWeight
,
rowspan
:
val4
.
length
,
show
:
!
i4
},
}
})
let
productCodeObj
=
{}
g
.
forEach
(
item3
=>
{
productCodeObj
[
item3
.
productCode
.
value
]
=
''
;
})
let
gList
=
Object
.
keys
(
productCodeObj
)
let
Hlist
=
gList
.
map
(
item4
=>
{
let
d
=
g
.
filter
(
val7
=>
val7
.
productCode
.
value
===
item4
);
return
d
.
map
((
val6
,
i5
)
=>
{
return
{
...
val6
,
productCode
:{
...
val6
.
productCode
,
rowspan
:
d
.
length
,
show
:
!
i5
},
productName
:{
...
val6
.
productName
,
rowspan
:
d
.
length
,
show
:
!
i5
},
rkspec
:{
...
val6
.
rkspec
,
rowspan
:
d
.
length
,
show
:
!
i5
},
jhrkdepositQty
:{
...
val6
.
jhrkdepositQty
,
rowspan
:
d
.
length
,
show
:
!
i5
},
jhrkdepositWeight
:{
...
val6
.
jhrkdepositWeight
,
rowspan
:
d
.
length
,
show
:
!
i5
}
}
});
})
let
finalArr
=
[]
Hlist
.
forEach
(
item6
=>
{
finalArr
.
push
(...
item6
);
})
fList
.
push
(...
finalArr
)
}
})
a
=
fList
;
}
return
a
.
map
((
val3
,
i3
)
=>
{
return
{
...
val3
,
companyName
:{
...
val3
.
companyName
,
rowspan
:
a
.
length
,
show
:
!
i3
},
contractDate
:{
...
val3
.
contractDate
,
rowspan
:
a
.
length
,
show
:
!
i3
},
contractCode
:{
...
val3
.
contractCode
,
rowspan
:
a
.
length
,
show
:
!
i3
},
supName
:{
...
val3
.
supName
,
rowspan
:
a
.
length
,
show
:
!
i3
}
}
})
})
arr1
.
forEach
(
item
=>
{
that
.
list
.
push
(...
item
);
})
}
},
onFail
:
(
err
)
=>
{
console
.
error
(
'request_tools----------------->错误信息'
,
err
);
}
},
{
async
:
false
}
);
}
}
})
});
src/main/webapp/HG/SC/HGSC013.jsp
View file @
b390dc05
...
@@ -5,12 +5,114 @@
...
@@ -5,12 +5,114 @@
Time: 14:51
Time: 14:51
To change this template use File | Settings | File Templates.
To change this template use File | Settings | File Templates.
--%>
--%>
<!DOCTYPE html>
<%@ page import="com.baosight.iplat4j.core.web.threadlocal.UserSession" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<head>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<title>
Title
</title>
<%
</head>
String loginName = UserSession.getLoginName();
<body>
%>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<c:set var="loginName" value="<%=loginName%>" />
<script>
var ctx = "${ctx}";
</script>
<script src="${ctx}/common/js/dayjs.min.js"></script>
<script src="${ctx}/common/js/vue-2.6.10.js"></script>
<style>
table{
border-color: #99d2ff;
}
table tr{
}
table tr th{
padding: 2px 8px;
font-size: .8125rem;
color: #2f80ed;
background: #dbefff;
height: 30px;
text-align: center;
}
table tr th span{
white-space: nowrap;
}
table tr td span{
white-space: nowrap;
}
table tr td{
padding: 0 8px;
height: 25px;
}
#table-box{
position: relative;
width: 100%;
overflow: auto;
min-height: 100%;
height: 74vh;
}
#table-box .table-content{
position: absolute;
min-height: 100%;
min-width: 100%;
}
.bg-blue{
background-color: #eff8ff;
}
</style>
<EF:EFPage title="委外执行加工表">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFSelect blockId="inqu_status" row="0" ename="companyCode" cname="公司名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="roleCompany" textField="companyName" valueField="companyCode"/>
</EF:EFSelect>
<EF:EFDatePicker blockId="inqu_status" row="0" ename="contractDate" cname="委外加工日期" role="date"
format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="contractCode" cname="委外加工单号" placeholder="模糊查询" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="supCode" cname="供应商名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="sup_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
</EF:EFGrid>
<section id="table-box">
<section class="table-content">
<table border="1" >
<colgroup>
<col v-for="(item,k) in columns2" :key="k">
</colgroup>
<thead>
<tr>
<th v-for="(item,k) in columns" :key="k" :colspan="item.colspan">
<span>{{item.label}}</span>
</th>
</tr>
<tr>
<th v-for="(item,k) in columns2" :key="k" >
<span>{{item.label}}</span>
</th>
</tr>
</thead>
<tbody>
<tr v-for="(valObj,i) in list" :key="i">
<td v-for="(item,k) in columns2" :key="k" v-if="valObj[item.value].show" :rowspan="valObj[item.value].rowspan" :class="i/2%1?'bg-blue':''">
<span>{{valObj[item.value].value}}</span>
</td>
</tr>
</tbody>
</table>
</section>
</section>
</EF:EFRegion>
</EF:EFPage>
</body>
</html>
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