Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-web
/
sso-equity
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit eeef1cdf
authored
Mar 30, 2023
by
zhangquan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
代码优化
1 parent
83e68a3a
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
6 deletions
src/views/goodsCoupon/addCoupon.vue
src/views/templateConfig/components/selectCouponDialog.vue
src/views/templateConfig/index.vue
src/views/goodsCoupon/addCoupon.vue
View file @
eeef1cd
...
@@ -33,9 +33,9 @@
...
@@ -33,9 +33,9 @@
</div>
</div>
<div
class=
"error_coupon"
>
<div
class=
"error_coupon"
>
<div
class=
"coupon_item"
v-for=
"(item, index) in errorCouponList"
:key=
"index"
>
<div
class=
"coupon_item"
v-for=
"(item, index) in errorCouponList"
:key=
"index"
>
<img
v-if=
"item.appearance == 1"
src=
"@/assets/coupon.png"
alt=
""
/>
<img
class=
"r-margin"
v-if=
"item.appearance == 1"
src=
"@/assets/coupon.png"
alt=
""
/>
<img
v-else
src=
"@/assets/directCharge.png"
alt=
""
/>
<img
class=
"r-margin"
v-else
src=
"@/assets/directCharge.png"
alt=
""
/>
<span
class=
"info"
>
【
{{
item
.
brandName
}}{{
item
.
productName
}}{{
item
.
appearance
==
2
?
item
.
denomination
:
''
}}
】
{{
item
.
newCost
}}
元
</span>
<span
class=
"info"
>
{{
item
.
newCost
}}
元【
{{
item
.
brandName
}}{{
item
.
productName
}}{{
item
.
appearance
==
2
?
item
.
denomination
:
''
}}
】
{{
couponFormObj
.
effectiveDays
}}
天
</span>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -222,6 +222,9 @@ export default {
...
@@ -222,6 +222,9 @@ export default {
padding
:
32px
30px
;
padding
:
32px
30px
;
min-height
:
calc
(
100vh
-
190px
);
min-height
:
calc
(
100vh
-
190px
);
position
:
relative
;
position
:
relative
;
.r-margin{
margin-right
:
5px
;
}
/
deep
/
.glsx-combi-form
{
/
deep
/
.glsx-combi-form
{
padding-bottom
:
30px
;
padding-bottom
:
30px
;
}
}
...
...
src/views/templateConfig/components/selectCouponDialog.vue
View file @
eeef1cd
...
@@ -25,8 +25,8 @@
...
@@ -25,8 +25,8 @@
<div
class=
"gift_item"
v-for=
"(item, index) in val"
:key=
"index"
>
<div
class=
"gift_item"
v-for=
"(item, index) in val"
:key=
"index"
>
<img
class=
"muti_icon"
src=
"@/assets/muti-selected.png"
@
click=
"handleGiftDelete(key, item, index)"
/>
<img
class=
"muti_icon"
src=
"@/assets/muti-selected.png"
@
click=
"handleGiftDelete(key, item, index)"
/>
<!--
<img
class=
"muti_icon"
src=
"@/assets/muti-no-select.png"
@
click=
"handleGiftDelete(item, index)"
/>
-->
<!--
<img
class=
"muti_icon"
src=
"@/assets/muti-no-select.png"
@
click=
"handleGiftDelete(item, index)"
/>
-->
<el-tooltip
effect=
"dark"
placement=
"top"
:disabled=
"item.goodsName.length
<
=
8
">
<el-tooltip
effect=
"dark"
placement=
"top"
:disabled=
"item.goodsName.length
<
=
7
">
<p
:class=
"['gift_coupon_name', 'ellipsis-1', item.status == '3' ? 'txt-grey' : '']"
>
{{
item
.
goodsName
.
length
>
8
?
item
.
goodsName
.
slice
(
0
,
8
)
+
'...'
:
item
.
goodsName
}}
</p>
<p
:class=
"['gift_coupon_name', 'ellipsis-1', item.status == '3' ? 'txt-grey' : '']"
>
{{
item
.
goodsName
.
length
>
7
?
item
.
goodsName
.
slice
(
0
,
7
)
+
'...'
:
item
.
goodsName
}}
</p>
<div
slot=
"content"
>
{{
item
.
goodsName
}}
</div>
<div
slot=
"content"
>
{{
item
.
goodsName
}}
</div>
</el-tooltip>
</el-tooltip>
<div
class=
"gift_sum"
>
<div
class=
"gift_sum"
>
...
...
src/views/templateConfig/index.vue
View file @
eeef1cd
...
@@ -121,7 +121,18 @@ import selectCouponDialog from './components/selectCouponDialog.vue'
...
@@ -121,7 +121,18 @@ import selectCouponDialog from './components/selectCouponDialog.vue'
},
},
mounted
(){
mounted
(){
this
.
getTemplateList
()
const
loading
=
this
.
$loading
({
lock
:
true
,
text
:
'Loading...'
,
spinner
:
'el-icon-loading'
,
background
:
'rgba(0, 0, 0, 0.5)'
,
customClass
:
'loadingClass'
})
this
.
getTemplateList
().
then
(
res
=>
{
loading
.
close
()
}).
catch
(
err
=>
{
loading
.
close
()
})
window
.
addEventListener
(
'resize'
,
this
.
resizeDom
);
window
.
addEventListener
(
'resize'
,
this
.
resizeDom
);
},
},
beforeDestroy
(){
beforeDestroy
(){
...
@@ -169,7 +180,9 @@ import selectCouponDialog from './components/selectCouponDialog.vue'
...
@@ -169,7 +180,9 @@ import selectCouponDialog from './components/selectCouponDialog.vue'
})
})
},
},
getTemplateList
(){
getTemplateList
(){
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
$apis
.
goodsCouponApi
.
getTemplateList
({
pageSize
:
10000
,
pageNum
:
1
}).
then
(
res
=>
{
this
.
$apis
.
goodsCouponApi
.
getTemplateList
({
pageSize
:
10000
,
pageNum
:
1
}).
then
(
res
=>
{
resolve
(
res
)
if
(
res
?.
list
?.
length
){
if
(
res
?.
list
?.
length
){
this
.
curConfigId
=
res
.
list
[
0
]?.
id
this
.
curConfigId
=
res
.
list
[
0
]?.
id
this
.
handleOk
()
this
.
handleOk
()
...
@@ -177,6 +190,9 @@ import selectCouponDialog from './components/selectCouponDialog.vue'
...
@@ -177,6 +190,9 @@ import selectCouponDialog from './components/selectCouponDialog.vue'
this
.
rowList
=
res
.
list
this
.
rowList
=
res
.
list
this
.
calcWidth
()
this
.
calcWidth
()
}
}
}).
catch
(
err
=>
{
reject
(
err
)
})
})
})
},
},
addTemplate
(){
addTemplate
(){
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment