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 5448a405
authored
Mar 10, 2022
by
张权
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat:v2.0.0版本提交,校验暂无问题
1 parent
d90b22ea
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
423 additions
and
9 deletions
src/api/modules/equityApi.js
src/views/goods/addGoods.vue
src/views/rightsCard/cardDetail.vue
src/views/rightsCard/index.vue
src/api/modules/equityApi.js
View file @
5448a40
...
...
@@ -84,6 +84,23 @@ const getQrUrl = params => {
returnAll
:
true
})
}
/*获取用户明细列表*/
const
getcardRecordList
=
params
=>
{
params
.
method
=
'scrm.api.equity.card.merchant.record.get'
return
http
({
data
:
params
})
}
/**导出用户明细列表Excel*/
const
exportcardRecordList
=
params
=>
{
params
.
method
=
'scrm.api.equity.card.merchant.record.export'
return
http
({
data
:
params
,
returnAll
:
true
})
}
export
default
{
getEquityCardList
,
newEquityCard
,
...
...
@@ -95,5 +112,7 @@ export default {
getMerchantList
,
cardExport
,
getCollectionMerchantList
,
getQrUrl
getQrUrl
,
getcardRecordList
,
exportcardRecordList
}
src/views/goods/addGoods.vue
View file @
5448a40
...
...
@@ -61,7 +61,7 @@
</el-input>
</el-form-item>
<el-form-item
label=
"成本含税价"
prop=
"costPrice"
>
<el-input
v-model=
"ruleForm.costPrice"
:disabled=
"isEdit"
>
<el-input
v-model=
"ruleForm.costPrice"
>
<span
slot=
"suffix"
>
元
</span>
</el-input>
</el-form-item>
...
...
src/views/rightsCard/cardDetail.vue
0 → 100644
View file @
5448a40
<
template
>
<div>
<!-- 领卡用户明细 -->
<el-dialog
title=
"领卡用户明细"
:visible
.
sync=
"isVisible"
width=
"1080px"
class=
"user-detail-dialog"
@
close=
"handleReset()"
>
<div
class=
"contain equity-wrap"
style=
"margin: 20px 0px 20px 0px !important"
>
<glsx-combi-form
ref=
"showSearch"
labelWidth=
"120px"
defaultWidth=
"215px"
:formObj=
"batchListSearch"
:formData=
"userDetailForm"
>
<span
slot=
"footer"
class=
"footer-btns"
>
</span>
</glsx-combi-form>
<div
style=
"padding:0 20px 20px"
>
<div
style=
"float: right; margin-right: 0;margin-bottom:10px;"
>
<el-button
size=
"small"
@
click=
"handleReset()"
>
重置
</el-button>
<el-button
size=
"small"
type=
"primary"
@
click=
"handleSearch"
>
查询
</el-button>
<el-button
type=
"primary"
size=
"small"
@
click=
"handleExport"
class=
"selectBtn"
>
导出
</el-button>
</div>
<GLTable
ref=
"userDetailTable"
:hasNum=
"false"
@
hook:mounted=
"setTabelHeight"
:searchForm=
"batchListSearch"
:tableParams=
"batchTableParams"
:getListApi=
"getListApi"
:pageConf=
"batchPageConf"
:noDataImg=
"url"
@
setTableFinishFun=
"setTableFinishFun"
:beforeSearchFn=
"beforeSearchFn"
>
<div
slot=
"status"
slot-scope=
"scope"
>
<p
:style=
"
{color:scope.scope.status==1 ? '#2CCA74': '#CCC'}">
{{
setStatusVal
(
scope
.
scope
.
status
)
}}
</p>
</div>
</GLTable>
</div>
</div>
</el-dialog>
</div>
</
template
>
<
script
type=
'text/ecmascript-6'
>
import
url
from
'@/assets/empty.png'
function
date_format
(
date
,
e
)
{
date
=
new
Date
(
date
)
var
YY
=
date
.
getFullYear
()
+
'/'
var
MM
=
(
date
.
getMonth
()
+
1
<
10
?
'0'
+
(
date
.
getMonth
()
+
1
)
:
date
.
getMonth
()
+
1
)
+
'/'
var
DD
=
date
.
getDate
()
<
10
?
'0'
+
date
.
getDate
()
:
date
.
getDate
()
var
hh
=
(
date
.
getHours
()
<
10
?
'0'
+
date
.
getHours
()
:
date
.
getHours
())
+
':'
var
mm
=
(
date
.
getMinutes
()
<
10
?
'0'
+
date
.
getMinutes
()
:
date
.
getMinutes
())
+
':'
var
ss
=
date
.
getSeconds
()
<
10
?
'0'
+
date
.
getSeconds
()
:
date
.
getSeconds
()
if
(
e
==
'detail'
)
{
return
YY
+
MM
+
DD
}
else
{
return
YY
+
MM
+
DD
+
' '
+
hh
+
mm
+
ss
}
}
const
activeTypeList
=
[
{
confId
:
''
,
confName
:
'全部'
},
{
confId
:
1
,
confName
:
'输入设备号激活'
},
{
confId
:
2
,
confName
:
'输入权益卡号激活'
},
{
confId
:
3
,
confName
:
'零一裂变激活'
},
{
confId
:
4
,
confName
:
'会员赠送激活'
},
{
confId
:
5
,
confName
:
'挪车贴绑定激活'
},
{
confId
:
6
,
confName
:
'购买权益卡激活'
},
{
confId
:
9
,
confName
:
'嘀加购买权益订单赠送'
},
{
confId
:
10
,
confName
:
'通过裂变激活'
},
{
confId
:
11
,
confName
:
'门店套餐赠送'
},
{
confId
:
12
,
confName
:
'购买数字化权益赠送'
},
];
export
default
{
name
:
'detailDialog'
,
data
()
{
return
{
url
,
cardClassId
:
''
,
tableData
:[],
isVisible
:
false
,
getListApi
:
this
.
$apis
.
equityApi
.
getcardRecordList
,
// getListApi: this.$apis.equityApi.getEquityCardList,
batchListSearch
:{
mobile
:
''
,
//手机号
merchantName
:
''
,
//开通门店
activeType
:
''
,
//开通方式
status
:
''
,
// 状态
activeTime
:
[],
// 开通日期
memberType
:
''
},
baseData
:{
activeTypeList
:
[
{
confId
:
1
,
confName
:
'输入设备号激活'
},
{
confId
:
2
,
confName
:
'输入权益卡号激活'
},
{
confId
:
3
,
confName
:
'零一裂变激活'
},
{
confId
:
4
,
confName
:
'会员赠送激活'
},
{
confId
:
5
,
confName
:
'挪车贴绑定激活'
},
{
confId
:
6
,
confName
:
'购买权益卡激活'
},
{
confId
:
9
,
confName
:
'嘀加购买权益订单赠送'
},
{
confId
:
10
,
confName
:
'通过裂变激活'
},
{
confId
:
11
,
confName
:
'门店套餐赠送'
},
{
confId
:
12
,
confName
:
'购买数字化权益赠送'
},
],
},
userDetailForm
:[
{
label
:
'用户信息'
,
name
:
'mobile'
,
type
:
'input'
,
maxlength
:
11
,
placeholder
:
'请输入手机号'
},
{
label
:
'门店'
,
name
:
'merchantName'
,
type
:
'input'
,
maxlength
:
15
,
placeholder
:
'请输入门店名称'
},
{
label
:
'会员类型'
,
name
:
'memberType'
,
type
:
'select'
,
optionList
:
[
{
memberId
:
''
,
memberName
:
'全部'
},
{
memberId
:
1
,
memberName
:
'正式会员'
},
{
memberId
:
2
,
memberName
:
'非正式会员'
}
],
optionId
:
'memberId'
,
optionLabel
:
'memberName'
,
optionsName
:
'memberType'
},
{
label
:
'开通方式'
,
name
:
'activeType'
,
type
:
'select'
,
optionList
:
activeTypeList
,
optionId
:
'confId'
,
optionLabel
:
'confName'
,
optionsName
:
'activeType'
},
{
label
:
'状态'
,
name
:
'status'
,
type
:
'select'
,
optionList
:
[
{
statusId
:
''
,
statusName
:
'全部'
},
{
statusId
:
1
,
statusName
:
'生效中'
},
{
statusId
:
2
,
statusName
:
'已失效'
}
],
optionId
:
'statusId'
,
optionLabel
:
'statusName'
,
optionsName
:
'status'
},
{
label
:
'开通日期'
,
name
:
'activeTime'
,
type
:
'datePicker'
,
valueFormat
:
'yyyy-MM-dd'
,
pickerOptions
:
'beforeRangePickerOptions'
},
],
batchTableParams
:
{
listName
:
'list'
,
tableOption
:
false
,
tableColumns
:
[
{
label
:
'手机号码'
,
prop
:
'mobile'
// minWidth: '200'
},
{
label
:
'会员类型'
,
prop
:
'memberType'
,
formatter
:
cellValue
=>
{
return
cellValue
.
memberType
==
1
?
'正式会员'
:
'非正式会员'
}
},
{
label
:
'开通门店'
,
prop
:
'merchantName'
,
width
:
200
},
{
label
:
'开通方式'
,
prop
:
'activeType'
,
width
:
200
,
formatter
:
cellValue
=>
{
return
activeTypeList
.
map
(
item
=>
item
.
confId
).
includes
(
cellValue
.
activeType
)
?
activeTypeList
.
find
(
item
=>
item
.
confId
==
cellValue
.
activeType
).
confName
:
'-'
}
},
{
label
:
'状态'
,
prop
:
'status'
,
addHtml
:
'status'
},
{
label
:
'开通日期'
,
prop
:
'activeTime'
,
width
:
200
}
]
},
batchPageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'total'
}
}
},
mounted
()
{
},
methods
:
{
show
(
row
){
this
.
isVisible
=
!
this
.
isVisible
this
.
$nextTick
(()
=>
{
this
.
cardClassId
=
row
.
id
this
.
$refs
.
userDetailTable
.
refreshTable
()
})
},
setStatusVal
(
status
){
return
{
1
:
'生效中'
,
2
:
'已失效'
}[
status
]
},
setTableFinishFun
()
{
//接收到的数据为空
this
.
afterSearchresetDate
()
},
afterSearchresetDate
(){
if
(
this
.
batchListSearch
.
startTime
&&
this
.
batchListSearch
.
endTime
){
const
{
startTime
,
endTime
}
=
this
.
batchListSearch
let
activeTime
=
[
startTime
.
split
(
" "
)[
0
],
endTime
.
split
(
" "
)[
0
]]
this
.
$set
(
this
.
batchListSearch
,
'activeTime'
,
activeTime
)
}
this
.
$set
(
this
.
batchListSearch
,
'mobile'
,
this
.
batchListSearch
.
userInfo
)
delete
this
.
batchListSearch
.
endTime
delete
this
.
batchListSearch
.
startTime
delete
this
.
batchListSearch
.
userInfo
console
.
log
(
this
.
batchListSearch
)
},
setTabelHeight
()
{
this
.
$refs
.
userDetailTable
.
tableHeightValues
=
'328'
},
beforeSearchFn
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
setParams
()
resolve
()
})
},
setParams
(){
if
(
Array
.
isArray
(
this
.
batchListSearch
.
activeTime
)
&&
this
.
batchListSearch
.
activeTime
.
length
>
0
){
this
.
batchListSearch
.
startTime
=
this
.
batchListSearch
.
activeTime
[
0
]
+
' 00:00:00'
this
.
batchListSearch
.
endTime
=
this
.
batchListSearch
.
activeTime
[
1
]
+
' 23:59:59'
}
this
.
batchListSearch
.
cardClassId
=
this
.
cardClassId
this
.
batchListSearch
.
userInfo
=
this
.
batchListSearch
.
mobile
delete
this
.
batchListSearch
.
activeTime
delete
this
.
batchListSearch
.
mobile
},
handleExport
(){
this
.
setParams
()
this
.
$apis
.
orderApi
.
exportBalanceList
(
this
.
batchListSearch
).
then
(({
code
,
data
,
message
})
=>
{
this
.
afterSearchresetDate
()
if
(
code
==
0
)
{
var
a
=
document
.
createElement
(
'a'
)
a
.
setAttribute
(
'id'
,
'exportToExport'
)
a
.
setAttribute
(
'href'
,
data
)
a
.
setAttribute
(
'target'
,
'_blank'
)
document
.
body
.
appendChild
(
a
)
a
.
click
()
}
else
{
this
.
$message
.
error
(
message
)
}
})
},
handleSearch
(){
this
.
$refs
.
userDetailTable
.
refreshTable
()
},
CLOSE
(){
console
.
log
(
11111
)
},
handleReset
(){
this
.
batchListSearch
=
{
mobile
:
''
,
merchantName
:
''
,
activeType
:
''
,
status
:
''
,
activeTime
:
[],
memberType
:
''
}
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
/
deep
/
.user-detail-dialog
{
.el-form-item{
margin-right
:
0
;
}
.el-input--small
.el-input__inner
{
width
:
215px
;
}
}
</
style
>
\ No newline at end of file
src/views/rightsCard/index.vue
View file @
5448a40
...
...
@@ -9,17 +9,36 @@
</div>
<div
class=
"tableBox"
style=
"margin-left: 40px; margin-top: 20px; margin-right: 20px"
>
<div
class=
"topline"
>
<div
class=
"selectStore"
>
搜索门店
</div>
<
!--
<
div
class=
"selectStore"
>
搜索门店
</div>
<el-select
size=
"small"
v-model=
"searchForm.merchantName"
filterable
remote
reserve-keyword
placeholder=
"请输入门店名称"
:remote-method=
"remoteMethod"
:loading=
"loading"
clearable
style=
"margin-left: 10px"
>
<el-option
v-for=
"(item, index) in options"
:key=
"index"
:label=
"item.merchantName"
:value=
"item.merchantName"
></el-option>
</el-select>
<div
class=
"operationBtn"
>
</el-select>
-->
<el-form
:inline=
"true"
style=
"width: 100%; margin-left: 10px;"
:model=
"searchForm"
label-width=
"108px"
label-position=
"right"
>
<el-row
style=
"display: flex; align-items: center"
>
<el-form-item
size=
"small"
label=
"搜索门店"
>
<el-select
size=
"small"
v-model=
"searchForm.merchantName"
remote
reserve-keyword
filterable
placeholder=
"请输入门店名称"
:remote-method=
"remoteMethod"
:loading=
"loading"
clearable
>
<el-option
v-for=
"(item, index) in options"
:key=
"index"
:label=
"item.merchantName"
:value=
"item.merchantName"
></el-option>
</el-select>
</el-form-item>
<el-form-item
size=
"small"
label=
"权益卡名称"
>
<el-input
size=
"small"
v-model=
"searchForm.cardClassName"
placeholder=
"请输入权益卡名称"
></el-input>
</el-form-item>
<el-form-item
size=
"small"
class=
"fr-mr0"
>
<el-button
plain
size=
"small"
class=
"selectBtn"
@
click=
"selectStore('reset')"
>
重置
</el-button>
<el-button
type=
"primary"
size=
"small"
style=
"margin-left: 20px"
class=
"selectBtn"
@
click=
"selectStore('select')"
>
搜索
</el-button>
</el-form-item>
</el-row>
</el-form>
<!--
<div
class=
"operationBtn"
>
<el-button
plain
size=
"small"
class=
"selectBtn"
@
click=
"selectStore('reset')"
>
重置
</el-button>
<el-button
type=
"primary"
size=
"small"
style=
"margin-left: 20px"
class=
"selectBtn"
@
click=
"selectStore('select')"
>
搜索
</el-button>
</div>
</div>
-->
</div>
<div
class=
"tableCtn"
>
<GLTable
ref=
"recordTable"
:searchForm=
"searchForm"
:tableParams=
"tableParams"
:getListApi=
"getListApi"
:pageConf=
"pageConf"
:noDataImg=
"url"
@
setTableFinishFun=
"setTableFinishFun"
>
<div
slot=
"recipientCount"
slot-scope=
"scope"
>
<p
class=
"cursor-pointer"
style=
"color:#5850ff"
@
click=
"handleDetail(scope.scope)"
>
{{
scope
.
scope
.
recipientCount
}}
</p>
</div>
<span
slot=
"auth-button"
slot-scope=
"scope"
:data=
"scope.scope"
>
<GLButton
fn =
'权益卡管理编辑'
type=
"text"
@
click=
"edit(scope.scope)"
class=
"tableBtn"
size=
"small"
>
编辑
</GLButton>
<el-button
type=
"text"
:disabled=
"scope.scope.tryAble == 0 ? true : false"
@
click=
"extension(scope.scope)"
class=
"tableBtn"
size=
"small"
>
推广
</el-button>
...
...
@@ -116,6 +135,7 @@
<el-button
:disabled=
"submitBtn"
type=
"primary"
@
click=
"submitForm('ruleForm')"
size=
"small"
>
提交
</el-button>
</span>
</el-dialog>
<detail-dialog
ref=
"detailDetailRef"
></detail-dialog>
</div>
</
template
>
...
...
@@ -139,6 +159,7 @@ function date_format(date) {
return
YY
+
MM
+
DD
+
' '
+
hh
+
mm
+
ss
}
import
url
from
'@/assets/empty.png'
import
detailDialog
from
'./cardDetail'
// import {memberCardDetails} from "@/api/test";
export
default
{
data
()
{
...
...
@@ -212,7 +233,8 @@ export default {
getListApi
:
this
.
$apis
.
equityApi
.
getEquityCardList
,
// getListApi: none,
searchForm
:
{
merchantName
:
''
merchantName
:
''
,
cardClassName
:
''
},
tableParams
:
{
btnId
:
new
Date
().
getTime
()
+
parseInt
(
Math
.
random
()
*
1000
),
...
...
@@ -260,9 +282,10 @@ export default {
},
{
label
:
'领卡用户'
,
prop
:
'recipientCount'
prop
:
'recipientCount'
,
// width: 110,
// tagLabel: true
addHtml
:
'recipientCount'
},
{
label
:
'状态'
,
...
...
@@ -283,7 +306,9 @@ export default {
}
}
},
components
:
{
detailDialog
},
mounted
()
{
this
.
list
=
this
.
states
.
map
(
item
=>
{
return
{
value
:
`value:
${
item
}
`
,
label
:
`label:
${
item
}
`
}
...
...
@@ -305,6 +330,10 @@ export default {
}
},
methods
:
{
handleDetail
(
row
){
this
.
$refs
.
detailDetailRef
.
show
(
row
);
// this.getcardRecordList()
},
setTableFinishFun
()
{
//接收到的数据为空
if
(
!
this
.
$refs
.
table
.
data
.
length
)
{
...
...
@@ -489,6 +518,7 @@ export default {
selectStore
(
e
)
{
if
(
e
==
'reset'
)
{
this
.
searchForm
.
merchantName
=
''
this
.
searchForm
.
cardClassName
=
''
this
.
$apis
.
equityApi
.
getEquityCardList
(
this
.
searchForm
).
then
(
res
=>
{
this
.
$refs
.
recordTable
.
refreshTable
()
})
...
...
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