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 8431eec5
authored
May 25, 2022
by
前端
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'wangzh_dev_2.3.0' into 'v2.3.0'
Wangzh dev 2.3.0 See merge request
!146
2 parents
1a641c51
c1175b88
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
104 additions
and
297 deletions
src/api/modules/giftBag.js
src/api/modules/order.js
src/utils/index.js
src/views/memberCenter/order.vue
src/views/memberCenter/orderDetail.vue
src/views/memberCenter/selectGiftDialog.vue
src/views/memberCenter/setmeal.vue
src/views/memberCenter/setmealAddUpdate.vue
src/api/modules/giftBag.js
View file @
8431eec
...
@@ -77,6 +77,16 @@ const exportGiftInfoApi = params => {
...
@@ -77,6 +77,16 @@ const exportGiftInfoApi = params => {
// 编辑-选择定向礼包列表
// 编辑-选择定向礼包列表
const
getDirectionalGiftListApi
=
params
=>
{
const
getDirectionalGiftListApi
=
params
=>
{
params
.
method
=
'scrm.api.coupon.directional.gift.coupon.list'
// params.method = 'scrm.api.coupon.gh.group.equity.coupon.list'
return
http
({
url
:
'rop-scrm-coupon/router'
,
method
:
'GET'
,
data
:
params
,
sign
:
true
})
}
const
getghDirectionalGiftListApi
=
params
=>
{
// params.method = 'scrm.api.coupon.directional.gift.coupon.list'
// params.method = 'scrm.api.coupon.directional.gift.coupon.list'
params
.
method
=
'scrm.api.coupon.gh.group.equity.coupon.list'
params
.
method
=
'scrm.api.coupon.gh.group.equity.coupon.list'
return
http
({
return
http
({
...
@@ -109,4 +119,4 @@ const templateModal = params => {
...
@@ -109,4 +119,4 @@ const templateModal = params => {
})
})
}
}
export
default
{
getFollowerStaffListApi
,
getListApi
,
giftExportApi
,
deleteGiftApi
,
getGiftInfoApi
,
getReceivedGiftInfoApi
,
exportGiftInfoApi
,
getDirectionalGiftListApi
,
insertGiftApi
,
templateModal
}
export
default
{
getFollowerStaffListApi
,
getListApi
,
giftExportApi
,
deleteGiftApi
,
getGiftInfoApi
,
getReceivedGiftInfoApi
,
exportGiftInfoApi
,
getDirectionalGiftListApi
,
insertGiftApi
,
templateModal
,
getghDirectionalGiftListApi
}
src/api/modules/order.js
View file @
8431eec
...
@@ -40,7 +40,8 @@ const orderRefund = params => {
...
@@ -40,7 +40,8 @@ const orderRefund = params => {
url
:
'/rop-scrm-equity/router'
,
url
:
'/rop-scrm-equity/router'
,
method
:
'GET'
,
method
:
'GET'
,
data
:
params
,
data
:
params
,
sign
:
true
sign
:
true
,
returnAll
:
true
})
})
}
}
//套餐使用详情
//套餐使用详情
...
...
src/utils/index.js
View file @
8431eec
...
@@ -8,15 +8,15 @@ export function debounce(func, wait = 200) {
...
@@ -8,15 +8,15 @@ export function debounce(func, wait = 200) {
}
}
}
}
export
function
dateFormat
(
dateTime
,
format
=
'YYYY-MM-DD HH:mm'
)
{
export
function
dateFormat
(
dateTime
,
format
=
'YYYY-MM-DD HH:mm
:ss
'
)
{
const
date
=
new
Date
(
dateTime
)
const
date
=
new
Date
(
dateTime
)
const
config
=
{
const
config
=
{
YYYY
:
date
.
getFullYear
(),
YYYY
:
date
.
getFullYear
(),
MM
:
date
.
getMonth
()
+
1
,
//getMonth() 方法根据本地时间返回指定日期的月份(从 0 到 11)
MM
:
date
.
getMonth
()
+
1
,
//getMonth() 方法根据本地时间返回指定日期的月份(从 0 到 11)
DD
:
date
.
getDate
(),
DD
:
date
.
getDate
(),
HH
:
date
.
getHours
(),
HH
:
date
.
getHours
(),
mm
:
date
.
getMinutes
(),
mm
:
date
.
getMinutes
()
<
10
?
'0'
+
date
.
getMinutes
():
date
.
getMinutes
()
,
ss
:
date
.
getSeconds
()
ss
:
date
.
getSeconds
()
<
10
?
'0'
+
date
.
getSeconds
():
date
.
getSeconds
()
}
}
for
(
const
key
in
config
)
{
for
(
const
key
in
config
)
{
format
=
format
.
replace
(
key
,
config
[
key
])
format
=
format
.
replace
(
key
,
config
[
key
])
...
...
src/views/memberCenter/order.vue
View file @
8431eec
...
@@ -150,7 +150,10 @@ export default {
...
@@ -150,7 +150,10 @@ export default {
{
{
label
:
'用户信息'
,
label
:
'用户信息'
,
prop
:
'accountName'
prop
:
'accountName'
,
formatter
:
cellValue
=>
{
return
cellValue
.
accountName
+
' '
+
cellValue
.
mobile
}
},
},
{
{
label
:
'订单号'
,
label
:
'订单号'
,
...
@@ -167,12 +170,8 @@ export default {
...
@@ -167,12 +170,8 @@ export default {
},
},
created
()
{
created
()
{
if
(
window
.
__POWERED_BY_QIANKUN__
)
{
if
(
window
.
__POWERED_BY_QIANKUN__
)
{
console
.
log
(
'kkk'
,
this
.
$globalState
)
this
.
merchantModel
=
this
.
$globalState
.
session
.
merchantModel
this
.
merchantModel
=
this
.
$globalState
.
session
.
merchantModel
this
.
accountLevel
=
this
.
$globalState
.
session
.
accountLevel
this
.
accountLevel
=
this
.
$globalState
.
session
.
accountLevel
if
(
this
.
merchantModel
==
1
&&
this
.
accountLevel
==
1
)
{
this
.
searchForm
.
orderType
=
2
}
}
}
},
},
mounted
()
{},
mounted
()
{},
...
@@ -231,6 +230,13 @@ export default {
...
@@ -231,6 +230,13 @@ export default {
this
.
refundVisible
=
!
this
.
refundVisible
this
.
refundVisible
=
!
this
.
refundVisible
},
},
refundConfirmDialog
()
{
refundConfirmDialog
()
{
if
(
this
.
refund
==
''
)
{
this
.
$message
({
message
:
'请输入退款说明'
,
type
:
'error'
})
return
}
const
params
=
{
const
params
=
{
reason
:
this
.
refund
,
reason
:
this
.
refund
,
orderCode
:
this
.
orderCode
orderCode
:
this
.
orderCode
...
@@ -251,8 +257,7 @@ export default {
...
@@ -251,8 +257,7 @@ export default {
this
.
$router
.
push
({
this
.
$router
.
push
({
path
:
'/memberCenter/orderDetail'
,
path
:
'/memberCenter/orderDetail'
,
query
:
{
query
:
{
id
:
row
.
id
,
id
:
row
.
id
detail
:
row
}
}
})
})
},
},
...
...
src/views/memberCenter/orderDetail.vue
View file @
8431eec
...
@@ -27,6 +27,13 @@
...
@@ -27,6 +27,13 @@
<
template
slot=
"orderType"
slot-scope=
"scope"
>
<
template
slot=
"orderType"
slot-scope=
"scope"
>
<span>
{{
scope
.
scope
.
orderType
==
1
?
'套餐'
:
'权益卡'
}}
</span>
<span>
{{
scope
.
scope
.
orderType
==
1
?
'套餐'
:
'权益卡'
}}
</span>
</
template
>
</
template
>
<
template
slot=
"amount"
>
<span>
1
</span>
</
template
>
<
template
slot=
"totalPrice"
slot-scope=
"scope"
>
<span>
{{
scope
.
scope
.
originalPrice
*
1
}}
</span>
</
template
>
<
template
slot=
"orderStatus"
slot-scope=
"scope"
>
<
template
slot=
"orderStatus"
slot-scope=
"scope"
>
<span>
{{
scope
.
scope
.
orderStatus
==
2
?
'待收货'
:
scope
.
scope
.
orderStatus
==
3
?
'已完成'
:
scope
.
scope
.
orderStatus
==
4
?
'售后中'
:
scope
.
scope
.
orderStatus
==
5
?
'退款失败'
:
scope
.
scope
.
orderStatus
==
6
?
'已退款'
:
''
}}
</span>
<span>
{{
scope
.
scope
.
orderStatus
==
2
?
'待收货'
:
scope
.
scope
.
orderStatus
==
3
?
'已完成'
:
scope
.
scope
.
orderStatus
==
4
?
'售后中'
:
scope
.
scope
.
orderStatus
==
5
?
'退款失败'
:
scope
.
scope
.
orderStatus
==
6
?
'已退款'
:
''
}}
</span>
</
template
>
</
template
>
...
@@ -59,80 +66,6 @@
...
@@ -59,80 +66,6 @@
<el-button
type=
"primary"
@
click=
"goBack"
>
返回
</el-button>
<el-button
type=
"primary"
@
click=
"goBack"
>
返回
</el-button>
</div>
</div>
</div>
</div>
<!-- <div class="live-room container">
<div class="topMsg">
<div class="orderNo">订单编号:{{ detail.orderCode }}</div>
<div class="orderTime">下单时间:{{ detail.createDate }}</div>
<el-button type="primary" size="small" class="backBtn" @click="goBack">
返回
</el-button>
</div>
<div class="midMsgWrap">
<div class="midMsgTitle">
<span>支付信息</span>
<span>用户信息</span>
<span>服务名称</span>
<span>已核/总次数</span>
</div>
<div class="midMsgContent">
<div class="item">
<div>付款状态:已付款</div>
<div>
付款金额:{{ detail.realPayPrice }}
<span v-show="detail.realPayPrice">元</span>
</div>
<div>付款方式:微信支付</div>
<div>付款时间:{{ detail.createDate }}</div>
</div>
<div class="item">
<div class="userName">用户名称:{{ detail.accountName }}</div>
<div class="phoneNumber">用户手机号:{{ detail.mobile }}</div>
</div>
<div class="item">
<div v-for="(item, index) in detail.list" :key="index">{{ item.serviceName }}</div>
</div>
<div class="item">
<div v-for="(item, index) in detail.list" :key="index">{{ item.serviceAmount }}/{{ item.serviceCount }}次</div>
</div>
</div>
</div>
<div id="tableWrap">
<div class="tableWrapBox">
<el-table :data="tableData" style="width: 100%" :header-cell-style="{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }">
<el-table-column label="商品名称" align="center">
<template slot-scope="scope">
<div v-for="(item, index) in scope.row.couponList" :key="index">{{ item.couponName }}</div>
</template>
</el-table-column>
<el-table-column label="类型" align="center">
<template slot-scope="scope">
<span>{{ scope.row.orderType == 1 ? '套餐' : '权益卡' }}</span>
</template>
</el-table-column>
<el-table-column label="有效期" align="center" v-if="detail.orderType == 2">
<template slot-scope="scope">
<span>{{ scope.row.effectiveNum == '-1' ? '无限制' : scope.row.effectiveNum + '天' }}</span>
</template>
</el-table-column>
<el-table-column prop="originalPrice" label="单价/元" align="center"></el-table-column>
<el-table-column prop="amount" label="数量" align="center"></el-table-column>
<el-table-column prop="totalPrice" label="小计/元" align="center"></el-table-column>
<el-table-column prop="realPayPrice" label="实收金额" align="center">
<template slot-scope="scope">
<span style="color:#EB4E4E">{{ scope.row.realPayPrice }}</span>
</template>
</el-table-column>
<el-table-column prop="orderStatus" label="状态" align="center">
<template slot-scope="scope">
<div>{{ scope.row.refundReason }}</div>
</template>
</el-table-column>
</el-table>
</div>
</div>
</div> -->
</div>
</div>
</template>
</template>
...
@@ -233,8 +166,8 @@ export default {
...
@@ -233,8 +166,8 @@ export default {
},
},
{
{
colList
:
[
colList
:
[
{
thColspan
:
1
,
tdColspan
:
2
,
label
:
'数量'
,
name
:
'amount'
},
{
thColspan
:
1
,
tdColspan
:
2
,
label
:
'数量'
,
name
:
'amount'
,
addHtml
:
'amount'
},
{
thColspan
:
1
,
tdColspan
:
2
,
label
:
'小计/元'
,
name
:
'totalPrice'
}
{
thColspan
:
1
,
tdColspan
:
2
,
label
:
'小计/元'
,
name
:
'totalPrice'
,
addHtml
:
'totalPrice'
}
]
]
},
},
{
{
...
@@ -306,9 +239,6 @@ export default {
...
@@ -306,9 +239,6 @@ export default {
created
()
{
created
()
{
if
(
window
.
__POWERED_BY_QIANKUN__
)
{
if
(
window
.
__POWERED_BY_QIANKUN__
)
{
this
.
accountLevel
=
this
.
$globalState
.
session
.
accountLevel
this
.
accountLevel
=
this
.
$globalState
.
session
.
accountLevel
if
(
this
.
accountLevel
==
4
)
{
this
.
basicParams
.
splice
(
6
,
1
)
}
}
}
this
.
tableSearchForm
=
{
this
.
tableSearchForm
=
{
id
:
this
.
$route
.
query
.
id
id
:
this
.
$route
.
query
.
id
...
@@ -316,20 +246,13 @@ export default {
...
@@ -316,20 +246,13 @@ export default {
this
.
getOrderPageDetail
()
this
.
getOrderPageDetail
()
},
},
mounted
()
{
mounted
()
{},
// this.$nextTick(() => {
// let clientHeight = document.documentElement.clientHeight
// let offsettop = document.getElementById('tableWrap').offsetTop
// document.getElementById('tableWrap').style.minHeight = clientHeight - offsettop - 120 + 'px'
// })
},
methods
:
{
methods
:
{
dateFormatFun
(
date
)
{
dateFormatFun
(
date
)
{
return
dateFormat
(
date
)
return
dateFormat
(
date
)
},
},
getOrderPageDetail
()
{
getOrderPageDetail
()
{
getOrderPageDetail
({
id
:
this
.
$route
.
query
.
id
}).
then
(
res
=>
{
getOrderPageDetail
({
id
:
this
.
$route
.
query
.
id
}).
then
(
res
=>
{
// this.mylist=res.list
if
(
res
.
code
==
'0'
)
{
if
(
res
.
code
==
'0'
)
{
this
.
detailData
=
res
.
data
this
.
detailData
=
res
.
data
}
else
{
}
else
{
...
...
src/views/memberCenter/selectGiftDialog.vue
View file @
8431eec
...
@@ -23,6 +23,9 @@
...
@@ -23,6 +23,9 @@
<span
slot=
"effectiveType"
slot-scope=
"scope"
>
<span
slot=
"effectiveType"
slot-scope=
"scope"
>
<span>
{{
toLabelText
(
scope
.
scope
)
}}
</span>
<span>
{{
toLabelText
(
scope
.
scope
)
}}
</span>
</span>
</span>
<span
slot=
"stock"
slot-scope=
"scope"
>
<span>
{{
scope
.
scope
.
limitStockFlag
==
1
?
scope
.
scope
.
stock
:
'无限制'
}}
</span>
</span>
<span
slot=
"useType"
slot-scope=
"scope"
>
<span
slot=
"useType"
slot-scope=
"scope"
>
<span>
{{
toRestrictLabelText
(
scope
.
scope
)
}}
</span>
<span>
{{
toRestrictLabelText
(
scope
.
scope
)
}}
</span>
</span>
</span>
...
@@ -31,6 +34,9 @@
...
@@ -31,6 +34,9 @@
<span
slot=
"effectiveType"
slot-scope=
"scope"
>
<span
slot=
"effectiveType"
slot-scope=
"scope"
>
<span>
{{
toLabelText
(
scope
.
scope
)
}}
</span>
<span>
{{
toLabelText
(
scope
.
scope
)
}}
</span>
</span>
</span>
<span
slot=
"stock"
slot-scope=
"scope"
>
<span>
{{
scope
.
scope
.
limitStockFlag
==
1
?
scope
.
scope
.
stock
:
'无限制'
}}
</span>
</span>
<span
slot=
"useType"
slot-scope=
"scope"
>
<span
slot=
"useType"
slot-scope=
"scope"
>
<span>
{{
toCashRestrictLabelText
(
scope
.
scope
)
}}
</span>
<span>
{{
toCashRestrictLabelText
(
scope
.
scope
)
}}
</span>
</span>
</span>
...
@@ -39,6 +45,9 @@
...
@@ -39,6 +45,9 @@
<span
slot=
"effectiveType"
slot-scope=
"scope"
>
<span
slot=
"effectiveType"
slot-scope=
"scope"
>
<span>
{{
toLabelText
(
scope
.
scope
)
}}
</span>
<span>
{{
toLabelText
(
scope
.
scope
)
}}
</span>
</span>
</span>
<span
slot=
"stock"
slot-scope=
"scope"
>
<span>
{{
scope
.
scope
.
limitStockFlag
==
1
?
scope
.
scope
.
stock
:
'无限制'
}}
</span>
</span>
<span
slot=
"useType"
>
<span
slot=
"useType"
>
<span>
-
</span>
<span>
-
</span>
</span>
</span>
...
@@ -47,6 +56,9 @@
...
@@ -47,6 +56,9 @@
<span
slot=
"effectiveType"
slot-scope=
"scope"
>
<span
slot=
"effectiveType"
slot-scope=
"scope"
>
<span>
{{
toLabelText
(
scope
.
scope
)
}}
</span>
<span>
{{
toLabelText
(
scope
.
scope
)
}}
</span>
</span>
</span>
<span
slot=
"stock"
slot-scope=
"scope"
>
<span>
{{
scope
.
scope
.
limitStockFlag
==
1
?
scope
.
scope
.
stock
:
'无限制'
}}
</span>
</span>
<span
slot=
"useType"
>
<span
slot=
"useType"
>
<span>
-
</span>
<span>
-
</span>
</span>
</span>
...
@@ -142,13 +154,6 @@ export default {
...
@@ -142,13 +154,6 @@ export default {
label
:
'名称'
,
label
:
'名称'
,
prop
:
'couponName'
prop
:
'couponName'
},
},
// {
// label: '预估成本/元',
// prop: 'anticipatedCost',
// formatter: cellValue => {
// return (cellValue.anticipatedCost / 100).toFixed(2)
// }
// },
{
{
label
:
'有效期'
,
label
:
'有效期'
,
prop
:
'effectiveType'
,
prop
:
'effectiveType'
,
...
@@ -156,8 +161,8 @@ export default {
...
@@ -156,8 +161,8 @@ export default {
},
},
{
{
label
:
'可用次数'
,
label
:
'可用次数'
,
prop
:
'
effectiv
eType'
,
prop
:
'
us
eType'
,
addHtml
:
'
effectiv
eType'
addHtml
:
'
us
eType'
},
},
{
{
label
:
'适用范围'
,
label
:
'适用范围'
,
...
@@ -172,7 +177,8 @@ export default {
...
@@ -172,7 +177,8 @@ export default {
},
},
{
{
label
:
'剩余库存'
,
label
:
'剩余库存'
,
prop
:
'residueAmount'
prop
:
'stock'
,
addHtml
:
'stock'
}
}
]
]
}
}
...
@@ -236,7 +242,7 @@ export default {
...
@@ -236,7 +242,7 @@ export default {
}
}
this
.
loading
=
true
this
.
loading
=
true
this
.
$apis
.
giftBag
this
.
$apis
.
giftBag
.
getDirectionalGiftListApi
(
params
)
.
get
gh
DirectionalGiftListApi
(
params
)
.
then
(
res
=>
{
.
then
(
res
=>
{
// 重置分页组件
// 重置分页组件
if
(
this
.
$refs
[
this
.
activeName
+
'Ref'
]
&&
isResetPage
)
{
if
(
this
.
$refs
[
this
.
activeName
+
'Ref'
]
&&
isResetPage
)
{
...
...
src/views/memberCenter/setmeal.vue
View file @
8431eec
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
/>
/>
</div>
</div>
<tip-panel
class=
"list-panel"
panelMinHeight=
"40px"
:panelContent=
"panelContent"
v-if=
"isFirstShow"
@
closePanel=
"closePanel"
></tip-panel>
<tip-panel
class=
"list-panel"
panelMinHeight=
"40px"
:panelContent=
"panelContent"
v-if=
"isFirstShow"
@
closePanel=
"closePanel"
></tip-panel>
<template
v-if=
"accountLevel == 4"
>
<template
v-if=
"accountLevel == 4
&& merchantModel == 1
"
>
<div
class=
"setmeal-tabs flex-default m-t-10"
>
<div
class=
"setmeal-tabs flex-default m-t-10"
>
<template
v-for=
"(tab, index) in tabList"
>
<template
v-for=
"(tab, index) in tabList"
>
<div
:class=
"['tab', tab.checked ? 'active' : '']"
@
click=
"changeTab(index)"
:key=
"index"
>
{{
tab
.
text
}}
</div>
<div
:class=
"['tab', tab.checked ? 'active' : '']"
@
click=
"changeTab(index)"
:key=
"index"
>
{{
tab
.
text
}}
</div>
...
@@ -33,10 +33,9 @@
...
@@ -33,10 +33,9 @@
<ticket
:choseItemList=
"scope.scope.list"
></ticket>
<ticket
:choseItemList=
"scope.scope.list"
></ticket>
</div>
</div>
</span>
</span>
<span
class=
"table-btns"
slot=
"optionsFun"
slot-scope=
"scope"
:data=
"scope.scope"
>
<span
class=
"table-btns"
slot=
"optionsFun"
slot-scope=
"scope"
:data=
"scope.scope"
>
<!-- 是否置顶推荐:1 是;2 否 -->
<
template
v-if=
"!(accountLevel == 4 && activetab == 1)"
>
<el-button
type=
"text"
v-if=
"scope.scope.topFlag == 1"
>
已指定推荐
</el-button>
<GLButton
type=
"text"
@
click=
"handleUpdateToTop(scope.scope)"
v-if=
"scope.scope.topFlag == 2"
fn=
"置顶推荐"
>
置顶推荐
</GLButton>
<template
v-if=
"scope.scope.state === 0"
>
<template
v-if=
"scope.scope.state === 0"
>
<!--
<el-button
type=
"text"
@
click=
"handleEdit(scope.scope)"
>
编辑
</el-button>
<!--
<el-button
type=
"text"
@
click=
"handleEdit(scope.scope)"
>
编辑
</el-button>
...
@@ -59,6 +58,9 @@
...
@@ -59,6 +58,9 @@
<GLButton
type=
"text"
@
click=
"handleUpOption(scope.scope)"
fn=
"上架"
>
上架
</GLButton>
<GLButton
type=
"text"
@
click=
"handleUpOption(scope.scope)"
fn=
"上架"
>
上架
</GLButton>
<GLButton
type=
"text"
@
click=
"handleDelete(scope.scope)"
fn=
"删除"
>
删除
</GLButton>
<GLButton
type=
"text"
@
click=
"handleDelete(scope.scope)"
fn=
"删除"
>
删除
</GLButton>
</
template
>
</
template
>
<GLButton
type=
"text"
@
click=
"handleUpdateToTop(scope.scope)"
v-if=
"scope.scope.topFlag == 2"
fn=
"置顶推荐"
>
置顶推荐
</GLButton>
<el-button
type=
"text"
v-if=
"scope.scope.topFlag == 1"
>
已置顶推荐
</el-button>
</template>
</span>
</span>
</GLTable>
</GLTable>
</div>
</div>
...
@@ -141,33 +143,25 @@ export default {
...
@@ -141,33 +143,25 @@ export default {
{
{
label
:
'套餐名称'
,
label
:
'套餐名称'
,
prop
:
'packageName'
,
prop
:
'packageName'
,
width
:
'180'
width
:
220
},
},
{
{
label
:
'套餐售价/元'
,
label
:
'套餐售价/元'
,
prop
:
'packagePrice'
,
prop
:
'packagePrice'
width
:
140
},
},
{
{
label
:
'说明'
,
label
:
'说明'
,
prop
:
'notes'
,
prop
:
'notes'
,
width
:
16
0
,
width
:
30
0
,
line
:
4
line
:
4
},
},
{
{
label
:
'购买人数'
,
label
:
'售出数量'
,
prop
:
'buyNumber'
,
prop
:
'buyNumber'
line
:
1
},
{
label
:
'套餐总价'
,
prop
:
'referencePrice'
},
},
{
{
label
:
'状态'
,
label
:
'状态'
,
prop
:
'state'
,
prop
:
'state'
,
width
:
'80'
,
formatter
:
cellValue
=>
{
formatter
:
cellValue
=>
{
return
this
.
baseDataList
.
stateList
.
find
(
item
=>
item
.
confId
==
cellValue
.
state
).
confName
return
this
.
baseDataList
.
stateList
.
find
(
item
=>
item
.
confId
==
cellValue
.
state
).
confName
}
}
...
@@ -176,7 +170,7 @@ export default {
...
@@ -176,7 +170,7 @@ export default {
label
:
'操作'
,
label
:
'操作'
,
prop
:
'optionsFun'
,
prop
:
'optionsFun'
,
addHtml
:
'optionsFun'
,
addHtml
:
'optionsFun'
,
width
:
16
0
width
:
22
0
}
}
]
]
},
},
...
@@ -191,7 +185,7 @@ export default {
...
@@ -191,7 +185,7 @@ export default {
},
},
computed
:
{
computed
:
{
getListApi
()
{
getListApi
()
{
const
{
activetab
,
merchantModel
,
accountLevel
}
=
this
const
{
activetab
}
=
this
let
listApi
=
getSetMealListApi
let
listApi
=
getSetMealListApi
if
(
activetab
==
1
)
{
if
(
activetab
==
1
)
{
listApi
=
getSetMealListApi
listApi
=
getSetMealListApi
...
@@ -202,39 +196,48 @@ export default {
...
@@ -202,39 +196,48 @@ export default {
}
}
},
},
created
()
{
created
()
{
console
.
log
(
this
.
$route
.
query
.
activetab
)
if
(
window
.
__POWERED_BY_QIANKUN__
)
{
if
(
window
.
__POWERED_BY_QIANKUN__
)
{
//运行在qiankun容器中
//运行在qiankun容器中
this
.
merchantId
=
this
.
$globalState
.
session
.
merchantId
this
.
merchantId
=
this
.
$globalState
.
session
.
merchantId
this
.
merchantModel
=
this
.
$globalState
.
session
.
merchantModel
this
.
merchantModel
=
this
.
$globalState
.
session
.
merchantModel
this
.
accountLevel
=
this
.
$globalState
.
session
.
accountLevel
this
.
accountLevel
=
this
.
$globalState
.
session
.
accountLevel
// this.userType = this.$globalState.session.userType
// this.userType = this.$globalState.session.userType
if
(
this
.
merchantModel
==
2
)
{
this
.
activetab
=
0
}
}
}
this
.
searchForm
=
{
this
.
searchForm
=
{
merchantId
:
this
.
merchantId
merchantId
:
this
.
merchantId
// merchantName
// merchantName
}
}
if
(
this
.
$route
.
query
&&
this
.
$route
.
query
.
activetab
)
{
this
.
activetab
=
0
// this.changeTab(this.activetab)
this
.
tabList
.
forEach
(
item
=>
(
item
.
checked
=
false
))
this
.
tabList
[
this
.
activetab
].
checked
=
true
}
this
.
dynamicFile
()
this
.
dynamicFile
()
this
.
getLoginCountFun
()
this
.
getLoginCountFun
()
},
},
mounted
()
{},
mounted
()
{},
methods
:
{
methods
:
{
dynamicFile
()
{
dynamicFile
()
{
const
{
activetab
,
merchantModel
,
accountLevel
}
=
this
let
{
activetab
,
accountLevel
}
=
this
const
saleParam
=
{
const
saleParam
=
{
label
:
'在本店售出数量'
,
label
:
'售出数量'
,
prop
:
'buyNumber'
,
prop
:
'buyNumber'
width
:
140
}
}
const
referencePrice
=
{
const
referencePrice
=
{
label
:
'套餐总价'
,
label
:
'套餐总价'
,
prop
:
'referencePrice'
prop
:
'referencePrice'
}
}
// accountLevel == 4
if
(
activetab
==
1
&&
accountLevel
=
=
4
)
{
if
(
(
activetab
==
1
&&
accountLevel
==
4
)
||
accountLevel
!
=
4
)
{
this
.
tableParams
.
tableColumns
.
splice
(
5
,
1
,
saleParam
)
this
.
tableParams
.
tableColumns
.
splice
(
4
,
1
,
saleParam
)
}
else
{
}
else
if
(
activetab
==
0
&&
accountLevel
==
4
)
{
this
.
tableParams
.
tableColumns
.
splice
(
5
,
1
,
referencePrice
)
this
.
tableParams
.
tableColumns
.
splice
(
4
,
1
,
referencePrice
)
}
}
},
},
changeTab
(
index
)
{
changeTab
(
index
)
{
...
...
src/views/memberCenter/setmealAddUpdate.vue
View file @
8431eec
...
@@ -13,15 +13,9 @@
...
@@ -13,15 +13,9 @@
<el-form-item
size=
"small"
label=
"服务内容"
class=
"is-required"
>
<el-form-item
size=
"small"
label=
"服务内容"
class=
"is-required"
>
<el-button
@
click=
"handleGiftAdd"
size=
"small"
class=
"default-blue-btn"
>
选择服务
</el-button>
<el-button
@
click=
"handleGiftAdd"
size=
"small"
class=
"default-blue-btn"
>
选择服务
</el-button>
<div
class=
"gift-block m-t-10"
:style=
"
{ 'margin-left': labelWidth }" v-show="choseItemList.length != 0">
<div
class=
"gift-block m-t-10"
:style=
"
{ 'margin-left': labelWidth }" v-show="choseItemList.length != 0">
<!--
<div
class=
"gift-title"
>
合计:
<span
class=
"price"
>
{{
totalEstimatedCost
}}
</span>
元
</div>
-->
<div
v-for=
"(item, index) in orderShow"
:key=
"index"
>
<div
v-for=
"(item, index) in orderShow"
:key=
"index"
>
<div
class=
"gift-box flex-top"
v-show=
"couponObj[item].list.length"
>
<div
class=
"gift-box flex-top"
v-show=
"couponObj[item].list.length"
>
<img
class=
"gift-logo"
:src=
"couponObj[item].logo"
alt=
""
/>
<img
class=
"gift-logo"
:src=
"couponObj[item].logo"
alt=
""
/>
<!--
<div
class=
"gift-label"
>
{{
couponObj
[
item
].
label
}}
:
</div>
-->
<div
class=
"gift-content"
>
<div
class=
"gift-content"
>
<div
class=
"gift-item"
v-for=
"(subItem, subIndex) in couponObj[item].list"
:key=
"subIndex"
>
<div
class=
"gift-item"
v-for=
"(subItem, subIndex) in couponObj[item].list"
:key=
"subIndex"
>
<span
:class=
"['circle', subItem.status == '3' ? ' grey' : '']"
></span>
<span
:class=
"['circle', subItem.status == '3' ? ' grey' : '']"
></span>
...
@@ -33,23 +27,11 @@
...
@@ -33,23 +27,11 @@
</div>
</div>
</div>
</div>
</div>
</div>
<!--
<div
class=
"allChoseWrap"
v-if=
"this.choseItemList.length > 0"
>
<div
class=
"choseItem"
v-for=
"(item, index) in choseItemList"
:key=
"index"
>
<span>
{{
item
.
couponName
}}
×
{{
item
.
serviceQuantity
}}
</span>
<div
class=
"close-x"
@
click=
"closeChoseItemFun(item, index)"
>
×
</div>
</div>
</div>
-->
<div
class=
"el-form-item__error"
v-if=
"setmealContentRules"
>
请选择套餐
</div>
<div
class=
"el-form-item__error"
v-if=
"setmealContentRules"
>
请选择套餐
</div>
<!--
<div
class=
"totalWrap"
v-if=
"this.choseItemList.length > 0"
>
<span>
合计:
</span>
<span>
{{
totalPrice
}}
元
</span>
</div>
-->
</el-form-item>
</el-form-item>
<el-form-item
size=
"small"
label=
"套餐售价"
prop=
"packagePrice"
style=
"width: 315px"
>
<el-form-item
size=
"small"
label=
"套餐售价"
prop=
"packagePrice"
style=
"width: 315px"
>
<el-input
size=
"small"
v-model=
"ruleForm.packagePrice"
placeholder=
"请输入套餐售价"
@
keyup
.
native=
"ruleForm.packagePrice = oninput(ruleForm.packagePrice)"
>
<el-input
size=
"small"
v-model=
"ruleForm.packagePrice"
placeholder=
"请输入套餐售价"
@
keyup
.
native=
"ruleForm.packagePrice = oninput(ruleForm.packagePrice)"
>
<!--
<template
slot=
"append"
>
元
</
template
>
-->
<span
slot=
"suffix"
class=
"suffix-label"
>
元
</span>
<span
slot=
"suffix"
class=
"suffix-label"
>
元
</span>
</el-input>
</el-input>
</el-form-item>
</el-form-item>
...
@@ -83,18 +65,14 @@
...
@@ -83,18 +65,14 @@
</el-form-item>
</el-form-item>
</el-form>
</el-form>
</div>
</div>
<div
<div
class=
"footer-panel"
>
class=
"footer-panel"
<div>
:style=
"{
left: footerLeft + 'px',
width: footerWidth + 'px'
}"
>
<el-button
type=
"primary"
@
click=
"submitForm()"
size=
"medium"
:loading=
"sloading"
>
创建
</el-button>
<el-button
type=
"primary"
@
click=
"submitForm()"
size=
"medium"
:loading=
"sloading"
>
创建
</el-button>
<el-button
type=
"primary"
@
click=
"goBack"
size=
"medium"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"goBack"
size=
"medium"
>
取消
</el-button>
</div>
</div>
</div>
<!-- :modalAppendToBody="false" -->
<!-- :modalAppendToBody="false" -->
<glsx-dialog
title=
"套餐服务"
class=
"setmealServiceDialog"
width=
"1142px"
:noCancel=
"true"
:noClose=
"false"
btnSize=
"small"
:isVisible=
"setmealDialogVisible"
@
closeDialog=
"handleClose"
@
confirmDialog=
"handleConfirm"
>
<
!-- <
glsx-dialog title="套餐服务" class="setmealServiceDialog" width="1142px" :noCancel="true" :noClose="false" btnSize="small" :isVisible="setmealDialogVisible" @closeDialog="handleClose" @confirmDialog="handleConfirm">
<div class="content-body">
<div class="content-body">
<div class="subTitle">
<div class="subTitle">
<span>请选择套餐服务:</span>
<span>请选择套餐服务:</span>
...
@@ -116,13 +94,6 @@
...
@@ -116,13 +94,6 @@
<div class="useTime" v-if="item.useType == 0">有效期内无限制</div>
<div class="useTime" v-if="item.useType == 0">有效期内无限制</div>
<div class="useTime" v-if="item.useType == 1">有效期内可使用{{ item.useAmount }}次</div>
<div class="useTime" v-if="item.useType == 1">有效期内可使用{{ item.useAmount }}次</div>
<div class="useTime" v-if="item.useType == 2">每{{ item.useLimitDays }}天可以使用{{ item.useAmount }}次</div>
<div class="useTime" v-if="item.useType == 2">每{{ item.useLimitDays }}天可以使用{{ item.useAmount }}次</div>
<!-- <div class="select-package-time" ng-show="item.effectiveType == 3">有效期:无有效期</div>
<div class="select-package-time" ng-show="item.effectiveType == 1">有效期:{{item.effectiveDays}}天</div>
<div class="select-package-time" ng-show="item.effectiveType == 2">有效期:{{item.effectiveStartTime.split(' ')[0]}} - {{item.effectiveEndTime.split(' ')[0]}}</div>
<div class="select-package-time" ng-show="item.useType == 0">有效期内无限制</div>
<div class="select-package-time" ng-show="item.useType == 1">有效期内可使用{{item.useAmount}}次</div>
<div class="select-package-time" ng-show="item.useType == 2">每{{item.useLimitDays}}天可以使用{{item.useAmount}}次</div> -->
</div>
</div>
<div class="optionBtns" v-if="item.serviceQuantity > 0">
<div class="optionBtns" v-if="item.serviceQuantity > 0">
...
@@ -144,7 +115,7 @@
...
@@ -144,7 +115,7 @@
<span class="redText">{{ totalPrice }}</span>
<span class="redText">{{ totalPrice }}</span>
</div>
</div>
</div>
</div>
</glsx-dialog>
</glsx-dialog>
-->
<glsx-dialog
title=
""
top=
"30vh"
:hasScroll=
"false"
class=
"tipDialog"
width=
"547px"
btnCloseLabel=
"取消"
:noClose=
"false"
:noCancel=
"true"
btnSize=
"small"
:isVisible=
"isTipDialogVisible"
:showClose=
"false"
@
closeDialog=
"handleTipClose"
@
confirmDialog=
"handleTipConfirm"
>
<glsx-dialog
title=
""
top=
"30vh"
:hasScroll=
"false"
class=
"tipDialog"
width=
"547px"
btnCloseLabel=
"取消"
:noClose=
"false"
:noCancel=
"true"
btnSize=
"small"
:isVisible=
"isTipDialogVisible"
:showClose=
"false"
@
closeDialog=
"handleTipClose"
@
confirmDialog=
"handleTipConfirm"
>
<div
class=
"content-body"
>
<div
class=
"content-body"
>
<img
src=
"@/assets/icon-warning.png"
alt=
""
/>
<img
src=
"@/assets/icon-warning.png"
alt=
""
/>
...
@@ -197,7 +168,6 @@ export default {
...
@@ -197,7 +168,6 @@ export default {
merchantName
:
''
,
merchantName
:
''
,
setmealContentRules
:
false
,
setmealContentRules
:
false
,
//弹窗
//弹窗
setmealDialogVisible
:
false
,
//弹窗2(提示弹窗)
//弹窗2(提示弹窗)
isTipDialogVisible
:
false
,
isTipDialogVisible
:
false
,
selectNum
:
0
,
selectNum
:
0
,
...
@@ -274,23 +244,7 @@ export default {
...
@@ -274,23 +244,7 @@ export default {
this
.
getCardContentFun
()
this
.
getCardContentFun
()
this
.
getSetmealServiceFun
()
//获取服务套餐,执行完了之后去获取编辑详情
this
.
getSetmealServiceFun
()
//获取服务套餐,执行完了之后去获取编辑详情
},
},
watch
:
{
// allItemList: {
// deep: true,
// handler(val) {
// this.choseItemList = this.allItemList.filter(item => item.serviceQuantity > 0)
// this.choseItemList = this.choseItemList.map(ele => {
// return {
// ...ele,
// serviceId: ele.id
// }
// })
// }
// }
},
mounted
()
{
mounted
()
{
this
.
footerLeft
=
document
.
querySelector
(
'.base-container-right'
).
offsetLeft
this
.
footerWidth
=
document
.
documentElement
.
clientWidth
-
this
.
footerLeft
},
},
methods
:
{
methods
:
{
getCardContentFun
()
{
getCardContentFun
()
{
...
@@ -311,8 +265,6 @@ export default {
...
@@ -311,8 +265,6 @@ export default {
this
.
choseItemList
.
push
(
k
)
this
.
choseItemList
.
push
(
k
)
})
})
})
})
console
.
log
(
this
.
choseItemList
,
'choseItemList'
)
// this.hasCouponBlock()
},
},
handleGiftDelete
(
attr
,
idx
)
{
handleGiftDelete
(
attr
,
idx
)
{
this
.
couponObj
[
attr
].
list
.
splice
(
idx
,
1
)
this
.
couponObj
[
attr
].
list
.
splice
(
idx
,
1
)
...
@@ -333,7 +285,6 @@ export default {
...
@@ -333,7 +285,6 @@ export default {
this
.
totalEstimatedCost
=
(
this
.
totalEstimatedCost
/
100
).
toFixed
(
2
)
this
.
totalEstimatedCost
=
(
this
.
totalEstimatedCost
/
100
).
toFixed
(
2
)
},
},
handleGiftAdd
()
{
handleGiftAdd
()
{
console
.
log
(
this
.
couponObj
)
this
.
selectedMealList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
couponObj
))
this
.
selectedMealList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
couponObj
))
this
.
handleGiftClose
()
this
.
handleGiftClose
()
},
},
...
@@ -343,7 +294,6 @@ export default {
...
@@ -343,7 +294,6 @@ export default {
handleGiftConfirm
(
selectedData
)
{
handleGiftConfirm
(
selectedData
)
{
this
.
handleGiftClose
()
this
.
handleGiftClose
()
this
.
couponObj
=
selectedData
this
.
couponObj
=
selectedData
// this.recoveryTotalPrice()
this
.
recoveryGiftList
()
this
.
recoveryGiftList
()
},
},
recoveryCoupon
()
{
recoveryCoupon
()
{
...
@@ -353,26 +303,6 @@ export default {
...
@@ -353,26 +303,6 @@ export default {
this
.
choseItemList
.
forEach
(
item
=>
{
this
.
choseItemList
.
forEach
(
item
=>
{
this
.
couponObj
[
this
.
numToCoupon
[
item
.
discountType
]].
list
.
push
(
item
)
this
.
couponObj
[
this
.
numToCoupon
[
item
.
discountType
]].
list
.
push
(
item
)
})
})
console
.
log
(
this
.
couponObj
,
'this.couponObj'
)
// this.currentCoupons = this.$common.utils.deepClone(this.editForm.couponList)
// this.currentPeople = this.$common.utils.deepClone(this.editForm.staffList)
// this.hasCouponBlock(false)
},
openDialog
()
{
this
.
allItemList
.
forEach
(
item
=>
{
item
.
serviceQuantity
=
0
})
this
.
allItemList
.
forEach
(
item
=>
{
for
(
let
i
=
0
;
i
<
this
.
choseItemList
.
length
;
i
++
)
{
if
(
this
.
choseItemList
[
i
].
serviceId
==
item
.
id
)
{
item
.
serviceQuantity
=
this
.
choseItemList
[
i
].
serviceQuantity
}
}
})
this
.
selectNumFun
()
this
.
setmealDialogVisible
=
true
this
.
setmealContentRules
=
false
},
},
//编辑详情
//编辑详情
getServiceInfo
()
{
getServiceInfo
()
{
...
@@ -391,9 +321,6 @@ export default {
...
@@ -391,9 +321,6 @@ export default {
}
}
})
})
this
.
recoveryCoupon
()
this
.
recoveryCoupon
()
// this.recoveryTotalPrice()
console
.
log
(
'编辑内容'
,
this
.
choseItemList
,
this
.
totalPrice
)
this
.
copyTotalPrice
=
this
.
totalPrice
this
.
copyTotalPrice
=
this
.
totalPrice
this
.
copyRuleForm
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
ruleForm
))
//深拷贝一份数据
this
.
copyRuleForm
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
ruleForm
))
//深拷贝一份数据
this
.
copyChoseItemList
=
this
.
choseItemList
this
.
copyChoseItemList
=
this
.
choseItemList
...
@@ -415,56 +342,14 @@ export default {
...
@@ -415,56 +342,14 @@ export default {
serviceQuantity
:
0
serviceQuantity
:
0
}
}
})
})
console
.
log
(
this
.
allItemList
,
'服务套餐'
)
if
(
this
.
id
)
{
if
(
this
.
id
)
{
this
.
getServiceInfo
()
//获取编辑详情
this
.
getServiceInfo
()
//获取编辑详情
}
}
})
})
},
},
//选中该条服务套餐
handlePackage
(
item
,
index
)
{
if
(
item
.
serviceQuantity
==
0
)
{
item
.
serviceQuantity
++
this
.
selectNumFun
()
}
},
//删除该条服务套餐(让item.serviceQuantity==0)
closeChoseItemFun
(
item
,
index
)
{
this
.
totalPrice
=
((
this
.
totalPrice
*
100
-
item
.
vipPrice
*
item
.
serviceQuantity
*
100
)
/
100
).
toFixed
(
2
)
// item.serviceQuantity = 0
// this.allItemList.forEach(ele => {
// if (ele.id == item.serviceId) {
// ele.serviceQuantity = 0
// }
// })
// this.selectNumFun()
this
.
choseItemList
.
splice
(
index
,
1
)
},
selectNumFun
()
{
this
.
selectNum
=
0
this
.
totalPrice
=
0
this
.
allItemList
.
forEach
(
item
=>
{
if
(
item
.
serviceQuantity
)
{
this
.
selectNum
++
this
.
totalPrice
=
((
this
.
totalPrice
*
100
+
item
.
vipPrice
*
item
.
serviceQuantity
*
100
)
/
100
).
toFixed
(
2
)
}
})
},
cutPackage
(
item
,
index
)
{
item
.
serviceQuantity
--
this
.
selectNumFun
()
},
addPackage
(
item
,
index
)
{
item
.
serviceQuantity
++
this
.
selectNumFun
()
},
submitForm
(
formName
)
{
submitForm
(
formName
)
{
console
.
log
(
formName
)
this
.
$refs
.
ruleForm
.
validate
(
valid
=>
{
this
.
$refs
.
ruleForm
.
validate
(
valid
=>
{
console
.
log
(
valid
)
if
(
!
valid
)
{
if
(
!
valid
)
{
console
.
log
(
this
.
choseItemList
,
'this.choseItemList'
)
if
(
this
.
choseItemList
.
length
<=
0
)
{
if
(
this
.
choseItemList
.
length
<=
0
)
{
this
.
setmealContentRules
=
true
this
.
setmealContentRules
=
true
}
}
...
@@ -511,7 +396,6 @@ export default {
...
@@ -511,7 +396,6 @@ export default {
this
.
sloading
=
false
this
.
sloading
=
false
})
})
}
else
{
}
else
{
console
.
log
(
'创建'
)
//调创建的接口
//调创建的接口
let
params
=
{}
let
params
=
{}
params
.
referencePrice
=
this
.
totalPrice
params
.
referencePrice
=
this
.
totalPrice
...
@@ -521,7 +405,6 @@ export default {
...
@@ -521,7 +405,6 @@ export default {
params
.
packagePrice
=
this
.
ruleForm
.
packagePrice
params
.
packagePrice
=
this
.
ruleForm
.
packagePrice
params
.
notes
=
this
.
ruleForm
.
notes
params
.
notes
=
this
.
ruleForm
.
notes
params
.
switchStatus
=
this
.
ruleForm
.
switchStatus
?
1
:
0
params
.
switchStatus
=
this
.
ruleForm
.
switchStatus
?
1
:
0
console
.
log
(
this
.
choseItemList
)
let
list
=
this
.
choseItemList
let
list
=
this
.
choseItemList
for
(
var
i
in
list
)
{
for
(
var
i
in
list
)
{
params
[
`list[
${
i
}
].serviceQuantity`
]
=
list
[
i
].
couponAmount
params
[
`list[
${
i
}
].serviceQuantity`
]
=
list
[
i
].
couponAmount
...
@@ -536,7 +419,7 @@ export default {
...
@@ -536,7 +419,7 @@ export default {
type
:
res
.
code
==
'0'
?
'success'
:
'error'
type
:
res
.
code
==
'0'
?
'success'
:
'error'
})
})
if
(
res
.
code
==
'0'
)
{
if
(
res
.
code
==
'0'
)
{
this
.
$router
.
push
(
'/memberCenter/setmeal'
)
this
.
$router
.
push
(
'/memberCenter/setmeal
?activetab=0
'
)
}
}
})
})
.
catch
(
err
=>
{
.
catch
(
err
=>
{
...
@@ -601,36 +484,6 @@ export default {
...
@@ -601,36 +484,6 @@ export default {
str
=
str
.
replace
(
/^
\D
*
([
0-9
]\d
*
\.?\d{0,2})?
.*$/
,
'$1'
)
// 小数点后只能输 2 位
str
=
str
.
replace
(
/^
\D
*
([
0-9
]\d
*
\.?\d{0,2})?
.*$/
,
'$1'
)
// 小数点后只能输 2 位
return
str
return
str
},
},
handleConfirm
()
{
var
idx
=
this
.
allItemList
.
some
(
item
=>
item
.
serviceQuantity
>
0
)
if
(
!
idx
)
{
this
.
$message
.
error
(
'请选择服务套餐'
)
return
}
// this.$emit('selectItem', this.allItemList,this.totalPrice);
this
.
choseItemList
=
this
.
allItemList
.
filter
(
item
=>
item
.
serviceQuantity
>
0
)
this
.
choseItemList
=
this
.
choseItemList
.
map
(
ele
=>
{
return
{
...
ele
,
serviceId
:
ele
.
id
}
})
console
.
log
(
'确定之后choseItemList'
,
this
.
choseItemList
)
this
.
setmealDialogVisible
=
false
},
handleClose
()
{
this
.
setmealDialogVisible
=
false
this
.
totalPrice
=
0
this
.
choseItemList
.
forEach
(
item
=>
{
this
.
totalPrice
=
((
this
.
totalPrice
*
100
+
item
.
vipPrice
*
item
.
serviceQuantity
*
100
)
/
100
).
toFixed
(
2
)
})
// this.totalPrice = this.choseItemList.reduce(function(preValue, choseItem) {
// //第二个参数这里是对象,不是number(n)
// return preValue + choseItem.vipPrice * choseItem.serviceQuantity
// }, 0)
// this.getSetmealServiceFun()
},
handleTipClose
()
{
handleTipClose
()
{
this
.
isTipDialogVisible
=
false
this
.
isTipDialogVisible
=
false
},
},
...
@@ -843,16 +696,22 @@ export default {
...
@@ -843,16 +696,22 @@ export default {
}
}
}
}
.footer-panel
{
.footer-panel
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
position
:
fixed
;
position
:
fixed
;
width
:
100%
;
bottom
:
0px
;
bottom
:
0px
;
height
:
64px
;
height
:
78px
;
left
:
220px
;
width
:
100%
;
background
:
#ffffff
;
background
:
#ffffff
;
z-index
:
999
;
box-shadow
:
0px
-1px
1px
0px
rgba
(
88
,
80
,
255
,
0.1
);
box-shadow
:
0px
-1px
1px
0px
rgba
(
88
,
80
,
255
,
0.1
);
z-index
:
999
;
div
{
display
:
inline-block
;
position
:
relative
;
transform
:
translate
(
-50%
,
-50%
);
left
:
50%
;
top
:
50%
;
margin-left
:
-110px
;
}
}
}
.setmealServiceDialog
{
.setmealServiceDialog
{
/deep/.el-dialog__headerbtn
{
/deep/.el-dialog__headerbtn
{
...
...
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