Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
welfare
Overview
Overview
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
达摩4.0重构
welfare
Commits
0eba552d
Commit
0eba552d
authored
Mar 01, 2021
by
chenxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: ui
parent
4989a1fe
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
163 additions
and
105 deletions
+163
-105
index.html
public/index.html
+1
-0
component.scss
src/assets/styles/component.scss
+0
-5
gic-card.js
src/router/gic-card.js
+0
-3
form.vue
src/views/card/card-package/form.vue
+15
-4
list.vue
src/views/card/card-package/list.vue
+4
-4
card-form.js
src/views/card/gic-card/card-form.js
+1
-0
card-list.vue
src/views/card/gic-card/card-list.vue
+140
-86
custom.vue
src/views/card/setting/custom.vue
+2
-3
No files found.
public/index.html
View file @
0eba552d
...
@@ -48,6 +48,7 @@
...
@@ -48,6 +48,7 @@
<script
src=
"//web-1251519181.file.myqcloud.com/components/preview-img.1.0.3.js"
></script>
<!-- 图片预览 -->
<script
src=
"//web-1251519181.file.myqcloud.com/components/preview-img.1.0.3.js"
></script>
<!-- 图片预览 -->
<script
src=
"//web-1251519181.file.myqcloud.com/components/delete.1.1.4.js"
></script>
<!-- 删除轻弹窗 -->
<script
src=
"//web-1251519181.file.myqcloud.com/components/delete.1.1.4.js"
></script>
<!-- 删除轻弹窗 -->
<script
src=
"//web-1251519181.file.myqcloud.com/components/input-number.1.0.10.js"
></script>
<!-- 输入框 -->
<script
src=
"//web-1251519181.file.myqcloud.com/components/input-number.1.0.10.js"
></script>
<!-- 输入框 -->
<script
src=
"//web-1251519181.file.myqcloud.com/components/welfare-selector.0.0.1.js"
></script>
<!-- 福利选择器 -->
<script
src=
"//web-1251519181.file.myqcloud.com/components/acc-group-select.1.0.5.js"
></script>
<!-- 账号分组组件 -->
<script
src=
"//web-1251519181.file.myqcloud.com/components/acc-group-select.1.0.5.js"
></script>
<!-- 账号分组组件 -->
<script
src=
"//web-1251519181.file.myqcloud.com/components/editor.1.1.13.js"
></script>
<!-- 富文本编辑器 -->
<script
src=
"//web-1251519181.file.myqcloud.com/components/editor.1.1.13.js"
></script>
<!-- 富文本编辑器 -->
</body>
</body>
...
...
src/assets/styles/component.scss
View file @
0eba552d
...
@@ -118,11 +118,6 @@ body .damo-goods-selector{
...
@@ -118,11 +118,6 @@ body .damo-goods-selector{
.el-input-number__decrease
{
.el-input-number__decrease
{
bottom
:
2px
!
important
;
bottom
:
2px
!
important
;
}
}
.hide-right
{
.el-input-number__decrease
,
.el-input-number__increase
{
display
:
none
;
}
}
// 仿表格
// 仿表格
...
...
src/router/gic-card.js
View file @
0eba552d
...
@@ -9,9 +9,6 @@ export default [
...
@@ -9,9 +9,6 @@ export default [
{
{
path
:
'list'
,
path
:
'list'
,
component
:
()
=>
import
(
/* webpackChunkName: "gic-card" */
'@/views/card/gic-card/card-list.vue'
),
component
:
()
=>
import
(
/* webpackChunkName: "gic-card" */
'@/views/card/gic-card/card-list.vue'
),
// meta: {
// keepAlive: true,
// }
},
},
// 领取记录
// 领取记录
{
{
...
...
src/views/card/card-package/form.vue
View file @
0eba552d
...
@@ -37,13 +37,14 @@
...
@@ -37,13 +37,14 @@
<el-tooltip
content=
"若添加的卡券为固定有效期,仅允许添加和有效期限时间重合的卡券"
placement=
"bottom"
slot=
"label"
open-delay=
"200"
>
<el-tooltip
content=
"若添加的卡券为固定有效期,仅允许添加和有效期限时间重合的卡券"
placement=
"bottom"
slot=
"label"
open-delay=
"200"
>
<span
class=
"tooltip-icon"
>
添加卡券
</span>
<span
class=
"tooltip-icon"
>
添加卡券
</span>
</el-tooltip>
</el-tooltip>
<div
v-loading=
"cardLoading"
>
<
!--
<
div
v-loading=
"cardLoading"
>
<div
class=
"mb10"
>
<div
class=
"mb10"
>
卡券id:
<el-input
v-model=
"couponForm.couponId"
style=
"width:200px"
class=
"mr10"
/>
卡券id:
<el-input
v-model=
"couponForm.couponId"
style=
"width:200px"
class=
"mr10"
/>
库存值:
<el-input
v-model=
"couponForm.stock"
style=
"width:100px"
/>
库存值:
<el-input
v-model=
"couponForm.stock"
style=
"width:100px"
/>
<el-button
type=
"text"
@
click=
"addCard"
class=
"ml5"
>
保存
</el-button>
<el-button
type=
"text"
@
click=
"addCard"
class=
"ml5"
>
保存
</el-button>
</div>
</div>
</div>
</div>
-->
<el-button
class=
"dashed"
@
click=
"showSelector = true"
>
添加卡券
</el-button>
<div
class=
"imitation-table"
v-if=
"couponList.length"
style=
"width:100%;"
v-loading=
"cardLoading"
>
<div
class=
"imitation-table"
v-if=
"couponList.length"
style=
"width:100%;"
v-loading=
"cardLoading"
>
<el-row
class=
"thead"
>
<el-row
class=
"thead"
>
<el-col
:span=
"5"
>
卡券信息
</el-col>
<el-col
:span=
"5"
>
卡券信息
</el-col>
...
@@ -58,7 +59,7 @@
...
@@ -58,7 +59,7 @@
<el-row>
<el-row>
<el-col
:span=
"5"
>
<el-col
:span=
"5"
>
<el-tag
class=
"mr5"
>
{{
cardType
[
item
.
cardType
].
label
}}
</el-tag>
<el-tag
class=
"mr5"
>
{{
cardType
[
item
.
cardType
].
label
}}
</el-tag>
<router-link
target=
"_blank"
:to=
"
{path:'/gic-card/info',query:{ id: item.couponId }}">
{{
item
.
cardName
}}
</router-link>
<router-link
target=
"_blank"
:to=
"
{path:'/gic-card/info',query:{ id: item.couponId }}"
:title="item.couponId"
>
{{
item
.
cardName
}}
</router-link>
</el-col>
</el-col>
<el-col
:span=
"5"
><span
v-html=
"effectiveDateFormate(item)"
></span></el-col>
<el-col
:span=
"5"
><span
v-html=
"effectiveDateFormate(item)"
></span></el-col>
<el-col
:span=
"4"
>
{{
item
.
activityRemainedStock
}}
</el-col>
<el-col
:span=
"4"
>
{{
item
.
activityRemainedStock
}}
</el-col>
...
@@ -81,7 +82,7 @@
...
@@ -81,7 +82,7 @@
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<div
class=
"hidden"
>
<div
class=
"hidden"
>
<dm-
card-select
:before-submit=
"beforeSubmit"
ref=
"cardSelect"
read-only
:member-card-id=
"currentAreaId"
@
selectData=
"(val) =>
{ selectData(val, idx) }" :min-stock="ruleForm.packageStock" fix-member-card :unuse-list="couponList
" />
<dm-
welfare-selector
v-if=
"showSelector"
model=
"coupon"
type=
"coupon"
:params=
"params"
:disable-ids=
"couponList.map(v => v.couponId)
"
/>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
...
@@ -160,6 +161,7 @@ export default {
...
@@ -160,6 +161,7 @@ export default {
return
now
.
getTime
()
<
Date
.
now
()
-
24
*
60
*
60
*
1000
;
return
now
.
getTime
()
<
Date
.
now
()
-
24
*
60
*
60
*
1000
;
}
}
},
},
showSelector
:
false
,
// 是否展示福利选择器
isAdd
:
this
.
$route
.
meta
.
type
===
'add'
,
isAdd
:
this
.
$route
.
meta
.
type
===
'add'
,
isEdit
:
this
.
$route
.
meta
.
type
===
'edit'
,
isEdit
:
this
.
$route
.
meta
.
type
===
'edit'
,
isInfo
:
this
.
$route
.
meta
.
type
===
'info'
,
isInfo
:
this
.
$route
.
meta
.
type
===
'info'
,
...
@@ -321,6 +323,15 @@ export default {
...
@@ -321,6 +323,15 @@ export default {
},
},
},
},
computed
:
{
computed
:
{
params
()
{
const
params
=
{
memberCardId
:
this
.
currentAreaId
,
startCreateTime
:
formatDateTimeByType
(
this
.
dateTime
[
0
],
'yyyy-MM-dd'
),
endCreateTime
:
formatDateTimeByType
(
this
.
dateTime
[
1
],
'yyyy-MM-dd'
),
minRemainedStock
:
this
.
ruleForm
.
packageStock
};
return
params
;
},
/**
/**
* 1.过期卡券包无法修改
* 1.过期卡券包无法修改
* 2.有效期未开始,全都可以改,除了开始时间不能早于当前时间
* 2.有效期未开始,全都可以改,除了开始时间不能早于当前时间
...
...
src/views/card/card-package/list.vue
View file @
0eba552d
...
@@ -16,13 +16,13 @@
...
@@ -16,13 +16,13 @@
<sort-btn
class=
"mr10"
:sort-type=
"sortType1"
/>
<sort-btn
class=
"mr10"
:sort-type=
"sortType1"
/>
<el-date-picker
class=
"mr10"
v-model=
"dateTime"
type=
"daterange"
range-separator=
"~"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
@
change=
"refresh"
/>
<el-date-picker
class=
"mr10"
v-model=
"dateTime"
type=
"daterange"
range-separator=
"~"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
@
change=
"refresh"
/>
<label
class=
"ml5 mr8"
>
成本
</label>
<label
class=
"ml5 mr8"
>
成本
</label>
<el-input-number
class=
"prefix-amount
hide-right
w100"
@
change=
"refresh"
v-model=
"listParams.costPriceBegin"
controls-position=
"right"
:precision=
"2"
:min=
"listParams.costPriceBegin"
:max=
"10000"
placeholder=
"请输入"
/>
<el-input-number
class=
"prefix-amount w100"
@
change=
"refresh"
v-model=
"listParams.costPriceBegin"
controls-position=
"right"
:precision=
"2"
:min=
"listParams.costPriceBegin"
:max=
"10000"
placeholder=
"请输入"
/>
<label
class=
"ml5 mr5"
>
-
</label>
<label
class=
"ml5 mr5"
>
-
</label>
<el-input-number
class=
"prefix-amount
hide-right
w100"
@
change=
"refresh"
v-model=
"listParams.costPriceEnd"
controls-position=
"right"
:precision=
"2"
:min=
"1"
:max=
"100000"
placeholder=
"请输入"
/>
<el-input-number
class=
"prefix-amount w100"
@
change=
"refresh"
v-model=
"listParams.costPriceEnd"
controls-position=
"right"
:precision=
"2"
:min=
"1"
:max=
"100000"
placeholder=
"请输入"
/>
<label
class=
"ml15 mr8"
>
可占用库存
</label>
<label
class=
"ml15 mr8"
>
可占用库存
</label>
<el-input-number
class=
"
hide-right
w100"
@
change=
"refresh"
v-model=
"listParams.remainedStockBegin"
controls-position=
"right"
:precision=
"0"
:min=
"1"
:max=
"10000"
placeholder=
"请输入"
/>
<el-input-number
class=
"w100"
@
change=
"refresh"
v-model=
"listParams.remainedStockBegin"
controls-position=
"right"
:precision=
"0"
:min=
"1"
:max=
"10000"
placeholder=
"请输入"
/>
<label
class=
"ml5 mr5"
>
-
</label>
<label
class=
"ml5 mr5"
>
-
</label>
<el-input-number
class=
"
hide-right
w100 mrAuto"
@
change=
"refresh"
v-model=
"listParams.remainedStockEnd"
controls-position=
"right"
:precision=
"0"
:min=
"listParams.remainedStockBegin"
:max=
"100000"
placeholder=
"请输入"
/>
<el-input-number
class=
"w100 mrAuto"
@
change=
"refresh"
v-model=
"listParams.remainedStockEnd"
controls-position=
"right"
:precision=
"0"
:min=
"listParams.remainedStockBegin"
:max=
"100000"
placeholder=
"请输入"
/>
<dm-perm-button
type=
"danger"
class=
"specter"
v-show=
"active === 'list'"
:disabled=
"!multipleSelection.length"
@
click=
"mutiDel"
>
批量删除
</dm-perm-button>
<dm-perm-button
type=
"danger"
class=
"specter"
v-show=
"active === 'list'"
:disabled=
"!multipleSelection.length"
@
click=
"mutiDel"
>
批量删除
</dm-perm-button>
</div>
</div>
<el-table
tooltip-effect=
"dark"
:data=
"tableList"
style=
"width:100%"
>
<el-table
tooltip-effect=
"dark"
:data=
"tableList"
style=
"width:100%"
>
...
...
src/views/card/gic-card/card-form.js
View file @
0eba552d
...
@@ -384,6 +384,7 @@ export default {
...
@@ -384,6 +384,7 @@ export default {
},
},
mounted
()
{
mounted
()
{
if
(
this
.
currentAreaId
)
{
if
(
this
.
currentAreaId
)
{
this
.
ruleForm1
.
cardType
=
Number
(
this
.
$route
.
query
.
type
)
||
0
;
this
.
getRelationId
();
// 生成主键
this
.
getRelationId
();
// 生成主键
this
.
getMallShopList
();
this
.
getMallShopList
();
// this.handleGetSubAppByInfo();
// this.handleGetSubAppByInfo();
...
...
src/views/card/gic-card/card-list.vue
View file @
0eba552d
<
template
>
<
template
>
<div
class=
"p20"
v-loading=
"loading"
>
<div
class=
"p20"
v-loading=
"loading"
>
<el-row
:gutter=
"20"
class=
"mb20"
>
<el-col
:span=
"24 / cardTypeList.length"
v-for=
"(item, idx) in cardTypeList"
:key=
"idx"
>
<div
class=
"ct-block"
>
<p>
{{
item
.
name
}}
</p>
<div
v-html=
"item.text"
></div>
<el-button
type=
"primary"
@
click=
"$router.push(`/gic-card/add?type=$
{item.type}`)">立即新建
</el-button>
</div>
</el-col>
</el-row>
<div
class=
"clearfix flex-center pb20"
>
<div
class=
"clearfix flex-center pb20"
>
<span
class=
"gray01 fz16 mr20"
>
卡券筛选
</span>
<el-select
class=
"dm-select mr10 w160"
clearable
v-model=
"listParams.cardType"
placeholder=
"所有卡券类型"
@
change=
"refresh"
>
<el-option
v-for=
"(v, i) in cardType"
:key=
"i"
:label=
"v.label"
:value=
"v.value"
></el-option>
</el-select>
<el-input
placeholder=
"请输入关键字搜索"
class=
"w400 mr10"
v-model=
"listParams.search"
clearable
@
change=
"refresh"
>
<el-input
placeholder=
"请输入关键字搜索"
class=
"w400 mr10"
v-model=
"listParams.search"
clearable
@
change=
"refresh"
>
<el-select
v-model=
"listParams.searchType"
slot=
"prepend"
style=
"width:120px;"
placeholder=
"请选择"
@
change=
"refresh"
>
<el-select
v-model=
"listParams.searchType"
slot=
"prepend"
style=
"width:120px;"
placeholder=
"请选择"
@
change=
"refresh"
>
<el-option
label=
"卡券名称"
:value=
"1"
></el-option>
<el-option
label=
"卡券名称"
:value=
"1"
></el-option>
...
@@ -13,40 +18,58 @@
...
@@ -13,40 +18,58 @@
<el-option
label=
"demo券号"
:value=
"4"
></el-option>
<el-option
label=
"demo券号"
:value=
"4"
></el-option>
</el-select>
</el-select>
</el-input>
</el-input>
<el-select
v-model=
"listParams.couponStatus"
class=
"w160 mrAuto"
placeholder=
"全部状态"
clearable
@
change=
"refresh"
>
<el-select
class=
"dm-select mr10 w160"
clearable
v-model=
"listParams.cardType"
placeholder=
"所有卡券类型"
@
change=
"refresh"
>
<el-option
v-for=
"(v, i) in cardType"
:key=
"i"
:label=
"v.label"
:value=
"v.value"
></el-option>
</el-select>
<el-button
type=
"text"
@
click=
"isOpen = !isOpen"
>
{{
isOpen
?
'收起'
:
'展开'
}}
<i
:class=
"`$
{isOpen ? 'el-icon-arrow-up' : 'el-icon-arrow-down'} el-icon--right ml5`">
</i></el-button>
<!-- ui和原型都没要这个字段 -->
<!--
<el-select
v-model=
"listParams.couponStatus"
class=
"w160"
placeholder=
"全部状态"
clearable
@
change=
"refresh"
>
<el-option
label=
"使用中"
:value=
"1"
></el-option>
<el-option
label=
"使用中"
:value=
"1"
></el-option>
<el-option
label=
"已过期"
:value=
"2"
></el-option>
<el-option
label=
"已过期"
:value=
"2"
></el-option>
<el-option
label=
"已禁用"
:value=
"3"
></el-option>
<el-option
label=
"已禁用"
:value=
"3"
></el-option>
</el-select>
-->
<el-select
class=
"more-select mr10 mlAuto"
@
change=
"mutiOption"
placeholder=
"批量操作"
>
<el-option
:disabled=
"!multipleSelection.length"
:value=
"0"
>
批量设置
</el-option>
<el-option
:disabled=
"!multipleSelection.length"
:value=
"1"
>
批量删除
</el-option>
</el-select>
</el-select>
<dm-perm-button
type=
"primary"
@
click=
"$router.push('/gic-card/add')"
:disabled=
"$itemPerm($itemCode.gicCardFormAdd)"
>
新建卡券
</dm-perm-button>
</div>
</div>
<div
style=
"height:20px;width:calc(100% + 40px);position:relative;left:-20px;"
class=
"bg-color mb20"
></div>
<div
v-show=
"isOpen"
class=
"filter-block"
>
<div
class=
"clearfix flex-center mb20"
>
<div
class=
"mb20"
>
<label
class=
"pr4 cursor"
@
click=
"changeSort"
>
更新时间
</label>
<label
class=
"mr8"
>
福利成本:
</label>
<sort-btn
class=
"mr10"
:sort-type=
"sortType1"
/>
<el-input-number
:controls=
"false"
class=
"prefix-amount w140"
@
change=
"refresh"
v-model=
"listParams.costPriceBegin"
controls-position=
"right"
:precision=
"2"
:max=
"listParams.costPriceBegin"
:min=
"0"
placeholder=
"请输入"
/>
<el-date-picker
class=
"mr10"
v-model=
"dateTime"
type=
"daterange"
range-separator=
"~"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
@
change=
"refresh"
/>
<span>
至
</span>
<label
class=
"ml5 mr8"
>
成本
</label>
<el-input-number
:controls=
"false"
class=
"prefix-amount w140"
@
change=
"refresh"
v-model=
"listParams.costPriceEnd"
controls-position=
"right"
:precision=
"2"
:min=
"1"
:max=
"100000"
placeholder=
"请输入"
/>
<el-input-number
class=
"prefix-amount hide-right w100"
@
change=
"refresh"
v-model=
"listParams.costPriceBegin"
controls-position=
"right"
:precision=
"2"
:max=
"listParams.costPriceBegin"
:min=
"0"
placeholder=
"请输入"
/>
<label
class=
"mr8 ml40 w100 inline-block"
>
更新时间:
</label>
<label
class=
"ml5 mr5"
>
-
</label>
<el-select
v-model=
"listParams.sortOrder"
@
change=
"refresh"
placeholder=
"默认筛选"
>
<el-input-number
class=
"prefix-amount hide-right w100"
@
change=
"refresh"
v-model=
"listParams.costPriceEnd"
controls-position=
"right"
:precision=
"2"
:min=
"1"
:max=
"100000"
placeholder=
"请输入"
/>
<el-option
label=
"由近及远"
value=
"desc"
></el-option>
<label
class=
"ml15 mr8"
>
可占用库存
</label>
<el-option
label=
"由远及近"
value=
"asc"
></el-option>
<el-input-number
class=
"hide-right w100"
@
change=
"refresh"
v-model=
"listParams.remainedStockBegin"
controls-position=
"right"
:precision=
"0"
:min=
"1"
:max=
"10000"
placeholder=
"请输入"
/>
</el-select>
<label
class=
"ml5 mr5"
>
-
</label>
</div>
<el-input-number
class=
"hide-right w100 mrAuto"
@
change=
"refresh"
v-model=
"listParams.remainedStockEnd"
controls-position=
"right"
:precision=
"0"
:min=
"listParams.remainedStockBegin"
:max=
"100000"
placeholder=
"请输入"
/>
<div>
<dm-perm-button
type=
"danger"
class=
"specter"
:disabled=
"!multipleSelection.length"
@
click=
"mutiDel"
>
批量删除
</dm-perm-button>
<label
class=
"mr8"
>
可占库存:
</label>
<el-input-number
class=
"w140"
@
change=
"refresh"
v-model=
"listParams.remainedStockBegin"
controls-position=
"right"
:precision=
"0"
:min=
"1"
:max=
"10000"
placeholder=
"请输入"
/>
<span>
至
</span>
<el-input-number
class=
"w140 mrAuto"
@
change=
"refresh"
v-model=
"listParams.remainedStockEnd"
controls-position=
"right"
:precision=
"0"
:min=
"listParams.remainedStockBegin"
:max=
"100000"
placeholder=
"请输入"
/>
<label
class=
"mr8 ml40 w100 inline-block"
>
更新时间范围:
</label>
<el-date-picker
v-model=
"dateTime"
type=
"daterange"
range-separator=
"~"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
@
change=
"refresh"
/>
</div>
</div>
</div>
<el-table
tooltip-effect=
"dark"
:data=
"tableList"
style=
"width:100%"
:max-height=
"mainHeight(52 + 52)"
@
selection-change=
"handleSelectionChange"
>
<el-table
tooltip-effect=
"dark"
:data=
"tableList"
style=
"width:100%"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
>
</el-table-column>
<el-table-column
type=
"selection"
width=
"55"
fixed=
"left"
>
</el-table-column>
<el-table-column
label=
"卡券信息"
min-width=
"2
00"
fixed=
"left
"
>
<el-table-column
label=
"卡券信息"
min-width=
"2
80
"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<div
class=
"card"
>
<div
class=
"card"
>
<p>
<img
:src=
"scope.row.imgUrl"
draggable=
"false"
/>
<el-tooltip
effect=
"dark"
:content=
"scope.row.couponId"
open-delay=
"200"
placement=
"bottom"
>
<p
class=
"name"
>
{{
scope
.
row
.
cardName
}}
</p>
<span>
{{
scope
.
row
.
cardName
}}
</span>
<p
class=
"fz12 gray03"
>
</el-tooltip>
<el-popover
placement=
"top-start"
width=
"300"
trigger=
"hover"
open-delay=
"200"
>
<div
class=
"gray01 fz14"
>
<p
style=
"margin-bottom:5px;"
>
福利id:
{{
scope
.
row
.
couponId
}}
</p>
<p>
更新时间:
{{
formatDateTimeByType
(
scope
.
row
.
updateTime
,
'yyyy-MM-dd hh:mm:ss'
)
}}
</p>
</div>
<div
slot=
"reference"
class=
"gray-lighter fz12"
style=
"line-height:17px;"
><i
class=
"el-icon-question"
style=
"margin-right:4px;"
></i>
{{
scope
.
row
.
subTitle
}}
</div>
</el-popover>
</p>
</p>
<p>
{{
scope
.
row
.
subTitle
}}
</p>
<p
class=
"fz12 gray03"
>
更新时间:2020-12-12 12:12:12
</p>
</div>
</div>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
...
@@ -119,7 +142,6 @@
...
@@ -119,7 +142,6 @@
<
/template
>
<
/template
>
<
script
>
<
script
>
import
sortBtn
from
'@/components/sort/btn.vue'
;
import
importCode
from
'./module/import-code'
;
import
importCode
from
'./module/import-code'
;
import
{
page
,
formate
,
getMainHeight
}
from
'@/mixins/table.js'
;
import
{
page
,
formate
,
getMainHeight
}
from
'@/mixins/table.js'
;
import
{
cardType
,
cardStatus
,
mappingCardStatus
}
from
'@/config/mapping/gic-card'
;
import
{
cardType
,
cardStatus
,
mappingCardStatus
}
from
'@/config/mapping/gic-card'
;
...
@@ -136,8 +158,7 @@ export default {
...
@@ -136,8 +158,7 @@ export default {
components
:
{
components
:
{
adjustStock
,
adjustStock
,
syncStock
,
syncStock
,
importCode
,
importCode
sortBtn
}
,
}
,
mixins
:
[
page
,
formate
,
mixBeforeRouteLeave
,
getMainHeight
],
mixins
:
[
page
,
formate
,
mixBeforeRouteLeave
,
getMainHeight
],
data
()
{
data
()
{
...
@@ -175,7 +196,13 @@ export default {
...
@@ -175,7 +196,13 @@ export default {
visible
:
false
,
visible
:
false
,
couponId
:
''
,
couponId
:
''
,
}
,
}
,
isOpen
:
false
,
currentCard
:
{
}
,
currentCard
:
{
}
,
cardTypeList
:
[
{
name
:
'抵金券'
,
text
:
'例:满100元减20元<br/>便于合理控制活动成本'
,
type
:
0
}
,
{
name
:
'折扣券'
,
text
:
'例:满100元打9折<br/>提高店铺销量和客单价'
,
type
:
1
}
,
{
name
:
'兑换券'
,
text
:
'用于兑换指定商品<br/>吸引顾客消费'
,
type
:
2
}
,
]
}
;
}
;
}
,
}
,
created
()
{
created
()
{
...
@@ -186,22 +213,8 @@ export default {
...
@@ -186,22 +213,8 @@ export default {
this
.
getTableList
();
this
.
getTableList
();
}
}
}
,
}
,
activated
()
{
this
.
$emit
(
'updateBread'
,
[
{
breadName
:
'福利中心'
}
,
{
breadName
:
'GIC卡券'
}
,
{
breadName
:
'卡券库'
}
]);
this
.
getTableList
();
}
,
// beforeRouteLeave(to, from, next)
{
// const excludeRoute = ['/gic-card/add', '/gic-card/edit', '/gic-card/copy'];
// if (!excludeRoute.includes(to.path))
{
// const idx = this.$vnode.parent.componentInstance.keys.indexOf(this.$route.fullPath);
// console.log(idx);
// const key = this.$vnode.parent.componentInstance.keys[idx];
// const cache = this.$vnode.parent.componentInstance.cache;
// delete cache[key];
//
}
// next();
//
}
,
methods
:
{
methods
:
{
formatDateTimeByType
,
changeSort
()
{
changeSort
()
{
this
.
sortType1
=
this
.
sortType1
===
''
?
'desc'
:
this
.
sortType1
===
'desc'
?
'asc'
:
''
;
this
.
sortType1
=
this
.
sortType1
===
''
?
'desc'
:
this
.
sortType1
===
'desc'
?
'asc'
:
''
;
this
.
listParams
.
sortOrder
=
this
.
sortType1
;
this
.
listParams
.
sortOrder
=
this
.
sortType1
;
...
@@ -317,50 +330,42 @@ export default {
...
@@ -317,50 +330,42 @@ export default {
this
.
$refs
.
adjust
.
close
();
this
.
$refs
.
adjust
.
close
();
}
);
}
);
}
,
}
,
// 单个禁用卡券
// 批量操作
stopData
(
val
)
{
mutiOption
(
val
)
{
showConfirm
(
'<div>禁用后卡券不可找回,确认禁用该卡券?</div>'
,
()
=>
{
const
ids
=
this
.
multipleSelection
.
map
(
v
=>
v
.
couponId
).
join
(
','
);
this
.
disableCard
([
val
]);
if
(
val
==
0
)
{
// 批量禁用
}
);
this
.
stopData
(
ids
,
true
);
}
if
(
val
==
1
)
{
// 批量删除
this
.
delData
(
ids
,
true
);
}
}
,
}
,
// 批量禁用
// 批量禁用
mutiStop
()
{
stopData
(
ids
,
isMuti
=
false
)
{
showConfirm
(
'<div>确认批量禁用选中数据?</div>'
,
()
=>
{
const
warnTxt
=
isMuti
?
'禁用卡券将在福利组件不展示,并且该卡券参加的活动将全部失效,确认禁用?'
:
'禁用卡券将在福利组件不展示,并且该卡券参加的活动将全部失效,确认禁用选中数据?'
;
this
.
disableCard
(
this
.
multipleSelection
.
map
(
v
=>
v
.
couponId
));
showConfirm
(
`<div>${warnTxt
}
</div>`
,
()
=>
{
}
);
this
.
loading
=
true
;
}
,
disableCard
({
couponIds
:
ids
}
).
then
(
res
=>
{
// 禁用卡券
this
.
$tips
({
type
:
'success'
,
message
:
'禁用成功!'
}
);
disableCard
(
couponIds
)
{
this
.
loading
=
false
;
this
.
loading
=
true
;
this
.
getTableList
();
disableCard
({
couponIds
:
couponIds
.
join
(
','
)
}
).
then
(
res
=>
{
}
).
finally
(()
=>
{
this
.
$tips
({
type
:
'success'
,
message
:
'禁用成功!'
}
);
this
.
loading
=
false
;
this
.
loading
=
false
;
}
);
this
.
getTableList
();
}
).
finally
(()
=>
{
this
.
loading
=
false
;
}
);
}
,
// 删除卡券
delData
(
val
)
{
showConfirm
(
'<div>删除后卡券不可找回,确认删除该卡券?</div>'
,
()
=>
{
this
.
deleteCard
([
val
]);
}
);
}
);
}
,
}
,
// 批量删除
// 批量删除
mutiDel
()
{
delData
(
ids
,
isMuti
=
false
)
{
showConfirm
(
'<div>已添加被删除卡券的活动将会失效,确认删除?</div>'
,
()
=>
{
const
warnTxt
=
isMuti
?
'删除后卡券不可找回,已添加被删除卡券的活动将会失效,确认删除?'
:
'删除后卡券不可找回,确认删除该卡券?'
;
this
.
deleteCard
(
this
.
multipleSelection
.
map
(
v
=>
v
.
couponId
));
showConfirm
(
`<div>${warnTxt
}
</div>`
,
()
=>
{
}
);
this
.
loading
=
true
;
}
,
deleteCard
({
couponIds
:
ids
}
).
then
(
res
=>
{
// 删除卡券
this
.
$tips
({
type
:
'success'
,
message
:
'删除成功!'
}
);
deleteCard
(
couponIds
)
{
this
.
loading
=
false
;
this
.
loading
=
true
;
this
.
getTableList
();
deleteCard
({
couponIds
:
couponIds
.
join
(
','
)
}
).
then
(
res
=>
{
}
).
finally
(()
=>
{
this
.
$tips
({
type
:
'success'
,
message
:
'删除成功!'
}
);
this
.
loading
=
false
;
this
.
loading
=
false
;
}
);
this
.
getTableList
();
}
).
finally
(()
=>
{
this
.
loading
=
false
;
}
);
}
);
}
,
}
,
// 上传券码dialog
// 上传券码dialog
...
@@ -385,4 +390,52 @@ export default {
...
@@ -385,4 +390,52 @@ export default {
opacity
:
1
;
opacity
:
1
;
}
}
}
}
.
card
{
padding
-
left
:
70
px
;
min
-
height
:
70
px
;
position
:
relative
;
img
{
position
:
absolute
;
left
:
0
;
top
:
0
;
width
:
60
px
;
height
:
60
px
;
border
-
radius
:
4
px
;
}
.
name
{
color
:
$gray01
;
padding
-
top
:
8
px
;
margin
-
bottom
:
7
px
;
line
-
height
:
22
px
;
}
}
.
ct
-
block
{
background
:
rgba
(
47
,
84
,
235
,
0.07
);
text
-
align
:
center
;
padding
:
20
px
0
16
px
;
p
{
font
-
size
:
16
px
;
color
:
$gray01
;
line
-
height
:
22
px
;
}
div
{
margin
:
10
px
0
15
px
;
color
:
$gray02
;
line
-
height
:
17
px
;
}
}
.
ml40
{
margin
-
left
:
40
px
;
}
.
filter
-
block
{
color
:
$gray01
;
background
:
$gray
-
disable
;
padding
:
20
px
;
margin
-
bottom
:
20
px
;
span
{
margin
-
left
:
10
px
;
margin
-
right
:
10
px
;
line
-
height
:
20
px
;
}
}
<
/style>
<
/style>
\ No newline at end of file
src/views/card/setting/custom.vue
View file @
0eba552d
<
template
>
<
template
>
<div
class=
"p20"
v-loading=
"loading"
>
<div
class=
"p20"
v-loading=
"loading"
>
<el-form
:model=
"ruleForm"
:rules=
"rules"
ref=
"ruleForm"
label-width=
"150px"
style=
"min-height:400px;"
>
<el-form
:model=
"ruleForm"
:rules=
"rules"
ref=
"ruleForm"
label-width=
"150px"
style=
"min-height:400px;"
>
<el-form-item
label=
"转赠扣库存
:
"
prop=
"transferReduceFlag"
>
<el-form-item
label=
"转赠扣库存"
prop=
"transferReduceFlag"
>
<el-switch
:active-value=
"1"
:inactive-value=
"0"
v-model=
"ruleForm.transferReduceFlag"
></el-switch>
<el-switch
:active-value=
"1"
:inactive-value=
"0"
v-model=
"ruleForm.transferReduceFlag"
></el-switch>
<div
class=
"gray03 fz12"
>
开启表示赠送领取成功后,该卡券库存将会从福利中心的可占用库存扣除数量,若福利中心卡券可占用库存为 0,该卡券不可被赠送。
</div>
<div
class=
"gray03 fz12"
>
开启表示赠送领取成功后,该卡券库存将会从福利中心的可占用库存扣除数量,若福利中心卡券可占用库存为 0,该卡券不可被赠送。
</div>
</el-form-item>
</el-form-item>
...
@@ -34,7 +34,7 @@ export default {
...
@@ -34,7 +34,7 @@ export default {
};
};
},
},
created
()
{
created
()
{
this
.
$emit
(
'updateBread'
,
[
{
breadName
:
'通用设置'
}
]);
this
.
$emit
(
'updateBread'
,
[
{
breadName
:
'
福利中心'
},
{
breadName
:
'
通用设置'
}
]);
},
},
mounted
()
{
mounted
()
{
this
.
getDetail
();
this
.
getDetail
();
...
@@ -59,7 +59,6 @@ export default {
...
@@ -59,7 +59,6 @@ export default {
// 获取配置详情
// 获取配置详情
getDetail
()
{
getDetail
()
{
checkCustomSetting
().
then
(
res
=>
{
checkCustomSetting
().
then
(
res
=>
{
console
.
log
(
res
);
this
.
ruleForm
=
{
...
this
.
ruleForm
,
...
res
.
result
};
this
.
ruleForm
=
{
...
this
.
ruleForm
,
...
res
.
result
};
});
});
}
}
...
...
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