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 2b5bdf8d
authored
May 25, 2022
by
王志慧
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix:修补bug
1 parent
227bf50c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
64 additions
and
137 deletions
src/api/modules/order.js
src/utils/index.js
src/views/memberCenter/order.vue
src/views/memberCenter/orderDetail.vue
src/views/memberCenter/setmeal.vue
src/views/memberCenter/setmealAddUpdate.vue
src/api/modules/order.js
View file @
2b5bdf8
...
...
@@ -40,7 +40,8 @@ const orderRefund = params => {
url
:
'/rop-scrm-equity/router'
,
method
:
'GET'
,
data
:
params
,
sign
:
true
sign
:
true
,
returnAll
:
true
})
}
//套餐使用详情
...
...
src/utils/index.js
View file @
2b5bdf8
...
...
@@ -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
config
=
{
YYYY
:
date
.
getFullYear
(),
MM
:
date
.
getMonth
()
+
1
,
//getMonth() 方法根据本地时间返回指定日期的月份(从 0 到 11)
DD
:
date
.
getDate
(),
HH
:
date
.
getHours
(),
mm
:
date
.
getMinutes
(),
ss
:
date
.
getSeconds
()
mm
:
date
.
getMinutes
()
<
10
?
'0'
+
date
.
getMinutes
():
date
.
getMinutes
()
,
ss
:
date
.
getSeconds
()
<
10
?
'0'
+
date
.
getSeconds
():
date
.
getSeconds
()
}
for
(
const
key
in
config
)
{
format
=
format
.
replace
(
key
,
config
[
key
])
...
...
src/views/memberCenter/order.vue
View file @
2b5bdf8
...
...
@@ -11,7 +11,7 @@
<el-input
:size=
"size"
v-model=
"searchForm.packageName"
placeholder=
"请输入名称"
clearable
></el-input>
</el-form-item>
<el-form-item
size=
"small"
label=
"类型"
style=
"margin-left: -10px"
>
<el-select
size=
"small"
v-model=
"searchForm.orderType"
placeholder=
"请选择"
>
<el-select
size=
"small"
v-model=
"searchForm.orderType"
placeholder=
"请选择"
>
<el-option
v-for=
"item in orderTypeList"
:key=
"item.dictValue"
:label=
"item.dictLabel"
:value=
"item.dictValue"
></el-option>
</el-select>
</el-form-item>
...
...
@@ -167,12 +167,8 @@ export default {
},
created
()
{
if
(
window
.
__POWERED_BY_QIANKUN__
)
{
console
.
log
(
'kkk'
,
this
.
$globalState
)
this
.
merchantModel
=
this
.
$globalState
.
session
.
merchantModel
this
.
accountLevel
=
this
.
$globalState
.
session
.
accountLevel
if
(
this
.
merchantModel
==
1
&&
this
.
accountLevel
==
1
)
{
this
.
searchForm
.
orderType
=
2
}
}
},
mounted
()
{},
...
...
@@ -231,6 +227,13 @@ export default {
this
.
refundVisible
=
!
this
.
refundVisible
},
refundConfirmDialog
()
{
if
(
this
.
refund
==
''
)
{
this
.
$message
({
message
:
'请输入退款说明'
,
type
:
'error'
})
return
}
const
params
=
{
reason
:
this
.
refund
,
orderCode
:
this
.
orderCode
...
...
@@ -251,8 +254,7 @@ export default {
this
.
$router
.
push
({
path
:
'/memberCenter/orderDetail'
,
query
:
{
id
:
row
.
id
,
detail
:
row
id
:
row
.
id
}
})
},
...
...
src/views/memberCenter/orderDetail.vue
View file @
2b5bdf8
...
...
@@ -27,6 +27,9 @@
<
template
slot=
"orderType"
slot-scope=
"scope"
>
<span>
{{
scope
.
scope
.
orderType
==
1
?
'套餐'
:
'权益卡'
}}
</span>
</
template
>
<
template
slot=
"amount"
>
<span>
1
</span>
</
template
>
<
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>
</
template
>
...
...
@@ -59,80 +62,6 @@
<el-button
type=
"primary"
@
click=
"goBack"
>
返回
</el-button>
</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>
</template>
...
...
@@ -233,7 +162,7 @@ export default {
},
{
colList
:
[
{
thColspan
:
1
,
tdColspan
:
2
,
label
:
'数量'
,
name
:
'amount'
},
{
thColspan
:
1
,
tdColspan
:
2
,
label
:
'数量'
,
name
:
'amount'
,
addHtml
:
'amount'
},
{
thColspan
:
1
,
tdColspan
:
2
,
label
:
'小计/元'
,
name
:
'totalPrice'
}
]
},
...
...
@@ -306,9 +235,6 @@ export default {
created
()
{
if
(
window
.
__POWERED_BY_QIANKUN__
)
{
this
.
accountLevel
=
this
.
$globalState
.
session
.
accountLevel
if
(
this
.
accountLevel
==
4
)
{
this
.
basicParams
.
splice
(
6
,
1
)
}
}
this
.
tableSearchForm
=
{
id
:
this
.
$route
.
query
.
id
...
...
@@ -316,20 +242,13 @@ export default {
this
.
getOrderPageDetail
()
},
mounted
()
{
// this.$nextTick(() => {
// let clientHeight = document.documentElement.clientHeight
// let offsettop = document.getElementById('tableWrap').offsetTop
// document.getElementById('tableWrap').style.minHeight = clientHeight - offsettop - 120 + 'px'
// })
},
mounted
()
{},
methods
:
{
dateFormatFun
(
date
)
{
return
dateFormat
(
date
)
},
getOrderPageDetail
()
{
getOrderPageDetail
({
id
:
this
.
$route
.
query
.
id
}).
then
(
res
=>
{
// this.mylist=res.list
if
(
res
.
code
==
'0'
)
{
this
.
detailData
=
res
.
data
}
else
{
...
...
src/views/memberCenter/setmeal.vue
View file @
2b5bdf8
...
...
@@ -16,7 +16,7 @@
/>
</div>
<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"
>
<template
v-for=
"(tab, index) in tabList"
>
<div
:class=
"['tab', tab.checked ? 'active' : '']"
@
click=
"changeTab(index)"
:key=
"index"
>
{{
tab
.
text
}}
</div>
...
...
@@ -33,31 +33,33 @@
<ticket
:choseItemList=
"scope.scope.list"
></ticket>
</div>
</span>
<span
class=
"table-btns"
slot=
"optionsFun"
slot-scope=
"scope"
:data=
"scope.scope"
>
<!-- 是否置顶推荐:1 是;2 否 -->
<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"
>
<!--
<el-button
type=
"text"
@
click=
"handleEdit(scope.scope)"
>
编辑
</el-button>
<
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>
-->
<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>
<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>
<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>
<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"
fn=
"置顶推荐"
>
置顶推荐
</GLButton>
<el-button
type=
"text"
v-if=
"scope.scope.topFlag == 1"
>
已置顶推荐
</el-button>
</template>
</span>
</GLTable>
...
...
@@ -141,33 +143,26 @@ export default {
{
label
:
'套餐名称'
,
prop
:
'packageName'
,
width
:
'180'
width
:
200
},
{
label
:
'套餐售价/元'
,
prop
:
'packagePrice'
,
width
:
140
prop
:
'packagePrice'
},
{
label
:
'说明'
,
prop
:
'notes'
,
width
:
16
0
,
width
:
20
0
,
line
:
4
},
{
label
:
'
购买人数
'
,
label
:
'
售出数量
'
,
prop
:
'buyNumber'
,
line
:
1
},
{
label
:
'套餐总价'
,
prop
:
'referencePrice'
},
{
label
:
'状态'
,
prop
:
'state'
,
width
:
'80'
,
formatter
:
cellValue
=>
{
return
this
.
baseDataList
.
stateList
.
find
(
item
=>
item
.
confId
==
cellValue
.
state
).
confName
}
...
...
@@ -176,7 +171,7 @@ export default {
label
:
'操作'
,
prop
:
'optionsFun'
,
addHtml
:
'optionsFun'
,
width
:
16
0
width
:
22
0
}
]
},
...
...
@@ -191,7 +186,7 @@ export default {
},
computed
:
{
getListApi
()
{
const
{
activetab
,
merchantModel
,
accountLevel
}
=
this
const
{
activetab
}
=
this
let
listApi
=
getSetMealListApi
if
(
activetab
==
1
)
{
listApi
=
getSetMealListApi
...
...
@@ -202,26 +197,36 @@ export default {
}
},
created
()
{
console
.
log
(
this
.
$route
.
query
.
activetab
)
if
(
window
.
__POWERED_BY_QIANKUN__
)
{
//运行在qiankun容器中
this
.
merchantId
=
this
.
$globalState
.
session
.
merchantId
this
.
merchantModel
=
this
.
$globalState
.
session
.
merchantModel
this
.
accountLevel
=
this
.
$globalState
.
session
.
accountLevel
// this.userType = this.$globalState.session.userType
if
(
this
.
merchantModel
==
2
)
{
this
.
activetab
=
0
}
}
this
.
searchForm
=
{
merchantId
:
this
.
merchantId
// 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
.
getLoginCountFun
()
},
mounted
()
{},
methods
:
{
dynamicFile
()
{
const
{
activetab
,
merchantModel
,
accountLevel
}
=
this
let
{
activetab
,
accountLevel
}
=
this
const
saleParam
=
{
label
:
'
在本店
售出数量'
,
label
:
'售出数量'
,
prop
:
'buyNumber'
,
width
:
140
}
...
...
@@ -230,11 +235,11 @@ export default {
prop
:
'referencePrice'
}
// accountLevel == 4
if
(
activetab
==
1
&&
accountLevel
=
=
4
)
{
this
.
tableParams
.
tableColumns
.
splice
(
5
,
1
,
saleParam
)
}
else
{
this
.
tableParams
.
tableColumns
.
splice
(
5
,
1
,
referencePrice
)
if
(
(
activetab
==
1
&&
accountLevel
==
4
)
||
accountLevel
!
=
4
)
{
this
.
tableParams
.
tableColumns
.
splice
(
4
,
1
,
saleParam
)
}
else
if
(
activetab
==
0
&&
accountLevel
==
4
)
{
this
.
tableParams
.
tableColumns
.
splice
(
4
,
1
,
referencePrice
)
}
},
changeTab
(
index
)
{
...
...
src/views/memberCenter/setmealAddUpdate.vue
View file @
2b5bdf8
This diff is collapsed.
Click to expand it.
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