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 6043b1c5
authored
Feb 15, 2023
by
zhangquan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
代码优化
1 parent
03f8e2e5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
45 deletions
src/views/goodsConpon/addConpon.vue
src/views/goodsConpon/goodsDialog.vue
src/views/goodsConpon/index.vue
src/views/goodsConpon/receivedDetail.vue
src/views/goodsConpon/addConpon.vue
View file @
6043b1c
...
...
@@ -213,7 +213,7 @@ export default {
.container
{
background-color
:
#fff
;
padding
:
32px
30px
;
min-height
:
5
00px
;
min-height
:
6
00px
;
position
:
relative
;
.good_name
{
img
{
...
...
src/views/goodsConpon/goodsDialog.vue
View file @
6043b1c
<
template
>
<div
class=
"container"
>
<GLDialog
bigTitle=
"选择商品优惠券"
mode=
"big"
:visible
.
sync=
"isVisible"
:show-close=
"true"
:before-close=
"handleClose"
:close-on-click-modal=
"false"
@
onOk=
"onOk"
@
onCancel=
"onCancel"
>
<div
class=
"dialog_body"
>
<GLCombiForm
:rowNumber=
"1"
class=
"dialog_search"
ref=
"searchRef"
:formObj=
"dialogSearchForm"
:formData=
"dialogFormData"
@
handleOk=
"handleOk"
@
handleRest=
"handleRest"
></GLCombiForm>
<div
class=
"conpon_type"
>
<span
:class=
"['type',
{ active_type: curType == '1' }]" @click="changeConponType(1)">卡券
</span>
<span
:class=
"['type',
{ active_type: curType == '2' }]" @click="changeConponType(2)">直充
</span>
</div>
<div
class=
"dialog_table"
>
<GLTable
v-if=
"showTable"
:pageSizes=
"pageSizes"
ref=
"tableRef"
:pageConf=
"pageConf"
@
setTableFinishFun=
"setTableFinishFun"
:searchForm=
"dialogSearchForm"
:tableParams=
"tableParams"
:getListApi=
"getListApi"
>
<div
class=
"good_name"
slot=
"goodName"
slot-scope=
"scope"
>
<img
v-if=
"scope.scope.appearance == 1"
src=
"@/assets/conpon.png"
alt=
""
/>
<img
v-else
src=
"@/assets/directCharge.png"
alt=
""
/>
<!--
{{
scope
.
scope
.
appearance
==
2
?
scope
.
scope
.
productName
+
(
scope
.
scope
.
denomination
||
''
)
:
scope
.
scope
.
productName
}}
-->
{{
scope
.
scope
.
productName
}}
</div>
<div
slot=
"spreadPrice"
slot-scope=
"scope"
>
<span
:style=
"
{ color: Number(scope.scope.lineationPrice - scope.scope.costPrice)
<
= 0 ? '#eb4e4e' : '#666666' }">
{{
Number
(
Number
(
scope
.
scope
.
lineationPrice
-
scope
.
scope
.
costPrice
).
toFixed
(
2
))
}}
</span>
</div>
</GLTable>
</div>
<GLDialog
bigTitle=
"选择商品优惠券"
mode=
"big"
:visible
.
sync=
"isVisible"
:show-close=
"true"
:before-close=
"handleClose"
:close-on-click-modal=
"false"
@
onOk=
"onOk"
@
onCancel=
"onCancel"
>
<div
class=
"dialog_body"
>
<GLCombiForm
:rowNumber=
"1"
class=
"dialog_search"
ref=
"searchRef"
:formObj=
"dialogSearchForm"
:formData=
"dialogFormData"
@
handleOk=
"handleOk"
@
handleRest=
"handleRest"
></GLCombiForm>
<div
class=
"conpon_type"
>
<span
:class=
"['type',
{ active_type: curType == '1' }]" @click="changeConponType(1)">卡券
</span>
<span
:class=
"['type',
{ active_type: curType == '2' }]" @click="changeConponType(2)">直充
</span>
</div>
</GLDialog>
</div>
<div
class=
"dialog_table"
>
<GLTable
v-if=
"showTable"
:pageSizes=
"pageSizes"
ref=
"tableRef"
:pageConf=
"pageConf"
@
setTableFinishFun=
"setTableFinishFun"
:searchForm=
"dialogSearchForm"
:tableParams=
"tableParams"
:getListApi=
"getListApi"
>
<div
class=
"good_name"
slot=
"goodName"
slot-scope=
"scope"
>
<img
v-if=
"scope.scope.appearance == 1"
src=
"@/assets/conpon.png"
alt=
""
/>
<img
v-else
src=
"@/assets/directCharge.png"
alt=
""
/>
<!--
{{
scope
.
scope
.
appearance
==
2
?
scope
.
scope
.
productName
+
(
scope
.
scope
.
denomination
||
''
)
:
scope
.
scope
.
productName
}}
-->
{{
scope
.
scope
.
productName
}}
</div>
<div
slot=
"spreadPrice"
slot-scope=
"scope"
>
<span
:style=
"
{ color: Number(scope.scope.lineationPrice - scope.scope.costPrice)
<
= 0 ? '#eb4e4e' : '#666666' }">
{{
Number
(
Number
(
scope
.
scope
.
lineationPrice
-
scope
.
scope
.
costPrice
).
toFixed
(
2
))
}}
</span>
</div>
</GLTable>
</div>
</div>
</GLDialog>
</
template
>
<
script
>
...
...
@@ -41,15 +39,15 @@ const dialogColumns = [
label
:
'差价/元'
,
width
:
110
,
align
:
'right'
,
addHtml
:
'spreadPrice'
,
renderHeader
:
h
=>
{
return
h
(
'div'
,
{
class
:
'table-header specHeader'
},
[
h
(
'span'
,
'差价/元'
),
h
(
'table-tooltip'
,
{
props
:
{
content
:
'差价=官方价-成本价'
}
})
])
}
addHtml
:
'spreadPrice'
//
renderHeader: h => {
//
return h('div', { class: 'table-header specHeader' }, [
//
h('span', '差价/元'),
//
h('table-tooltip', {
//
props: { content: '差价=官方价-成本价' }
//
})
//
])
//
}
},
{
label
:
'官方价/元'
,
...
...
@@ -90,14 +88,14 @@ const dialogColumns1 = [
label
:
'差价/元'
,
width
:
110
,
align
:
'right'
,
renderHeader
:
h
=>
{
return
h
(
'div'
,
{
class
:
'table-header specHeader'
},
[
h
(
'span'
,
'差价/元'
),
h
(
'table-tooltip'
,
{
props
:
{
content
:
'差价=官方价-成本价'
}
})
])
},
//
renderHeader: h => {
//
return h('div', { class: 'table-header specHeader' }, [
//
h('span', '差价/元'),
//
h('table-tooltip', {
//
props: { content: '差价=官方价-成本价' }
//
})
//
])
//
},
addHtml
:
'spreadPrice'
},
{
...
...
src/views/goodsConpon/index.vue
View file @
6043b1c
...
...
@@ -81,7 +81,7 @@ export default {
fn
:
'删除'
},
condition
:
row
=>
{
return
row
.
status
==
'
1'
||
row
.
status
==
'
3'
return
row
.
status
==
'3'
},
listeners
:
{
click
:
this
.
del
...
...
@@ -149,7 +149,7 @@ export default {
width
:
180
,
prop
:
'createdDate'
,
formatter
:
cell
=>
{
return
this
.
dateFormat
(
cell
.
createdDate
,
'YYYY-MM-DD HH:mm:ss'
)
return
cell
.
createdDate
?
this
.
dateFormat
(
cell
.
createdDate
,
'YYYY-MM-DD HH:mm:ss'
)
:
'--'
}
}
]
...
...
src/views/goodsConpon/receivedDetail.vue
View file @
6043b1c
...
...
@@ -167,13 +167,13 @@ export default {
{
label
:
'领取日期'
,
formatter
:
cell
=>
{
return
this
.
dateFormat
(
cell
.
receiveTime
,
'YYYY-MM-DD HH:mm:ss'
)
return
cell
.
receiveTime
?
this
.
dateFormat
(
cell
.
receiveTime
,
'YYYY-MM-DD HH:mm:ss'
)
:
'--'
}
},
{
label
:
'使用日期'
,
formatter
:
cell
=>
{
return
this
.
dateFormat
(
cell
.
verificationTime
,
'YYYY-MM-DD HH:mm:ss'
)
return
cell
.
verificationTime
?
this
.
dateFormat
(
cell
.
verificationTime
,
'YYYY-MM-DD HH:mm:ss'
)
:
'--'
}
}
]
...
...
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