Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ElectricitySheep
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
黄媛媛
ElectricitySheep
Commits
456e105d
Commit
456e105d
authored
Dec 28, 2021
by
Mac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
a9a4f144
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
71 additions
and
57 deletions
+71
-57
printManage.vue
src/components/empower/printManage.vue
+71
-57
No files found.
src/components/empower/printManage.vue
View file @
456e105d
...
...
@@ -103,7 +103,7 @@
</div>
<div
v-if=
"dataList.length==0"
style=
"width:100%;text-align: center;margin:30px 0"
>
暂无打印标签
</div>
<div
style=
"margin-top:10px"
v-for=
"(i,j) in dataList"
:key=
"j"
v-if=
"dataList.length>0 && radio==1"
v-loading=
"fullscreenLoading"
>
<div
style=
"margin-top:10px
;overflow:auto
"
v-for=
"(i,j) in dataList"
:key=
"j"
v-if=
"dataList.length>0 && radio==1"
v-loading=
"fullscreenLoading"
>
<div
style=
"margin:20px 0;font-size:16px;color:rgb(64, 158, 255)"
>
<span
>
商品名称:
{{
i
.
GoodsName
}}
</span>
</div>
...
...
@@ -115,7 +115,8 @@
<div>
<el-row
:gutter=
"10"
>
<el-col
:span=
"12"
>
<img
:src=
"domainManager().DomainUrl+item.QRImage"
alt=
""
style=
"width:100%"
>
<el-image
:src=
"domainManager().DomainUrl+item.QRImage"
lazy
style=
"width:100%"
></el-image>
<!--
<img
:src=
"domainManager().DomainUrl+item.QRImage"
alt=
""
style=
"width:100%"
>
-->
</el-col>
<el-col
:span=
"12"
style=
'font-size:12px;'
>
<div
style=
'margin-top:20px'
>
...
...
@@ -149,40 +150,18 @@
</el-row>
</div>
<!-- 小图模式 -->
<div
style=
"margin-top:10px"
v-for=
"(i,j) in dataList"
:key=
"j"
v-if=
"dataList.length>0 && radio==2"
v-loading=
"fullscreenLoading"
>
<div
style=
"margin-top:10px
;overflow:auto
"
v-for=
"(i,j) in dataList"
:key=
"j"
v-if=
"dataList.length>0 && radio==2"
v-loading=
"fullscreenLoading"
>
<div
style=
"margin:20px 0;font-size:16px;color:rgb(64, 158, 255)"
>
<span
>
商品名称:
{{
i
.
GoodsName
}}
</span>
</div>
<!--
<el-row
:gutter=
"30"
>
-->
<!--
<el-col
:span=
"4"
v-for=
"(item,index) in i.list"
:key=
"index"
>
-->
<!--
<div
:class=
"item.Ischeck ==true? 'print_item2':'print_item'"
@
click=
"gocheke(j,index)"
>
-->
<!--
<el-row
:gutter=
"10"
>
-->
<!--
<el-col
:span=
"12"
>
-->
<!--
<img
:src=
"domainManager().DomainUrl+item.QRImage"
alt=
""
style=
"width:100%"
>
-->
<!--
</el-col>
-->
<!--
<el-col
:span=
"12"
style=
'font-size:11px;'
>
-->
<!--
<div
style=
'margin-top:5px'
>
-->
<!--
<span>
序号:
</span>
-->
<!--
<span>
{{
item
.
xuhao
}}
</span>
-->
<!--
</div>
-->
<!--
<div
style=
'margin-top:0px'
>
-->
<!--
<span>
{{
item
.
ExpirationDate
}}
</span>
-->
<!--
</div>
-->
<!--
<div
style=
'margin-top:5px; width:100%; height:32px;text-overflow: ellipsis; display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 2;overflow: hidden;'
>
-->
<!--
<span>
{{
item
.
GoodsName
}}
</span>
-->
<!--
</div>
-->
<!--
</el-col>
-->
<!--
</el-row>
-->
<!--
</div>
-->
<!--
</el-col>
-->
<!--
</el-row>
-->
<div
style=
"width: 100%;display: flex;flex-wrap: wrap"
>
<div
v-for=
"(item,index) in i.list"
:key=
"index"
:class=
"item.Ischeck ==true? 'print_item2':'print_item'"
@
click=
"gocheke(j,index)"
>
<img
:src=
"domainManager().DomainUrl+item.QRImage"
alt=
""
style=
"width:85px;height: 85px;"
>
<!--
<img
:src=
"domainManager().DomainUrl+item.QRImage"
alt=
""
style=
"width:85px;height: 85px;"
>
-->
<div
style=
"width:85px;height: 85px"
>
<el-image
:src=
"domainManager().DomainUrl+item.QRImage"
lazy
style=
"width:85px;height: 85px"
></el-image>
</div>
<div>
<div
style=
'margin-top:5px'
>
<span>
序号:
</span>
...
...
@@ -198,6 +177,7 @@
</div>
</div>
</div>
<!-- 选择区域 -->
<div
class=
"xuanzhong"
id =
'xuanzhong'
style=
"display:none"
>
<!--
<div
v-for=
"(item,index) in checkList"
:key=
"index"
class=
"xuanzhong_item"
:id =
"item.page"
>
-->
<div
v-for=
"(item,index) in checkList"
:key=
"index"
:id =
"item.page"
style=
" width: 283px; height: 283px;padding: 10px;display: flex;flex-direction: column; justify-content: space-around;"
>
...
...
@@ -238,7 +218,7 @@
</div>
<!-- 小图模式打印 -->
<div
class=
"xuanzhong"
id =
'xuanzhong'
style=
"display:none"
>
<div
class=
"xuanzhong"
id =
'xuanzhong'
>
<!--
<div
v-for=
"(item,index) in checkList"
:key=
"index"
class=
"xuanzhong_item"
:id =
"item.page"
>
-->
<div
v-for=
"(item,index) in checkList"
:key=
"index"
:id =
"item.xpage"
style=
" width: 125px; height: 100px;display: flex;flex-direction: column; justify-content: space-around;"
>
<!--
<div
style=
" width:100%; height:20px;text-overflow: ellipsis; display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 1;overflow: hidden;font-size:12px"
>
...
...
@@ -291,11 +271,13 @@ export default {
xzCreateDate
:
''
,
GoodsNames
:
''
,
radio
:
'2'
,
alldatas
:[],
//没做处理的数据
};
},
created
()
{
},
methods
:
{
groupArr
(
list
,
field
){
var
fieldList
=
[],
att
=
[];
...
...
@@ -335,6 +317,7 @@ export default {
this
.
fullscreenLoading
=
false
if
(
res
.
data
.
resultCode
==
1
)
{
let
data
=
res
.
data
.
data
this
.
alldatas
=
JSON
.
parse
(
JSON
.
stringify
(
data
))
data
.
forEach
(
x
=>
{
x
.
Ischeck
=
false
})
...
...
@@ -347,6 +330,8 @@ export default {
j
.
xuhao
=
index
+
1
+
'/'
+
x
.
list
.
length
})
})
// let list = JSON.parse(JSON.stringify(this.dataList))
console
.
log
(
this
.
dataList
)
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
...
...
@@ -354,43 +339,72 @@ export default {
},
gocheke
(
j
,
index
){
this
.
dataList
[
j
].
list
[
index
].
Ischeck
=
!
this
.
dataList
[
j
].
list
[
index
].
Ischeck
;
let
data
=
[];
this
.
dataList
.
forEach
((
x
,
i
)
=>
{
x
.
list
.
forEach
((
j
)
=>
{
if
(
j
.
Ischeck
==
true
){
let
obj
=
j
;
data
.
push
(
obj
)
if
(
this
.
dataList
[
j
].
list
[
index
].
Ischeck
==
true
){
//选中
this
.
checkList
.
push
(
this
.
dataList
[
j
].
list
[
index
])
}
else
{
let
chekindex
=
0
for
(
let
i
=
0
;
i
<
this
.
checkList
.
length
;
i
++
){
//删除
if
(
this
.
dataList
[
j
].
list
[
index
].
xuhao
==
this
.
checkList
[
i
].
xuhao
&&
this
.
dataList
[
j
].
list
[
index
].
GoodsId
==
this
.
checkList
[
i
].
GoodsId
){
//判断序号和GoodsId
chekindex
=
i
break
}
}
})
})
this
.
checkList
=
data
this
.
checkList
.
splice
(
chekindex
,
1
)
}
//之前的判断 点击的时候都重新组装的
// let data = [];
// this.dataList.forEach((x,i)=>{
// x.list.forEach((j)=>{
// if(j.Ischeck==true){
// let obj = j;
// data.push(obj)
// }
// })
// })
// this.checkList = data
this
.
checkList
.
forEach
((
x
,
i
)
=>
{
x
.
page
=
'page'
+
(
i
+
1
)
x
.
xpage
=
'xpage'
+
(
i
+
1
)
});
this
.
$forceUpdate
()
},
allcheckbtn
(){
if
(
this
.
allchecked
==
true
){
let
data
=
[];
this
.
dataList
.
forEach
((
x
,
i
)
=>
{
x
.
list
.
forEach
((
j
,
i2
)
=>
{
j
.
Ischeck
=
true
;
let
obj
=
j
;
// obj.page = 'page'+(i+1)
data
.
push
(
obj
)
})
})
this
.
checkList
=
data
;
this
.
checkList
.
forEach
((
x
,
i
)
=>
{
x
.
page
=
'page'
+
(
i
+
1
)
x
.
xpage
=
'xpage'
+
(
i
+
1
)
const
loading
=
this
.
$loading
({
lock
:
true
,
text
:
'数据处理中...'
,
spinner
:
'el-icon-loading'
,
});
this
.
dataList
.
forEach
((
x
,
i
)
=>
{
//处理显示问题
x
.
list
.
forEach
((
j
,
i2
)
=>
{
j
.
Ischeck
=
true
;
setTimeout
(()
=>
{
//20ms 是1000/25 得到的
data
.
push
(
j
)
if
(
this
.
dataList
.
length
==
i
+
1
&&
x
.
list
.
length
==
i2
+
1
){
//最后一个的时候数据处理
this
.
checkList
=
data
;
this
.
checkList
.
forEach
((
x
,
i
)
=>
{
x
.
page
=
'page'
+
(
i
+
1
)
x
.
xpage
=
'xpage'
+
(
i
+
1
)
})
}
},
50
)
})
})
loading
.
close
();
}
else
{
this
.
dataList
.
forEach
(
x
=>
{
...
...
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