Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mes-pad
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
ximai
mes-pad
Commits
4eaefc8e
Commit
4eaefc8e
authored
Jul 22, 2024
by
沈翠玲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复不能滚动的问题
parent
418a8e19
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
21 deletions
+35
-21
index.vue
pages/mes/prodReport/index.vue
+30
-16
addDialog.vue
pages/mes/qc/components/addDialog.vue
+2
-2
index.vue
pages/mes/qc/index.vue
+3
-3
No files found.
pages/mes/prodReport/index.vue
View file @
4eaefc8e
...
@@ -1948,7 +1948,7 @@ export default {
...
@@ -1948,7 +1948,7 @@ export default {
})
})
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
if
(
res
.
code
===
200
)
{
if
(
res
.
code
===
200
)
{
let
currentIndex
=
0
let
currentIndex
=
-
1
this
.
$refs
[
'zbtable'
].
bodyScrollTop
=
0
this
.
$refs
[
'zbtable'
].
bodyScrollTop
=
0
// 过滤可加工数量为0的数据
// 过滤可加工数量为0的数据
this
.
tableData
=
res
.
rows
.
map
((
item
,
index
)
=>
{
this
.
tableData
=
res
.
rows
.
map
((
item
,
index
)
=>
{
...
@@ -1966,21 +1966,35 @@ export default {
...
@@ -1966,21 +1966,35 @@ export default {
if
(
this
.
tableData
.
length
>
0
)
{
if
(
this
.
tableData
.
length
>
0
)
{
this
.
curTaskInfo
=
this
.
tableData
[
0
];
this
.
curTaskInfo
=
this
.
tableData
[
0
];
this
.
getMaterialUsageRecordList
();
this
.
getMaterialUsageRecordList
();
this
.
$nextTick
(()
=>
{
if
(
currentIndex
>
-
1
)
{
const
query
=
uni
.
createSelectorQuery
().
in
(
this
)
this
.
$nextTick
(()
=>
{
query
const
query
=
uni
.
createSelectorQuery
().
in
(
this
)
.
select
(
'#tableBody'
)
query
.
boundingClientRect
()
.
select
(
'#tableBody'
)
query
.
select
(
'#tableBody .item-tr'
)
.
boundingClientRect
()
.
boundingClientRect
()
query
.
selectAll
(
'#tableBody .item-tr'
)
query
.
exec
(
res
=>
{
.
boundingClientRect
()
const
data1
=
res
[
0
]
query
.
exec
(
res
=>
{
const
height
=
res
[
1
]
?
res
[
1
].
height
:
80.8
const
data1
=
res
[
0
]
const
currentIndexPlus
=
currentIndex
+
1
let
scrollTop
=
0
const
scrollTop
=
((
height
*
currentIndexPlus
)
>
data1
.
height
)
?
(
height
*
currentIndexPlus
)
:
0
// const currentIndexPlus = currentIndex + 1
this
.
$refs
[
'zbtable'
].
bodyScrollTop
=
scrollTop
let
sumheight
=
0
})
if
(
res
[
1
]
&&
Array
.
isArray
(
res
[
1
])
&&
res
[
1
].
length
>
0
)
{
})
res
[
1
].
forEach
((
item
,
index
)
=>
{
if
(
index
<
currentIndex
)
{
sumheight
+=
item
.
height
}
})
scrollTop
=
(
sumheight
>
data1
.
height
)
?
sumheight
:
(
res
[
1
][
currentIndex
].
height
+
sumheight
)
>
data1
.
height
?
sumheight
:
0
}
else
{
const
height
=
80.8
scrollTop
=
((
height
*
currentIndex
)
>
data1
.
height
)
?
(
height
*
currentIndex
)
:
0
}
this
.
$refs
[
'zbtable'
].
bodyScrollTop
=
scrollTop
})
})
}
}
}
}
}
}).
catch
(
e
=>
{
}).
catch
(
e
=>
{
...
...
pages/mes/qc/components/addDialog.vue
View file @
4eaefc8e
...
@@ -66,7 +66,7 @@
...
@@ -66,7 +66,7 @@
<view
class=
"btnbox"
>
<view
class=
"btnbox"
>
<u-button
type=
"success"
v-if=
"isEdit"
size=
"medium"
@
click=
"handleAddFirstEdit"
>
新增
</u-button>
<u-button
type=
"success"
v-if=
"isEdit"
size=
"medium"
@
click=
"handleAddFirstEdit"
>
新增
</u-button>
</view>
</view>
<
view
class=
"line-content-item"
>
<
scroll-view
scroll-y=
"true"
show-scrollbar=
"true"
class=
"line-content-item"
>
<uni-table
ref=
"qcLineTable"
class=
"line-table"
border
stripe
:loading=
"loading"
emptyText=
"未查询到数据"
>
<uni-table
ref=
"qcLineTable"
class=
"line-table"
border
stripe
:loading=
"loading"
emptyText=
"未查询到数据"
>
<uni-tr>
<uni-tr>
<uni-th
width=
"100px"
align=
"center"
>
质检项目
</uni-th>
<uni-th
width=
"100px"
align=
"center"
>
质检项目
</uni-th>
...
@@ -101,7 +101,7 @@
...
@@ -101,7 +101,7 @@
</uni-td>
-->
</uni-td>
-->
</uni-tr>
</uni-tr>
</uni-table>
</uni-table>
</view>
</
scroll-
view>
<u-modal
<u-modal
title=
"选择人员"
title=
"选择人员"
@
confirm=
"userDetermine()"
@
confirm=
"userDetermine()"
...
...
pages/mes/qc/index.vue
View file @
4eaefc8e
...
@@ -124,7 +124,7 @@
...
@@ -124,7 +124,7 @@
<view
class=
"btnbox"
>
<view
class=
"btnbox"
>
<u-button
v-if=
"btnType === 'firstEdit'"
type=
"success"
size=
"medium"
@
click=
"handleAddFirstEdit"
>
新增
</u-button>
<u-button
v-if=
"btnType === 'firstEdit'"
type=
"success"
size=
"medium"
@
click=
"handleAddFirstEdit"
>
新增
</u-button>
</view>
</view>
<
view
class=
"line-content-item"
>
<
scroll-view
scroll-y=
"true"
show-scrollbar=
"true"
class=
"line-content-item"
>
<uni-table
ref=
"qcLineTable"
class=
"line-table"
border
stripe
:loading=
"loading"
emptyText=
"未查询到数据"
>
<uni-table
ref=
"qcLineTable"
class=
"line-table"
border
stripe
:loading=
"loading"
emptyText=
"未查询到数据"
>
<uni-tr>
<uni-tr>
<uni-th
width=
"100px"
align=
"center"
>
质检项目
</uni-th>
<uni-th
width=
"100px"
align=
"center"
>
质检项目
</uni-th>
...
@@ -153,8 +153,8 @@
...
@@ -153,8 +153,8 @@
</uni-td>
</uni-td>
</uni-tr>
</uni-tr>
</uni-table>
</uni-table>
<
/view
>
<
!-- </view> --
>
<
!-- </scroll-view> --
>
<
/scroll-view
>
</u-modal>
</u-modal>
<u-modal
<u-modal
title=
"选择人员"
title=
"选择人员"
...
...
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