Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-marketing
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 c48ade89
authored
Jun 20, 2022
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
ui改版-会员中心
1 parent
967dc2a7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
223 additions
and
61 deletions
src/views/memberCenter/center.vue
src/views/memberCenter/order.vue
src/views/memberCenter/setmeal.vue
src/views/memberCenter/center.vue
View file @
c48ade8
This diff is collapsed.
Click to expand it.
src/views/memberCenter/order.vue
View file @
c48ade8
<
template
>
<div
class=
"live-room marketing"
>
<div
class=
"live-room container"
>
<div
class=
"flex"
>
<GLCombiForm
ref=
"showSearch"
:rowNumber=
"1"
:formObj=
"searchForm"
:formData=
"searchFormData"
@
handleOk=
"handleSearch"
@
handleRest=
"handleReset"
></GLCombiForm>
<!--
<div
class=
"flex"
>
<el-form
:inline=
"true"
style=
"width: 100%"
:model=
"searchForm"
label-width=
"70px"
label-position=
"right"
>
<el-row>
<el-form-item
size=
"small"
label=
"订单编号"
>
...
...
@@ -43,27 +44,26 @@
</el-form-item>
</el-row>
</el-form>
</div>
</div>
-->
<div
class=
"choseRow m-b-10"
>
<div
class=
"choseItem"
:class=
"
{ active: currentIndex == index + 1 }" v-for="(item, index) in choseList" :key="index" @click="tabClick(index + 1)">
{{
item
}}
</div>
</div>
<GLTable
ref=
"memberOrderRef"
v-if=
"isReload"
:noDataImg=
"url"
@
setTableFinishFun=
"setTableFinishFun"
:searchForm=
"searchFormTable"
:tableParams=
"tableParams"
:getListApi=
"getListApi"
:pageConf=
"pageConf"
:beforeSearchFn=
"beforeSearchFn"
>
<
template
slot=
"orderType"
slot-scope=
"scope
"
>
<
div
slot=
"orderType"
slot-scope=
"scope"
style=
"width: 200px
"
>
<template
v-if=
"scope.scope.orderType == 1"
>
<span>
{{
scope
.
scope
.
packageType
==
1
?
'门店套餐'
:
'集团套餐'
}}
</span>
</
template
>
<
template
v-else
>
<span>
会员卡
</span>
</
template
>
</
template
>
</
div
>
<span
class=
"table-btns"
slot=
"auth-button"
slot-scope=
"scope"
:data=
"scope.scope"
>
<!-- <el-button type="text" @click="handleDetail(scope.scope)" v-if="scope.scope.orderType == 1">详情</el-button>
<el-button type="text" style="color:#eee" v-else>详情</el-button> -->
<GLButton
@
click=
"handleDetail(scope.scope)"
fn=
"订单详情"
type=
"text"
v-if=
"scope.scope.orderType == 1"
>
详情
</GLButton>
<!-- <GLButton @click="handleDetail(scope.scope)" fn="订单详情" type="text" v-if="scope.scope.orderType == 1">详情</GLButton>
<GLButton style="color: #eee" fn="订单详情" type="text" v-else>详情</GLButton>
<GLButton
fn=
"退款"
v-if=
"scope.scope.refundFlag == 1"
type=
"text"
@
click=
"handleRefund(scope.scope)"
>
退款
</GLButton>
<GLButton fn="退款" v-if="scope.scope.refundFlag == 1" type="text" @click="handleRefund(scope.scope)">退款</GLButton> -->
<GLTableButton
:buttonList=
"tableButtonList"
:buttonItem=
"scope.scope"
:buttonNum=
"3"
></GLTableButton>
</span>
</GLTable>
</div>
...
...
@@ -90,11 +90,6 @@ export default {
accountLevel
:
0
,
//1,2,3,4工厂,省代,市代,门店
url
:
url
,
isReload
:
true
,
pickerOptions
:
{
disabledDate
(
time
)
{
return
time
.
getTime
()
>
Date
.
now
()
||
time
.
getTime
()
<
new
Date
(
'2017-12-31'
).
getTime
()
}
},
size
:
'small'
,
searchForm
:
{
orderStatus
:
''
,
//默认查询全部
...
...
@@ -102,21 +97,82 @@ export default {
// daterange:''
orderType
:
''
},
// 搜索
searchFormData
:
[
{
label
:
'订单编号'
,
name
:
'orderCode'
,
type
:
'input'
,
maxlength
:
100
},
{
label
:
'名称'
,
name
:
'packageName'
,
type
:
'input'
,
maxlength
:
100
},
{
label
:
'类型'
,
name
:
'orderType'
,
type
:
'select'
,
optionList
:
[],
optionId
:
'dictValue'
,
optionLabel
:
'dictLabel'
,
optionsName
:
'orderTypeList'
},
{
label
:
'用户信息'
,
name
:
'userInfo'
,
type
:
'input'
,
placeholder
:
'请输入用户名或手机号'
,
maxlength
:
100
},
{
label
:
'下单时间'
,
name
:
'daterange'
,
type
:
'datePicker'
,
isClear
:
true
,
pickerOptions
:
'beforeRangePickerOptions'
},
{
label
:
'开通门店'
,
name
:
'merchantName'
,
type
:
'input'
,
maxlength
:
100
}
],
choseList
:
[
'全部'
,
'待收货'
,
'已完成'
,
'退款|售后'
],
currentIndex
:
1
,
searchFormTable
:
{},
orderTypeList
:
[
// 表格按钮
tableButtonList
:
[
{
dictValue
:
''
,
dictLabel
:
'全部'
},
{
dictValue
:
1
,
dictLabel
:
'套餐'
type
:
'GLButton'
,
name
:
'详情'
,
attrs
:
{
type
:
'text'
,
fn
:
'订单详情'
,
disabled
:
row
=>
{
return
row
.
orderType
!=
1
}
},
listeners
:
{
click
:
this
.
handleDetail
}
},
{
dictValue
:
2
,
dictLabel
:
'会员卡'
type
:
'GLButton'
,
name
:
'退款'
,
attrs
:
{
type
:
'text'
,
fn
:
'退款'
},
condition
:
row
=>
{
return
row
.
refundFlag
==
1
},
listeners
:
{
click
:
this
.
handleRefund
}
}
],
// 表格组件
...
...
@@ -137,7 +193,7 @@ export default {
prop
:
'orderType'
,
addHtml
:
'orderType'
// formatter: cellValue => {
// return this.baseData
List
.orderTypesList.find(item => item.confId == cellValue.orderType).confName
// return this.baseData.orderTypesList.find(item => item.confId == cellValue.orderType).confName
// }
},
{
...
...
@@ -154,18 +210,18 @@ export default {
prop
:
'orderStatus'
,
width
:
'80'
,
formatter
:
cellValue
=>
{
return
this
.
baseData
List
.
orderStatusList
.
find
(
item
=>
item
.
confId
==
cellValue
.
orderStatus
).
confName
return
this
.
baseData
.
orderStatusList
.
find
(
item
=>
item
.
confId
==
cellValue
.
orderStatus
).
confName
}
},
{
label
:
'下单时间'
,
prop
:
'createDate'
,
width
:
16
0
width
:
20
0
},
{
label
:
'开通门店'
,
prop
:
'merchantName'
,
width
:
'180'
width
:
220
},
{
label
:
'推荐人'
,
...
...
@@ -178,6 +234,7 @@ export default {
{
label
:
'用户信息'
,
prop
:
'accountName'
,
width
:
220
,
formatter
:
cellValue
=>
{
return
cellValue
.
accountName
+
' '
+
cellValue
.
mobile
}
...
...
@@ -185,13 +242,23 @@ export default {
{
label
:
'订单号'
,
prop
:
'orderCode'
,
width
:
19
0
width
:
20
0
}
]
},
baseData
List
:
{
baseData
:
{
orderTypesList
:
orderTypesList
,
orderStatusList
:
orderStatusList
orderStatusList
:
orderStatusList
,
orderTypeList
:
[
{
dictValue
:
1
,
dictLabel
:
'套餐'
},
{
dictValue
:
2
,
dictLabel
:
'会员卡'
}
],
}
}
},
...
...
@@ -205,8 +272,36 @@ export default {
this
.
tableParams
.
tableColumns
.
splice
(
idx
,
1
)
}
},
mounted
()
{
},
mounted
()
{
this
.
getOptionsList
(
'searchFormData'
)
},
methods
:
{
getOptionsList
(
formName
,
hasAll
=
true
,
refreshSigle
)
{
if
(
refreshSigle
)
{
var
item
=
this
[
formName
].
find
(
k
=>
k
.
name
==
refreshSigle
)
var
index
=
this
[
formName
].
findIndex
(
k
=>
k
.
name
==
refreshSigle
)
this
.
$set
(
this
[
formName
][
index
],
'optionList'
,
this
.
$common
.
utils
.
deepClone
(
this
.
baseData
[
item
.
optionsName
]))
if
(
hasAll
&&
this
.
baseData
[
item
.
optionsName
].
length
&&
this
.
baseData
[
item
.
optionsName
][
0
][
this
[
formName
][
index
].
optionLabel
]
!==
'全部'
)
{
const
temp
=
{}
temp
[
this
[
formName
][
index
].
optionId
]
=
''
temp
[
this
[
formName
][
index
].
optionLabel
]
=
'全部'
this
[
formName
][
index
].
optionList
.
unshift
(
temp
)
}
}
else
{
this
[
formName
].
forEach
((
item
,
index
)
=>
{
if
(
item
.
type
===
'select'
&&
this
.
baseData
[
item
.
optionsName
].
length
)
{
this
.
$set
(
this
[
formName
][
index
],
'optionList'
,
this
.
$common
.
utils
.
deepClone
(
this
.
baseData
[
item
.
optionsName
]))
if
(
hasAll
&&
this
.
baseData
[
item
.
optionsName
].
length
&&
this
.
baseData
[
item
.
optionsName
][
0
][
this
[
formName
][
index
].
optionLabel
]
!==
'全部'
)
{
const
temp
=
{}
temp
[
this
[
formName
][
index
].
optionId
]
=
''
temp
[
this
[
formName
][
index
].
optionLabel
]
=
'全部'
this
[
formName
][
index
].
optionList
.
unshift
(
temp
)
}
}
})
}
},
tabClick
(
index
)
{
this
.
currentIndex
=
index
switch
(
index
)
{
...
...
@@ -241,10 +336,8 @@ export default {
getParams
()
{
var
params
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
searchForm
))
if
(
params
.
daterange
)
{
params
.
startTime
=
this
.
searchForm
.
daterange
[
0
]
+
' 00:00:00'
params
.
endTime
=
this
.
searchForm
.
daterange
[
1
]
+
' 23:59:59'
}
else
{
if
(
params
.
beginTime
)
delete
params
.
beginTime
&&
delete
params
.
endTime
params
.
startTime
=
new
Date
(
this
.
searchForm
.
daterange
[
0
]).
toLocaleDateString
().
replace
(
/
\/
/g
,
'-'
)
+
' 00:00:00'
params
.
endTime
=
new
Date
(
this
.
searchForm
.
daterange
[
1
]).
toLocaleDateString
().
replace
(
/
\/
/g
,
'-'
)
+
' 23:59:59'
}
delete
params
.
daterange
return
params
...
...
@@ -311,9 +404,10 @@ export default {
handleReset
()
{
this
.
isReload
=
false
this
.
currentIndex
=
1
this
.
searchForm
=
{}
this
.
searchForm
.
orderStatus
=
''
//默认查询全部
this
.
searchForm
.
orderType
=
''
this
.
searchForm
=
{
orderStatus
:
''
,
orderType
:
''
}
// this.handleSearch()
this
.
$nextTick
(()
=>
{
this
.
isReload
=
true
...
...
@@ -324,9 +418,9 @@ export default {
</
script
>
<
style
lang=
"scss"
scoped
>
/
deep
/
.el-input--small
.el-input__inner
{
width
:
215px
;
}
/
/
/
deep
/
.el-input--small
.el-input__inner
{
//
width
:
215px
;
//
}
.el-range-editor.is-active
,
.el-range-editor.is-active
:hover
{
border-color
:
#5850ff
;
...
...
src/views/memberCenter/setmeal.vue
View file @
c48ade8
<
template
>
<div
class=
"marketing"
>
<div
class=
"btnWrap"
>
<!--
<el-button
:size=
"size"
type=
"primary"
@
click=
"handleCreate"
icon=
"el-icon-plus"
>
创建套餐
</el-button>
-->
<GLButton
type=
"primary"
@
click=
"handleCreate"
size=
"small"
icon=
"el-icon-plus"
fn=
"创建套餐"
mode=
"el-button"
>
创建套餐
</GLButton>
<!--
<el-button
:size=
"size"
@
click=
"showViewer = true"
>
查看示例效果
</el-button>
-->
<el-image-viewer
v-if=
"showViewer"
:on-close=
"
<el-image-viewer
v-if=
"showViewer"
:on-close=
"
() =>
{
showViewer = false
}
"
:url-list="srcList"
style="padding:4%;"
/>
" :url-list="srcList" style="padding:4%;" />
</div>
<tip-panel
class=
"list-panel"
panelMinHeight=
"40px"
:panelContent=
"panelContent"
v-if=
"isFirstShow"
@
closePanel=
"closePanel"
></tip-panel>
<template
v-if=
"accountLevel == 4 && merchantModel == 1"
>
...
...
@@ -36,30 +30,23 @@
<span
class=
"table-btns"
slot=
"optionsFun"
slot-scope=
"scope"
:data=
"scope.scope"
>
<
template
v-if=
"!(accountLevel == 4 && activetab == 1)"
>
<template
v-if=
"scope.scope.state === 0"
>
<!--
<el-button
type=
"text"
@
click=
"handleEdit(scope.scope)"
>
编辑
</el-button>
<el-button
type=
"text"
@
click=
"handleDelete(scope.scope)"
>
删除
</el-button>
-->
<!--
<template
v-if=
"scope.scope.state === 0"
>
<GLButton
type=
"text"
@
click=
"handleEdit(scope.scope)"
fn=
"编辑套餐"
>
编辑
</GLButton>
<GLButton
type=
"text"
@
click=
"handleUpOption(scope.scope)"
fn=
"上架"
>
上架
</GLButton>
<GLButton
type=
"text"
@
click=
"handleDelete(scope.scope)"
fn=
"删除"
>
删除
</GLButton>
</
template
>
<
template
v-else-if=
"scope.scope.state === 1"
>
<!--
<el-button
type=
"text"
@
click=
"handleDownOption(scope.scope)"
>
下架
</el-button>
<el-button
type=
"text"
@
click=
"handleEdit(scope.scope)"
>
编辑
</el-button>
-->
<GLButton
type=
"text"
@
click=
"handleDownOption(scope.scope)"
fn=
"下架"
>
下架
</GLButton>
<GLButton
type=
"text"
@
click=
"handleEdit(scope.scope)"
fn=
"编辑套餐"
>
编辑
</GLButton>
</
template
>
<
template
v-else
>
<!--
<el-button
type=
"text"
@
click=
"handleEdit(scope.scope)"
>
编辑
</el-button>
<el-button
type=
"text"
@
click=
"handleUpOption(scope.scope)"
>
上架
</el-button>
<el-button
type=
"text"
@
click=
"handleDelete(scope.scope)"
>
删除
</el-button>
-->
<GLButton
type=
"text"
@
click=
"handleEdit(scope.scope)"
fn=
"编辑套餐"
>
编辑
</GLButton>
<GLButton
type=
"text"
@
click=
"handleUpOption(scope.scope)"
fn=
"上架"
>
上架
</GLButton>
<GLButton
type=
"text"
@
click=
"handleDelete(scope.scope)"
fn=
"删除"
>
删除
</GLButton>
</
template
>
<GLButton
type=
"text"
@
click=
"handleUpdateToTop(scope.scope)"
v-if=
"scope.scope.topFlag == 2 && accountLevel != 4"
fn=
"置顶推荐"
>
置顶推荐
</GLButton>
<el-button
type=
"text"
v-if=
"scope.scope.topFlag == 1 && accountLevel != 4"
>
已置顶推荐
</el-button>
<el-button
type=
"text"
v-if=
"scope.scope.topFlag == 1 && accountLevel != 4"
>
已置顶推荐
</el-button>
-->
<GLTableButton
:buttonList=
"tableButtonList"
:buttonItem=
"scope.scope"
:buttonNum=
"3"
></GLTableButton>
</template>
</span>
</GLTable>
...
...
@@ -125,6 +112,86 @@ export default {
}
],
activetab
:
0
,
// 表格按钮
tableButtonList
:
[
{
type
:
'GLButton'
,
name
:
'编辑'
,
attrs
:
{
type
:
'text'
,
fn
:
'编辑套餐'
},
listeners
:
{
click
:
this
.
handleEdit
}
},
{
type
:
'GLButton'
,
name
:
'上架'
,
attrs
:
{
type
:
'text'
,
fn
:
'上架'
},
condition
:
row
=>
{
return
row
.
state
!=
1
},
listeners
:
{
click
:
this
.
handleUpOption
}
},
{
type
:
'GLButton'
,
name
:
'下架'
,
attrs
:
{
type
:
'text'
,
fn
:
'下架'
},
condition
:
row
=>
{
return
row
.
state
==
1
},
listeners
:
{
click
:
this
.
handleDownOption
}
},
{
type
:
'GLButton'
,
name
:
'删除'
,
attrs
:
{
type
:
'text'
,
fn
:
'删除'
},
condition
:
row
=>
{
return
row
.
state
!=
1
},
listeners
:
{
click
:
this
.
handleDelete
}
},
{
type
:
'GLButton'
,
name
:
'置顶推荐'
,
attrs
:
{
type
:
'text'
,
fn
:
'置顶推荐'
},
condition
:
row
=>
{
return
row
.
topFlag
==
2
&&
this
.
accountLevel
!=
4
},
listeners
:
{
click
:
this
.
handleUpdateToTop
}
},
{
type
:
'el-button'
,
name
:
'已置顶推荐'
,
attrs
:
{
type
:
'text'
},
condition
:
row
=>
{
return
row
.
topFlag
==
1
&&
this
.
accountLevel
!=
4
}
}
],
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'total'
},
// 表格参数
tableParams
:
{
...
...
@@ -146,7 +213,8 @@ export default {
},
{
label
:
'套餐售价/元'
,
prop
:
'packagePrice'
prop
:
'packagePrice'
,
width
:
180
},
{
label
:
'说明'
,
...
...
@@ -212,7 +280,7 @@ export default {
this
.
dynamicFile
()
this
.
getLoginCountFun
()
},
mounted
()
{},
mounted
()
{
},
methods
:
{
dynamicFile
()
{
let
{
activetab
,
accountLevel
}
=
this
...
...
@@ -333,7 +401,7 @@ export default {
})
},
// 查看示例效果
handleLook
(
row
)
{},
handleLook
(
row
)
{
},
handleDelete
(
row
)
{
this
.
$messageBox
.
confirm
(
'是否删除该套餐?'
,
'删除'
,
{
confirmButtonText
:
'确定'
,
...
...
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