Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
template_vue
Project
Project
Details
Activity
Releases
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
杨硕
template_vue
Commits
0c655a17
Commit
0c655a17
authored
Apr 10, 2025
by
liwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改了一键确认bug以及loadingbug
parent
9841c5c0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
19 deletions
+47
-19
A1CheckOrders.vue
src/views/sample/chCheckOrder/CheckOrders/A1CheckOrders.vue
+39
-13
index.vue
src/views/sample/chCheckOrder/index.vue
+8
-6
No files found.
src/views/sample/chCheckOrder/CheckOrders/A1CheckOrders.vue
View file @
0c655a17
...
@@ -370,19 +370,6 @@ export default {
...
@@ -370,19 +370,6 @@ export default {
const
values
=
rowData
.
dictValue
.
split
(
','
)
const
values
=
rowData
.
dictValue
.
split
(
','
)
const
remarksValues
=
rowData
.
remarks
.
split
(
','
)
const
remarksValues
=
rowData
.
remarks
.
split
(
','
)
this
.
fixedColumnCount
=
values
.
length
this
.
fixedColumnCount
=
values
.
length
// 往table表格里放值,但排除row1表头
if
(
rowData
.
dictLabel
!==
'row1'
)
{
const
result
=
{}
for
(
let
j
=
0
;
j
<
values
.
length
;
j
++
)
{
result
[
j
]
=
values
[
j
]
}
this
.
tableData
.
push
(
result
)
const
remarks
=
{}
for
(
let
j
=
0
;
j
<
remarksValues
.
length
;
j
++
)
{
remarks
[
j
]
=
remarksValues
[
j
]
}
this
.
tableRemarks
.
push
(
remarks
)
}
if
(
rowData
.
dictLabel
===
'row1'
)
{
if
(
rowData
.
dictLabel
===
'row1'
)
{
// 获取表头数据 循环values
// 获取表头数据 循环values
for
(
let
i
=
0
;
i
<
values
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
values
.
length
;
i
++
)
{
...
@@ -394,6 +381,45 @@ export default {
...
@@ -394,6 +381,45 @@ export default {
}
}
this
.
tableHeaderLength
=
this
.
tableHeader
.
length
this
.
tableHeaderLength
=
this
.
tableHeader
.
length
}
}
// 往table表格里放值,但排除row1表头
if
(
rowData
.
dictLabel
!==
'row1'
)
{
const
result
=
{}
for
(
let
j
=
0
;
j
<
this
.
tableHeader
.
length
;
j
++
)
{
// i !== templateData.length - 1 代表着不是最后一行
if
(
i
!==
templateData
.
length
-
1
)
{
// 处理固定列之外的列值 赋成空字符串
if
(
j
<
values
.
length
)
{
result
[
j
]
=
values
[
j
]
}
else
{
result
[
j
]
=
''
}
}
else
{
// 最后一行需要单独给固定列的后一个赋值
if
(
j
<
values
.
length
)
{
result
[
j
]
=
values
[
j
]
}
else
{
result
[
this
.
fixedColumnCount
]
=
''
}
}
}
this
.
tableData
.
push
(
result
)
// 重新排序
this
.
tableData
=
this
.
tableData
.
map
(
row
=>
{
// 获取对象的键,并按升序排序
const
sortedKeys
=
Object
.
keys
(
row
).
map
(
Number
).
sort
((
a
,
b
)
=>
a
-
b
)
// 创建一个新对象,重新映射键
const
newRow
=
{}
sortedKeys
.
forEach
((
key
,
index
)
=>
{
newRow
[
index
]
=
row
[
key
]
// 从 0 开始映射
})
return
newRow
})
const
remarks
=
{}
for
(
let
j
=
0
;
j
<
remarksValues
.
length
;
j
++
)
{
remarks
[
j
]
=
remarksValues
[
j
]
}
this
.
tableRemarks
.
push
(
remarks
)
}
}
}
this
.
loading
=
false
this
.
loading
=
false
}
else
{
}
else
{
...
...
src/views/sample/chCheckOrder/index.vue
View file @
0c655a17
...
@@ -709,12 +709,6 @@ export default {
...
@@ -709,12 +709,6 @@ export default {
this
.
updateFlag
=
false
this
.
updateFlag
=
false
// 将一键确认标志改为false
// 将一键确认标志改为false
this
.
oneKeyFlag
=
false
this
.
oneKeyFlag
=
false
// 生成的是每一行的结果列是否需要验证 false为不需要验证 true为需要验证
const
result
=
{
}
for
(
let
i
=
0
;
i
<
this
.
tableData1
.
length
;
i
++
)
{
result
[
i
]
=
true
}
this
.
verifyResultFlag
=
result
this
.
ocr
()
this
.
ocr
()
}
,
}
,
cancel
()
{
cancel
()
{
...
@@ -757,9 +751,17 @@ export default {
...
@@ -757,9 +751,17 @@ export default {
chStype
:
this
.
form
.
chStype
chStype
:
this
.
form
.
chStype
}
}
getOcrData
(
params
).
then
(
res
=>
{
getOcrData
(
params
).
then
(
res
=>
{
// 生成的是每一行的结果列是否需要验证 false为不需要验证 true为需要验证
const
result
=
{
}
for
(
let
i
=
0
;
i
<
this
.
tableData1
.
length
;
i
++
)
{
result
[
i
]
=
true
}
this
.
verifyResultFlag
=
result
this
.
ocrArray
=
res
.
data
.
resultList
this
.
ocrArray
=
res
.
data
.
resultList
this
.
lot
=
res
.
data
.
lot
this
.
lot
=
res
.
data
.
lot
this
.
dialogLoading
=
false
this
.
dialogLoading
=
false
}
).
catch
(()
=>
{
this
.
dialogLoading
=
false
}
)
}
)
}
,
}
,
// 选择主类型模版
// 选择主类型模版
...
...
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