Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
op-web-service
Project
Project
Details
Activity
Releases
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
bp
op-web-service
Commits
6c39447d
Commit
6c39447d
authored
Aug 06, 2021
by
lihui
Browse files
Options
Browse Files
Download
Plain Diff
feat: activityDetail
parents
15ef2269
8a2bf981
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
181 additions
and
95 deletions
+181
-95
activity.js
server/controllers/activity.js
+20
-9
router.js
server/router.js
+2
-1
index.vue
src/pages/Activity/ActivityDetail/index.vue
+79
-44
addProduc.vue
src/pages/Activity/releaseProduc/components/addProduc.vue
+1
-0
infoEditing.vue
src/pages/Activity/releaseProduc/components/infoEditing.vue
+9
-20
spellOrderSet.vue
...pages/Activity/releaseProduc/components/spellOrderSet.vue
+26
-4
index.vue
src/pages/Activity/releaseProduc/index.vue
+12
-5
index.js
src/service/Activity/index.js
+32
-12
No files found.
server/controllers/activity.js
View file @
6c39447d
...
...
@@ -91,17 +91,16 @@ exports.addMarketing = async ctx => {
// 编辑营销活动
exports
.
updateMarketing
=
async
ctx
=>
{
const
url
=
`
${
ACTIVITY_URI
}
/marketing/background/update_marketing`
;
const
opts
=
{
url
,
method
:
"POST"
,
json
:
true
,
body
:
ctx
.
request
.
body
};
ctx
.
body
=
await
req
(
ctx
,
opts
);
const
url
=
`
${
ACTIVITY_URI
}
/marketing/background/update_marketing`
;
const
opts
=
{
url
,
method
:
"POST"
,
json
:
true
,
body
:
ctx
.
request
.
body
};
ctx
.
body
=
await
req
(
ctx
,
opts
);
};
// 营销活动详情
exports
.
marketingInfo
=
async
ctx
=>
{
const
url
=
`
${
ACTIVITY_URI
}
/marketing/background/marketing_info`
;
...
...
@@ -139,6 +138,18 @@ exports.checkActivityDetail = async ctx => {
ctx
.
body
=
await
req
(
ctx
,
opts
);
};
// 查看活动订单
exports
.
checkActivityDetailInfo
=
async
ctx
=>
{
const
url
=
`
${
ACTIVITY_URI
}
/order/background/pindan_marketing_info_data_statistics`
;
const
opts
=
{
url
,
method
:
"GET"
,
json
:
true
,
body
:
ctx
.
request
.
body
};
ctx
.
body
=
await
req
(
ctx
,
opts
);
};
// 获取自提点列表
exports
.
getPlaceList
=
async
ctx
=>
{
const
url
=
`
${
ACTIVITY_URI
}
/marketing/background/take_place_list`
;
...
...
server/router.js
View file @
6c39447d
...
...
@@ -64,9 +64,10 @@ router.get(`${API_VERSION}/merchant/lifeinner/life_list`, life.get_life_list)
router
.
post
(
`
${
API_VERSION
}
/merchant/authority/get_user_info`
,
user
.
getUser_detail
)
// 后台运营管理
router
.
get
(
`
${
API_VERSION
}
/marketing/background/marketing_list`
,
activity
.
getActivityList
)
router
.
get
(
`
${
API_VERSION
}
/order/background/pindan_marketing_info_data_statistics`
,
activity
.
checkActivityDetailInfo
)
router
.
post
(
`
${
API_VERSION
}
/goods/background/edit_goods`
,
activity
.
editGoodsDetail
)
router
.
post
(
`
${
API_VERSION
}
/marketing/background/update_marketing`
,
activity
.
updateActivity
)
router
.
post
(
`
${
API_VERSION
}
/marketing/background/marketing_info`
,
activity
.
checkActivityDetail
)
router
.
post
(
`
${
API_VERSION
}
/marketing/background/marketing_info`
,
activity
.
checkActivityDetail
)
//
router
.
get
(
`
${
API_VERSION
}
/marketing/background/take_place_list`
,
activity
.
getPlaceList
)
router
.
post
(
`
${
API_VERSION
}
/marketing/background/add_take_place`
,
activity
.
addPlace
)
...
...
src/pages/Activity/ActivityDetail/index.vue
View file @
6c39447d
...
...
@@ -6,39 +6,41 @@
element-loading-spinner=
"el-icon-loading"
element-loading-background=
"rgba(0, 0, 0, 0.8)"
>
<div
class=
"activityInfo"
>
<div>
<p></p>
<p>
订单数量
</p>
</div>
<div>
<p></p>
<p>
已售商品数量
</p>
</div>
<div>
<p></p>
<p>
支付金额
</p>
</div>
<div>
<p></p>
<p>
优惠金额
</p>
</div>
<div>
<p></p>
<p>
退款
</p>
</div>
<div>
<p></p>
<p>
实际收入
</p>
</div>
<div
class=
"activityInfo-wrapper"
>
<el-card
class=
"activityInfo"
>
<div
class=
"infoItem"
>
<p
class=
"infoItemText"
>
{{
detailInfo
.
order_count
}}
</p>
<p>
订单数量
</p>
</div>
<div
class=
"infoItem"
>
<p
class=
"infoItemText"
>
{{
detailInfo
.
sold_goods_count
}}
</p>
<p>
已售商品数量
</p>
</div>
<div
class=
"infoItem"
>
<p
class=
"infoItemText"
>
{{
detailInfo
.
pay_amount_count
}}
</p>
<p>
支付金额
</p>
</div>
<div
class=
"infoItem"
>
<p
class=
"infoItemText"
>
{{
detailInfo
.
discount_amount_count
}}
</p>
<p>
优惠金额
</p>
</div>
<div
class=
"infoItem"
>
<p
class=
"infoItemText"
>
{{
detailInfo
.
refund_count
}}
</p>
<p>
退款
</p>
</div>
<div
class=
"infoItem"
>
<p
class=
"infoItemText"
>
{{
detailInfo
.
real_income_count
}}
</p>
<p>
实际收入
</p>
</div>
</el-card>
</div>
<div
class=
"activityDetail"
>
<div
class=
"my-header"
>
<h3>
{{
marketingInfo
.
marketing_name
}}
</h3>
<p
class=
"endTime"
>
{{
showTimer
}}
</p>
</div>
<section
class=
"content"
>
<el-card
class=
"activityGoods box-card"
>
<div
class=
"my-header"
>
<h3>
{{
marketingInfo
.
marketing_name
}}
</h3>
<p
class=
"endTime"
>
{{
showTimer
}}
</p>
</div>
<p
class=
"title"
>
拼单商品
</p>
<div
class=
"images-wrapper"
>
<div
...
...
@@ -111,7 +113,8 @@ export default {
goodsList
:
[],
marketingInfo
:
{
}
,
endTime
:
""
,
showTimer
:
""
showTimer
:
""
,
detailInfo
:
{
}
}
;
}
,
watch
:
{
}
,
...
...
@@ -120,14 +123,25 @@ export default {
async
checkActivityDetail
()
{
try
{
this
.
pageLoading
=
true
;
let
data
=
await
ActivityService
.
checkActivityDetail
({
marketing_id
:
this
.
$route
.
query
.
marketing_id
,
marketing_type
:
this
.
$route
.
query
.
marketing_type
}
);
let
dataArr
=
await
Promise
.
all
([
ActivityService
.
checkActivityDetail
({
marketing_id
:
this
.
$route
.
query
.
marketing_id
,
marketing_type
:
this
.
$route
.
query
.
marketing_type
}
),
ActivityService
.
checkActivityDetailInfo
({
marketing_id
:
this
.
$route
.
query
.
marketing_id
}
)
]);
// let data = await ActivityService.checkActivityDetail(
{
// marketing_id: this.$route.query.marketing_id,
// marketing_type: this.$route.query.marketing_type
//
}
);
this
.
pageLoading
=
false
;
this
.
goodsList
=
data
.
result
.
goods_list
;
this
.
marketingInfo
=
data
.
result
.
marketing_info
;
this
.
endTime
=
data
.
result
.
marketing_info
.
end_time
;
this
.
goodsList
=
dataArr
[
0
].
result
.
goods_list
;
this
.
marketingInfo
=
dataArr
[
0
].
result
.
marketing_info
;
this
.
endTime
=
dataArr
[
0
].
result
.
marketing_info
.
end_time
;
this
.
detailInfo
=
dataArr
[
1
].
result
;
}
catch
{
this
.
pageLoading
=
false
;
ElMessage
.
error
(
"加载失败"
);
...
...
@@ -182,18 +196,39 @@ export default {
.
wrapper
{
height
:
100
%
;
display
:
flex
;
justify
-
content
:
center
;
flex
-
direction
:
column
;
justify
-
content
:
flex
-
start
;
align
-
items
:
center
;
padding
:
45
px
10
px
0
;
.
activity
Detail
{
.
activity
Info
{
width
:
500
px
;
.
my
-
header
{
.
endTime
{
margin
:
5
px
0
;
font
-
size
:
15
px
;
color
:
red
;
/deep/
.
el
-
card__body
{
width
:
100
%
;
display
:
flex
;
flex
-
wrap
:
wrap
;
}
.
infoItem
{
width
:
33
%
;
text
-
align
:
center
;
margin
-
bottom
:
20
px
;
.
infoItemText
{
font
-
weight
:
bolder
;
}
// display: flex;
// align-items: center;
// justify-content: center;
}
}
.
activityDetail
{
width
:
500
px
;
.
content
{
.
my
-
header
{
.
endTime
{
margin
:
5
px
0
;
font
-
size
:
15
px
;
color
:
red
;
}
}
.
box
-
card
{
margin
:
10
px
0
;
}
...
...
src/pages/Activity/releaseProduc/components/addProduc.vue
View file @
6c39447d
...
...
@@ -503,6 +503,7 @@ export default {
this
.
comTableData
=
this
.
addProduc
;
},
},
created
()
{
this
.
getBusinessListMet
();
this
.
marketingInfoMet
();
...
...
src/pages/Activity/releaseProduc/components/infoEditing.vue
View file @
6c39447d
...
...
@@ -46,7 +46,6 @@
<
script
>
import
{
GOODS_URI
}
from
"../../../../../server/config"
;
import
{
marketingInfo
}
from
"../../../../service/Activity/index"
;
export
default
{
props
:
{
editInfo
:
{
...
...
@@ -86,30 +85,20 @@ export default {
this
.
infoEditForm
.
picUploadList
.
splice
(
i
,
1
);
}
}
},
// 获取营销活动详情
async
marketingInfoMet
()
{
let
marketingId
=
this
.
$route
.
query
.
marketing_id
;
if
(
marketingId
==
undefined
)
{
return
;
}
let
params
=
{
marketing_id
:
marketingId
,
marketing_type
:
"4"
};
const
res
=
await
marketingInfo
(
params
);
this
.
infoEditForm
.
title
=
res
.
result
.
marketing_info
.
marketing_name
;
this
.
infoEditForm
.
desc
=
res
.
result
.
marketing_info
.
pindan_desc
;
for
(
var
i
in
res
.
result
.
marketing_info
.
pindan_pic_url
)
{
}
},
watch
:
{
editInfo
:
function
(
newVal
)
{
this
.
infoEditForm
.
title
=
newVal
.
marketing_name
;
this
.
infoEditForm
.
desc
=
newVal
.
pindan_desc
;
for
(
var
i
in
newVal
.
pindan_pic_url
)
{
this
.
infoEditForm
.
picUrlList
.
push
({
url
:
res
.
result
.
marketing_info
.
pindan_pic_url
[
i
]
url
:
newVal
.
pindan_pic_url
[
i
]
});
}
}
},
created
()
{
this
.
marketingInfoMet
();
}
created
()
{}
};
</
script
>
...
...
src/pages/Activity/releaseProduc/components/spellOrderSet.vue
View file @
6c39447d
...
...
@@ -239,6 +239,7 @@ let checkphone = (rule, value, callback) => {
export
default
{
data
()
{
return
{
testData
:
this
.
spellOrderSetArr
,
startDate
:
""
,
//开始时间
endDate
:
""
,
// 结束时间
pickerOptions
:
{
...
...
@@ -295,6 +296,7 @@ export default {
id
:
""
,
// 删除自提点id
pageCount
:
0
,
// 总条数
takePlacelist
:
[],
// 自提点列表
checkedTakePlacelist
:
[],
// 已选择自提点列表 活动详情中添加的自提点列表
multipleSelection
:
[],
dialogFormVisible
:
false
,
formLabelWidth
:
"120px"
,
...
...
@@ -310,9 +312,27 @@ export default {
}
// 添加自提点 详细信息
}
;
}
,
props
:
{
spellOrderSetArr
:
{
type
:
Array
,
default
:
()
=>
[]
}
}
,
components
:
{
myMap
}
,
watch
:
{
spellOrderSetArr
:
{
// 监听props属性 展示自提点列表
handler
:
function
(
newVal
,
oldVal
)
{
// TO DO
console
.
log
(
"newVal:"
,
newVal
);
console
.
log
(
"oldVal:"
,
oldVal
);
}
,
deep
:
true
,
immediate
:
true
}
}
,
methods
:
{
/* API */
// 获取自提点
...
...
@@ -440,10 +460,12 @@ export default {
}
}
,
async
created
()
{
// 初始化时间
this
.
startMinTime
=
new
Date
();
// 开始时间的最小选择时间
this
.
startMaxTime
=
""
;
// 开始时间的最大选择时间
this
.
getPlaceList
();
if
(
this
.
$route
.
query
.
marketing_id
)
{
console
.
log
(
this
.
spellOrderSetArr
);
this
.
setTableListData
(
this
.
spellOrderSetArr
);
}
else
{
this
.
getPlaceList
();
}
}
}
;
<
/script
>
...
...
src/pages/Activity/releaseProduc/index.vue
View file @
6c39447d
...
...
@@ -13,14 +13,21 @@
<el-step
title=
"拼单设置"
></el-step>
</el-steps>
<div
class=
"content"
>
<infoEditing
ref=
"infoEdit"
v-if=
"active === 1"
:editInfo=
"infoEditArr"
/>
<infoEditing
ref=
"infoEdit"
v-show=
"active === 1"
:editInfo=
"infoEditArr"
/>
<addProduc
ref=
"addProduc"
v-
else-if
=
"active === 2"
v-
show
=
"active === 2"
:editInfo=
"testData"
:addProduc=
"addProducArr"
/>
<spellOrderSet
:spellOrderSet=
"spellOrderSetArr"
v-else
/>
<spellOrderSet
:spellOrderSetArr=
"spellOrderSetArr"
v-show=
"active === 3"
/>
</div>
<div
class=
"stepsBtn"
>
<el-button
@
click=
"prev"
v-show=
"active >= 2"
style=
"margin-right: 20px"
...
...
@@ -56,7 +63,7 @@ export default {
},
data
()
{
return
{
active
:
3
,
// 步骤条状态
active
:
1
,
// 步骤条状态
infoEditArr
:
[],
// 信息编辑数据
addProducArr
:
[],
// 添加商品
goodsSkuIDArr
:
[],
// 接收goods_sku_id
...
...
@@ -112,7 +119,7 @@ export default {
const
res
=
await
marketingInfo
(
params
);
this
.
infoEditArr
=
res
.
result
.
marketing_info
;
this
.
addProducArr
=
res
.
result
.
goods_list
;
this
.
spellOrderSetArr
=
res
.
result
.
marketing_info
;
this
.
spellOrderSetArr
=
res
.
result
.
take_place
;
},
// 取消
...
...
src/service/Activity/index.js
View file @
6c39447d
...
...
@@ -24,34 +24,43 @@ export async function pindanGoods(params) {
// 查看商品详情
export
async
function
markGoodsInfo
(
params
)
{
const
res
=
await
axios
.
get
(
"/api/v1/goods/background/marketing_goods_info"
,
{
params
});
return
res
;
const
res
=
await
axios
.
get
(
"/api/v1/goods/background/marketing_goods_info"
,
{
params
});
return
res
;
}
// 编辑商品详情
export
async
function
editGoods
(
params
)
{
const
res
=
await
axios
.
post
(
"/api/v1/goods/background/edit_goods"
,
params
);
return
res
;
const
res
=
await
axios
.
post
(
"/api/v1/goods/background/edit_goods"
,
params
);
return
res
;
}
// 添加营销活动
export
async
function
addMarketing
(
params
)
{
const
res
=
await
axios
.
post
(
"/api/v1/marketing/background/add_marketing"
,
params
);
return
res
;
const
res
=
await
axios
.
post
(
"/api/v1/marketing/background/add_marketing"
,
params
);
return
res
;
}
// 编辑营销活动
export
async
function
updateMarketing
(
params
)
{
const
res
=
await
axios
.
post
(
"/api/v1/marketing/background/update_marketing"
,
params
);
return
res
;
const
res
=
await
axios
.
post
(
"/api/v1/marketing/background/update_marketing"
,
params
);
return
res
;
}
// 营销活动详情
export
async
function
marketingInfo
(
params
)
{
const
res
=
await
axios
.
post
(
"/api/v1/marketing/background/marketing_info"
,
params
);
return
res
;
const
res
=
await
axios
.
post
(
"/api/v1/marketing/background/marketing_info"
,
params
);
return
res
;
}
class
ActivityService
{
...
...
@@ -92,6 +101,17 @@ class ActivityService {
return
res
;
}
// 查看活动订单-- 具体信息(新添加)
static
async
checkActivityDetailInfo
(
params
)
{
const
res
=
await
axios
.
get
(
"/api/v1/order/background/pindan_marketing_info_data_statistics"
,
{
params
}
);
return
res
;
}
// 获取自提点列表
static
async
getPlaceList
(
params
)
{
const
res
=
await
axios
.
get
(
...
...
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