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
eafe3c48
Commit
eafe3c48
authored
Feb 20, 2021
by
chenxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 卡券包
parent
7653e1ce
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
45 additions
and
49 deletions
+45
-49
gift.js
src/api/gift.js
+0
-4
form.vue
src/views/card-package/form.vue
+42
-23
card-list.vue
src/views/gic-card/card-list.vue
+2
-16
member-get.vue
src/views/gic-card/member-get.vue
+1
-1
vue.config.js
vue.config.js
+0
-5
No files found.
src/api/gift.js
View file @
eafe3c48
...
...
@@ -68,8 +68,4 @@ realGift = getFetch(realGift, welfarePrefix);
export
default
{
...
realGift
};
// export const downloadCouponCSV = config.api + marketPrefix + '/download-code-csv-template'; // 下载导入GIC券号csv示例文件 TODO:
// export const importCode = config.api + marketPrefix + '/import-gic-custom-code'; // 导入券码 TODO:
// export const importDestoryCode = marketPrefix + '/destroy-plugin/import-destroy-code'; // 上传销毁code列表 TODO:
// export const downloadDestroyCodeTemplate = config.api + marketPrefix + '/destroy-plugin/download-destroy-code-template'; // 下载销毁模板示例 TODO:
export
const
getGiftLoginUser
=
config
.
api
+
commonPrefix
+
'/user/get-login-user'
;
// 获取商户名称
src/views/card-package/form.vue
View file @
eafe3c48
...
...
@@ -42,27 +42,36 @@
<el-button
type=
"text"
@
click=
"addCard"
class=
"ml5"
>
保存
</el-button>
</div>
</div>
<el-table
v-if=
" couponList.length"
:data=
"couponList"
v-loading=
"cardLoading"
>
<el-table-column
prop=
"date"
label=
"卡券信息"
min-width=
"200"
>
<!-- 卡券类型(0:抵金券,1:折扣券,2:兑换券, 3: 其他券) -->
<template
slot-scope=
"scope"
>
<el-tag
class=
"mr5"
>
{{
cardType
[
scope
.
row
.
cardType
].
label
}}
</el-tag>
{{
scope
.
row
.
cardName
}}
</
template
>
</el-table-column>
<el-table-column
prop=
"date"
label=
"有效期"
min-width=
"200"
>
<span
slot-scope=
"scope"
v-html=
"effectiveDateFormate(scope.row)"
></span>
</el-table-column>
<el-table-column
prop=
"occupyStock"
label=
"卡券包内剩余库存"
min-width=
"200"
>
</el-table-column>
<el-table-column
prop=
"remainedStock"
label=
"福利可占库存"
min-width=
"180"
>
</el-table-column>
<el-table-column
prop=
"date"
label=
"福利状态"
min-width=
"180"
>
</el-table-column>
<el-table-column
label=
"操作"
width=
"120"
>
<
template
slot-scope=
"scope"
>
<dm-delete
@
confirm=
"delCard(scope.row)"
tips=
"删除后已占用库存将被释放,确认删除?"
>
<el-button
type=
"text"
>
删除
</el-button>
</dm-delete>
</
template
>
</el-table-column>
</el-table>
<div
class=
"imitation-table"
v-if=
"couponList.length"
style=
"width:100%;"
v-loading=
"cardLoading"
>
<el-row
class=
"thead"
>
<el-col
:span=
"5"
>
卡券信息
</el-col>
<el-col
:span=
"5"
>
有效期
</el-col>
<el-col
:span=
"4"
>
卡券包内剩余库存
</el-col>
<el-col
:span=
"4"
>
福利可占库存
</el-col>
<el-col
:span=
"3"
>
福利状态
</el-col>
<el-col
:span=
"3"
>
操作
</el-col>
</el-row>
<div
class=
"tbody"
>
<div
class=
"td"
v-for=
"(item, idx) in couponList"
:key=
"idx"
>
<el-row>
<el-col
:span=
"5"
>
<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>
</el-col>
<el-col
:span=
"5"
><span
v-html=
"effectiveDateFormate(item)"
></span></el-col>
<el-col
:span=
"4"
>
{{
item
.
remainedStock
}}
</el-col>
<el-col
:span=
"4"
>
{{
item
.
occupyStock
}}
</el-col>
<el-col
:span=
"3"
>
没给
</el-col>
<el-col
:span=
"3"
>
<dm-delete
@
confirm=
"delCard(item)"
tips=
"删除后已占用库存将被释放,确认删除?"
>
<el-button
type=
"text"
>
删除
</el-button>
</dm-delete>
</el-col>
</el-row>
<div
v-if=
"item.remainedStock
<
ruleForm
.
packageStock
"
class=
"gray03"
><i
class=
"el-icon-warning mr5 danger-color"
></i>
卡券包库存大于福利库存,请调整福利占用库存
</div>
</div>
</div>
</div>
</el-form-item>
</el-form>
<div
class=
"hidden"
>
...
...
@@ -199,8 +208,8 @@ export default {
Object
.
keys
(
this
.
ruleForm
).
map
(
v
=>
{
this
.
ruleForm
[
v
]
=
info
[
v
];
});
//
this.stockType = info.stockUseType == 2 ? :
// params.stockUseType = this.stockType.length == 2 ? 2 : this.stockType[0]
;
//
库存使用类型(0:占用,1:动态 , 2占用+动态)
this
.
stockType
=
info
.
stockUseType
==
2
?
[
0
,
1
]
:
[
info
.
stockUseType
]
;
this
.
dateTime
=
[
info
.
beginDate
,
info
.
endDate
];
this
.
couponList
=
res
.
result
.
couponList
||
[];
}).
finally
(()
=>
{
...
...
@@ -238,6 +247,16 @@ export default {
},
// 编辑卡券包
editForm
()
{
let
flag
=
false
;
this
.
couponList
.
forEach
(
v
=>
{
if
(
v
.
remainedStock
<
this
.
ruleForm
.
packageStock
&&
v
.
remainedStock
)
{
flag
=
true
;
}
});
if
(
flag
)
{
this
.
$tips
({
message
:
'卡券包库存大于福利库存,请调整福利占用库存'
,
type
:
'error'
});
return
;
}
const
params
=
{
couponPackageId
:
this
.
couponPackageId
,
count
:
Math
.
abs
(
this
.
info
.
packageStock
-
this
.
ruleForm
.
packageStock
),
...
...
src/views/gic-card/card-list.vue
View file @
eafe3c48
...
...
@@ -228,27 +228,13 @@ export default {
this
.
listParams
.
sortOrder
=
this
.
sortType1
;
this
.
refresh
();
}
,
effectiveDateFormate
(
item
=
{
}
)
{
const
{
cardEffectiveMode
,
startDate
,
expireDate
,
effectTimeMode
,
expireTimeCount
,
effectTimeCount
}
=
item
;
effectiveDateFormate
({
cardEffectiveMode
,
startDate
,
expireDate
,
effectTimeMode
,
expireTimeCount
,
effectTimeCount
}
)
{
if
(
cardEffectiveMode
===
0
)
{
return
`<p>${formatDateTimeByType(startDate, 'yyyy-MM-dd')
}
~ </p><p>${ formatDateTimeByType(expireDate, 'yyyy-MM-dd')
}
</p>`
;
}
if
(
cardEffectiveMode
===
1
)
{
// 领取后第
{{
info
.
effectTimeCount
}}
{{
info
.
effectTimeMode
?
'月'
:
'天'
}}
-
第
{{
info
.
expireTimeCount
+
info
.
effectTimeCount
-
1
}}
{{
info
.
effectTimeMode
?
'月'
:
'天'
}}
const
unit
=
effectTimeMode
?
'月'
:
'天'
;
let
pre
=
''
;
switch
(
effectTimeCount
)
{
case
1
:
pre
=
'当'
;
break
;
case
2
:
pre
=
'次'
;
break
;
default
:
pre
=
effectTimeCount
;
break
;
}
return
`<p>领取后${pre
}
${unit
}
生效,</p><p>有效天数${expireTimeCount
}
${unit
}
</p>`
;
return
`<p>领取后${effectTimeCount == 1 ? '当' : effectTimeCount == 2 ? '次' : effectTimeCount
}
${unit
}
生效,</p><p>有效天数${expireTimeCount
}
${unit
}
</p>`
;
}
return
'--'
;
}
,
...
...
src/views/gic-card/member-get.vue
View file @
eafe3c48
...
...
@@ -63,7 +63,7 @@
<li>
核销渠道:
{{
formatChannel
(
scope
.
row
)
}}
</li>
<li>
核销门店/店铺:
{{
scope
.
row
.
verifyStoreCode
||
'--'
}}
/
{{
scope
.
row
.
verifyStoreName
||
'--'
}}
</li>
</
template
>
<li
v-if=
"scope.row.statusFlag == 7"
>
销毁时间:{{ scope.row.
verif
yTime }}
</li>
<li
v-if=
"scope.row.statusFlag == 7"
>
销毁时间:{{ scope.row.
destro
yTime }}
</li>
</ul>
<i
class=
"el-icon-more cursor"
slot=
"reference"
></i>
</el-popover>
...
...
vue.config.js
View file @
eafe3c48
...
...
@@ -36,11 +36,6 @@ module.exports = {
// .options({ bypassOnDebug: true })
// .end();
// ============压缩图片 end============
// config.module
// .rule('images')
// .use('url-loader')
// .loader('url-loader')
// .tap(options => Object.assign(options, { limit: 2000 }))
},
configureWebpack
:
config
=>
{
config
.
externals
=
{
...
...
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